@punks/backend-entity-manager 0.0.345 → 0.0.347

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/cjs/index.js CHANGED
@@ -2981,6 +2981,7 @@ class TypeormCacheInstance {
2981
2981
  where: {
2982
2982
  instance: this.instanceName,
2983
2983
  key,
2984
+ expirationTime: typeorm.MoreThanOrEqual(new Date()),
2984
2985
  },
2985
2986
  });
2986
2987
  if (item) {
@@ -4236,6 +4237,19 @@ exports.AuthGuard = AuthGuard_1 = class AuthGuard {
4236
4237
  return false;
4237
4238
  }
4238
4239
  }
4240
+ const isForAllAuthenticated = this.getIsForAllAuthenticated(context);
4241
+ if (isForAllAuthenticated) {
4242
+ const isAuthenticated = !!auth?.user;
4243
+ this.logger.debug(`Authorized:${isAuthenticated} -> authentication guard`, {
4244
+ ...this.getContextInfo({
4245
+ context,
4246
+ roles: auth?.roles,
4247
+ user: auth?.user,
4248
+ permissions: auth?.permissions,
4249
+ }),
4250
+ });
4251
+ return isAuthenticated;
4252
+ }
4239
4253
  const allowedRoles = this.getAllowedRoles(context);
4240
4254
  if (allowedRoles) {
4241
4255
  const isAllowed = this.isRoleMatching(allowedRoles, auth?.roles ?? []);
@@ -4268,19 +4282,6 @@ exports.AuthGuard = AuthGuard_1 = class AuthGuard {
4268
4282
  return false;
4269
4283
  }
4270
4284
  }
4271
- const isForAllAuthenticated = this.getIsForAllAuthenticated(context);
4272
- if (isForAllAuthenticated) {
4273
- const isAuthenticated = !!auth?.user;
4274
- this.logger.debug(`Authorized:${isAuthenticated} -> authentication guard`, {
4275
- ...this.getContextInfo({
4276
- context,
4277
- roles: auth?.roles,
4278
- user: auth?.user,
4279
- permissions: auth?.permissions,
4280
- }),
4281
- });
4282
- return isAuthenticated;
4283
- }
4284
4285
  const isAuthenticated = !!auth?.user;
4285
4286
  this.logger.debug(`Authorized:${isAuthenticated} -> auth guard`, {
4286
4287
  ...this.getContextInfo({