2022-05-03 23:58:19 +02:00
|
|
|
import errors from "./errors"
|
2022-06-09 13:33:10 +02:00
|
|
|
const errorClasses = errors.errors
|
2022-05-03 18:13:13 +02:00
|
|
|
import * as events from "./events"
|
2022-05-04 12:22:50 +02:00
|
|
|
import * as migrations from "./migrations"
|
2022-05-05 09:32:14 +02:00
|
|
|
import * as users from "./users"
|
2022-07-25 20:45:50 +02:00
|
|
|
import * as roles from "./security/roles"
|
2022-10-25 19:19:18 +02:00
|
|
|
import * as permissions from "./security/permissions"
|
2022-05-26 11:13:26 +02:00
|
|
|
import * as accounts from "./cloud/accounts"
|
2022-05-28 22:38:22 +02:00
|
|
|
import * as installation from "./installation"
|
2022-05-05 09:32:14 +02:00
|
|
|
import env from "./environment"
|
|
|
|
import tenancy from "./tenancy"
|
|
|
|
import featureFlags from "./featureFlags"
|
2022-08-05 18:13:03 +02:00
|
|
|
import * as sessions from "./security/sessions"
|
2022-05-05 09:32:14 +02:00
|
|
|
import deprovisioning from "./context/deprovision"
|
2022-06-09 13:33:10 +02:00
|
|
|
import auth from "./auth"
|
|
|
|
import constants from "./constants"
|
2022-06-13 11:51:29 +02:00
|
|
|
import * as dbConstants from "./db/constants"
|
2022-07-18 22:11:52 +02:00
|
|
|
import * as logging from "./logging"
|
2022-08-04 21:23:45 +02:00
|
|
|
import pino from "./pino"
|
2022-08-16 13:13:47 +02:00
|
|
|
import * as middleware from "./middleware"
|
2022-09-09 13:01:04 +02:00
|
|
|
import plugins from "./plugin"
|
2022-09-22 15:09:20 +02:00
|
|
|
import encryption from "./security/encryption"
|
2022-10-13 18:27:04 +02:00
|
|
|
import * as queue from "./queue"
|
2022-11-09 17:53:42 +01:00
|
|
|
import * as types from "./types"
|
2022-05-05 09:32:14 +02:00
|
|
|
|
2022-06-09 13:33:10 +02:00
|
|
|
// mimic the outer package exports
|
|
|
|
import * as db from "./pkg/db"
|
|
|
|
import * as objectStore from "./pkg/objectStore"
|
|
|
|
import * as utils from "./pkg/utils"
|
|
|
|
import redis from "./pkg/redis"
|
|
|
|
import cache from "./pkg/cache"
|
|
|
|
import context from "./pkg/context"
|
2021-04-07 12:33:16 +02:00
|
|
|
|
2022-06-09 13:33:10 +02:00
|
|
|
const init = (opts: any = {}) => {
|
|
|
|
db.init(opts.db)
|
|
|
|
}
|
|
|
|
|
|
|
|
const core = {
|
|
|
|
init,
|
|
|
|
db,
|
2022-06-13 11:51:29 +02:00
|
|
|
...dbConstants,
|
2022-05-05 09:32:14 +02:00
|
|
|
redis,
|
2022-10-10 09:21:17 +02:00
|
|
|
locks: redis.redlock,
|
2022-05-05 09:32:14 +02:00
|
|
|
objectStore,
|
|
|
|
utils,
|
|
|
|
users,
|
|
|
|
cache,
|
|
|
|
auth,
|
|
|
|
constants,
|
2022-06-13 11:51:29 +02:00
|
|
|
...constants,
|
2022-05-04 12:22:50 +02:00
|
|
|
migrations,
|
2022-05-05 09:32:14 +02:00
|
|
|
env,
|
|
|
|
accounts,
|
|
|
|
tenancy,
|
2022-05-23 11:29:33 +02:00
|
|
|
context,
|
2022-05-05 09:32:14 +02:00
|
|
|
featureFlags,
|
2022-05-03 18:13:13 +02:00
|
|
|
events,
|
2022-05-05 09:32:14 +02:00
|
|
|
sessions,
|
|
|
|
deprovisioning,
|
2022-05-28 22:38:22 +02:00
|
|
|
installation,
|
2022-06-09 13:33:10 +02:00
|
|
|
errors,
|
2022-07-04 16:44:47 +02:00
|
|
|
logging,
|
2022-07-25 20:45:50 +02:00
|
|
|
roles,
|
2022-09-09 13:01:04 +02:00
|
|
|
plugins,
|
2022-08-04 21:23:45 +02:00
|
|
|
...pino,
|
2022-06-09 13:33:10 +02:00
|
|
|
...errorClasses,
|
2022-08-16 13:13:47 +02:00
|
|
|
middleware,
|
2022-09-22 15:09:20 +02:00
|
|
|
encryption,
|
2022-10-13 18:27:04 +02:00
|
|
|
queue,
|
2022-10-25 19:19:18 +02:00
|
|
|
permissions,
|
2022-11-09 17:53:42 +01:00
|
|
|
...types,
|
2021-04-08 12:20:37 +02:00
|
|
|
}
|
2022-06-09 13:33:10 +02:00
|
|
|
|
|
|
|
export = core
|