mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-09 19:22:51 +00:00
Compare commits
2 Commits
@openstapp
...
18-overhau
| Author | SHA1 | Date | |
|---|---|---|---|
|
09de4fd033
|
|||
|
|
cb196afded |
5
.changeset/bright-dryers-act.md
Normal file
5
.changeset/bright-dryers-act.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/app': major
|
||||||
|
---
|
||||||
|
|
||||||
|
Update to Angular 16.1
|
||||||
5
.changeset/chilly-goats-cough.md
Normal file
5
.changeset/chilly-goats-cough.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/app': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Detail views now won't load data again if it is being navigated to from a list item
|
||||||
11
.changeset/cold-squids-remain.md
Normal file
11
.changeset/cold-squids-remain.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/app': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
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
|
||||||
8
.changeset/cool-jars-kiss.md
Normal file
8
.changeset/cool-jars-kiss.md
Normal 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.
|
||||||
11
.changeset/cuddly-bobcats-roll.md
Normal file
11
.changeset/cuddly-bobcats-roll.md
Normal 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.
|
||||||
31
.changeset/dull-news-appear.md
Normal file
31
.changeset/dull-news-appear.md
Normal 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`)
|
||||||
5
.changeset/fair-colts-explain.md
Normal file
5
.changeset/fair-colts-explain.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/app': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Use observable chains instead of change detection in the rating component
|
||||||
51
.changeset/five-ears-wash.md
Normal file
51
.changeset/five-ears-wash.md
Normal 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';
|
||||||
|
```
|
||||||
5
.changeset/fluffy-lamps-count.md
Normal file
5
.changeset/fluffy-lamps-count.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/app': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Added the ability to remove and add date series from their detail page
|
||||||
5
.changeset/forty-eagles-cough.md
Normal file
5
.changeset/forty-eagles-cough.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/app': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Add a way to hide action chips on list items
|
||||||
13
.changeset/fuzzy-walls-greet.md
Normal file
13
.changeset/fuzzy-walls-greet.md
Normal 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.
|
||||||
25
.changeset/giant-crabs-cheer.md
Normal file
25
.changeset/giant-crabs-cheer.md
Normal 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, '## ['));
|
||||||
|
```
|
||||||
8
.changeset/gorgeous-flowers-reflect.md
Normal file
8
.changeset/gorgeous-flowers-reflect.md
Normal 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.
|
||||||
34
.changeset/healthy-steaks-shop.md
Normal file
34
.changeset/healthy-steaks-shop.md
Normal 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"
|
||||||
|
}
|
||||||
|
```
|
||||||
30
.changeset/honest-sheep-train.md
Normal file
30
.changeset/honest-sheep-train.md
Normal 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
|
||||||
5
.changeset/late-zoos-breathe.md
Normal file
5
.changeset/late-zoos-breathe.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/gitlab-api': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Migrate from request-promise-native to got
|
||||||
5
.changeset/loud-buttons-repeat.md
Normal file
5
.changeset/loud-buttons-repeat.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/app': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fixed distance not updating in list items
|
||||||
5
.changeset/moody-parrots-develop.md
Normal file
5
.changeset/moody-parrots-develop.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/projectmanagement': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Moved project-docs to the [GitLab Wiki](https://gitlab.com/openstapps/openstapps/-/wikis/home) repo.
|
||||||
31
.changeset/neat-hats-trade.md
Normal file
31
.changeset/neat-hats-trade.md
Normal 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
|
||||||
5
.changeset/new-pianos-joke.md
Normal file
5
.changeset/new-pianos-joke.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/es-mapping-generator': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Remove @openstapps/logger dependency
|
||||||
5
.changeset/orange-knives-happen.md
Normal file
5
.changeset/orange-knives-happen.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/app': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Add directions to inPlace and place list items
|
||||||
9
.changeset/pink-sheep-relax.md
Normal file
9
.changeset/pink-sheep-relax.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/app': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
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
|
||||||
68
.changeset/pre.json
Normal file
68
.changeset/pre.json
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
{
|
||||||
|
"mode": "pre",
|
||||||
|
"tag": "next",
|
||||||
|
"initialVersions": {
|
||||||
|
"@openstapps/backend": "2.0.0",
|
||||||
|
"@openstapps/database": "2.0.0",
|
||||||
|
"@openstapps/proxy": "2.0.0",
|
||||||
|
"@openstapps/backend-config": "2.0.0",
|
||||||
|
"@openstapps/eslint-config": "2.0.0",
|
||||||
|
"@openstapps/prettier-config": "2.0.0",
|
||||||
|
"@openstapps/projectmanagement": "2.0.0",
|
||||||
|
"@openstapps/tsconfig": "2.0.0",
|
||||||
|
"@openstapps/minimal-connector": "2.0.0",
|
||||||
|
"@openstapps/minimal-deployment": "2.0.0",
|
||||||
|
"@openstapps/minimal-plugin": "2.0.0",
|
||||||
|
"@openstapps/app": "2.0.0",
|
||||||
|
"@openstapps/api": "2.0.0",
|
||||||
|
"@openstapps/api-cli": "2.0.0",
|
||||||
|
"@openstapps/api-plugin": "2.0.0",
|
||||||
|
"@openstapps/collection-utils": "2.0.0",
|
||||||
|
"@openstapps/core": "2.0.0",
|
||||||
|
"@openstapps/core-tools": "2.0.0",
|
||||||
|
"@openstapps/easy-ast": "2.0.0",
|
||||||
|
"@openstapps/es-mapping-generator": "2.0.0",
|
||||||
|
"@openstapps/gitlab-api": "2.0.0",
|
||||||
|
"@openstapps/logger": "2.0.0",
|
||||||
|
"@openstapps/app-builder-image": "3.0.0-next.3",
|
||||||
|
"@openstapps/node-base": "3.0.0-next.3",
|
||||||
|
"@openstapps/node-builder": "3.0.0-next.3"
|
||||||
|
},
|
||||||
|
"changesets": [
|
||||||
|
"bright-dryers-act",
|
||||||
|
"cool-jars-kiss",
|
||||||
|
"cuddly-bobcats-roll",
|
||||||
|
"dull-news-appear",
|
||||||
|
"five-ears-wash",
|
||||||
|
"fuzzy-walls-greet",
|
||||||
|
"giant-crabs-cheer",
|
||||||
|
"gorgeous-flowers-reflect",
|
||||||
|
"healthy-steaks-shop",
|
||||||
|
"honest-sheep-train",
|
||||||
|
"late-zoos-breathe",
|
||||||
|
"moody-parrots-develop",
|
||||||
|
"neat-hats-trade",
|
||||||
|
"new-pianos-joke",
|
||||||
|
"pretty-timers-complain",
|
||||||
|
"proud-wolves-end",
|
||||||
|
"quick-houses-count",
|
||||||
|
"rare-squids-bake",
|
||||||
|
"serious-meals-sin",
|
||||||
|
"silent-maps-float",
|
||||||
|
"silly-news-punch",
|
||||||
|
"smart-ghosts-shout",
|
||||||
|
"soft-donuts-fail",
|
||||||
|
"sour-coins-visit",
|
||||||
|
"spicy-snails-sort",
|
||||||
|
"stale-garlics-share",
|
||||||
|
"strange-hounds-repair",
|
||||||
|
"tall-ducks-dream",
|
||||||
|
"tame-mayflies-hug",
|
||||||
|
"tame-rings-dream",
|
||||||
|
"tasty-islands-smell",
|
||||||
|
"thick-weeks-compete",
|
||||||
|
"thin-camels-give",
|
||||||
|
"tidy-buses-reflect",
|
||||||
|
"tough-hairs-provide"
|
||||||
|
]
|
||||||
|
}
|
||||||
8
.changeset/pretty-timers-complain.md
Normal file
8
.changeset/pretty-timers-complain.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/projectmanagement': major
|
||||||
|
'@openstapps/node-base': major
|
||||||
|
---
|
||||||
|
|
||||||
|
Move images to separate packages
|
||||||
|
|
||||||
|
Removed builder image due to migration to Kaniko
|
||||||
13
.changeset/pretty-wombats-double.md
Normal file
13
.changeset/pretty-wombats-double.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/app': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
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.
|
||||||
8
.changeset/proud-cameras-fail.md
Normal file
8
.changeset/proud-cameras-fail.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/app': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
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
|
||||||
9
.changeset/proud-wolves-end.md
Normal file
9
.changeset/proud-wolves-end.md
Normal 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)
|
||||||
7
.changeset/quick-houses-count.md
Normal file
7
.changeset/quick-houses-count.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/es-mapping-generator': major
|
||||||
|
---
|
||||||
|
|
||||||
|
Remove put-es-templates
|
||||||
|
|
||||||
|
The `put-es-templates` functionality has been removed.
|
||||||
24
.changeset/rare-squids-bake.md
Normal file
24
.changeset/rare-squids-bake.md
Normal 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
|
||||||
5
.changeset/serious-meals-sin.md
Normal file
5
.changeset/serious-meals-sin.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/projectmanagement': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Update release configs
|
||||||
29
.changeset/silent-maps-float.md
Normal file
29
.changeset/silent-maps-float.md
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/projectmanagement': patch
|
||||||
|
'@openstapps/prettier-config': patch
|
||||||
|
'@openstapps/es-mapping-generator': patch
|
||||||
|
'@openstapps/backend-config': patch
|
||||||
|
'@openstapps/eslint-config': patch
|
||||||
|
'@openstapps/minimal-deployment': patch
|
||||||
|
'@openstapps/minimal-connector': patch
|
||||||
|
'@openstapps/collection-utils': patch
|
||||||
|
'@openstapps/minimal-plugin': patch
|
||||||
|
'@openstapps/tsconfig': patch
|
||||||
|
'@openstapps/node-builder': patch
|
||||||
|
'@openstapps/api-plugin': patch
|
||||||
|
'@openstapps/core-tools': patch
|
||||||
|
'@openstapps/gitlab-api': patch
|
||||||
|
'@openstapps/app-builder-image': patch
|
||||||
|
'@openstapps/easy-ast': patch
|
||||||
|
'@openstapps/database': patch
|
||||||
|
'@openstapps/node-base': patch
|
||||||
|
'@openstapps/api-cli': patch
|
||||||
|
'@openstapps/backend': patch
|
||||||
|
'@openstapps/logger': patch
|
||||||
|
'@openstapps/proxy': patch
|
||||||
|
'@openstapps/core': patch
|
||||||
|
'@openstapps/app': patch
|
||||||
|
'@openstapps/api': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Update to TypeScript 5.1.6
|
||||||
5
.changeset/silly-news-punch.md
Normal file
5
.changeset/silly-news-punch.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/app': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Migrate collection helpers to use @openstapps/collection-utils
|
||||||
5
.changeset/silver-bobcats-cry.md
Normal file
5
.changeset/silver-bobcats-cry.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/app': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Queue config update for next launch to not block app launches
|
||||||
8
.changeset/smart-ghosts-shout.md
Normal file
8
.changeset/smart-ghosts-shout.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/app': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Migrate to Ionic 7
|
||||||
|
|
||||||
|
- Migrate uses of `<ion-label>` with inputs to new syntax
|
||||||
|
- Fix infinite loop in schedule date picker (`datetime.confirm()` to `datetime.cancel()`)
|
||||||
7
.changeset/soft-donuts-fail.md
Normal file
7
.changeset/soft-donuts-fail.md
Normal 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.
|
||||||
5
.changeset/sour-carpets-flash.md
Normal file
5
.changeset/sour-carpets-flash.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/app': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fixed an issue that caused double and triple loading of data detail items through the route stack service
|
||||||
7
.changeset/sour-coins-visit.md
Normal file
7
.changeset/sour-coins-visit.md
Normal 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
|
||||||
5
.changeset/spicy-snails-sort.md
Normal file
5
.changeset/spicy-snails-sort.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/eslint-config': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Add license header enforcement rule (unfinished)
|
||||||
5
.changeset/stale-garlics-share.md
Normal file
5
.changeset/stale-garlics-share.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/core': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Include openapi.json in built package
|
||||||
26
.changeset/strange-hounds-repair.md
Normal file
26
.changeset/strange-hounds-repair.md
Normal 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,
|
||||||
|
);
|
||||||
|
```
|
||||||
5
.changeset/tall-ducks-dream.md
Normal file
5
.changeset/tall-ducks-dream.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/app': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Migrate away from JIT compilation
|
||||||
5
.changeset/tame-mayflies-hug.md
Normal file
5
.changeset/tame-mayflies-hug.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/logger': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix an issue with chalk terminal colors in tests
|
||||||
9
.changeset/tame-rings-dream.md
Normal file
9
.changeset/tame-rings-dream.md
Normal 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.
|
||||||
6
.changeset/tasty-islands-smell.md
Normal file
6
.changeset/tasty-islands-smell.md
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/app': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Migrate unit tests to karma-coverage and junit reports.
|
||||||
|
Fixes an issue where coverage reports would not be generated.
|
||||||
5
.changeset/thick-mails-peel.md
Normal file
5
.changeset/thick-mails-peel.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/app': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Map items are now native list items
|
||||||
5
.changeset/thick-weeks-compete.md
Normal file
5
.changeset/thick-weeks-compete.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/projectmanagement': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Migrate moment.js to date-fns
|
||||||
23
.changeset/thin-camels-give.md
Normal file
23
.changeset/thin-camels-give.md
Normal 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'`
|
||||||
9
.changeset/tidy-buses-reflect.md
Normal file
9
.changeset/tidy-buses-reflect.md
Normal 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.
|
||||||
5
.changeset/tough-hairs-provide.md
Normal file
5
.changeset/tough-hairs-provide.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/core-tools': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Migrate from away from lodash
|
||||||
5
.changeset/tricky-garlics-hope.md
Normal file
5
.changeset/tricky-garlics-hope.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/app': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Replaced simple links with list items in date-series detail
|
||||||
5
.changeset/twelve-planes-knock.md
Normal file
5
.changeset/twelve-planes-knock.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/proxy': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Send 426 to outdated clients instead of 404
|
||||||
5
.changeset/wet-houses-provide.md
Normal file
5
.changeset/wet-houses-provide.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@openstapps/app': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Use event title for date series instead of the generic date series title
|
||||||
@@ -1,158 +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
|
## 3.0.0-next.4
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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.4",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
|
|||||||
@@ -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: {
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
# @openstapps/database
|
# @openstapps/database
|
||||||
|
|
||||||
## 3.0.0
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- 23481d0d: Update to TypeScript 5.1.6
|
|
||||||
|
|
||||||
## 3.0.0-next.4
|
## 3.0.0-next.4
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@openstapps/database",
|
"name": "@openstapps/database",
|
||||||
"version": "3.0.0",
|
"version": "3.0.0-next.4",
|
||||||
"private": true,
|
"private": true,
|
||||||
"files": [
|
"files": [
|
||||||
"config",
|
"config",
|
||||||
|
|||||||
@@ -1,101 +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
|
## 3.0.0-next.4
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -31,10 +31,11 @@ To Provide your own configuration file you can create a `default.json` file in t
|
|||||||
|
|
||||||
## Status Codes
|
## Status Codes
|
||||||
|
|
||||||
- OutdatedVersions return a `HTTP 404`
|
- Successfull reponses come with a `HTTP 200`
|
||||||
- ActiveVersions return a `HTTP 503` if currently unavailable or the given code by running backend-node
|
|
||||||
- Unsupported versions (not configured as outdated or active) return a `HTTP 404`
|
|
||||||
- No version header given returns a `HTTP 300`
|
- No version header given returns a `HTTP 300`
|
||||||
|
- ActiveVersions return a `HTTP 503` if currently unavailable or the given code by running backend-node
|
||||||
|
- OutdatedVersions return a `HTTP 426`
|
||||||
|
- Unsupported versions (not configured as outdated or active) return a `HTTP 426`
|
||||||
|
|
||||||
**NOTE:** The default configuration expects the client to set a version header: `X-StApps-Version=<version of app>`
|
**NOTE:** The default configuration expects the client to set a version header: `X-StApps-Version=<version of app>`
|
||||||
|
|
||||||
|
|||||||
@@ -14,9 +14,8 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// ESM is not supported, and cts is not detected, so we use type-checked cjs instead.
|
|
||||||
/** @type {import('../src/common').ConfigFile} */
|
/** @type {import('../src/common').ConfigFile} */
|
||||||
const configFile = {
|
module.exports = {
|
||||||
activeVersions: ['1\\.0\\.\\d+', '2\\.0\\.\\d+'],
|
activeVersions: ['1\\.0\\.\\d+', '2\\.0\\.\\d+'],
|
||||||
hiddenRoutes: ['/bulk'],
|
hiddenRoutes: ['/bulk'],
|
||||||
logFormat: 'default',
|
logFormat: 'default',
|
||||||
@@ -31,5 +30,3 @@ const configFile = {
|
|||||||
dhparam: '/etc/nginx/certs/dhparam.pem',
|
dhparam: '/etc/nginx/certs/dhparam.pem',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default configFile;
|
|
||||||
|
|||||||
@@ -19,14 +19,15 @@ location {{{ route }}} {
|
|||||||
return 300 'You have to supply a client/app version via the X-StApps-Version header!';
|
return 300 'You have to supply a client/app version via the X-StApps-Version header!';
|
||||||
}
|
}
|
||||||
|
|
||||||
# Version is unsupported or never existed
|
# Version is unsupported by now or never existed (App/Client has to update)
|
||||||
if ($proxyurl = unsupported) {
|
if ($proxyurl = unsupported) {
|
||||||
{{{ cors }}}
|
{{{ cors }}}
|
||||||
return 404;
|
return 426;
|
||||||
}
|
}
|
||||||
# The version existed, but is outdated now (App should update)
|
# The version existed, but is outdated now (App/Client should update)
|
||||||
if ($proxyurl = outdated) {
|
if ($proxyurl = outdated) {
|
||||||
return 404;
|
{{{ cors }}}
|
||||||
|
return 426;
|
||||||
}
|
}
|
||||||
# The version is correct, but backend is not responding
|
# The version is correct, but backend is not responding
|
||||||
if ($proxyurl = unavailable) {
|
if ($proxyurl = unavailable) {
|
||||||
|
|||||||
@@ -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.4",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
@@ -34,10 +34,12 @@
|
|||||||
"build": "tsup-node --dts",
|
"build": "tsup-node --dts",
|
||||||
"build:docker": "docker build -t openstapps:proxy ../../.deploy/proxy",
|
"build:docker": "docker build -t openstapps:proxy ../../.deploy/proxy",
|
||||||
"deploy": "pnpm --prod --filter=@openstapps/proxy deploy ../../.deploy/proxy",
|
"deploy": "pnpm --prod --filter=@openstapps/proxy deploy ../../.deploy/proxy",
|
||||||
|
"dev": "tsup --watch --onSuccess \"pnpm run start\"",
|
||||||
"format": "prettier . -c --ignore-path ../../.gitignore",
|
"format": "prettier . -c --ignore-path ../../.gitignore",
|
||||||
"format:fix": "prettier --write . --ignore-path ../../.gitignore",
|
"format:fix": "prettier --write . --ignore-path ../../.gitignore",
|
||||||
"lint": "eslint --ext .ts src/",
|
"lint": "eslint --ext .ts src/",
|
||||||
"lint:fix": "eslint --fix --ext .ts src/",
|
"lint:fix": "eslint --fix --ext .ts src/",
|
||||||
|
"start": "node app.js",
|
||||||
"test": "c8 mocha"
|
"test": "c8 mocha"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));
|
|||||||
* Reads the container information from the docker socket and updates the nginx config if necessary
|
* Reads the container information from the docker socket and updates the nginx config if necessary
|
||||||
*/
|
*/
|
||||||
async function updateNginxConfig() {
|
async function updateNginxConfig() {
|
||||||
const containers = await getContainers();
|
const containers = await getContainers(process.env.DOCKER_SOCKET);
|
||||||
|
|
||||||
const containerHash = containers
|
const containerHash = containers
|
||||||
.map((container: ContainerInfo) => {
|
.map((container: ContainerInfo) => {
|
||||||
@@ -78,4 +78,4 @@ async function updateNginxConfig() {
|
|||||||
|
|
||||||
// start the process that checks the docker socket periodically
|
// start the process that checks the docker socket periodically
|
||||||
// eslint-disable-next-line unicorn/prefer-top-level-await
|
// eslint-disable-next-line unicorn/prefer-top-level-await
|
||||||
updateNginxConfig();
|
await updateNginxConfig();
|
||||||
|
|||||||
@@ -1,74 +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
|
## 3.0.0-next.4
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -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.4",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
|
|||||||
@@ -1,91 +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
|
## 3.0.0-next.4
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -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.4",
|
||||||
"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",
|
||||||
|
|||||||
@@ -1,84 +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
|
## 3.0.0-next.4
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -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.4",
|
||||||
"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",
|
||||||
|
|||||||
@@ -1,126 +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
|
## 3.0.0-next.4
|
||||||
|
|
||||||
### Major Changes
|
### Major Changes
|
||||||
|
|||||||
@@ -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.4",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
|
|||||||
@@ -1,74 +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
|
## 3.0.0-next.4
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -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.4",
|
||||||
"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",
|
||||||
|
|||||||
@@ -1,123 +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
|
## 3.0.0-next.4
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -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.4",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
# @openstapps/minimal-deployment
|
# @openstapps/minimal-deployment
|
||||||
|
|
||||||
## 3.0.0
|
|
||||||
|
|
||||||
### Patch Changes
|
|
||||||
|
|
||||||
- 23481d0d: Update to TypeScript 5.1.6
|
|
||||||
|
|
||||||
## 3.0.0-next.4
|
## 3.0.0-next.4
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
version: '3.7'
|
version: '3.7'
|
||||||
services:
|
services:
|
||||||
database:
|
database:
|
||||||
image: registry.gitlab.com/openstapps/openstapps/database:2.0.0
|
image: registry.gitlab.com/openstapps/openstapps/database:3.0.0-next.4
|
||||||
volumes:
|
volumes:
|
||||||
- ./database:/usr/share/elasticsearch/data
|
- ./database:/usr/share/elasticsearch/data
|
||||||
expose:
|
expose:
|
||||||
@@ -9,7 +9,7 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
image: registry.gitlab.com/openstapps/openstapps/backend:3.0.0-next.0
|
image: registry.gitlab.com/openstapps/openstapps/backend:3.0.0-next.4
|
||||||
environment:
|
environment:
|
||||||
ES_ADDR: "http://database:9200"
|
ES_ADDR: "http://database:9200"
|
||||||
NODE_CONFIG_ENV: "elasticsearch"
|
NODE_CONFIG_ENV: "elasticsearch"
|
||||||
@@ -27,17 +27,17 @@ services:
|
|||||||
- database
|
- database
|
||||||
|
|
||||||
api:
|
api:
|
||||||
image: registry.gitlab.com/openstapps/openstapps/api:3.0.0-next.0
|
image: registry.gitlab.com/openstapps/openstapps/api:3.0.0-next.4
|
||||||
links:
|
links:
|
||||||
- "backend"
|
- "backend"
|
||||||
|
|
||||||
minimal-connector:
|
minimal-connector:
|
||||||
image: registry.gitlab.com/openstapps/minimal-connector:core-0.23
|
image: registry.gitlab.com/openstapps/openstapps/minimal-connector:3.0.0-next.4
|
||||||
container_name: minimal-connector-0.23
|
container_name: minimal-connector-0.23
|
||||||
command: ["http://backend:3000", "minimal-connector", "f-u"]
|
command: ["http://backend:3000", "minimal-connector", "f-u"]
|
||||||
|
|
||||||
app:
|
app:
|
||||||
image: registry.gitlab.com/openstapps/app/executable:core-0.23
|
image: registry.gitlab.com/openstapps/openstapps/app:3.0.0-next.4
|
||||||
expose:
|
expose:
|
||||||
- 8100
|
- 8100
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@openstapps/minimal-deployment",
|
"name": "@openstapps/minimal-deployment",
|
||||||
"version": "3.0.0",
|
"version": "3.0.0-next.4",
|
||||||
"private": true,
|
"private": true,
|
||||||
"files": [
|
"files": [
|
||||||
"database",
|
"database",
|
||||||
|
|||||||
@@ -1,129 +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
|
## 3.0.0-next.4
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -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.4",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
|
|||||||
2
frontend/app/.gitignore
vendored
2
frontend/app/.gitignore
vendored
@@ -44,5 +44,3 @@ UserInterfaceState.xcuserstate
|
|||||||
|
|
||||||
docs
|
docs
|
||||||
bundle-info.html
|
bundle-info.html
|
||||||
|
|
||||||
.browser-data/
|
|
||||||
|
|||||||
@@ -1,145 +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
|
## 3.0.0-next.4
|
||||||
|
|
||||||
### Major Changes
|
### Major Changes
|
||||||
|
|||||||
@@ -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):
|
||||||
|
|||||||
@@ -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')
|
||||||
|
|||||||
@@ -7,10 +7,6 @@
|
|||||||
"pkg": "@capacitor/browser",
|
"pkg": "@capacitor/browser",
|
||||||
"classpath": "com.capacitorjs.plugins.browser.BrowserPlugin"
|
"classpath": "com.capacitorjs.plugins.browser.BrowserPlugin"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"pkg": "@capacitor/clipboard",
|
|
||||||
"classpath": "com.capacitorjs.plugins.clipboard.ClipboardPlugin"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"pkg": "@capacitor/device",
|
"pkg": "@capacitor/device",
|
||||||
"classpath": "com.capacitorjs.plugins.device.DevicePlugin"
|
"classpath": "com.capacitorjs.plugins.device.DevicePlugin"
|
||||||
|
|||||||
@@ -8,9 +8,6 @@ project(':capacitor-app').projectDir = new File('../../../node_modules/.pnpm/@ca
|
|||||||
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/.pnpm/@capacitor+browser@4.1.0_@capacitor+core@4.6.1/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/.pnpm/@capacitor+device@4.1.0_@capacitor+core@4.6.1/node_modules/@capacitor/device/android')
|
||||||
|
|
||||||
|
|||||||
@@ -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.4",
|
||||||
"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\"",
|
||||||
@@ -93,6 +92,7 @@
|
|||||||
"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",
|
"date-fns": "2.30.0",
|
||||||
|
"ngx-date-fns": "10.0.1",
|
||||||
"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,7 +102,6 @@
|
|||||||
"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": "16.0.0",
|
||||||
"ngx-moment": "6.0.2",
|
"ngx-moment": "6.0.2",
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {Observable, shareReplay} from 'rxjs';
|
import {Observable} from 'rxjs';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -22,7 +22,7 @@ export function fromMutationObserver(
|
|||||||
target: Node,
|
target: Node,
|
||||||
options?: MutationObserverInit,
|
options?: MutationObserverInit,
|
||||||
): Observable<MutationRecord[]> {
|
): Observable<MutationRecord[]> {
|
||||||
return new Observable<MutationRecord[]>(subscriber => {
|
return new Observable(subscriber => {
|
||||||
const observer = new MutationObserver(mutations => {
|
const observer = new MutationObserver(mutations => {
|
||||||
subscriber.next(mutations);
|
subscriber.next(mutations);
|
||||||
});
|
});
|
||||||
@@ -30,5 +30,5 @@ export function fromMutationObserver(
|
|||||||
return () => {
|
return () => {
|
||||||
observer.disconnect();
|
observer.disconnect();
|
||||||
};
|
};
|
||||||
}).pipe(shareReplay(1));
|
});
|
||||||
}
|
}
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2020 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 {NGXLogger} from 'ngx-logger';
|
|
||||||
|
|
||||||
export let logger: NGXLogger;
|
|
||||||
|
|
||||||
export const initLogger = (newLogger: NGXLogger) => (logger = newLogger);
|
|
||||||
@@ -21,17 +21,13 @@ import {RouteReuseStrategy} from '@angular/router';
|
|||||||
import {IonicModule, IonicRouteStrategy, Platform} from '@ionic/angular';
|
import {IonicModule, IonicRouteStrategy, Platform} from '@ionic/angular';
|
||||||
import {TranslateLoader, TranslateModule, TranslateService} from '@ngx-translate/core';
|
import {TranslateLoader, TranslateModule, TranslateService} from '@ngx-translate/core';
|
||||||
import {TranslateHttpLoader} from '@ngx-translate/http-loader';
|
import {TranslateHttpLoader} from '@ngx-translate/http-loader';
|
||||||
import moment from 'moment';
|
|
||||||
import 'moment/min/locales';
|
import 'moment/min/locales';
|
||||||
import {LoggerModule, NGXLogger, NgxLoggerLevel} from 'ngx-logger';
|
import {LoggerModule, NgxLoggerLevel} from 'ngx-logger';
|
||||||
import SwiperCore, {FreeMode, Navigation} from 'swiper';
|
import SwiperCore, {FreeMode, Navigation} from 'swiper';
|
||||||
|
|
||||||
import {environment} from '../environments/environment';
|
import {environment} from '../environments/environment';
|
||||||
import {AppRoutingModule} from './app-routing.module';
|
import {AppRoutingModule} from './app-routing.module';
|
||||||
import {AppComponent} from './app.component';
|
import {AppComponent} from './app.component';
|
||||||
import {CatalogModule} from './modules/catalog/catalog.module';
|
import {CatalogModule} from './modules/catalog/catalog.module';
|
||||||
import {ConfigModule} from './modules/config/config.module';
|
|
||||||
import {ConfigProvider} from './modules/config/config.provider';
|
|
||||||
import {DashboardModule} from './modules/dashboard/dashboard.module';
|
import {DashboardModule} from './modules/dashboard/dashboard.module';
|
||||||
import {DataModule} from './modules/data/data.module';
|
import {DataModule} from './modules/data/data.module';
|
||||||
import {HebisModule} from './modules/hebis/hebis.module';
|
import {HebisModule} from './modules/hebis/hebis.module';
|
||||||
@@ -40,11 +36,9 @@ import {MenuModule} from './modules/menu/menu.module';
|
|||||||
import {NewsModule} from './modules/news/news.module';
|
import {NewsModule} from './modules/news/news.module';
|
||||||
import {ScheduleModule} from './modules/schedule/schedule.module';
|
import {ScheduleModule} from './modules/schedule/schedule.module';
|
||||||
import {SettingsModule} from './modules/settings/settings.module';
|
import {SettingsModule} from './modules/settings/settings.module';
|
||||||
import {SettingsProvider} from './modules/settings/settings.provider';
|
|
||||||
import {StorageModule} from './modules/storage/storage.module';
|
import {StorageModule} from './modules/storage/storage.module';
|
||||||
import {ThingTranslateModule} from './translation/thing-translate.module';
|
import {ThingTranslateModule} from './translation/thing-translate.module';
|
||||||
import {UtilModule} from './util/util.module';
|
import {UtilModule} from './util/util.module';
|
||||||
import {initLogger} from './_helpers/ts-logger';
|
|
||||||
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
|
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
|
||||||
import {AboutModule} from './modules/about/about.module';
|
import {AboutModule} from './modules/about/about.module';
|
||||||
import {FavoritesModule} from './modules/favorites/favorites.module';
|
import {FavoritesModule} from './modules/favorites/favorites.module';
|
||||||
@@ -54,80 +48,22 @@ import {DebugDataCollectorService} from './modules/data/debug-data-collector.ser
|
|||||||
import {AuthModule} from './modules/auth/auth.module';
|
import {AuthModule} from './modules/auth/auth.module';
|
||||||
import {BackgroundModule} from './modules/background/background.module';
|
import {BackgroundModule} from './modules/background/background.module';
|
||||||
import {LibraryModule} from './modules/library/library.module';
|
import {LibraryModule} from './modules/library/library.module';
|
||||||
import {StorageProvider} from './modules/storage/storage.provider';
|
|
||||||
import {AssessmentsModule} from './modules/assessments/assessments.module';
|
import {AssessmentsModule} from './modules/assessments/assessments.module';
|
||||||
import {ServiceHandlerInterceptor} from './_helpers/service-handler.interceptor';
|
import {ServiceHandlerInterceptor} from './_helpers/service-handler.interceptor';
|
||||||
import {RoutingStackService} from './util/routing-stack.service';
|
|
||||||
import {SCLanguageCode, SCSettingValue} from '@openstapps/core';
|
|
||||||
import {DefaultAuthService} from './modules/auth/default-auth.service';
|
|
||||||
import {PAIAAuthService} from './modules/auth/paia/paia-auth.service';
|
|
||||||
import {IonIconModule} from './util/ion-icon/ion-icon.module';
|
import {IonIconModule} from './util/ion-icon/ion-icon.module';
|
||||||
import {NavigationModule} from './modules/menu/navigation/navigation.module';
|
import {NavigationModule} from './modules/menu/navigation/navigation.module';
|
||||||
import {browserFactory, SimpleBrowser} from './util/browser.factory';
|
import {browserFactory, SimpleBrowser} from './util/browser.factory';
|
||||||
import {getDateFnsLocale} from './translation/dfns-locale';
|
import {ConfigProvider} from './modules/config/config.provider';
|
||||||
import {setDefaultOptions} from 'date-fns';
|
import {SettingsProvider} from './modules/settings/settings.provider';
|
||||||
import {DateFnsConfigurationService} from 'ngx-date-fns';
|
import {TranslateServiceWrapper} from './translation/translate-service-wrapper';
|
||||||
|
import {DefaultAuthService} from './modules/auth/default-auth.service';
|
||||||
|
import {PAIAAuthService} from './modules/auth/paia/paia-auth.service';
|
||||||
|
import {StorageProvider} from './modules/storage/storage.provider';
|
||||||
|
|
||||||
registerLocaleData(localeDe);
|
registerLocaleData(localeDe);
|
||||||
|
|
||||||
SwiperCore.use([FreeMode, Navigation]);
|
SwiperCore.use([FreeMode, Navigation]);
|
||||||
|
|
||||||
/**
|
|
||||||
* Initializes data needed on startup
|
|
||||||
*/
|
|
||||||
export function initializerFactory(
|
|
||||||
storageProvider: StorageProvider,
|
|
||||||
logger: NGXLogger,
|
|
||||||
settingsProvider: SettingsProvider,
|
|
||||||
configProvider: ConfigProvider,
|
|
||||||
translateService: TranslateService,
|
|
||||||
_routingStackService: RoutingStackService,
|
|
||||||
defaultAuthService: DefaultAuthService,
|
|
||||||
paiaAuthService: PAIAAuthService,
|
|
||||||
dateFnsConfigurationService: DateFnsConfigurationService,
|
|
||||||
) {
|
|
||||||
return async () => {
|
|
||||||
initLogger(logger);
|
|
||||||
await storageProvider.init();
|
|
||||||
await configProvider.init();
|
|
||||||
await settingsProvider.init();
|
|
||||||
try {
|
|
||||||
if (configProvider.firstSession) {
|
|
||||||
// set language from browser
|
|
||||||
await settingsProvider.setSettingValue(
|
|
||||||
'profile',
|
|
||||||
'language',
|
|
||||||
translateService.getBrowserLang() as SCSettingValue,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
const languageCode = (await settingsProvider.getValue('profile', 'language')) as string;
|
|
||||||
// this language will be used as a fallback when a translation isn't found in the current language
|
|
||||||
translateService.setDefaultLang('en');
|
|
||||||
translateService.use(languageCode);
|
|
||||||
moment.locale(languageCode);
|
|
||||||
const dateFnsLocale = await getDateFnsLocale(languageCode as SCLanguageCode);
|
|
||||||
setDefaultOptions({locale: dateFnsLocale});
|
|
||||||
dateFnsConfigurationService.setLocale(dateFnsLocale);
|
|
||||||
|
|
||||||
await defaultAuthService.init();
|
|
||||||
await paiaAuthService.init();
|
|
||||||
} catch (error) {
|
|
||||||
logger.warn(error);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* TODO
|
|
||||||
* @param http TODO
|
|
||||||
*/
|
|
||||||
export function createTranslateLoader(http: HttpClient) {
|
|
||||||
return new TranslateHttpLoader(http, './assets/i18n/', '.json');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* TODO
|
|
||||||
*/
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
bootstrap: [AppComponent],
|
bootstrap: [AppComponent],
|
||||||
declarations: [AppComponent],
|
declarations: [AppComponent],
|
||||||
@@ -141,7 +77,6 @@ export function createTranslateLoader(http: HttpClient) {
|
|||||||
BrowserAnimationsModule,
|
BrowserAnimationsModule,
|
||||||
CatalogModule,
|
CatalogModule,
|
||||||
CommonModule,
|
CommonModule,
|
||||||
ConfigModule,
|
|
||||||
DashboardModule,
|
DashboardModule,
|
||||||
DataModule,
|
DataModule,
|
||||||
HebisModule,
|
HebisModule,
|
||||||
@@ -165,7 +100,9 @@ export function createTranslateLoader(http: HttpClient) {
|
|||||||
loader: {
|
loader: {
|
||||||
deps: [HttpClient],
|
deps: [HttpClient],
|
||||||
provide: TranslateLoader,
|
provide: TranslateLoader,
|
||||||
useFactory: createTranslateLoader,
|
useFactory(http: HttpClient) {
|
||||||
|
return new TranslateHttpLoader(http, './assets/i18n/', '.json');
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
UtilModule,
|
UtilModule,
|
||||||
@@ -175,6 +112,30 @@ export function createTranslateLoader(http: HttpClient) {
|
|||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
|
{
|
||||||
|
provide: APP_INITIALIZER,
|
||||||
|
useFactory:
|
||||||
|
(...providers: Array<{beforeAppInit(): Promise<void>}>) =>
|
||||||
|
async () => {
|
||||||
|
for (const provider of providers) {
|
||||||
|
await provider.beforeAppInit();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// Declare initialization (order matters)
|
||||||
|
deps: [
|
||||||
|
StorageProvider,
|
||||||
|
ConfigProvider,
|
||||||
|
SettingsProvider,
|
||||||
|
TranslateService,
|
||||||
|
DefaultAuthService,
|
||||||
|
PAIAAuthService,
|
||||||
|
],
|
||||||
|
multi: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
provide: TranslateService,
|
||||||
|
useClass: TranslateServiceWrapper,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
provide: RouteReuseStrategy,
|
provide: RouteReuseStrategy,
|
||||||
useClass: IonicRouteStrategy,
|
useClass: IonicRouteStrategy,
|
||||||
@@ -188,22 +149,6 @@ export function createTranslateLoader(http: HttpClient) {
|
|||||||
useFactory: browserFactory,
|
useFactory: browserFactory,
|
||||||
deps: [Platform],
|
deps: [Platform],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
provide: APP_INITIALIZER,
|
|
||||||
multi: true,
|
|
||||||
deps: [
|
|
||||||
StorageProvider,
|
|
||||||
NGXLogger,
|
|
||||||
SettingsProvider,
|
|
||||||
ConfigProvider,
|
|
||||||
TranslateService,
|
|
||||||
RoutingStackService,
|
|
||||||
DefaultAuthService,
|
|
||||||
PAIAAuthService,
|
|
||||||
DateFnsConfigurationService,
|
|
||||||
],
|
|
||||||
useFactory: initializerFactory,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
provide: HTTP_INTERCEPTORS,
|
provide: HTTP_INTERCEPTORS,
|
||||||
useClass: ServiceHandlerInterceptor,
|
useClass: ServiceHandlerInterceptor,
|
||||||
|
|||||||
10
frontend/app/src/app/before-app-init.ts
Normal file
10
frontend/app/src/app/before-app-init.ts
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
/**
|
||||||
|
* Services or providers implementing this interface
|
||||||
|
* must be added to the `APP_INITIALIZER` deps
|
||||||
|
*/
|
||||||
|
export interface BeforeAppInit {
|
||||||
|
/**
|
||||||
|
* Any logic that has to run before the app is initialized
|
||||||
|
*/
|
||||||
|
beforeAppInit(): Promise<void>;
|
||||||
|
}
|
||||||
@@ -14,10 +14,9 @@
|
|||||||
*/
|
*/
|
||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, OnInit} from '@angular/core';
|
||||||
import {ActivatedRoute} from '@angular/router';
|
import {ActivatedRoute} from '@angular/router';
|
||||||
import {SCAboutPage, SCAppConfiguration} from '@openstapps/core';
|
import {SCAboutPage} from '@openstapps/core';
|
||||||
import {ConfigProvider} from '../../config/config.provider';
|
|
||||||
import packageJson from '../../../../../package.json';
|
import packageJson from '../../../../../package.json';
|
||||||
import config from 'capacitor.config';
|
import {ConfigProvider} from '../../config/config.provider';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'about-page',
|
selector: 'about-page',
|
||||||
@@ -27,15 +26,12 @@ import config from 'capacitor.config';
|
|||||||
export class AboutPageComponent implements OnInit {
|
export class AboutPageComponent implements OnInit {
|
||||||
content: SCAboutPage;
|
content: SCAboutPage;
|
||||||
|
|
||||||
appName = config.appName;
|
|
||||||
|
|
||||||
version = packageJson.version;
|
version = packageJson.version;
|
||||||
|
|
||||||
constructor(private readonly route: ActivatedRoute, private readonly configProvider: ConfigProvider) {}
|
constructor(readonly route: ActivatedRoute, readonly config: ConfigProvider) {}
|
||||||
|
|
||||||
async ngOnInit() {
|
ngOnInit() {
|
||||||
const route = this.route.snapshot.url.map(it => it.path).join('/');
|
const route = this.route.snapshot.url.map(it => it.path).join('/');
|
||||||
this.content =
|
this.content = this.config.app.aboutPages[route] ?? {};
|
||||||
(this.configProvider.getValue('aboutPages') as SCAppConfiguration['aboutPages'])[route] ?? {};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
<ion-content parallax *ngIf="content">
|
<ion-content parallax *ngIf="content">
|
||||||
<ion-text>{{ appName }} v{{ version }}</ion-text>
|
<ion-text>{{ config.app.name }} v{{ version }}</ion-text>
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
<about-page-content *ngFor="let element of content.content" [content]="element"></about-page-content>
|
<about-page-content *ngFor="let element of content.content" [content]="element"></about-page-content>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import {FormsModule} from '@angular/forms';
|
|||||||
import {IonicModule} from '@ionic/angular';
|
import {IonicModule} from '@ionic/angular';
|
||||||
import {TranslateModule} from '@ngx-translate/core';
|
import {TranslateModule} from '@ngx-translate/core';
|
||||||
import {ThingTranslateModule} from '../../translation/thing-translate.module';
|
import {ThingTranslateModule} from '../../translation/thing-translate.module';
|
||||||
import {ConfigProvider} from '../config/config.provider';
|
|
||||||
import {AboutPageComponent} from './about-page/about-page.component';
|
import {AboutPageComponent} from './about-page/about-page.component';
|
||||||
import {MarkdownModule} from 'ngx-markdown';
|
import {MarkdownModule} from 'ngx-markdown';
|
||||||
import {AboutPageContentComponent} from './about-page/about-page-content.component';
|
import {AboutPageContentComponent} from './about-page/about-page-content.component';
|
||||||
@@ -64,6 +63,5 @@ const settingsRoutes: Routes = [
|
|||||||
ScrollingModule,
|
ScrollingModule,
|
||||||
UtilModule,
|
UtilModule,
|
||||||
],
|
],
|
||||||
providers: [ConfigProvider],
|
|
||||||
})
|
})
|
||||||
export class AboutModule {}
|
export class AboutModule {}
|
||||||
|
|||||||
@@ -13,11 +13,12 @@
|
|||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {Injectable} from '@angular/core';
|
import {Injectable} from '@angular/core';
|
||||||
import {ConfigProvider} from '../config/config.provider';
|
|
||||||
import {SCAssessment, SCUuid} from '@openstapps/core';
|
import {SCAssessment, SCUuid} from '@openstapps/core';
|
||||||
import {DefaultAuthService} from '../auth/default-auth.service';
|
import {DefaultAuthService} from '../auth/default-auth.service';
|
||||||
import {HttpClient} from '@angular/common/http';
|
import {HttpClient} from '@angular/common/http';
|
||||||
import {uniqBy, keyBy} from '@openstapps/collection-utils';
|
import {uniqBy, keyBy} from '@openstapps/collection-utils';
|
||||||
|
import {firstValueFrom} from 'rxjs';
|
||||||
|
import {ConfigProvider} from '../config/config.provider';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -65,7 +66,7 @@ export class AssessmentsProvider {
|
|||||||
cacheMaxAge = 15 * 60 * 1000;
|
cacheMaxAge = 15 * 60 * 1000;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
readonly configProvider: ConfigProvider,
|
readonly config: ConfigProvider,
|
||||||
readonly defaultAuth: DefaultAuthService,
|
readonly defaultAuth: DefaultAuthService,
|
||||||
readonly http: HttpClient,
|
readonly http: HttpClient,
|
||||||
) {}
|
) {}
|
||||||
@@ -91,21 +92,20 @@ export class AssessmentsProvider {
|
|||||||
return this.cache;
|
return this.cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
const url = this.configProvider.config.app.features.extern?.hisometry.url;
|
const url = this.config.app.features.extern?.hisometry.url;
|
||||||
if (!url) throw new Error('Config lacks url for hisometry');
|
if (!url) throw new Error('Config lacks url for hisometry');
|
||||||
|
|
||||||
this.cache = this.http
|
this.cache = firstValueFrom(
|
||||||
.get<{data: SCAssessment[]}>(`${url}/${this.assessmentPath}`, {
|
this.http.get<{data: SCAssessment[]}>(`${url}/${this.assessmentPath}`, {
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${accessToken ?? (await this.defaultAuth.getValidToken()).accessToken}`,
|
Authorization: `Bearer ${accessToken ?? (await this.defaultAuth.getValidToken()).accessToken}`,
|
||||||
},
|
},
|
||||||
})
|
}),
|
||||||
.toPromise()
|
).then(it => {
|
||||||
.then(it => {
|
this.cacheTimestamp = Date.now();
|
||||||
this.cacheTimestamp = Date.now();
|
|
||||||
|
|
||||||
return it?.data ?? [];
|
return it?.data ?? [];
|
||||||
});
|
});
|
||||||
this.assessments = this.cache.then(toAssessmentMap);
|
this.assessments = this.cache.then(toAssessmentMap);
|
||||||
|
|
||||||
return this.cache;
|
return this.cache;
|
||||||
|
|||||||
@@ -12,24 +12,18 @@
|
|||||||
* 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 {Injectable} from '@angular/core';
|
import {Injectable} from '@angular/core';
|
||||||
import {IPAIAAuthAction} from './paia/paia-auth-action';
|
import {IPAIAAuthAction} from './paia/paia-auth-action';
|
||||||
import {AuthActions, IAuthAction} from 'ionic-appauth';
|
import {AuthActions, IAuthAction} from 'ionic-appauth';
|
||||||
import {TranslateService} from '@ngx-translate/core';
|
import {TranslateService} from '@ngx-translate/core';
|
||||||
import {JSONPath} from 'jsonpath-plus';
|
import {JSONPath} from 'jsonpath-plus';
|
||||||
import {
|
import {SCAuthorizationProviderType, SCUserConfiguration, SCUserConfigurationMap} from '@openstapps/core';
|
||||||
SCAuthorizationProvider,
|
|
||||||
SCAuthorizationProviderType,
|
|
||||||
SCUserConfiguration,
|
|
||||||
SCUserConfigurationMap,
|
|
||||||
} from '@openstapps/core';
|
|
||||||
import {ConfigProvider} from '../config/config.provider';
|
|
||||||
import {StorageProvider} from '../storage/storage.provider';
|
import {StorageProvider} from '../storage/storage.provider';
|
||||||
import {DefaultAuthService} from './default-auth.service';
|
import {DefaultAuthService} from './default-auth.service';
|
||||||
import {PAIAAuthService} from './paia/paia-auth.service';
|
import {PAIAAuthService} from './paia/paia-auth.service';
|
||||||
import {SimpleBrowser} from '../../util/browser.factory';
|
import {SimpleBrowser} from '../../util/browser.factory';
|
||||||
import {AlertController} from '@ionic/angular';
|
import {AlertController} from '@ionic/angular';
|
||||||
|
import {ConfigProvider} from '../config/config.provider';
|
||||||
|
|
||||||
const AUTH_ORIGIN_PATH = 'stapps.auth.origin_path';
|
const AUTH_ORIGIN_PATH = 'stapps.auth.origin_path';
|
||||||
|
|
||||||
@@ -37,23 +31,19 @@ const AUTH_ORIGIN_PATH = 'stapps.auth.origin_path';
|
|||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class AuthHelperService {
|
export class AuthHelperService {
|
||||||
userConfigurationMap: SCUserConfigurationMap;
|
get userConfigurationMap(): SCUserConfigurationMap {
|
||||||
|
return this.config.auth.default!.endpoints.mapping;
|
||||||
|
}
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private translateService: TranslateService,
|
private translateService: TranslateService,
|
||||||
private configProvider: ConfigProvider,
|
|
||||||
private storageProvider: StorageProvider,
|
private storageProvider: StorageProvider,
|
||||||
private defaultAuth: DefaultAuthService,
|
private defaultAuth: DefaultAuthService,
|
||||||
private paiaAuth: PAIAAuthService,
|
private paiaAuth: PAIAAuthService,
|
||||||
private browser: SimpleBrowser,
|
private browser: SimpleBrowser,
|
||||||
private alertController: AlertController,
|
private alertController: AlertController,
|
||||||
) {
|
private config: ConfigProvider,
|
||||||
this.userConfigurationMap = (
|
) {}
|
||||||
this.configProvider.getAnyValue('auth') as {
|
|
||||||
default: SCAuthorizationProvider;
|
|
||||||
}
|
|
||||||
).default.endpoints.mapping;
|
|
||||||
}
|
|
||||||
|
|
||||||
public getAuthMessage(provider: SCAuthorizationProviderType, action: IAuthAction | IPAIAAuthAction) {
|
public getAuthMessage(provider: SCAuthorizationProviderType, action: IAuthAction | IPAIAAuthAction) {
|
||||||
let message: string | undefined;
|
let message: string | undefined;
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ export abstract class AuthService implements IAuthService {
|
|||||||
|
|
||||||
public async init() {
|
public async init() {
|
||||||
this.setupAuthorizationNotifier();
|
this.setupAuthorizationNotifier();
|
||||||
this.loadTokenFromStorage();
|
await this.loadTokenFromStorage();
|
||||||
this.addActionObserver(this._actionHistory);
|
this.addActionObserver(this._actionHistory);
|
||||||
this.addActionObserver(this._session);
|
this.addActionObserver(this._session);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,29 +12,26 @@
|
|||||||
* 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 {
|
import {
|
||||||
AuthorizationRequestHandler,
|
AuthorizationRequestHandler,
|
||||||
AuthorizationServiceConfiguration,
|
AuthorizationServiceConfiguration,
|
||||||
JQueryRequestor,
|
JQueryRequestor,
|
||||||
LocalStorageBackend,
|
LocalStorageBackend,
|
||||||
Requestor,
|
|
||||||
StorageBackend,
|
|
||||||
TokenRequestHandler,
|
TokenRequestHandler,
|
||||||
} from '@openid/appauth';
|
} from '@openid/appauth';
|
||||||
import {AuthActionBuilder, Browser, DefaultBrowser, EndSessionHandler, UserInfoHandler} from 'ionic-appauth';
|
import {AuthActionBuilder, DefaultBrowser, EndSessionHandler, UserInfoHandler} from 'ionic-appauth';
|
||||||
import {ConfigProvider} from '../config/config.provider';
|
|
||||||
import {SCAuthorizationProvider} from '@openstapps/core';
|
|
||||||
import {getClientConfig, getEndpointsConfig} from './auth.provider.methods';
|
import {getClientConfig, getEndpointsConfig} from './auth.provider.methods';
|
||||||
import {Injectable} from '@angular/core';
|
import {Injectable} from '@angular/core';
|
||||||
import {AuthService} from './auth.service';
|
import {AuthService} from './auth.service';
|
||||||
|
import {ConfigProvider} from '../config/config.provider';
|
||||||
|
import {BeforeAppInit} from '../../before-app-init';
|
||||||
|
|
||||||
const TOKEN_RESPONSE_KEY = 'token_response';
|
const TOKEN_RESPONSE_KEY = 'token_response';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class DefaultAuthService extends AuthService {
|
export class DefaultAuthService extends AuthService implements BeforeAppInit {
|
||||||
public localConfiguration: AuthorizationServiceConfiguration;
|
public localConfiguration: AuthorizationServiceConfiguration;
|
||||||
|
|
||||||
protected tokenHandler: TokenRequestHandler;
|
protected tokenHandler: TokenRequestHandler;
|
||||||
@@ -45,13 +42,17 @@ export class DefaultAuthService extends AuthService {
|
|||||||
|
|
||||||
protected endSessionHandler: EndSessionHandler;
|
protected endSessionHandler: EndSessionHandler;
|
||||||
|
|
||||||
constructor(
|
constructor(private config: ConfigProvider) {
|
||||||
protected browser: Browser = new DefaultBrowser(),
|
super(new DefaultBrowser(), new LocalStorageBackend(), new JQueryRequestor());
|
||||||
protected storage: StorageBackend = new LocalStorageBackend(),
|
}
|
||||||
protected requestor: Requestor = new JQueryRequestor(),
|
|
||||||
private readonly configProvider: ConfigProvider,
|
async beforeAppInit() {
|
||||||
) {
|
this.authConfig = getClientConfig('default', this.config.auth);
|
||||||
super(browser, storage, requestor);
|
this.localConfiguration = new AuthorizationServiceConfiguration(
|
||||||
|
getEndpointsConfig('default', this.config.auth),
|
||||||
|
);
|
||||||
|
|
||||||
|
await super.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
get configuration(): Promise<AuthorizationServiceConfiguration> {
|
get configuration(): Promise<AuthorizationServiceConfiguration> {
|
||||||
@@ -60,22 +61,6 @@ export class DefaultAuthService extends AuthService {
|
|||||||
return Promise.resolve(this.localConfiguration);
|
return Promise.resolve(this.localConfiguration);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async init() {
|
|
||||||
this.setupConfiguration();
|
|
||||||
this.setupAuthorizationNotifier();
|
|
||||||
await this.loadTokenFromStorage();
|
|
||||||
}
|
|
||||||
|
|
||||||
setupConfiguration() {
|
|
||||||
const authConfig = this.configProvider.getAnyValue('auth') as {
|
|
||||||
default: SCAuthorizationProvider;
|
|
||||||
};
|
|
||||||
this.authConfig = getClientConfig('default', authConfig);
|
|
||||||
this.localConfiguration = new AuthorizationServiceConfiguration(
|
|
||||||
getEndpointsConfig('default', authConfig),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
public async signOut() {
|
public async signOut() {
|
||||||
await this.revokeTokens().catch(error => {
|
await this.revokeTokens().catch(error => {
|
||||||
this.notifyActionListers(AuthActionBuilder.SignOutFailed(error));
|
this.notifyActionListers(AuthActionBuilder.SignOutFailed(error));
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
* 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 {
|
import {
|
||||||
AuthorizationError,
|
AuthorizationError,
|
||||||
AuthorizationRequest,
|
AuthorizationRequest,
|
||||||
@@ -47,10 +46,10 @@ import {PAIAAuthorizationResponse} from './paia-authorization-response';
|
|||||||
import {PAIAAuthorizationNotifier} from './paia-authorization-notifier';
|
import {PAIAAuthorizationNotifier} from './paia-authorization-notifier';
|
||||||
import {PAIATokenResponse} from './paia-token-response';
|
import {PAIATokenResponse} from './paia-token-response';
|
||||||
import {IPAIAAuthAction, PAIAAuthActionBuilder} from './paia-auth-action';
|
import {IPAIAAuthAction, PAIAAuthActionBuilder} from './paia-auth-action';
|
||||||
import {SCAuthorizationProvider} from '@openstapps/core';
|
|
||||||
import {ConfigProvider} from '../../config/config.provider';
|
|
||||||
import {getClientConfig, getEndpointsConfig} from '../auth.provider.methods';
|
import {getClientConfig, getEndpointsConfig} from '../auth.provider.methods';
|
||||||
import {Injectable} from '@angular/core';
|
import {Injectable} from '@angular/core';
|
||||||
|
import {ConfigProvider} from '../../config/config.provider';
|
||||||
|
import {BeforeAppInit} from '../../../before-app-init';
|
||||||
|
|
||||||
const TOKEN_RESPONSE_KEY = 'paia_token_response';
|
const TOKEN_RESPONSE_KEY = 'paia_token_response';
|
||||||
const AUTH_EXPIRY_BUFFER = 10 * 60 * -1; // 10 minutes in seconds
|
const AUTH_EXPIRY_BUFFER = 10 * 60 * -1; // 10 minutes in seconds
|
||||||
@@ -64,10 +63,8 @@ export interface IAuthService {
|
|||||||
getValidToken(buffer?: number): Promise<PAIATokenResponse>;
|
getValidToken(buffer?: number): Promise<PAIATokenResponse>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({providedIn: 'root'})
|
||||||
providedIn: 'root',
|
export class PAIAAuthService implements BeforeAppInit {
|
||||||
})
|
|
||||||
export class PAIAAuthService {
|
|
||||||
private _authConfig?: IAuthConfig;
|
private _authConfig?: IAuthConfig;
|
||||||
|
|
||||||
private _authSubject: AuthSubject = new AuthSubject();
|
private _authSubject: AuthSubject = new AuthSubject();
|
||||||
@@ -97,7 +94,7 @@ export class PAIAAuthService {
|
|||||||
protected browser: Browser = new DefaultBrowser(),
|
protected browser: Browser = new DefaultBrowser(),
|
||||||
protected storage: StorageBackend = new LocalStorageBackend(),
|
protected storage: StorageBackend = new LocalStorageBackend(),
|
||||||
protected requestor: Requestor = new JQueryRequestor(),
|
protected requestor: Requestor = new JQueryRequestor(),
|
||||||
private readonly configProvider: ConfigProvider,
|
private config: ConfigProvider,
|
||||||
) {
|
) {
|
||||||
this.tokenHandler = new PAIATokenRequestHandler(requestor);
|
this.tokenHandler = new PAIATokenRequestHandler(requestor);
|
||||||
this.userInfoHandler = new IonicUserInfoHandler(requestor);
|
this.userInfoHandler = new IonicUserInfoHandler(requestor);
|
||||||
@@ -110,6 +107,16 @@ export class PAIAAuthService {
|
|||||||
this.endSessionHandler = new IonicEndSessionHandler(browser);
|
this.endSessionHandler = new IonicEndSessionHandler(browser);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async beforeAppInit() {
|
||||||
|
this.authConfig = getClientConfig('paia', this.config.auth);
|
||||||
|
this.localConfiguration = new AuthorizationServiceConfiguration(
|
||||||
|
getEndpointsConfig('paia', this.config.auth),
|
||||||
|
);
|
||||||
|
|
||||||
|
this.setupAuthorizationNotifier();
|
||||||
|
await this.loadTokenFromStorage();
|
||||||
|
}
|
||||||
|
|
||||||
get token$(): Observable<PAIATokenResponse | undefined> {
|
get token$(): Observable<PAIATokenResponse | undefined> {
|
||||||
return this._tokenSubject.asObservable();
|
return this._tokenSubject.asObservable();
|
||||||
}
|
}
|
||||||
@@ -147,20 +154,6 @@ export class PAIAAuthService {
|
|||||||
return Promise.resolve(this.localConfiguration);
|
return Promise.resolve(this.localConfiguration);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async init() {
|
|
||||||
this.setupConfiguration();
|
|
||||||
this.setupAuthorizationNotifier();
|
|
||||||
await this.loadTokenFromStorage();
|
|
||||||
}
|
|
||||||
|
|
||||||
setupConfiguration() {
|
|
||||||
const authConfig = this.configProvider.getAnyValue('auth') as {
|
|
||||||
paia: SCAuthorizationProvider;
|
|
||||||
};
|
|
||||||
this.authConfig = getClientConfig('paia', authConfig);
|
|
||||||
this.localConfiguration = new AuthorizationServiceConfiguration(getEndpointsConfig('paia', authConfig));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected notifyActionListers(action: IPAIAAuthAction) {
|
protected notifyActionListers(action: IPAIAAuthAction) {
|
||||||
/* eslint-disable unicorn/no-useless-undefined */
|
/* eslint-disable unicorn/no-useless-undefined */
|
||||||
switch (action.action) {
|
switch (action.action) {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user