Skip to content

Expose InMemoryCacheAdapter #2186

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion spec/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,11 @@ describe('server', () => {
done();
});

it_exclude_dbs(['postgres'])('core adapters are not exposed anymore', done => {
it_exclude_dbs(['postgres'])('exposes correct adapters', done => {
expect(ParseServer.S3Adapter).toThrow();
expect(ParseServer.GCSAdapter).toThrow('GCSAdapter is not provided by parse-server anymore; please install parse-server-gcs-adapter');
expect(ParseServer.FileSystemAdapter).toThrow();
expect(ParseServer.InMemoryCacheAdapter).toThrow();
done();
});

Expand Down
14 changes: 7 additions & 7 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import winston from 'winston';
import ParseServer from './ParseServer';
import S3Adapter from 'parse-server-s3-adapter'
import FileSystemAdapter from 'parse-server-fs-adapter'
import TestUtils from './TestUtils';
import { useExternal } from './deprecated'
import ParseServer from './ParseServer';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also removed this unused import

import S3Adapter from 'parse-server-s3-adapter'
import FileSystemAdapter from 'parse-server-fs-adapter'
import InMemoryCacheAdapter from './Adapters/Cache/InMemoryCacheAdapter'
import TestUtils from './TestUtils';
import { useExternal } from './deprecated'

// Factory function
let _ParseServer = function(options) {
Expand All @@ -16,4 +16,4 @@ _ParseServer.createLiveQueryServer = ParseServer.createLiveQueryServer;
let GCSAdapter = useExternal('GCSAdapter', 'parse-server-gcs-adapter');

export default ParseServer;
export { S3Adapter, GCSAdapter, FileSystemAdapter, TestUtils, _ParseServer as ParseServer };
export { S3Adapter, GCSAdapter, FileSystemAdapter, InMemoryCacheAdapter, TestUtils, _ParseServer as ParseServer };