@infrab4a/connect-angular 4.17.0-beta.8 → 4.17.0

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.
@@ -2617,7 +2617,6 @@ class AngularConnectModule {
2617
2617
  return {
2618
2618
  ngModule: AngularConnectModule,
2619
2619
  providers: [
2620
- { provide: FIREBASE_APP_NAME, useValue: nameOrConfig },
2621
2620
  {
2622
2621
  provide: CATEGORY_STRUCTURE,
2623
2622
  useClass: isNil(options?.oldCategoryStructure) || options?.oldCategoryStructure
@@ -2627,6 +2626,7 @@ class AngularConnectModule {
2627
2626
  { provide: PERSISTENCE_PROVIDER, useClass: options?.persistenceProvider || CookieDataPersistence },
2628
2627
  ...(isNil(defaultShop) ? [] : [{ provide: DEFAULT_SHOP, useValue: defaultShop }]),
2629
2628
  ...(isNil(options?.firebase) ? [] : [{ provide: FIREBASE_OPTIONS, useValue: options?.firebase }]),
2629
+ ...(isNil(options?.firebase) ? [] : [{ provide: FIREBASE_APP_NAME, useValue: nameOrConfig }]),
2630
2630
  ...(isNil(options?.elasticSearch) ? [] : [{ provide: ES_CONFIG, useValue: options.elasticSearch }]),
2631
2631
  ...(isNil(options?.vertexConfig) ? [] : [{ provide: VERTEX_CONFIG, useValue: options.vertexConfig }]),
2632
2632
  ...(isNil(options?.hasura) ? [] : [{ provide: HASURA_OPTIONS, useValue: options.hasura }]),
@@ -2676,15 +2676,11 @@ AngularConnectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ve
2676
2676
  useExisting: ProductsVertexSearch,
2677
2677
  },
2678
2678
  ], imports: [provideFirebaseApp((injector) => {
2679
- const appName = injector.get(FIREBASE_APP_NAME);
2679
+ const appName = injector.get(FIREBASE_APP_NAME) || '[DEFAULT]';
2680
2680
  try {
2681
- return appName ? getApp(appName) : getApp();
2681
+ return getApp(appName);
2682
2682
  }
2683
2683
  catch (error) {
2684
- console.warn('Firebase app not found, initializing new app');
2685
- if (error instanceof Error) {
2686
- console.error(error.message);
2687
- }
2688
2684
  return initializeApp(injector.get(FIREBASE_OPTIONS), appName);
2689
2685
  }
2690
2686
  }),
@@ -2692,16 +2688,16 @@ AngularConnectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ve
2692
2688
  const app = injector.get(FirebaseApp);
2693
2689
  try {
2694
2690
  const siteKey = injector.get(RECAPTCHA_SITE_KEY);
2695
- return initializeAppCheck(app, {
2696
- provider: isEmpty(siteKey) ? undefined : new ReCaptchaEnterpriseProvider(siteKey),
2697
- isTokenAutoRefreshEnabled: true,
2698
- });
2691
+ if (siteKey && siteKey.trim() !== '')
2692
+ return initializeAppCheck(app, {
2693
+ provider: new ReCaptchaEnterpriseProvider(siteKey),
2694
+ isTokenAutoRefreshEnabled: true,
2695
+ });
2699
2696
  }
2700
2697
  catch (error) {
2701
- if (error instanceof Error)
2702
- console.error(error.message);
2703
- return;
2698
+ console.warn('ReCAPTCHA site key not provided or invalid, App Check not initialized');
2704
2699
  }
2700
+ return;
2705
2701
  }),
2706
2702
  provideStorage((injector) => getStorage(injector.get(FirebaseApp))),
2707
2703
  AngularElasticSeachModule,
@@ -2714,15 +2710,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
2714
2710
  args: [{
2715
2711
  imports: [
2716
2712
  provideFirebaseApp((injector) => {
2717
- const appName = injector.get(FIREBASE_APP_NAME);
2713
+ const appName = injector.get(FIREBASE_APP_NAME) || '[DEFAULT]';
2718
2714
  try {
2719
- return appName ? getApp(appName) : getApp();
2715
+ return getApp(appName);
2720
2716
  }
2721
2717
  catch (error) {
2722
- console.warn('Firebase app not found, initializing new app');
2723
- if (error instanceof Error) {
2724
- console.error(error.message);
2725
- }
2726
2718
  return initializeApp(injector.get(FIREBASE_OPTIONS), appName);
2727
2719
  }
2728
2720
  }),
@@ -2730,16 +2722,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
2730
2722
  const app = injector.get(FirebaseApp);
2731
2723
  try {
2732
2724
  const siteKey = injector.get(RECAPTCHA_SITE_KEY);
2733
- return initializeAppCheck(app, {
2734
- provider: isEmpty(siteKey) ? undefined : new ReCaptchaEnterpriseProvider(siteKey),
2735
- isTokenAutoRefreshEnabled: true,
2736
- });
2725
+ if (siteKey && siteKey.trim() !== '')
2726
+ return initializeAppCheck(app, {
2727
+ provider: new ReCaptchaEnterpriseProvider(siteKey),
2728
+ isTokenAutoRefreshEnabled: true,
2729
+ });
2737
2730
  }
2738
2731
  catch (error) {
2739
- if (error instanceof Error)
2740
- console.error(error.message);
2741
- return;
2732
+ console.warn('ReCAPTCHA site key not provided or invalid, App Check not initialized');
2742
2733
  }
2734
+ return;
2743
2735
  }),
2744
2736
  provideStorage((injector) => getStorage(injector.get(FirebaseApp))),
2745
2737
  AngularElasticSeachModule,