"use strict";
(() => {
var exports = {};
exports.id = 307;
exports.ids = [307];
exports.modules = {

/***/ 9460:
/***/ ((module) => {

module.exports = require("lokijs");

/***/ }),

/***/ 4276:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "_": () => (/* binding */ getCollection),
/* harmony export */   "z": () => (/* binding */ getDb)
/* harmony export */ });
/* harmony import */ var lokijs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9460);
/* harmony import */ var lokijs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lokijs__WEBPACK_IMPORTED_MODULE_0__);

const LokiMemoryAdapter = (lokijs__WEBPACK_IMPORTED_MODULE_0___default().LokiMemoryAdapter);
const getDb = ()=>{
    if (!globalThis.memoryCache["db"]) {
        const db = new (lokijs__WEBPACK_IMPORTED_MODULE_0___default())("docmq", {
            adapter: new LokiMemoryAdapter({
                asyncResponses: true
            })
        });
        db.addCollection("tds-jobs", {
            unique: [
                "id"
            ],
            asyncListeners: true,
            clone: true
        });
        db.addCollection("tds-runs", {
            asyncListeners: true,
            clone: true
        });
        globalThis.memoryCache["db"] = db;
    }
    return globalThis.memoryCache["db"];
};
const getCollection = (name)=>{
    const db = getDb();
    return db.getCollection(name);
};


/***/ }),

/***/ 884:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (/* binding */ MockGraphqlServer)
/* harmony export */ });
/* harmony import */ var db_loki__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4276);

/** View the loki data in storage */ function MockGraphqlServer(req, res) {
    const db = (0,db_loki__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .z)();
    res.status(200).send(JSON.stringify(JSON.parse(db.serialize()), null, 2));
}


/***/ })

};
;

// load runtime
var __webpack_require__ = require("../../webpack-api-runtime.js");
__webpack_require__.C(exports);
var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
var __webpack_exports__ = (__webpack_exec__(884));
module.exports = __webpack_exports__;

})();