@cadenza.io/service 1.15.2 → 1.15.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.
package/dist/index.js CHANGED
@@ -1044,8 +1044,8 @@ var RestController = class _RestController {
1044
1044
  );
1045
1045
  app.use((req, res, next) => {
1046
1046
  new import_rate_limiter_flexible.RateLimiterMemory({
1047
- points: 1e3,
1048
- duration: 300
1047
+ points: 1e4,
1048
+ duration: 10
1049
1049
  }).consume(req.ip).then(() => next()).catch(
1050
1050
  () => res.status(429).json({ error: "Too many requests" })
1051
1051
  );
@@ -1075,7 +1075,7 @@ var RestController = class _RestController {
1075
1075
  );
1076
1076
  app.use((req, res, next) => {
1077
1077
  new import_rate_limiter_flexible.RateLimiterMemory({
1078
- points: 50,
1078
+ points: 1e3,
1079
1079
  duration: 60,
1080
1080
  blockDuration: 300
1081
1081
  }).consume(req.ip).then(() => next()).catch((rej) => {
@@ -1494,9 +1494,9 @@ var SocketController = class _SocketController {
1494
1494
  return next(new Error("Unauthorized origin"));
1495
1495
  }
1496
1496
  const limiterOptions = {
1497
- low: { points: Infinity, duration: 300 },
1498
- medium: { points: 1e3, duration: 300 },
1499
- high: { points: 100, duration: 60, blockDuration: 300 }
1497
+ low: { points: Infinity, duration: 1 },
1498
+ medium: { points: 1e4, duration: 10 },
1499
+ high: { points: 1e3, duration: 60, blockDuration: 300 }
1500
1500
  };
1501
1501
  const limiter = new import_rate_limiter_flexible2.RateLimiterMemory(limiterOptions[profile]);
1502
1502
  socket.use((packet, next2) => {
@@ -1687,6 +1687,7 @@ var SocketController = class _SocketController {
1687
1687
  return;
1688
1688
  }
1689
1689
  return new Promise((resolve, reject) => {
1690
+ delete ctx2.__isSubMeta;
1690
1691
  console.log("Socket Delegate:", ctx2);
1691
1692
  socket.timeout(1e4).emit(
1692
1693
  "delegation",
@@ -3156,8 +3157,16 @@ var GraphSyncController = class _GraphSyncController {
3156
3157
  return this._instance;
3157
3158
  }
3158
3159
  constructor() {
3159
- var _a2;
3160
- (_a2 = CadenzaService.broker.getSignalsTask) == null ? void 0 : _a2.doOn("meta.service_registry.synced_instances").then(CadenzaService.registry.getAllTasks.then(CadenzaService.registry.getAllRoutines));
3160
+ CadenzaService.createDebounceMetaTask(
3161
+ "Debounce syncing of resources",
3162
+ () => true,
3163
+ "",
3164
+ 500
3165
+ ).doAfter(CadenzaService.serviceRegistry.handleInstanceUpdateTask).then(
3166
+ CadenzaService.broker.getSignalsTask.then(
3167
+ CadenzaService.registry.getAllTasks.then(CadenzaService.registry.getAllRoutines)
3168
+ )
3169
+ );
3161
3170
  CadenzaService.createMetaTask("Split routines for registration", (ctx, emit) => {
3162
3171
  const { __routines } = ctx;
3163
3172
  if (!__routines) return;