expo-tiddlywiki-filesystem-android-external-storage 2.2.2 → 2.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.
@@ -648,9 +648,26 @@ class ExternalStorageModule : Module() {
648
648
  val indexFile = File(gitDir, "index")
649
649
 
650
650
  val result = JSONObject()
651
+ result.put("rootExists", root.exists())
652
+ result.put("rootIsDir", root.isDirectory)
653
+ result.put("gitDirExists", gitDir.exists())
654
+ result.put("gitDirIsDir", gitDir.isDirectory)
655
+ result.put("indexFileExists", indexFile.exists())
656
+ result.put("rootPath", root.absolutePath)
657
+ result.put("gitDirPath", gitDir.absolutePath)
658
+ result.put("indexPath", indexFile.absolutePath)
659
+
660
+ // List contents of root (first 10)
661
+ val rootChildren = root.listFiles()?.map { it.name }?.sorted()?.take(10) ?: emptyList()
662
+ result.put("rootChildren", JSONArray(rootChildren))
663
+
664
+ // List contents of .git if exists
665
+ if (gitDir.exists() && gitDir.isDirectory) {
666
+ val gitChildren = gitDir.listFiles()?.map { it.name }?.sorted() ?: emptyList()
667
+ result.put("gitDirChildren", JSONArray(gitChildren))
668
+ }
651
669
 
652
670
  if (!indexFile.exists()) {
653
- result.put("error", "no git index file")
654
671
  return@AsyncFunction result.toString()
655
672
  }
656
673
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-tiddlywiki-filesystem-android-external-storage",
3
- "version": "2.2.2",
3
+ "version": "2.2.3",
4
4
  "description": "Expo native module for TidGi-Mobile: external storage I/O + TiddlyWiki .tid/.meta/.json batch parsing in Kotlin",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",