@onekeyfe/react-native-cloud-fs 3.0.157-alpha.273 → 3.0.157-alpha.276
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/README.md +38 -0
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# @onekeyfe/react-native-cloud-fs
|
|
2
2
|
|
|
3
|
+
Cloud file access for OneKey React Native applications. The native interface
|
|
4
|
+
supports cloud availability checks, listing, copying, creating and deleting
|
|
5
|
+
files, with iCloud-specific and Google Drive-specific methods.
|
|
6
|
+
|
|
7
|
+
## Installation and usage
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
yarn add @onekeyfe/react-native-cloud-fs
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Install the application's iOS pods and rebuild its native binary. The consumer
|
|
14
|
+
must configure its cloud provider, native entitlements and authentication flow.
|
|
15
|
+
Package installation alone does not grant cloud access.
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { CloudFs } from '@onekeyfe/react-native-cloud-fs';
|
|
19
|
+
|
|
20
|
+
const available = await CloudFs.isAvailable();
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## API and platforms
|
|
24
|
+
|
|
25
|
+
Shared methods include `syncCloud`, `listFiles`, `deleteFromCloud`, `fileExists`,
|
|
26
|
+
`copyToCloud` and `createFile`. Their parameters use explicit provider scope,
|
|
27
|
+
paths or file IDs; the application owns those identifiers and file contents.
|
|
28
|
+
|
|
29
|
+
`getIcloudDocument` is iOS-specific. Android exposes `loginIfNeeded`, `logout`,
|
|
30
|
+
`getGoogleDriveDocument` and `getCurrentlySignedInUserData` for its Google Drive
|
|
31
|
+
integration. Route calls to the appropriate provider and handle promise failures
|
|
32
|
+
such as missing account access or unavailable files.
|
|
33
|
+
|
|
34
|
+
The package exports both the named `CloudFs` and the default native module.
|
|
35
|
+
See [src/NativeCloudFs.ts](src/NativeCloudFs.ts) for complete option/result shapes.
|
|
36
|
+
A successful availability check does not establish that a later transfer has
|
|
37
|
+
completed or that every requested scope is permitted.
|
|
38
|
+
|
|
39
|
+
## Upstream attribution
|
|
40
|
+
|
|
3
41
|
First, a sincere thank-you to the
|
|
4
42
|
`react-native-cloud-fs` maintainers for their excellent work 🙏
|
|
5
43
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/react-native-cloud-fs",
|
|
3
|
-
"version": "3.0.157-alpha.
|
|
3
|
+
"version": "3.0.157-alpha.276",
|
|
4
4
|
"description": "react-native-cloud-fs TurboModule for OneKey",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -37,14 +37,15 @@
|
|
|
37
37
|
],
|
|
38
38
|
"repository": {
|
|
39
39
|
"type": "git",
|
|
40
|
-
"url": "git+https://github.com/OneKeyHQ/app-modules
|
|
40
|
+
"url": "git+https://github.com/OneKeyHQ/app-modules.git",
|
|
41
|
+
"directory": "native-modules/react-native-cloud-fs"
|
|
41
42
|
},
|
|
42
43
|
"author": "@onekeyhq <huanming@onekey.so> (https://github.com/OneKeyHQ/app-modules)",
|
|
43
44
|
"license": "MIT",
|
|
44
45
|
"bugs": {
|
|
45
|
-
"url": "https://github.com/OneKeyHQ/app-modules/
|
|
46
|
+
"url": "https://github.com/OneKeyHQ/app-modules/issues"
|
|
46
47
|
},
|
|
47
|
-
"homepage": "https://github.com/OneKeyHQ/app-modules/react-native-cloud-fs#readme",
|
|
48
|
+
"homepage": "https://github.com/OneKeyHQ/app-modules/tree/main/native-modules/react-native-cloud-fs#readme",
|
|
48
49
|
"publishConfig": {
|
|
49
50
|
"registry": "https://registry.npmjs.org/"
|
|
50
51
|
},
|