frida 16.7.14 → 16.7.16

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 (174) hide show
  1. package/README.md +1 -10
  2. package/build/BSDmakefile +6 -0
  3. package/build/Makefile +10 -0
  4. package/build/src/frida.d.ts +364 -0
  5. package/build/src/frida.js +962 -0
  6. package/build/src/frida_binding.d.ts +938 -0
  7. package/meson.build +22 -67
  8. package/package.json +30 -20
  9. package/scripts/fetch-abi-bits.py +15 -65
  10. package/scripts/install.js +5 -4
  11. package/src/addon.def +3 -0
  12. package/src/addon.symbols +2 -1
  13. package/src/addon.version +4 -0
  14. package/src/assets/meson.build +13 -0
  15. package/src/frida_bindgen/__init__.py +0 -0
  16. package/src/frida_bindgen/__main__.py +4 -0
  17. package/src/frida_bindgen/__pycache__/__init__.cpython-312.pyc +0 -0
  18. package/src/frida_bindgen/__pycache__/__main__.cpython-312.pyc +0 -0
  19. package/src/frida_bindgen/__pycache__/cli.cpython-312.pyc +0 -0
  20. package/src/frida_bindgen/__pycache__/codegen.cpython-312.pyc +0 -0
  21. package/src/frida_bindgen/__pycache__/customization.cpython-312.pyc +0 -0
  22. package/src/frida_bindgen/__pycache__/loader.cpython-312.pyc +0 -0
  23. package/src/frida_bindgen/__pycache__/model.cpython-312.pyc +0 -0
  24. package/src/frida_bindgen/assets/codegen_helpers.c +1970 -0
  25. package/src/frida_bindgen/assets/codegen_helpers.ts +100 -0
  26. package/src/frida_bindgen/assets/codegen_prototypes.h +78 -0
  27. package/src/frida_bindgen/assets/codegen_types.h +57 -0
  28. package/src/frida_bindgen/assets/customization_facade.exports +13 -0
  29. package/src/frida_bindgen/assets/customization_facade.ts +157 -0
  30. package/src/frida_bindgen/assets/customization_helpers.imports +2 -0
  31. package/src/frida_bindgen/assets/customization_helpers.ts +396 -0
  32. package/src/frida_bindgen/cli.py +96 -0
  33. package/src/frida_bindgen/codegen.py +2233 -0
  34. package/src/frida_bindgen/customization.py +924 -0
  35. package/src/frida_bindgen/loader.py +60 -0
  36. package/src/frida_bindgen/model.py +1357 -0
  37. package/src/meson.build +94 -27
  38. package/{lib/build.py → src/tsc.py} +12 -12
  39. package/src/win_delay_load_hook.c +56 -0
  40. package/subprojects/frida-core.wrap +1 -1
  41. package/test/data/index.ts +2 -2
  42. package/test/device.ts +1 -2
  43. package/test/device_manager.ts +1 -2
  44. package/test/labrat.ts +2 -2
  45. package/test/script.ts +12 -12
  46. package/test/session.ts +3 -3
  47. package/tsconfig.json +6 -11
  48. package/dist/application.d.ts +0 -81
  49. package/dist/application.js +0 -2
  50. package/dist/authentication.d.ts +0 -3
  51. package/dist/authentication.js +0 -2
  52. package/dist/bus.d.ts +0 -16
  53. package/dist/bus.js +0 -23
  54. package/dist/cancellable.d.ts +0 -15
  55. package/dist/cancellable.js +0 -41
  56. package/dist/child.d.ts +0 -16
  57. package/dist/child.js +0 -9
  58. package/dist/crash.d.ts +0 -10
  59. package/dist/crash.js +0 -2
  60. package/dist/device.d.ts +0 -156
  61. package/dist/device.js +0 -188
  62. package/dist/device_manager.d.ts +0 -25
  63. package/dist/device_manager.js +0 -42
  64. package/dist/endpoint_parameters.d.ts +0 -26
  65. package/dist/endpoint_parameters.js +0 -24
  66. package/dist/icon.d.ts +0 -14
  67. package/dist/icon.js +0 -2
  68. package/dist/index.d.ts +0 -161
  69. package/dist/index.js +0 -170
  70. package/dist/iostream.d.ts +0 -13
  71. package/dist/iostream.js +0 -73
  72. package/dist/native.d.ts +0 -1
  73. package/dist/native.js +0 -11
  74. package/dist/portal_membership.d.ts +0 -6
  75. package/dist/portal_membership.js +0 -12
  76. package/dist/portal_service.d.ts +0 -48
  77. package/dist/portal_service.js +0 -52
  78. package/dist/process.d.ts +0 -47
  79. package/dist/process.js +0 -2
  80. package/dist/relay.d.ts +0 -22
  81. package/dist/relay.js +0 -32
  82. package/dist/script.d.ts +0 -70
  83. package/dist/script.js +0 -266
  84. package/dist/service.d.ts +0 -16
  85. package/dist/service.js +0 -26
  86. package/dist/session.d.ts +0 -45
  87. package/dist/session.js +0 -73
  88. package/dist/signals.d.ts +0 -20
  89. package/dist/signals.js +0 -40
  90. package/dist/socket_address.d.ts +0 -25
  91. package/dist/socket_address.js +0 -2
  92. package/dist/spawn.d.ts +0 -4
  93. package/dist/spawn.js +0 -2
  94. package/dist/system_parameters.d.ts +0 -84
  95. package/dist/system_parameters.js +0 -2
  96. package/lib/application.ts +0 -98
  97. package/lib/authentication.ts +0 -3
  98. package/lib/bus.ts +0 -30
  99. package/lib/cancellable.ts +0 -48
  100. package/lib/child.ts +0 -15
  101. package/lib/crash.ts +0 -11
  102. package/lib/device.ts +0 -331
  103. package/lib/device_manager.ts +0 -69
  104. package/lib/endpoint_parameters.ts +0 -56
  105. package/lib/icon.ts +0 -15
  106. package/lib/index.ts +0 -316
  107. package/lib/iostream.ts +0 -78
  108. package/lib/meson.build +0 -53
  109. package/lib/native.ts +0 -9
  110. package/lib/portal_membership.ts +0 -10
  111. package/lib/portal_service.ts +0 -105
  112. package/lib/process.ts +0 -57
  113. package/lib/relay.ts +0 -44
  114. package/lib/script.ts +0 -361
  115. package/lib/service.ts +0 -34
  116. package/lib/session.ts +0 -113
  117. package/lib/signals.ts +0 -45
  118. package/lib/socket_address.ts +0 -35
  119. package/lib/spawn.ts +0 -4
  120. package/lib/system_parameters.ts +0 -103
  121. package/meson.options +0 -11
  122. package/src/addon.cc +0 -78
  123. package/src/application.cc +0 -148
  124. package/src/application.h +0 -31
  125. package/src/authentication.cc +0 -174
  126. package/src/authentication.h +0 -24
  127. package/src/bus.cc +0 -167
  128. package/src/bus.h +0 -33
  129. package/src/cancellable.cc +0 -117
  130. package/src/cancellable.h +0 -31
  131. package/src/child.cc +0 -150
  132. package/src/child.h +0 -32
  133. package/src/crash.cc +0 -122
  134. package/src/crash.h +0 -30
  135. package/src/device.cc +0 -1350
  136. package/src/device.h +0 -56
  137. package/src/device_manager.cc +0 -362
  138. package/src/device_manager.h +0 -35
  139. package/src/endpoint_parameters.cc +0 -171
  140. package/src/endpoint_parameters.h +0 -28
  141. package/src/glib_context.cc +0 -62
  142. package/src/glib_context.h +0 -29
  143. package/src/glib_object.cc +0 -25
  144. package/src/glib_object.h +0 -37
  145. package/src/iostream.cc +0 -243
  146. package/src/iostream.h +0 -30
  147. package/src/operation.h +0 -94
  148. package/src/portal_membership.cc +0 -100
  149. package/src/portal_membership.h +0 -26
  150. package/src/portal_service.cc +0 -401
  151. package/src/portal_service.h +0 -40
  152. package/src/process.cc +0 -135
  153. package/src/process.h +0 -30
  154. package/src/relay.cc +0 -139
  155. package/src/relay.h +0 -31
  156. package/src/runtime.cc +0 -568
  157. package/src/runtime.h +0 -69
  158. package/src/script.cc +0 -301
  159. package/src/script.h +0 -36
  160. package/src/service.cc +0 -224
  161. package/src/service.h +0 -36
  162. package/src/session.cc +0 -860
  163. package/src/session.h +0 -42
  164. package/src/signals.cc +0 -334
  165. package/src/signals.h +0 -47
  166. package/src/spawn.cc +0 -95
  167. package/src/spawn.h +0 -27
  168. package/src/usage_monitor.h +0 -117
  169. package/src/uv_context.cc +0 -118
  170. package/src/uv_context.h +0 -40
  171. package/src/win_delay_load_hook.cc +0 -63
  172. package/subprojects/nan.wrap +0 -9
  173. package/subprojects/packagefiles/nan.patch +0 -13
  174. /package/{scripts → src/assets}/adjust-version.py +0 -0
