@open-core/framework 1.0.5-beta.1 → 1.0.5-beta.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.
Files changed (344) hide show
  1. package/dist/adapters/contracts/IEngineEvents.d.ts +3 -0
  2. package/dist/adapters/contracts/IEngineEvents.js +7 -0
  3. package/dist/adapters/contracts/IPlatformContext.d.ts +43 -0
  4. package/dist/adapters/contracts/IPlatformContext.js +8 -0
  5. package/dist/adapters/contracts/client/IClientLocalPlayerBridge.d.ts +4 -0
  6. package/dist/adapters/contracts/client/IClientLocalPlayerBridge.js +2 -0
  7. package/dist/adapters/contracts/client/IClientLogConsole.d.ts +13 -0
  8. package/dist/adapters/contracts/client/IClientLogConsole.js +2 -0
  9. package/dist/adapters/contracts/client/IClientPlatformBridge.d.ts +195 -0
  10. package/dist/adapters/contracts/client/IClientPlatformBridge.js +282 -0
  11. package/dist/adapters/contracts/client/IClientRuntimeBridge.d.ts +18 -0
  12. package/dist/adapters/contracts/client/IClientRuntimeBridge.js +14 -0
  13. package/dist/adapters/contracts/client/IGtaPedAppearanceBridge.d.ts +26 -0
  14. package/dist/adapters/contracts/client/IGtaPedAppearanceBridge.js +2 -0
  15. package/dist/adapters/contracts/client/index.d.ts +7 -0
  16. package/dist/adapters/contracts/client/index.js +7 -0
  17. package/dist/adapters/contracts/client/spawn/IClientSpawnBridge.d.ts +7 -0
  18. package/dist/adapters/contracts/client/spawn/IClientSpawnBridge.js +2 -0
  19. package/dist/adapters/contracts/client/spawn/index.d.ts +2 -0
  20. package/dist/adapters/contracts/client/spawn/index.js +2 -0
  21. package/dist/adapters/contracts/client/spawn/types.d.ts +14 -0
  22. package/dist/adapters/contracts/client/ui/IClientBlipBridge.d.ts +25 -0
  23. package/dist/adapters/contracts/client/ui/IClientBlipBridge.js +2 -0
  24. package/dist/adapters/contracts/client/ui/IClientMarkerBridge.d.ts +31 -0
  25. package/dist/adapters/contracts/client/ui/IClientMarkerBridge.js +2 -0
  26. package/dist/adapters/contracts/client/ui/IClientNotificationBridge.d.ts +21 -0
  27. package/dist/adapters/contracts/client/ui/IClientNotificationBridge.js +2 -0
  28. package/dist/adapters/contracts/client/ui/index.d.ts +4 -0
  29. package/dist/adapters/contracts/client/ui/index.js +4 -0
  30. package/dist/adapters/contracts/client/ui/webview/IClientWebViewBridge.d.ts +13 -0
  31. package/dist/adapters/contracts/client/ui/webview/IClientWebViewBridge.js +2 -0
  32. package/dist/adapters/contracts/client/ui/webview/index.d.ts +2 -0
  33. package/dist/adapters/contracts/client/ui/webview/index.js +2 -0
  34. package/dist/adapters/contracts/client/ui/webview/types.d.ts +25 -0
  35. package/dist/adapters/contracts/client/ui/webview/types.js +0 -0
  36. package/dist/adapters/contracts/index.d.ts +4 -2
  37. package/dist/adapters/contracts/index.js +4 -3
  38. package/dist/adapters/contracts/runtime/index.d.ts +1 -0
  39. package/dist/adapters/contracts/runtime/index.js +1 -0
  40. package/dist/adapters/contracts/runtime/runtime-events.d.ts +9 -0
  41. package/dist/adapters/contracts/runtime/runtime-events.js +7 -0
  42. package/dist/adapters/contracts/server/IEntityServer.d.ts +4 -28
  43. package/dist/adapters/contracts/server/IEntityServer.js +0 -26
  44. package/dist/adapters/contracts/server/IPlayerServer.d.ts +7 -26
  45. package/dist/adapters/contracts/server/IPlayerServer.js +0 -26
  46. package/dist/adapters/contracts/server/index.d.ts +10 -0
  47. package/dist/adapters/contracts/server/index.js +10 -0
  48. package/dist/adapters/contracts/server/npc-lifecycle/INpcLifecycleServer.d.ts +5 -0
  49. package/dist/adapters/contracts/server/npc-lifecycle/INpcLifecycleServer.js +2 -0
  50. package/dist/adapters/contracts/server/npc-lifecycle/index.d.ts +2 -0
  51. package/dist/adapters/contracts/server/npc-lifecycle/index.js +2 -0
  52. package/dist/adapters/contracts/server/npc-lifecycle/types.d.ts +17 -0
  53. package/dist/adapters/contracts/server/npc-lifecycle/types.js +0 -0
  54. package/dist/adapters/contracts/server/player-appearance/IPlayerAppearanceLifecycleServer.d.ts +11 -0
  55. package/dist/adapters/contracts/server/player-appearance/IPlayerAppearanceLifecycleServer.js +2 -0
  56. package/dist/adapters/contracts/server/player-appearance/index.d.ts +1 -0
  57. package/dist/adapters/contracts/server/player-appearance/index.js +1 -0
  58. package/dist/adapters/contracts/server/player-lifecycle/IPlayerLifecycleServer.d.ts +6 -0
  59. package/dist/adapters/contracts/server/player-lifecycle/IPlayerLifecycleServer.js +2 -0
  60. package/dist/adapters/contracts/server/player-lifecycle/index.d.ts +2 -0
  61. package/dist/adapters/contracts/server/player-lifecycle/index.js +2 -0
  62. package/dist/adapters/contracts/server/player-lifecycle/types.d.ts +17 -0
  63. package/dist/adapters/contracts/server/player-lifecycle/types.js +0 -0
  64. package/dist/adapters/contracts/server/player-state/IPlayerStateSyncServer.d.ts +6 -0
  65. package/dist/adapters/contracts/server/player-state/IPlayerStateSyncServer.js +2 -0
  66. package/dist/adapters/contracts/server/player-state/index.d.ts +1 -0
  67. package/dist/adapters/contracts/server/player-state/index.js +1 -0
  68. package/dist/adapters/contracts/server/vehicle-lifecycle/IVehicleLifecycleServer.d.ts +5 -0
  69. package/dist/adapters/contracts/server/vehicle-lifecycle/IVehicleLifecycleServer.js +2 -0
  70. package/dist/adapters/contracts/server/vehicle-lifecycle/index.d.ts +2 -0
  71. package/dist/adapters/contracts/server/vehicle-lifecycle/index.js +2 -0
  72. package/dist/adapters/contracts/server/vehicle-lifecycle/types.d.ts +16 -0
  73. package/dist/adapters/contracts/server/vehicle-lifecycle/types.js +0 -0
  74. package/dist/adapters/contracts/transport/index.d.ts +4 -0
  75. package/dist/adapters/contracts/transport/index.js +4 -0
  76. package/dist/adapters/index.d.ts +3 -14
  77. package/dist/adapters/index.js +3 -20
  78. package/dist/adapters/node/node-capabilities.d.ts +11 -11
  79. package/dist/adapters/node/node-capabilities.js +15 -27
  80. package/dist/adapters/node/node-engine-events.d.ts +1 -1
  81. package/dist/adapters/node/node-engine-events.js +2 -1
  82. package/dist/adapters/node/node-entity-server.d.ts +2 -2
  83. package/dist/adapters/node/node-entity-server.js +2 -2
  84. package/dist/adapters/node/node-ped-appearance-client.d.ts +2 -2
  85. package/dist/adapters/node/node-ped-appearance-client.js +2 -2
  86. package/dist/adapters/node/node-platform.js +4 -4
  87. package/dist/adapters/node/node-player-server.d.ts +3 -2
  88. package/dist/adapters/node/node-player-server.js +8 -2
  89. package/dist/adapters/register-capabilities.d.ts +1 -1
  90. package/dist/adapters/register-capabilities.js +1 -3
  91. package/dist/adapters/register-client-capabilities.d.ts +3 -2
  92. package/dist/adapters/register-client-capabilities.js +16 -41
  93. package/dist/contracts/client.d.ts +5 -0
  94. package/dist/contracts/client.js +5 -0
  95. package/dist/contracts/server.d.ts +19 -0
  96. package/dist/contracts/server.js +19 -0
  97. package/dist/contracts.d.ts +4 -0
  98. package/dist/contracts.js +4 -0
  99. package/dist/index.d.ts +1 -1
  100. package/dist/index.js +1 -1
  101. package/dist/kernel/logger/client-log-console.d.ts +4 -0
  102. package/dist/kernel/logger/client-log-console.js +43 -0
  103. package/dist/kernel/logger/core-logger.d.ts +3 -1
  104. package/dist/kernel/logger/core-logger.js +4 -2
  105. package/dist/kernel/logger/index.d.ts +2 -0
  106. package/dist/kernel/logger/index.js +1 -0
  107. package/dist/kernel/logger/transports/dev-transport.factory.js +1 -1
  108. package/dist/kernel/logger/transports/simple-console.transport.js +13 -8
  109. package/dist/kernel-public.d.ts +1 -0
  110. package/dist/kernel-public.js +1 -0
  111. package/dist/runtime/client/adapter/client-adapter.d.ts +25 -0
  112. package/dist/runtime/client/adapter/client-adapter.js +11 -0
  113. package/dist/runtime/client/adapter/index.d.ts +15 -0
  114. package/dist/runtime/client/adapter/index.js +15 -0
  115. package/dist/runtime/client/adapter/local-player-bridge.d.ts +1 -0
  116. package/dist/runtime/client/adapter/local-player-bridge.js +1 -0
  117. package/dist/runtime/client/adapter/node-blip-bridge.d.ts +9 -0
  118. package/dist/runtime/client/adapter/node-blip-bridge.js +34 -0
  119. package/dist/runtime/client/adapter/node-client-adapter.d.ts +5 -0
  120. package/dist/runtime/client/adapter/node-client-adapter.js +50 -0
  121. package/dist/runtime/client/adapter/node-local-player-bridge.d.ts +8 -0
  122. package/dist/{adapters/fivem/fivem-hasher.js → runtime/client/adapter/node-local-player-bridge.js} +7 -9
  123. package/dist/runtime/client/adapter/node-log-console.d.ts +11 -0
  124. package/dist/runtime/client/adapter/node-log-console.js +48 -0
  125. package/dist/runtime/client/adapter/node-marker-bridge.d.ts +10 -0
  126. package/dist/runtime/client/adapter/node-marker-bridge.js +35 -0
  127. package/dist/runtime/client/adapter/node-notification-bridge.d.ts +5 -0
  128. package/dist/runtime/client/adapter/node-notification-bridge.js +16 -0
  129. package/dist/runtime/client/adapter/node-platform-bridge.d.ts +3 -0
  130. package/dist/{adapters/fivem/fivem-tick.js → runtime/client/adapter/node-platform-bridge.js} +5 -10
  131. package/dist/runtime/client/adapter/node-runtime-bridge.d.ts +24 -0
  132. package/dist/runtime/client/adapter/node-runtime-bridge.js +58 -0
  133. package/dist/runtime/client/adapter/node-spawn-bridge.d.ts +8 -0
  134. package/dist/runtime/client/adapter/node-spawn-bridge.js +18 -0
  135. package/dist/runtime/client/adapter/node-webview-bridge.d.ts +15 -0
  136. package/dist/runtime/client/adapter/node-webview-bridge.js +43 -0
  137. package/dist/runtime/client/adapter/platform-bridge.d.ts +1 -0
  138. package/dist/runtime/client/adapter/platform-bridge.js +1 -0
  139. package/dist/runtime/client/adapter/registry.d.ts +9 -0
  140. package/dist/runtime/client/adapter/registry.js +85 -0
  141. package/dist/runtime/client/adapter/runtime-bridge.d.ts +1 -0
  142. package/dist/runtime/client/adapter/runtime-bridge.js +1 -0
  143. package/dist/runtime/client/api.d.ts +2 -1
  144. package/dist/runtime/client/api.js +2 -1
  145. package/dist/runtime/client/client-bootstrap.js +51 -44
  146. package/dist/runtime/client/client-core.d.ts +2 -0
  147. package/dist/runtime/client/client-core.js +9 -0
  148. package/dist/runtime/client/client-runtime.d.ts +3 -0
  149. package/dist/runtime/client/client-runtime.js +3 -0
  150. package/dist/runtime/client/controllers/appearance.controller.d.ts +3 -1
  151. package/dist/runtime/client/controllers/appearance.controller.js +14 -4
  152. package/dist/runtime/client/controllers/spawner.controller.js +2 -0
  153. package/dist/runtime/client/decorators/controller.js +2 -10
  154. package/dist/runtime/client/decorators/onView.d.ts +3 -3
  155. package/dist/runtime/client/decorators/onView.js +3 -3
  156. package/dist/runtime/client/index.d.ts +1 -0
  157. package/dist/runtime/client/index.js +1 -0
  158. package/dist/runtime/client/library/create-client-library.js +9 -1
  159. package/dist/runtime/client/services/appearance.service.d.ts +2 -2
  160. package/dist/runtime/client/services/appearance.service.js +7 -4
  161. package/dist/runtime/client/services/blip.service.d.ts +6 -93
  162. package/dist/runtime/client/services/blip.service.js +58 -153
  163. package/dist/runtime/client/services/camera-effects.registry.d.ts +3 -0
  164. package/dist/runtime/client/services/camera-effects.registry.js +20 -7
  165. package/dist/runtime/client/services/camera.d.ts +3 -83
  166. package/dist/runtime/client/services/camera.js +37 -93
  167. package/dist/runtime/client/services/cinematic.d.ts +5 -1
  168. package/dist/runtime/client/services/cinematic.js +45 -30
  169. package/dist/runtime/client/services/index.d.ts +1 -0
  170. package/dist/runtime/client/services/index.js +1 -0
  171. package/dist/runtime/client/services/marker.service.d.ts +12 -63
  172. package/dist/runtime/client/services/marker.service.js +62 -97
  173. package/dist/runtime/client/services/notification.service.d.ts +6 -57
  174. package/dist/runtime/client/services/notification.service.js +43 -81
  175. package/dist/runtime/client/services/ped.service.d.ts +3 -130
  176. package/dist/runtime/client/services/ped.service.js +66 -198
  177. package/dist/runtime/client/services/progress.service.d.ts +5 -30
  178. package/dist/runtime/client/services/progress.service.js +73 -99
  179. package/dist/runtime/client/services/session-bridge.service.d.ts +15 -0
  180. package/dist/runtime/client/services/session-bridge.service.js +61 -0
  181. package/dist/runtime/client/services/spawn.service.d.ts +6 -56
  182. package/dist/runtime/client/services/spawn.service.js +34 -191
  183. package/dist/runtime/client/services/streaming.service.d.ts +5 -126
  184. package/dist/runtime/client/services/streaming.service.js +72 -217
  185. package/dist/runtime/client/services/textui.service.d.ts +5 -45
  186. package/dist/runtime/client/services/textui.service.js +55 -88
  187. package/dist/runtime/client/services/vehicle-client.service.d.ts +12 -149
  188. package/dist/runtime/client/services/vehicle-client.service.js +180 -326
  189. package/dist/runtime/client/services/vehicle.service.d.ts +3 -109
  190. package/dist/runtime/client/services/vehicle.service.js +94 -194
  191. package/dist/runtime/client/system/processors/export.processor.d.ts +3 -0
  192. package/dist/runtime/client/system/processors/export.processor.js +16 -3
  193. package/dist/runtime/client/system/processors/gameEvent.processor.d.ts +3 -0
  194. package/dist/runtime/client/system/processors/gameEvent.processor.js +16 -3
  195. package/dist/runtime/client/system/processors/interval.processor.d.ts +3 -0
  196. package/dist/runtime/client/system/processors/interval.processor.js +17 -4
  197. package/dist/runtime/client/system/processors/key.processor.d.ts +3 -0
  198. package/dist/runtime/client/system/processors/key.processor.js +18 -5
  199. package/dist/runtime/client/system/processors/localEvent.processor.d.ts +3 -0
  200. package/dist/runtime/client/system/processors/localEvent.processor.js +16 -3
  201. package/dist/runtime/client/system/processors/netEvent.processor.d.ts +3 -0
  202. package/dist/runtime/client/system/processors/netEvent.processor.js +16 -3
  203. package/dist/runtime/client/system/processors/onRpc.processor.js +1 -1
  204. package/dist/runtime/client/system/processors/resourceLifecycle.processor.d.ts +5 -0
  205. package/dist/runtime/client/system/processors/resourceLifecycle.processor.js +26 -7
  206. package/dist/runtime/client/system/processors/tick.processor.d.ts +3 -0
  207. package/dist/runtime/client/system/processors/tick.processor.js +16 -3
  208. package/dist/runtime/client/system/processors/view.processor.d.ts +3 -0
  209. package/dist/runtime/client/system/processors/view.processor.js +21 -10
  210. package/dist/runtime/client/system/processors.register.d.ts +1 -0
  211. package/dist/runtime/client/system/processors.register.js +8 -0
  212. package/dist/runtime/client/ui-bridge.d.ts +2 -114
  213. package/dist/runtime/client/ui-bridge.js +2 -194
  214. package/dist/runtime/client/webview-bridge.d.ts +31 -0
  215. package/dist/runtime/client/webview-bridge.js +97 -0
  216. package/dist/runtime/client/webview.service.d.ts +14 -0
  217. package/dist/runtime/client/webview.service.js +98 -0
  218. package/dist/runtime/server/adapter/index.d.ts +5 -0
  219. package/dist/runtime/server/adapter/index.js +5 -0
  220. package/dist/runtime/server/adapter/node-npc-lifecycle-server.d.ts +12 -0
  221. package/dist/runtime/server/adapter/node-npc-lifecycle-server.js +52 -0
  222. package/dist/runtime/server/adapter/node-player-appearance-lifecycle-server.d.ts +22 -0
  223. package/dist/runtime/server/adapter/node-player-appearance-lifecycle-server.js +94 -0
  224. package/dist/runtime/server/adapter/node-player-lifecycle-server.d.ts +11 -0
  225. package/dist/runtime/server/adapter/node-player-lifecycle-server.js +55 -0
  226. package/dist/runtime/server/adapter/node-player-state-sync-server.d.ts +12 -0
  227. package/dist/runtime/server/adapter/node-player-state-sync-server.js +49 -0
  228. package/dist/runtime/server/adapter/node-server-adapter.d.ts +5 -0
  229. package/dist/runtime/server/adapter/node-server-adapter.js +67 -0
  230. package/dist/runtime/server/adapter/node-vehicle-lifecycle-server.d.ts +13 -0
  231. package/dist/runtime/server/adapter/node-vehicle-lifecycle-server.js +57 -0
  232. package/dist/runtime/server/adapter/player-adapter.d.ts +28 -0
  233. package/dist/runtime/server/adapter/player-adapter.js +28 -0
  234. package/dist/runtime/server/adapter/registry.d.ts +26 -0
  235. package/dist/runtime/server/adapter/registry.js +101 -0
  236. package/dist/runtime/server/adapter/serialization.d.ts +6 -0
  237. package/dist/runtime/server/adapter/serialization.js +9 -0
  238. package/dist/runtime/server/adapter/server-adapter.d.ts +28 -0
  239. package/dist/runtime/server/adapter/server-adapter.js +14 -0
  240. package/dist/runtime/server/api.d.ts +2 -1
  241. package/dist/runtime/server/api.js +2 -1
  242. package/dist/runtime/server/apis/appearance.api.d.ts +5 -3
  243. package/dist/runtime/server/apis/appearance.api.js +20 -7
  244. package/dist/runtime/server/apis/npcs.api.d.ts +3 -4
  245. package/dist/runtime/server/apis/npcs.api.js +26 -56
  246. package/dist/runtime/server/apis/vehicle-modification.api.d.ts +3 -1
  247. package/dist/runtime/server/apis/vehicle-modification.api.js +9 -4
  248. package/dist/runtime/server/apis/vehicles.api.d.ts +12 -6
  249. package/dist/runtime/server/apis/vehicles.api.js +48 -36
  250. package/dist/runtime/server/bootstrap.js +15 -7
  251. package/dist/runtime/server/controllers/channel.controller.js +2 -1
  252. package/dist/runtime/server/controllers/command-export.controller.js +1 -1
  253. package/dist/runtime/server/controllers/player-export.controller.js +5 -4
  254. package/dist/runtime/server/controllers/session.controller.js +3 -2
  255. package/dist/runtime/server/controllers/vehicle.controller.d.ts +3 -1
  256. package/dist/runtime/server/controllers/vehicle.controller.js +10 -5
  257. package/dist/runtime/server/core.d.ts +2 -0
  258. package/dist/runtime/server/core.js +9 -1
  259. package/dist/runtime/server/decorators/onRuntimeEvent.d.ts +2 -1
  260. package/dist/runtime/server/entities/npc.d.ts +2 -0
  261. package/dist/runtime/server/entities/npc.js +3 -3
  262. package/dist/runtime/server/entities/player.d.ts +8 -11
  263. package/dist/runtime/server/entities/player.js +39 -28
  264. package/dist/runtime/server/entities/vehicle.js +2 -2
  265. package/dist/runtime/server/error-handler.js +13 -2
  266. package/dist/runtime/server/helpers/command-validation.helper.js +1 -1
  267. package/dist/runtime/server/implementations/local/player.local.d.ts +7 -3
  268. package/dist/runtime/server/implementations/local/player.local.js +23 -11
  269. package/dist/runtime/server/implementations/remote/channel.remote.d.ts +2 -1
  270. package/dist/runtime/server/implementations/remote/channel.remote.js +5 -2
  271. package/dist/runtime/server/implementations/remote/command.remote.d.ts +3 -1
  272. package/dist/runtime/server/implementations/remote/command.remote.js +9 -4
  273. package/dist/runtime/server/implementations/remote/player.remote.d.ts +7 -10
  274. package/dist/runtime/server/implementations/remote/player.remote.js +24 -29
  275. package/dist/runtime/server/library/create-server-library.js +17 -2
  276. package/dist/runtime/server/runtime.d.ts +3 -0
  277. package/dist/runtime/server/runtime.js +1 -15
  278. package/dist/runtime/server/services/appearance.service.d.ts +0 -95
  279. package/dist/runtime/server/services/appearance.service.js +15 -192
  280. package/dist/runtime/server/services/services.register.js +56 -24
  281. package/dist/runtime/server/system/processors/netEvent.processor.js +1 -1
  282. package/dist/runtime/server/system/processors/onRpc.processor.js +1 -1
  283. package/dist/runtime/server/system/processors/runtimeEvent.processor.d.ts +2 -1
  284. package/dist/runtime/server/system/processors/runtimeEvent.processor.js +1 -1
  285. package/dist/runtime/server/types/core-exports.types.d.ts +5 -0
  286. package/dist/runtime/shared/helpers/process-tuple-schema.d.ts +2 -0
  287. package/dist/runtime/shared/helpers/process-tuple-schema.js +29 -0
  288. package/package.json +21 -3
  289. package/dist/adapters/cfx/cfx-capabilities.d.ts +0 -16
  290. package/dist/adapters/cfx/cfx-capabilities.js +0 -70
  291. package/dist/adapters/cfx/cfx-platform.d.ts +0 -2
  292. package/dist/adapters/cfx/cfx-platform.js +0 -85
  293. package/dist/adapters/cfx/index.d.ts +0 -3
  294. package/dist/adapters/cfx/index.js +0 -3
  295. package/dist/adapters/cfx/runtime-profile.d.ts +0 -3
  296. package/dist/adapters/cfx/runtime-profile.js +0 -37
  297. package/dist/adapters/contracts/IPlatformCapabilities.d.ts +0 -79
  298. package/dist/adapters/contracts/IPlatformCapabilities.js +0 -27
  299. package/dist/adapters/contracts/client/IPedAppearanceClient.d.ts +0 -206
  300. package/dist/adapters/contracts/client/IPedAppearanceClient.js +0 -12
  301. package/dist/adapters/fivem/fivem-capabilities.d.ts +0 -18
  302. package/dist/adapters/fivem/fivem-capabilities.js +0 -61
  303. package/dist/adapters/fivem/fivem-engine-events.d.ts +0 -5
  304. package/dist/adapters/fivem/fivem-engine-events.js +0 -24
  305. package/dist/adapters/fivem/fivem-entity-server.d.ts +0 -26
  306. package/dist/adapters/fivem/fivem-entity-server.js +0 -87
  307. package/dist/adapters/fivem/fivem-exports.d.ts +0 -5
  308. package/dist/adapters/fivem/fivem-exports.js +0 -9
  309. package/dist/adapters/fivem/fivem-hasher.d.ts +0 -7
  310. package/dist/adapters/fivem/fivem-net-transport.d.ts +0 -1
  311. package/dist/adapters/fivem/fivem-ped-appearance-client.d.ts +0 -34
  312. package/dist/adapters/fivem/fivem-ped-appearance-client.js +0 -79
  313. package/dist/adapters/fivem/fivem-ped-appearance-server.d.ts +0 -14
  314. package/dist/adapters/fivem/fivem-ped-appearance-server.js +0 -22
  315. package/dist/adapters/fivem/fivem-ped-server.d.ts +0 -9
  316. package/dist/adapters/fivem/fivem-ped-server.js +0 -30
  317. package/dist/adapters/fivem/fivem-platform.d.ts +0 -5
  318. package/dist/adapters/fivem/fivem-platform.js +0 -74
  319. package/dist/adapters/fivem/fivem-player-server.d.ts +0 -24
  320. package/dist/adapters/fivem/fivem-player-server.js +0 -83
  321. package/dist/adapters/fivem/fivem-playerinfo.d.ts +0 -6
  322. package/dist/adapters/fivem/fivem-playerinfo.js +0 -10
  323. package/dist/adapters/fivem/fivem-resourceinfo.d.ts +0 -5
  324. package/dist/adapters/fivem/fivem-resourceinfo.js +0 -24
  325. package/dist/adapters/fivem/fivem-tick.d.ts +0 -7
  326. package/dist/adapters/fivem/fivem-vehicle-server.d.ts +0 -15
  327. package/dist/adapters/fivem/fivem-vehicle-server.js +0 -44
  328. package/dist/adapters/fivem/index.d.ts +0 -14
  329. package/dist/adapters/fivem/index.js +0 -16
  330. package/dist/adapters/fivem/transport/adapter.d.ts +0 -8
  331. package/dist/adapters/fivem/transport/adapter.js +0 -8
  332. package/dist/adapters/fivem/transport/fivem.events.d.ts +0 -8
  333. package/dist/adapters/fivem/transport/fivem.events.js +0 -36
  334. package/dist/adapters/fivem/transport/fivem.rpc.d.ts +0 -28
  335. package/dist/adapters/fivem/transport/fivem.rpc.js +0 -183
  336. package/dist/runtime/client/controllers/player-sync.controller.d.ts +0 -11
  337. package/dist/runtime/client/controllers/player-sync.controller.js +0 -51
  338. package/dist/runtime/client/player/player.d.ts +0 -262
  339. package/dist/runtime/client/player/player.js +0 -474
  340. package/dist/runtime/client/player/player.loader.d.ts +0 -1
  341. package/dist/runtime/client/player/player.loader.js +0 -18
  342. package/dist/runtime/server/helpers/process-tuple-schema.d.ts +0 -20
  343. package/dist/runtime/server/helpers/process-tuple-schema.js +0 -56
  344. /package/dist/adapters/{fivem/fivem-net-transport.js → contracts/client/spawn/types.js} +0 -0
