Compare commits

..

2 Commits

Author SHA1 Message Date
openstappsbot
0b2654df49 refactor: update dependency androidx.core:core-splashscreen to v1.0.1 2023-07-24 09:05:42 +00:00
Rainer Killinger
81b4d28cc0 Resolve "Adapt App release template to monorepo changes" 2023-07-24 08:01:37 +00:00
363 changed files with 7909 additions and 8101 deletions

View File

@@ -5,7 +5,7 @@
"fixed": [], "fixed": [],
"linked": [["@openstapps/*"]], "linked": [["@openstapps/*"]],
"access": "restricted", "access": "restricted",
"baseBranch": "develop", "baseBranch": "master",
"updateInternalDependencies": "patch", "updateInternalDependencies": "patch",
"ignore": [] "ignore": []
} }

View File

@@ -0,0 +1,8 @@
---
'@openstapps/core-tools': major
---
Removed pack tool
Use a bundler like `tsup` in conjunction with an
`index.ts` that aggregates all exports instead.

View File

@@ -0,0 +1,11 @@
---
'@openstapps/api-plugin': major
'@openstapps/api-cli': major
'@openstapps/api': major
---
Split API into API, API-CLI and API-Plugin
Plugins are now required to use `api-plugin`.
Consumers of `api` can benefit from a slimmer package with
no NodeJS dependencies.

View File

@@ -0,0 +1,31 @@
---
'@openstapps/backend': major
---
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`)

View File

@@ -0,0 +1,51 @@
---
'@openstapps/projectmanagement': major
'@openstapps/prettier-config': major
'@openstapps/es-mapping-generator': major
'@openstapps/backend-config': major
'@openstapps/eslint-config': major
'@openstapps/minimal-connector': major
'@openstapps/collection-utils': major
'@openstapps/minimal-plugin': major
'@openstapps/tsconfig': major
'@openstapps/api-plugin': major
'@openstapps/core-tools': major
'@openstapps/gitlab-api': major
'@openstapps/easy-ast': major
'@openstapps/api-cli': major
'@openstapps/backend': major
'@openstapps/logger': major
'@openstapps/proxy': major
'@openstapps/core': major
'@openstapps/app': major
'@openstapps/api': major
---
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';
```

View File

@@ -0,0 +1,13 @@
---
'@openstapps/core': major
---
Migrate away from [ts-optchain](https://www.npmjs.com/package/ts-optchain)
The package has been deprecated with the last releast being 4 years ago.
TypeScript as well as ECMAScript have native support for optional
chaining with the `?.` operator now.
You will need to update any packages that rely on the translator
module.

View File

@@ -0,0 +1,25 @@
---
'@openstapps/projectmanagement': patch
'@openstapps/prettier-config': patch
'@openstapps/es-mapping-generator': patch
'@openstapps/eslint-config': patch
'@openstapps/minimal-connector': patch
'@openstapps/minimal-plugin': patch
'@openstapps/core-tools': patch
'@openstapps/gitlab-api': patch
'@openstapps/backend': patch
'@openstapps/logger': patch
'@openstapps/proxy': patch
'@openstapps/core': patch
'@openstapps/api': patch
---
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, '## ['));
```

View File

@@ -0,0 +1,8 @@
---
'@openstapps/backend': minor
'@openstapps/api-cli': major
---
Migrate integration tests from docker-compose solution to a shell script
`api-cli` no longer builds as a Docker container as a result.

View File

@@ -0,0 +1,34 @@
---
'@openstapps/projectmanagement': major
'@openstapps/prettier-config': major
'@openstapps/es-mapping-generator': major
'@openstapps/backend-config': major
'@openstapps/eslint-config': major
'@openstapps/minimal-connector': major
'@openstapps/collection-utils': major
'@openstapps/minimal-plugin': major
'@openstapps/tsconfig': major
'@openstapps/api-plugin': major
'@openstapps/core-tools': major
'@openstapps/gitlab-api': major
'@openstapps/easy-ast': major
'@openstapps/api-cli': major
'@openstapps/backend': major
'@openstapps/logger': major
'@openstapps/proxy': major
'@openstapps/core': major
'@openstapps/app': major
'@openstapps/api': major
---
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"
}
```

View File

@@ -0,0 +1,30 @@
---
'@openstapps/projectmanagement': major
'@openstapps/prettier-config': major
'@openstapps/es-mapping-generator': major
'@openstapps/backend-config': major
'@openstapps/eslint-config': major
'@openstapps/minimal-connector': major
'@openstapps/collection-utils': major
'@openstapps/minimal-plugin': major
'@openstapps/tsconfig': major
'@openstapps/api-plugin': major
'@openstapps/core-tools': major
'@openstapps/gitlab-api': major
'@openstapps/easy-ast': major
'@openstapps/api-cli': major
'@openstapps/backend': major
'@openstapps/logger': major
'@openstapps/proxy': major
'@openstapps/core': major
'@openstapps/app': major
'@openstapps/api': major
---
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

View File

@@ -0,0 +1,5 @@
---
'@openstapps/gitlab-api': minor
---
Migrate from request-promise-native to got

View File

@@ -0,0 +1,5 @@
---
'@openstapps/projectmanagement': patch
---
Moved project-docs to the [GitLab Wiki](https://gitlab.com/openstapps/openstapps/-/wikis/home) repo.

View File

@@ -0,0 +1,31 @@
---
'@openstapps/projectmanagement': minor
'@openstapps/prettier-config': minor
'@openstapps/es-mapping-generator': minor
'@openstapps/backend-config': minor
'@openstapps/eslint-config': minor
'@openstapps/minimal-connector': minor
'@openstapps/collection-utils': minor
'@openstapps/minimal-plugin': minor
'@openstapps/tsconfig': minor
'@openstapps/api-plugin': minor
'@openstapps/core-tools': minor
'@openstapps/gitlab-api': minor
'@openstapps/easy-ast': minor
'@openstapps/api-cli': minor
'@openstapps/backend': minor
'@openstapps/logger': minor
'@openstapps/proxy': minor
'@openstapps/core': minor
'@openstapps/app': minor
'@openstapps/api': minor
---
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

View File

@@ -0,0 +1,5 @@
---
'@openstapps/es-mapping-generator': patch
---
Remove @openstapps/logger dependency

59
.changeset/pre.json Normal file
View File

@@ -0,0 +1,59 @@
{
"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/app-release-template": "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"
},
"changesets": [
"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",
"proud-wolves-end",
"quick-houses-count",
"rare-squids-bake",
"soft-donuts-fail",
"sour-coins-visit",
"spicy-snails-sort",
"stale-garlics-share",
"strange-hounds-repair",
"tall-ducks-dream",
"tame-mayflies-hug",
"tame-rings-dream",
"thick-weeks-compete",
"thin-camels-give",
"tidy-buses-reflect",
"tough-hairs-provide"
]
}

View 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

View File

@@ -0,0 +1,9 @@
---
'@openstapps/eslint-config': minor
---
Update rules
- `unicorn/no-array-reduce` is now off
- `unicorn/no-non-null-assertion` is now off
- Removed prettier rules (use prettier formatting instead)

View File

@@ -0,0 +1,7 @@
---
'@openstapps/es-mapping-generator': major
---
Remove put-es-templates
The `put-es-templates` functionality has been removed.

View File

@@ -0,0 +1,24 @@
---
'@openstapps/projectmanagement': patch
'@openstapps/prettier-config': patch
'@openstapps/es-mapping-generator': patch
'@openstapps/backend-config': patch
'@openstapps/eslint-config': patch
'@openstapps/minimal-connector': patch
'@openstapps/collection-utils': patch
'@openstapps/minimal-plugin': patch
'@openstapps/tsconfig': patch
'@openstapps/api-plugin': patch
'@openstapps/core-tools': patch
'@openstapps/gitlab-api': patch
'@openstapps/easy-ast': patch
'@openstapps/api-cli': patch
'@openstapps/backend': patch
'@openstapps/logger': patch
'@openstapps/proxy': patch
'@openstapps/core': patch
'@openstapps/app': patch
'@openstapps/api': patch
---
Migrate away from @openstapps/configuration

View File

@@ -0,0 +1,5 @@
---
'@openstapps/projectmanagement': patch
---
Update release configs

View File

@@ -0,0 +1,7 @@
---
'@openstapps/api': minor
---
Migrate HttpClient to Node 18's native `fetch` API
HttpClient can now be used both in NodeJS and browsers.

View File

@@ -0,0 +1,7 @@
---
'@openstapps/es-mapping-generator': major
'@openstapps/backend': major
'@openstapps/core': major
---
Migrate es mapping types from es-mapping-generator to .d.ts next to generated mappings

View File

@@ -0,0 +1,5 @@
---
'@openstapps/eslint-config': patch
---
Add license header enforcement rule (unfinished)

View File

@@ -0,0 +1,5 @@
---
'@openstapps/core': minor
---
Include openapi.json in built package

View File

@@ -0,0 +1,26 @@
---
'@openstapps/projectmanagement': minor
'@openstapps/minimal-connector': minor
'@openstapps/minimal-plugin': minor
'@openstapps/collection-utils': minor
'@openstapps/core-tools': minor
'@openstapps/gitlab-api': minor
'@openstapps/backend': minor
'@openstapps/logger': minor
'@openstapps/core': minor
'@openstapps/api': minor
---
Migrate away from `@krlwlfrt/async-pool`
```ts
import {mapAsyncLimit} from '@openstapps/collection-utils';
await mapAsyncLimit(
[1, 2, 3],
async it => {
await someNetworkRequest(it);
},
5,
);
```

View File

@@ -0,0 +1,5 @@
---
'@openstapps/app': minor
---
Migrate away from JIT compilation

View File

@@ -0,0 +1,5 @@
---
'@openstapps/logger': patch
---
Fix an issue with chalk terminal colors in tests

View File

@@ -0,0 +1,9 @@
---
'@openstapps/core-tools': major
---
Migrate openapi generation to output single file
The OpenAPI generator now outputs a single file instead
of a directory with the `openapi.json` and copied schema
files.

View 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.

View File

@@ -0,0 +1,5 @@
---
'@openstapps/projectmanagement': minor
---
Migrate moment.js to date-fns

View File

@@ -0,0 +1,23 @@
---
'@openstapps/projectmanagement': major
'@openstapps/es-mapping-generator': major
'@openstapps/minimal-connector': major
'@openstapps/collection-utils': major
'@openstapps/minimal-plugin': major
'@openstapps/api-plugin': major
'@openstapps/core-tools': major
'@openstapps/gitlab-api': major
'@openstapps/easy-ast': major
'@openstapps/api-cli': major
'@openstapps/backend': major
'@openstapps/logger': major
'@openstapps/proxy': major
'@openstapps/core': major
'@openstapps/api': major
---
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'`

View File

@@ -0,0 +1,9 @@
---
'@openstapps/core-tools': major
'@openstapps/easy-ast': major
---
Migrate easy-ast to separate package
The `easy-ast` part of `core-tools` has been moved to its own package.
For migration, simply use the new package.

View File

@@ -0,0 +1,5 @@
---
'@openstapps/core-tools': patch
---
Migrate from away from lodash

5
.gitignore vendored
View File

@@ -19,11 +19,6 @@ www/
coverage.xml coverage.xml
report-junit.xml report-junit.xml
.deploy/ .deploy/
.venv/
# NixOS flake
result
hsperfdata_root
# Directory for instrumented libs generated by jscoverage/JSCover # Directory for instrumented libs generated by jscoverage/JSCover
lib-cov lib-cov

View File

