Skip to content

Commit

Permalink
Merge branch 'fix-create-repository-attribute-error-message' of https…
Browse files Browse the repository at this point in the history
…://github.com/nmshd/runtime into fix-create-repository-attribute-error-message
  • Loading branch information
Magnus-Kuhn committed Dec 4, 2024
2 parents 3c07a4d + 1fab3b1 commit c798c0f
Show file tree
Hide file tree
Showing 157 changed files with 5,209 additions and 1,206 deletions.
5 changes: 5 additions & 0 deletions .dev/appsettings.override.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@
"ConnectionString": "User ID=tokens;Password=Passw0rd;Server=postgres;Port=5432;Database=enmeshed;"
}
}
},
"Tags": {
"Application": {
"SupportedLanguages": ["en"]
}
}
},
"Serilog": {
Expand Down
2 changes: 1 addition & 1 deletion .dev/compose.backbone.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
BACKBONE_VERSION=6.13.2
BACKBONE_VERSION=6.20.0
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"*.expectThrows*",
"Then.*",
"*.expectPublishedEvents",
"*.expectLastPublishedEvent",
"*.executeTests",
"expectThrows*"
]
Expand Down
8 changes: 4 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Readiness checklist

- [ ] I added/updated tests.
- [ ] I ensured that the PR title is good enough for the changelog.
- [ ] I labeled the PR.
- [ ] I self-reviewed the PR.
- [ ] I added/updated tests.
- [ ] I ensured that the PR title is good enough for the changelog.
- [ ] I labeled the PR.
- [ ] I self-reviewed the PR.

<!-- # Description -->
42 changes: 42 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
# https://github.com/repository-settings/app

repository:
allow_squash_merge: true
allow_merge_commit: false
allow_rebase_merge: false
allow_auto_merge: true
allow_update_branch: true
delete_branch_on_merge: true

labels:
- name: breaking-change
color: "#16060F"
description: A breaking change
- name: bug
color: "#d73a4a"
description: Something isn't working
- name: chore
color: "#c2e0c6"
description: Some routine work like updating dependencies
- name: ci
color: "#DFB5FD"
description: Continuous Integration related stuff
- name: dependencies
color: "#0366d6"
description: Pull requests that update dependencies
- name: documentation
color: "#0075ca"
description: Improvements or additions to documentation
- name: enhancement
color: "#a2eeef"
description: New feature or request
- name: refactoring
color: "#880361"
description: Refactoring of code
- name: test
color: "#20D89D"
description: This pull request contains only new or changed tests
- name: wip
color: "#32BF4C"
description: Work in Progress (blocks mergify from auto update the branch)
48 changes: 24 additions & 24 deletions README_dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@

This workspace provides two types of scripts:

- root level scripts (like lints):
- root level scripts (like lints):

These can be run by `npm run <scriptname>` from the root of the project.

- package level scripts (like tests):
- package level scripts (like tests):

These can be run by `npm run <scriptname>` from the package directory or by `npm run -w packages/<package> <scriptname>` from the root of the project.

Additionally, you can run a script in all workspaces by `npm run -ws --if-present <scriptname>`.

## Linting

- TypeScript:
- Each package provides its own TypeScript linting script. You can run it by `npm run lint:tsc` from the package directory or by `npm run -w packages/<package> lint:tsc` from the root of the project.
- The root project also provides a script that lints all packages. You can run it by `npm run lint:tsc` from the root of the project.
- Prettier: Run `npm run lint:prettier` from the root of the project.
- ESLint: Run `npm run lint:eslint` from the root of the project.
- TypeScript:
- Each package provides its own TypeScript linting script. You can run it by `npm run lint:tsc` from the package directory or by `npm run -w packages/<package> lint:tsc` from the root of the project.
- The root project also provides a script that lints all packages. You can run it by `npm run lint:tsc` from the root of the project.
- Prettier: Run `npm run lint:prettier` from the root of the project.
- ESLint: Run `npm run lint:eslint` from the root of the project.

## Check for outdated dependencies

Expand All @@ -36,9 +36,9 @@ To check for outdated dependencies, run `npm run outdated`. This will check the

Set the following environment variables:

- `NMSHD_TEST_BASEURL` (the Backbone baseUrl to test against)
- `NMSHD_TEST_CLIENTID` (the Backbone clientId for the configured baseUrl)
- `NMSHD_TEST_CLIENTSECRET` (the Backbone clientSecret for the configured baseUrl)
- `NMSHD_TEST_BASEURL` (the Backbone baseUrl to test against)
- `NMSHD_TEST_CLIENTID` (the Backbone clientId for the configured baseUrl)
- `NMSHD_TEST_CLIENTSECRET` (the Backbone clientSecret for the configured baseUrl)

> We recommend to persist these variables for example in your `.bashrc` / `.zshrc` or in the Windows environment variables.
Expand All @@ -52,17 +52,17 @@ npm run start:backbone

Set the following environment variables:

