@meru2802/aux-server 1.0.2 → 1.0.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"coreController.d.ts","sourceRoot":"","sources":["../../src/controllers/coreController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAelD,qBAAa,cAAe,SAAQ,cAAc;gBACpC,gBAAgB,CAAC,EAAE,iBAAiB;IAIzC,eAAe,GACpB,KAAK,OAAO,EACZ,KAAK,QAAQ,KACZ,OAAO,CAAC,IAAI,CAAC,CAkJd;IAEK,iBAAiB,GACtB,KAAK,OAAO,EACZ,KAAK,QAAQ,KACZ,OAAO,CAAC,IAAI,CAAC,CAoHd;IAEK,cAAc,GACnB,KAAK,OAAO,EACZ,KAAK,QAAQ,KACZ,OAAO,CAAC,IAAI,CAAC,CAyLd;IAEK,wBAAwB,GAAI,KAAK,OAAO,EAAE,KAAK,QAAQ,UAgF5D;CACH"}
1
+ {"version":3,"file":"coreController.d.ts","sourceRoot":"","sources":["../../src/controllers/coreController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAelD,qBAAa,cAAe,SAAQ,cAAc;gBACpC,gBAAgB,CAAC,EAAE,iBAAiB;IAIzC,eAAe,GACpB,KAAK,OAAO,EACZ,KAAK,QAAQ,KACZ,OAAO,CAAC,IAAI,CAAC,CAkJd;IAEK,iBAAiB,GACtB,KAAK,OAAO,EACZ,KAAK,QAAQ,KACZ,OAAO,CAAC,IAAI,CAAC,CAoHd;IAEK,cAAc,GACnB,KAAK,OAAO,EACZ,KAAK,QAAQ,KACZ,OAAO,CAAC,IAAI,CAAC,CA8Ld;IAEK,wBAAwB,GAAI,KAAK,OAAO,EAAE,KAAK,QAAQ,UAgF5D;CACH"}
@@ -256,7 +256,7 @@ class CoreController extends BaseController_1.BaseController {
256
256
  for (const username of users) {
257
257
  const userId = foundUsers.get(username);
258
258
  if (userId) {
259
- const meshUserId = `user//${username}___${userId}`;
259
+ const meshUserId = `user//${username}___${userId}`.toLowerCase();
260
260
  meshUserIds.push(meshUserId);
261
261
  }
262
262
  else {
@@ -285,7 +285,9 @@ class CoreController extends BaseController_1.BaseController {
285
285
  meshadmin: 4294967295,
286
286
  remove: false,
287
287
  };
288
+ console.log(`Add Mesh User Message: ${JSON.stringify(addMeshUserMessage)}`);
288
289
  const addMeshUserMessageSent = this.WebSocketService.sendMessage(addMeshUserMessage);
290
+ console.log(addMeshUserMessageSent);
289
291
  if (!addMeshUserMessageSent) {
290
292
  const errorResponse = {
291
293
  error: "Could Not Send Message Over Socket",
@@ -330,10 +332,9 @@ class CoreController extends BaseController_1.BaseController {
330
332
  return;
331
333
  try {
332
334
  const message = JSON.parse(data.toString());
333
- if (message.action === types_1.MeshActions.EVENT &&
334
- message.event.etype === "user" &&
335
- message.event.action === "accountchange" &&
336
- message.event.msg.includes("Device group membership changed")) {
335
+ console.log(`Mesh Message received: ${JSON.stringify(message)}`);
336
+ if (message.action == types_1.MeshActions.EVENT &&
337
+ message.event.msgid == 78) {
337
338
  const changedUser = message.event.msgArgs[0];
338
339
  if (changedUser &&
339
340
  meshUserIds.some((userId) => userId.includes(changedUser))) {
@@ -356,6 +357,7 @@ class CoreController extends BaseController_1.BaseController {
356
357
  }
357
358
  catch (parseError) {
358
359
  console.error("Error parsing WebSocket message:", parseError);
360
+ reject(parseError);
359
361
  }
360
362
  };
361
363
  this.webSocket.on("message", messageHandler);
@@ -17,7 +17,7 @@ class HealthController extends BaseController_1.BaseController {
17
17
  this.status = (req, res) => {
18
18
  const response = {
19
19
  service: "aux-server",
20
- version: "1.0.2",
20
+ version: "1.0.3",
21
21
  meshCentral: {
22
22
  connected: this.isWebSocketConnected,
23
23
  server: this.meshServer,
@@ -1 +1 @@
1
- {"version":3,"file":"authMiddleware.d.ts","sourceRoot":"","sources":["../../src/middleware/authMiddleware.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKlD,qBAAa,cAAe,SAAQ,cAAc;gBACpC,gBAAgB,CAAC,EAAE,iBAAiB;IAIzC,QAAQ,GAAI,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,UA2KhE;IAEK,WAAW,GAChB,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,MAAM,YAAY,KACjB,OAAO,CAAC,IAAI,CAAC,CAgFd;CACH"}
1
+ {"version":3,"file":"authMiddleware.d.ts","sourceRoot":"","sources":["../../src/middleware/authMiddleware.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKlD,qBAAa,cAAe,SAAQ,cAAc;gBACpC,gBAAgB,CAAC,EAAE,iBAAiB;IAIzC,QAAQ,GAAI,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,UA2KhE;IAEK,WAAW,GAChB,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,MAAM,YAAY,KACjB,OAAO,CAAC,IAAI,CAAC,CAoFd;CACH"}
@@ -235,7 +235,9 @@ class AuthMiddleware extends BaseMiddleware_1.BaseMiddleware {
235
235
  headers: {
236
236
  "Content-Type": "application/x-www-form-urlencoded",
237
237
  },
238
+ validateStatus: () => true,
238
239
  });
240
+ console.log(`Introspect result: ${JSON.stringify(introspect_result.data)}, ${JSON.stringify(introspect_result.status)}`);
239
241
  if (introspect_result.status != 200) {
240
242
  const unauthorizedResponse = {
241
243
  error: introspect_result.statusText,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meru2802/aux-server",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Nexus EPM auxillary server to facilitate additional functionality required by Scogo Iceberg",
5
5
  "main": "index.js",
6
6
  "files": [