@@ -7,18 +7,14 @@
# ``` # ```
# To your pipeline. # To your pipeline.
# https://docs.gitlab.com/ee/ci/pipelines/merge_request_pipelines.html#use-rules-to-add-jobs # 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: include:
- local: /backend/backend/.gitlab-ci.yml - local: /backend/backend/.gitlab-ci.yml
- local: /frontend/app/.gitlab-ci.yml - local: /frontend/app/.gitlab-ci.yml
- local: /.gitlab/schedules.gitlab-ci.yml - local: /.gitlab/schedules.gitlab-ci.yml
- local: /.gitlab/publishing.gitlab-ci.yml - local: /.gitlab/publishing.gitlab-ci.yml
rules:
- if: '$CI_COMMIT_MESSAGE =~ /ci: publish release$/'
when: always
variables: variables:
TURBO_CACHE_BYPASS: TURBO_CACHE_BYPASS:
@@ -32,7 +28,7 @@ variables:
default: default:
image: registry.gitlab.com/openstapps/openstapps/node-builder image: registry.gitlab.com/openstapps/openstapps/node-builder
tags: tags:
- saas-linux-xlarge-amd64 - performance
interruptible: true interruptible: true
before_script: before_script:
- corepack enable - corepack enable
@@ -80,14 +76,13 @@ build:
rules: &deploy-rules rules: &deploy-rules
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
variables: variables:
DEPLOY_ID: $CI_MERGE_REQUEST_IID DEPLOY_ID: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
- if: $CI_COMMIT_BRANCH == 'main' - if: $CI_COMMIT_BRANCH == 'main'
variables: variables:
DEPLOY_ID: production DEPLOY_ID: production
- if: $CI_COMMIT_BRANCH == 'develop' - if: $CI_COMMIT_BRANCH == 'develop'
variables: variables:
DEPLOY_ID: staging DEPLOY_ID: staging
- !reference [.limit_pipelines, rules]
stop review: stop review:
stage: build stage: build
@@ -126,15 +121,15 @@ unit:
coverage_format: cobertura coverage_format: cobertura
path: coverage.xml path: coverage.xml
rules: rules:
- !reference [.limit_pipelines, rules] - if: $CI_PIPELINE_SOURCE == 'merge_request_event' || $CI_COMMIT_BRANCH == 'main' || $CI_COMMIT_BRANCH == 'develop'
audit: audit:
stage: audit stage: audit
allow_failure: true
needs: [] needs: []
script: script:
- pnpm audit --prod - pnpm audit --prod
rules: rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' || $CI_COMMIT_BRANCH == 'develop'
allow_failure: true
- if: $CI_COMMIT_BRANCH == 'main' - if: $CI_COMMIT_BRANCH == 'main'
allow_failure: false allow_failure: false
- !reference [.limit_pipelines, rules]

View File

@@ -1,6 +1,6 @@
.limit_publish_pipelines: .limit_publishing:
rules: - if: $CI_PIPELINE_SOURCE != "schedule"
- if: '($CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "develop") && $CI_COMMIT_MESSAGE =~ /ci: publish release/ && $CI_PIPELINE_SOURCE != "schedule"' when: on_success
deploy: deploy:
stage: publish stage: publish
@@ -12,8 +12,7 @@ deploy:
paths: paths:
- ./.deploy - ./.deploy
- ./frontend/app/www - ./frontend/app/www
rules: rules: !reference [.limit_publishing]
- !reference [.limit_publish_pipelines, rules]
publish image: publish image:
stage: publish stage: publish
@@ -24,15 +23,14 @@ publish image:
image: image:
name: gcr.io/kaniko-project/executor:v1.12.1-debug name: gcr.io/kaniko-project/executor:v1.12.1-debug
entrypoint: [""] entrypoint: [""]
variables:
PUBLISH_TAG: next
script: script:
- > - >
/kaniko/executor /kaniko/executor
--context "${CI_PROJECT_DIR}/${DEPLOY_DIR}" --context "${CI_PROJECT_DIR}/${DEPLOY_DIR}"
--dockerfile "${CI_PROJECT_DIR}/${DEPLOY_DIR}/Dockerfile" --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}:$(grep -o '"version": "[^"]*' "${DEPLOY_DIR}/package.json" | cut -d'"' -f4)"
--destination "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:${PUBLISH_TAG}" --destination "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:latest"
rules: !reference [.limit_publishing]
parallel: parallel:
matrix: matrix:
- IMAGE_NAME: database - IMAGE_NAME: database
@@ -49,11 +47,6 @@ publish image:
DEPLOY_DIR: .deploy/minimal-plugin DEPLOY_DIR: .deploy/minimal-plugin
- IMAGE_NAME: app - IMAGE_NAME: app
DEPLOY_DIR: frontend/app DEPLOY_DIR: frontend/app
rules:
- if: $CI_COMMIT_BRANCH == 'main'
variables:
PUBLISH_TAG: latest
- !reference [.limit_publish_pipelines, rules]
publish packages: publish packages:
stage: publish stage: publish
@@ -61,17 +54,18 @@ publish packages:
variables: variables:
GIT_STRATEGY: clone GIT_STRATEGY: clone
GIT_DEPTH: 0 GIT_DEPTH: 0
PUBLISH_TAG: next
script: script:
- pnpm install - pnpm install
- pnpm build - pnpm build
- pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_AUTH_TOKEN}" - pnpm publish -r --publish-branch ${PUBLISH_BRANCH} --tag ${PUBLISH_TAG} --no-git-checks # TODO: Git checks...
- pnpm publish -r --publish-branch ${CI_COMMIT_BRANCH} --tag ${PUBLISH_TAG} --no-git-checks # TODO: Git checks...
rules: rules:
- if: $CI_COMMIT_BRANCH == 'main' - if: $CI_COMMIT_BRANCH == 'main'
variables: variables:
PUBLISH_BRANCH: main
PUBLISH_TAG: latest PUBLISH_TAG: latest
- !reference [.limit_publish_pipelines, rules] - variables:
PUBLISH_BRANCH: $CI_COMMIT_BRANCH
PUBLISH_TAG: next
publish docs: publish docs:
stage: publish stage: publish
@@ -83,6 +77,3 @@ publish docs:
artifacts: artifacts:
paths: paths:
- public - public
rules:
- if: $CI_COMMIT_BRANCH == 'main'
- !reference [.limit_publish_pipelines, rules]

View File

@@ -1,6 +1,6 @@
.limit_scheduled_pipelines: .limit_base_image_publishing:
rules: - if: $CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_BRANCH == 'main'
- if: $CI_COMMIT_BRANCH == 'main' && $CI_PIPELINE_SOURCE == "schedule" when: always
base image: base image:
image: docker image: docker
@@ -18,9 +18,10 @@ base image:
docker build docker build
-t "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:$(grep -o '"version": "[^"]*' "${DEPLOY_DIR}/package.json" | cut -d'"' -f4)" -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}" && -t "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:latest" "${CI_PROJECT_DIR}/${DEPLOY_DIR}" &&
docker push "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}" --all-tags docker push "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}"
cache: {} # disable irrelevant cache for this job cache: {} # disable irrelevant cache for this job
before_script: [] # do not run irrelevant before script for this job before_script: [] # do not run irrelevant before script for this job
rules: !reference [.limit_base_image_publishing]
parallel: parallel:
matrix: matrix:
- IMAGE_NAME: node-base - IMAGE_NAME: node-base
@@ -29,7 +30,4 @@ base image:
DEPLOY_DIR: images/node-builder DEPLOY_DIR: images/node-builder
- IMAGE_NAME: app-builder - IMAGE_NAME: app-builder
DEPLOY_DIR: images/app-builder DEPLOY_DIR: images/app-builder
- IMAGE_NAME: app-cypress
DEPLOY_DIR: images/app-cypress
rules:
- !reference [.limit_scheduled_pipelines, rules]

View File

@@ -53,6 +53,12 @@ const config = {
packages: ['**'], packages: ['**'],
pinVersion: 'workspace:*', pinVersion: 'workspace:*',
}, },
{
label: 'App may have some dependency exceptions',
dependencies: ['typescript', '@typescript-eslint/**', 'eslint**'],
packages: ['@openstapps/app'],
isIgnored: true,
},
], ],
}; };

View File

@@ -19,4 +19,4 @@ integration:
junit: junit:
- backend/backend/coverage/integration-report-junit.xml - backend/backend/coverage/integration-report-junit.xml
rules: rules:
- !reference [.limit_pipelines, rules] - if: $CI_PIPELINE_SOURCE == 'merge_request_event' || $CI_COMMIT_BRANCH == 'main' || $CI_COMMIT_BRANCH == 'develop'

View File

@@ -1,168 +1,5 @@
# @openstapps/backend # @openstapps/backend
## 3.0.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
- 23481d0d: Update to TypeScript 5.1.6
- Updated dependencies [98546a97]
- Updated dependencies [64caebaf]
- Updated dependencies [98546a97]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [1f62b5c5]
- Updated dependencies [98546a97]
- Updated dependencies [23481d0d]
- 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
- @openstapps/logger@3.0.0
- @openstapps/core@3.0.0
## 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 ## 3.0.0-next.0
### Major Changes ### Major Changes

View File

@@ -70,10 +70,6 @@ const config = {
authProvider: 'paia', authProvider: 'paia',
url: 'https://hds.hebis.de/paia/core', url: 'https://hds.hebis.de/paia/core',
}, },
/** TODO: idCards: {
authProvider: 'default',
url: 'TODO',
} */
}, },
}, },
aboutPages, aboutPages,

View File

