Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add base agent class #919

Closed

Conversation

TimoGlastra
Copy link
Contributor

Adds a BaseAgent class that does most of the heavy lifting for the agent. Agent extends this and registers all dependencies in the registerDependencies method.

When adding the tenant module, I'll also extend the BaseAgent for the TenantAgent class. This allows the Agent class to do all setup that only needs to happen once for the base agent, and the tenant agent can expose the same api without doing this registration setup.

Relatively small PR, but a lot of changes due to dependency on #898 and #881

Signed-off-by: Timo Glastra <timo@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id>
@TimoGlastra TimoGlastra requested a review from a team as a code owner July 3, 2022 10:03
@codecov-commenter
Copy link

codecov-commenter commented Jul 3, 2022

Codecov Report

Merging #919 (2d93e20) into main (6d88aa4) will increase coverage by 0.18%.
The diff coverage is 88.43%.

@@            Coverage Diff             @@
##             main     #919      +/-   ##
==========================================
+ Coverage   87.70%   87.89%   +0.18%     
==========================================
  Files         475      481       +6     
  Lines       11339    11466     +127     
  Branches     1874     1910      +36     
==========================================
+ Hits         9945    10078     +133     
+ Misses       1327     1322       -5     
+ Partials       67       66       -1     
Impacted Files Coverage Δ
packages/core/src/agent/AgentConfig.ts 90.16% <ø> (-0.47%) ⬇️
packages/core/src/agent/Events.ts 100.00% <ø> (ø)
packages/core/src/constants.ts 100.00% <ø> (ø)
...les/credentials/formats/CredentialFormatService.ts 100.00% <ø> (ø)
...cation/handlers/V1RevocationNotificationHandler.ts 71.42% <ø> (ø)
...cation/handlers/V2RevocationNotificationHandler.ts 71.42% <ø> (ø)
...ges/core/src/modules/credentials/services/index.ts 100.00% <ø> (ø)
...ore/src/modules/dids/methods/web/WebDidResolver.ts 60.00% <ø> (ø)
...c/modules/routing/handlers/MediationDenyHandler.ts 62.50% <0.00%> (+6.94%) ⬆️
packages/core/src/storage/migration/updates.ts 100.00% <ø> (ø)
... and 103 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6d88aa4...2d93e20. Read the comment docs.

@TimoGlastra TimoGlastra added the multitenancy Tasks related to multi-tenancy label Jul 3, 2022
@TimoGlastra
Copy link
Contributor Author

Superseded by #921

@TimoGlastra TimoGlastra closed this Jul 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multitenancy Tasks related to multi-tenancy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants