@umituz/react-native-ai-fal-provider 2.1.5 → 2.1.7

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-fal-provider",
3
- "version": "2.1.5",
3
+ "version": "2.1.7",
4
4
  "description": "FAL AI provider for React Native - implements IAIProvider interface for unified AI generation",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -7,8 +7,6 @@ export {
7
7
  falProvider,
8
8
  falModelsService,
9
9
  NSFWContentError,
10
- cancelCurrentFalRequest,
11
- hasRunningFalRequest,
12
10
  cleanupRequestStore,
13
11
  stopAutomaticCleanup,
14
12
  } from "../infrastructure/services";
package/src/index.ts CHANGED
@@ -16,4 +16,4 @@ export * from "./exports/presentation";
16
16
  export {
17
17
  createAiProviderInitModule,
18
18
  type AiProviderInitModuleConfig,
19
- } from './init';
19
+ } from './init/createAiProviderInitModule';
@@ -10,7 +10,7 @@ import { DEFAULT_FAL_CONFIG } from "./fal-provider.constants";
10
10
  import { mapFalStatusToJobStatus } from "./fal-status-mapper";
11
11
  import { validateNSFWContent } from "../validators/nsfw-validator";
12
12
  import { NSFWContentError } from "./nsfw-content-error";
13
- import { parseFalError } from "../utils/error-mapper";
13
+ import { parseFalError } from "../utils/fal-error-handler.util";
14
14
 
15
15
  /**
16
16
  * Handle FAL subscription with timeout and cancellation
@@ -2,8 +2,6 @@
2
2
  * Services Index
3
3
  */
4
4
 
5
- import { falProvider } from "./fal-provider";
6
-
7
5
  export { FalProvider, falProvider } from "./fal-provider";
8
6
  export type { FalProvider as FalProviderType } from "./fal-provider";
9
7
  export { falModelsService, type FalModelConfig, type ModelSelectionResult } from "./fal-models.service";
@@ -21,17 +19,3 @@ export {
21
19
  stopAutomaticCleanup,
22
20
  } from "./request-store";
23
21
  export type { ActiveRequest } from "./request-store";
24
-
25
- /**
26
- * Cancel the current running FAL request
27
- */
28
- export function cancelCurrentFalRequest(): void {
29
- falProvider.cancelCurrentRequest();
30
- }
31
-
32
- /**
33
- * Check if there's a running FAL request
34
- */
35
- export function hasRunningFalRequest(): boolean {
36
- return falProvider.hasRunningRequest();
37
- }
@@ -9,7 +9,7 @@ import type {
9
9
  ModelCostInfo,
10
10
  } from "../../domain/entities/cost-tracking.types";
11
11
  import { findModelById } from "../../domain/constants/default-models.constants";
12
- import { filterByProperty, filterByTimeRange } from "./collection-filters.util";
12
+ import { filterByProperty, filterByTimeRange } from "./collections";
13
13
 
14
14
  export type { GenerationCost } from "../../domain/entities/cost-tracking.types";
15
15
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  import type { FalErrorInfo, FalErrorCategory, FalErrorType } from "../../domain/entities/error.types";
7
7
  import { FalErrorType as ErrorTypeEnum } from "../../domain/entities/error.types";
8
- import { safeJsonParseOrNull } from "./data-parsers.util";
8
+ import { safeJsonParseOrNull } from "./parsers";
9
9
 
10
10
  const STATUS_CODES = ["400", "401", "402", "403", "404", "422", "429", "500", "502", "503", "504"];
11
11
 
@@ -11,7 +11,7 @@ export {
11
11
  sortByDateAscending,
12
12
  sortByNumberDescending,
13
13
  sortByNumberAscending,
14
- } from "./collection-filters.util";
14
+ } from "./collections";
15
15
 
16
16
  export {
17
17
  safeJsonParse,
@@ -19,7 +19,7 @@ export {
19
19
  safeJsonStringify,
20
20
  isValidJson,
21
21
  validateObjectStructure,
22
- } from "./data-parsers.util";
22
+ } from "./parsers";
23
23
 
24
24
  export { categorizeFalError } from "./error-categorizer";
25
25
  export {
@@ -27,20 +27,16 @@ export {
27
27
  parseFalError,
28
28
  isFalErrorRetryable,
29
29
  extractStatusCode,
30
- } from "./error-mapper";
30
+ } from "./fal-error-handler.util";
31
31
 
32
- export {
33
- formatNumber,
34
- formatBytes,
35
- formatDuration,
36
- formatDate,
37
- truncateText,
38
- } from "./formatting.util";
32
+ export { formatDate } from "./date-format.util";
33
+ export { formatNumber, formatBytes, formatDuration } from "./number-format.util";
34
+ export { truncateText } from "./string-format.util";
39
35
 
40
36
  export {
41
37
  buildSingleImageInput,
42
38
  buildDualImageInput,
43
- } from "./input-builders.util";
39
+ } from "./base-builders.util";
44
40
 
45
41
  export {
46
42
  isFalModelType,
@@ -52,7 +48,7 @@ export {
52
48
  isValidPrompt,
53
49
  isValidTimeout,
54
50
  isValidRetryCount,
55
- } from "./type-guards.util";
51
+ } from "./type-guards";
56
52
 
57
53
  export {
58
54
  formatImageDataUri,
@@ -77,7 +73,7 @@ export {
77
73
  removeNullish,
78
74
  generateUniqueId,
79
75
  sleep,
80
- } from "./general-helpers.util";
76
+ } from "./helpers";
81
77
 
82
78
  export { preprocessInput } from "./input-preprocessor.util";
83
79
  export { validateInput } from "./input-validator.util";
@@ -3,7 +3,7 @@
3
3
  * Validates input parameters before API calls
4
4
  */
5
5
 
6
- import { isValidModelId, isValidPrompt } from "./type-guards.util";
6
+ import { isValidModelId, isValidPrompt } from "./type-guards";
7
7
 
