monkey-front-core 0.0.77 → 0.0.81

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.
@@ -2474,70 +2474,48 @@ class MonkeyEcxFeatureToggleService {
2474
2474
  // not to do
2475
2475
  }
2476
2476
  getAllFlags() {
2477
- console.log('10');
2478
- console.log('!!!!!');
2479
- console.log(this);
2480
- console.log('!!!!!');
2477
+ if (!this)
2478
+ return;
2481
2479
  this.flags = this.ldClient?.allFlags();
2482
- console.log('11');
2483
2480
  this.flagSubject$.next(true);
2484
- console.log('12');
2485
2481
  }
2486
2482
  identify(config, environment) {
2487
- console.log('1');
2488
- console.log(this);
2489
2483
  if (config) {
2490
- console.log('2');
2491
2484
  const email = 'monkey@monkey.exchange';
2492
- console.log('3');
2493
2485
  const user = {
2494
2486
  email,
2495
2487
  key: `${config.program?.token}#${email}`,
2496
2488
  };
2497
- console.log('4');
2498
2489
  if (!this.ldClient) {
2499
- console.log('5');
2500
2490
  this.ldClient = initialize(environment.launchDarklyClientSideID, user, {
2501
2491
  streaming: true,
2502
2492
  disableSyncEventPost: true,
2503
2493
  sendEvents: false,
2504
2494
  diagnosticOptOut: true,
2505
2495
  });
2506
- console.log('6');
2507
2496
  this.ldClient.on('change', this.getAllFlags.bind(this));
2508
- console.log('7');
2509
2497
  this.ldClient.on('ready', this.getAllFlags.bind(this));
2510
- console.log('8');
2511
2498
  }
2512
2499
  else {
2513
- console.log('9');
2514
2500
  this.ldClient.identify(user, undefined, this.getAllFlags);
2515
2501
  }
2516
- console.log(this);
2517
2502
  }
2518
2503
  }
2519
2504
  apply(configSubject$, environment) {
2520
- console.log('13');
2521
2505
  if (environment.launchDarklyClientSideID) {
2522
- console.log('14');
2523
2506
  configSubject$.subscribe((config) => {
2524
- console.log('15');
2525
2507
  this.identify(config, environment);
2526
2508
  });
2527
2509
  }
2528
2510
  else {
2529
- console.log('16');
2530
2511
  this.flagSubject$.next(true);
2531
2512
  }
2532
2513
  }
2533
2514
  get onFlags() {
2534
- console.log('17');
2535
2515
  return this.flagSubject$.asObservable();
2536
2516
  }
2537
2517
  getFlag(flag) {
2538
- console.log('18');
2539
2518
  const flagValue = this.flags?.[flag];
2540
- console.log('19');
2541
2519
  return MonkeyUtils.persistNullEmptyUndefined(flagValue) ? flagValue : null;
2542
2520
  }
2543
2521
  }