@functionland/react-native-fula 1.12.1 → 1.13.1
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/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
- package/android/.gradle/7.5.1/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/7.5.1/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/build.gradle +70 -70
- package/android/src/main/java/land/fx/fula/Cryptography.java +62 -62
- package/android/src/main/java/land/fx/fula/FulaModule.java +1438 -1438
- package/lib/commonjs/interfaces/fulaNativeModule.js.map +1 -1
- package/lib/commonjs/protocols/fula.js +98 -98
- package/lib/commonjs/protocols/fula.js.map +1 -1
- package/lib/module/interfaces/fulaNativeModule.js.map +1 -1
- package/lib/module/protocols/fula.js +98 -98
- package/lib/module/protocols/fula.js.map +1 -1
- package/package.json +157 -157
- package/src/interfaces/fulaNativeModule.ts +122 -122
- package/src/protocols/fula.ts +314 -314
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import Fula from '../interfaces/fulaNativeModule';
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* Get gets the value corresponding to the given key from the local datastore.
|
|
5
|
-
// The key must be a valid ipld.Link.
|
|
6
|
-
* @param config
|
|
7
|
-
* @returns boolean
|
|
3
|
+
/**
|
|
4
|
+
* Get gets the value corresponding to the given key from the local datastore.
|
|
5
|
+
// The key must be a valid ipld.Link.
|
|
6
|
+
* @param config
|
|
7
|
+
* @returns boolean
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
export const init = function (identity, storePath, bloxAddr, exchange) {
|
|
@@ -16,11 +16,11 @@ export const init = function (identity, storePath, bloxAddr, exchange) {
|
|
|
16
16
|
return Fula.init(identity, storePath, bloxAddr, exchange, autoFlush, rootCid, useRelay, refresh);
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
/**
|
|
20
|
-
* Get gets the value corresponding to the given key from the local datastore.
|
|
21
|
-
// The key must be a valid ipld.Link.
|
|
22
|
-
* @param config
|
|
23
|
-
* @returns boolean
|
|
19
|
+
/**
|
|
20
|
+
* Get gets the value corresponding to the given key from the local datastore.
|
|
21
|
+
// The key must be a valid ipld.Link.
|
|
22
|
+
* @param config
|
|
23
|
+
* @returns boolean
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
26
|
export const newClient = function (identity, storePath, bloxAddr, exchange) {
|
|
@@ -31,17 +31,17 @@ export const newClient = function (identity, storePath, bloxAddr, exchange) {
|
|
|
31
31
|
return Fula.newClient(identity, storePath, bloxAddr, exchange, autoFlush, useRelay, refresh);
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
/**
|
|
35
|
-
* rm removes all data
|
|
36
|
-
* @param path
|
|
37
|
-
* @returns string: new cid of the root
|
|
34
|
+
/**
|
|
35
|
+
* rm removes all data
|
|
36
|
+
* @param path
|
|
37
|
+
* @returns string: new cid of the root
|
|
38
38
|
*/
|
|
39
39
|
export const logout = (identity, storePath) => {
|
|
40
40
|
return Fula.logout(identity, storePath);
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
-
/**
|
|
44
|
-
* Checks if there are any un-synced changes on the device
|
|
43
|
+
/**
|
|
44
|
+
* Checks if there are any un-synced changes on the device
|
|
45
45
|
*/
|
|
46
46
|
export const checkFailedActions = function () {
|
|
47
47
|
let retry = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
@@ -49,48 +49,48 @@ export const checkFailedActions = function () {
|
|
|
49
49
|
return Fula.checkFailedActions(retry, timeout);
|
|
50
50
|
};
|
|
51
51
|
|
|
52
|
-
/**
|
|
53
|
-
* Lists the cids that failed to be sent to backend and are kept only locally
|
|
52
|
+
/**
|
|
53
|
+
* Lists the cids that failed to be sent to backend and are kept only locally
|
|
54
54
|
*/
|
|
55
55
|
export const listFailedActions = function () {
|
|
56
56
|
let cids = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
57
57
|
return Fula.listFailedActions(cids);
|
|
58
58
|
};
|
|
59
59
|
|
|
60
|
-
/**
|
|
61
|
-
* Checks if there are any un-synced changes on the device
|
|
60
|
+
/**
|
|
61
|
+
* Checks if there are any un-synced changes on the device
|
|
62
62
|
*/
|
|
63
63
|
export const checkConnection = function () {
|
|
64
64
|
let timeout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 20;
|
|
65
65
|
return Fula.checkConnection(timeout);
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
-
/**
|
|
69
|
-
* Get gets the value corresponding to the given key from the local datastore.
|
|
70
|
-
// The key must be a valid ipld.Link.
|
|
71
|
-
* @param key
|
|
72
|
-
* @returns value
|
|
68
|
+
/**
|
|
69
|
+
* Get gets the value corresponding to the given key from the local datastore.
|
|
70
|
+
// The key must be a valid ipld.Link.
|
|
71
|
+
* @param key
|
|
72
|
+
* @returns value
|
|
73
73
|
*/
|
|
74
74
|
export const get = key => {
|
|
75
75
|
return Fula.get(key);
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
-
/**
|
|
79
|
-
* Has checks whether the value corresponding to the given key is present in the local datastore.
|
|
80
|
-
// The key must be a valid ipld.Link.
|
|
81
|
-
* @param key
|
|
82
|
-
* @returns boolean
|
|
78
|
+
/**
|
|
79
|
+
* Has checks whether the value corresponding to the given key is present in the local datastore.
|
|
80
|
+
// The key must be a valid ipld.Link.
|
|
81
|
+
* @param key
|
|
82
|
+
* @returns boolean
|
|
83
83
|
*/
|
|
84
84
|
export const has = key => {
|
|
85
85
|
return Fula.has(key);
|
|
86
86
|
};
|
|
87
87
|
|
|
88
|
-
/**
|
|
89
|
-
* Push requests the given addr to download the root cid from this node.
|
|
90
|
-
// The addr must be a valid multiaddr that includes peer ID.
|
|
91
|
-
// this function.
|
|
92
|
-
* @param addr
|
|
93
|
-
* @returns null or error
|
|
88
|
+
/**
|
|
89
|
+
* Push requests the given addr to download the root cid from this node.
|
|
90
|
+
// The addr must be a valid multiaddr that includes peer ID.
|
|
91
|
+
// this function.
|
|
92
|
+
* @param addr
|
|
93
|
+
* @returns null or error
|
|
94
94
|
*/
|
|
95
95
|
export const push = () => {
|
|
96
96
|
return Fula.push();
|
|
@@ -101,52 +101,52 @@ export const testData = (identity, bloxAddr) => {
|
|
|
101
101
|
return Fula.testData(identity, bloxAddr);
|
|
102
102
|
};
|
|
103
103
|
|
|
104
|
-
/**
|
|
105
|
-
* Put stores the given key value onto the local datastore.
|
|
106
|
-
// The key must be a valid ipld.Link and the value must be the valid encoded ipld.Node corresponding
|
|
107
|
-
// to the given key.
|
|
108
|
-
* @param key, value
|
|
109
|
-
* @returns null or string
|
|
104
|
+
/**
|
|
105
|
+
* Put stores the given key value onto the local datastore.
|
|
106
|
+
// The key must be a valid ipld.Link and the value must be the valid encoded ipld.Node corresponding
|
|
107
|
+
// to the given key.
|
|
108
|
+
* @param key, value
|
|
109
|
+
* @returns null or string
|
|
110
110
|
*/
|
|
111
111
|
export const put = (value, codec) => {
|
|
112
112
|
return Fula.put(value, codec);
|
|
113
113
|
};
|
|
114
114
|
|
|
115
|
-
/**
|
|
116
|
-
* mkdir creates a directory at the given path.
|
|
117
|
-
* @param path
|
|
118
|
-
* @returns string: new cid of the root
|
|
115
|
+
/**
|
|
116
|
+
* mkdir creates a directory at the given path.
|
|
117
|
+
* @param path
|
|
118
|
+
* @returns string: new cid of the root
|
|
119
119
|
*/
|
|
120
120
|
export const mkdir = path => {
|
|
121
121
|
return Fula.mkdir(path);
|
|
122
122
|
};
|
|
123
123
|
|
|
124
|
-
/**
|
|
125
|
-
* writeFileContent writes content at a given path
|
|
126
|
-
* @param path
|
|
127
|
-
* @returns string: new cid of the root
|
|
124
|
+
/**
|
|
125
|
+
* writeFileContent writes content at a given path
|
|
126
|
+
* @param path
|
|
127
|
+
* @returns string: new cid of the root
|
|
128
128
|
*/
|
|
129
129
|
export const writeFileContent = (path, content) => {
|
|
130
130
|
return Fula.writeFileContent(path, content);
|
|
131
131
|
};
|
|
132
132
|
|
|
133
|
-
/*
|
|
134
|
-
// reads content of the file form localFilename (should include full absolute path to local file with read permission
|
|
135
|
-
// writes content to the specified location by fulaTargetFilename in Fula filesystem
|
|
136
|
-
// It keeps the original file modiifcation date
|
|
137
|
-
// fulaTargetFilename: a string including full path and filename of target file on Fula (e.g. root/pictures/cat.jpg)
|
|
138
|
-
// localFilename: a string containing full path and filename of local file on hte device (e.g /usr/bin/cat.jpg)
|
|
139
|
-
// Returns: new cid of the root after this file is placed in the tree
|
|
133
|
+
/*
|
|
134
|
+
// reads content of the file form localFilename (should include full absolute path to local file with read permission
|
|
135
|
+
// writes content to the specified location by fulaTargetFilename in Fula filesystem
|
|
136
|
+
// It keeps the original file modiifcation date
|
|
137
|
+
// fulaTargetFilename: a string including full path and filename of target file on Fula (e.g. root/pictures/cat.jpg)
|
|
138
|
+
// localFilename: a string containing full path and filename of local file on hte device (e.g /usr/bin/cat.jpg)
|
|
139
|
+
// Returns: new cid of the root after this file is placed in the tree
|
|
140
140
|
*/
|
|
141
141
|
export const writeFile = (fulaTargetFilename, localFilename) => {
|
|
142
142
|
return Fula.writeFile(fulaTargetFilename, localFilename);
|
|
143
143
|
};
|
|
144
144
|
|
|
145
|
-
/**
|
|
146
|
-
* ls lists the name of files and folders at a given path
|
|
147
|
-
* @param path
|
|
148
|
-
* @returns string: list of items
|
|
149
|
-
* TODO: Findout how is the string and convert to array
|
|
145
|
+
/**
|
|
146
|
+
* ls lists the name of files and folders at a given path
|
|
147
|
+
* @param path
|
|
148
|
+
* @returns string: list of items
|
|
149
|
+
* TODO: Findout how is the string and convert to array
|
|
150
150
|
*/
|
|
151
151
|
export const ls = path => {
|
|
152
152
|
return Fula.ls(path).then(res => {
|
|
@@ -177,77 +177,77 @@ export const ls = path => {
|
|
|
177
177
|
});
|
|
178
178
|
};
|
|
179
179
|
|
|
180
|
-
/**
|
|
181
|
-
* rm removes all files and folders at a given path
|
|
182
|
-
* @param path
|
|
183
|
-
* @returns string: new cid of the root
|
|
180
|
+
/**
|
|
181
|
+
* rm removes all files and folders at a given path
|
|
182
|
+
* @param path
|
|
183
|
+
* @returns string: new cid of the root
|
|
184
184
|
*/
|
|
185
185
|
export const rm = path => {
|
|
186
186
|
return Fula.rm(path);
|
|
187
187
|
};
|
|
188
188
|
|
|
189
|
-
/**
|
|
190
|
-
* cp copies the file or folder at the sourcePath to targetPath. targetPath is a folder that must exist already
|
|
191
|
-
* @param sourcePath, targetPath
|
|
192
|
-
* @returns string: new cid of the root
|
|
189
|
+
/**
|
|
190
|
+
* cp copies the file or folder at the sourcePath to targetPath. targetPath is a folder that must exist already
|
|
191
|
+
* @param sourcePath, targetPath
|
|
192
|
+
* @returns string: new cid of the root
|
|
193
193
|
*/
|
|
194
194
|
export const cp = (sourcePath, targetPath) => {
|
|
195
195
|
return Fula.cp(sourcePath, targetPath);
|
|
196
196
|
};
|
|
197
197
|
|
|
198
|
-
/**
|
|
199
|
-
* mv moves the file or folder at the sourcePath to targetPath. targetPath is a folder that must exist already
|
|
200
|
-
* @param sourcePath, targetPath
|
|
201
|
-
* @returns string: new cid of the root
|
|
198
|
+
/**
|
|
199
|
+
* mv moves the file or folder at the sourcePath to targetPath. targetPath is a folder that must exist already
|
|
200
|
+
* @param sourcePath, targetPath
|
|
201
|
+
* @returns string: new cid of the root
|
|
202
202
|
*/
|
|
203
203
|
export const mv = (sourcePath, targetPath) => {
|
|
204
204
|
return Fula.mv(sourcePath, targetPath);
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
-
/*
|
|
208
|
-
// reads content of the file form localFilename (should include full absolute path to local file with read permission
|
|
209
|
-
// writes content to the specified location by fulaTargetFilename in Fula filesystem
|
|
210
|
-
// fulaTargetFilename: a string including full path and filename of target file on Fula (e.g. root/pictures/cat.jpg)
|
|
211
|
-
// localFilename: a string containing full path and filename of local file on hte device (e.g /usr/bin/cat.jpg)
|
|
212
|
-
// Returns: new cid of the root after this file is placed in the tree
|
|
207
|
+
/*
|
|
208
|
+
// reads content of the file form localFilename (should include full absolute path to local file with read permission
|
|
209
|
+
// writes content to the specified location by fulaTargetFilename in Fula filesystem
|
|
210
|
+
// fulaTargetFilename: a string including full path and filename of target file on Fula (e.g. root/pictures/cat.jpg)
|
|
211
|
+
// localFilename: a string containing full path and filename of local file on hte device (e.g /usr/bin/cat.jpg)
|
|
212
|
+
// Returns: new cid of the root after this file is placed in the tree
|
|
213
213
|
*/
|
|
214
214
|
export const readFile = (fulaTargetFilename, localFilename) => {
|
|
215
215
|
return Fula.readFile(fulaTargetFilename, localFilename);
|
|
216
216
|
};
|
|
217
217
|
|
|
218
|
-
/**
|
|
219
|
-
* readFile reads content of a given path
|
|
220
|
-
* @param path
|
|
221
|
-
* @returns string: cotent
|
|
218
|
+
/**
|
|
219
|
+
* readFile reads content of a given path
|
|
220
|
+
* @param path
|
|
221
|
+
* @returns string: cotent
|
|
222
222
|
*/
|
|
223
223
|
export const readFileContent = path => {
|
|
224
224
|
return Fula.readFileContent(path);
|
|
225
225
|
};
|
|
226
226
|
|
|
227
|
-
/**
|
|
228
|
-
* Shutdown closes all resources used by Client.
|
|
229
|
-
// After calling this function Client must be discarded.
|
|
230
|
-
* @param
|
|
231
|
-
* @returns
|
|
227
|
+
/**
|
|
228
|
+
* Shutdown closes all resources used by Client.
|
|
229
|
+
// After calling this function Client must be discarded.
|
|
230
|
+
* @param
|
|
231
|
+
* @returns
|
|
232
232
|
*/
|
|
233
233
|
export const shutdown = () => {
|
|
234
234
|
return Fula.shutdown();
|
|
235
235
|
};
|
|
236
236
|
|
|
237
|
-
/**
|
|
238
|
-
* setAuth adds or removes a peer from the list of peers that are allowed to push to this node.
|
|
239
|
-
* This can only be called on a peer that is added as an owner of blox by --authorizer parameter
|
|
240
|
-
* @param peerId, allow
|
|
241
|
-
* @returns boolean: true if successful or false if not
|
|
237
|
+
/**
|
|
238
|
+
* setAuth adds or removes a peer from the list of peers that are allowed to push to this node.
|
|
239
|
+
* This can only be called on a peer that is added as an owner of blox by --authorizer parameter
|
|
240
|
+
* @param peerId, allow
|
|
241
|
+
* @returns boolean: true if successful or false if not
|
|
242
242
|
*/
|
|
243
243
|
export const setAuth = (peerId, allow) => {
|
|
244
244
|
return Fula.setAuth(peerId, allow);
|
|
245
245
|
};
|
|
246
246
|
|
|
247
|
-
/**
|
|
248
|
-
* isReady checks if the connection is ready to be used.
|
|
249
|
-
* @param filesystemCheck: also check if the wnfs is ready
|
|
250
|
-
* @returns boolean: true if ready or false if not
|
|
247
|
+
/**
|
|
248
|
+
* isReady checks if the connection is ready to be used.
|
|
249
|
+
* @param filesystemCheck: also check if the wnfs is ready
|
|
250
|
+
* @returns boolean: true if ready or false if not
|
|
251
251
|
*/
|
|
252
252
|
export const isReady = function () {
|
|
253
253
|
let filesystemCheck = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Fula","init","identity","storePath","bloxAddr","exchange","autoFlush","rootCid","useRelay","refresh","console","log","newClient","logout","checkFailedActions","retry","timeout","listFailedActions","cids","checkConnection","get","key","has","push","testData","put","value","codec","mkdir","path","writeFileContent","content","writeFile","fulaTargetFilename","localFilename","ls","then","res","lsResult","lsRows","split","element","rowItems","item","name","created","modified","jsonRes","JSON","parse","stringify","catch","e","rm","cp","sourcePath","targetPath","mv","readFile","readFileContent","shutdown","setAuth","peerId","allow","isReady","filesystemCheck"],"sources":["fula.ts"],"sourcesContent":["import Fula from '../interfaces/fulaNativeModule';\n\n/**\n * Get gets the value corresponding to the given key from the local datastore.\n// The key must be a valid ipld.Link.\n * @param config\n * @returns boolean\n */\n\nexport const init = (\n identity: string, //privateKey of did identity\n storePath: string,\n bloxAddr: string,\n exchange: string,\n autoFlush: boolean = false,\n rootCid: string | null = null,\n useRelay: boolean = true,\n refresh: boolean = false\n): Promise<{ peerId: string; rootCid: string }> => {\n console.log(\n 'init in react-native started',\n identity,\n storePath,\n bloxAddr,\n exchange,\n autoFlush,\n useRelay\n );\n return Fula.init(\n identity,\n storePath,\n bloxAddr,\n exchange,\n autoFlush,\n rootCid,\n useRelay,\n refresh\n );\n};\n\n/**\n * Get gets the value corresponding to the given key from the local datastore.\n// The key must be a valid ipld.Link.\n * @param config\n * @returns boolean\n */\n\nexport const newClient = (\n identity: string, //privateKey of did identity\n storePath: string,\n bloxAddr: string,\n exchange: string,\n autoFlush: boolean = false,\n useRelay: boolean = true,\n refresh: boolean = false\n): Promise<string> => {\n console.log(\n 'newClient in react-native started',\n identity,\n storePath,\n bloxAddr,\n exchange,\n autoFlush,\n useRelay,\n refresh\n );\n return Fula.newClient(\n identity,\n storePath,\n bloxAddr,\n exchange,\n autoFlush,\n useRelay,\n refresh\n );\n};\n\n/**\n * rm removes all data\n * @param path\n * @returns string: new cid of the root\n */\nexport const logout = (\n identity: string,\n storePath: string\n): Promise<boolean> => {\n return Fula.logout(identity, storePath);\n};\n\n/**\n * Checks if there are any un-synced changes on the device\n */\nexport const checkFailedActions = (\n retry: boolean = false,\n timeout: number = 20\n): Promise<boolean> => {\n return Fula.checkFailedActions(retry, timeout);\n};\n\n/**\n * Lists the cids that failed to be sent to backend and are kept only locally\n */\nexport const listFailedActions = (cids: string[] = []): Promise<string[]> => {\n return Fula.listFailedActions(cids);\n};\n\n/**\n * Checks if there are any un-synced changes on the device\n */\nexport const checkConnection = (timeout: number = 20): Promise<boolean> => {\n return Fula.checkConnection(timeout);\n};\n\n/**\n * Get gets the value corresponding to the given key from the local datastore.\n// The key must be a valid ipld.Link.\n * @param key\n * @returns value\n */\nexport const get = (key: string): Promise<string> => {\n return Fula.get(key);\n};\n\n/**\n * Has checks whether the value corresponding to the given key is present in the local datastore.\n// The key must be a valid ipld.Link.\n * @param key\n * @returns boolean\n */\nexport const has = (key: Uint8Array): Promise<boolean> => {\n return Fula.has(key);\n};\n\n/**\n * Push requests the given addr to download the root cid from this node.\n// The addr must be a valid multiaddr that includes peer ID.\n// this function.\n * @param addr\n * @returns null or error\n */\nexport const push = (): Promise<string> => {\n return Fula.push();\n};\n\n//This method sends some test data to backedn\nexport const testData = (\n identity: string,\n bloxAddr: string\n): Promise<string> => {\n return Fula.testData(identity, bloxAddr);\n};\n\n/**\n * Put stores the given key value onto the local datastore.\n// The key must be a valid ipld.Link and the value must be the valid encoded ipld.Node corresponding\n// to the given key.\n * @param key, value\n * @returns null or string\n */\nexport const put = (value: string, codec: string): Promise<string> => {\n return Fula.put(value, codec);\n};\n\n/**\n * mkdir creates a directory at the given path.\n * @param path\n * @returns string: new cid of the root\n */\nexport const mkdir = (path: string): Promise<string> => {\n return Fula.mkdir(path);\n};\n\n/**\n * writeFileContent writes content at a given path\n * @param path\n * @returns string: new cid of the root\n */\nexport const writeFileContent = (\n path: string,\n content: string\n): Promise<string> => {\n return Fula.writeFileContent(path, content);\n};\n\n/*\n // reads content of the file form localFilename (should include full absolute path to local file with read permission\n // writes content to the specified location by fulaTargetFilename in Fula filesystem\n // It keeps the original file modiifcation date\n // fulaTargetFilename: a string including full path and filename of target file on Fula (e.g. root/pictures/cat.jpg)\n // localFilename: a string containing full path and filename of local file on hte device (e.g /usr/bin/cat.jpg)\n // Returns: new cid of the root after this file is placed in the tree\n */\nexport const writeFile = (\n fulaTargetFilename: string,\n localFilename: string\n): Promise<string> => {\n return Fula.writeFile(fulaTargetFilename, localFilename);\n};\n\n/**\n * ls lists the name of files and folders at a given path\n * @param path\n * @returns string: list of items\n * TODO: Findout how is the string and convert to array\n */\nexport const ls = (path: string): Promise<void | JSON> => {\n return Fula.ls(path)\n .then((res) => {\n let lsResult = [];\n let lsRows = res.split('!!!');\n for (const element of lsRows) {\n let rowItems = element.split('???');\n if (rowItems && rowItems[0]) {\n let item = {\n name: '',\n created: '',\n modified: '',\n };\n item.name = rowItems[0];\n if (rowItems[1]) {\n item.created = rowItems[1];\n }\n if (rowItems[2]) {\n item.modified = rowItems[2];\n }\n lsResult.push(item);\n }\n }\n let jsonRes = JSON.parse(JSON.stringify(lsResult));\n return jsonRes;\n })\n .catch((e) => {\n return e;\n });\n};\n\n/**\n * rm removes all files and folders at a given path\n * @param path\n * @returns string: new cid of the root\n */\nexport const rm = (path: string): Promise<string> => {\n return Fula.rm(path);\n};\n\n/**\n * cp copies the file or folder at the sourcePath to targetPath. targetPath is a folder that must exist already\n * @param sourcePath, targetPath\n * @returns string: new cid of the root\n */\nexport const cp = (sourcePath: string, targetPath: string): Promise<string> => {\n return Fula.cp(sourcePath, targetPath);\n};\n\n/**\n * mv moves the file or folder at the sourcePath to targetPath. targetPath is a folder that must exist already\n * @param sourcePath, targetPath\n * @returns string: new cid of the root\n */\nexport const mv = (sourcePath: string, targetPath: string): Promise<string> => {\n return Fula.mv(sourcePath, targetPath);\n};\n\n/*\n // reads content of the file form localFilename (should include full absolute path to local file with read permission\n // writes content to the specified location by fulaTargetFilename in Fula filesystem\n // fulaTargetFilename: a string including full path and filename of target file on Fula (e.g. root/pictures/cat.jpg)\n // localFilename: a string containing full path and filename of local file on hte device (e.g /usr/bin/cat.jpg)\n // Returns: new cid of the root after this file is placed in the tree\n */\nexport const readFile = (\n fulaTargetFilename: string,\n localFilename: string\n): Promise<string> => {\n return Fula.readFile(fulaTargetFilename, localFilename);\n};\n\n/**\n * readFile reads content of a given path\n * @param path\n * @returns string: cotent\n */\nexport const readFileContent = (path: string): Promise<string> => {\n return Fula.readFileContent(path);\n};\n\n/**\n * Shutdown closes all resources used by Client.\n// After calling this function Client must be discarded.\n * @param\n * @returns\n */\nexport const shutdown = (): Promise<void> => {\n return Fula.shutdown();\n};\n\n/**\n * setAuth adds or removes a peer from the list of peers that are allowed to push to this node.\n * This can only be called on a peer that is added as an owner of blox by --authorizer parameter\n * @param peerId, allow\n * @returns boolean: true if successful or false if not\n */\nexport const setAuth = (peerId: string, allow: boolean): Promise<boolean> => {\n return Fula.setAuth(peerId, allow);\n};\n\n/**\n * isReady checks if the connection is ready to be used.\n * @param filesystemCheck: also check if the wnfs is ready\n * @returns boolean: true if ready or false if not\n */\nexport const isReady = (filesystemCheck: boolean = true): Promise<boolean> => {\n return Fula.isReady(filesystemCheck);\n};\n"],"mappings":"AAAA,OAAOA,IAAI,MAAM,gCAAgC;;AAEjD;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMC,IAAI,GAAG,UAClBC,QAAgB,EAChBC,SAAiB,EACjBC,QAAgB,EAChBC,QAAgB,EAKiC;EAAA,IAJjDC,SAAkB,uEAAG,KAAK;EAAA,IAC1BC,OAAsB,uEAAG,IAAI;EAAA,IAC7BC,QAAiB,uEAAG,IAAI;EAAA,IACxBC,OAAgB,uEAAG,KAAK;EAExBC,OAAO,CAACC,GAAG,CACT,8BAA8B,EAC9BT,QAAQ,EACRC,SAAS,EACTC,QAAQ,EACRC,QAAQ,EACRC,SAAS,EACTE,QAAQ,CACT;EACD,OAAOR,IAAI,CAACC,IAAI,CACdC,QAAQ,EACRC,SAAS,EACTC,QAAQ,EACRC,QAAQ,EACRC,SAAS,EACTC,OAAO,EACPC,QAAQ,EACRC,OAAO,CACR;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMG,SAAS,GAAG,UACvBV,QAAgB,EAChBC,SAAiB,EACjBC,QAAgB,EAChBC,QAAgB,EAII;EAAA,IAHpBC,SAAkB,uEAAG,KAAK;EAAA,IAC1BE,QAAiB,uEAAG,IAAI;EAAA,IACxBC,OAAgB,uEAAG,KAAK;EAExBC,OAAO,CAACC,GAAG,CACT,mCAAmC,EACnCT,QAAQ,EACRC,SAAS,EACTC,QAAQ,EACRC,QAAQ,EACRC,SAAS,EACTE,QAAQ,EACRC,OAAO,CACR;EACD,OAAOT,IAAI,CAACY,SAAS,CACnBV,QAAQ,EACRC,SAAS,EACTC,QAAQ,EACRC,QAAQ,EACRC,SAAS,EACTE,QAAQ,EACRC,OAAO,CACR;AACH,CAAC;;AAED;AACA;AACA;AACA;AAC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,eAAe,CAAC9B,IAAI,CAAC;AACnC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAM+B,QAAQ,GAAG,MAAqB;EAC3C,OAAO5D,IAAI,CAAC4D,QAAQ,EAAE;AACxB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,OAAO,GAAG,CAACC,MAAc,EAAEC,KAAc,KAAuB;EAC3E,OAAO/D,IAAI,CAAC6D,OAAO,CAACC,MAAM,EAAEC,KAAK,CAAC;AACpC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,OAAO,GAAG,YAAuD;EAAA,IAAtDC,eAAwB,uEAAG,IAAI;EACrD,OAAOjE,IAAI,CAACgE,OAAO,CAACC,eAAe,CAAC;AACtC,CAAC"}
|
|
1
|
+
{"version":3,"names":["Fula","init","identity","storePath","bloxAddr","exchange","autoFlush","rootCid","useRelay","refresh","console","log","newClient","logout","checkFailedActions","retry","timeout","listFailedActions","cids","checkConnection","get","key","has","push","testData","put","value","codec","mkdir","path","writeFileContent","content","writeFile","fulaTargetFilename","localFilename","ls","then","res","lsResult","lsRows","split","element","rowItems","item","name","created","modified","jsonRes","JSON","parse","stringify","catch","e","rm","cp","sourcePath","targetPath","mv","readFile","readFileContent","shutdown","setAuth","peerId","allow","isReady","filesystemCheck"],"sources":["fula.ts"],"sourcesContent":["import Fula from '../interfaces/fulaNativeModule';\r\n\r\n/**\r\n * Get gets the value corresponding to the given key from the local datastore.\r\n// The key must be a valid ipld.Link.\r\n * @param config\r\n * @returns boolean\r\n */\r\n\r\nexport const init = (\r\n identity: string, //privateKey of did identity\r\n storePath: string,\r\n bloxAddr: string,\r\n exchange: string,\r\n autoFlush: boolean = false,\r\n rootCid: string | null = null,\r\n useRelay: boolean = true,\r\n refresh: boolean = false\r\n): Promise<{ peerId: string; rootCid: string }> => {\r\n console.log(\r\n 'init in react-native started',\r\n identity,\r\n storePath,\r\n bloxAddr,\r\n exchange,\r\n autoFlush,\r\n useRelay\r\n );\r\n return Fula.init(\r\n identity,\r\n storePath,\r\n bloxAddr,\r\n exchange,\r\n autoFlush,\r\n rootCid,\r\n useRelay,\r\n refresh\r\n );\r\n};\r\n\r\n/**\r\n * Get gets the value corresponding to the given key from the local datastore.\r\n// The key must be a valid ipld.Link.\r\n * @param config\r\n * @returns boolean\r\n */\r\n\r\nexport const newClient = (\r\n identity: string, //privateKey of did identity\r\n storePath: string,\r\n bloxAddr: string,\r\n exchange: string,\r\n autoFlush: boolean = false,\r\n useRelay: boolean = true,\r\n refresh: boolean = false\r\n): Promise<string> => {\r\n console.log(\r\n 'newClient in react-native started',\r\n identity,\r\n storePath,\r\n bloxAddr,\r\n exchange,\r\n autoFlush,\r\n useRelay,\r\n refresh\r\n );\r\n return Fula.newClient(\r\n identity,\r\n storePath,\r\n bloxAddr,\r\n exchange,\r\n autoFlush,\r\n useRelay,\r\n refresh\r\n );\r\n};\r\n\r\n/**\r\n * rm removes all data\r\n * @param path\r\n * @returns string: new cid of the root\r\n */\r\nexport const logout = (\r\n identity: string,\r\n storePath: string\r\n): Promise<boolean> => {\r\n return Fula.logout(identity, storePath);\r\n};\r\n\r\n/**\r\n * Checks if there are any un-synced changes on the device\r\n */\r\nexport const checkFailedActions = (\r\n retry: boolean = false,\r\n timeout: number = 20\r\n): Promise<boolean> => {\r\n return Fula.checkFailedActions(retry, timeout);\r\n};\r\n\r\n/**\r\n * Lists the cids that failed to be sent to backend and are kept only locally\r\n */\r\nexport const listFailedActions = (cids: string[] = []): Promise<string[]> => {\r\n return Fula.listFailedActions(cids);\r\n};\r\n\r\n/**\r\n * Checks if there are any un-synced changes on the device\r\n */\r\nexport const checkConnection = (timeout: number = 20): Promise<boolean> => {\r\n return Fula.checkConnection(timeout);\r\n};\r\n\r\n/**\r\n * Get gets the value corresponding to the given key from the local datastore.\r\n// The key must be a valid ipld.Link.\r\n * @param key\r\n * @returns value\r\n */\r\nexport const get = (key: string): Promise<string> => {\r\n return Fula.get(key);\r\n};\r\n\r\n/**\r\n * Has checks whether the value corresponding to the given key is present in the local datastore.\r\n// The key must be a valid ipld.Link.\r\n * @param key\r\n * @returns boolean\r\n */\r\nexport const has = (key: Uint8Array): Promise<boolean> => {\r\n return Fula.has(key);\r\n};\r\n\r\n/**\r\n * Push requests the given addr to download the root cid from this node.\r\n// The addr must be a valid multiaddr that includes peer ID.\r\n// this function.\r\n * @param addr\r\n * @returns null or error\r\n */\r\nexport const push = (): Promise<string> => {\r\n return Fula.push();\r\n};\r\n\r\n//This method sends some test data to backedn\r\nexport const testData = (\r\n identity: string,\r\n bloxAddr: string\r\n): Promise<string> => {\r\n return Fula.testData(identity, bloxAddr);\r\n};\r\n\r\n/**\r\n * Put stores the given key value onto the local datastore.\r\n// The key must be a valid ipld.Link and the value must be the valid encoded ipld.Node corresponding\r\n// to the given key.\r\n * @param key, value\r\n * @returns null or string\r\n */\r\nexport const put = (value: string, codec: string): Promise<string> => {\r\n return Fula.put(value, codec);\r\n};\r\n\r\n/**\r\n * mkdir creates a directory at the given path.\r\n * @param path\r\n * @returns string: new cid of the root\r\n */\r\nexport const mkdir = (path: string): Promise<string> => {\r\n return Fula.mkdir(path);\r\n};\r\n\r\n/**\r\n * writeFileContent writes content at a given path\r\n * @param path\r\n * @returns string: new cid of the root\r\n */\r\nexport const writeFileContent = (\r\n path: string,\r\n content: string\r\n): Promise<string> => {\r\n return Fula.writeFileContent(path, content);\r\n};\r\n\r\n/*\r\n // reads content of the file form localFilename (should include full absolute path to local file with read permission\r\n // writes content to the specified location by fulaTargetFilename in Fula filesystem\r\n // It keeps the original file modiifcation date\r\n // fulaTargetFilename: a string including full path and filename of target file on Fula (e.g. root/pictures/cat.jpg)\r\n // localFilename: a string containing full path and filename of local file on hte device (e.g /usr/bin/cat.jpg)\r\n // Returns: new cid of the root after this file is placed in the tree\r\n */\r\nexport const writeFile = (\r\n fulaTargetFilename: string,\r\n localFilename: string\r\n): Promise<string> => {\r\n return Fula.writeFile(fulaTargetFilename, localFilename);\r\n};\r\n\r\n/**\r\n * ls lists the name of files and folders at a given path\r\n * @param path\r\n * @returns string: list of items\r\n * TODO: Findout how is the string and convert to array\r\n */\r\nexport const ls = (path: string): Promise<void | JSON> => {\r\n return Fula.ls(path)\r\n .then((res) => {\r\n let lsResult = [];\r\n let lsRows = res.split('!!!');\r\n for (const element of lsRows) {\r\n let rowItems = element.split('???');\r\n if (rowItems && rowItems[0]) {\r\n let item = {\r\n name: '',\r\n created: '',\r\n modified: '',\r\n };\r\n item.name = rowItems[0];\r\n if (rowItems[1]) {\r\n item.created = rowItems[1];\r\n }\r\n if (rowItems[2]) {\r\n item.modified = rowItems[2];\r\n }\r\n lsResult.push(item);\r\n }\r\n }\r\n let jsonRes = JSON.parse(JSON.stringify(lsResult));\r\n return jsonRes;\r\n })\r\n .catch((e) => {\r\n return e;\r\n });\r\n};\r\n\r\n/**\r\n * rm removes all files and folders at a given path\r\n * @param path\r\n * @returns string: new cid of the root\r\n */\r\nexport const rm = (path: string): Promise<string> => {\r\n return Fula.rm(path);\r\n};\r\n\r\n/**\r\n * cp copies the file or folder at the sourcePath to targetPath. targetPath is a folder that must exist already\r\n * @param sourcePath, targetPath\r\n * @returns string: new cid of the root\r\n */\r\nexport const cp = (sourcePath: string, targetPath: string): Promise<string> => {\r\n return Fula.cp(sourcePath, targetPath);\r\n};\r\n\r\n/**\r\n * mv moves the file or folder at the sourcePath to targetPath. targetPath is a folder that must exist already\r\n * @param sourcePath, targetPath\r\n * @returns string: new cid of the root\r\n */\r\nexport const mv = (sourcePath: string, targetPath: string): Promise<string> => {\r\n return Fula.mv(sourcePath, targetPath);\r\n};\r\n\r\n/*\r\n // reads content of the file form localFilename (should include full absolute path to local file with read permission\r\n // writes content to the specified location by fulaTargetFilename in Fula filesystem\r\n // fulaTargetFilename: a string including full path and filename of target file on Fula (e.g. root/pictures/cat.jpg)\r\n // localFilename: a string containing full path and filename of local file on hte device (e.g /usr/bin/cat.jpg)\r\n // Returns: new cid of the root after this file is placed in the tree\r\n */\r\nexport const readFile = (\r\n fulaTargetFilename: string,\r\n localFilename: string\r\n): Promise<string> => {\r\n return Fula.readFile(fulaTargetFilename, localFilename);\r\n};\r\n\r\n/**\r\n * readFile reads content of a given path\r\n * @param path\r\n * @returns string: cotent\r\n */\r\nexport const readFileContent = (path: string): Promise<string> => {\r\n return Fula.readFileContent(path);\r\n};\r\n\r\n/**\r\n * Shutdown closes all resources used by Client.\r\n// After calling this function Client must be discarded.\r\n * @param\r\n * @returns\r\n */\r\nexport const shutdown = (): Promise<void> => {\r\n return Fula.shutdown();\r\n};\r\n\r\n/**\r\n * setAuth adds or removes a peer from the list of peers that are allowed to push to this node.\r\n * This can only be called on a peer that is added as an owner of blox by --authorizer parameter\r\n * @param peerId, allow\r\n * @returns boolean: true if successful or false if not\r\n */\r\nexport const setAuth = (peerId: string, allow: boolean): Promise<boolean> => {\r\n return Fula.setAuth(peerId, allow);\r\n};\r\n\r\n/**\r\n * isReady checks if the connection is ready to be used.\r\n * @param filesystemCheck: also check if the wnfs is ready\r\n * @returns boolean: true if ready or false if not\r\n */\r\nexport const isReady = (filesystemCheck: boolean = true): Promise<boolean> => {\r\n return Fula.isReady(filesystemCheck);\r\n};\r\n"],"mappings":"AAAA,OAAOA,IAAI,MAAM,gCAAgC;;AAEjD;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMC,IAAI,GAAG,UAClBC,QAAgB,EAChBC,SAAiB,EACjBC,QAAgB,EAChBC,QAAgB,EAKiC;EAAA,IAJjDC,SAAkB,uEAAG,KAAK;EAAA,IAC1BC,OAAsB,uEAAG,IAAI;EAAA,IAC7BC,QAAiB,uEAAG,IAAI;EAAA,IACxBC,OAAgB,uEAAG,KAAK;EAExBC,OAAO,CAACC,GAAG,CACT,8BAA8B,EAC9BT,QAAQ,EACRC,SAAS,EACTC,QAAQ,EACRC,QAAQ,EACRC,SAAS,EACTE,QAAQ,CACT;EACD,OAAOR,IAAI,CAACC,IAAI,CACdC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