@invarn/cli 0.9.364 → 0.9.368

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.
Files changed (37) hide show
  1. package/dist/capture/android/VERSION +1 -1
  2. package/dist/capture/android/capture-build.cjs +1 -1
  3. package/dist/capture/android/controller.cjs +1 -1
  4. package/dist/capture/android/index.cjs +1 -1
  5. package/dist/capture/android/invarn-agent-0.138.0.aar +0 -0
  6. package/dist/capture/android/verify-apk.cjs +1 -1
  7. package/dist/capture/ios/InvarnAgent-0.95.0.dylib +0 -0
  8. package/dist/capture/ios/InvarnComposeReader-0.95.0/VERSION +1 -0
  9. package/dist/capture/ios/InvarnComposeReader-0.95.0/invarn-compose.gradle +168 -0
  10. package/dist/capture/ios/{InvarnComposeReader-0.90.0.tar → InvarnComposeReader-0.95.0.tar} +0 -0
  11. package/dist/capture/ios/{InvarnFold-0.90.0 → InvarnFold-0.95.0} +0 -0
  12. package/dist/capture/ios/{InvarnHinge-0.90.0 → InvarnHinge-0.95.0} +0 -0
  13. package/dist/capture/ios/{InvarnQuit-0.90.0 → InvarnQuit-0.95.0} +0 -0
  14. package/dist/capture/ios/{InvarnReencode-0.90.0 → InvarnReencode-0.95.0} +0 -0
  15. package/dist/capture/ios/{InvarnSystemRunner-0.90.0.dylib → InvarnSystemRunner-0.95.0.dylib} +0 -0
  16. package/dist/capture/ios/VERSION +1 -1
  17. package/dist/capture/ios/capture-build.cjs +1 -1
  18. package/dist/capture/ios/controller.cjs +1 -1
  19. package/dist/capture/ios/index.cjs +1 -1
  20. package/dist/invarn.cjs +25 -24
  21. package/dist/local-run-worker.mjs +1 -1
  22. package/dist/sdk.mjs +36 -39
  23. package/package.json +1 -1
  24. package/dist/capture/android/invarn-agent-0.136.0.aar +0 -0
  25. package/dist/capture/ios/InvarnAgent-0.90.0.dylib +0 -0
  26. package/dist/capture/ios/InvarnComposeReader-0.90.0/VERSION +0 -1
  27. package/dist/capture/ios/InvarnComposeReader-0.90.0/invarn-compose.gradle +0 -90
  28. /package/dist/capture/android/{invarn-init-0.136.0.gradle → invarn-init-0.138.0.gradle} +0 -0
  29. /package/dist/capture/android/{invarn-instrument-0.136.0.jar → invarn-instrument-0.138.0.jar} +0 -0
  30. /package/dist/capture/android/{invarn-reader-0.136.0.jar → invarn-reader-0.138.0.jar} +0 -0
  31. /package/dist/capture/ios/{InvarnComposeReader-0.90.0 → InvarnComposeReader-0.95.0}/scan.groovy +0 -0
  32. /package/dist/capture/ios/{InvarnComposeReader-0.90.0 → InvarnComposeReader-0.95.0}/src/Ivx.kt +0 -0
  33. /package/dist/capture/ios/{InvarnComposeReader-0.90.0 → InvarnComposeReader-0.95.0}/src/Zmn0.kt +0 -0
  34. /package/dist/capture/ios/{InvarnComposeReader-0.90.0 → InvarnComposeReader-0.95.0}/src/Znn0.kt +0 -0
  35. /package/dist/capture/ios/{InvarnComposeReader-0.90.0 → InvarnComposeReader-0.95.0}/src/Zpn0.kt +0 -0
  36. /package/dist/capture/ios/{InvarnComposeReader-0.90.0 → InvarnComposeReader-0.95.0}/src/Zqn0.kt +0 -0
  37. /package/dist/capture/ios/{InvarnComposeReader-0.90.0 → InvarnComposeReader-0.95.0}/src/Zsn0.kt +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@invarn/cli",
3
- "version": "0.9.364",
3
+ "version": "0.9.368",
4
4
  "description": "Invarn CLI — run builds, check artifacts, and ship from your terminal",
5
5
  "type": "module",
6
6
  "main": "dist/invarn.cjs",
