feat(experimental): composer hooks

This commit is contained in:
rhunk
2024-04-21 23:25:45 +02:00
parent c8195c5250
commit 17ad43ee92
12 changed files with 467 additions and 12 deletions

View File

@@ -124,6 +124,13 @@ class RemoteScriptManager(
}
override fun getScriptContent(moduleName: String): String? {
if (moduleName.startsWith("composer/")) {
return runCatching {
context.androidContext.assets.open("composer/${moduleName.removePrefix("composer/")}").use {
it.bufferedReader().readText()
}
}.getOrNull()
}
return getScriptInputStream(moduleName) { it?.bufferedReader()?.readText() }
}