@resolveio/server-lib 12.2.18 → 12.3.1
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/collections/logged-in-users.collection.js +0 -4
- package/collections/logged-in-users.collection.js.map +1 -1
- package/fixtures/init.js +2 -13
- package/fixtures/init.js.map +1 -1
- package/http/auth.js +0 -3
- package/http/auth.js.map +1 -1
- package/managers/method.manager.js +1 -1
- package/managers/method.manager.js.map +1 -1
- package/managers/subscription.manager.d.ts +2 -2
- package/managers/subscription.manager.js +5 -48
- package/managers/subscription.manager.js.map +1 -1
- package/methods/accounts.js +0 -29
- package/methods/accounts.js.map +1 -1
- package/models/logged-in-users.model.d.ts +0 -1
- package/models/logged-in-users.model.js.map +1 -1
- package/package.json +25 -25
- package/public_api.d.ts +0 -2
- package/public_api.js +0 -2
- package/public_api.js.map +1 -1
- package/server-app.js +64 -104
- package/server-app.js.map +1 -1
- package/collections/app-version.collection.d.ts +0 -3
- package/collections/app-version.collection.js +0 -51
- package/collections/app-version.collection.js.map +0 -1
- package/models/app-version.model.d.ts +0 -4
- package/models/app-version.model.js +0 -4
- package/models/app-version.model.js.map +0 -1
- package/publications/app-version.d.ts +0 -2
- package/publications/app-version.js +0 -17
- package/publications/app-version.js.map +0 -1
package/methods/accounts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/methods/accounts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAwC;AACxC,kEAAuD;AACvD,uCAAyC;AACzC,kCAAoC;AACpC,wFAA0E;AAE1E,kCAA2C;AAE3C,2DAA8D;AAE9D,SAAgB,kBAAkB,CAAC,aAA4B;IAC9D,aAAa,CAAC,OAAO,CAAC;QACrB,eAAe,EAAE;YAChB,KAAK,EAAE,IAAI,sBAAY,CAAC;gBACvB,OAAO,EAAE;oBACR,IAAI,EAAE,MAAM;iBACZ;aACD,CAAC;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AAC,EAAA;;gCAAzC,IAAI,GAAG,SAAkC;qCAEzC,CAAA,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAA,EAA/B,wBAA+B;gCAClC,qBAAM,uBAAK,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAA;;gCAAvC,SAAuC,CAAC;gCAExC,OAAO,CAAC,IAAI,CAAC,CAAC;;;gCAGd,MAAM,CAAC,cAAc,CAAC,CAAC;;;;;qBAExB,CAAC,CAAC;YACJ,CAAC;SACD;KACD,CAAC,CAAC;AACJ,CAAC;AA1LD,gDA0LC","file":"accounts.js","sourcesContent":["import SimpleSchema from 'simpl-schema';\nimport { Users } from '../collections/user.collection';\nimport * as handlebars from 'handlebars';\nimport * as jwt from 'jsonwebtoken';\nimport { LoggedInUsers } from '../collections/logged-in-users.collection';\nimport { MethodManager } from '../managers/method.manager';\nimport { ResolveIOServer } from '../index';\nimport { UserModel } from '../models/user.model';\nimport { objectIdHexString } from '../managers/mongo.manager';\n\nexport function loadAccountMethods(methodManager: MethodManager) {\n\tmethodManager.methods({\n\t\tsetWSAppVersion: {\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\tversion: {\n\t\t\t\t\ttype: Number\n\t\t\t\t}\n\t\t\t}),\n\t\t\tfunction: function(version) {\n\t\t\t\treturn new Promise(async (resolve, reject) => {\n\t\t\t\t\tLoggedInUsers.updateOne({id_ws: this.id_ws}, {$set: {app_version: version}}).then(res => {\n\t\t\t\t\t\tif (res) {\n\t\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tResolveIOServer.getMainServer().getSubscriptionManager().unsubscribeAll(this._mainServer.getWS(this.id_ws));\n\t\t\t\t\t\t\tresolve(false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}, err => {\n\t\t\t\t\t\tResolveIOServer.getMainServer().getSubscriptionManager().unsubscribeAll(this._mainServer.getWS(this.id_ws));\n\t\t\t\t\t\tresolve(false);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\treloadWS: {\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\tid_ws: String\n\t\t\t}),\n\t\t\tfunction: function(id_ws) {\n\t\t\t\treturn new Promise(async (resolve, reject) => {\n\t\t\t\t\tlet ws = ResolveIOServer.getMainServer().getWS(id_ws);\n\n\t\t\t\t\tif (ws) {\n\t\t\t\t\t\tResolveIOServer.getMainServer().unsubscribeWS(ws);\n\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\treject('No WS');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\treconnectWS: {\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\tid_ws: String\n\t\t\t}),\n\t\t\tfunction: function(id_ws) {\n\t\t\t\treturn new Promise(async (resolve, reject) => {\n\t\t\t\t\tlet ws = ResolveIOServer.getMainServer().getWS(id_ws);\n\n\t\t\t\t\tif (ws) {\n\t\t\t\t\t\tResolveIOServer.getMainServer().unsubscribeWS(ws);\n\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\treject('No WS');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tdisconnectWS: {\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\tid_ws: String\n\t\t\t}),\n\t\t\tfunction: function(id_ws) {\n\t\t\t\treturn new Promise(async (resolve, reject) => {\n\t\t\t\t\tlet ws = ResolveIOServer.getMainServer().getWS(id_ws);\n\n\t\t\t\t\tif (ws) {\n\t\t\t\t\t\tResolveIOServer.getMainServer().unsubscribeWS(ws);\n\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\treject('No WS');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tcreateUserAndEmailEnrollment: {\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\tnewUser: {\n\t\t\t\t\ttype: Users['simplschema']\n\t\t\t\t},\n\t\t\t\tsendEnrollmentEmail: {\n\t\t\t\t\ttype: Boolean,\n\t\t\t\t\toptional: true\n\t\t\t\t}\n\t\t\t}),\n\t\t\tfunction: function(newUser: UserModel, sendEnrollmentEmail = true) {\n\t\t\t\treturn new Promise(async (resolve, reject) => {\n\t\t\t\t\tnewUser._id = objectIdHexString();\n\n\t\t\t\t\tnewUser.services = {\n\t\t\t\t\t\tenrollment: jwt.sign({id_user: newUser._id}, this.serverConfig['JWT_SECRET'], {\n\t\t\t\t\t\t\texpiresIn : 3 * 24 * 60 * 60 * 1000 // 3 days\n\t\t\t\t\t\t})\n\t\t\t\t\t};\n\t\t\t\t\t\n\t\t\t\t\tawait Users.insertOne(newUser);\n\n\t\t\t\t\tif (sendEnrollmentEmail) {\n\t\t\t\t\t\tlet emailData = {\n\t\t\t\t\t\t\tfullname: newUser.fullname,\n\t\t\t\t\t\t\tuser: this.user,\n\t\t\t\t\t\t\turl: this.serverConfig['ROOT_URL'] + '/enroll-account?' + encodeURIComponent(this.serverConfig['SERVER_URL']) + '&' + newUser.services['enrollment']\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tthis.readFile('email-templates/enrollment.html').then(html => {\n\t\t\t\t\t\t\tlet template = handlebars.compile(html);\n\t\t\t\t\t\t\thandlebars.registerHelper('equals', (a, b) => {\n\t\t\t\t\t\t\t\treturn a === b;\n\t\t\t\t\t\t\t});\n\t\t\n\t\t\t\t\t\t\tthis.sendEmail(newUser.email, 'ResolveIO (' + ResolveIOServer.getClientName() + ') - Enrollment Email', '', template(emailData));\n\t\t\n\t\t\t\t\t\t\tresolve(newUser);\n\t\t\t\t\t\t}, errEmail => reject(errEmail));\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tresetUserPassword: {\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\tuserId: {\n\t\t\t\t\ttype: String\n\t\t\t\t}\n\t\t\t}),\n\t\t\tfunction: function(userId: string) {\n\t\t\t\treturn new Promise(async (resolve, reject) => {\t\t\t\t\n\t\t\t\t\tlet user = await Users.findOne({_id: userId});\n\t\t\n\t\t\t\t\tif (user) {\n\t\t\t\t\t\tif (!user.services) {\n\t\t\t\t\t\t\tuser.services = {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tuser.services['forgot_password'] = jwt.sign({id_user: userId}, this.serverConfig['JWT_SECRET']);\n\n\t\t\t\t\t\tlet emailData = {\n\t\t\t\t\t\t\tuserToChangePassword: user.fullname,\n\t\t\t\t\t\t\tuserWhoResetPassword: this.user,\n\t\t\t\t\t\t\turl: this.serverConfig['ROOT_URL'] + '/forgot-password?' + encodeURIComponent(this.serverConfig['SERVER_URL']) + '&' + user.services['forgot_password']\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tUsers.updateOne({_id: user._id}, {$set: {services: user.services, attempts: 0}}).then(() => {\n\t\t\t\t\t\t\tthis.readFile('email-templates/forgot-password.html').then(html => {\n\t\t\t\t\t\t\t\tlet template = handlebars.compile(html);\n\t\t\t\t\t\t\t\thandlebars.registerHelper('equals', (a, b) => {\n\t\t\t\t\t\t\t\t\treturn a === b;\n\t\t\t\t\t\t\t\t});\n\t\t\t\n\t\t\t\t\t\t\t\tthis.sendEmail(user.email, 'ResolveIO (' + ResolveIOServer.getClientName() + ') - Forgot Password', '', template(emailData));\n\t\t\t\n\t\t\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t\t\t}, errEmail => reject(errEmail));\n\t\t\t\t\t\t}, () => {});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tsetUserPassword: {\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\tuserId: {\n\t\t\t\t\ttype: String\n\t\t\t\t},\n\t\t\t\tpassword: {\n\t\t\t\t\ttype: String\n\t\t\t\t}\n\t\t\t}),\n\t\t\tfunction: function(userId: string, password: string) {\n\t\t\t\treturn new Promise(async (resolve, reject) => {\t\t\t\t\n\t\t\t\t\tlet user = await Users.findOne({_id: userId});\n\t\t\n\t\t\t\t\tif (user && !user.roles.super_admin) {\n\t\t\t\t\t\tawait Users.setPassword(user, password);\n\n\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\treject('Invalid User');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t});\n}"]}
|
|
1
|
+
{"version":3,"sources":["../../src/methods/accounts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAwC;AACxC,kEAAuD;AACvD,uCAAyC;AACzC,kCAAoC;AAGpC,kCAA2C;AAE3C,2DAA8D;AAE9D,SAAgB,kBAAkB,CAAC,aAA4B;IAC9D,aAAa,CAAC,OAAO,CAAC;QACrB,QAAQ,EAAE;YACT,KAAK,EAAE,IAAI,sBAAY,CAAC;gBACvB,KAAK,EAAE,MAAM;aACb,CAAC;YACF,QAAQ,EAAE,UAAS,KAAK;gBAAd,iBAYT;gBAXA,OAAO,IAAI,OAAO,CAAC,UAAO,OAAO,EAAE,MAAM;;;wBACpC,EAAE,GAAG,uBAAe,CAAC,aAAa,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;wBAEtD,IAAI,EAAE,EAAE;4BACP,uBAAe,CAAC,aAAa,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;4BAClD,OAAO,CAAC,IAAI,CAAC,CAAC;yBACd;6BACI;4BACJ,MAAM,CAAC,OAAO,CAAC,CAAC;yBAChB;;;qBACD,CAAC,CAAC;YACJ,CAAC;SACD;QACD,WAAW,EAAE;YACZ,KAAK,EAAE,IAAI,sBAAY,CAAC;gBACvB,KAAK,EAAE,MAAM;aACb,CAAC;YACF,QAAQ,EAAE,UAAS,KAAK;gBAAd,iBAYT;gBAXA,OAAO,IAAI,OAAO,CAAC,UAAO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AC,CAAC;;;gCAGd,MAAM,CAAC,cAAc,CAAC,CAAC;;;;;qBAExB,CAAC,CAAC;YACJ,CAAC;SACD;KACD,CAAC,CAAC;AACJ,CAAC;AAnKD,gDAmKC","file":"accounts.js","sourcesContent":["import SimpleSchema from 'simpl-schema';\nimport { Users } from '../collections/user.collection';\nimport * as handlebars from 'handlebars';\nimport * as jwt from 'jsonwebtoken';\nimport { LoggedInUsers } from '../collections/logged-in-users.collection';\nimport { MethodManager } from '../managers/method.manager';\nimport { ResolveIOServer } from '../index';\nimport { UserModel } from '../models/user.model';\nimport { objectIdHexString } from '../managers/mongo.manager';\n\nexport function loadAccountMethods(methodManager: MethodManager) {\n\tmethodManager.methods({\n\t\treloadWS: {\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\tid_ws: String\n\t\t\t}),\n\t\t\tfunction: function(id_ws) {\n\t\t\t\treturn new Promise(async (resolve, reject) => {\n\t\t\t\t\tlet ws = ResolveIOServer.getMainServer().getWS(id_ws);\n\n\t\t\t\t\tif (ws) {\n\t\t\t\t\t\tResolveIOServer.getMainServer().unsubscribeWS(ws);\n\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\treject('No WS');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\treconnectWS: {\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\tid_ws: String\n\t\t\t}),\n\t\t\tfunction: function(id_ws) {\n\t\t\t\treturn new Promise(async (resolve, reject) => {\n\t\t\t\t\tlet ws = ResolveIOServer.getMainServer().getWS(id_ws);\n\n\t\t\t\t\tif (ws) {\n\t\t\t\t\t\tResolveIOServer.getMainServer().unsubscribeWS(ws);\n\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\treject('No WS');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tdisconnectWS: {\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\tid_ws: String\n\t\t\t}),\n\t\t\tfunction: function(id_ws) {\n\t\t\t\treturn new Promise(async (resolve, reject) => {\n\t\t\t\t\tlet ws = ResolveIOServer.getMainServer().getWS(id_ws);\n\n\t\t\t\t\tif (ws) {\n\t\t\t\t\t\tResolveIOServer.getMainServer().unsubscribeWS(ws);\n\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\treject('No WS');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tcreateUserAndEmailEnrollment: {\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\tnewUser: {\n\t\t\t\t\ttype: Users['simplschema']\n\t\t\t\t},\n\t\t\t\tsendEnrollmentEmail: {\n\t\t\t\t\ttype: Boolean,\n\t\t\t\t\toptional: true\n\t\t\t\t}\n\t\t\t}),\n\t\t\tfunction: function(newUser: UserModel, sendEnrollmentEmail = true) {\n\t\t\t\treturn new Promise(async (resolve, reject) => {\n\t\t\t\t\tnewUser._id = objectIdHexString();\n\n\t\t\t\t\tnewUser.services = {\n\t\t\t\t\t\tenrollment: jwt.sign({id_user: newUser._id}, this.serverConfig['JWT_SECRET'], {\n\t\t\t\t\t\t\texpiresIn : 3 * 24 * 60 * 60 * 1000 // 3 days\n\t\t\t\t\t\t})\n\t\t\t\t\t};\n\t\t\t\t\t\n\t\t\t\t\tawait Users.insertOne(newUser);\n\n\t\t\t\t\tif (sendEnrollmentEmail) {\n\t\t\t\t\t\tlet emailData = {\n\t\t\t\t\t\t\tfullname: newUser.fullname,\n\t\t\t\t\t\t\tuser: this.user,\n\t\t\t\t\t\t\turl: this.serverConfig['ROOT_URL'] + '/enroll-account?' + encodeURIComponent(this.serverConfig['SERVER_URL']) + '&' + newUser.services['enrollment']\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tthis.readFile('email-templates/enrollment.html').then(html => {\n\t\t\t\t\t\t\tlet template = handlebars.compile(html);\n\t\t\t\t\t\t\thandlebars.registerHelper('equals', (a, b) => {\n\t\t\t\t\t\t\t\treturn a === b;\n\t\t\t\t\t\t\t});\n\t\t\n\t\t\t\t\t\t\tthis.sendEmail(newUser.email, 'ResolveIO (' + ResolveIOServer.getClientName() + ') - Enrollment Email', '', template(emailData));\n\t\t\n\t\t\t\t\t\t\tresolve(newUser);\n\t\t\t\t\t\t}, errEmail => reject(errEmail));\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tresetUserPassword: {\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\tuserId: {\n\t\t\t\t\ttype: String\n\t\t\t\t}\n\t\t\t}),\n\t\t\tfunction: function(userId: string) {\n\t\t\t\treturn new Promise(async (resolve, reject) => {\t\t\t\t\n\t\t\t\t\tlet user = await Users.findOne({_id: userId});\n\t\t\n\t\t\t\t\tif (user) {\n\t\t\t\t\t\tif (!user.services) {\n\t\t\t\t\t\t\tuser.services = {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tuser.services['forgot_password'] = jwt.sign({id_user: userId}, this.serverConfig['JWT_SECRET']);\n\n\t\t\t\t\t\tlet emailData = {\n\t\t\t\t\t\t\tuserToChangePassword: user.fullname,\n\t\t\t\t\t\t\tuserWhoResetPassword: this.user,\n\t\t\t\t\t\t\turl: this.serverConfig['ROOT_URL'] + '/forgot-password?' + encodeURIComponent(this.serverConfig['SERVER_URL']) + '&' + user.services['forgot_password']\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tUsers.updateOne({_id: user._id}, {$set: {services: user.services, attempts: 0}}).then(() => {\n\t\t\t\t\t\t\tthis.readFile('email-templates/forgot-password.html').then(html => {\n\t\t\t\t\t\t\t\tlet template = handlebars.compile(html);\n\t\t\t\t\t\t\t\thandlebars.registerHelper('equals', (a, b) => {\n\t\t\t\t\t\t\t\t\treturn a === b;\n\t\t\t\t\t\t\t\t});\n\t\t\t\n\t\t\t\t\t\t\t\tthis.sendEmail(user.email, 'ResolveIO (' + ResolveIOServer.getClientName() + ') - Forgot Password', '', template(emailData));\n\t\t\t\n\t\t\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t\t\t}, errEmail => reject(errEmail));\n\t\t\t\t\t\t}, () => {});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tsetUserPassword: {\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\tuserId: {\n\t\t\t\t\ttype: String\n\t\t\t\t},\n\t\t\t\tpassword: {\n\t\t\t\t\ttype: String\n\t\t\t\t}\n\t\t\t}),\n\t\t\tfunction: function(userId: string, password: string) {\n\t\t\t\treturn new Promise(async (resolve, reject) => {\t\t\t\t\n\t\t\t\t\tlet user = await Users.findOne({_id: userId});\n\t\t\n\t\t\t\t\tif (user && !user.roles.super_admin) {\n\t\t\t\t\t\tawait Users.setPassword(user, password);\n\n\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\treject('Invalid User');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t});\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/models/logged-in-users.model.ts"],"names":[],"mappings":"","file":"logged-in-users.model.js","sourcesContent":["import { CollectionDocument } from './collection-document.model';\n\nexport interface LoggedInUserModel extends CollectionDocument {\n\tdate: Date;\n\tid_user: string;\n\tuser: string;\n\tid_ws: string;\n\
|
|
1
|
+
{"version":3,"sources":["../../src/models/logged-in-users.model.ts"],"names":[],"mappings":"","file":"logged-in-users.model.js","sourcesContent":["import { CollectionDocument } from './collection-document.model';\n\nexport interface LoggedInUserModel extends CollectionDocument {\n\tdate: Date;\n\tid_user: string;\n\tuser: string;\n\tid_ws: string;\n\tlatency?: number;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@resolveio/server-lib",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.3.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"package": "npm run build-prod && npm pack ./dist",
|
|
@@ -12,16 +12,16 @@
|
|
|
12
12
|
"author": "",
|
|
13
13
|
"license": "ISC",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@aws-sdk/client-s3": "3.
|
|
16
|
-
"@aws-sdk/s3-request-presigner": "3.
|
|
17
|
-
"axios": "0.
|
|
18
|
-
"body-parser": "1.19.
|
|
15
|
+
"@aws-sdk/client-s3": "3.51.0",
|
|
16
|
+
"@aws-sdk/s3-request-presigner": "3.51.0",
|
|
17
|
+
"axios": "0.26.0",
|
|
18
|
+
"body-parser": "1.19.2",
|
|
19
19
|
"clone": "2.1.2",
|
|
20
20
|
"cron": "1.8.2",
|
|
21
21
|
"crypto": "1.0.1",
|
|
22
22
|
"deep-diff": "1.0.2",
|
|
23
23
|
"exceljs": "3.6.0",
|
|
24
|
-
"express": "4.17.
|
|
24
|
+
"express": "4.17.3",
|
|
25
25
|
"express-xml-bodyparser": "0.3.0",
|
|
26
26
|
"handlebars": "4.7.7",
|
|
27
27
|
"imap": "0.8.19",
|
|
@@ -29,32 +29,32 @@
|
|
|
29
29
|
"jsonwebtoken": "8.5.1",
|
|
30
30
|
"jwt-decode": "3.1.2",
|
|
31
31
|
"moment": "2.29.1",
|
|
32
|
-
"moment-timezone": "0.5.
|
|
32
|
+
"moment-timezone": "0.5.34",
|
|
33
33
|
"mongodb": "4.2.1",
|
|
34
34
|
"node-cache": "5.1.2",
|
|
35
35
|
"node-google-timezone": "0.1.1",
|
|
36
|
-
"nodemailer": "6.7.
|
|
36
|
+
"nodemailer": "6.7.2",
|
|
37
37
|
"nodemailer-ses-transport": "1.5.1",
|
|
38
38
|
"path": "0.12.7",
|
|
39
|
-
"pdf-lib": "1.17.
|
|
39
|
+
"pdf-lib": "1.17.1",
|
|
40
40
|
"pm2": "5.1.2",
|
|
41
|
-
"puppeteer": "13.
|
|
41
|
+
"puppeteer": "13.3.2",
|
|
42
42
|
"rus-diff": "1.1.0",
|
|
43
43
|
"scmp": "2.1.0",
|
|
44
44
|
"simpl-schema": "1.12.0",
|
|
45
45
|
"string-similarity": "4.0.4",
|
|
46
46
|
"string_score": "0.1.22",
|
|
47
|
-
"twilio": "3.
|
|
47
|
+
"twilio": "3.74.0",
|
|
48
48
|
"uuid": "8.3.2",
|
|
49
|
-
"ws": "8.
|
|
49
|
+
"ws": "8.5.0",
|
|
50
50
|
"xlsx": "0.16.8"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/express": "4.17.13",
|
|
54
54
|
"@types/handlebars": "4.1.0",
|
|
55
|
-
"@types/jsonwebtoken": "8.5.
|
|
55
|
+
"@types/jsonwebtoken": "8.5.8",
|
|
56
56
|
"@types/nodemailer": "6.4.4",
|
|
57
|
-
"@types/ws": "8.2.
|
|
57
|
+
"@types/ws": "8.2.2",
|
|
58
58
|
"del": "3.0.0",
|
|
59
59
|
"express-livereload": "0.0.24",
|
|
60
60
|
"gulp": "4.0.2",
|
|
@@ -69,16 +69,16 @@
|
|
|
69
69
|
"typescript": "4.1.3"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
|
-
"@aws-sdk/client-s3": "3.
|
|
73
|
-
"@aws-sdk/s3-request-presigner": "3.
|
|
74
|
-
"axios": "0.
|
|
75
|
-
"body-parser": "1.19.
|
|
72
|
+
"@aws-sdk/client-s3": "3.51.0",
|
|
73
|
+
"@aws-sdk/s3-request-presigner": "3.51.0",
|
|
74
|
+
"axios": "0.26.0",
|
|
75
|
+
"body-parser": "1.19.2",
|
|
76
76
|
"clone": "2.1.2",
|
|
77
77
|
"cron": "1.8.2",
|
|
78
78
|
"crypto": "1.0.1",
|
|
79
79
|
"deep-diff": "1.0.2",
|
|
80
80
|
"exceljs": "3.6.0",
|
|
81
|
-
"express": "4.17.
|
|
81
|
+
"express": "4.17.3",
|
|
82
82
|
"express-xml-bodyparser": "0.3.0",
|
|
83
83
|
"handlebars": "4.7.7",
|
|
84
84
|
"imap": "0.8.19",
|
|
@@ -86,24 +86,24 @@
|
|
|
86
86
|
"jsonwebtoken": "8.5.1",
|
|
87
87
|
"jwt-decode": "3.1.2",
|
|
88
88
|
"moment": "2.29.1",
|
|
89
|
-
"moment-timezone": "0.5.
|
|
89
|
+
"moment-timezone": "0.5.34",
|
|
90
90
|
"mongodb": "4.2.1",
|
|
91
91
|
"node-cache": "5.1.2",
|
|
92
92
|
"node-google-timezone": "0.1.1",
|
|
93
|
-
"nodemailer": "6.7.
|
|
93
|
+
"nodemailer": "6.7.2",
|
|
94
94
|
"nodemailer-ses-transport": "1.5.1",
|
|
95
95
|
"path": "0.12.7",
|
|
96
|
-
"pdf-lib": "1.17.
|
|
96
|
+
"pdf-lib": "1.17.1",
|
|
97
97
|
"pm2": "5.1.2",
|
|
98
|
-
"puppeteer": "13.
|
|
98
|
+
"puppeteer": "13.3.2",
|
|
99
99
|
"rus-diff": "1.1.0",
|
|
100
100
|
"scmp": "2.1.0",
|
|
101
101
|
"simpl-schema": "1.12.0",
|
|
102
102
|
"string-similarity": "4.0.4",
|
|
103
103
|
"string_score": "0.1.22",
|
|
104
|
-
"twilio": "3.
|
|
104
|
+
"twilio": "3.74.0",
|
|
105
105
|
"uuid": "8.3.2",
|
|
106
|
-
"ws": "8.
|
|
106
|
+
"ws": "8.5.0",
|
|
107
107
|
"xlsx": "0.16.8"
|
|
108
108
|
}
|
|
109
109
|
}
|
package/public_api.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from './collections/app-status.collection';
|
|
2
|
-
export * from './collections/app-version.collection';
|
|
3
2
|
export * from './collections/counter.collection';
|
|
4
3
|
export * from './collections/cron-job-history.collection';
|
|
5
4
|
export * from './collections/cron-job.collection';
|
|
@@ -22,7 +21,6 @@ export * from './collections/user-group.collection';
|
|
|
22
21
|
export * from './collections/user-guide.collection';
|
|
23
22
|
export * from './collections/user.collection';
|
|
24
23
|
export * from './models/app-status.model';
|
|
25
|
-
export * from './models/app-version.model';
|
|
26
24
|
export * from './models/billing-logged-in-users.model';
|
|
27
25
|
export * from './models/collection-document.model';
|
|
28
26
|
export * from './models/counter.model';
|
package/public_api.js
CHANGED
|
@@ -11,7 +11,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./collections/app-status.collection"), exports);
|
|
14
|
-
__exportStar(require("./collections/app-version.collection"), exports);
|
|
15
14
|
__exportStar(require("./collections/counter.collection"), exports);
|
|
16
15
|
__exportStar(require("./collections/cron-job-history.collection"), exports);
|
|
17
16
|
__exportStar(require("./collections/cron-job.collection"), exports);
|
|
@@ -34,7 +33,6 @@ __exportStar(require("./collections/user-group.collection"), exports);
|
|
|
34
33
|
__exportStar(require("./collections/user-guide.collection"), exports);
|
|
35
34
|
__exportStar(require("./collections/user.collection"), exports);
|
|
36
35
|
__exportStar(require("./models/app-status.model"), exports);
|
|
37
|
-
__exportStar(require("./models/app-version.model"), exports);
|
|
38
36
|
__exportStar(require("./models/billing-logged-in-users.model"), exports);
|
|
39
37
|
__exportStar(require("./models/collection-document.model"), exports);
|
|
40
38
|
__exportStar(require("./models/counter.model"), exports);
|
package/public_api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/public_api.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sEAAoD;AACpD,
|
|
1
|
+
{"version":3,"sources":["../../src/public_api.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sEAAoD;AACpD,mEAAiD;AACjD,4EAA0D;AAC1D,oEAAkD;AAClD,yEAAuD;AACvD,0EAAwD;AACxD,gEAA8C;AAC9C,gEAA8C;AAC9C,8EAA4D;AAC5D,4EAA0D;AAC1D,+DAA6C;AAC7C,2EAAyD;AACzD,2EAAyD;AACzD,uEAAqD;AACrD,0EAAwD;AACxD,yEAAuD;AACvD,wEAAsD;AACtD,kFAAgE;AAChE,iFAA+D;AAC/D,sEAAoD;AACpD,sEAAoD;AACpD,gEAA8C;AAC9C,4DAA0C;AAC1C,yEAAuD;AACvD,qEAAmD;AACnD,yDAAuC;AACvC,kEAAgD;AAChD,0DAAwC;AACxC,wDAAsC;AACtC,+DAA6C;AAC7C,gEAA8C;AAC9C,sDAAoC;AACpC,sDAAoC;AACpC,oEAAkD;AAClD,kEAAgD;AAChD,qDAAmC;AACnC,iEAA+C;AAC/C,iEAA+C;AAC/C,wDAAsC;AACtC,6DAA2C;AAC3C,gEAA8C;AAC9C,+DAA6C;AAC7C,8DAA4C;AAC5C,4DAA0C;AAC1C,4DAA0C;AAC1C,wEAAsD;AACtD,uEAAqD;AACrD,gEAA8C;AAC9C,mEAAiD;AACjD,iEAA+C;AAC/C,8DAA4C;AAC5C,gEAA8C;AAC9C,4DAA0C;AAC1C,4DAA0C;AAC1C,sDAAoC;AACpC,gDAA8B;AAC9B,2DAAyC","file":"public_api.js","sourcesContent":["export * from './collections/app-status.collection';\nexport * from './collections/counter.collection';\nexport * from './collections/cron-job-history.collection';\nexport * from './collections/cron-job.collection';\nexport * from './collections/email-history.collection';\nexport * from './collections/email-verified.collection';\nexport * from './collections/file.collection';\nexport * from './collections/flag.collection';\nexport * from './collections/log-method-latency.collection';\nexport * from './collections/log-subscription.collection';\nexport * from './collections/log.collection';\nexport * from './collections/logged-in-users.collection';\nexport * from './collections/method-response.collection';\nexport * from './collections/monitor-cpu.collection';\nexport * from './collections/monitor-memory.collection';\nexport * from './collections/monitor-mongo.collection';\nexport * from './collections/notification.collection';\nexport * from './collections/report-builder-library.collection';\nexport * from './collections/report-builder-report.collection';\nexport * from './collections/user-group.collection';\nexport * from './collections/user-guide.collection';\nexport * from './collections/user.collection';\nexport * from './models/app-status.model';\nexport * from './models/billing-logged-in-users.model';\nexport * from './models/collection-document.model';\nexport * from './models/counter.model';\nexport * from './models/cron-job-history.model';\nexport * from './models/cron-job.model';\nexport * from './models/dialog.model';\nexport * from './models/email-history.model';\nexport * from './models/email-verified.model';\nexport * from './models/file.model';\nexport * from './models/flag.model';\nexport * from './models/log-method-latency.model';\nexport * from './models/log-subscription.model';\nexport * from './models/log.model';\nexport * from './models/logged-in-users.model';\nexport * from './models/method-response.model';\nexport * from './models/method.model';\nexport * from './models/monitor-cpu.model';\nexport * from './models/monitor-memory.model';\nexport * from './models/monitor-mongo.model';\nexport * from './models/notification.model';\nexport * from './models/pagination.model';\nexport * from './models/permission.model';\nexport * from './models/report-builder-library.model';\nexport * from './models/report-builder-report.model';\nexport * from './models/report-builder.model';\nexport * from './models/select-data-label.model';\nexport * from './models/server-response.model';\nexport * from './models/subscription.model';\nexport * from './models/support-ticket.model';\nexport * from './models/user-group.model';\nexport * from './models/user-guide.model';\nexport * from './models/user.model';\nexport * from './util/common';\nexport * from './managers/mongo.manager';"]}
|
package/server-app.js
CHANGED
|
@@ -286,50 +286,45 @@ var ResolveIOMainServer = /** @class */ (function () {
|
|
|
286
286
|
cb(false, 401, 'Unauthorized');
|
|
287
287
|
}
|
|
288
288
|
else {
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
cb(false, 401, 'Unauthorized');
|
|
293
|
-
}
|
|
294
|
-
else {
|
|
295
|
-
jwt.verify(token, this._serverConfig['JWT_SECRET'], function (err, decoded) { return __awaiter(_this, void 0, void 0, function () {
|
|
296
|
-
var user, err_1;
|
|
297
|
-
return __generator(this, function (_a) {
|
|
298
|
-
switch (_a.label) {
|
|
299
|
-
case 0:
|
|
300
|
-
if (!err) return [3 /*break*/, 1];
|
|
301
|
-
cb(false, 401, 'Unauthorized');
|
|
302
|
-
return [3 /*break*/, 5];
|
|
303
|
-
case 1:
|
|
304
|
-
info.req['id_user'] = decoded['id_user'];
|
|
305
|
-
_a.label = 2;
|
|
306
|
-
case 2:
|
|
307
|
-
_a.trys.push([2, 4, , 5]);
|
|
308
|
-
return [4 /*yield*/, user_collection_1.Users.findById(decoded['id_user'])];
|
|
309
|
-
case 3:
|
|
310
|
-
user = _a.sent();
|
|
311
|
-
if (user) {
|
|
312
|
-
info.req['user'] = user.fullname;
|
|
313
|
-
info.req['user_readonly'] = user.readonly || false;
|
|
314
|
-
info.req['doc_user'] = user;
|
|
315
|
-
cb(true);
|
|
316
|
-
}
|
|
317
|
-
else {
|
|
318
|
-
cb(false);
|
|
319
|
-
}
|
|
320
|
-
return [3 /*break*/, 5];
|
|
321
|
-
case 4:
|
|
322
|
-
err_1 = _a.sent();
|
|
323
|
-
cb(false);
|
|
324
|
-
return [3 /*break*/, 5];
|
|
325
|
-
case 5: return [2 /*return*/];
|
|
326
|
-
}
|
|
327
|
-
});
|
|
328
|
-
}); });
|
|
329
|
-
}
|
|
289
|
+
token = infoData[0];
|
|
290
|
+
if (!token) {
|
|
291
|
+
cb(false, 401, 'Unauthorized');
|
|
330
292
|
}
|
|
331
293
|
else {
|
|
332
|
-
|
|
294
|
+
jwt.verify(token, this._serverConfig['JWT_SECRET'], function (err, decoded) { return __awaiter(_this, void 0, void 0, function () {
|
|
295
|
+
var user, err_1;
|
|
296
|
+
return __generator(this, function (_a) {
|
|
297
|
+
switch (_a.label) {
|
|
298
|
+
case 0:
|
|
299
|
+
if (!err) return [3 /*break*/, 1];
|
|
300
|
+
cb(false, 401, 'Unauthorized');
|
|
301
|
+
return [3 /*break*/, 5];
|
|
302
|
+
case 1:
|
|
303
|
+
info.req['id_user'] = decoded['id_user'];
|
|
304
|
+
_a.label = 2;
|
|
305
|
+
case 2:
|
|
306
|
+
_a.trys.push([2, 4, , 5]);
|
|
307
|
+
return [4 /*yield*/, user_collection_1.Users.findById(decoded['id_user'])];
|
|
308
|
+
case 3:
|
|
309
|
+
user = _a.sent();
|
|
310
|
+
if (user) {
|
|
311
|
+
info.req['user'] = user.fullname;
|
|
312
|
+
info.req['user_readonly'] = user.readonly || false;
|
|
313
|
+
info.req['doc_user'] = user;
|
|
314
|
+
cb(true);
|
|
315
|
+
}
|
|
316
|
+
else {
|
|
317
|
+
cb(false);
|
|
318
|
+
}
|
|
319
|
+
return [3 /*break*/, 5];
|
|
320
|
+
case 4:
|
|
321
|
+
err_1 = _a.sent();
|
|
322
|
+
cb(false);
|
|
323
|
+
return [3 /*break*/, 5];
|
|
324
|
+
case 5: return [2 /*return*/];
|
|
325
|
+
}
|
|
326
|
+
});
|
|
327
|
+
}); });
|
|
333
328
|
}
|
|
334
329
|
}
|
|
335
330
|
return [2 /*return*/];
|
|
@@ -365,6 +360,14 @@ var ResolveIOMainServer = /** @class */ (function () {
|
|
|
365
360
|
ws['user'] = req['user'];
|
|
366
361
|
ws['user_readonly'] = req['user_readonly'];
|
|
367
362
|
ws['doc_user'] = req['doc_user'];
|
|
363
|
+
if (ws['user'] !== 'Admin' && _this._serverConfig['CLIENT_NAME'] !== 'ResolveIO') {
|
|
364
|
+
_this.getMethodManager().callMethodInternal.call(_this.getMethodManager(), 'supportCreateBillingUser', {
|
|
365
|
+
id_user: ws['id_user'],
|
|
366
|
+
user: ws['user'],
|
|
367
|
+
date: new Date(),
|
|
368
|
+
client: index_1.ResolveIOServer.getClientName()
|
|
369
|
+
});
|
|
370
|
+
}
|
|
368
371
|
var idSocket = '';
|
|
369
372
|
while (!idSocket || Array.from(_this._wss.clients).some(function (a) { return a['id_socket'] === idSocket; })) {
|
|
370
373
|
idSocket = uuid_1.v4();
|
|
@@ -388,19 +391,13 @@ var ResolveIOMainServer = /** @class */ (function () {
|
|
|
388
391
|
ws['latency'] = moment.duration(moment(ws['pongTime']).diff(ws['pingTime'])).asMilliseconds();
|
|
389
392
|
_this._subscriptionManager.loggedInLatency(ws);
|
|
390
393
|
});
|
|
391
|
-
ws['versionTimer'] = setTimeout(function () {
|
|
392
|
-
if (_this._subscriptionManager.getEnableDebug()) {
|
|
393
|
-
console.log(new Date(), 'Server App', 'Version Timer');
|
|
394
|
-
}
|
|
395
|
-
_this.unsubscribeWS(ws);
|
|
396
|
-
}, 20000);
|
|
397
394
|
// On data received (message)
|
|
398
395
|
ws.on('message', function (message) { return __awaiter(_this, void 0, void 0, function () {
|
|
399
|
-
var parseErrorFound, socketData, messageRoute_1, messageDate, messageId, type, subType, pub, serverRes, offlineUpdates, i, update, serverResMethod, i, update, data, updateRoute, updateDate, updateMessageId, updateType, method, methodLatencyId, err_2
|
|
400
|
-
var _a
|
|
396
|
+
var parseErrorFound, socketData, messageRoute_1, messageDate, messageId, type, subType, pub, serverRes, offlineUpdates, i, update, serverResMethod, i, update, data, updateRoute, updateDate, updateMessageId, updateType, method, methodLatencyId, err_2;
|
|
397
|
+
var _a;
|
|
401
398
|
var _this = this;
|
|
402
|
-
return __generator(this, function (
|
|
403
|
-
switch (
|
|
399
|
+
return __generator(this, function (_b) {
|
|
400
|
+
switch (_b.label) {
|
|
404
401
|
case 0:
|
|
405
402
|
if (this.LOGGER === 'DEBUG') {
|
|
406
403
|
console.log('Message from: ' + ws['user'], message);
|
|
@@ -443,11 +440,11 @@ var ResolveIOMainServer = /** @class */ (function () {
|
|
|
443
440
|
pub = socketData[5];
|
|
444
441
|
// Subscribe
|
|
445
442
|
if (subType === 'sub') {
|
|
446
|
-
|
|
443
|
+
this._subscriptionManager.subscribe(messageRoute_1, messageDate, ws, messageId, pub, socketData.slice(6));
|
|
447
444
|
}
|
|
448
445
|
// Unsubscribe
|
|
449
446
|
else {
|
|
450
|
-
|
|
447
|
+
this._subscriptionManager.unsubscribe(messageRoute_1, messageDate, ws, messageId, pub, socketData.slice(6));
|
|
451
448
|
}
|
|
452
449
|
return [3 /*break*/, 11];
|
|
453
450
|
case 1:
|
|
@@ -489,7 +486,7 @@ var ResolveIOMainServer = /** @class */ (function () {
|
|
|
489
486
|
}
|
|
490
487
|
}
|
|
491
488
|
i = 0;
|
|
492
|
-
|
|
489
|
+
_b.label = 2;
|
|
493
490
|
case 2:
|
|
494
491
|
if (!(i < offlineUpdates.length)) return [3 /*break*/, 9];
|
|
495
492
|
update = offlineUpdates[i];
|
|
@@ -511,7 +508,7 @@ var ResolveIOMainServer = /** @class */ (function () {
|
|
|
511
508
|
latency_ms: 0,
|
|
512
509
|
method: method
|
|
513
510
|
});
|
|
514
|
-
if (method !== 'reportBuilderGetResults' && method !== 'reportBuilderGetDistinctValue' && method !== 'reportBuilderBuildTree' && method !== 'generatePDF' && method !== 'getWOOfflineData' && method !== 'countQuery' && method !== 'countWithQuery' && method !== 'countCollectionWithQuery' && method !== 'find' && method !== 'findOne' && method !== 'findWithOptions' && method !== '
|
|
511
|
+
if (method !== 'reportBuilderGetResults' && method !== 'reportBuilderGetDistinctValue' && method !== 'reportBuilderBuildTree' && method !== 'generatePDF' && method !== 'getWOOfflineData' && method !== 'countQuery' && method !== 'countWithQuery' && method !== 'countCollectionWithQuery' && method !== 'find' && method !== 'findOne' && method !== 'findWithOptions' && method !== 'getDrivers') {
|
|
515
512
|
log_collection_1.Logs.insertOne({
|
|
516
513
|
_id: mongo_manager_1.objectIdHexString(),
|
|
517
514
|
type: 'client-request',
|
|
@@ -526,15 +523,15 @@ var ResolveIOMainServer = /** @class */ (function () {
|
|
|
526
523
|
});
|
|
527
524
|
}
|
|
528
525
|
if (!this._methodManager._methods[method]) return [3 /*break*/, 7];
|
|
529
|
-
|
|
526
|
+
_b.label = 3;
|
|
530
527
|
case 3:
|
|
531
|
-
|
|
532
|
-
return [4 /*yield*/, (
|
|
528
|
+
_b.trys.push([3, 5, , 6]);
|
|
529
|
+
return [4 /*yield*/, (_a = this._methodManager.callMethodInternal).call.apply(_a, __spreadArrays([Object.assign({}, this._methodManager, { id_user: ws['id_user'], user: ws['user'], id_ws: ws['id_socket'] }), method], data))];
|
|
533
530
|
case 4:
|
|
534
|
-
|
|
531
|
+
_b.sent();
|
|
535
532
|
return [3 /*break*/, 6];
|
|
536
533
|
case 5:
|
|
537
|
-
err_2 =
|
|
534
|
+
err_2 = _b.sent();
|
|
538
535
|
console.log(new Date(), 'Offline Error', JSON.stringify(err_2, null, 2));
|
|
539
536
|
return [3 /*break*/, 6];
|
|
540
537
|
case 6:
|
|
@@ -544,54 +541,17 @@ var ResolveIOMainServer = /** @class */ (function () {
|
|
|
544
541
|
return [3 /*break*/, 8];
|
|
545
542
|
case 7:
|
|
546
543
|
console.log('Offline - Could not find method: ' + method);
|
|
547
|
-
|
|
544
|
+
_b.label = 8;
|
|
548
545
|
case 8:
|
|
549
546
|
i++;
|
|
550
547
|
return [3 /*break*/, 2];
|
|
551
548
|
case 9: return [3 /*break*/, 11];
|
|
552
549
|
case 10:
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
hasError: false,
|
|
559
|
-
data: 'ACK'
|
|
560
|
-
};
|
|
561
|
-
if (ws && ws.readyState === ws.OPEN) {
|
|
562
|
-
ws.send(JSON.stringify(serverRes), function (error) {
|
|
563
|
-
if (error) {
|
|
564
|
-
console.log('Error on WS: ', error);
|
|
565
|
-
if (_this._subscriptionManager.getEnableDebug()) {
|
|
566
|
-
console.log(new Date(), 'Server App', 'Error WS Set WS APP Version');
|
|
567
|
-
}
|
|
568
|
-
_this.unsubscribeWS(ws);
|
|
569
|
-
}
|
|
570
|
-
});
|
|
571
|
-
}
|
|
572
|
-
methodLatencyId = mongo_manager_1.objectIdHexString();
|
|
573
|
-
log_method_latency_collection_1.LogMethodLatencies.create({
|
|
574
|
-
_id: methodLatencyId,
|
|
575
|
-
__v: 0,
|
|
576
|
-
date_start: new Date(),
|
|
577
|
-
date_end: null,
|
|
578
|
-
latency_ms: 0,
|
|
579
|
-
method: method
|
|
580
|
-
});
|
|
581
|
-
if (this._methodManager._methods[method]) {
|
|
582
|
-
(_d = this._methodManager).callMethod.apply(_d, __spreadArrays([methodLatencyId, ws, messageDate, messageId, method], socketData.slice(5)));
|
|
583
|
-
}
|
|
584
|
-
else {
|
|
585
|
-
console.log('Could not find method: ' + method);
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
else {
|
|
589
|
-
this._msgQueue.splice(0, 0, {
|
|
590
|
-
ws: ws,
|
|
591
|
-
data: socketData
|
|
592
|
-
});
|
|
593
|
-
}
|
|
594
|
-
_e.label = 11;
|
|
550
|
+
this._msgQueue.splice(0, 0, {
|
|
551
|
+
ws: ws,
|
|
552
|
+
data: socketData
|
|
553
|
+
});
|
|
554
|
+
_b.label = 11;
|
|
595
555
|
case 11: return [2 /*return*/];
|
|
596
556
|
}
|
|
597
557
|
});
|