8
8
  /**
9
9
  * Detect potentially malicious content in strings
@@ -5,8 +5,8 @@
5
5
 
6
6
  import type { FalJobMetadata } from "./job-metadata.types";
7
7
  import { isJobStale, isJobRunning, isJobCompleted } from "./job-metadata-lifecycle.util";
8
- import { sortByDateDescending, filterByPredicate } from "../collection-filters.util";
9
- import { safeJsonParseOrNull, validateObjectStructure } from "../data-parsers.util";
8
+ import { sortByDateDescending, filterByPredicate } from "../collections";
9
+ import { safeJsonParseOrNull, validateObjectStructure } from "../parsers";
10
10
 
11
11
  /**
12
12
  * Serialize job metadata for storage
@@ -6,7 +6,7 @@
6
6
  import type { FalJobMetadata } from "../job-metadata";
7
7
  import { updateJobMetadata } from "../job-metadata";
8
8
  import type { IJobStorage } from "./job-storage-interface";
9
- import { safeJsonParseOrNull, safeJsonStringify } from "../data-parsers.util";
9
+ import { safeJsonParseOrNull, safeJsonStringify } from "../parsers";
10
10
 
11
11
  /**
12
12
  * Save job metadata to storage
@@ -6,7 +6,7 @@
6
6
  import type { FalJobMetadata } from "../job-metadata";
7
7
  import type { IJobStorage } from "./job-storage-interface";
8
8
  import { deleteJobMetadata } from "./job-storage-crud.util";
9
- import { safeJsonParseOrNull } from "../data-parsers.util";
9
+ import { safeJsonParseOrNull } from "../parsers";
10
10
 
11
11
  /**
12
12
  * Load all jobs from storage
@@ -5,7 +5,7 @@
5
5
 
6
6
  import { useState, useCallback, useRef, useEffect } from "react";
7
7
  import { falProvider } from "../../infrastructure/services/fal-provider";
8
- import { mapFalError } from "../../infrastructure/utils/error-mapper";
8
+ import { mapFalError } from "../../infrastructure/utils/fal-error-handler.util";
9
9
  import { FalGenerationStateManager } from "../../infrastructure/utils/fal-generation-state-manager.util";
10
10
  import type { FalJobInput, FalQueueStatus } from "../../domain/entities/fal.types";
11
11
  import type { FalErrorInfo } from "../../domain/entities/error.types";
@@ -1,9 +0,0 @@
1
- /**
2
- * Collection Filter Utilities
3
- * @deprecated This file is now split into smaller modules for better maintainability.
4
- * Import from './collections' submodules instead.
5
- *
6
- * This file re-exports all functions for backward compatibility.
7
- */
8
-
9
- export * from './collections';
@@ -1,9 +0,0 @@
1
- /**
2
- * Data Parser Utilities
3
- * @deprecated This file is now split into smaller modules for better maintainability.
4
- * Import from './parsers' submodules instead.
5
- *
6
- * This file re-exports all functions for backward compatibility.
7
- */
8
-
9
- export * from './parsers';
@@ -1,24 +0,0 @@
1
- /**
2
- * FAL Error Mapper - Maps errors to user-friendly info
3
- *
4
- * @deprecated This module is a re-export for backward compatibility.
5
- * Import directly from './fal-error-handler.util' instead.
6
- *
7
- * This module re-exports error handling functions from the unified
8
- * fal-error-handler.util module for backward compatibility.
9
- *
10
- * @example
11
- * // Instead of:
12
- * import { mapFalError } from './error-mapper';
13
- *
14
- * // Use:
15
- * import { mapFalError } from './fal-error-handler.util';
16
- */
17
-
18
- export {
19
- mapFalError,
20
- parseFalError,
21
- isFalErrorRetryable,
22
- categorizeFalError,
23
- extractStatusCode,
24
- } from "./fal-error-handler.util";
@@ -1,13 +0,0 @@
1
- /**
2
- * Formatting Utilities
3
- * Common formatting functions for display and data presentation
4
- *
5
- * This module re-exports formatting utilities from specialized modules
6
- * for better organization and maintainability.
7
- */
8
-
9
- export { formatDate } from "./date-format.util";
10
-
11
- export { formatNumber, formatBytes, formatDuration } from "./number-format.util";
12
-
13
- export { truncateText } from "./string-format.util";
@@ -1,9 +0,0 @@
1
- /**
2
- * General Helper Utilities
3
- * @deprecated This file is now split into smaller modules for better maintainability.
4
- * Import from './helpers' submodules instead.
5
- *
6
- * This file re-exports all functions for backward compatibility.
7
- */
8
-
9
- export * from './helpers';
@@ -1,6 +0,0 @@
1
- /**
2
- * FAL Input Builders - Constructs FAL API input from normalized data
3
- * Provider-agnostic: accepts prompt config as parameter, not imported
4
- */
5
-
6
- export * from "./base-builders.util";
@@ -1,9 +0,0 @@
1
- /**
2
- * Type Guards and Validation Utilities
3
- * @deprecated This file is now split into smaller modules for better maintainability.
4
- * Import from './type-guards' submodules instead.
5
- *
6
- * This file re-exports all functions for backward compatibility.
7
- */
8
-
9
- export * from './type-guards';
@@ -1,6 +0,0 @@
1
- /**
2
- * Validators Module
3
- * Exports all validator functions
4
- */
5
-
6
- export { validateNSFWContent } from "./nsfw-validator";
package/src/init/index.ts DELETED
@@ -1,10 +0,0 @@
1
- /**
2
- * AI Provider Init Module
3
- * Provides factory for creating app initialization modules
4
- */
5
-
6
- export {
7
- createAiProviderInitModule,
8
- type AiProviderInitModuleConfig,
9
- type InitModule,
10
- } from './createAiProviderInitModule';