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MAEV","file":"/npm/workjs@1.6.4/core/bootstrap.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/workjs@1.6.4/core/bootstrap.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","//global.work = {};\n\n//init global work object\n//create context prototype\nconst context = {};\nglobal.w = Object.create(context);\nw.proto = context;\n\nconst Module = require('module');\n\n//const orig_require = Module.prototype.require;\n//Module.prototype.require = function(id){ return orig_require(id); }\n//Module.prototype.require = function(id){ return orig_require.call(this, id); }\n\n//create context prototype\n////const context = {};\n//context.proto = context;\n\n//create global work context\n////const w = Module.prototype.work = Object.create(context);\n////w.proto = context;\n\nrequire(\"./doc.js\");\n\nrequire(\"./dependencies.js\");\n\nw.mw = {};\nw.cache = {};\n\n//work_require for autoreload in development mode defaults to require\nModule.prototype.work_require = Module.prototype.require;\n\nw.proto.rootdir = process.cwd();\nw.proto.coredir = __dirname.replace(\"/core\", \"\");\n\nw.conf = {};\nrequire(\"../CONF\");\nrequire(w.rootdir+\"/CONF\");\n\nrequire(\"./work.js\");\nrequire(\"./logger.js\");\n\nw.log(\"WorkJS starting >>> \" + w.conf.name);\n\nif (w.conf.servermode.toUpperCase() == \"DEVELOPMENT\") {\n  Module.prototype.work_require = function requireUncached(module){\n    delete require.cache[require.resolve(module)];\n    return require.call(w, module);\n  };\n};\n\nw.verbs = [];\nw.flags = {};\nfor (var i = 0; i<w.conf.verbs.length; ++i) {\n  var verb = w.conf.verbs[i];\n  w.verbs.push(verb);\n  w.flags[verb] = w.conf.flags[verb] || w.conf.flags[\"default\"]\n};\n\n//load templating subsystem\n///w.templating = module.require('./templating.js')({\n///  searchpaths: [w.rootdir, w.rootdir+'/LAYOUT']\n///});\n\n//load database subsystem\n\n//w.dbm = require('./pg_native.js')({dburl:w.conf.db_url, poolsize:w.conf.db_poolsize});\n//w.db = w.dbm.db;\n//install required DB contents\n\nw.dep.syncho(function setup() {\n\n  require('./pg.js');\n  require('./db.js');\n  \n  require('./cookies.js');\n\n//load global db fkts\n///// deleted !! var dbfkt = require(\"./db.js\");\n  require('./util.js');\n\n  //load session subsystem\n  require('./session.js');\n  \n  //load user+auth subsystem\n  require('./auth.js');\n  \n  require('./groups.js');\n  \n  //load email subsystem\n  require('./smtp.js');\n  \n  //load content repository subsystem\n  require('./repo.js');\n  \n  require('./work-socket.js');\n\ntry { w.dependencies.fs.mkdirSync(w.conf.uploaddir); } catch (e) { };\n\n/////YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY\n//w.Work = require(\"./Work.js\");\n//w.Work.prototype.work = w;\n\nrequire(\"./body_parser.js\");\n\n//parse packages into route map\nw.map = {};\nw.packages = {};\n\nrequire(\"./package_parser.js\");\n\n//start requests processor\nrequire(\"./request_processor.js\");\n\nw.api_doc.init();\n\n});\n"]}