@umituz/react-native-ai-generation-content 1.44.3 → 1.44.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-ai-generation-content",
3
- "version": "1.44.3",
3
+ "version": "1.44.4",
4
4
  "description": "Provider-agnostic AI generation orchestration for React Native with result preview components",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -5,7 +5,7 @@
5
5
 
6
6
  import type { IAIProvider } from "../../domain/interfaces";
7
7
 
8
- declare const __DEV__: boolean;
8
+ declare const __DEV__: boolean | undefined;
9
9
 
10
10
  class ProviderRegistry {
11
11
  private providers: Map<string, IAIProvider> = new Map();
@@ -13,7 +13,7 @@ class ProviderRegistry {
13
13
 
14
14
  register(provider: IAIProvider): void {
15
15
  if (this.providers.has(provider.providerId)) {
16
- if (__DEV__) {
16
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
17
17
  console.warn(
18
18
  `[ProviderRegistry] Provider ${provider.providerId} already registered`,
19
19
  );
@@ -23,7 +23,7 @@ class ProviderRegistry {
23
23
 
24
24
  this.providers.set(provider.providerId, provider);
25
25
 
26
- if (__DEV__) {
26
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
27
27
  console.log(
28
28
  `[ProviderRegistry] Registered provider: ${provider.providerId}`,
29
29
  );
@@ -43,13 +43,13 @@ class ProviderRegistry {
43
43
  }
44
44
  this.activeProviderId = providerId;
45
45
 
46
- if (__DEV__) {
46
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
47
47
  console.log(`[ProviderRegistry] Active provider set to: ${providerId}`);
48
48
  }
49
49
  }
50
50
 
51
51
  getActiveProvider(): IAIProvider | null {
52
- if (__DEV__) {
52
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
53
53
  console.log("[ProviderRegistry] getActiveProvider() called", {
54
54
  activeProviderId: this.activeProviderId,
55
55
  registeredProviders: Array.from(this.providers.keys()),
@@ -57,7 +57,7 @@ class ProviderRegistry {
57
57
  }
58
58
 
59
59
  if (!this.activeProviderId) {
60
- if (__DEV__) {
60
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
61
61
  console.warn("[ProviderRegistry] No active provider set!");
62
62
  }
63
63
  return null;
@@ -65,7 +65,7 @@ class ProviderRegistry {
65
65
 
66
66
  const provider = this.providers.get(this.activeProviderId) ?? null;
67
67
 
68
- if (__DEV__) {
68
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
69
69
  console.log("[ProviderRegistry] getActiveProvider() returning", {
70
70
  providerId: provider?.providerId,
71
71
  isInitialized: provider?.isInitialized(),