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

[Sessions] Allow to specify the store name in a configuration file #729

Merged
merged 10 commits into from
May 28, 2020

Conversation

LoicPoullain
Copy link
Member

@LoicPoullain LoicPoullain commented May 28, 2020

Issue

Resolves #725

Solution and steps

  • Export the store as SessionStore in the three packages @foal/mongodb, @foal/typeorm and @foal/redis.
  • Make store property optional and throw error if not given.
  • Support settings.session.store and throw error if property and settings are not provided.
  • Throw an error if module not found
  • Throw an error if no SessionStore
  • Export a SessionStore in internal test
  • Test with this store

Checklist

  • Add/update/check docs (code comments and docs/ folder).
  • Add/update/check tests.
  • Update/check the cli generators.

@LoicPoullain LoicPoullain changed the title [Sessions] Export all stores as ConcreteSessnStore [Sessions] Allow to specify the store in a configuration file May 28, 2020
@codecov
Copy link

codecov bot commented May 28, 2020

Codecov Report

Merging #729 into v1-10-0 will decrease coverage by 0.04%.
The diff coverage is 92.85%.

Impacted file tree graph

@@             Coverage Diff             @@
##           v1-10-0     #729      +/-   ##
===========================================
- Coverage    99.64%   99.59%   -0.05%     
===========================================
  Files           94       94              
  Lines         1690     1736      +46     
  Branches       378      413      +35     
===========================================
+ Hits          1684     1729      +45     
- Misses           6        7       +1     
Impacted Files Coverage Δ
packages/core/src/sessions/token.hook.ts 98.82% <91.66%> (-1.18%) ⬇️
packages/core/src/sessions/token-optional.hook.ts 100.00% <100.00%> (ø)
packages/core/src/sessions/token-required.hook.ts 100.00% <100.00%> (ø)
packages/core/src/core/routes/utils.ts 100.00% <0.00%> (ø)
packages/core/src/express/create-app.ts 100.00% <0.00%> (ø)
packages/core/src/express/handle-errors.ts 100.00% <0.00%> (ø)
packages/core/src/express/send-response.ts 100.00% <0.00%> (ø)
packages/core/src/core/http/http-methods.ts 100.00% <0.00%> (ø)
packages/core/src/express/create-middleware.ts 100.00% <0.00%> (ø)
packages/core/src/common/utils/controller.util.ts 100.00% <0.00%> (ø)
... and 6 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 ad5646b...24e8dec. Read the comment docs.

@LoicPoullain LoicPoullain changed the title [Sessions] Allow to specify the store in a configuration file [Sessions] Allow to specify the store name in a configuration file May 28, 2020
@LoicPoullain LoicPoullain merged commit e7cd1d7 into v1-10-0 May 28, 2020
@LoicPoullain LoicPoullain deleted the session-store-in-config branch May 28, 2020 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant