react-native-blob-util 0.24.6 → 0.24.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.
Files changed (98) hide show
  1. package/.eslintrc.json +96 -96
  2. package/LICENSE +21 -21
  3. package/Migration.md +41 -41
  4. package/NuGet.config +11 -11
  5. package/README.md +1109 -1109
  6. package/android/gradle.properties +1 -1
  7. package/android/src/main/AndroidManifest.xml +37 -37
  8. package/android/src/main/java/com/ReactNativeBlobUtil/ReactNativeBlobUtilConfig.java +59 -59
  9. package/android/src/main/java/com/ReactNativeBlobUtil/ReactNativeBlobUtilConst.java +20 -20
  10. package/android/src/main/java/com/ReactNativeBlobUtil/ReactNativeBlobUtilFileTransformer.java +9 -9
  11. package/android/src/main/java/com/ReactNativeBlobUtil/ReactNativeBlobUtilImpl.java +431 -431
  12. package/android/src/main/java/com/ReactNativeBlobUtil/ReactNativeBlobUtilProgressConfig.java +39 -39
  13. package/android/src/main/java/com/ReactNativeBlobUtil/ReactNativeBlobUtilReq.java +1092 -1092
  14. package/android/src/main/java/com/ReactNativeBlobUtil/Response/ReactNativeBlobUtilDefaultResp.java +98 -98
  15. package/android/src/main/java/com/ReactNativeBlobUtil/Response/ReactNativeBlobUtilFileResp.java +166 -166
  16. package/android/src/main/java/com/ReactNativeBlobUtil/Utils/FileDescription.java +19 -19
  17. package/android/src/main/java/com/ReactNativeBlobUtil/Utils/FileProvider.java +4 -4
  18. package/android/src/main/java/com/ReactNativeBlobUtil/Utils/MimeType.java +70 -70
  19. package/android/src/main/java/com/ReactNativeBlobUtil/Utils/PathResolver.java +223 -223
  20. package/android/src/main/java/com/ReactNativeBlobUtil/Utils/Tls12SocketFactory.java +68 -68
  21. package/android/src/main/res/values/strings.xml +3 -3
  22. package/android/src/main/res/xml/provider_paths.xml +12 -12
  23. package/android.js +58 -58
  24. package/class/ReactNativeBlobUtilCanceledFetchError.js +9 -9
  25. package/class/ReactNativeBlobUtilFile.js +5 -5
  26. package/class/ReactNativeBlobUtilReadStream.js +84 -84
  27. package/class/ReactNativeBlobUtilSession.js +68 -68
  28. package/class/ReactNativeBlobUtilWriteStream.js +50 -50
  29. package/class/StatefulPromise.js +7 -7
  30. package/codegenSpecs/NativeBlobUtils.js +86 -86
  31. package/components/Fetch.onPress.js +10 -10
  32. package/components/Fetch.when.js +15 -15
  33. package/fetch.js +350 -350
  34. package/fs.js +480 -480
  35. package/index.d.ts +880 -880
  36. package/index.js +64 -64
  37. package/index.js.flow +192 -192
  38. package/index.web.js +1 -1
  39. package/ios/PrivacyInfo.xcprivacy +28 -28
  40. package/ios/ReactNativeBlobUtil/ReactNativeBlobUtil.h +55 -55
  41. package/ios/ReactNativeBlobUtil/ReactNativeBlobUtil.mm +1013 -1013
  42. package/ios/ReactNativeBlobUtil.xcodeproj/project.pbxproj +405 -405
  43. package/ios/ReactNativeBlobUtilConst.h +58 -58
  44. package/ios/ReactNativeBlobUtilConst.mm +47 -47
  45. package/ios/ReactNativeBlobUtilFS.h +108 -108
  46. package/ios/ReactNativeBlobUtilFS.mm +1080 -1080
  47. package/ios/ReactNativeBlobUtilFileTransformer.h +23 -23
  48. package/ios/ReactNativeBlobUtilFileTransformer.mm +20 -20
  49. package/ios/ReactNativeBlobUtilNetwork.h +49 -49
  50. package/ios/ReactNativeBlobUtilNetwork.mm +159 -159
  51. package/ios/ReactNativeBlobUtilProgress.h +32 -32
  52. package/ios/ReactNativeBlobUtilProgress.mm +57 -57
  53. package/ios/ReactNativeBlobUtilReqBuilder.h +37 -37
  54. package/ios/ReactNativeBlobUtilReqBuilder.mm +292 -292
  55. package/ios/ReactNativeBlobUtilRequest.h +48 -48
  56. package/ios/ReactNativeBlobUtilRequest.mm +584 -584
  57. package/ios.js +61 -61
  58. package/json-stream.js +42 -42
  59. package/lib/oboe-browser.js +2703 -2703
  60. package/mediacollection.js +36 -36
  61. package/package.json +77 -77
  62. package/polyfill/Blob.js +362 -362
  63. package/polyfill/Event.js +11 -11
  64. package/polyfill/EventTarget.js +78 -78
  65. package/polyfill/Fetch.js +219 -219
  66. package/polyfill/File.js +27 -27
  67. package/polyfill/FileReader.js +91 -91
  68. package/polyfill/ProgressEvent.js +32 -32
  69. package/polyfill/XMLHttpRequest.js +466 -466
  70. package/polyfill/XMLHttpRequestEventTarget.js +126 -126
  71. package/polyfill/index.js +11 -11
  72. package/react-native-blob-util.podspec +48 -48
  73. package/types.js +69 -69
  74. package/utils/log.js +40 -40
  75. package/utils/unicode.js +7 -7
  76. package/utils/uri.js +33 -33
  77. package/utils/uuid.js +4 -4
  78. package/windows/ExperimentalFeatures.props +33 -33
  79. package/windows/README.md +2 -2
  80. package/windows/ReactNativeBlobUtil/PropertySheet.props +15 -15
  81. package/windows/ReactNativeBlobUtil/ReactNativeBlobUtil.cpp +1836 -1836
  82. package/windows/ReactNativeBlobUtil/ReactNativeBlobUtil.def +3 -3
  83. package/windows/ReactNativeBlobUtil/ReactNativeBlobUtil.h +372 -372
  84. package/windows/ReactNativeBlobUtil/ReactNativeBlobUtil.vcxproj +139 -139
  85. package/windows/ReactNativeBlobUtil/ReactNativeBlobUtil.vcxproj.filters +43 -43
  86. package/windows/ReactNativeBlobUtil/ReactPackageProvider.cpp +20 -20
  87. package/windows/ReactNativeBlobUtil/ReactPackageProvider.h +24 -24
  88. package/windows/ReactNativeBlobUtil/ReactPackageProvider.idl +9 -9
  89. package/windows/ReactNativeBlobUtil/codegen/.clang-format +1 -1
  90. package/windows/ReactNativeBlobUtil/codegen/NativeBlobUtilsDataTypes.g.h +42 -42
  91. package/windows/ReactNativeBlobUtil/codegen/NativeBlobUtilsSpec.g.h +353 -353
  92. package/windows/ReactNativeBlobUtil/packages.config +3 -3
  93. package/windows/ReactNativeBlobUtil/packages.lock.json +59 -59
  94. package/windows/ReactNativeBlobUtil/pch.cpp +1 -1
  95. package/windows/ReactNativeBlobUtil/pch.h +30 -30
  96. package/windows/ReactNativeBlobUtil/resource.h +5 -5
  97. package/windows/ReactNativeBlobUtil/targetver.h +8 -8
  98. package/windows/ReactNativeBlobUtil.sln +43 -43
