monkey-front-core 0.0.72 → 0.0.76

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