@posiwise/common-services 0.2.8 → 0.2.9

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.
@@ -1481,24 +1481,7 @@ class PermissionService {
1481
1481
  expr = this.handleNonBooleanPermissions(permission, expr, productKey, permission_key, productSlug);
1482
1482
  // Now expr is made of true/false values with &&, ||, ()
1483
1483
  // Safe parser: no eval() - CSP 'unsafe-eval' not required
1484
- const ourResult = this.evaluateBooleanExpression(expr);
1485
- // Comparison: warn if result differs from legacy eval (for verification, no behavior change)
1486
- try {
1487
- // eslint-disable-next-line no-eval
1488
- const evalResult = eval(expr);
1489
- const evalAsBool = !!evalResult;
1490
- if (evalAsBool !== ourResult) {
1491
- console.warn('[PermissionService] Result diff vs eval:', {
1492
- expr,
1493
- ourResult,
1494
- evalResult
1495
- });
1496
- }
1497
- }
1498
- catch {
1499
- // eval blocked (CSP) or invalid - skip comparison
1500
- }
1501
- return ourResult;
1484
+ return this.evaluateBooleanExpression(expr);
1502
1485
  }
1503
1486
  /** Safe boolean expression parser - replaces eval() for CSP compliance. */
1504
1487
  evaluateBooleanExpression(expr) {
@@ -1728,7 +1711,6 @@ class CustomPreloadingStrategy {
1728
1711
  preload(route, load) {
1729
1712
  // Skip preloading if we're on the landing page (root path)
1730
1713
  if (this.router.url === '/' || this.router.url === '') {
1731
- console.log('🚫 Skipping preload for route:', route.path, '- on landing page');
1732
1714
  return of(null);
1733
1715
  }
1734
1716
  const loadRoute = delay => (delay ? timer(5000).pipe(mergeMap(_ => load())) : load());
@@ -1785,7 +1767,6 @@ class AbTestService {
1785
1767
  * dynamically loads the microservice
1786
1768
  */
1787
1769
  getServiceInstance(service) {
1788
- console.log(typeof service);
1789
1770
  return service ? this.injector.get(service) : this.injector.get(MainApiHttpService); // fallback to Core Microservice
1790
1771
  }
1791
1772
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AbTestService, deps: [{ token: i0.Injector }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
@@ -3079,7 +3060,6 @@ class SentryErrorHandler {
3079
3060
  return; // Skip logging to Sentry
3080
3061
  }
3081
3062
  if (error.status === 0 && error.statusText === 'Unknown Error') {
3082
- // Handle network-related errors differently or suppress them
3083
3063
  console.warn('Network-related error:', error);
3084
3064
  return; // Don't rethrow the error
3085
3065
  }
@@ -3098,12 +3078,11 @@ class SentryErrorHandler {
3098
3078
  try {
3099
3079
  message = JSON.stringify(error);
3100
3080
  }
3101
- catch (e) {
3081
+ catch {
3102
3082
  message =
3103
3083
  typeof error === 'object' && error !== null
3104
3084
  ? JSON.stringify(error)
3105
3085
  : error.toString();
3106
- console.log(e);
3107
3086
  }
3108
3087
  }
3109
3088
  return message;