monkey-front-core 0.0.73 → 0.0.77

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