-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.js
More file actions
41 lines (39 loc) · 1.41 KB
/
index.js
File metadata and controls
41 lines (39 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
const workerThreads = require('node:worker_threads');
if (!workerThreads.isMainThread) {
// Prevents server from starting in worker threads if this was directly imported from a non-server user thread
if (!workerThreads.workerData) workerThreads.workerData = {};
workerThreads.workerData.noServerStart = true;
}
const { globals } = require('./server/threads/threadServer.js');
// exported types are needed for parsing as well
exports.Attribute = undefined;
exports.Config = undefined;
exports.ConfigValue = undefined;
exports.Context = undefined;
exports.FileAndURLPathConfig = undefined;
exports.FilesOption = undefined;
exports.FilesOptionObject = undefined;
exports.IterableEventQueue = undefined;
exports.Logger = undefined;
exports.Query = undefined;
exports.RecordObject = undefined;
exports.RequestTarget = undefined;
exports.RequestTargetOrId = undefined;
exports.Resource = undefined;
exports.ResourceInterface = undefined;
exports.Scope = undefined;
exports.Session = undefined;
exports.SourceContext = undefined;
exports.SubscriptionRequest = undefined;
exports.Table = undefined;
exports.User = undefined;
// these are all overwritten by the globals, but need to be here so that Node's static
// exports parser can analyze them
exports.tables = {};
exports.databases = {};
exports.getUser = undefined;
exports.server = {};
exports.contentTypes = null;
exports.threads = [];
exports.logger = {};
Object.assign(exports, globals);