@@ -4,61 +4,53 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { injectable } from 'tsyringe';
8
- /**
9
- * Service for displaying progress bars/indicators.
10
- */
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
11
+ return function (target, key) { decorator(target, key, paramIndex); }
12
+ };
13
+ import { inject, injectable } from 'tsyringe';
14
+ import { IClientPlatformBridge } from '../adapter/platform-bridge';
15
+ import { IClientRuntimeBridge } from '../adapter/runtime-bridge';
11
16
  let ProgressService = class ProgressService {
17
+ platform;
18
+ runtime;
12
19
  state = null;
13
20
  tickHandle = null;
14
21
  callback = null;
15
22
  propHandle = null;
16
- /**
17
- * Start a progress action.
18
- *
19
- * @param options - Progress options
20
- * @returns Promise that resolves with true if completed, false if cancelled
21
- */
23
+ constructor(platform, runtime) {
24
+ this.platform = platform;
25
+ this.runtime = runtime;
26
+ }
22
27
  async start(options) {
23
- if (this.state?.active) {
28
+ if (this.state?.active)
24
29
  return false;
25
- }
26
30
  return new Promise((resolve) => {
27
31
  this.state = {
28
32
  active: true,
29
33
  progress: 0,
30
34
  label: options.label,
31
- startTime: GetGameTimer(),
35
+ startTime: this.runtime.getGameTimer(),
32
36
  duration: options.duration,
33
37
  options,
34
38
  };
35
39
  this.callback = resolve;
36
- this.startProgress();
40
+ void this.startProgress();
37
41
  });
38
42
  }
39
- /**
40
- * Cancel the current progress.
41
- */
42
43
  cancel() {
43
44
  if (!this.state?.active)
44
45
  return;
45
46
  this.cleanup(false);
46
47
  }
47
- /**
48
- * Check if a progress is currently active.
49
- */
50
48
  isActive() {
51
49
  return this.state?.active ?? false;
52
50
  }
53
- /**
54
- * Get current progress percentage (0-100).
55
- */
56
51
  getProgress() {
57
52
  return this.state?.progress ?? 0;
58
53
  }
59
- /**
60
- * Get current progress state.
61
- */
62
54
  getState() {
63
55
  return this.state;
64
56
  }
@@ -66,58 +58,49 @@ let ProgressService = class ProgressService {
66
58
  if (!this.state)
67
59
  return;
68
60
  const { options } = this.state;
69
- const ped = PlayerPedId();
70
- // Load and play animation if specified
61
+ const ped = this.platform.getLocalPlayerPed();
71
62
  if (options.animation) {
72
63
  await this.loadAnimDict(options.animation.dict);
73
- TaskPlayAnim(ped, options.animation.dict, options.animation.anim, 8.0, -8.0, options.duration, options.animation.flags ?? 1, 0.0, false, false, false);
64
+ this.platform.taskPlayAnim(ped, options.animation.dict, options.animation.anim, 8.0, -8.0, options.duration, options.animation.flags ?? 1, 0.0);
74
65
  }
75
- // Attach prop if specified
76
66
  if (options.prop) {
77
67
  await this.loadModel(options.prop.model);
78
- const propHash = GetHashKey(options.prop.model);
79
- const coords = GetEntityCoords(ped, true);
80
- this.propHandle = CreateObject(propHash, coords[0], coords[1], coords[2], true, true, true);
81
- AttachEntityToEntity(this.propHandle, ped, GetPedBoneIndex(ped, options.prop.bone), options.prop.offset.x, options.prop.offset.y, options.prop.offset.z, options.prop.rotation.x, options.prop.rotation.y, options.prop.rotation.z, true, true, false, true, 1, true);
68
+ const propHash = this.platform.getHashKey(options.prop.model);
69
+ const coords = this.platform.getEntityCoords(ped);
70
+ this.propHandle = this.platform.createObject(propHash, coords, true, true, true);
71
+ this.platform.attachEntityToEntity(this.propHandle, ped, this.platform.getPedBoneIndex(ped, options.prop.bone), options.prop.offset, options.prop.rotation);
82
72
  }
83
- // Start the tick
84
- this.tickHandle = setTick(() => {
73
+ this.tickHandle = this.runtime.setTick(() => {
85
74
  if (!this.state)
86
75
  return;
87
- const elapsed = GetGameTimer() - this.state.startTime;
76
+ const elapsed = this.runtime.getGameTimer() - this.state.startTime;
88
77
  this.state.progress = Math.min((elapsed / this.state.duration) * 100, 100);
89
- // Handle controls
90
78
  if (options.disableControls) {
91
- DisableAllControlActions(0);
79
+ this.platform.disableAllControlActions(0);
92
80
  }
93
81
  else {
94
82
  if (options.disableMovement) {
95
- DisableControlAction(0, 30, true); // Move LR
96
- DisableControlAction(0, 31, true); // Move UD
97
- DisableControlAction(0, 21, true); // Sprint
98
- DisableControlAction(0, 22, true); // Jump
83
+ this.platform.disableControlAction(0, 30, true);
84
+ this.platform.disableControlAction(0, 31, true);
85
+ this.platform.disableControlAction(0, 21, true);
86
+ this.platform.disableControlAction(0, 22, true);
99
87
  }
100
88
  if (options.disableCombat) {
101
- DisableControlAction(0, 24, true); // Attack
102
- DisableControlAction(0, 25, true); // Aim
103
- DisableControlAction(0, 47, true); // Weapon
104
- DisableControlAction(0, 58, true); // Weapon
105
- DisableControlAction(0, 263, true); // Melee
106
- DisableControlAction(0, 264, true); // Melee
89
+ this.platform.disableControlAction(0, 24, true);
90
+ this.platform.disableControlAction(0, 25, true);
91
+ this.platform.disableControlAction(0, 47, true);
92
+ this.platform.disableControlAction(0, 58, true);
93
+ this.platform.disableControlAction(0, 263, true);
94
+ this.platform.disableControlAction(0, 264, true);
107
95
  }
108
96
  }
109
- // Check for cancel
110
- if (options.canCancel && IsControlJustPressed(0, 200)) {
111
- // ESC key
97
+ if (options.canCancel && this.platform.isControlJustPressed(0, 200)) {
112
98
  this.cancel();
113
99
  return;
114
100
  }
115
- // Draw progress bar (native style)
116
101
  this.drawProgressBar();
117
- // Check completion
118
- if (elapsed >= this.state.duration) {
102
+ if (elapsed >= this.state.duration)
119
103
  this.cleanup(true);
120
- }
121
104
  });
122
105
  }
123
106
  drawProgressBar() {
@@ -125,75 +108,66 @@ let ProgressService = class ProgressService {
125
108
  return;
126
109
  const { label, progress, options } = this.state;
127
110
  if (options.useCircular) {
128
- // Circular progress indicator
129
- BeginTextCommandBusyspinnerOn('STRING');
130
- AddTextComponentString(label);
131
- EndTextCommandBusyspinnerOn(4);
132
- }
133
- else {
134
- // Bar style progress
135
- const barWidth = 0.15;
136
- const barHeight = 0.015;
137
- const x = 0.5 - barWidth / 2;
138
- const y = 0.88;
139
- // Background
140
- DrawRect(0.5, y + barHeight / 2, barWidth, barHeight, 0, 0, 0, 180);
141
- // Progress fill
142
- const fillWidth = (barWidth * progress) / 100;
143
- DrawRect(x + fillWidth / 2, y + barHeight / 2, fillWidth, barHeight, 255, 255, 255, 255);
144
- // Label
145
- SetTextFont(4);
146
- SetTextScale(0.35, 0.35);
147
- SetTextColour(255, 255, 255, 255);
148
- SetTextCentre(true);
149
- BeginTextCommandDisplayText('STRING');
150
- AddTextComponentString(`${label} (${Math.floor(progress)}%)`);
151
- EndTextCommandDisplayText(0.5, y - 0.03);
111
+ this.platform.beginTextCommandBusyspinnerOn('STRING');
112
+ this.platform.addTextComponentString(label);
113
+ this.platform.endTextCommandBusyspinnerOn(4);
114
+ return;
152
115
  }
116
+ const barWidth = 0.15;
117
+ const barHeight = 0.015;
118
+ const x = 0.5 - barWidth / 2;
119
+ const y = 0.88;
120
+ this.platform.drawRect(0.5, y + barHeight / 2, barWidth, barHeight, 0, 0, 0, 180);
121
+ const fillWidth = (barWidth * progress) / 100;
122
+ this.platform.drawRect(x + fillWidth / 2, y + barHeight / 2, fillWidth, barHeight, 255, 255, 255, 255);
123
+ this.platform.setTextFont(4);
124
+ this.platform.setTextScale(0.35);
125
+ this.platform.setTextColour({ r: 255, g: 255, b: 255, a: 255 });
126
+ this.platform.setTextCentre(true);
127
+ this.platform.beginTextCommandDisplayText('STRING');
128
+ this.platform.addTextComponentString(`${label} (${Math.floor(progress)}%)`);
129
+ this.platform.endTextCommandDisplayText(0.5, y - 0.03);
153
130
  }
154
131
  cleanup(completed) {
155
- const ped = PlayerPedId();
156
- // Stop animation
132
+ const ped = this.platform.getLocalPlayerPed();
157
133
  if (this.state?.options.animation) {
158
- StopAnimTask(ped, this.state.options.animation.dict, this.state.options.animation.anim, 1.0);
134
+ this.platform.stopAnimTask(ped, this.state.options.animation.dict, this.state.options.animation.anim, 1.0);
159
135
  }
160
- // Remove prop
161
136
  if (this.propHandle) {
162
- DeleteEntity(this.propHandle);
137
+ this.platform.deleteEntity(this.propHandle);
163
138
  this.propHandle = null;
164
139
  }
165
- // Clear tick
166
140
  if (this.tickHandle !== null) {
167
- clearTick(this.tickHandle);
141
+ this.runtime.clearTick(this.tickHandle);
168
142
  this.tickHandle = null;
169
143
  }
170
- // Clear busy spinner
171
- if (this.state?.options.useCircular) {
172
- BusyspinnerOff();
173
- }
174
- // Reset state
144
+ if (this.state?.options.useCircular)
145
+ this.platform.busyspinnerOff();
175
146
  this.state = null;
176
- // Invoke callback
177
147
  if (this.callback) {
178
148
  this.callback(completed);
179
149
  this.callback = null;
180
150
  }
181
151
  }
182
152
  async loadAnimDict(dict) {
183
- RequestAnimDict(dict);
184
- while (!HasAnimDictLoaded(dict)) {
153
+ this.platform.requestAnimDict(dict);
154
+ while (!this.platform.hasAnimDictLoaded(dict)) {
185
155
  await new Promise((r) => setTimeout(r, 0));
186
156
  }
187
157
  }
188
158
  async loadModel(model) {
189
- const hash = GetHashKey(model);
190
- RequestModel(hash);
191
- while (!HasModelLoaded(hash)) {
159
+ const hash = this.platform.getHashKey(model);
160
+ this.platform.requestModel(hash);
161
+ while (!this.platform.hasModelLoaded(hash)) {
192
162
  await new Promise((r) => setTimeout(r, 0));
193
163
  }
194
164
  }
195
165
  };
196
166
  ProgressService = __decorate([
197
- injectable()
167
+ injectable(),
168
+ __param(0, inject(IClientPlatformBridge)),
169
+ __param(1, inject(IClientRuntimeBridge)),
170
+ __metadata("design:paramtypes", [IClientPlatformBridge,
171
+ IClientRuntimeBridge])
198
172
  ], ProgressService);
199
173
  export { ProgressService };
@@ -0,0 +1,15 @@
1
+ import { EventsAPI } from '../../../adapters/contracts/transport/events.api';
2
+ import { IClientLocalPlayerBridge } from '../adapter/local-player-bridge';
3
+ import { IClientRuntimeBridge } from '../adapter/runtime-bridge';
4
+ /**
5
+ * Registers lightweight client session listeners owned by the active adapter.
6
+ */
7
+ export declare class ClientSessionBridgeService {
8
+ private readonly events;
9
+ private readonly runtime;
10
+ private readonly localPlayer;
11
+ private playerId;
12
+ constructor(events: EventsAPI<'client'>, runtime: IClientRuntimeBridge, localPlayer: IClientLocalPlayerBridge);
13
+ init(): void;
14
+ getPlayerId(): string | undefined;
15
+ }
@@ -0,0 +1,61 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
11
+ return function (target, key) { decorator(target, key, paramIndex); }
12
+ };
13
+ import { inject, injectable } from 'tsyringe';
14
+ import { EventsAPI } from '../../../adapters/contracts/transport/events.api';
15
+ import { coreLogger, LogDomain } from '../../../kernel/logger';
16
+ import { Vec3 } from '../../../kernel/utils/vector3';
17
+ import { IClientLocalPlayerBridge } from '../adapter/local-player-bridge';
18
+ import { IClientRuntimeBridge } from '../adapter/runtime-bridge';
19
+ const clientSession = coreLogger.child('Session', LogDomain.CLIENT);
20
+ /**
21
+ * Registers lightweight client session listeners owned by the active adapter.
22
+ */
23
+ let ClientSessionBridgeService = class ClientSessionBridgeService {
24
+ events;
25
+ runtime;
26
+ localPlayer;
27
+ playerId;
28
+ constructor(events, runtime, localPlayer) {
29
+ this.events = events;
30
+ this.runtime = runtime;
31
+ this.localPlayer = localPlayer;
32
+ }
33
+ init() {
34
+ const currentResource = this.runtime.getCurrentResourceName();
35
+ this.runtime.on('onClientResourceStart', (resourceName) => {
36
+ if (resourceName !== currentResource)
37
+ return;
38
+ clientSession.debug('Client session bridge initialized');
39
+ });
40
+ this.events.on('core:playerSessionInit', (_ctx, data) => {
41
+ this.playerId = data.playerId;
42
+ clientSession.info('Player session initialized', { playerId: data.playerId });
43
+ });
44
+ this.events.on('core:teleportTo', (_ctx, x, y, z, heading) => {
45
+ this.localPlayer.setPosition(Vec3.create(x, y, z), heading);
46
+ });
47
+ }
48
+ getPlayerId() {
49
+ return this.playerId;
50
+ }
51
+ };
52
+ ClientSessionBridgeService = __decorate([
53
+ injectable(),
54
+ __param(0, inject(EventsAPI)),
55
+ __param(1, inject(IClientRuntimeBridge)),
56
+ __param(2, inject(IClientLocalPlayerBridge)),
57
+ __metadata("design:paramtypes", [EventsAPI,
58
+ IClientRuntimeBridge,
59
+ IClientLocalPlayerBridge])
60
+ ], ClientSessionBridgeService);
61
+ export { ClientSessionBridgeService };
@@ -1,73 +1,23 @@
1
1
  import { PlayerAppearance } from '../../../kernel';
2
2
  import { Vector3 } from '../../../kernel/utils/vector3';
3
+ import { IClientPlatformBridge } from '../adapter/platform-bridge';
3
4
  import { AppearanceService } from './appearance.service';
5
+ import { IClientSpawnBridge } from '../../../adapters/contracts/client/spawn/IClientSpawnBridge';
4
6
  interface SpawnOptions {
5
- /** Optional: Apply complete character appearance (RP clothing, face, props, tattoos...) */
6
7
  appearance?: PlayerAppearance;
7
8
  }
8
- /**
9
- * Handles all player spawning logic on the client.
10
- *
11
- * This service manages the complete lifecycle of a player spawn:
12
- * - Waiting for the network session
13
- * - Loading and applying the player model
14
- * - Ensuring collision and world data is ready
15
- * - Resurrecting the player cleanly
16
- * - Applying default ped components for freemode models
17
- * - Fading the screen in/out during transitions
18
- *
19
- * The service is designed to be robust, predictable, and safe for any gamemode.
20
- */
21
9
  export declare class SpawnService {
22
- private appearanceService;
10
+ private readonly appearanceService;
11
+ private readonly spawnBridge;
12
+ private readonly platform;
23
13
  private spawned;
24
14
  private spawning;
25
- constructor(appearanceService: AppearanceService);
15
+ constructor(appearanceService: AppearanceService, spawnBridge: IClientSpawnBridge, platform: IClientPlatformBridge);
26
16
  init(): Promise<void>;
27
- /**
28
- * Performs the first spawn of the player.
29
- *
30
- * This method handles:
31
- * - Fade out
32
- * - Closing loading screens
33
- * - Setting the player model
34
- * - Ensuring the ped exists
35
- * - Ensuring collision is loaded
36
- * - Resurrecting the player
37
- * - Preparing the ped for gameplay
38
- * - Placing the player at the desired position
39
- * - Fade in
40
- *
41
- * It should only be called once when the player joins.
42
- */
43
17
  spawn(position: Vector3, model: string, heading?: number, options?: SpawnOptions): Promise<void>;
44
- /**
45
- * Teleports the player instantly to a new position.
46
- * Does not change the model or resurrect the player.
47
- * Safe for gameplay use.
48
- */
49
18
  teleportTo(position: Vector3, heading?: number): Promise<void>;
50
- /**
51
- * Respawns the player after death or a gameplay event.
52
- * Restores health, resurrects the player, loads collision,
53
- * prepares the ped and teleports them to the desired location.
54
- */
55
19
  respawn(position: Vector3, heading?: number): Promise<void>;
56
- /**
57
- * Returns whether the player has completed their first spawn.
58
- */
59
20
  isSpawned(): boolean;
60
- /**
61
- * Allows other systems to wait until the player is fully spawned.
62
- */
63
21
  waitUntilSpawned(): Promise<void>;
64
- private ensureNetworkReady;
65
- private closeLoadingScreens;
66
- private setPlayerModel;
67
- private ensurePed;
68
- private ensureCollisionAt;
69
- private setupPedForGameplay;
70
- private placePed;
71
- private applyAppearanceIfNeeded;
72
22
  }
73
23
  export {};