@@ -1,7 +1,7 @@
{ {
"name": "@openstapps/backend", "name": "@openstapps/backend",
"description": "A reference implementation for a StApps backend", "description": "A reference implementation for a StApps backend",
"version": "3.0.0", "version": "3.0.0-next.0",
"private": true, "private": true,
"type": "module", "type": "module",
"license": "AGPL-3.0-only", "license": "AGPL-3.0-only",
@@ -99,7 +99,7 @@
"supertest": "6.3.3", "supertest": "6.3.3",
"ts-node": "10.9.1", "ts-node": "10.9.1",
"tsup": "6.7.0", "tsup": "6.7.0",
"typescript": "5.1.6" "typescript": "4.9.5"
}, },
"tsup": { "tsup": {
"entry": [ "entry": [

View File

@@ -29,7 +29,7 @@ export const query: QueryDslQueryContainer = {
should: [], should: [],
}, },
}, },
weight: 1.05, weight: 1.1,
}, },
{ {
filter: { filter: {
@@ -42,14 +42,14 @@ export const query: QueryDslQueryContainer = {
}, },
{ {
term: { term: {
'academicTerms.acronym.raw': 'WS 2023/24', 'academicTerms.acronym.raw': 'WS 2022/23',
}, },
}, },
], ],
should: [], should: [],
}, },
}, },
weight: 1.1, weight: 1.05,
}, },
{ {
filter: { filter: {
@@ -69,7 +69,7 @@ export const query: QueryDslQueryContainer = {
should: [], should: [],
}, },
}, },
weight: 1.05, weight: 1.1,
}, },
{ {
filter: { filter: {
@@ -82,14 +82,14 @@ export const query: QueryDslQueryContainer = {
}, },
{ {
term: { term: {
'academicTerms.acronym.raw': 'WiSe 2023/24', 'academicTerms.acronym.raw': 'WiSe 2022/23',
}, },
}, },
], ],
should: [], should: [],
}, },
}, },
weight: 1.1, weight: 1.05,
}, },
{ {
filter: { filter: {

View File

@@ -1,13 +0,0 @@
# @openstapps/database
## 3.0.0
### Patch Changes
- 23481d0d: Update to TypeScript 5.1.6
## 3.0.0-next.4
### Patch Changes
- 23481d0d: Update to TypeScript 5.1.6

View File

@@ -1,6 +1,6 @@
{ {
"name": "@openstapps/database", "name": "@openstapps/database",
"version": "3.0.0", "version": "2.0.0",
"private": true, "private": true,
"files": [ "files": [
"config", "config",

View File

@@ -1,109 +1,5 @@
# @openstapps/proxy # @openstapps/proxy
## 3.0.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
- 23481d0d: Update to TypeScript 5.1.6
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [98546a97]
- Updated dependencies [23481d0d]
- Updated dependencies [64caebaf]
- Updated dependencies [98546a97]
- Updated dependencies [64caebaf]
- @openstapps/logger@3.0.0
## 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 ## 3.0.0-next.0
### Major Changes ### Major Changes

View File

@@ -1,7 +1,7 @@
{ {
"name": "@openstapps/proxy", "name": "@openstapps/proxy",
"description": "NGINX proxy that is dynamically configured by a Node.js script", "description": "NGINX proxy that is dynamically configured by a Node.js script",
"version": "3.0.0", "version": "3.0.0-next.0",
"private": true, "private": true,
"type": "module", "type": "module",
"license": "AGPL-3.0-only", "license": "AGPL-3.0-only",
@@ -51,7 +51,7 @@
"is-cidr": "4.0.2", "is-cidr": "4.0.2",
"mustache": "4.2.0", "mustache": "4.2.0",
"semver": "7.3.8", "semver": "7.3.8",
"typescript": "5.1.6" "typescript": "4.9.5"
}, },
"devDependencies": { "devDependencies": {
"@openstapps/api-cli": "workspace:*", "@openstapps/api-cli": "workspace:*",

View File

@@ -1,80 +1,5 @@
# @openstapps/backend-config # @openstapps/backend-config
## 3.0.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
- 23481d0d: Update to TypeScript 5.1.6
## 3.0.0-next.4
### Patch Changes
- 23481d0d: Update to TypeScript 5.1.6
## 3.0.0-next.0 ## 3.0.0-next.0
### Major Changes ### Major Changes

View File

@@ -1,7 +1,7 @@
{ {
"name": "@openstapps/backend-config", "name": "@openstapps/backend-config",
"description": "Backend Configuration for OpenStApps", "description": "Backend Configuration for OpenStApps",
"version": "3.0.0", "version": "3.0.0-next.0",
"private": true, "private": true,
"type": "module", "type": "module",
"license": "GPL-3.0-only", "license": "GPL-3.0-only",

View File

@@ -1,97 +1,5 @@
# @openstapps/eslint-config # @openstapps/eslint-config
## 3.0.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
- 23481d0d: Update to TypeScript 5.1.6
- 64caebaf: Add license header enforcement rule (unfinished)
## 3.0.0-next.4
### Patch Changes
- 23481d0d: Update to TypeScript 5.1.6
## 3.0.0-next.0 ## 3.0.0-next.0
### Major Changes ### Major Changes

View File

@@ -1,7 +1,7 @@
{ {
"name": "@openstapps/eslint-config", "name": "@openstapps/eslint-config",
"description": "A collection of configuration base files for StApps projects. Just an (unused) experiment for now.", "description": "A collection of configuration base files for StApps projects. Just an (unused) experiment for now.",
"version": "3.0.0", "version": "3.0.0-next.0",
"type": "commonjs", "type": "commonjs",
"license": "GPL-3.0-only", "license": "GPL-3.0-only",
"repository": "git@gitlab.com:openstapps/eslint-config.git", "repository": "git@gitlab.com:openstapps/eslint-config.git",
@@ -19,7 +19,7 @@
"@openstapps/tsconfig": "workspace:*", "@openstapps/tsconfig": "workspace:*",
"@types/node": "18.15.3", "@types/node": "18.15.3",
"eslint": "8.43.0", "eslint": "8.43.0",
"typescript": "5.1.6" "typescript": "4.9.5"
}, },
"peerDependencies": { "peerDependencies": {
"@typescript-eslint/eslint-plugin": "5.60.1", "@typescript-eslint/eslint-plugin": "5.60.1",

View File

@@ -1,90 +1,5 @@
# @openstapps/prettier-config # @openstapps/prettier-config
## 3.0.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
- 23481d0d: Update to TypeScript 5.1.6
## 3.0.0-next.4
### Patch Changes
- 23481d0d: Update to TypeScript 5.1.6
## 3.0.0-next.0 ## 3.0.0-next.0
### Major Changes ### Major Changes

View File

@@ -1,7 +1,7 @@
{ {
"name": "@openstapps/prettier-config", "name": "@openstapps/prettier-config",
"description": "StApps Prettier Config", "description": "StApps Prettier Config",
"version": "3.0.0", "version": "3.0.0-next.0",
"type": "module", "type": "module",
"license": "GPL-3.0-only", "license": "GPL-3.0-only",
"repository": "git@gitlab.com:openstapps/prettier-config.git", "repository": "git@gitlab.com:openstapps/prettier-config.git",

View File

@@ -1,143 +1,5 @@
# @openstapps/projectmanagement # @openstapps/projectmanagement
## 3.0.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
- 11c9d742: Move images to separate packages
Removed builder image due to migration to Kaniko
- 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
- 4e4c7b5c: Update release configs
- 23481d0d: Update to TypeScript 5.1.6
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [98546a97]
- Updated dependencies [64caebaf]
- Updated dependencies [98546a97]
- Updated dependencies [23481d0d]
- Updated dependencies [64caebaf]
- Updated dependencies [98546a97]
- Updated dependencies [64caebaf]
- @openstapps/collection-utils@3.0.0
- @openstapps/gitlab-api@3.0.0
- @openstapps/logger@3.0.0
## 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 ## 3.0.0-next.3
### Patch Changes ### Patch Changes

View File

@@ -1,7 +1,7 @@
{ {
"name": "@openstapps/projectmanagement", "name": "@openstapps/projectmanagement",
"description": "Main documentation and scripts for maintenance.", "description": "Main documentation and scripts for maintenance.",
"version": "3.0.0", "version": "3.0.0-next.3",
"private": true, "private": true,
"type": "module", "type": "module",
"license": "GPL-3.0-only", "license": "GPL-3.0-only",
@@ -65,7 +65,7 @@
"mocha-junit-reporter": "2.2.0", "mocha-junit-reporter": "2.2.0",
"ts-node": "10.9.1", "ts-node": "10.9.1",
"tsup": "6.7.0", "tsup": "6.7.0",
"typescript": "5.1.6" "typescript": "4.9.5"
}, },
"tsup": { "tsup": {
"entry": [ "entry": [

View File

@@ -1,80 +1,5 @@
# @openstapps/tsconfig # @openstapps/tsconfig
## 3.0.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
- 23481d0d: Update to TypeScript 5.1.6
## 3.0.0-next.4
### Patch Changes
- 23481d0d: Update to TypeScript 5.1.6
## 3.0.0-next.0 ## 3.0.0-next.0
### Major Changes ### Major Changes

View File

@@ -1,7 +1,7 @@
{ {
"name": "@openstapps/tsconfig", "name": "@openstapps/tsconfig",
"description": "The tsconfig for the openstapps project", "description": "The tsconfig for the openstapps project",
"version": "3.0.0", "version": "3.0.0-next.0",
"type": "commonjs", "type": "commonjs",
"license": "GPL-3.0-only", "license": "GPL-3.0-only",
"repository": "git@gitlab.com:openstapps/eslint-config.git", "repository": "git@gitlab.com:openstapps/eslint-config.git",

View File

@@ -1,12 +1,12 @@
{ {
"compilerOptions": { "compilerOptions": {
"alwaysStrict": true, "alwaysStrict": true,
"charset": "utf8",
"declaration": true, "declaration": true,
"esModuleInterop": true, "esModuleInterop": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"skipLibCheck": true, "skipLibCheck": true,
"downlevelIteration": true,
"inlineSourceMap": true, "inlineSourceMap": true,
"module": "NodeNext", "module": "NodeNext",
"moduleResolution": "NodeNext", "moduleResolution": "NodeNext",
@@ -21,9 +21,9 @@
"noUnusedLocals": true, "noUnusedLocals": true,
"noUnusedParameters": true, "noUnusedParameters": true,
"outDir": "../../../lib/", "outDir": "../../../lib/",
"lib": ["ES2022", "DOM"], "lib": ["ES2021", "DOM"],
"strict": true, "strict": true,
"target": "ES2022" "target": "ES2021"
}, },
"ts-node": { "ts-node": {
"transpileOnly": true "transpileOnly": true

View File

@@ -1,133 +1,5 @@
# @openstapps/minimal-connector # @openstapps/minimal-connector
## 3.0.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
- 23481d0d: Update to TypeScript 5.1.6
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [98546a97]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [1f62b5c5]
- Updated dependencies [98546a97]
- Updated dependencies [23481d0d]
- Updated dependencies [64caebaf]
- Updated dependencies [0a7e6af1]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [98546a97]
- Updated dependencies [64caebaf]
- @openstapps/api@3.0.0
- @openstapps/logger@3.0.0
- @openstapps/core@3.0.0
## 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 ## 3.0.0-next.0
### Major Changes ### Major Changes

View File

@@ -1,7 +1,7 @@
{ {
"name": "@openstapps/minimal-connector", "name": "@openstapps/minimal-connector",
"description": "This is a minimal connector which serves as an example", "description": "This is a minimal connector which serves as an example",
"version": "3.0.0", "version": "3.0.0-next.0",
"private": true, "private": true,
"type": "module", "type": "module",
"license": "GPL-3.0-only", "license": "GPL-3.0-only",
@@ -55,7 +55,7 @@
"nock": "13.3.1", "nock": "13.3.1",
"ts-node": "10.9.1", "ts-node": "10.9.1",
"tsup": "6.7.0", "tsup": "6.7.0",
"typescript": "5.1.6" "typescript": "4.9.5"
}, },
"tsup": { "tsup": {
"entry": [ "entry": [

View File

@@ -1,13 +0,0 @@
# @openstapps/minimal-deployment
## 3.0.0
### Patch Changes
- 23481d0d: Update to TypeScript 5.1.6
## 3.0.0-next.4
### Patch Changes
- 23481d0d: Update to TypeScript 5.1.6

View File

@@ -1,6 +1,6 @@
{ {
"name": "@openstapps/minimal-deployment", "name": "@openstapps/minimal-deployment",
"version": "3.0.0", "version": "2.0.0",
"private": true, "private": true,
"files": [ "files": [
"database", "database",

View File

@@ -1,141 +1,5 @@
# @openstapps/minimal-plugin # @openstapps/minimal-plugin
## 3.0.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
- 23481d0d: Update to TypeScript 5.1.6
- 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 [1f62b5c5]
- Updated dependencies [98546a97]
- Updated dependencies [23481d0d]
- 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
- @openstapps/api-plugin@3.0.0
- @openstapps/api@3.0.0
- @openstapps/logger@3.0.0
- @openstapps/core@3.0.0
## 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 ## 3.0.0-next.0
### Major Changes ### Major Changes

View File

@@ -1,7 +1,7 @@
{ {
"name": "@openstapps/minimal-plugin", "name": "@openstapps/minimal-plugin",
"description": "Minimal Plugin", "description": "Minimal Plugin",
"version": "3.0.0", "version": "3.0.0-next.0",
"private": true, "private": true,
"type": "module", "type": "module",
"license": "GPL-3.0-only", "license": "GPL-3.0-only",
@@ -44,7 +44,7 @@
"@types/express": "4.17.17", "@types/express": "4.17.17",
"@types/node": "18.15.3", "@types/node": "18.15.3",
"tsup": "6.7.0", "tsup": "6.7.0",
"typescript": "5.1.6" "typescript": "4.9.5"
}, },
"tsup": { "tsup": {
"entry": [ "entry": [

27
flake.lock generated
View File

@@ -1,27 +0,0 @@
{
"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
}

View File

@@ -1,77 +0,0 @@
{
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(cyPrev: rec {
version = "13.2.0";
src = prev.fetchzip {
url = "https://cdn.cypress.io/desktop/${version}/linux-x64/cypress.zip";
hash = "sha256-9o0nprGcJhudS1LNm+T7Vf0Dwd1RBauYKI+w1FBQ3ZM=";
};
});
})
];
# 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;
});
};
}

View File

@@ -9,6 +9,4 @@
last 2 versions last 2 versions
Firefox ESR Firefox ESR
not dead not dead
not kaios 2.5 not IE 9-11 # For IE 9-11 support, remove 'not'.
not op_mini all
not IE 9-11

View File

@@ -0,0 +1,17 @@
# 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

View File

@@ -8,7 +8,7 @@
"parserOptions": { "parserOptions": {
"ecmaVersion": 2020, "ecmaVersion": 2020,
"sourceType": "module", "sourceType": "module",
"project": ["tsconfig.json", "tsconfig.spec.json", "cypress/tsconfig.json"], "project": ["tsconfig.json", "tsconfig.spec.json", "e2e/tsconfig.e2e.json"],
"createDefaultProgram": true "createDefaultProgram": true
}, },
"extends": [ "extends": [
@@ -33,7 +33,6 @@
"unicorn/prefer-object-from-entries": "off", "unicorn/prefer-object-from-entries": "off",
"unicorn/prefer-node-protocol": "off", "unicorn/prefer-node-protocol": "off",
"unicorn/no-process-exit": "off", "unicorn/no-process-exit": "off",
"unicorn/prefer-event-target": "off",
"unicorn/prevent-abbreviations": [ "unicorn/prevent-abbreviations": [
"warn", "warn",
{ {

View File

@@ -44,5 +44,3 @@ UserInterfaceState.xcuserstate
docs docs
bundle-info.html bundle-info.html
.browser-data/

View File

@@ -1,12 +1,9 @@
e2e: e2e:
image: registry.gitlab.com/openstapps/openstapps/app-cypress:node-18 image: cypress/browsers:latest # https://hub.docker.com/r/cypress/browsers/tags/
stage: test stage: test
script: script:
- pnpm --filter=@openstapps/app install - pnpm --filter=@openstapps/app install
- pnpm --filter=@openstapps/app exec cypress install - pnpm --filter=@openstapps/app exec cypress install
- cd node_modules/.pnpm/re2*/node_modules/re2
- npm run install
- cd $CI_PROJECT_DIR
- pnpm test:integration:app - pnpm test:integration:app
artifacts: artifacts:
when: on_failure when: on_failure
@@ -22,4 +19,4 @@ e2e:
- BROWSER: chrome - BROWSER: chrome
- BROWSER: firefox - BROWSER: firefox
rules: rules:
- !reference [.limit_pipelines, rules] - if: $CI_PIPELINE_SOURCE == 'merge_request_event' || $CI_COMMIT_BRANCH == 'main' || $CI_COMMIT_BRANCH == 'develop'

View File

@@ -0,0 +1,30 @@
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

11
frontend/app/.npmignore Normal file
View File

@@ -0,0 +1,11 @@
# 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

View File

@@ -23,5 +23,4 @@ module.exports = {
}, },
}, },
], ],
ignorePath: ['.prettierignore', '../../.gitignore'],
}; };

View File

@@ -1,169 +1,5 @@
# @openstapps/app # @openstapps/app
## 3.0.0
### Major Changes
- 23481d0d: Update to Angular 16.1
- 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
- f2c4ee30: Detail views now won't load data again if it is being navigated to from a list item
- e1cc33bb: Added the ability to remove and add date series from their detail page
- 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
- 1f62b5c5: Add support for web-service-provided id cards on the profile page
- a5c9d220: Add directions to inPlace and place list items
- e1cc33bb: Improved calendar descriptions
- The dashboard quick link now has a more intuitive icon
- "Recurring" has been renamed to "Week Overview"
- Long words in calendar tabs will now break instead of overflowing
- 001f978b: Revamp "My Courses" section on profile page
The "My Courses" section on the profile page has been improved
- It will now show the upcoming courses for the next five days
- The section header is now consistent with the other sections
- The section now uses standard list items instead of the custom solution
Additionally, the profile page component has been cleaned up.
- a5c9d220: Adjust map button and item behavior on different screen sizes
- Small screens will show the item without margins below the map actions
- Large screens will show the list item on the left side
- 23481d0d: 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()`)
- 64caebaf: Migrate away from JIT compilation
- a5c9d220: Map items are now native list items
- e1cc33bb: Replaced simple links with list items in date-series detail
- 001f978b: Use event title for date series instead of the generic date series title
### Patch Changes
- a99e08cd: Refactored Opening Hours
- Migrated Opening Hours to use OnPush change detection
- Fixed a bug where opening hours would not update correctly
- Lazy-load opening hours module to keep it out of the main bundle
- Added e2e tests to verify functionality
- Changed live update status to show exact minutes starting one hour before the next change
- bd09b366: Use observable chains instead of change detection in the rating component
- 001f978b: Add a way to hide action chips on list items
- e0b7e616: Fixed distance not updating in list items
- b210e0d9: Change leaflet tiles to be inverted as a whole
- 98546a97: Migrate away from @openstapps/configuration
- 23481d0d: Update to TypeScript 5.1.6
- bebee6b4: Migrate collection helpers to use @openstapps/collection-utils
- 3c49c4cf: Fixed an issue that caused double and triple loading of data detail items through the route stack service
- 107a7c5e: Migrate unit tests to karma-coverage and junit reports.
Fixes an issue where coverage reports would not be generated.
- 1f62b5c5: Make section swiper buttons reactive
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [98546a97]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [1f62b5c5]
- Updated dependencies [98546a97]
- Updated dependencies [23481d0d]
- Updated dependencies [64caebaf]
- Updated dependencies [0a7e6af1]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- Updated dependencies [64caebaf]
- @openstapps/api@3.0.0
- @openstapps/collection-utils@3.0.0
- @openstapps/core@3.0.0
## 3.0.0-next.4
### Major Changes
- 23481d0d: Update to Angular 16.1
### Minor Changes
- 23481d0d: 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()`)
### Patch Changes
- 23481d0d: Update to TypeScript 5.1.6
- bebee6b4: Migrate collection helpers to use @openstapps/collection-utils
- 107a7c5e: Migrate unit tests to karma-coverage and junit reports.
Fixes an issue where coverage reports would not be generated.
- Updated dependencies [23481d0d]
- @openstapps/collection-utils@3.0.0-next.4
- @openstapps/core@3.0.0-next.4
- @openstapps/api@3.0.0-next.4
## 3.0.0-next.0 ## 3.0.0-next.0
### Major Changes ### Major Changes

View File

@@ -2,14 +2,6 @@
A few notes to our icon set, for users and future maintainers. A few notes to our icon set, for users and future maintainers.
You will need to setup fonttools with python
```shell
python -m venv .venv && .venv/bin/python -m pip install -r requirements.txt
```
Alternatively, anything that puts `fonttools` within your path will do as well.
## Usage ## Usage
To find icon names, visit the To find icon names, visit the
@@ -81,3 +73,6 @@ npm run minify-icons
Unfortunately, I was unable to find a JS package that could to the job, Unfortunately, I was unable to find a JS package that could to the job,
and had to rely on the Python module [fonttools](https://github.com/fonttools/fonttools). and had to rely on the Python module [fonttools](https://github.com/fonttools/fonttools).
That means that you might run into additional issues when running the
above-mentioned command.

View File

@@ -42,23 +42,3 @@ The command `ionic cordova run ios` runs into the error `/platforms/ios/build/em
- Either use the command: `ionic cordova emulate ios -- --buildFlag="-UseModernBuildSystem=0"` - Either use the command: `ionic cordova emulate ios -- --buildFlag="-UseModernBuildSystem=0"`
- Or open the iOS project in Xcode and change build system in workspace settings to `Lagacy Build System`. Then the normal run command works also. - Or open the iOS project in Xcode and change build system in workspace settings to `Lagacy Build System`. Then the normal run command works also.
## Cypress
#### Problem
The browser doesn't open or the tests don't connect to a browser
#### Cause
Cypress was installed to a read-only location, see
[this issue](https://github.com/cypress-io/cypress/issues/18893).
This can be the case if you use NixOS.
#### Solution
Make sure the cypress folder is writable before each launch
```shell
chmod -R +rw ~/.config/Cypress
```

View File

@@ -52,44 +52,6 @@ All the npm scripts are defined in `package.json` [file](package.json). It is re
## Most useful commands ## Most useful commands
## Editing the Ionic Database from the browser
Add the following function using the browser console
```js
function addToIonicDB(key, value) {
indexedDB.open('_ionicstorage').onsuccess = event => {
const db = event.target.result;
db.transaction('_ionickv', 'readwrite').objectStore('_ionickv').put(value, key);
};
}
```
You can then call the function in the browser to add values to the
ionic database in the IndexedDB.
For example, you can add a stored authorization like this:
```js
addToIonicDB(
'token_response',
JSON.stringify({
access_token: 'AT-123-abcdefghi',
refresh_token: 'RT-123-jklmnopqrs',
scope: '',
token_type: 'bearer',
issued_at: 1696852785,
expires_in: '28800',
}),
);
```
You'll need to run _Chromium_ using
```shell
pnpm chromium:no-cors
```
### Running the app ### Running the app
Install the npm packages needed for running the app (as for any other node project which uses npm): Install the npm packages needed for running the app (as for any other node project which uses npm):

View File

@@ -11,7 +11,6 @@ apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
dependencies { dependencies {
implementation project(':capacitor-app') implementation project(':capacitor-app')
implementation project(':capacitor-browser') implementation project(':capacitor-browser')
implementation project(':capacitor-clipboard')
implementation project(':capacitor-device') implementation project(':capacitor-device')
implementation project(':capacitor-dialog') implementation project(':capacitor-dialog')
implementation project(':capacitor-filesystem') implementation project(':capacitor-filesystem')

View File

@@ -1,74 +1,70 @@
[ [
{ {
"pkg": "@capacitor/app", "pkg": "@capacitor/app",
"classpath": "com.capacitorjs.plugins.app.AppPlugin" "classpath": "com.capacitorjs.plugins.app.AppPlugin"
}, },
{ {
"pkg": "@capacitor/browser", "pkg": "@capacitor/browser",
"classpath": "com.capacitorjs.plugins.browser.BrowserPlugin" "classpath": "com.capacitorjs.plugins.browser.BrowserPlugin"
}, },
{ {
"pkg": "@capacitor/clipboard", "pkg": "@capacitor/device",
"classpath": "com.capacitorjs.plugins.clipboard.ClipboardPlugin" "classpath": "com.capacitorjs.plugins.device.DevicePlugin"
}, },
{ {
"pkg": "@capacitor/device", "pkg": "@capacitor/dialog",
"classpath": "com.capacitorjs.plugins.device.DevicePlugin" "classpath": "com.capacitorjs.plugins.dialog.DialogPlugin"
}, },
{ {
"pkg": "@capacitor/dialog", "pkg": "@capacitor/filesystem",
"classpath": "com.capacitorjs.plugins.dialog.DialogPlugin" "classpath": "com.capacitorjs.plugins.filesystem.FilesystemPlugin"
}, },
{ {
"pkg": "@capacitor/filesystem", "pkg": "@capacitor/geolocation",
"classpath": "com.capacitorjs.plugins.filesystem.FilesystemPlugin" "classpath": "com.capacitorjs.plugins.geolocation.GeolocationPlugin"
}, },
{ {
"pkg": "@capacitor/geolocation", "pkg": "@capacitor/haptics",
"classpath": "com.capacitorjs.plugins.geolocation.GeolocationPlugin" "classpath": "com.capacitorjs.plugins.haptics.HapticsPlugin"
}, },
{ {
"pkg": "@capacitor/haptics", "pkg": "@capacitor/keyboard",
"classpath": "com.capacitorjs.plugins.haptics.HapticsPlugin" "classpath": "com.capacitorjs.plugins.keyboard.KeyboardPlugin"
}, },
{ {
"pkg": "@capacitor/keyboard", "pkg": "@capacitor/local-notifications",
"classpath": "com.capacitorjs.plugins.keyboard.KeyboardPlugin" "classpath": "com.capacitorjs.plugins.localnotifications.LocalNotificationsPlugin"
}, },
{ {
"pkg": "@capacitor/local-notifications", "pkg": "@capacitor/network",
"classpath": "com.capacitorjs.plugins.localnotifications.LocalNotificationsPlugin" "classpath": "com.capacitorjs.plugins.network.NetworkPlugin"
}, },
{ {
"pkg": "@capacitor/network", "pkg": "@capacitor/preferences",
"classpath": "com.capacitorjs.plugins.network.NetworkPlugin" "classpath": "com.capacitorjs.plugins.preferences.PreferencesPlugin"
}, },
{ {
"pkg": "@capacitor/preferences", "pkg": "@capacitor/share",
"classpath": "com.capacitorjs.plugins.preferences.PreferencesPlugin" "classpath": "com.capacitorjs.plugins.share.SharePlugin"
}, },
{ {
"pkg": "@capacitor/share", "pkg": "@capacitor/splash-screen",
"classpath": "com.capacitorjs.plugins.share.SharePlugin" "classpath": "com.capacitorjs.plugins.splashscreen.SplashScreenPlugin"
}, },
{ {
"pkg": "@capacitor/splash-screen", "pkg": "@capacitor/status-bar",
"classpath": "com.capacitorjs.plugins.splashscreen.SplashScreenPlugin" "classpath": "com.capacitorjs.plugins.statusbar.StatusBarPlugin"
}, },
{ {
"pkg": "@capacitor/status-bar", "pkg": "@hugotomazi/capacitor-navigation-bar",
"classpath": "com.capacitorjs.plugins.statusbar.StatusBarPlugin" "classpath": "br.com.tombus.capacitor.plugin.navigationbar.NavigationBarPlugin"
}, },
{ {
"pkg": "@hugotomazi/capacitor-navigation-bar", "pkg": "@transistorsoft/capacitor-background-fetch",
"classpath": "br.com.tombus.capacitor.plugin.navigationbar.NavigationBarPlugin" "classpath": "com.transistorsoft.bgfetch.capacitor.BackgroundFetchPlugin"
}, },
{ {
"pkg": "@transistorsoft/capacitor-background-fetch", "pkg": "capacitor-secure-storage-plugin",
"classpath": "com.transistorsoft.bgfetch.capacitor.BackgroundFetchPlugin" "classpath": "com.whitestein.securestorage.SecureStoragePluginPlugin"
}, }
{
"pkg": "capacitor-secure-storage-plugin",
"classpath": "com.whitestein.securestorage.SecureStoragePluginPlugin"
}
] ]

View File

@@ -1,57 +1,54 @@
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN // DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
include ':capacitor-android' include ':capacitor-android'
project(':capacitor-android').projectDir = new File('../../../node_modules/.pnpm/@capacitor+android@4.6.1_@capacitor+core@4.6.1/node_modules/@capacitor/android/capacitor') project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')
include ':capacitor-app' include ':capacitor-app'
project(':capacitor-app').projectDir = new File('../../../node_modules/.pnpm/@capacitor+app@4.1.1_@capacitor+core@4.6.1/node_modules/@capacitor/app/android') project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/android')
include ':capacitor-browser' include ':capacitor-browser'
project(':capacitor-browser').projectDir = new File('../../../node_modules/.pnpm/@capacitor+browser@4.1.0_@capacitor+core@4.6.1/node_modules/@capacitor/browser/android') project(':capacitor-browser').projectDir = new File('../node_modules/@capacitor/browser/android')
include ':capacitor-clipboard'
project(':capacitor-clipboard').projectDir = new File('../../../node_modules/.pnpm/@capacitor+clipboard@4.1.0_@capacitor+core@4.6.1/node_modules/@capacitor/clipboard/android')
include ':capacitor-device' include ':capacitor-device'
project(':capacitor-device').projectDir = new File('../../../node_modules/.pnpm/@capacitor+device@4.1.0_@capacitor+core@4.6.1/node_modules/@capacitor/device/android') project(':capacitor-device').projectDir = new File('../node_modules/@capacitor/device/android')
include ':capacitor-dialog' include ':capacitor-dialog'
project(':capacitor-dialog').projectDir = new File('../../../node_modules/.pnpm/@capacitor+dialog@4.1.0_@capacitor+core@4.6.1/node_modules/@capacitor/dialog/android') project(':capacitor-dialog').projectDir = new File('../node_modules/@capacitor/dialog/android')
include ':capacitor-filesystem' include ':capacitor-filesystem'
project(':capacitor-filesystem').projectDir = new File('../../../node_modules/.pnpm/@capacitor+filesystem@4.1.4_@capacitor+core@4.6.1/node_modules/@capacitor/filesystem/android') project(':capacitor-filesystem').projectDir = new File('../node_modules/@capacitor/filesystem/android')
include ':capacitor-geolocation' include ':capacitor-geolocation'
project(':capacitor-geolocation').projectDir = new File('../../../node_modules/.pnpm/@capacitor+geolocation@4.1.0_@capacitor+core@4.6.1/node_modules/@capacitor/geolocation/android') project(':capacitor-geolocation').projectDir = new File('../node_modules/@capacitor/geolocation/android')
include ':capacitor-haptics' include ':capacitor-haptics'
project(':capacitor-haptics').projectDir = new File('../../../node_modules/.pnpm/@capacitor+haptics@4.1.0_@capacitor+core@4.6.1/node_modules/@capacitor/haptics/android') project(':capacitor-haptics').projectDir = new File('../node_modules/@capacitor/haptics/android')
include ':capacitor-keyboard' include ':capacitor-keyboard'
project(':capacitor-keyboard').projectDir = new File('../../../node_modules/.pnpm/@capacitor+keyboard@4.1.0_@capacitor+core@4.6.1/node_modules/@capacitor/keyboard/android') project(':capacitor-keyboard').projectDir = new File('../node_modules/@capacitor/keyboard/android')
include ':capacitor-local-notifications' include ':capacitor-local-notifications'
project(':capacitor-local-notifications').projectDir = new File('../../../node_modules/.pnpm/@capacitor+local-notifications@4.1.4_@capacitor+core@4.6.1/node_modules/@capacitor/local-notifications/android') project(':capacitor-local-notifications').projectDir = new File('../node_modules/@capacitor/local-notifications/android')
include ':capacitor-network' include ':capacitor-network'
project(':capacitor-network').projectDir = new File('../../../node_modules/.pnpm/@capacitor+network@4.1.0_@capacitor+core@4.6.1/node_modules/@capacitor/network/android') project(':capacitor-network').projectDir = new File('../node_modules/@capacitor/network/android')
include ':capacitor-preferences' include ':capacitor-preferences'
project(':capacitor-preferences').projectDir = new File('../../../node_modules/.pnpm/@capacitor+preferences@4.0.2_@capacitor+core@4.6.1/node_modules/@capacitor/preferences/android') project(':capacitor-preferences').projectDir = new File('../node_modules/@capacitor/preferences/android')
include ':capacitor-share' include ':capacitor-share'
project(':capacitor-share').projectDir = new File('../../../node_modules/.pnpm/@capacitor+share@4.1.0_@capacitor+core@4.6.1/node_modules/@capacitor/share/android') project(':capacitor-share').projectDir = new File('../node_modules/@capacitor/share/android')
include ':capacitor-splash-screen' include ':capacitor-splash-screen'
project(':capacitor-splash-screen').projectDir = new File('../../../node_modules/.pnpm/@capacitor+splash-screen@4.1.2_@capacitor+core@4.6.1/node_modules/@capacitor/splash-screen/android') project(':capacitor-splash-screen').projectDir = new File('../node_modules/@capacitor/splash-screen/android')
include ':capacitor-status-bar' include ':capacitor-status-bar'
project(':capacitor-status-bar').projectDir = new File('../../../node_modules/.pnpm/@capacitor+status-bar@4.1.1_@capacitor+core@4.6.1/node_modules/@capacitor/status-bar/android') project(':capacitor-status-bar').projectDir = new File('../node_modules/@capacitor/status-bar/android')
include ':hugotomazi-capacitor-navigation-bar' include ':hugotomazi-capacitor-navigation-bar'
project(':hugotomazi-capacitor-navigation-bar').projectDir = new File('../../../node_modules/.pnpm/@hugotomazi+capacitor-navigation-bar@2.0.0_@capacitor+core@4.6.1/node_modules/@hugotomazi/capacitor-navigation-bar/android') project(':hugotomazi-capacitor-navigation-bar').projectDir = new File('../node_modules/@hugotomazi/capacitor-navigation-bar/android')
include ':transistorsoft-capacitor-background-fetch' include ':transistorsoft-capacitor-background-fetch'
project(':transistorsoft-capacitor-background-fetch').projectDir = new File('../../../node_modules/.pnpm/@transistorsoft+capacitor-background-fetch@1.0.2_@capacitor+core@4.6.1/node_modules/@transistorsoft/capacitor-background-fetch/android') project(':transistorsoft-capacitor-background-fetch').projectDir = new File('../node_modules/@transistorsoft/capacitor-background-fetch/android')
include ':capacitor-secure-storage-plugin' include ':capacitor-secure-storage-plugin'
project(':capacitor-secure-storage-plugin').projectDir = new File('../../../node_modules/.pnpm/capacitor-secure-storage-plugin@0.8.1_@capacitor+core@4.6.1/node_modules/capacitor-secure-storage-plugin/android') project(':capacitor-secure-storage-plugin').projectDir = new File('../node_modules/capacitor-secure-storage-plugin/android')

0
frontend/app/android/gradlew vendored Executable file → Normal file
View File

View File

@@ -7,7 +7,7 @@ ext {
androidxCoordinatorLayoutVersion = '1.2.0' androidxCoordinatorLayoutVersion = '1.2.0'
androidxCoreVersion = '1.8.0' androidxCoreVersion = '1.8.0'
androidxFragmentVersion = '1.4.1' androidxFragmentVersion = '1.4.1'
coreSplashScreenVersion = '1.0.0-rc01' coreSplashScreenVersion = '1.0.1'
androidxWebkitVersion = '1.4.0' androidxWebkitVersion = '1.4.0'
junitVersion = '4.13.2' junitVersion = '4.13.2'
androidxJunitVersion = '1.1.3' androidxJunitVersion = '1.1.3'

View File

@@ -1,6 +1,7 @@
{ {
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1, "version": 1,
"defaultProject": "app",
"newProjectRoot": "projects", "newProjectRoot": "projects",
"projects": { "projects": {
"app": { "app": {
@@ -16,17 +17,10 @@
"outputPath": "www", "outputPath": "www",
"index": "src/index.html", "index": "src/index.html",
"main": "src/main.ts", "main": "src/main.ts",
"polyfills": "zone.js", "polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json", "tsConfig": "tsconfig.app.json",
"allowedCommonJsDependencies": [
"moment",
"opening_hours",
"leaflet",
"leaflet.markercluster",
"localforge",
"guid-typescript"
],
"aot": true, "aot": true,
"allowedCommonJsDependencies": ["moment", "opening_hours"],
"assets": [ "assets": [
{ {
"glob": "**/*", "glob": "**/*",
@@ -50,7 +44,8 @@
}, },
"./node_modules/leaflet/dist/leaflet.css", "./node_modules/leaflet/dist/leaflet.css",
"./node_modules/leaflet.markercluster/dist/MarkerCluster.Default.css" "./node_modules/leaflet.markercluster/dist/MarkerCluster.Default.css"
] ],
"scripts": []
}, },
"configurations": { "configurations": {
"production": { "production": {
@@ -107,6 +102,7 @@
"browserTarget": "app:build:development" "browserTarget": "app:build:development"
}, },
"ci": { "ci": {
"progress": false,
"browserTarget": "app:build" "browserTarget": "app:build"
}, },
"fake": { "fake": {
@@ -115,13 +111,21 @@
}, },
"defaultConfiguration": "development" "defaultConfiguration": "development"
}, },
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "app:build"
}
},
"test": { "test": {
"builder": "@angular-devkit/build-angular:karma", "builder": "@angular-devkit/build-angular:karma",
"options": { "options": {
"polyfills": ["zone.js", "zone.js/testing"], "main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json", "tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js", "karmaConfig": "karma.conf.js",
"main": "src/test.ts", "styles": [],
"scripts": [],
"assets": [ "assets": [
{ {
"glob": "favicon.ico", "glob": "favicon.ico",
@@ -139,6 +143,12 @@
"output": "assets/" "output": "assets/"
} }
] ]
},
"configurations": {
"ci": {
"progress": false,
"watch": false
}
} }
}, },
"lint": { "lint": {
@@ -182,7 +192,6 @@
"builder": "@cypress/schematic:cypress", "builder": "@cypress/schematic:cypress",
"options": { "options": {
"devServerTarget": "app:serve", "devServerTarget": "app:serve",
"liveReload": false,
"watch": true, "watch": true,
"headless": false "headless": false
}, },
@@ -197,6 +206,7 @@
}, },
"cli": { "cli": {
"packageManager": "pnpm", "packageManager": "pnpm",
"defaultCollection": "@ionic/angular-toolkit",
"analytics": false "analytics": false
}, },
"schematics": { "schematics": {

View File

@@ -18,18 +18,14 @@
describe('dashboard', async function () { describe('dashboard', async function () {
describe('schedule section', function () { describe('schedule section', function () {
it('should lead to the week overview', function () { it('should lead to the schedule', function () {
cy.visit('/overview'); cy.visit('/overview');
cy.get('.schedule') cy.get('.schedule').contains('a', 'Stundenplan').click();
.contains('a', /Wochen.*übersicht/) cy.url().should('include', '/schedule/recurring');
.click();
cy.url().should('include', '/schedule/week-overview');
});
it('should lead to the calendar', function () {
cy.visit('/overview'); cy.visit('/overview');
cy.get('.schedule').contains('a', 'Kein Eintrag gefunden').click(); cy.get('.schedule').contains('a', 'Kein Eintrag gefunden').click();
cy.url().should('include', '/schedule/calendar'); cy.url().should('include', '/schedule/recurring');
}); });
// TODO: Reenable and stabilize tests // TODO: Reenable and stabilize tests

View File

@@ -1,141 +0,0 @@
describe('opening hours', () => {
beforeEach(function () {
cy.intercept('POST', 'https://mobile.server.uni-frankfurt.de/search', {
fixture: 'search/types/canteen/canteen-search-result.json',
}).as('search');
});
it('should specify relative closing time', () => {
cy.clock(new Date(2023, 9, 16, 15, 29), ['Date']);
cy.visit('/canteen');
cy.get('stapps-opening-hours')
.first()
.should('contain', 'Geöffnet')
.should('contain', 'Schließt heute um 22:00');
});
it('should specify relative opening time', () => {
cy.clock(new Date(2023, 9, 16, 6, 29), ['Date']);
cy.visit('/canteen');
cy.get('stapps-opening-hours')
.first()
.should('contain', 'Geschlossen')
.should('contain', 'Öffnet heute um 08:30');
});
it('should specify soon opening time', () => {
cy.clock(new Date(2023, 9, 16, 8, 0), ['Date']);
cy.visit('/canteen');
cy.get('stapps-opening-hours')
.first()
.should('contain', 'Geschlossen')
.should('contain', 'Öffnet in 30 Minuten');
});
it('should specify soon closing time', () => {
cy.clock(new Date(2023, 9, 16, 21, 30), ['Date']);
cy.visit('/canteen');
cy.get('stapps-opening-hours')
.first()
.should('contain', 'Geöffnet')
.should('contain', 'Schließt in 30 Minuten');
});
it('should update the soon closing time every minute', () => {
cy.clock(new Date(2023, 9, 16, 21, 30));
cy.visit('/canteen');
cy.tick(500);
cy.get('stapps-opening-hours')
.first()
.should('contain', 'Geöffnet')
.should('contain', 'Schließt in 30 Minuten');
cy.tick(60_000);
cy.tick(50);
cy.get('stapps-opening-hours')
.first()
.should('contain', 'Geöffnet')
.should('contain', 'Schließt in 29 Minuten');
});
it('should update the status when it changes', () => {
cy.clock(new Date(2023, 9, 16, 21, 59));
cy.visit('/canteen');
cy.tick(500);
cy.get('stapps-opening-hours')
.first()
.should('contain', 'Geöffnet')
.should('contain', 'Schließt in 1 Minute');
cy.tick(60_000);
cy.get('stapps-opening-hours')
.first()
.should('contain', 'Geschlossen')
.should('contain', 'Öffnet morgen um 08:30');
});
// This one takes long to execute!
it('should update as expected', () => {
cy.clock(new Date(2023, 9, 16, 20, 59));
cy.visit('/canteen');
cy.tick(500);
cy.get('stapps-opening-hours')
.first()
.should('contain', 'Geöffnet')
.should('contain', 'Schließt heute um 22:00');
cy.tick(60_000);
cy.get('stapps-opening-hours')
.first()
.should('contain', 'Geöffnet')
.should('contain', 'Schließt in 60 Minuten');
cy.tick(30 * 60_000);
cy.get('stapps-opening-hours')
.first()
.should('contain', 'Geöffnet')
.should('contain', 'Schließt in 30 Minuten');
cy.tick(30 * 60_000);
cy.get('stapps-opening-hours')
.first()
.should('contain', 'Geschlossen')
.should('contain', 'Öffnet morgen um 08:30');
cy.tick(9.5 * 60 * 60_000);
cy.get('stapps-opening-hours')
.first()
.should('contain', 'Geschlossen')
.should('contain', 'Öffnet in 60 Minuten');
cy.tick(30 * 60_000);
cy.get('stapps-opening-hours')
.first()
.should('contain', 'Geschlossen')
.should('contain', 'Öffnet in 30 Minuten');
cy.tick(30 * 60_000);
cy.get('stapps-opening-hours')
.first()
.should('contain', 'Geöffnet')
.should('contain', 'Schließt heute um 22:00');
// Long tick warps will cause network requests to time out
cy.get('@consoleError').invoke('resetHistory');
});
});

View File

@@ -31,24 +31,36 @@
// When a command from ./commands is ready to use, import with `import './commands'` syntax // When a command from ./commands is ready to use, import with `import './commands'` syntax
// import './commands'; // import './commands';
beforeEach(function () { beforeEach(async function () {
cy.wrap( let databases: string[];
new Promise(resolve => { if (window.indexedDB.databases) {
window.indexedDB.deleteDatabase('_ionicstorage').onsuccess = resolve; databases = (await window.indexedDB.databases()).map(it => it.name);
}), console.log('Trying to clear all databases');
); } else {
console.log("Browser doesn't support database enumeration, deleting just ionic storage");
databases = ['_ionicstorage'];
}
for (const database of databases) {
if (database) {
console.log(`Deleting database ${database}`);
await new Promise(resolve => (window.indexedDB.deleteDatabase(database).onsuccess = resolve));
console.log(`Deleted database ${database}`);
}
}
}); });
Cypress.on('window:before:load', window => { Cypress.on('window:before:load', window => {
// Fake that user is using its browser in German // Fake that user is using its browser in german language
Object.defineProperty(window.navigator, 'language', {value: 'de-DE'}); Object.defineProperty(window.navigator, 'language', {value: 'de-DE'});
Object.defineProperty(window.navigator, 'languages', [{value: 'de-DE'}]); Object.defineProperty(window.navigator, 'languages', [{value: 'de-DE'}]);
cy.spy(window.console, 'error').as('consoleError'); // Fail tests on console error
}); cy.stub(window.console, 'error').callsFake(message => {
// log out to the terminal
afterEach(function () { cy.now('task', 'error', message);
cy.get('@consoleError').should('not.have.been.called'); // log to Command Log and fail the test
throw new Error(message);
});
}); });
Cypress.on('uncaught:exception', error => { Cypress.on('uncaught:exception', error => {

View File

@@ -9,25 +9,25 @@ use_frameworks!
install! 'cocoapods', :disable_input_output_paths => true install! 'cocoapods', :disable_input_output_paths => true
def capacitor_pods def capacitor_pods
pod 'Capacitor', :path => '../../../../node_modules/.pnpm/@capacitor+ios@4.6.1_@capacitor+core@4.6.1/node_modules/@capacitor/ios' pod 'Capacitor', :path => '../../node_modules/@capacitor/ios'
pod 'CapacitorCordova', :path => '../../../../node_modules/.pnpm/@capacitor+ios@4.6.1_@capacitor+core@4.6.1/node_modules/@capacitor/ios' pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
pod 'CapacitorApp', :path => '../../../../node_modules/.pnpm/@capacitor+app@4.1.1_@capacitor+core@4.6.1/node_modules/@capacitor/app' pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app'
pod 'CapacitorBrowser', :path => '../../../../node_modules/.pnpm/@capacitor+browser@4.1.0_@capacitor+core@4.6.1/node_modules/@capacitor/browser' pod 'CapacitorBrowser', :path => '../../node_modules/@capacitor/browser'
pod 'CapacitorDevice', :path => '../../../../node_modules/.pnpm/@capacitor+device@4.1.0_@capacitor+core@4.6.1/node_modules/@capacitor/device' pod 'CapacitorDevice', :path => '../../node_modules/@capacitor/device'
pod 'CapacitorDialog', :path => '../../../../node_modules/.pnpm/@capacitor+dialog@4.1.0_@capacitor+core@4.6.1/node_modules/@capacitor/dialog' pod 'CapacitorDialog', :path => '../../node_modules/@capacitor/dialog'
pod 'CapacitorFilesystem', :path => '../../../../node_modules/.pnpm/@capacitor+filesystem@4.1.4_@capacitor+core@4.6.1/node_modules/@capacitor/filesystem' pod 'CapacitorFilesystem', :path => '../../node_modules/@capacitor/filesystem'
pod 'CapacitorGeolocation', :path => '../../../../node_modules/.pnpm/@capacitor+geolocation@4.1.0_@capacitor+core@4.6.1/node_modules/@capacitor/geolocation' pod 'CapacitorGeolocation', :path => '../../node_modules/@capacitor/geolocation'
pod 'CapacitorHaptics', :path => '../../../../node_modules/.pnpm/@capacitor+haptics@4.1.0_@capacitor+core@4.6.1/node_modules/@capacitor/haptics' pod 'CapacitorHaptics', :path => '../../node_modules/@capacitor/haptics'
pod 'CapacitorKeyboard', :path => '../../../../node_modules/.pnpm/@capacitor+keyboard@4.1.0_@capacitor+core@4.6.1/node_modules/@capacitor/keyboard' pod 'CapacitorKeyboard', :path => '../../node_modules/@capacitor/keyboard'
pod 'CapacitorLocalNotifications', :path => '../../../../node_modules/.pnpm/@capacitor+local-notifications@4.1.4_@capacitor+core@4.6.1/node_modules/@capacitor/local-notifications' pod 'CapacitorLocalNotifications', :path => '../../node_modules/@capacitor/local-notifications'
pod 'CapacitorNetwork', :path => '../../../../node_modules/.pnpm/@capacitor+network@4.1.0_@capacitor+core@4.6.1/node_modules/@capacitor/network' pod 'CapacitorNetwork', :path => '../../node_modules/@capacitor/network'
pod 'CapacitorPreferences', :path => '../../../../node_modules/.pnpm/@capacitor+preferences@4.0.2_@capacitor+core@4.6.1/node_modules/@capacitor/preferences' pod 'CapacitorPreferences', :path => '../../node_modules/@capacitor/preferences'
pod 'CapacitorShare', :path => '../../../../node_modules/.pnpm/@capacitor+share@4.1.0_@capacitor+core@4.6.1/node_modules/@capacitor/share' pod 'CapacitorShare', :path => '../../node_modules/@capacitor/share'
pod 'CapacitorSplashScreen', :path => '../../../../node_modules/.pnpm/@capacitor+splash-screen@4.1.2_@capacitor+core@4.6.1/node_modules/@capacitor/splash-screen' pod 'CapacitorSplashScreen', :path => '../../node_modules/@capacitor/splash-screen'
pod 'CapacitorStatusBar', :path => '../../../../node_modules/.pnpm/@capacitor+status-bar@4.1.1_@capacitor+core@4.6.1/node_modules/@capacitor/status-bar' pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar'
pod 'HugotomaziCapacitorNavigationBar', :path => '../../../../node_modules/.pnpm/@hugotomazi+capacitor-navigation-bar@2.0.0_@capacitor+core@4.6.1/node_modules/@hugotomazi/capacitor-navigation-bar' pod 'HugotomaziCapacitorNavigationBar', :path => '../../node_modules/@hugotomazi/capacitor-navigation-bar'
pod 'TransistorsoftCapacitorBackgroundFetch', :path => '../../../../node_modules/.pnpm/@transistorsoft+capacitor-background-fetch@1.0.2_@capacitor+core@4.6.1/node_modules/@transistorsoft/capacitor-background-fetch' pod 'TransistorsoftCapacitorBackgroundFetch', :path => '../../node_modules/@transistorsoft/capacitor-background-fetch'
pod 'CapacitorSecureStoragePlugin', :path => '../../../../node_modules/.pnpm/capacitor-secure-storage-plugin@0.8.1_@capacitor+core@4.6.1/node_modules/capacitor-secure-storage-plugin' pod 'CapacitorSecureStoragePlugin', :path => '../../node_modules/capacitor-secure-storage-plugin'
pod 'CordovaPlugins', :path => '../capacitor-cordova-ios-plugins' pod 'CordovaPlugins', :path => '../capacitor-cordova-ios-plugins'
end end

View File

@@ -1,4 +1,3 @@
// @ts-check
/* /*
* Copyright (C) 2022 StApps * Copyright (C) 2022 StApps
* This program is free software: you can redistribute it and/or modify it * This program is free software: you can redistribute it and/or modify it
@@ -14,13 +13,10 @@
* this program. If not, see <https://www.gnu.org/licenses/>. * this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
// Karma configuration file, see the link for more information // Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html // https://karma-runner.github.io/1.0/config/configuration-file.html
var isDocker = require('is-docker'); var isDocker = require('is-docker');
/**
* @param config {import('karma').Config}
*/
module.exports = function (config) { module.exports = function (config) {
config.set({ config.set({
basePath: '', basePath: '',
@@ -29,9 +25,9 @@ module.exports = function (config) {
require('karma-jasmine'), require('karma-jasmine'),
require('karma-chrome-launcher'), require('karma-chrome-launcher'),
require('karma-coverage'), require('karma-coverage'),
require('@angular-devkit/build-angular/plugins/karma'),
require('karma-mocha-reporter'), require('karma-mocha-reporter'),
require('karma-junit-reporter'), require('karma-junit-reporter'),
require('@angular-devkit/build-angular/plugins/karma'),
], ],
client: { client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser clearContext: false, // leave Jasmine Spec Runner output visible in browser
@@ -48,18 +44,19 @@ module.exports = function (config) {
useBrowserName: false, useBrowserName: false,
}, },
reporters: ['mocha', 'junit', 'coverage'], reporters: ['mocha', 'junit', 'coverage'],
singleRun: true,
port: 9876, port: 9876,
colors: true, colors: true,
logLevel: config.LOG_INFO, logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['ChromeNoSandbox'], browsers: ['ChromeNoSandbox'],
customLaunchers: { customLaunchers: {
ChromeNoSandbox: { ChromeNoSandbox: {
base: 'ChromeHeadless', base: 'ChromeHeadless',
// We must disable the Chrome sandbox when running Chrome inside Docker, // We must disable the Chrome sandbox when running Chrome inside Docker,
// see https://hackernoon.com/running-karma-tests-with-headless-chrome-inside-docker-ae4aceb06ed3 // see https://hackernoon.com/running-karma-tests-with-headless-chrome-inside-docker-ae4aceb06ed3
flags: isDocker() ? ['--no-sandbox'] : [], flags: isDocker ? ['--no-sandbox'] : [],
}, },
}, },
singleRun: false,
}); });
}; };

View File

@@ -0,0 +1,11 @@
import {process} from '@angular/compiler-cli/ngcc';
import path from 'path';
const legacyViewEngineLibraries = [
['@awesome-cordova-plugins', 'calendar'],
['@ionic-native', 'core'],
];
for (const basePath of legacyViewEngineLibraries) {
process({basePath: path.resolve(path.join('node_modules', ...basePath))});
}

View File

@@ -1,7 +1,7 @@
{ {
"name": "@openstapps/app", "name": "@openstapps/app",
"description": "The generic app tailored to fulfill needs of German universities, written using Ionic Framework.", "description": "The generic app tailored to fulfill needs of German universities, written using Ionic Framework.",
"version": "3.0.0", "version": "3.0.0-next.0",
"private": true, "private": true,
"license": "GPL-3.0-only", "license": "GPL-3.0-only",
"author": "Karl-Philipp Wulfert <krlwlfrt@gmail.com>", "author": "Karl-Philipp Wulfert <krlwlfrt@gmail.com>",
@@ -22,7 +22,6 @@
"build:stats": "ng build --configuration=production --stats-json", "build:stats": "ng build --configuration=production --stats-json",
"changelog": "conventional-changelog -p angular -i src/assets/about/CHANGELOG.md -s -r 0", "changelog": "conventional-changelog -p angular -i src/assets/about/CHANGELOG.md -s -r 0",
"check-icons": "ts-node-esm scripts/check-icon-correctness.ts", "check-icons": "ts-node-esm scripts/check-icon-correctness.ts",
"chromium:no-cors": "chromium --disable-web-security --user-data-dir=\".browser-data/chromium\"",
"cypress:open": "cypress open", "cypress:open": "cypress open",
"cypress:run": "cypress run", "cypress:run": "cypress run",
"docker:build": "sudo docker run -p 8100:8100 -p 35729:35729 -p 53703:53703 -v $PWD:/app -it registry.gitlab.com/openstapps/app bash -c \"npm install && npm run build\"", "docker:build": "sudo docker run -p 8100:8100 -p 35729:35729 -p 53703:53703 -v $PWD:/app -it registry.gitlab.com/openstapps/app bash -c \"npm install && npm run build\"",
@@ -32,13 +31,14 @@
"docker:run:android": "sudo docker run -v $PWD:/app --privileged -v /dev/bus/usb:/dev/bus/usb --net=host -it registry.gitlab.com/openstapps/app bash -c \"npm run run:android\"", "docker:run:android": "sudo docker run -v $PWD:/app --privileged -v /dev/bus/usb:/dev/bus/usb --net=host -it registry.gitlab.com/openstapps/app bash -c \"npm run run:android\"",
"docker:serve": "sudo docker run -p 8100:8100 -p 35729:35729 -p 53703:53703 -v $PWD:/app -it registry.gitlab.com/openstapps/app bash -c \"npm run start:external\"", "docker:serve": "sudo docker run -p 8100:8100 -p 35729:35729 -p 53703:53703 -v $PWD:/app -it registry.gitlab.com/openstapps/app bash -c \"npm run start:external\"",
"e2e": "ng e2e", "e2e": "ng e2e",
"format": "prettier . -c", "format": "prettier . -c --ignore-path ../../.gitignore",
"format:fix": "prettier --write .", "format:fix": "prettier --write . --ignore-path ../../.gitignore",
"licenses": "license-checker --json > src/assets/about/licenses.json && ts-node ./scripts/accumulate-licenses.ts && git add src/assets/about/licenses.json", "licenses": "license-checker --json > src/assets/about/licenses.json && ts-node ./scripts/accumulate-licenses.ts && git add src/assets/about/licenses.json",
"lint": "ng lint && stylelint \"**/*.scss\"", "lint": "ng lint && stylelint \"**/*.scss\"",
"lint:fix": "eslint --fix -c .eslintrc.json --ignore-path .eslintignore --ext .ts,.html src/ && stylelint --fix \"**/*.scss\"", "lint:fix": "eslint --fix -c .eslintrc.json --ignore-path .eslintignore --ext .ts,.html src/ && stylelint --fix \"**/*.scss\"",
"minify-icons": "ts-node-esm scripts/minify-icon-font.ts", "minify-icons": "ts-node-esm scripts/minify-icon-font.ts",
"postinstall": "jetify && echo \"skipping jetify in production mode\"", "ng": "ng",
"postinstall": "(jetify && node ngcc-postinstall.mjs) || echo \"skipping jetify in production mode\"",
"preview": "http-server www --p 8101 -o", "preview": "http-server www --p 8101 -o",
"push": "git push && git push origin \"v$npm_package_version\"", "push": "git push && git push origin \"v$npm_package_version\"",
"resources:android": "cordova-res android --skip-config --copy", "resources:android": "cordova-res android --skip-config --copy",
@@ -47,24 +47,23 @@
"start": "ionic serve", "start": "ionic serve",
"start:external": "ionic serve --external", "start:external": "ionic serve --external",
"start:prod": "ionic serve --prod", "start:prod": "ionic serve --prod",
"test": "ng test --code-coverage", "test": "ng test --watch=false --code-coverage",
"test:integration": "sh integration-test.sh" "test:integration": "sh integration-test.sh"
}, },
"dependencies": { "dependencies": {
"@angular/animations": "16.1.4", "@angular/animations": "13.4.0",
"@angular/cdk": "16.1.4", "@angular/cdk": "13.3.9",
"@angular/common": "16.1.4", "@angular/common": "13.4.0",
"@angular/core": "16.1.4", "@angular/core": "13.4.0",
"@angular/forms": "16.1.4", "@angular/forms": "13.4.0",
"@angular/platform-browser": "16.1.4", "@angular/platform-browser": "13.4.0",
"@angular/router": "16.1.4", "@angular/router": "13.4.0",
"@asymmetrik/ngx-leaflet": "16.0.1", "@asymmetrik/ngx-leaflet": "13.0.2",
"@asymmetrik/ngx-leaflet-markercluster": "16.0.0", "@asymmetrik/ngx-leaflet-markercluster": "13.0.1",
"@awesome-cordova-plugins/calendar": "5.45.0", "@awesome-cordova-plugins/calendar": "5.45.0",
"@awesome-cordova-plugins/core": "5.45.0", "@awesome-cordova-plugins/core": "5.45.0",
"@capacitor/app": "4.1.1", "@capacitor/app": "4.1.1",
"@capacitor/browser": "4.1.0", "@capacitor/browser": "4.1.0",
"@capacitor/clipboard": "4.1.0",
"@capacitor/core": "4.6.1", "@capacitor/core": "4.6.1",
"@capacitor/device": "4.1.0", "@capacitor/device": "4.1.0",
"@capacitor/dialog": "4.1.0", "@capacitor/dialog": "4.1.0",
@@ -80,19 +79,16 @@
"@capacitor/status-bar": "4.1.1", "@capacitor/status-bar": "4.1.1",
"@hugotomazi/capacitor-navigation-bar": "2.0.0", "@hugotomazi/capacitor-navigation-bar": "2.0.0",
"@ionic-native/core": "5.36.0", "@ionic-native/core": "5.36.0",
"@ionic/angular": "7.1.3", "@ionic/angular": "6.7.5",
"@ionic/storage-angular": "4.0.0", "@ionic/storage": "4.0.0",
"@ngx-translate/core": "15.0.0", "@ngx-translate/core": "14.0.0",
"@ngx-translate/http-loader": "8.0.0", "@ngx-translate/http-loader": "7.0.0",
"@openid/appauth": "1.3.1", "@openid/appauth": "1.3.1",
"@openstapps/api": "workspace:*", "@openstapps/api": "workspace:*",
"@openstapps/collection-utils": "workspace:*",
"@openstapps/core": "workspace:*", "@openstapps/core": "workspace:*",
"@transistorsoft/capacitor-background-fetch": "1.0.2", "@transistorsoft/capacitor-background-fetch": "1.0.2",
"@types/dom-view-transitions": "1.0.1",
"capacitor-secure-storage-plugin": "0.8.1", "capacitor-secure-storage-plugin": "0.8.1",
"cordova-plugin-calendar": "5.1.6", "cordova-plugin-calendar": "5.1.6",
"date-fns": "2.30.0",
"deepmerge": "4.3.1", "deepmerge": "4.3.1",
"form-data": "4.0.0", "form-data": "4.0.0",
"geojson": "0.5.0", "geojson": "0.5.0",
@@ -102,38 +98,37 @@
"leaflet.markercluster": "1.5.3", "leaflet.markercluster": "1.5.3",
"material-symbols": "0.10.0", "material-symbols": "0.10.0",
"moment": "2.29.4", "moment": "2.29.4",
"ngx-date-fns": "10.0.1",
"ngx-logger": "5.0.12", "ngx-logger": "5.0.12",
"ngx-markdown": "16.0.0", "ngx-markdown": "13.1.0",
"ngx-moment": "6.0.2", "ngx-moment": "6.0.2",
"opening_hours": "3.8.0", "opening_hours": "3.8.0",
"rxjs": "7.8.1", "rxjs": "7.8.0",
"swiper": "8.4.5", "swiper": "8.4.5",
"tslib": "2.4.1", "tslib": "2.4.1",
"zone.js": "0.13.1" "zone.js": "0.12.0"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/architect": "0.1601.4", "@angular-devkit/architect": "0.1303.11",
"@angular-devkit/build-angular": "16.1.4", "@angular-devkit/build-angular": "13.3.11",
"@angular-devkit/core": "16.1.4", "@angular-devkit/core": "13.3.11",
"@angular-devkit/schematics": "16.1.4", "@angular-devkit/schematics": "13.3.11",
"@angular-eslint/builder": "16.1.0", "@angular-eslint/builder": "13.5.0",
"@angular-eslint/eslint-plugin": "16.1.0", "@angular-eslint/eslint-plugin": "13.5.0",
"@angular-eslint/eslint-plugin-template": "16.1.0", "@angular-eslint/eslint-plugin-template": "13.5.0",
"@angular-eslint/schematics": "16.1.0", "@angular-eslint/schematics": "13.5.0",
"@angular-eslint/template-parser": "16.1.0", "@angular-eslint/template-parser": "13.5.0",
"@angular/cli": "16.1.4", "@angular/cli": "13.3.11",
"@angular/compiler": "16.1.4", "@angular/compiler": "13.4.0",
"@angular/compiler-cli": "16.1.4", "@angular/compiler-cli": "13.4.0",
"@angular/language-service": "16.1.4", "@angular/language-service": "13.4.0",
"@angular/platform-browser-dynamic": "16.1.4", "@angular/platform-browser-dynamic": "13.3.11",
"@capacitor/android": "4.6.1", "@capacitor/android": "4.6.1",
"@capacitor/cli": "4.6.1", "@capacitor/cli": "4.6.1",
"@capacitor/ios": "4.6.1", "@capacitor/ios": "4.6.1",
"@compodoc/compodoc": "1.1.19", "@compodoc/compodoc": "1.1.19",
"@cypress/schematic": "1.7.0", "@cypress/schematic": "1.7.0",
"@ionic/angular-toolkit": "10.0.0", "@ionic/angular-toolkit": "6.1.0",
"@ionic/cli": "7.1.1", "@ionic/cli": "6.20.4",
"@openstapps/prettier-config": "workspace:*", "@openstapps/prettier-config": "workspace:*",
"@openstapps/tsconfig": "workspace:*", "@openstapps/tsconfig": "workspace:*",
"@types/fontkit": "1.8.0", "@types/fontkit": "1.8.0",
@@ -142,35 +137,33 @@
"@types/jasmine": "4.3.1", "@types/jasmine": "4.3.1",
"@types/jasminewd2": "2.0.10", "@types/jasminewd2": "2.0.10",
"@types/jsonpath": "0.2.0", "@types/jsonpath": "0.2.0",
"@types/karma": "6.3.4",
"@types/karma-coverage": "2.0.1",
"@types/karma-jasmine": "4.0.2",
"@types/leaflet": "1.9.0", "@types/leaflet": "1.9.0",
"@types/leaflet.markercluster": "1.5.1", "@types/leaflet.markercluster": "1.5.1",
"@types/node": "18.15.3", "@types/node": "18.15.3",
"@typescript-eslint/eslint-plugin": "5.60.1", "@typescript-eslint/eslint-plugin": "5.49.0",
"@typescript-eslint/parser": "5.60.1", "@typescript-eslint/parser": "5.49.0",
"cordova-res": "0.15.4", "cordova-res": "0.15.4",
"cypress": "13.2.0", "cypress": "12.0.1",
"eslint": "8.43.0", "eslint": "8.33.0",
"eslint-plugin-jsdoc": "46.4.2", "eslint-plugin-jsdoc": "39.7.4",
"eslint-plugin-prettier": "4.2.1", "eslint-plugin-prettier": "4.2.1",
"eslint-plugin-unicorn": "47.0.0", "eslint-plugin-unicorn": "45.0.2",
"fontkit": "2.0.2", "fontkit": "2.0.2",
"glob": "10.2.7", "glob": "10.2.7",
"http-server": "14.1.1", "http-server": "14.1.1",
"is-docker": "2.2.1", "is-docker": "2.2.1",
"jasmine-core": "5.0.1", "jasmine-core": "4.5.0",
"jasmine-spec-reporter": "7.0.0", "jasmine-spec-reporter": "7.0.0",
"jetifier": "2.0.0", "jetifier": "2.0.0",
"junit-report-merger": "6.0.2", "junit-report-merger": "6.0.2",
"karma": "6.4.2", "karma": "6.4.1",
"karma-chrome-launcher": "3.2.0", "karma-chrome-launcher": "3.1.1",
"karma-coverage": "2.2.1", "karma-coverage": "2.2.1",
"karma-jasmine": "5.1.0", "karma-jasmine": "5.1.0",
"karma-junit-reporter": "2.0.1", "karma-junit-reporter": "2.0.1",
"karma-mocha-reporter": "2.2.5", "karma-mocha-reporter": "2.2.5",
"license-checker": "25.0.1", "license-checker": "25.0.1",
"protractor": "7.0.0",
"stylelint": "15.10.1", "stylelint": "15.10.1",
"stylelint-config-clean-order": "5.0.1", "stylelint-config-clean-order": "5.0.1",
"stylelint-config-prettier-scss": "1.0.0", "stylelint-config-prettier-scss": "1.0.0",
@@ -178,7 +171,7 @@
"stylelint-config-standard-scss": "10.0.0", "stylelint-config-standard-scss": "10.0.0",
"surge": "0.23.1", "surge": "0.23.1",
"ts-node": "10.9.1", "ts-node": "10.9.1",
"typescript": "5.1.6", "typescript": "4.6.4",
"webpack-bundle-analyzer": "4.7.0" "webpack-bundle-analyzer": "4.7.0"
}, },
"prettier": "@openstapps/prettier-config", "prettier": "@openstapps/prettier-config",

View File

@@ -1,7 +0,0 @@
appdirs==1.4.4
Brotli==1.0.9
fonttools==4.41.0
fs==2.4.16
lxml==4.9.3
six==1.16.0
zopfli==0.2.2

View File

@@ -86,9 +86,15 @@ async function minifyIconFont() {
} }
glyphs.sort(); glyphs.sort();
const pythonPath = `"${await run('npm config get python')}"`;
console.log(`Using python from npm config ${pythonPath}`);
console.log(await run(`${pythonPath} --version`));
console.log(await run([pythonPath, '-m', 'pip', 'install', 'fonttools[ufo,lxml,unicode,woff]']));
console.log( console.log(
await run([ await run([
'pyftsubset', pythonPath,
'-m fontTools.subset',
`"${config.inputPath}"`, `"${config.inputPath}"`,
`--unicodes=${glyphs.join(',')}`, `--unicodes=${glyphs.join(',')}`,
'--no-layout-closure', '--no-layout-closure',

View File

@@ -1,5 +1,5 @@
/*! /*
* Copyright (C) 2023 StApps * Copyright (C) 2022 StApps
* This program is free software: you can redistribute it and/or modify it * This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free * under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3. * Software Foundation, version 3.
@@ -12,3 +12,11 @@
* You should have received a copy of the GNU General Public License along with * You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>. * this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import {chunk} from './chunk';
describe('chunk', function () {
it('should chunk items in the correct sizes', function () {
expect(chunk([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 3)).toEqual([[1, 2, 3], [4, 5, 6], [7, 8, 9], [10]]);
});
});

View File

@@ -0,0 +1,28 @@
/*
* Copyright (C) 2022 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* Chunk array into smaller arrays of a specified size.
*
* @param array The array to chunk.
* @param chunkSize The size of each chunk.
*/
export function chunk<T>(array: T[], chunkSize = 1): T[][] {
const arrayCopy = [...array];
const out: T[][] = [];
if (chunkSize <= 0) return out;
while (arrayCopy.length > 0) out.push(arrayCopy.splice(0, chunkSize));
return out;
}

View File

@@ -0,0 +1,25 @@
/*
* Copyright (C) 2022 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {differenceBy} from './difference';
describe('differenceBy', function () {
it('should return the difference of two arrays', function () {
const a = [1, 2, 3, 4, 5];
const b = [1, 2, 3];
expect(differenceBy(a, b, it => it)).toEqual([4, 5]);
});
});

View File

@@ -0,0 +1,23 @@
/*
* Copyright (C) 2022 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* Returns the difference between two arrays.
*/
export function differenceBy<T>(a: T[], b: T[], transform: (item: T) => unknown) {
const disallowed = new Set(b.map(transform));
return a.filter(item => !disallowed.has(transform(item)));
}

View File

@@ -0,0 +1,39 @@
/*
* Copyright (C) 2022 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {get} from './get';
describe('get', function () {
it('should get a simple path', function () {
const object = {
a: {
b: {
c: 'd',
},
},
};
expect(get(object, 'a.b.c')).toBe('d');
});
it('should return undefined for a non-existent path', function () {
const object = {
a: {
b: {
c: 'd',
},
},
};
expect(get(object, 'a.b.c.d')).toBeUndefined();
});
});

View File

@@ -0,0 +1,30 @@
/*
* Copyright (C) 2022 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* Gets a value from a nested object.
* The path must be key names separated by dots.
* If the path doesn't exist, undefined is returned.
*/
export function get<U = unknown>(object: object, path: string): U {
return path.split('.').reduce(
(accumulator, current) =>
accumulator?.hasOwnProperty(current)
? // eslint-disable-next-line @typescript-eslint/no-explicit-any
(accumulator as any)[current]
: undefined,
object,
) as unknown as U;
}

View File

@@ -0,0 +1,123 @@
/*
* Copyright (C) 2022 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {groupBy, groupByStable, groupByProperty} from './group-by';
describe('groupBy', () => {
it('should group an array by a key', () => {
const array = [
{id: 1, name: 'one'},
{id: 2, name: 'two'},
{id: 3, name: 'three'},
{id: 4, name: 'four'},
{id: 5, name: 'five'},
];
const result = groupBy(array, it => it.name);
expect(result).toEqual({
one: [{id: 1, name: 'one'}],
two: [{id: 2, name: 'two'}],
three: [{id: 3, name: 'three'}],
four: [{id: 4, name: 'four'}],
five: [{id: 5, name: 'five'}],
});
});
it('should handle multiple elements per group', () => {
const array = [
{id: 1, name: 'one'},
{id: 2, name: 'two'},
{id: 3, name: 'three'},
{id: 4, name: 'four'},
{id: 5, name: 'five'},
{id: 6, name: 'one'},
{id: 7, name: 'two'},
{id: 8, name: 'three'},
{id: 9, name: 'four'},
{id: 10, name: 'five'},
];
const result = groupBy(array, it => it.name);
expect(result).toEqual({
one: [
{id: 1, name: 'one'},
{id: 6, name: 'one'},
],
two: [
{id: 2, name: 'two'},
{id: 7, name: 'two'},
],
three: [
{id: 3, name: 'three'},
{id: 8, name: 'three'},
],
four: [
{id: 4, name: 'four'},
{id: 9, name: 'four'},
],
five: [
{id: 5, name: 'five'},
{id: 10, name: 'five'},
],
});
});
});
describe('groupByStable', () => {
const array = [
{id: 2, name: 'two'},
{id: 4, name: 'three'},
{id: 3, name: 'three'},
{id: 1, name: 'one'},
];
const result = groupByStable(array, it => it.name);
it('should group an array by keys', () => {
expect(result.get('one')).toEqual([{id: 1, name: 'one'}]);
expect(result.get('two')).toEqual([{id: 2, name: 'two'}]);
expect(result.get('three')).toEqual([
{id: 4, name: 'three'},
{id: 3, name: 'three'},
]);
});
it('should provide ordered keys', () => {
expect([...result.keys()]).toEqual(['two', 'three', 'one']);
});
});
describe('groupByProperty', function () {
it('should group by property', () => {
const array = [
{id: 1, name: 'one'},
{id: 2, name: 'two'},
{id: 3, name: 'three'},
{id: 4, name: 'four'},
{id: 5, name: 'five'},
];
const result = groupByProperty(array, 'name');
expect(result).toEqual({
one: [{id: 1, name: 'one'}],
two: [{id: 2, name: 'two'}],
three: [{id: 3, name: 'three'}],
four: [{id: 4, name: 'four'}],
five: [{id: 5, name: 'five'}],
});
});
});

Some files were not shown because too many files have changed in this diff Show More