expo-tiddlywiki-filesystem-android-external-storage 2.12.1 → 2.12.2

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.
@@ -15,9 +15,17 @@ internal object TiddlyWikiParser {
15
15
  * Returns a JSON array string ready for injection into TiddlyWiki boot store.
16
16
  */
17
17
  fun batchParseTidFiles(filePaths: List<String>, quickLoadMode: Boolean): String {
18
- val results = filePaths.parallelStream().map { path ->
18
+ // Use sequential stream (not parallelStream) to preserve input order.
19
+ // The JS side relies on result ordering to map titles back to file paths
20
+ // when building the tiddler index.
21
+ val results = filePaths.stream().map { path ->
19
22
  try {
20
- parseTiddlerFile(path, quickLoadMode)
23
+ val parsed = parseTiddlerFile(path, quickLoadMode)
24
+ // Tag result with filepath so JS side can map correctly regardless of order
25
+ when (parsed) {
26
+ is JSONObject -> parsed.put("_filepath", path)
27
+ }
28
+ parsed
21
29
  } catch (e: Exception) {
22
30
  null
23
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-tiddlywiki-filesystem-android-external-storage",
3
- "version": "2.12.1",
3
+ "version": "2.12.2",
4
4
  "description": "Expo native module for TidGi-Mobile: filesystem I/O + TiddlyWiki .tid/.meta/.json batch parsing + git status in Kotlin (Android) and Swift (iOS)",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",