@@ -0,0 +1,60 @@
1
+ from __future__ import annotations
2
+
3
+ from collections import OrderedDict
4
+ from pathlib import Path
5
+
6
+ from .model import Customizations, Model, parse_gir
7
+
8
+ INCLUDED_GIO_OBJECT_TYPES = [
9
+ "Cancellable",
10
+ "IOStream",
11
+ "InputStream",
12
+ "OutputStream",
13
+ "InetSocketAddress",
14
+ "InetAddress",
15
+ "UnixSocketAddress",
16
+ "SocketAddress",
17
+ "SocketAddressEnumerator",
18
+ "SocketConnectable",
19
+ ]
20
+ INCLUDED_GIO_ENUMERATIONS = [
21
+ "FileMonitorEvent",
22
+ "SocketFamily",
23
+ "UnixSocketAddressType",
24
+ ]
25
+
26
+
27
+ def compute_model(
28
+ frida_gir: Path,
29
+ glib_gir: Path,
30
+ gobject_gir: Path,
31
+ gio_gir: Path,
32
+ customizations: Customizations,
33
+ ) -> Model:
34
+ glib = parse_gir(glib_gir, [])
35
+ gobject = parse_gir(gobject_gir, [glib])
36
+ gio = parse_gir(gio_gir, [glib, gobject])
37
+ frida = parse_gir(frida_gir, [glib, gobject, gio])
38
+
39
+ object_types = OrderedDict(frida.object_types)
40
+ object_types["Object"] = gobject.object_types["Object"]
41
+ for t in INCLUDED_GIO_OBJECT_TYPES:
42
+ object_types[t] = gio.object_types[t]
43
+
44
+ enumerations = OrderedDict(frida.enumerations)
45
+ for t in INCLUDED_GIO_ENUMERATIONS:
46
+ enumerations[t] = gio.enumerations[t]
47
+
48
+ model = Model(
49
+ frida.namespace,
50
+ object_types,
51
+ enumerations,
52
+ customizations,
53
+ )
54
+
55
+ for t in object_types.values():
56
+ t.model = model
57
+ for t in enumerations.values():
58
+ t.model = model
59
+
60
+ return model