@functionland/react-native-fula 1.14.0 → 1.14.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.
@@ -712,7 +712,7 @@ public class FulaModule extends ReactContextBaseJavaModule {
712
712
  this.createNewRootConfig(this.client, identity);
713
713
  }
714
714
  } else {
715
- Log.d("ReactNative", "Recovered cid and private ref from keychain store. cid="+cid);
715
+ Log.d("ReactNative", "Recovered cid and private ref from keychain store. cid="+cid +" and cid from input was: "+rootCid);
716
716
  this.rootConfig = new land.fx.wnfslib.Config(cid);
717
717
  this.reloadFS(this.client, identity, cid);
718
718
  this.encrypt_and_store_config();
@@ -742,7 +742,7 @@ public class FulaModule extends ReactContextBaseJavaModule {
742
742
  @ReactMethod
743
743
  public void mkdir(String path, Promise promise) {
744
744
  ThreadUtils.runOnExecutor(() -> {
745
- Log.d("ReactNative", "mkdir: path = " + path);
745
+ Log.d("ReactNative", "mkdir started with: path = " + path + " rootConfig.getCid() = " + this.rootConfig.getCid());
746
746
  try {
747
747
  land.fx.wnfslib.Config config = Fs.mkdir(this.client, this.rootConfig.getCid(), path);
748
748
  if(config != null) {
@@ -751,7 +751,9 @@ public class FulaModule extends ReactContextBaseJavaModule {
751
751
  if (this.fula != null) {
752
752
  this.fula.flush();
753
753
  }
754
- promise.resolve(config.getCid());
754
+ String rootCid = this.rootConfig.getCid();
755
+ Log.d("ReactNative", "mkdir completed successfully with rootCid = " + rootCid);
756
+ promise.resolve(rootCid);
755
757
  } else {
756
758
  Log.d("ReactNative", "mkdir Error: config is null");
757
759
  promise.reject(new Exception("mkdir Error: config is null"));
@@ -783,7 +785,9 @@ public class FulaModule extends ReactContextBaseJavaModule {
783
785
  this.encrypt_and_store_config();
784
786
  if (this.fula != null) {
785
787
  this.fula.flush();
786
- promise.resolve(config.getCid());
788
+ String rootCid = this.rootConfig.getCid();
789
+ Log.d("ReactNative", "writeFileFromPath completed: this.rootConfig.getCid=" + rootCid);
790
+ promise.resolve(rootCid);
787
791
  } else {
788
792
  Log.d("ReactNative", "writeFile Error: fula is null");
789
793
  promise.reject(new Exception("writeFile Error: fula is null"));
@@ -844,7 +848,7 @@ public class FulaModule extends ReactContextBaseJavaModule {
844
848
  @ReactMethod
845
849
  public void rm(String path, Promise promise) {
846
850
  ThreadUtils.runOnExecutor(() -> {
847
- Log.d("ReactNative", "rm: path = " + path);
851
+ Log.d("ReactNative", "rm: path = " + path + ", beginning rootCid=" + this.rootConfig.getCid());
848
852
  try {
849
853
  land.fx.wnfslib.Config config = Fs.rm(this.client, this.rootConfig.getCid(), path);
850
854
  if(config != null) {
@@ -853,7 +857,9 @@ public class FulaModule extends ReactContextBaseJavaModule {
853
857
  if (this.fula != null) {
854
858
  this.fula.flush();
855
859
  }
856
- promise.resolve(config.getCid());
860
+ String rootCid = config.getCid();
861
+ Log.d("ReactNative", "rm: returned rootCid = " + rootCid);
862
+ promise.resolve(rootCid);
857
863
  } else {
858
864
  Log.d("ReactNative", "rm Error: config is null");
859
865
  promise.reject(new Exception("rm Error: config is null"));
@@ -925,7 +931,7 @@ public class FulaModule extends ReactContextBaseJavaModule {
925
931
  ThreadUtils.runOnExecutor(() -> {
926
932
  Log.d("ReactNative", "readFile: fulaTargetFilename = " + fulaTargetFilename);
927
933
  try {
928
- Log.d("ReactNative", "readFile: localFilename = " + localFilename + " fulaTargetFilename = " + fulaTargetFilename + " cid = " + this.rootConfig.getCid() + " client = " + this.client);
934
+ Log.d("ReactNative", "readFile: localFilename = " + localFilename + " fulaTargetFilename = " + fulaTargetFilename + " beginning rootCid = " + this.rootConfig.getCid());
929
935
  String path = Fs.readFilestreamToPath(this.client, this.rootConfig.getCid(), fulaTargetFilename, localFilename);
930
936
  promise.resolve(path);
931
937
  } catch (Exception e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@functionland/react-native-fula",
3
- "version": "1.14.0",
3
+ "version": "1.14.1",
4
4
  "description": "This package is a bridge to use the Fula libp2p protocols in the react-native which is using wnfs",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",