- `NMSHD_TEST_BASEURL` to `http://localhost:8090`
- `NMSHD_TEST_CLIENTID` to `test`
- `NMSHD_TEST_CLIENTSECRET` to `test`
- `NMSHD_TEST_BASEURL` to `http://localhost:8090`
- `NMSHD_TEST_CLIENTID` to `test`
- `NMSHD_TEST_CLIENTSECRET` to `test`

> We recommend to persist these variables for example in your `.bashrc` / `.zshrc` or in the Windows environment variables.
### Running the tests

- a specific database: `npm run test:local:[mongodb|lokijs|ferretdb]`
- a specific test suite: `npm run test:local:[mongodb|lokijs|ferretdb] -- testSuiteName`
- with code coverage: `npm run test:local:[mongodb|lokijs|ferretdb] -- --coverage`, a result summary is written to the console, a detailed report is accessible via the path `coverage/lcov-report/index.html`
- a specific database: `npm run test:local:[mongodb|lokijs|ferretdb]`
- a specific test suite: `npm run test:local:[mongodb|lokijs|ferretdb] -- testSuiteName`
- with code coverage: `npm run test:local:[mongodb|lokijs|ferretdb] -- --coverage`, a result summary is written to the console, a detailed report is accessible via the path `coverage/lcov-report/index.html`

### Teardown

Expand All @@ -74,15 +74,15 @@ After testing on MongoDB or FerretDB, you can run `npm run test:local:teardown`

Examples:

- Doesn't build at all
- Module not found
- Something is undefined which should not be undefined (e.g. "TypeError: Cannot read property 'from_base64' of undefined")
- Doesn't build at all
- Module not found
- Something is undefined which should not be undefined (e.g. "TypeError: Cannot read property 'from_base64' of undefined")

Solutions:

- Check if you have got absolute `"src/"` or `"/"` includes somewhere and change them to relative ones (`"../"`).
- Check if you have a cyclic reference somewhere (sometimes quite hard to find). In general, no class should include something from the root's `index.ts` export (looks like `import * from "../../"`).
- Check if you have `"/dist"` as suffix for includes (e.g. `"@nmshd/crypto/dist"`). This usually works fine within NodeJS, however Webpack (Browser Build) has some issues therein, resulting e.g. in the crypto lib being copied into the transport lib. It should be fixed, but you never know...
- Check if you have got absolute `"src/"` or `"/"` includes somewhere and change them to relative ones (`"../"`).
- Check if you have a cyclic reference somewhere (sometimes quite hard to find). In general, no class should include something from the root's `index.ts` export (looks like `import * from "../../"`).
- Check if you have `"/dist"` as suffix for includes (e.g. `"@nmshd/crypto/dist"`). This usually works fine within NodeJS, however Webpack (Browser Build) has some issues therein, resulting e.g. in the crypto lib being copied into the transport lib. It should be fixed, but you never know...

### Something about duplicating private properties

Expand All @@ -92,5 +92,5 @@ Do not use abstract classes.

Or deserialize-/fromUnknown doesn't find your class.

- Check if all (parent) classes up to Serializable(-Async) inclulde a `@schema` declaration with a type.
- You might have several different Serializable(-Async) instances up- and running. This usually happens if ts-serval/crypto/transport are not correctly imported.
- Check if all (parent) classes up to Serializable(-Async) inclulde a `@schema` declaration with a type.
- You might have several different Serializable(-Async) instances up- and running. This usually happens if ts-serval/crypto/transport are not correctly imported.
51 changes: 29 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@
"@js-soft/eslint-config-ts": "^1.6.13",
"@js-soft/license-check": "^1.0.9",
"@types/jest": "^29.5.14",
"@types/node": "^22.9.0",
"@types/node": "^22.10.1",
"enhanced-publish": "^1.1.3",
"eslint": "^8.57.1",
"jest": "^29.7.0",
"jest-expect-message": "^1.1.3",
"madge": "^8.0.0",
"npm-check-updates": "^17.1.11",
"prettier": "^3.3.3",
"prettier": "^3.4.1",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.6.3"
"typescript": "^5.7.2"
}
}
1 change: 1 addition & 0 deletions packages/app-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"maxWorkers": 5,
"preset": "ts-jest",
"setupFilesAfterEnv": [
"./test/customMatchers.ts",
"jest-expect-message"
],
"testEnvironment": "node",
Expand Down
6 changes: 6 additions & 0 deletions packages/app-runtime/src/AppConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ export function createAppConfig(...configs: AppConfigOverwrite[]): AppConfig {
location: "onboardingChangeReceived",
enabled: true
},
identityDeletionProcessStatusChanged: {
name: "identityDeletionProcessStatusChanged",
displayName: "Identity Deletion Process Status Changed Module",
location: "identityDeletionProcessStatusChanged",
enabled: true
},
messageReceived: {
name: "messageReceived",
displayName: "Message Received Module",
Expand Down
Loading

0 comments on commit c798c0f

Please sign in to comment.