@@ -1,36 +1,36 @@
1
- import type {ReactNativeBlobUtilNative, filedescriptor} from "./types";
2
- import ReactNativeBlobUtil from "./codegenSpecs/NativeBlobUtils";
3
-
4
- function createMediafile(fd: filedescriptor, mediatype: string): Promise {
5
- if ((!'parentFolder' in fd)) fd['parentFolder'] = '';
6
- return ReactNativeBlobUtil.createMediaFile(fd, mediatype);
7
- }
8
-
9
- function writeToMediafile(uri: string, path: string) {
10
- return ReactNativeBlobUtil.writeToMediaFile(uri, path, false);
11
- }
12
-
13
- function writeToMediafileWithTransform(uri: string, path: string) {
14
- return ReactNativeBlobUtil.writeToMediaFile(uri, path, true);
15
- }
16
-
17
- function copyToInternal(contenturi: string, destpath: string) {
18
- return ReactNativeBlobUtil.copyToInternal(contenturi, destpath);
19
- }
20
-
21
- function getBlob(contenturi: string, encoding: string) {
22
- return ReactNativeBlobUtil.getBlob(contenturi, encoding);
23
- }
24
-
25
- function copyToMediaStore(fd: filedescriptor, mediatype: string, path: string) {
26
- return ReactNativeBlobUtil.copyToMediaStore(fd, mediatype, path);
27
- }
28
-
29
- export default {
30
- createMediafile,
31
- writeToMediafile,
32
- writeToMediafileWithTransform,
33
- copyToInternal,
34
- getBlob,
35
- copyToMediaStore
36
- };
1
+ import type {ReactNativeBlobUtilNative, filedescriptor} from "./types";
2
+ import ReactNativeBlobUtil from "./codegenSpecs/NativeBlobUtils";
3
+
4
+ function createMediafile(fd: filedescriptor, mediatype: string): Promise {
5
+ if ((!'parentFolder' in fd)) fd['parentFolder'] = '';
6
+ return ReactNativeBlobUtil.createMediaFile(fd, mediatype);
7
+ }
8
+
9
+ function writeToMediafile(uri: string, path: string) {
10
+ return ReactNativeBlobUtil.writeToMediaFile(uri, path, false);
11
+ }
12
+
13
+ function writeToMediafileWithTransform(uri: string, path: string) {
14
+ return ReactNativeBlobUtil.writeToMediaFile(uri, path, true);
15
+ }
16
+
17
+ function copyToInternal(contenturi: string, destpath: string) {
18
+ return ReactNativeBlobUtil.copyToInternal(contenturi, destpath);
19
+ }
20
+
21
+ function getBlob(contenturi: string, encoding: string) {
22
+ return ReactNativeBlobUtil.getBlob(contenturi, encoding);
23
+ }
24
+
25
+ function copyToMediaStore(fd: filedescriptor, mediatype: string, path: string) {
26
+ return ReactNativeBlobUtil.copyToMediaStore(fd, mediatype, path);
27
+ }
28
+
29
+ export default {
30
+ createMediafile,
31
+ writeToMediafile,
32
+ writeToMediafileWithTransform,
33
+ copyToInternal,
34
+ getBlob,
35
+ copyToMediaStore
36
+ };
package/package.json CHANGED
@@ -1,77 +1,77 @@
1
- {
2
- "name" : "react-native-blob-util",
3
- "version" : "0.24.6",
4
- "description" : "A module provides upload, download, and files access API. Supports file stream read/write for process large files.",
5
- "main" : "index",
6
- "scripts" : {
7
- "test" : "echo \"Error: no test specified\" && exit 1"
8
- },
9
- "dependencies" : {
10
- "base-64" : "0.1.0",
11
- "glob" : "13.0.0"
12
- },
13
- "keywords" : [
14
- "react-native",
15
- "fetch",
16
- "blob",
17
- "fs",
18
- "upload",
19
- "file",
20
- "download",
21
- "filestream",
22
- "image header",
23
- "android",
24
- "ios",
25
- "file system"
26
- ],
27
- "repository" : {
28
- "url" : "https://github.com/RonRadtke/react-native-blob-util"
29
- },
30
- "author" : {
31
- "name" : "RonRadtke",
32
- "username" : "RonRadtke"
33
- },
34
- "funding": {
35
- "type": "github",
36
- "url": "https://github.com/sponsors/ronradtke"
37
- },
38
- "license" : "MIT",
39
- "contributors" : [
40
- "Traviskn <>",
41
- "Ben <benhsieh@catchplay.com>",
42
- "wkh237 <xeiyan@gmail.com>"
43
- ],
44
- "devDependencies" : {
45
- "@typescript-eslint/eslint-plugin": "^8.46.4",
46
- "@typescript-eslint/parser": "^8.46.4",
47
- "eslint": "^8.57.1",
48
- "eslint-plugin-ft-flow" : "^3.0.11",
49
- "eslint-plugin-import" : "^2.32.0",
50
- "eslint-plugin-react" : "^7.37.5",
51
- "eslint-plugin-react-native" : "^5.0.0",
52
- "react" : "19.0.0",
53
- "react-native" : "0.78.2",
54
- "react-native-windows" : "0.78.2"
55
- },
56
- "peerDependencies" : {
57
- "react" : "*",
58
- "react-native" : "*"
59
- },
60
- "codegenConfig" : {
61
- "name" : "ReactNativeBlobUtilSpec",
62
- "type" : "modules",
63
- "jsSrcsDir" : "codegenSpecs",
64
- "windows" : {
65
- "namespace" : "ReactNativeBlobUtilCodegen",
66
- "outputDirectory" : "windows/ReactNativeBlobUtil/codegen",
67
- "separateDataTypes" : true
68
- }
69
- },
70
- "react-native-windows" : {
71
- "init-windows" : {
72
- "name" : "ReactNativeBlobUtil",
73
- "namespace" : "ReactNativeBlobUtil",
74
- "template" : "cpp-lib"
75
- }
76
- }
77
- }
1
+ {
2
+ "name" : "react-native-blob-util",
3
+ "version" : "0.24.7",
4
+ "description" : "A module provides upload, download, and files access API. Supports file stream read/write for process large files.",
5
+ "main" : "index",
6
+ "scripts" : {
7
+ "test" : "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "dependencies" : {
10
+ "base-64" : "0.1.0",
11
+ "glob" : "13.0.1"
12
+ },
13
+ "keywords" : [
14
+ "react-native",
15
+ "fetch",
16
+ "blob",
17
+ "fs",
18
+ "upload",
19
+ "file",
20
+ "download",
21
+ "filestream",
22
+ "image header",
23
+ "android",
24
+ "ios",
25
+ "file system"
26
+ ],
27
+ "repository" : {
28
+ "url" : "https://github.com/RonRadtke/react-native-blob-util"
29
+ },
30
+ "author" : {
31
+ "name" : "RonRadtke",
32
+ "username" : "RonRadtke"
33
+ },
34
+ "funding": {
35
+ "type": "github",
36
+ "url": "https://github.com/sponsors/ronradtke"
37
+ },
38
+ "license" : "MIT",
39
+ "contributors" : [
40
+ "Traviskn <>",
41
+ "Ben <benhsieh@catchplay.com>",
42
+ "wkh237 <xeiyan@gmail.com>"
43
+ ],
44
+ "devDependencies" : {
45
+ "@typescript-eslint/eslint-plugin": "^8.46.4",
46
+ "@typescript-eslint/parser": "^8.46.4",
47
+ "eslint": "^8.57.1",
48
+ "eslint-plugin-ft-flow" : "^3.0.11",
49
+ "eslint-plugin-import" : "^2.32.0",
50
+ "eslint-plugin-react" : "^7.37.5",
51
+ "eslint-plugin-react-native" : "^5.0.0",
52
+ "react" : "19.0.0",
53
+ "react-native" : "0.78.2",
54
+ "react-native-windows" : "0.78.2"
55
+ },
56
+ "peerDependencies" : {
57
+ "react" : "*",
58
+ "react-native" : "*"
59
+ },
60
+ "codegenConfig" : {
61
+ "name" : "ReactNativeBlobUtilSpec",
62
+ "type" : "modules",
63
+ "jsSrcsDir" : "codegenSpecs",
64
+ "windows" : {
65
+ "namespace" : "ReactNativeBlobUtilCodegen",
66
+ "outputDirectory" : "windows/ReactNativeBlobUtil/codegen",
67
+ "separateDataTypes" : true
68
+ }
69
+ },
70
+ "react-native-windows" : {
71
+ "init-windows" : {
72
+ "name" : "ReactNativeBlobUtil",
73
+ "namespace" : "ReactNativeBlobUtil",
74
+ "template" : "cpp-lib"
75
+ }
76
+ }
77
+ }