2018-09-01 13:58:06 -04:00
|
|
|
import ParseServer from './ParseServer';
|
|
|
|
|
import FileSystemAdapter from '@parse/fs-files-adapter';
|
|
|
|
|
import InMemoryCacheAdapter from './Adapters/Cache/InMemoryCacheAdapter';
|
|
|
|
|
import NullCacheAdapter from './Adapters/Cache/NullCacheAdapter';
|
|
|
|
|
import RedisCacheAdapter from './Adapters/Cache/RedisCacheAdapter';
|
|
|
|
|
import LRUCacheAdapter from './Adapters/Cache/LRUCache.js';
|
|
|
|
|
import * as TestUtils from './TestUtils';
|
2021-11-01 09:28:49 -04:00
|
|
|
import * as SchemaMigrations from './SchemaMigrations/Migrations';
|
2023-03-04 03:51:45 +11:00
|
|
|
import AuthAdapter from './Adapters/Auth/AuthAdapter';
|
2021-11-01 09:28:49 -04:00
|
|
|
|
2018-09-01 13:58:06 -04:00
|
|
|
import { useExternal } from './deprecated';
|
|
|
|
|
import { getLogger } from './logger';
|
|
|
|
|
import { PushWorker } from './Push/PushWorker';
|
|
|
|
|
import { ParseServerOptions } from './Options';
|
2019-06-19 17:19:47 -07:00
|
|
|
import { ParseGraphQLServer } from './GraphQL/ParseGraphQLServer';
|
2016-01-28 10:58:12 -08:00
|
|
|
|
2016-03-23 09:19:09 -04:00
|
|
|
// Factory function
|
2020-10-25 15:06:58 -05:00
|
|
|
const _ParseServer = function (options: ParseServerOptions) {
|
2016-12-07 15:17:05 -08:00
|
|
|
const server = new ParseServer(options);
|
2022-12-22 01:30:13 +11:00
|
|
|
return server;
|
2018-09-01 13:58:06 -04:00
|
|
|
};
|
2016-03-23 09:19:09 -04:00
|
|
|
// Mount the create liveQueryServer
|
|
|
|
|
_ParseServer.createLiveQueryServer = ParseServer.createLiveQueryServer;
|
2022-12-22 01:30:13 +11:00
|
|
|
_ParseServer.startApp = ParseServer.startApp;
|
2016-03-23 09:19:09 -04:00
|
|
|
|
2021-04-09 17:12:24 +02:00
|
|
|
const S3Adapter = useExternal('S3Adapter', '@parse/s3-files-adapter');
|
2017-11-17 08:32:58 -05:00
|
|
|
const GCSAdapter = useExternal('GCSAdapter', '@parse/gcs-files-adapter');
|
2016-04-05 18:18:49 -04:00
|
|
|
|
2016-08-12 13:25:24 -04:00
|
|
|
Object.defineProperty(module.exports, 'logger', {
|
2018-09-01 13:58:06 -04:00
|
|
|
get: getLogger,
|
2016-08-12 13:25:24 -04:00
|
|
|
});
|
|
|
|
|
|
2016-03-23 09:19:09 -04:00
|
|
|
export default ParseServer;
|
2017-09-22 17:36:20 -07:00
|
|
|
export {
|
|
|
|
|
S3Adapter,
|
|
|
|
|
GCSAdapter,
|
|
|
|
|
FileSystemAdapter,
|
|
|
|
|
InMemoryCacheAdapter,
|
|
|
|
|
NullCacheAdapter,
|
|
|
|
|
RedisCacheAdapter,
|
|
|
|
|
LRUCacheAdapter,
|
|
|
|
|
TestUtils,
|
|
|
|
|
PushWorker,
|
2019-06-19 17:19:47 -07:00
|
|
|
ParseGraphQLServer,
|
2018-09-01 13:58:06 -04:00
|
|
|
_ParseServer as ParseServer,
|
2021-11-01 09:28:49 -04:00
|
|
|
SchemaMigrations,
|
2023-03-04 03:51:45 +11:00
|
|
|
AuthAdapter,
|
2017-09-22 17:36:20 -07:00
|
|
|
};
|