"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getUser = exports.getResponse = exports.getContext = exports.flushDatabases = exports.RequestTarget = void 0;
// Prevents server from starting in worker threads if this was directly imported from a non-server user thread
const node_worker_threads_1 = __importDefault(require("node:worker_threads"));
if (!node_worker_threads_1.default.isMainThread) {
    // @ts-expect-error - Idk this has been here for a while. Types say its readonly, but that must not be true.
    if (!node_worker_threads_1.default.workerData)
        node_worker_threads_1.default.workerData = {};
    node_worker_threads_1.default.workerData.noServerStart = true;
}
// Regular exports (don't require the same initialization as the globals at the end of this file do)
var RequestTarget_ts_1 = require("./resources/RequestTarget.js");
Object.defineProperty(exports, "RequestTarget", { enumerable: true, get: function () { return RequestTarget_ts_1.RequestTarget; } });
var databases_ts_1 = require("./resources/databases.js");
Object.defineProperty(exports, "flushDatabases", { enumerable: true, get: function () { return databases_ts_1.flushDatabases; } });
var jsLoader_ts_1 = require("./security/jsLoader.js");
Object.defineProperty(exports, "getContext", { enumerable: true, get: function () { return jsLoader_ts_1.getContext; } });
Object.defineProperty(exports, "getResponse", { enumerable: true, get: function () { return jsLoader_ts_1.getResponse; } });
Object.defineProperty(exports, "getUser", { enumerable: true, get: function () { return jsLoader_ts_1.getUser; } });
// Actual define the values on the `exports` for CJS static analysis
exports.contentTypes = null;
exports.createBlob = undefined;
exports.databases = {};
exports.logger = {};
exports.models = undefined;
exports.operation = undefined;
exports.Resource = undefined;
exports.server = {};
exports.tables = {};
exports.threads = [];
exports.transaction = undefined;
// And finally assign globals to exports.
// These values are populated at runtime by `_assignPackageExport()` in their respective modules
// (e.g. Resource.ts, databases.ts, Server.ts, etc.)
const threadServer_js_1 = require("./server/threads/threadServer.js");
Object.assign(exports, threadServer_js_1.globals);
//# sourceMappingURL=index.js.map