@@ -1,90 +0,0 @@
1
- def readerHome = System.getenv('INVARN_COMPOSE_READER') ?: buildscript.sourceFile?.parentFile?.absolutePath
2
- def FLOOR = [1, 10, 0]
3
- def READER = (new File(readerHome, 'VERSION').with { it.exists() ? it.text.trim() : 'dev' })
4
-
5
- def versionOf = { String v -> (v =~ /^(\d+)\.(\d+)(?:\.(\d+))?/).with { m -> m.find() ? [m.group(1) as int, m.group(2) as int, (m.group(3) ?: '0') as int] : null } }
6
- def atLeast = { List a, List b -> for (int i = 0; i < 3; i++) { if (a[i] != b[i]) return a[i] > b[i] }; true }
7
-
8
- gradle.beforeProject { p ->
9
- p.pluginManager.withPlugin('org.jetbrains.kotlin.plugin.compose') {
10
- def ext = p.extensions.findByName('composeCompiler')
11
- if (ext != null && ext.hasProperty('includeSourceInformation')) ext.includeSourceInformation.set(true)
12
- }
13
- p.pluginManager.withPlugin('org.jetbrains.kotlin.multiplatform') {
14
- p.afterEvaluate {
15
- def kotlin = p.extensions.getByName('kotlin')
16
- kotlin.targets.each { t ->
17
- if (!t.hasProperty('konanTarget') || t.konanTarget.family.name() != 'IOS') return
18
- if (!t.binaries.any { it.getClass().name.contains('Framework') }) return
19
- def main = t.compilations.getByName('main')
20
- def classpath = main.compileDependencyFiles
21
- def out = p.layout.buildDirectory.dir("generated/invarn-compose/${t.name}")
22
- def gen = p.tasks.register("invarnComposeReader${t.name.capitalize()}") { task ->
23
- task.outputs.dir(out)
24
- task.outputs.upToDateWhen { false }
25
- task.doLast {
26
- def dir = out.get().asFile
27
- dir.deleteDir(); dir.mkdirs()
28
- def found = []
29
- classpath.files.each { f ->
30
- def m = (f.absolutePath =~ /compose[\/.]runtime[\/.]runtime-(?:ios|uikit)[a-z0-9]*[\/.](\d[^\/]*)[\/]/)
31
- if (m.find()) { def v = versionOf(m.group(1)); if (v) found << v }
32
- }
33
- def runtime = found.max { a, b -> atLeast(a, b) ? (a == b ? 0 : 1) : -1 }
34
- if (runtime == null || !atLeast(runtime, FLOOR)) {
35
- p.logger.lifecycle("[invarn-compose] ${p.path} ${t.name}: no reader (Compose runtime ${runtime ? runtime.join('.') : 'not found'}, reader needs ${FLOOR.join('.')} or later)")
36
- return
37
- }
38
- ['src'].each { sub -> new File(readerHome, sub).eachFileRecurse { f -> if (f.name.endsWith('.kt')) new File(dir, f.name).text = f.text } }
39
- def zvg0 = new TreeSet<String>()
40
- def zhk0 = new TreeMap<String, String>()
41
- def scanFile = new File(readerHome, 'scan.groovy')
42
- def scanner = scanFile.exists() ? new GroovyShell(getClass().classLoader).evaluate(scanFile) : null
43
- def ztm0 = new TreeSet<String>()
44
- def buildSrc = new File(p.rootDir, 'buildSrc').canonicalPath
45
- def root = p.rootDir
46
- def home = p.gradle.gradleUserHomeDir.canonicalPath
47
- def walk
48
- walk = { File d ->
49
- d.listFiles()?.each { f ->
50
- if (f.isDirectory()) {
51
- if (f.name == 'build' || f.name.startsWith('.') || f.canonicalPath == home) return
52
- walk(f)
53
- } else if (f.name.endsWith('.kt')) {
54
- def pm = (f.text =~ /(?m)^\s*package\s+([A-Za-z_`][\w.`]*)/)
55
- def pkg = pm.find() ? pm.group(1).replace('`', '') : ''
56
- def key = f.name + '#' + Integer.toString(Math.abs(pkg.hashCode()), 36)
57
- zvg0 << key
58
- zhk0[key] = pkg
59
- if (scanner != null && !scanner.inTestSources(f) && !f.canonicalPath.startsWith(buildSrc + File.separator))
60
- scanner.scan(f.text, { String l -> ztm0 << String.format('%016x', scanner.hash(l)) } as java.util.function.Consumer)
61
- }
62
- }
63
- }
64
- walk(root)
65
- def literal = { String joined ->
66
- def chunks = []
67
- for (int i = 0; i < joined.length(); i += 20000) chunks << joined.substring(i, Math.min(joined.length(), i + 20000))
68
- chunks.collect { '"' + it.replace('\\', '\\\\').replace('"', '\\"').replace('$', '\\$').replace('\n', '\\n') + '"' }.join(' +\n ')
69
- }
70
- def lit = literal(zvg0.join('\n'))
71
- def pkgs = literal(zhk0.collect { k, v -> k + '=' + v }.join('\n'))
72
- def hashes = literal(ztm0.join('\n'))
73
- new File(dir, 'zmb0.kt').text = """package zp6
74
-
75
- internal object zmb0 {
76
- val zvg0: Set<String>? = (${lit ?: '""'}).split('\\n').filter { it.isNotEmpty() }.toSet().takeIf { it.isNotEmpty() }
77
- val zhk0: Map<String, String>? = (${pkgs ?: '""'}).split('\\n').filter { it.contains('=') }
78
- .associate { it.substringBefore('=') to it.substringAfter('=') }.takeIf { it.isNotEmpty() }
79
- val ztm0: LongArray? = (${hashes ?: '""'}).split('\\n').filter { it.isNotEmpty() }.map { it.toULong(16).toLong() }
80
- .toLongArray().also { it.sort() }.takeIf { it.isNotEmpty() }
81
- }
82
- """
83
- p.logger.lifecycle("[invarn-compose] ${p.path} ${t.name}: reader ${READER} added (Compose runtime ${runtime.join('.')}, ${zvg0.size()} Kotlin files, ${ztm0.size()} literals)")
84
- }
85
- }
86
- main.defaultSourceSet.kotlin.srcDir(gen)
87
- }
88
- }
89
- }
90
- }