mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2025-12-17 19:56:18 +00:00
Compare commits
8 Commits
18-overhau
...
@openstapp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a3a416d580 | ||
|
e7607360e2
|
|||
|
1f62b5c5b0
|
|||
|
905ebf8c59
|
|||
|
b210e0d9c3
|
|||
| 3a79d57c8d | |||
|
9e6d4fe054
|
|||
|
7b96500a75
|
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@openstapps/app': major
|
||||
---
|
||||
|
||||
Update to Angular 16.1
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@openstapps/app': minor
|
||||
---
|
||||
|
||||
Detail views now won't load data again if it is being navigated to from a list item
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
'@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
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
'@openstapps/core-tools': major
|
||||
---
|
||||
|
||||
Removed pack tool
|
||||
|
||||
Use a bundler like `tsup` in conjunction with an
|
||||
`index.ts` that aggregates all exports instead.
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
'@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.
|
||||
@@ -1,31 +0,0 @@
|
||||
---
|
||||
'@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`)
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@openstapps/app': patch
|
||||
---
|
||||
|
||||
Use observable chains instead of change detection in the rating component
|
||||
@@ -1,51 +0,0 @@
|
||||
---
|
||||
'@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';
|
||||
```
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@openstapps/app': minor
|
||||
---
|
||||
|
||||
Added the ability to remove and add date series from their detail page
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@openstapps/app': patch
|
||||
---
|
||||
|
||||
Add a way to hide action chips on list items
|
||||
@@ -1,13 +0,0 @@
|
||||
---
|
||||
'@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.
|
||||
@@ -1,25 +0,0 @@
|
||||
---
|
||||
'@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, '## ['));
|
||||
```
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
'@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.
|
||||
@@ -1,34 +0,0 @@
|
||||
---
|
||||
'@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"
|
||||
}
|
||||
```
|
||||
@@ -1,30 +0,0 @@
|
||||
---
|
||||
'@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
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@openstapps/gitlab-api': minor
|
||||
---
|
||||
|
||||
Migrate from request-promise-native to got
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@openstapps/app': patch
|
||||
---
|
||||
|
||||
Fixed distance not updating in list items
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@openstapps/projectmanagement': patch
|
||||
---
|
||||
|
||||
Moved project-docs to the [GitLab Wiki](https://gitlab.com/openstapps/openstapps/-/wikis/home) repo.
|
||||
@@ -1,31 +0,0 @@
|
||||
---
|
||||
'@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
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@openstapps/es-mapping-generator': patch
|
||||
---
|
||||
|
||||
Remove @openstapps/logger dependency
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@openstapps/app': minor
|
||||
---
|
||||
|
||||
Add directions to inPlace and place list items
|
||||
@@ -1,9 +0,0 @@
|
||||
---
|
||||
'@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
|
||||
@@ -1,68 +0,0 @@
|
||||
{
|
||||
"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"
|
||||
]
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
'@openstapps/projectmanagement': major
|
||||
'@openstapps/node-base': major
|
||||
---
|
||||
|
||||
Move images to separate packages
|
||||
|
||||
Removed builder image due to migration to Kaniko
|
||||
@@ -1,13 +0,0 @@
|
||||
---
|
||||
'@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.
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
'@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
|
||||
@@ -1,9 +0,0 @@
|
||||
---
|
||||
'@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)
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
'@openstapps/es-mapping-generator': major
|
||||
---
|
||||
|
||||
Remove put-es-templates
|
||||
|
||||
The `put-es-templates` functionality has been removed.
|
||||
@@ -1,24 +0,0 @@
|
||||
---
|
||||
'@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
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@openstapps/projectmanagement': patch
|
||||
---
|
||||
|
||||
Update release configs
|
||||
@@ -1,29 +0,0 @@
|
||||
---
|
||||
'@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
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@openstapps/app': patch
|
||||
---
|
||||
|
||||
Migrate collection helpers to use @openstapps/collection-utils
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@openstapps/app': minor
|
||||
---
|
||||
|
||||
Queue config update for next launch to not block app launches
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
'@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()`)
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
'@openstapps/api': minor
|
||||
---
|
||||
|
||||
Migrate HttpClient to Node 18's native `fetch` API
|
||||
|
||||
HttpClient can now be used both in NodeJS and browsers.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@openstapps/app': patch
|
||||
---
|
||||
|
||||
Fixed an issue that caused double and triple loading of data detail items through the route stack service
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
'@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
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@openstapps/eslint-config': patch
|
||||
---
|
||||
|
||||
Add license header enforcement rule (unfinished)
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@openstapps/core': minor
|
||||
---
|
||||
|
||||
Include openapi.json in built package
|
||||
@@ -1,26 +0,0 @@
|
||||
---
|
||||
'@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,
|
||||
);
|
||||
```
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@openstapps/app': minor
|
||||
---
|
||||
|
||||
Migrate away from JIT compilation
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@openstapps/logger': patch
|
||||
---
|
||||
|
||||
Fix an issue with chalk terminal colors in tests
|
||||
@@ -1,9 +0,0 @@
|
||||
---
|
||||
'@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.
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
'@openstapps/app': patch
|
||||
---
|
||||
|
||||
Migrate unit tests to karma-coverage and junit reports.
|
||||
Fixes an issue where coverage reports would not be generated.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@openstapps/app': minor
|
||||
---
|
||||
|
||||
Map items are now native list items
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@openstapps/projectmanagement': minor
|
||||
---
|
||||
|
||||
Migrate moment.js to date-fns
|
||||
@@ -1,23 +0,0 @@
|
||||
---
|
||||
'@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'`
|
||||
@@ -1,9 +0,0 @@
|
||||
---
|
||||
'@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.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@openstapps/core-tools': patch
|
||||
---
|
||||
|
||||
Migrate from away from lodash
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@openstapps/app': minor
|
||||
---
|
||||
|
||||
Replaced simple links with list items in date-series detail
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@openstapps/proxy': minor
|
||||
---
|
||||
|
||||
Send 426 to outdated clients instead of 404
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@openstapps/app': minor
|
||||
---
|
||||
|
||||
Use event title for date series instead of the generic date series title
|
||||
@@ -1,5 +1,158 @@
|
||||
# @openstapps/backend
|
||||
|
||||
## 3.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- 64caebaf: Migrate config system to cosmiconfig
|
||||
|
||||
Configs are now written using type-checked JavaScript
|
||||
|
||||
```js
|
||||
// @ts-check
|
||||
|
||||
// This file is now type-safe just like TypeScript, but
|
||||
// without the compilation step
|
||||
|
||||
/** @type {import('@openstapps/package').Type} */
|
||||
const foo = {};
|
||||
```
|
||||
|
||||
You can write config files in JavaScript, JSON, or other
|
||||
cosmiconfig-supported formats.
|
||||
|
||||
The config files now are
|
||||
|
||||
- `backendrc.{js,json,...}`
|
||||
- `elasticsearchrc.{js,json,...}`
|
||||
- `prometheusrc.{js,json,...}`
|
||||
|
||||
You can also split them into multiple files,
|
||||
as well as using the `markdown.js` helper in
|
||||
`config/default/tools` to include markdown files
|
||||
as text (see `config/f-u/about-pages`)
|
||||
|
||||
- 64caebaf: Move project to a turbo monorepo & pnpm
|
||||
|
||||
Internal dependencies are now defined using `"@openstapps/package": "workspace:*"`
|
||||
|
||||
- Removed extraneous files from packages
|
||||
- `.npmrc`
|
||||
- `.npmignore`
|
||||
- `.mailmap`
|
||||
- `.gitignore`
|
||||
- `CONTRIBUTING.md`
|
||||
- `LICENSE` (Project license file is added upon publishing, see [pnpm.io](https://pnpm.io/cli/publish))
|
||||
- `package-lock.json`
|
||||
- `.editorconfig`
|
||||
- `.eslintrc.json` (moved eslint config to `package.json`)
|
||||
- `.eslintignore`
|
||||
- `.gitlab-ci.yml` (Most workflows are workspace-level)
|
||||
- `.gitlab/**` (issue templates etc. are now workspace-level)
|
||||
- `.dockerignore` (Docker files are determined by which files are deployed with `pnpm deploy`, as per `package.json/files`)
|
||||
- TSConfig has been moved to its own package (You can now use `"extends": "@openstapps/tsconfig"`)
|
||||
- Removed ESLint and Prettier peer dependency hell by injecting them through the `.pnpmfile.cjs`
|
||||
- Added syncpack for keeping dependency versions in sync (and consistent key ordering in `package.json`)
|
||||
- Replaced conventional changelog with changesets
|
||||
- Apps with binaries now use a top level `app.js`
|
||||
|
||||
```js
|
||||
#!/usr/bin/env node
|
||||
import './lib/app.js';
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate to ESM
|
||||
|
||||
CommonJS is no longer supported in any capacity. To use the new
|
||||
version, you will need to migrate your package to ESM.
|
||||
We recommend using `tsup` and `Node 18`.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate package to Node 18
|
||||
|
||||
- Consumers of this package will need to migrate to Node 18 or
|
||||
higher.
|
||||
- Packages have been migrated from promisified `readFile` or
|
||||
`readFileSync` towards `fs/promises`
|
||||
- Packages use native `flatMap` now
|
||||
|
||||
- 0a7e6af1: Migrate es mapping types from es-mapping-generator to .d.ts next to generated mappings
|
||||
- 64caebaf: Migrate build system to `tsup`
|
||||
|
||||
All packages now use an `index.ts` file to expose contents.
|
||||
|
||||
You will need to migrate paths from `import foo from '@scope/package/lib/foo` to `import foo from '@scope/package'`
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 64caebaf: Migrate integration tests from docker-compose solution to a shell script
|
||||
|
||||
`api-cli` no longer builds as a Docker container as a result.
|
||||
|
||||
- 64caebaf: Migrate tests to C8/Chai/Mocha
|
||||
|
||||
- `@testdeck` OOP testing has been removed.
|
||||
- Tests have been unified
|
||||
- CommonJS module mocking has been replaced through
|
||||
refactoring of tests, as ES Modules cannot be mocked
|
||||
(do yourself a favor and don't try to mock them)
|
||||
- C8 now replaces NYC as a native coverage tool
|
||||
|
||||
- 64caebaf: Migrate away from `@krlwlfrt/async-pool`
|
||||
|
||||
```ts
|
||||
import {mapAsyncLimit} from '@openstapps/collection-utils';
|
||||
|
||||
await mapAsyncLimit(
|
||||
[1, 2, 3],
|
||||
async it => {
|
||||
await someNetworkRequest(it);
|
||||
},
|
||||
5,
|
||||
);
|
||||
```
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 64caebaf: Migrated changelogs to changeset format
|
||||
|
||||
```js
|
||||
import fs from 'fs';
|
||||
|
||||
const path = 'packages/logger/CHANGELOG.md';
|
||||
|
||||
fs.writeFileSync(path, fs.readFileSync(path, 'utf8').replace(/^#+\s+\[/gm, '## ['));
|
||||
```
|
||||
|
||||
- 98546a97: Migrate away from @openstapps/configuration
|
||||
- 23481d0d: Update to TypeScript 5.1.6
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [1f62b5c5]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [23481d0d]
|
||||
- Updated dependencies [0a7e6af1]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- @openstapps/core-tools@3.0.0
|
||||
- @openstapps/logger@3.0.0
|
||||
- @openstapps/core@3.0.0
|
||||
|
||||
## 3.0.0-next.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -70,6 +70,10 @@ const config = {
|
||||
authProvider: 'paia',
|
||||
url: 'https://hds.hebis.de/paia/core',
|
||||
},
|
||||
/** TODO: idCards: {
|
||||
authProvider: 'default',
|
||||
url: 'TODO',
|
||||
} */
|
||||
},
|
||||
},
|
||||
aboutPages,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/backend",
|
||||
"description": "A reference implementation for a StApps backend",
|
||||
"version": "3.0.0-next.4",
|
||||
"version": "3.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "AGPL-3.0-only",
|
||||
|
||||
@@ -29,7 +29,7 @@ export const query: QueryDslQueryContainer = {
|
||||
should: [],
|
||||
},
|
||||
},
|
||||
weight: 1.1,
|
||||
weight: 1.05,
|
||||
},
|
||||
{
|
||||
filter: {
|
||||
@@ -42,14 +42,14 @@ export const query: QueryDslQueryContainer = {
|
||||
},
|
||||
{
|
||||
term: {
|
||||
'academicTerms.acronym.raw': 'WS 2022/23',
|
||||
'academicTerms.acronym.raw': 'WS 2023/24',
|
||||
},
|
||||
},
|
||||
],
|
||||
should: [],
|
||||
},
|
||||
},
|
||||
weight: 1.05,
|
||||
weight: 1.1,
|
||||
},
|
||||
{
|
||||
filter: {
|
||||
@@ -69,7 +69,7 @@ export const query: QueryDslQueryContainer = {
|
||||
should: [],
|
||||
},
|
||||
},
|
||||
weight: 1.1,
|
||||
weight: 1.05,
|
||||
},
|
||||
{
|
||||
filter: {
|
||||
@@ -82,14 +82,14 @@ export const query: QueryDslQueryContainer = {
|
||||
},
|
||||
{
|
||||
term: {
|
||||
'academicTerms.acronym.raw': 'WiSe 2022/23',
|
||||
'academicTerms.acronym.raw': 'WiSe 2023/24',
|
||||
},
|
||||
},
|
||||
],
|
||||
should: [],
|
||||
},
|
||||
},
|
||||
weight: 1.05,
|
||||
weight: 1.1,
|
||||
},
|
||||
{
|
||||
filter: {
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @openstapps/database
|
||||
|
||||
## 3.0.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 23481d0d: Update to TypeScript 5.1.6
|
||||
|
||||
## 3.0.0-next.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@openstapps/database",
|
||||
"version": "3.0.0-next.4",
|
||||
"version": "3.0.0",
|
||||
"private": true,
|
||||
"files": [
|
||||
"config",
|
||||
|
||||
@@ -1,5 +1,101 @@
|
||||
# @openstapps/proxy
|
||||
|
||||
## 3.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- 64caebaf: Move project to a turbo monorepo & pnpm
|
||||
|
||||
Internal dependencies are now defined using `"@openstapps/package": "workspace:*"`
|
||||
|
||||
- Removed extraneous files from packages
|
||||
- `.npmrc`
|
||||
- `.npmignore`
|
||||
- `.mailmap`
|
||||
- `.gitignore`
|
||||
- `CONTRIBUTING.md`
|
||||
- `LICENSE` (Project license file is added upon publishing, see [pnpm.io](https://pnpm.io/cli/publish))
|
||||
- `package-lock.json`
|
||||
- `.editorconfig`
|
||||
- `.eslintrc.json` (moved eslint config to `package.json`)
|
||||
- `.eslintignore`
|
||||
- `.gitlab-ci.yml` (Most workflows are workspace-level)
|
||||
- `.gitlab/**` (issue templates etc. are now workspace-level)
|
||||
- `.dockerignore` (Docker files are determined by which files are deployed with `pnpm deploy`, as per `package.json/files`)
|
||||
- TSConfig has been moved to its own package (You can now use `"extends": "@openstapps/tsconfig"`)
|
||||
- Removed ESLint and Prettier peer dependency hell by injecting them through the `.pnpmfile.cjs`
|
||||
- Added syncpack for keeping dependency versions in sync (and consistent key ordering in `package.json`)
|
||||
- Replaced conventional changelog with changesets
|
||||
- Apps with binaries now use a top level `app.js`
|
||||
|
||||
```js
|
||||
#!/usr/bin/env node
|
||||
import './lib/app.js';
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate to ESM
|
||||
|
||||
CommonJS is no longer supported in any capacity. To use the new
|
||||
version, you will need to migrate your package to ESM.
|
||||
We recommend using `tsup` and `Node 18`.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate package to Node 18
|
||||
|
||||
- Consumers of this package will need to migrate to Node 18 or
|
||||
higher.
|
||||
- Packages have been migrated from promisified `readFile` or
|
||||
`readFileSync` towards `fs/promises`
|
||||
- Packages use native `flatMap` now
|
||||
|
||||
- 64caebaf: Migrate build system to `tsup`
|
||||
|
||||
All packages now use an `index.ts` file to expose contents.
|
||||
|
||||
You will need to migrate paths from `import foo from '@scope/package/lib/foo` to `import foo from '@scope/package'`
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 64caebaf: Migrate tests to C8/Chai/Mocha
|
||||
|
||||
- `@testdeck` OOP testing has been removed.
|
||||
- Tests have been unified
|
||||
- CommonJS module mocking has been replaced through
|
||||
refactoring of tests, as ES Modules cannot be mocked
|
||||
(do yourself a favor and don't try to mock them)
|
||||
- C8 now replaces NYC as a native coverage tool
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 64caebaf: Migrated changelogs to changeset format
|
||||
|
||||
```js
|
||||
import fs from 'fs';
|
||||
|
||||
const path = 'packages/logger/CHANGELOG.md';
|
||||
|
||||
fs.writeFileSync(path, fs.readFileSync(path, 'utf8').replace(/^#+\s+\[/gm, '## ['));
|
||||
```
|
||||
|
||||
- 98546a97: Migrate away from @openstapps/configuration
|
||||
- 23481d0d: Update to TypeScript 5.1.6
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [23481d0d]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- @openstapps/logger@3.0.0
|
||||
|
||||
## 3.0.0-next.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -31,11 +31,10 @@ To Provide your own configuration file you can create a `default.json` file in t
|
||||
|
||||
## Status Codes
|
||||
|
||||
- Successfull reponses come with a `HTTP 200`
|
||||
- No version header given returns a `HTTP 300`
|
||||
- OutdatedVersions return a `HTTP 404`
|
||||
- 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`
|
||||
- Unsupported versions (not configured as outdated or active) return a `HTTP 404`
|
||||
- No version header given returns a `HTTP 300`
|
||||
|
||||
**NOTE:** The default configuration expects the client to set a version header: `X-StApps-Version=<version of app>`
|
||||
|
||||
|
||||
@@ -14,8 +14,9 @@
|
||||
* 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} */
|
||||
module.exports = {
|
||||
const configFile = {
|
||||
activeVersions: ['1\\.0\\.\\d+', '2\\.0\\.\\d+'],
|
||||
hiddenRoutes: ['/bulk'],
|
||||
logFormat: 'default',
|
||||
@@ -30,3 +31,5 @@ module.exports = {
|
||||
dhparam: '/etc/nginx/certs/dhparam.pem',
|
||||
},
|
||||
};
|
||||
|
||||
export default configFile;
|
||||
|
||||
@@ -19,15 +19,14 @@ location {{{ route }}} {
|
||||
return 300 'You have to supply a client/app version via the X-StApps-Version header!';
|
||||
}
|
||||
|
||||
# Version is unsupported by now or never existed (App/Client has to update)
|
||||
# Version is unsupported or never existed
|
||||
if ($proxyurl = unsupported) {
|
||||
{{{ cors }}}
|
||||
return 426;
|
||||
return 404;
|
||||
}
|
||||
# The version existed, but is outdated now (App/Client should update)
|
||||
# The version existed, but is outdated now (App should update)
|
||||
if ($proxyurl = outdated) {
|
||||
{{{ cors }}}
|
||||
return 426;
|
||||
return 404;
|
||||
}
|
||||
# The version is correct, but backend is not responding
|
||||
if ($proxyurl = unavailable) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/proxy",
|
||||
"description": "NGINX proxy that is dynamically configured by a Node.js script",
|
||||
"version": "3.0.0-next.4",
|
||||
"version": "3.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "AGPL-3.0-only",
|
||||
@@ -34,12 +34,10 @@
|
||||
"build": "tsup-node --dts",
|
||||
"build:docker": "docker build -t openstapps:proxy ../../.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:fix": "prettier --write . --ignore-path ../../.gitignore",
|
||||
"lint": "eslint --ext .ts src/",
|
||||
"lint:fix": "eslint --fix --ext .ts src/",
|
||||
"start": "node app.js",
|
||||
"test": "c8 mocha"
|
||||
},
|
||||
"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
|
||||
*/
|
||||
async function updateNginxConfig() {
|
||||
const containers = await getContainers(process.env.DOCKER_SOCKET);
|
||||
const containers = await getContainers();
|
||||
|
||||
const containerHash = containers
|
||||
.map((container: ContainerInfo) => {
|
||||
@@ -78,4 +78,4 @@ async function updateNginxConfig() {
|
||||
|
||||
// start the process that checks the docker socket periodically
|
||||
// eslint-disable-next-line unicorn/prefer-top-level-await
|
||||
await updateNginxConfig();
|
||||
updateNginxConfig();
|
||||
|
||||
@@ -1,5 +1,74 @@
|
||||
# @openstapps/backend-config
|
||||
|
||||
## 3.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- 64caebaf: Move project to a turbo monorepo & pnpm
|
||||
|
||||
Internal dependencies are now defined using `"@openstapps/package": "workspace:*"`
|
||||
|
||||
- Removed extraneous files from packages
|
||||
- `.npmrc`
|
||||
- `.npmignore`
|
||||
- `.mailmap`
|
||||
- `.gitignore`
|
||||
- `CONTRIBUTING.md`
|
||||
- `LICENSE` (Project license file is added upon publishing, see [pnpm.io](https://pnpm.io/cli/publish))
|
||||
- `package-lock.json`
|
||||
- `.editorconfig`
|
||||
- `.eslintrc.json` (moved eslint config to `package.json`)
|
||||
- `.eslintignore`
|
||||
- `.gitlab-ci.yml` (Most workflows are workspace-level)
|
||||
- `.gitlab/**` (issue templates etc. are now workspace-level)
|
||||
- `.dockerignore` (Docker files are determined by which files are deployed with `pnpm deploy`, as per `package.json/files`)
|
||||
- TSConfig has been moved to its own package (You can now use `"extends": "@openstapps/tsconfig"`)
|
||||
- Removed ESLint and Prettier peer dependency hell by injecting them through the `.pnpmfile.cjs`
|
||||
- Added syncpack for keeping dependency versions in sync (and consistent key ordering in `package.json`)
|
||||
- Replaced conventional changelog with changesets
|
||||
- Apps with binaries now use a top level `app.js`
|
||||
|
||||
```js
|
||||
#!/usr/bin/env node
|
||||
import './lib/app.js';
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate to ESM
|
||||
|
||||
CommonJS is no longer supported in any capacity. To use the new
|
||||
version, you will need to migrate your package to ESM.
|
||||
We recommend using `tsup` and `Node 18`.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate package to Node 18
|
||||
|
||||
- Consumers of this package will need to migrate to Node 18 or
|
||||
higher.
|
||||
- Packages have been migrated from promisified `readFile` or
|
||||
`readFileSync` towards `fs/promises`
|
||||
- Packages use native `flatMap` now
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 64caebaf: Migrate tests to C8/Chai/Mocha
|
||||
|
||||
- `@testdeck` OOP testing has been removed.
|
||||
- Tests have been unified
|
||||
- CommonJS module mocking has been replaced through
|
||||
refactoring of tests, as ES Modules cannot be mocked
|
||||
(do yourself a favor and don't try to mock them)
|
||||
- C8 now replaces NYC as a native coverage tool
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 98546a97: Migrate away from @openstapps/configuration
|
||||
- 23481d0d: Update to TypeScript 5.1.6
|
||||
|
||||
## 3.0.0-next.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/backend-config",
|
||||
"description": "Backend Configuration for OpenStApps",
|
||||
"version": "3.0.0-next.4",
|
||||
"version": "3.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
|
||||
@@ -1,5 +1,91 @@
|
||||
# @openstapps/eslint-config
|
||||
|
||||
## 3.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- 64caebaf: Move project to a turbo monorepo & pnpm
|
||||
|
||||
Internal dependencies are now defined using `"@openstapps/package": "workspace:*"`
|
||||
|
||||
- Removed extraneous files from packages
|
||||
- `.npmrc`
|
||||
- `.npmignore`
|
||||
- `.mailmap`
|
||||
- `.gitignore`
|
||||
- `CONTRIBUTING.md`
|
||||
- `LICENSE` (Project license file is added upon publishing, see [pnpm.io](https://pnpm.io/cli/publish))
|
||||
- `package-lock.json`
|
||||
- `.editorconfig`
|
||||
- `.eslintrc.json` (moved eslint config to `package.json`)
|
||||
- `.eslintignore`
|
||||
- `.gitlab-ci.yml` (Most workflows are workspace-level)
|
||||
- `.gitlab/**` (issue templates etc. are now workspace-level)
|
||||
- `.dockerignore` (Docker files are determined by which files are deployed with `pnpm deploy`, as per `package.json/files`)
|
||||
- TSConfig has been moved to its own package (You can now use `"extends": "@openstapps/tsconfig"`)
|
||||
- Removed ESLint and Prettier peer dependency hell by injecting them through the `.pnpmfile.cjs`
|
||||
- Added syncpack for keeping dependency versions in sync (and consistent key ordering in `package.json`)
|
||||
- Replaced conventional changelog with changesets
|
||||
- Apps with binaries now use a top level `app.js`
|
||||
|
||||
```js
|
||||
#!/usr/bin/env node
|
||||
import './lib/app.js';
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate to ESM
|
||||
|
||||
CommonJS is no longer supported in any capacity. To use the new
|
||||
version, you will need to migrate your package to ESM.
|
||||
We recommend using `tsup` and `Node 18`.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate package to Node 18
|
||||
|
||||
- Consumers of this package will need to migrate to Node 18 or
|
||||
higher.
|
||||
- Packages have been migrated from promisified `readFile` or
|
||||
`readFileSync` towards `fs/promises`
|
||||
- Packages use native `flatMap` now
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 64caebaf: Migrate tests to C8/Chai/Mocha
|
||||
|
||||
- `@testdeck` OOP testing has been removed.
|
||||
- Tests have been unified
|
||||
- CommonJS module mocking has been replaced through
|
||||
refactoring of tests, as ES Modules cannot be mocked
|
||||
(do yourself a favor and don't try to mock them)
|
||||
- C8 now replaces NYC as a native coverage tool
|
||||
|
||||
- 64caebaf: Update rules
|
||||
|
||||
- `unicorn/no-array-reduce` is now off
|
||||
- `unicorn/no-non-null-assertion` is now off
|
||||
- Removed prettier rules (use prettier formatting instead)
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 64caebaf: Migrated changelogs to changeset format
|
||||
|
||||
```js
|
||||
import fs from 'fs';
|
||||
|
||||
const path = 'packages/logger/CHANGELOG.md';
|
||||
|
||||
fs.writeFileSync(path, fs.readFileSync(path, 'utf8').replace(/^#+\s+\[/gm, '## ['));
|
||||
```
|
||||
|
||||
- 98546a97: Migrate away from @openstapps/configuration
|
||||
- 23481d0d: Update to TypeScript 5.1.6
|
||||
- 64caebaf: Add license header enforcement rule (unfinished)
|
||||
|
||||
## 3.0.0-next.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/eslint-config",
|
||||
"description": "A collection of configuration base files for StApps projects. Just an (unused) experiment for now.",
|
||||
"version": "3.0.0-next.4",
|
||||
"version": "3.0.0",
|
||||
"type": "commonjs",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/eslint-config.git",
|
||||
|
||||
@@ -1,5 +1,84 @@
|
||||
# @openstapps/prettier-config
|
||||
|
||||
## 3.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- 64caebaf: Move project to a turbo monorepo & pnpm
|
||||
|
||||
Internal dependencies are now defined using `"@openstapps/package": "workspace:*"`
|
||||
|
||||
- Removed extraneous files from packages
|
||||
- `.npmrc`
|
||||
- `.npmignore`
|
||||
- `.mailmap`
|
||||
- `.gitignore`
|
||||
- `CONTRIBUTING.md`
|
||||
- `LICENSE` (Project license file is added upon publishing, see [pnpm.io](https://pnpm.io/cli/publish))
|
||||
- `package-lock.json`
|
||||
- `.editorconfig`
|
||||
- `.eslintrc.json` (moved eslint config to `package.json`)
|
||||
- `.eslintignore`
|
||||
- `.gitlab-ci.yml` (Most workflows are workspace-level)
|
||||
- `.gitlab/**` (issue templates etc. are now workspace-level)
|
||||
- `.dockerignore` (Docker files are determined by which files are deployed with `pnpm deploy`, as per `package.json/files`)
|
||||
- TSConfig has been moved to its own package (You can now use `"extends": "@openstapps/tsconfig"`)
|
||||
- Removed ESLint and Prettier peer dependency hell by injecting them through the `.pnpmfile.cjs`
|
||||
- Added syncpack for keeping dependency versions in sync (and consistent key ordering in `package.json`)
|
||||
- Replaced conventional changelog with changesets
|
||||
- Apps with binaries now use a top level `app.js`
|
||||
|
||||
```js
|
||||
#!/usr/bin/env node
|
||||
import './lib/app.js';
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate to ESM
|
||||
|
||||
CommonJS is no longer supported in any capacity. To use the new
|
||||
version, you will need to migrate your package to ESM.
|
||||
We recommend using `tsup` and `Node 18`.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate package to Node 18
|
||||
|
||||
- Consumers of this package will need to migrate to Node 18 or
|
||||
higher.
|
||||
- Packages have been migrated from promisified `readFile` or
|
||||
`readFileSync` towards `fs/promises`
|
||||
- Packages use native `flatMap` now
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 64caebaf: Migrate tests to C8/Chai/Mocha
|
||||
|
||||
- `@testdeck` OOP testing has been removed.
|
||||
- Tests have been unified
|
||||
- CommonJS module mocking has been replaced through
|
||||
refactoring of tests, as ES Modules cannot be mocked
|
||||
(do yourself a favor and don't try to mock them)
|
||||
- C8 now replaces NYC as a native coverage tool
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 64caebaf: Migrated changelogs to changeset format
|
||||
|
||||
```js
|
||||
import fs from 'fs';
|
||||
|
||||
const path = 'packages/logger/CHANGELOG.md';
|
||||
|
||||
fs.writeFileSync(path, fs.readFileSync(path, 'utf8').replace(/^#+\s+\[/gm, '## ['));
|
||||
```
|
||||
|
||||
- 98546a97: Migrate away from @openstapps/configuration
|
||||
- 23481d0d: Update to TypeScript 5.1.6
|
||||
|
||||
## 3.0.0-next.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/prettier-config",
|
||||
"description": "StApps Prettier Config",
|
||||
"version": "3.0.0-next.4",
|
||||
"version": "3.0.0",
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/prettier-config.git",
|
||||
|
||||
@@ -1,5 +1,126 @@
|
||||
# @openstapps/projectmanagement
|
||||
|
||||
## 3.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- 64caebaf: Move project to a turbo monorepo & pnpm
|
||||
|
||||
Internal dependencies are now defined using `"@openstapps/package": "workspace:*"`
|
||||
|
||||
- Removed extraneous files from packages
|
||||
- `.npmrc`
|
||||
- `.npmignore`
|
||||
- `.mailmap`
|
||||
- `.gitignore`
|
||||
- `CONTRIBUTING.md`
|
||||
- `LICENSE` (Project license file is added upon publishing, see [pnpm.io](https://pnpm.io/cli/publish))
|
||||
- `package-lock.json`
|
||||
- `.editorconfig`
|
||||
- `.eslintrc.json` (moved eslint config to `package.json`)
|
||||
- `.eslintignore`
|
||||
- `.gitlab-ci.yml` (Most workflows are workspace-level)
|
||||
- `.gitlab/**` (issue templates etc. are now workspace-level)
|
||||
- `.dockerignore` (Docker files are determined by which files are deployed with `pnpm deploy`, as per `package.json/files`)
|
||||
- TSConfig has been moved to its own package (You can now use `"extends": "@openstapps/tsconfig"`)
|
||||
- Removed ESLint and Prettier peer dependency hell by injecting them through the `.pnpmfile.cjs`
|
||||
- Added syncpack for keeping dependency versions in sync (and consistent key ordering in `package.json`)
|
||||
- Replaced conventional changelog with changesets
|
||||
- Apps with binaries now use a top level `app.js`
|
||||
|
||||
```js
|
||||
#!/usr/bin/env node
|
||||
import './lib/app.js';
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate to ESM
|
||||
|
||||
CommonJS is no longer supported in any capacity. To use the new
|
||||
version, you will need to migrate your package to ESM.
|
||||
We recommend using `tsup` and `Node 18`.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate package to Node 18
|
||||
|
||||
- Consumers of this package will need to migrate to Node 18 or
|
||||
higher.
|
||||
- Packages have been migrated from promisified `readFile` or
|
||||
`readFileSync` towards `fs/promises`
|
||||
- Packages use native `flatMap` now
|
||||
|
||||
- 11c9d742: Move images to separate packages
|
||||
|
||||
Removed builder image due to migration to Kaniko
|
||||
|
||||
- 64caebaf: Migrate build system to `tsup`
|
||||
|
||||
All packages now use an `index.ts` file to expose contents.
|
||||
|
||||
You will need to migrate paths from `import foo from '@scope/package/lib/foo` to `import foo from '@scope/package'`
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 64caebaf: Migrate tests to C8/Chai/Mocha
|
||||
|
||||
- `@testdeck` OOP testing has been removed.
|
||||
- Tests have been unified
|
||||
- CommonJS module mocking has been replaced through
|
||||
refactoring of tests, as ES Modules cannot be mocked
|
||||
(do yourself a favor and don't try to mock them)
|
||||
- C8 now replaces NYC as a native coverage tool
|
||||
|
||||
- 64caebaf: Migrate away from `@krlwlfrt/async-pool`
|
||||
|
||||
```ts
|
||||
import {mapAsyncLimit} from '@openstapps/collection-utils';
|
||||
|
||||
await mapAsyncLimit(
|
||||
[1, 2, 3],
|
||||
async it => {
|
||||
await someNetworkRequest(it);
|
||||
},
|
||||
5,
|
||||
);
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate moment.js to date-fns
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 64caebaf: Migrated changelogs to changeset format
|
||||
|
||||
```js
|
||||
import fs from 'fs';
|
||||
|
||||
const path = 'packages/logger/CHANGELOG.md';
|
||||
|
||||
fs.writeFileSync(path, fs.readFileSync(path, 'utf8').replace(/^#+\s+\[/gm, '## ['));
|
||||
```
|
||||
|
||||
- 64caebaf: Moved project-docs to the [GitLab Wiki](https://gitlab.com/openstapps/openstapps/-/wikis/home) repo.
|
||||
- 98546a97: Migrate away from @openstapps/configuration
|
||||
- 4e4c7b5c: Update release configs
|
||||
- 23481d0d: Update to TypeScript 5.1.6
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [23481d0d]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- @openstapps/collection-utils@3.0.0
|
||||
- @openstapps/gitlab-api@3.0.0
|
||||
- @openstapps/logger@3.0.0
|
||||
|
||||
## 3.0.0-next.4
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/projectmanagement",
|
||||
"description": "Main documentation and scripts for maintenance.",
|
||||
"version": "3.0.0-next.4",
|
||||
"version": "3.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
|
||||
@@ -1,5 +1,74 @@
|
||||
# @openstapps/tsconfig
|
||||
|
||||
## 3.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- 64caebaf: Move project to a turbo monorepo & pnpm
|
||||
|
||||
Internal dependencies are now defined using `"@openstapps/package": "workspace:*"`
|
||||
|
||||
- Removed extraneous files from packages
|
||||
- `.npmrc`
|
||||
- `.npmignore`
|
||||
- `.mailmap`
|
||||
- `.gitignore`
|
||||
- `CONTRIBUTING.md`
|
||||
- `LICENSE` (Project license file is added upon publishing, see [pnpm.io](https://pnpm.io/cli/publish))
|
||||
- `package-lock.json`
|
||||
- `.editorconfig`
|
||||
- `.eslintrc.json` (moved eslint config to `package.json`)
|
||||
- `.eslintignore`
|
||||
- `.gitlab-ci.yml` (Most workflows are workspace-level)
|
||||
- `.gitlab/**` (issue templates etc. are now workspace-level)
|
||||
- `.dockerignore` (Docker files are determined by which files are deployed with `pnpm deploy`, as per `package.json/files`)
|
||||
- TSConfig has been moved to its own package (You can now use `"extends": "@openstapps/tsconfig"`)
|
||||
- Removed ESLint and Prettier peer dependency hell by injecting them through the `.pnpmfile.cjs`
|
||||
- Added syncpack for keeping dependency versions in sync (and consistent key ordering in `package.json`)
|
||||
- Replaced conventional changelog with changesets
|
||||
- Apps with binaries now use a top level `app.js`
|
||||
|
||||
```js
|
||||
#!/usr/bin/env node
|
||||
import './lib/app.js';
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate to ESM
|
||||
|
||||
CommonJS is no longer supported in any capacity. To use the new
|
||||
version, you will need to migrate your package to ESM.
|
||||
We recommend using `tsup` and `Node 18`.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate package to Node 18
|
||||
|
||||
- Consumers of this package will need to migrate to Node 18 or
|
||||
higher.
|
||||
- Packages have been migrated from promisified `readFile` or
|
||||
`readFileSync` towards `fs/promises`
|
||||
- Packages use native `flatMap` now
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 64caebaf: Migrate tests to C8/Chai/Mocha
|
||||
|
||||
- `@testdeck` OOP testing has been removed.
|
||||
- Tests have been unified
|
||||
- CommonJS module mocking has been replaced through
|
||||
refactoring of tests, as ES Modules cannot be mocked
|
||||
(do yourself a favor and don't try to mock them)
|
||||
- C8 now replaces NYC as a native coverage tool
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 98546a97: Migrate away from @openstapps/configuration
|
||||
- 23481d0d: Update to TypeScript 5.1.6
|
||||
|
||||
## 3.0.0-next.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/tsconfig",
|
||||
"description": "The tsconfig for the openstapps project",
|
||||
"version": "3.0.0-next.4",
|
||||
"version": "3.0.0",
|
||||
"type": "commonjs",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/eslint-config.git",
|
||||
|
||||
@@ -1,5 +1,123 @@
|
||||
# @openstapps/minimal-connector
|
||||
|
||||
## 3.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- 64caebaf: Move project to a turbo monorepo & pnpm
|
||||
|
||||
Internal dependencies are now defined using `"@openstapps/package": "workspace:*"`
|
||||
|
||||
- Removed extraneous files from packages
|
||||
- `.npmrc`
|
||||
- `.npmignore`
|
||||
- `.mailmap`
|
||||
- `.gitignore`
|
||||
- `CONTRIBUTING.md`
|
||||
- `LICENSE` (Project license file is added upon publishing, see [pnpm.io](https://pnpm.io/cli/publish))
|
||||
- `package-lock.json`
|
||||
- `.editorconfig`
|
||||
- `.eslintrc.json` (moved eslint config to `package.json`)
|
||||
- `.eslintignore`
|
||||
- `.gitlab-ci.yml` (Most workflows are workspace-level)
|
||||
- `.gitlab/**` (issue templates etc. are now workspace-level)
|
||||
- `.dockerignore` (Docker files are determined by which files are deployed with `pnpm deploy`, as per `package.json/files`)
|
||||
- TSConfig has been moved to its own package (You can now use `"extends": "@openstapps/tsconfig"`)
|
||||
- Removed ESLint and Prettier peer dependency hell by injecting them through the `.pnpmfile.cjs`
|
||||
- Added syncpack for keeping dependency versions in sync (and consistent key ordering in `package.json`)
|
||||
- Replaced conventional changelog with changesets
|
||||
- Apps with binaries now use a top level `app.js`
|
||||
|
||||
```js
|
||||
#!/usr/bin/env node
|
||||
import './lib/app.js';
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate to ESM
|
||||
|
||||
CommonJS is no longer supported in any capacity. To use the new
|
||||
version, you will need to migrate your package to ESM.
|
||||
We recommend using `tsup` and `Node 18`.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate package to Node 18
|
||||
|
||||
- Consumers of this package will need to migrate to Node 18 or
|
||||
higher.
|
||||
- Packages have been migrated from promisified `readFile` or
|
||||
`readFileSync` towards `fs/promises`
|
||||
- Packages use native `flatMap` now
|
||||
|
||||
- 64caebaf: Migrate build system to `tsup`
|
||||
|
||||
All packages now use an `index.ts` file to expose contents.
|
||||
|
||||
You will need to migrate paths from `import foo from '@scope/package/lib/foo` to `import foo from '@scope/package'`
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 64caebaf: Migrate tests to C8/Chai/Mocha
|
||||
|
||||
- `@testdeck` OOP testing has been removed.
|
||||
- Tests have been unified
|
||||
- CommonJS module mocking has been replaced through
|
||||
refactoring of tests, as ES Modules cannot be mocked
|
||||
(do yourself a favor and don't try to mock them)
|
||||
- C8 now replaces NYC as a native coverage tool
|
||||
|
||||
- 64caebaf: Migrate away from `@krlwlfrt/async-pool`
|
||||
|
||||
```ts
|
||||
import {mapAsyncLimit} from '@openstapps/collection-utils';
|
||||
|
||||
await mapAsyncLimit(
|
||||
[1, 2, 3],
|
||||
async it => {
|
||||
await someNetworkRequest(it);
|
||||
},
|
||||
5,
|
||||
);
|
||||
```
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 64caebaf: Migrated changelogs to changeset format
|
||||
|
||||
```js
|
||||
import fs from 'fs';
|
||||
|
||||
const path = 'packages/logger/CHANGELOG.md';
|
||||
|
||||
fs.writeFileSync(path, fs.readFileSync(path, 'utf8').replace(/^#+\s+\[/gm, '## ['));
|
||||
```
|
||||
|
||||
- 98546a97: Migrate away from @openstapps/configuration
|
||||
- 23481d0d: Update to TypeScript 5.1.6
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [1f62b5c5]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [23481d0d]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [0a7e6af1]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- @openstapps/api@3.0.0
|
||||
- @openstapps/logger@3.0.0
|
||||
- @openstapps/core@3.0.0
|
||||
|
||||
## 3.0.0-next.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/minimal-connector",
|
||||
"description": "This is a minimal connector which serves as an example",
|
||||
"version": "3.0.0-next.4",
|
||||
"version": "3.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @openstapps/minimal-deployment
|
||||
|
||||
## 3.0.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 23481d0d: Update to TypeScript 5.1.6
|
||||
|
||||
## 3.0.0-next.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
version: '3.7'
|
||||
services:
|
||||
database:
|
||||
image: registry.gitlab.com/openstapps/openstapps/database:3.0.0-next.4
|
||||
image: registry.gitlab.com/openstapps/openstapps/database:2.0.0
|
||||
volumes:
|
||||
- ./database:/usr/share/elasticsearch/data
|
||||
expose:
|
||||
@@ -9,7 +9,7 @@ services:
|
||||
restart: unless-stopped
|
||||
|
||||
backend:
|
||||
image: registry.gitlab.com/openstapps/openstapps/backend:3.0.0-next.4
|
||||
image: registry.gitlab.com/openstapps/openstapps/backend:3.0.0-next.0
|
||||
environment:
|
||||
ES_ADDR: "http://database:9200"
|
||||
NODE_CONFIG_ENV: "elasticsearch"
|
||||
@@ -27,17 +27,17 @@ services:
|
||||
- database
|
||||
|
||||
api:
|
||||
image: registry.gitlab.com/openstapps/openstapps/api:3.0.0-next.4
|
||||
image: registry.gitlab.com/openstapps/openstapps/api:3.0.0-next.0
|
||||
links:
|
||||
- "backend"
|
||||
|
||||
minimal-connector:
|
||||
image: registry.gitlab.com/openstapps/openstapps/minimal-connector:3.0.0-next.4
|
||||
image: registry.gitlab.com/openstapps/minimal-connector:core-0.23
|
||||
container_name: minimal-connector-0.23
|
||||
command: ["http://backend:3000", "minimal-connector", "f-u"]
|
||||
|
||||
app:
|
||||
image: registry.gitlab.com/openstapps/openstapps/app:3.0.0-next.4
|
||||
image: registry.gitlab.com/openstapps/app/executable:core-0.23
|
||||
expose:
|
||||
- 8100
|
||||
ports:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@openstapps/minimal-deployment",
|
||||
"version": "3.0.0-next.4",
|
||||
"version": "3.0.0",
|
||||
"private": true,
|
||||
"files": [
|
||||
"database",
|
||||
|
||||
@@ -1,5 +1,129 @@
|
||||
# @openstapps/minimal-plugin
|
||||
|
||||
## 3.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- 64caebaf: Move project to a turbo monorepo & pnpm
|
||||
|
||||
Internal dependencies are now defined using `"@openstapps/package": "workspace:*"`
|
||||
|
||||
- Removed extraneous files from packages
|
||||
- `.npmrc`
|
||||
- `.npmignore`
|
||||
- `.mailmap`
|
||||
- `.gitignore`
|
||||
- `CONTRIBUTING.md`
|
||||
- `LICENSE` (Project license file is added upon publishing, see [pnpm.io](https://pnpm.io/cli/publish))
|
||||
- `package-lock.json`
|
||||
- `.editorconfig`
|
||||
- `.eslintrc.json` (moved eslint config to `package.json`)
|
||||
- `.eslintignore`
|
||||
- `.gitlab-ci.yml` (Most workflows are workspace-level)
|
||||
- `.gitlab/**` (issue templates etc. are now workspace-level)
|
||||
- `.dockerignore` (Docker files are determined by which files are deployed with `pnpm deploy`, as per `package.json/files`)
|
||||
- TSConfig has been moved to its own package (You can now use `"extends": "@openstapps/tsconfig"`)
|
||||
- Removed ESLint and Prettier peer dependency hell by injecting them through the `.pnpmfile.cjs`
|
||||
- Added syncpack for keeping dependency versions in sync (and consistent key ordering in `package.json`)
|
||||
- Replaced conventional changelog with changesets
|
||||
- Apps with binaries now use a top level `app.js`
|
||||
|
||||
```js
|
||||
#!/usr/bin/env node
|
||||
import './lib/app.js';
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate to ESM
|
||||
|
||||
CommonJS is no longer supported in any capacity. To use the new
|
||||
version, you will need to migrate your package to ESM.
|
||||
We recommend using `tsup` and `Node 18`.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate package to Node 18
|
||||
|
||||
- Consumers of this package will need to migrate to Node 18 or
|
||||
higher.
|
||||
- Packages have been migrated from promisified `readFile` or
|
||||
`readFileSync` towards `fs/promises`
|
||||
- Packages use native `flatMap` now
|
||||
|
||||
- 64caebaf: Migrate build system to `tsup`
|
||||
|
||||
All packages now use an `index.ts` file to expose contents.
|
||||
|
||||
You will need to migrate paths from `import foo from '@scope/package/lib/foo` to `import foo from '@scope/package'`
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 64caebaf: Migrate tests to C8/Chai/Mocha
|
||||
|
||||
- `@testdeck` OOP testing has been removed.
|
||||
- Tests have been unified
|
||||
- CommonJS module mocking has been replaced through
|
||||
refactoring of tests, as ES Modules cannot be mocked
|
||||
(do yourself a favor and don't try to mock them)
|
||||
- C8 now replaces NYC as a native coverage tool
|
||||
|
||||
- 64caebaf: Migrate away from `@krlwlfrt/async-pool`
|
||||
|
||||
```ts
|
||||
import {mapAsyncLimit} from '@openstapps/collection-utils';
|
||||
|
||||
await mapAsyncLimit(
|
||||
[1, 2, 3],
|
||||
async it => {
|
||||
await someNetworkRequest(it);
|
||||
},
|
||||
5,
|
||||
);
|
||||
```
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 64caebaf: Migrated changelogs to changeset format
|
||||
|
||||
```js
|
||||
import fs from 'fs';
|
||||
|
||||
const path = 'packages/logger/CHANGELOG.md';
|
||||
|
||||
fs.writeFileSync(path, fs.readFileSync(path, 'utf8').replace(/^#+\s+\[/gm, '## ['));
|
||||
```
|
||||
|
||||
- 98546a97: Migrate away from @openstapps/configuration
|
||||
- 23481d0d: Update to TypeScript 5.1.6
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [1f62b5c5]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [23481d0d]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [0a7e6af1]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- @openstapps/core-tools@3.0.0
|
||||
- @openstapps/api-plugin@3.0.0
|
||||
- @openstapps/api@3.0.0
|
||||
- @openstapps/logger@3.0.0
|
||||
- @openstapps/core@3.0.0
|
||||
|
||||
## 3.0.0-next.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/minimal-plugin",
|
||||
"description": "Minimal Plugin",
|
||||
"version": "3.0.0-next.4",
|
||||
"version": "3.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
|
||||
2
frontend/app/.gitignore
vendored
2
frontend/app/.gitignore
vendored
@@ -44,3 +44,5 @@ UserInterfaceState.xcuserstate
|
||||
|
||||
docs
|
||||
bundle-info.html
|
||||
|
||||
.browser-data/
|
||||
|
||||
@@ -1,5 +1,145 @@
|
||||
# @openstapps/app
|
||||
|
||||
## 3.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- 23481d0d: Update to Angular 16.1
|
||||
- 64caebaf: Move project to a turbo monorepo & pnpm
|
||||
|
||||
Internal dependencies are now defined using `"@openstapps/package": "workspace:*"`
|
||||
|
||||
- Removed extraneous files from packages
|
||||
- `.npmrc`
|
||||
- `.npmignore`
|
||||
- `.mailmap`
|
||||
- `.gitignore`
|
||||
- `CONTRIBUTING.md`
|
||||
- `LICENSE` (Project license file is added upon publishing, see [pnpm.io](https://pnpm.io/cli/publish))
|
||||
- `package-lock.json`
|
||||
- `.editorconfig`
|
||||
- `.eslintrc.json` (moved eslint config to `package.json`)
|
||||
- `.eslintignore`
|
||||
- `.gitlab-ci.yml` (Most workflows are workspace-level)
|
||||
- `.gitlab/**` (issue templates etc. are now workspace-level)
|
||||
- `.dockerignore` (Docker files are determined by which files are deployed with `pnpm deploy`, as per `package.json/files`)
|
||||
- TSConfig has been moved to its own package (You can now use `"extends": "@openstapps/tsconfig"`)
|
||||
- Removed ESLint and Prettier peer dependency hell by injecting them through the `.pnpmfile.cjs`
|
||||
- Added syncpack for keeping dependency versions in sync (and consistent key ordering in `package.json`)
|
||||
- Replaced conventional changelog with changesets
|
||||
- Apps with binaries now use a top level `app.js`
|
||||
|
||||
```js
|
||||
#!/usr/bin/env node
|
||||
import './lib/app.js';
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate to ESM
|
||||
|
||||
CommonJS is no longer supported in any capacity. To use the new
|
||||
version, you will need to migrate your package to ESM.
|
||||
We recommend using `tsup` and `Node 18`.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate package to Node 18
|
||||
|
||||
- Consumers of this package will need to migrate to Node 18 or
|
||||
higher.
|
||||
- Packages have been migrated from promisified `readFile` or
|
||||
`readFileSync` towards `fs/promises`
|
||||
- Packages use native `flatMap` now
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- f2c4ee30: Detail views now won't load data again if it is being navigated to from a list item
|
||||
- e1cc33bb: Added the ability to remove and add date series from their detail page
|
||||
- 64caebaf: Migrate tests to C8/Chai/Mocha
|
||||
|
||||
- `@testdeck` OOP testing has been removed.
|
||||
- Tests have been unified
|
||||
- CommonJS module mocking has been replaced through
|
||||
refactoring of tests, as ES Modules cannot be mocked
|
||||
(do yourself a favor and don't try to mock them)
|
||||
- C8 now replaces NYC as a native coverage tool
|
||||
|
||||
- 1f62b5c5: Add support for web-service-provided id cards on the profile page
|
||||
- a5c9d220: Add directions to inPlace and place list items
|
||||
- e1cc33bb: Improved calendar descriptions
|
||||
|
||||
- The dashboard quick link now has a more intuitive icon
|
||||
- "Recurring" has been renamed to "Week Overview"
|
||||
- Long words in calendar tabs will now break instead of overflowing
|
||||
|
||||
- 001f978b: Revamp "My Courses" section on profile page
|
||||
|
||||
The "My Courses" section on the profile page has been improved
|
||||
|
||||
- It will now show the upcoming courses for the next five days
|
||||
- The section header is now consistent with the other sections
|
||||
- The section now uses standard list items instead of the custom solution
|
||||
|
||||
Additionally, the profile page component has been cleaned up.
|
||||
|
||||
- a5c9d220: Adjust map button and item behavior on different screen sizes
|
||||
|
||||
- Small screens will show the item without margins below the map actions
|
||||
- Large screens will show the list item on the left side
|
||||
|
||||
- 23481d0d: Migrate to Ionic 7
|
||||
|
||||
- Migrate uses of `<ion-label>` with inputs to new syntax
|
||||
- Fix infinite loop in schedule date picker (`datetime.confirm()` to `datetime.cancel()`)
|
||||
|
||||
- 64caebaf: Migrate away from JIT compilation
|
||||
- a5c9d220: Map items are now native list items
|
||||
- e1cc33bb: Replaced simple links with list items in date-series detail
|
||||
- 001f978b: Use event title for date series instead of the generic date series title
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- a99e08cd: Refactored Opening Hours
|
||||
|
||||
- Migrated Opening Hours to use OnPush change detection
|
||||
- Fixed a bug where opening hours would not update correctly
|
||||
- Lazy-load opening hours module to keep it out of the main bundle
|
||||
- Added e2e tests to verify functionality
|
||||
- Changed live update status to show exact minutes starting one hour before the next change
|
||||
|
||||
- bd09b366: Use observable chains instead of change detection in the rating component
|
||||
- 001f978b: Add a way to hide action chips on list items
|
||||
- e0b7e616: Fixed distance not updating in list items
|
||||
- b210e0d9: Change leaflet tiles to be inverted as a whole
|
||||
- 98546a97: Migrate away from @openstapps/configuration
|
||||
- 23481d0d: Update to TypeScript 5.1.6
|
||||
- bebee6b4: Migrate collection helpers to use @openstapps/collection-utils
|
||||
- 3c49c4cf: Fixed an issue that caused double and triple loading of data detail items through the route stack service
|
||||
- 107a7c5e: Migrate unit tests to karma-coverage and junit reports.
|
||||
Fixes an issue where coverage reports would not be generated.
|
||||
- 1f62b5c5: Make section swiper buttons reactive
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [1f62b5c5]
|
||||
- Updated dependencies [98546a97]
|
||||
- Updated dependencies [23481d0d]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [0a7e6af1]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- Updated dependencies [64caebaf]
|
||||
- @openstapps/api@3.0.0
|
||||
- @openstapps/collection-utils@3.0.0
|
||||
- @openstapps/core@3.0.0
|
||||
|
||||
## 3.0.0-next.4
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -52,6 +52,44 @@ All the npm scripts are defined in `package.json` [file](package.json). It is re
|
||||
|
||||
## 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
|
||||
|
||||
Install the npm packages needed for running the app (as for any other node project which uses npm):
|
||||
|
||||
@@ -11,6 +11,7 @@ apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
|
||||
dependencies {
|
||||
implementation project(':capacitor-app')
|
||||
implementation project(':capacitor-browser')
|
||||
implementation project(':capacitor-clipboard')
|
||||
implementation project(':capacitor-device')
|
||||
implementation project(':capacitor-dialog')
|
||||
implementation project(':capacitor-filesystem')
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
"pkg": "@capacitor/browser",
|
||||
"classpath": "com.capacitorjs.plugins.browser.BrowserPlugin"
|
||||
},
|
||||
{
|
||||
"pkg": "@capacitor/clipboard",
|
||||
"classpath": "com.capacitorjs.plugins.clipboard.ClipboardPlugin"
|
||||
},
|
||||
{
|
||||
"pkg": "@capacitor/device",
|
||||
"classpath": "com.capacitorjs.plugins.device.DevicePlugin"
|
||||
|
||||
@@ -8,6 +8,9 @@ project(':capacitor-app').projectDir = new File('../../../node_modules/.pnpm/@ca
|
||||
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')
|
||||
|
||||
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'
|
||||
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",
|
||||
"description": "The generic app tailored to fulfill needs of German universities, written using Ionic Framework.",
|
||||
"version": "3.0.0-next.4",
|
||||
"version": "3.0.0",
|
||||
"private": true,
|
||||
"license": "GPL-3.0-only",
|
||||
"author": "Karl-Philipp Wulfert <krlwlfrt@gmail.com>",
|
||||
@@ -22,6 +22,7 @@
|
||||
"build:stats": "ng build --configuration=production --stats-json",
|
||||
"changelog": "conventional-changelog -p angular -i src/assets/about/CHANGELOG.md -s -r 0",
|
||||
"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: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\"",
|
||||
@@ -92,7 +93,6 @@
|
||||
"capacitor-secure-storage-plugin": "0.8.1",
|
||||
"cordova-plugin-calendar": "5.1.6",
|
||||
"date-fns": "2.30.0",
|
||||
"ngx-date-fns": "10.0.1",
|
||||
"deepmerge": "4.3.1",
|
||||
"form-data": "4.0.0",
|
||||
"geojson": "0.5.0",
|
||||
@@ -102,6 +102,7 @@
|
||||
"leaflet.markercluster": "1.5.3",
|
||||
"material-symbols": "0.10.0",
|
||||
"moment": "2.29.4",
|
||||
"ngx-date-fns": "10.0.1",
|
||||
"ngx-logger": "5.0.12",
|
||||
"ngx-markdown": "16.0.0",
|
||||
"ngx-moment": "6.0.2",
|
||||
|
||||
19
frontend/app/src/app/_helpers/ts-logger.ts
Normal file
19
frontend/app/src/app/_helpers/ts-logger.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* 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,13 +21,17 @@ import {RouteReuseStrategy} from '@angular/router';
|
||||
import {IonicModule, IonicRouteStrategy, Platform} from '@ionic/angular';
|
||||
import {TranslateLoader, TranslateModule, TranslateService} from '@ngx-translate/core';
|
||||
import {TranslateHttpLoader} from '@ngx-translate/http-loader';
|
||||
import moment from 'moment';
|
||||
import 'moment/min/locales';
|
||||
import {LoggerModule, NgxLoggerLevel} from 'ngx-logger';
|
||||
import {LoggerModule, NGXLogger, NgxLoggerLevel} from 'ngx-logger';
|
||||
import SwiperCore, {FreeMode, Navigation} from 'swiper';
|
||||
|
||||
import {environment} from '../environments/environment';
|
||||
import {AppRoutingModule} from './app-routing.module';
|
||||
import {AppComponent} from './app.component';
|
||||
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 {DataModule} from './modules/data/data.module';
|
||||
import {HebisModule} from './modules/hebis/hebis.module';
|
||||
@@ -36,9 +40,11 @@ import {MenuModule} from './modules/menu/menu.module';
|
||||
import {NewsModule} from './modules/news/news.module';
|
||||
import {ScheduleModule} from './modules/schedule/schedule.module';
|
||||
import {SettingsModule} from './modules/settings/settings.module';
|
||||
import {SettingsProvider} from './modules/settings/settings.provider';
|
||||
import {StorageModule} from './modules/storage/storage.module';
|
||||
import {ThingTranslateModule} from './translation/thing-translate.module';
|
||||
import {UtilModule} from './util/util.module';
|
||||
import {initLogger} from './_helpers/ts-logger';
|
||||
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
|
||||
import {AboutModule} from './modules/about/about.module';
|
||||
import {FavoritesModule} from './modules/favorites/favorites.module';
|
||||
@@ -48,22 +54,80 @@ import {DebugDataCollectorService} from './modules/data/debug-data-collector.ser
|
||||
import {AuthModule} from './modules/auth/auth.module';
|
||||
import {BackgroundModule} from './modules/background/background.module';
|
||||
import {LibraryModule} from './modules/library/library.module';
|
||||
import {StorageProvider} from './modules/storage/storage.provider';
|
||||
import {AssessmentsModule} from './modules/assessments/assessments.module';
|
||||
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 {NavigationModule} from './modules/menu/navigation/navigation.module';
|
||||
import {browserFactory, SimpleBrowser} from './util/browser.factory';
|
||||
import {ConfigProvider} from './modules/config/config.provider';
|
||||
import {SettingsProvider} from './modules/settings/settings.provider';
|
||||
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';
|
||||
import {getDateFnsLocale} from './translation/dfns-locale';
|
||||
import {setDefaultOptions} from 'date-fns';
|
||||
import {DateFnsConfigurationService} from 'ngx-date-fns';
|
||||
|
||||
registerLocaleData(localeDe);
|
||||
|
||||
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({
|
||||
bootstrap: [AppComponent],
|
||||
declarations: [AppComponent],
|
||||
@@ -77,6 +141,7 @@ SwiperCore.use([FreeMode, Navigation]);
|
||||
BrowserAnimationsModule,
|
||||
CatalogModule,
|
||||
CommonModule,
|
||||
ConfigModule,
|
||||
DashboardModule,
|
||||
DataModule,
|
||||
HebisModule,
|
||||
@@ -100,9 +165,7 @@ SwiperCore.use([FreeMode, Navigation]);
|
||||
loader: {
|
||||
deps: [HttpClient],
|
||||
provide: TranslateLoader,
|
||||
useFactory(http: HttpClient) {
|
||||
return new TranslateHttpLoader(http, './assets/i18n/', '.json');
|
||||
},
|
||||
useFactory: createTranslateLoader,
|
||||
},
|
||||
}),
|
||||
UtilModule,
|
||||
@@ -112,30 +175,6 @@ SwiperCore.use([FreeMode, Navigation]);
|
||||
}),
|
||||
],
|
||||
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,
|
||||
useClass: IonicRouteStrategy,
|
||||
@@ -149,6 +188,22 @@ SwiperCore.use([FreeMode, Navigation]);
|
||||
useFactory: browserFactory,
|
||||
deps: [Platform],
|
||||
},
|
||||
{
|
||||
provide: APP_INITIALIZER,
|
||||
multi: true,
|
||||
deps: [
|
||||
StorageProvider,
|
||||
NGXLogger,
|
||||
SettingsProvider,
|
||||
ConfigProvider,
|
||||
TranslateService,
|
||||
RoutingStackService,
|
||||
DefaultAuthService,
|
||||
PAIAAuthService,
|
||||
DateFnsConfigurationService,
|
||||
],
|
||||
useFactory: initializerFactory,
|
||||
},
|
||||
{
|
||||
provide: HTTP_INTERCEPTORS,
|
||||
useClass: ServiceHandlerInterceptor,
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
/**
|
||||
* 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,9 +14,10 @@
|
||||
*/
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {SCAboutPage} from '@openstapps/core';
|
||||
import packageJson from '../../../../../package.json';
|
||||
import {SCAboutPage, SCAppConfiguration} from '@openstapps/core';
|
||||
import {ConfigProvider} from '../../config/config.provider';
|
||||
import packageJson from '../../../../../package.json';
|
||||
import config from 'capacitor.config';
|
||||
|
||||
@Component({
|
||||
selector: 'about-page',
|
||||
@@ -26,12 +27,15 @@ import {ConfigProvider} from '../../config/config.provider';
|
||||
export class AboutPageComponent implements OnInit {
|
||||
content: SCAboutPage;
|
||||
|
||||
appName = config.appName;
|
||||
|
||||
version = packageJson.version;
|
||||
|
||||
constructor(readonly route: ActivatedRoute, readonly config: ConfigProvider) {}
|
||||
constructor(private readonly route: ActivatedRoute, private readonly configProvider: ConfigProvider) {}
|
||||
|
||||
ngOnInit() {
|
||||
async ngOnInit() {
|
||||
const route = this.route.snapshot.url.map(it => it.path).join('/');
|
||||
this.content = this.config.app.aboutPages[route] ?? {};
|
||||
this.content =
|
||||
(this.configProvider.getValue('aboutPages') as SCAppConfiguration['aboutPages'])[route] ?? {};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content parallax *ngIf="content">
|
||||
<ion-text>{{ config.app.name }} v{{ version }}</ion-text>
|
||||
<ion-text>{{ appName }} v{{ version }}</ion-text>
|
||||
<div class="page-content">
|
||||
<about-page-content *ngFor="let element of content.content" [content]="element"></about-page-content>
|
||||
</div>
|
||||
|
||||
@@ -19,6 +19,7 @@ import {FormsModule} from '@angular/forms';
|
||||
import {IonicModule} from '@ionic/angular';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {ThingTranslateModule} from '../../translation/thing-translate.module';
|
||||
import {ConfigProvider} from '../config/config.provider';
|
||||
import {AboutPageComponent} from './about-page/about-page.component';
|
||||
import {MarkdownModule} from 'ngx-markdown';
|
||||
import {AboutPageContentComponent} from './about-page/about-page-content.component';
|
||||
@@ -63,5 +64,6 @@ const settingsRoutes: Routes = [
|
||||
ScrollingModule,
|
||||
UtilModule,
|
||||
],
|
||||
providers: [ConfigProvider],
|
||||
})
|
||||
export class AboutModule {}
|
||||
|
||||
@@ -13,12 +13,11 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Injectable} from '@angular/core';
|
||||
import {ConfigProvider} from '../config/config.provider';
|
||||
import {SCAssessment, SCUuid} from '@openstapps/core';
|
||||
import {DefaultAuthService} from '../auth/default-auth.service';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import {uniqBy, keyBy} from '@openstapps/collection-utils';
|
||||
import {firstValueFrom} from 'rxjs';
|
||||
import {ConfigProvider} from '../config/config.provider';
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -66,7 +65,7 @@ export class AssessmentsProvider {
|
||||
cacheMaxAge = 15 * 60 * 1000;
|
||||
|
||||
constructor(
|
||||
readonly config: ConfigProvider,
|
||||
readonly configProvider: ConfigProvider,
|
||||
readonly defaultAuth: DefaultAuthService,
|
||||
readonly http: HttpClient,
|
||||
) {}
|
||||
@@ -92,20 +91,21 @@ export class AssessmentsProvider {
|
||||
return this.cache;
|
||||
}
|
||||
|
||||
const url = this.config.app.features.extern?.hisometry.url;
|
||||
const url = this.configProvider.config.app.features.extern?.hisometry.url;
|
||||
if (!url) throw new Error('Config lacks url for hisometry');
|
||||
|
||||
this.cache = firstValueFrom(
|
||||
this.http.get<{data: SCAssessment[]}>(`${url}/${this.assessmentPath}`, {
|
||||
this.cache = this.http
|
||||
.get<{data: SCAssessment[]}>(`${url}/${this.assessmentPath}`, {
|
||||
headers: {
|
||||
Authorization: `Bearer ${accessToken ?? (await this.defaultAuth.getValidToken()).accessToken}`,
|
||||
},
|
||||
}),
|
||||
).then(it => {
|
||||
this.cacheTimestamp = Date.now();
|
||||
})
|
||||
.toPromise()
|
||||
.then(it => {
|
||||
this.cacheTimestamp = Date.now();
|
||||
|
||||
return it?.data ?? [];
|
||||
});
|
||||
return it?.data ?? [];
|
||||
});
|
||||
this.assessments = this.cache.then(toAssessmentMap);
|
||||
|
||||
return this.cache;
|
||||
|
||||
@@ -12,18 +12,24 @@
|
||||
* 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 {Injectable} from '@angular/core';
|
||||
import {IPAIAAuthAction} from './paia/paia-auth-action';
|
||||
import {AuthActions, IAuthAction} from 'ionic-appauth';
|
||||
import {TranslateService} from '@ngx-translate/core';
|
||||
import {JSONPath} from 'jsonpath-plus';
|
||||
import {SCAuthorizationProviderType, SCUserConfiguration, SCUserConfigurationMap} from '@openstapps/core';
|
||||
import {
|
||||
SCAuthorizationProvider,
|
||||
SCAuthorizationProviderType,
|
||||
SCUserConfiguration,
|
||||
SCUserConfigurationMap,
|
||||
} from '@openstapps/core';
|
||||
import {ConfigProvider} from '../config/config.provider';
|
||||
import {StorageProvider} from '../storage/storage.provider';
|
||||
import {DefaultAuthService} from './default-auth.service';
|
||||
import {PAIAAuthService} from './paia/paia-auth.service';
|
||||
import {SimpleBrowser} from '../../util/browser.factory';
|
||||
import {AlertController} from '@ionic/angular';
|
||||
import {ConfigProvider} from '../config/config.provider';
|
||||
|
||||
const AUTH_ORIGIN_PATH = 'stapps.auth.origin_path';
|
||||
|
||||
@@ -31,19 +37,23 @@ const AUTH_ORIGIN_PATH = 'stapps.auth.origin_path';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class AuthHelperService {
|
||||
get userConfigurationMap(): SCUserConfigurationMap {
|
||||
return this.config.auth.default!.endpoints.mapping;
|
||||
}
|
||||
userConfigurationMap: SCUserConfigurationMap;
|
||||
|
||||
constructor(
|
||||
private translateService: TranslateService,
|
||||
private configProvider: ConfigProvider,
|
||||
private storageProvider: StorageProvider,
|
||||
private defaultAuth: DefaultAuthService,
|
||||
private paiaAuth: PAIAAuthService,
|
||||
private browser: SimpleBrowser,
|
||||
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) {
|
||||
let message: string | undefined;
|
||||
|
||||
@@ -175,7 +175,7 @@ export abstract class AuthService implements IAuthService {
|
||||
|
||||
public async init() {
|
||||
this.setupAuthorizationNotifier();
|
||||
await this.loadTokenFromStorage();
|
||||
this.loadTokenFromStorage();
|
||||
this.addActionObserver(this._actionHistory);
|
||||
this.addActionObserver(this._session);
|
||||
}
|
||||
|
||||
@@ -12,26 +12,29 @@
|
||||
* 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 {
|
||||
AuthorizationRequestHandler,
|
||||
AuthorizationServiceConfiguration,
|
||||
JQueryRequestor,
|
||||
LocalStorageBackend,
|
||||
Requestor,
|
||||
StorageBackend,
|
||||
TokenRequestHandler,
|
||||
} from '@openid/appauth';
|
||||
import {AuthActionBuilder, DefaultBrowser, EndSessionHandler, UserInfoHandler} from 'ionic-appauth';
|
||||
import {AuthActionBuilder, Browser, 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 {Injectable} from '@angular/core';
|
||||
import {AuthService} from './auth.service';
|
||||
import {ConfigProvider} from '../config/config.provider';
|
||||
import {BeforeAppInit} from '../../before-app-init';
|
||||
|
||||
const TOKEN_RESPONSE_KEY = 'token_response';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class DefaultAuthService extends AuthService implements BeforeAppInit {
|
||||
export class DefaultAuthService extends AuthService {
|
||||
public localConfiguration: AuthorizationServiceConfiguration;
|
||||
|
||||
protected tokenHandler: TokenRequestHandler;
|
||||
@@ -42,17 +45,13 @@ export class DefaultAuthService extends AuthService implements BeforeAppInit {
|
||||
|
||||
protected endSessionHandler: EndSessionHandler;
|
||||
|
||||
constructor(private config: ConfigProvider) {
|
||||
super(new DefaultBrowser(), new LocalStorageBackend(), new JQueryRequestor());
|
||||
}
|
||||
|
||||
async beforeAppInit() {
|
||||
this.authConfig = getClientConfig('default', this.config.auth);
|
||||
this.localConfiguration = new AuthorizationServiceConfiguration(
|
||||
getEndpointsConfig('default', this.config.auth),
|
||||
);
|
||||
|
||||
await super.init();
|
||||
constructor(
|
||||
protected browser: Browser = new DefaultBrowser(),
|
||||
protected storage: StorageBackend = new LocalStorageBackend(),
|
||||
protected requestor: Requestor = new JQueryRequestor(),
|
||||
private readonly configProvider: ConfigProvider,
|
||||
) {
|
||||
super(browser, storage, requestor);
|
||||
}
|
||||
|
||||
get configuration(): Promise<AuthorizationServiceConfiguration> {
|
||||
@@ -61,6 +60,22 @@ export class DefaultAuthService extends AuthService implements BeforeAppInit {
|
||||
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() {
|
||||
await this.revokeTokens().catch(error => {
|
||||
this.notifyActionListers(AuthActionBuilder.SignOutFailed(error));
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
* 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 {
|
||||
AuthorizationError,
|
||||
AuthorizationRequest,
|
||||
@@ -46,10 +47,10 @@ import {PAIAAuthorizationResponse} from './paia-authorization-response';
|
||||
import {PAIAAuthorizationNotifier} from './paia-authorization-notifier';
|
||||
import {PAIATokenResponse} from './paia-token-response';
|
||||
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 {Injectable} from '@angular/core';
|
||||
import {ConfigProvider} from '../../config/config.provider';
|
||||
import {BeforeAppInit} from '../../../before-app-init';
|
||||
|
||||
const TOKEN_RESPONSE_KEY = 'paia_token_response';
|
||||
const AUTH_EXPIRY_BUFFER = 10 * 60 * -1; // 10 minutes in seconds
|
||||
@@ -63,8 +64,10 @@ export interface IAuthService {
|
||||
getValidToken(buffer?: number): Promise<PAIATokenResponse>;
|
||||
}
|
||||
|
||||
@Injectable({providedIn: 'root'})
|
||||
export class PAIAAuthService implements BeforeAppInit {
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class PAIAAuthService {
|
||||
private _authConfig?: IAuthConfig;
|
||||
|
||||
private _authSubject: AuthSubject = new AuthSubject();
|
||||
@@ -94,7 +97,7 @@ export class PAIAAuthService implements BeforeAppInit {
|
||||
protected browser: Browser = new DefaultBrowser(),
|
||||
protected storage: StorageBackend = new LocalStorageBackend(),
|
||||
protected requestor: Requestor = new JQueryRequestor(),
|
||||
private config: ConfigProvider,
|
||||
private readonly configProvider: ConfigProvider,
|
||||
) {
|
||||
this.tokenHandler = new PAIATokenRequestHandler(requestor);
|
||||
this.userInfoHandler = new IonicUserInfoHandler(requestor);
|
||||
@@ -107,16 +110,6 @@ export class PAIAAuthService implements BeforeAppInit {
|
||||
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> {
|
||||
return this._tokenSubject.asObservable();
|
||||
}
|
||||
@@ -154,6 +147,20 @@ export class PAIAAuthService implements BeforeAppInit {
|
||||
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) {
|
||||
/* eslint-disable unicorn/no-useless-undefined */
|
||||
switch (action.action) {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
* 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 {Calendar} from '@awesome-cordova-plugins/calendar/ngx';
|
||||
import {Injectable} from '@angular/core';
|
||||
import {ICalEvent} from './ical/ical';
|
||||
@@ -28,18 +29,18 @@ const RECURRENCE_PATTERNS: Partial<Record<unitOfTime.Diff, string | undefined>>
|
||||
day: 'daily',
|
||||
};
|
||||
|
||||
@Injectable({providedIn: 'root'})
|
||||
@Injectable()
|
||||
export class CalendarService {
|
||||
goToDate = new Subject<number>();
|
||||
|
||||
goToDateClicked = this.goToDate.asObservable();
|
||||
|
||||
get calendarName(): string {
|
||||
return this.config.app.name ?? 'StApps';
|
||||
}
|
||||
calendarName = 'StApps';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||
constructor(readonly calendar: Calendar, readonly config: ConfigProvider) {}
|
||||
constructor(readonly calendar: Calendar, private readonly configProvider: ConfigProvider) {
|
||||
this.calendarName = (this.configProvider.getValue('name') as string) ?? 'StApps';
|
||||
}
|
||||
|
||||
async createCalendar(): Promise<CalendarInfo | undefined> {
|
||||
await this.calendar.createCalendar({
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user