@umituz/react-native-filesystem 1.2.2 → 1.2.3
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-filesystem",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "Domain-Driven Design filesystem utilities for React Native apps with build-time module loading and runtime file operations",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -3,18 +3,14 @@
|
|
|
3
3
|
* Single Responsibility: Handle file encoding/decoding operations
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import * as FileSystem from "expo-file-system";
|
|
7
6
|
import type { FileEncoding } from "../../domain/entities/File";
|
|
8
7
|
|
|
9
8
|
/**
|
|
10
9
|
* Convert FileEncoding to Expo FileSystem encoding type
|
|
10
|
+
* Expo v19+ uses string literals directly
|
|
11
11
|
*/
|
|
12
|
-
export function getEncodingType(encoding: FileEncoding):
|
|
13
|
-
|
|
14
|
-
if (encoding === "base64") {
|
|
15
|
-
return FileSystem.EncodingType?.Base64 ?? "base64";
|
|
16
|
-
}
|
|
17
|
-
return FileSystem.EncodingType?.UTF8 ?? "utf8";
|
|
12
|
+
export function getEncodingType(encoding: FileEncoding): "utf8" | "base64" {
|
|
13
|
+
return encoding;
|
|
18
14
|
}
|
|
19
15
|
|
|
20
16
|
/**
|