@resolveio/server-lib 20.4.31 → 20.4.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fixtures/init.js +1 -1
- package/fixtures/init.js.map +1 -1
- package/package.json +1 -1
package/fixtures/init.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var __awaiter=this&&this.__awaiter||function(e,r,l,o){return new(l=l||Promise)(function(n,t){function fulfilled(e){try{step(o.next(e))}catch(e){t(e)}}function rejected(e){try{step(o.throw(e))}catch(e){t(e)}}function step(e){var t;e.done?n(e.value):((t=e.value)instanceof l?t:new l(function(e){e(t)})).then(fulfilled,rejected)}step((o=o.apply(e,r||[])).next())})},__generator=this&&this.__generator||function(r,l){var o,a,i,c={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},u={next:verb(0),throw:verb(1),return:verb(2)};return"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function verb(n){return function(e){var t=[n,e];if(o)throw new TypeError("Generator is already executing.");for(;c=u&&t[u=0]?0:c;)try{if(o=1,a&&(i=2&t[0]?a.return:t[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,t[1])).done)return i;switch(a=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return c.label++,{value:t[1],done:!1};case 5:c.label++,a=t[1],t=[0];continue;case 7:t=c.ops.pop(),c.trys.pop();continue;default:if(!(i=0<(i=c.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){c=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))c.label=t[1];else if(6===t[0]&&c.label<i[1])c.label=i[1],i=t;else{if(!(i&&c.label<i[2])){i[2]&&c.ops.pop(),c.trys.pop();continue}c.label=i[2],c.ops.push(t)}}t=l.call(r,c)}catch(e){t=[6,e],a=0}finally{o=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},flag_collection_1=(Object.defineProperty(exports,"__esModule",{value:!0}),exports.loadServerInit=void 0,require("../collections/flag.collection"));function loadServerInit(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return[4,flag_collection_1.Flags.findOne({type:"Enable Debug"})];case 1:return e.sent()||flag_collection_1.Flags.insertOne({type:"Enable Debug",value:!1}),[4,flag_collection_1.Flags.findOne({type:"Enable Debug PDF"})];case 2:return
|
|
1
|
+
"use strict";var __awaiter=this&&this.__awaiter||function(e,r,l,o){return new(l=l||Promise)(function(n,t){function fulfilled(e){try{step(o.next(e))}catch(e){t(e)}}function rejected(e){try{step(o.throw(e))}catch(e){t(e)}}function step(e){var t;e.done?n(e.value):((t=e.value)instanceof l?t:new l(function(e){e(t)})).then(fulfilled,rejected)}step((o=o.apply(e,r||[])).next())})},__generator=this&&this.__generator||function(r,l){var o,a,i,c={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},u={next:verb(0),throw:verb(1),return:verb(2)};return"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function verb(n){return function(e){var t=[n,e];if(o)throw new TypeError("Generator is already executing.");for(;c=u&&t[u=0]?0:c;)try{if(o=1,a&&(i=2&t[0]?a.return:t[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,t[1])).done)return i;switch(a=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return c.label++,{value:t[1],done:!1};case 5:c.label++,a=t[1],t=[0];continue;case 7:t=c.ops.pop(),c.trys.pop();continue;default:if(!(i=0<(i=c.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){c=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))c.label=t[1];else if(6===t[0]&&c.label<i[1])c.label=i[1],i=t;else{if(!(i&&c.label<i[2])){i[2]&&c.ops.pop(),c.trys.pop();continue}c.label=i[2],c.ops.push(t)}}t=l.call(r,c)}catch(e){t=[6,e],a=0}finally{o=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},flag_collection_1=(Object.defineProperty(exports,"__esModule",{value:!0}),exports.loadServerInit=void 0,require("../collections/flag.collection"));function loadServerInit(){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(e){switch(e.label){case 0:return[4,flag_collection_1.Flags.findOne({type:"Enable Debug"})];case 1:return e.sent()||flag_collection_1.Flags.insertOne({type:"Enable Debug",value:!1}),[4,flag_collection_1.Flags.findOne({type:"Enable Debug PDF"})];case 2:return(t=e.sent())?t.value&&flag_collection_1.Flags.updateOne({_id:t._id},{$set:{value:!1}}):flag_collection_1.Flags.insertOne({type:"Enable Debug PDF",value:!1}),[2]}})})}exports.loadServerInit=loadServerInit;
|
|
2
2
|
//# sourceMappingURL=init.js.map
|
package/fixtures/init.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/fixtures/init.ts"],"names":["flag_collection_1","require","loadServerInit","Flags","findOne","type","_a","sent","insertOne","value","exports"],"mappings":"k8CACAA,mB,qFAAAC,QAAA,gCAAA,GAEA,SAAsBC,iB,
|
|
1
|
+
{"version":3,"sources":["../../src/fixtures/init.ts"],"names":["flag_collection_1","require","loadServerInit","Flags","findOne","type","_a","sent","insertOne","value","enableDebugFlagPDF","updateOne","_id","$set","exports"],"mappings":"k8CACAA,mB,qFAAAC,QAAA,gCAAA,GAEA,SAAsBC,iB,gHACC,MAAA,CAAA,EAAMF,kBAAAG,MAAMC,QAAQ,CAACC,KAAM,cAAc,CAAC,G,OAMvC,OANHC,EAAAC,KAAA,GAGrBP,kBAAAG,MAAMK,UAAU,CAACH,KAAM,eAAgBI,MAAO,CAAA,CAAK,CAAC,EAG5B,CAAA,EAAMT,kBAAAG,MAAMC,QAAQ,CAACC,KAAM,kBAAkB,CAAC,G,cAAnEK,EAAqBJ,EAAAC,KAAA,GAKhBG,EAAmBD,OAC3BT,kBAAAG,MAAMQ,UAAU,CAACC,IAAKF,EAAmBE,GAAG,EAAG,CAACC,KAAM,CAACJ,MAAO,CAAA,CAAK,CAAC,CAAC,EAHrET,kBAAAG,MAAMK,UAAU,CAACH,KAAM,mBAAoBI,MAAO,CAAA,CAAK,CAAC,E,SAV1DK,QAAAZ,eAAAA","file":"init.js","sourcesContent":["import { objectIdHexString } from '../managers/mongo.manager';\nimport { Flags } from '../collections/flag.collection';\n\nexport async function loadServerInit() {\n\tlet enableDebugFlag = await Flags.findOne({type: 'Enable Debug'});\n\n\tif (!enableDebugFlag) {\n\t\tFlags.insertOne({type: 'Enable Debug', value: false});\n\t}\n\n\tlet enableDebugFlagPDF = await Flags.findOne({type: 'Enable Debug PDF'});\n\n\tif (!enableDebugFlagPDF) {\n\t\tFlags.insertOne({type: 'Enable Debug PDF', value: false});\n\t}\n\telse if (enableDebugFlagPDF.value) {\n\t\tFlags.updateOne({_id: enableDebugFlagPDF._id}, {$set: {value: false}});\n\t}\n}"]}
|