@uapkg/cli 1.3.0 → 1.3.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 (412) hide show
  1. package/dist/app/CompositionRoot.d.ts +36 -33
  2. package/dist/app/CompositionRoot.d.ts.map +1 -1
  3. package/dist/app/CompositionRoot.js +91 -109
  4. package/dist/app/CompositionRoot.js.map +1 -1
  5. package/dist/app/UAPKGApplication.d.ts +6 -3
  6. package/dist/app/UAPKGApplication.d.ts.map +1 -1
  7. package/dist/app/UAPKGApplication.js +155 -169
  8. package/dist/app/UAPKGApplication.js.map +1 -1
  9. package/dist/build/BuildMetadata.d.ts +9 -6
  10. package/dist/build/BuildMetadata.d.ts.map +1 -1
  11. package/dist/build/BuildMetadata.js +2 -2
  12. package/dist/cli/UAPKGCommandLine.d.ts +259 -257
  13. package/dist/cli/UAPKGCommandLine.d.ts.map +1 -1
  14. package/dist/cli/UAPKGCommandLine.js +248 -239
  15. package/dist/cli/UAPKGCommandLine.js.map +1 -1
  16. package/dist/cli/parseCommandLine.d.ts +5 -1
  17. package/dist/cli/parseCommandLine.d.ts.map +1 -1
  18. package/dist/cli/parseCommandLine.js +8 -3
  19. package/dist/cli/parseCommandLine.js.map +1 -1
  20. package/dist/cli/parsing/UAPKGCommandLineParser.d.ts +9 -6
  21. package/dist/cli/parsing/UAPKGCommandLineParser.d.ts.map +1 -1
  22. package/dist/cli/parsing/UAPKGCommandLineParser.js +23 -31
  23. package/dist/cli/parsing/UAPKGCommandLineParser.js.map +1 -1
  24. package/dist/cli/parsing/UAPKGParserRegistry.d.ts +12 -9
  25. package/dist/cli/parsing/UAPKGParserRegistry.d.ts.map +1 -1
  26. package/dist/cli/parsing/UAPKGParserRegistry.js +53 -50
  27. package/dist/cli/parsing/UAPKGParserRegistry.js.map +1 -1
  28. package/dist/cli/parsing/contracts/UAPKGCommandModule.d.ts +9 -6
  29. package/dist/cli/parsing/contracts/UAPKGCommandModule.d.ts.map +1 -1
  30. package/dist/cli/parsing/contracts/UAPKGCommandModule.js +1 -2
  31. package/dist/cli/parsing/modules/AddCommandModule.d.ts +8 -5
  32. package/dist/cli/parsing/modules/AddCommandModule.d.ts.map +1 -1
  33. package/dist/cli/parsing/modules/AddCommandModule.js +49 -36
  34. package/dist/cli/parsing/modules/AddCommandModule.js.map +1 -1
  35. package/dist/cli/parsing/modules/ConfigCommandModule.d.ts +8 -5
  36. package/dist/cli/parsing/modules/ConfigCommandModule.d.ts.map +1 -1
  37. package/dist/cli/parsing/modules/ConfigCommandModule.js +87 -83
  38. package/dist/cli/parsing/modules/ConfigCommandModule.js.map +1 -1
  39. package/dist/cli/parsing/modules/InitCommandModule.d.ts +8 -5
  40. package/dist/cli/parsing/modules/InitCommandModule.d.ts.map +1 -1
  41. package/dist/cli/parsing/modules/InitCommandModule.js +25 -22
  42. package/dist/cli/parsing/modules/InitCommandModule.js.map +1 -1
  43. package/dist/cli/parsing/modules/InstallCommandModule.d.ts +8 -5
  44. package/dist/cli/parsing/modules/InstallCommandModule.d.ts.map +1 -1
  45. package/dist/cli/parsing/modules/InstallCommandModule.js +36 -28
  46. package/dist/cli/parsing/modules/InstallCommandModule.js.map +1 -1
  47. package/dist/cli/parsing/modules/LifecycleCommandModule.d.ts +8 -5
  48. package/dist/cli/parsing/modules/LifecycleCommandModule.d.ts.map +1 -1
  49. package/dist/cli/parsing/modules/LifecycleCommandModule.js +78 -50
  50. package/dist/cli/parsing/modules/LifecycleCommandModule.js.map +1 -1
  51. package/dist/cli/parsing/modules/ListCommandModule.d.ts +8 -5
  52. package/dist/cli/parsing/modules/ListCommandModule.d.ts.map +1 -1
  53. package/dist/cli/parsing/modules/ListCommandModule.js +26 -15
  54. package/dist/cli/parsing/modules/ListCommandModule.js.map +1 -1
  55. package/dist/cli/parsing/modules/LoginCommandModule.d.ts +8 -5
  56. package/dist/cli/parsing/modules/LoginCommandModule.d.ts.map +1 -1
  57. package/dist/cli/parsing/modules/LoginCommandModule.js +34 -33
  58. package/dist/cli/parsing/modules/LoginCommandModule.js.map +1 -1
  59. package/dist/cli/parsing/modules/LogoutCommandModule.d.ts +8 -5
  60. package/dist/cli/parsing/modules/LogoutCommandModule.d.ts.map +1 -1
  61. package/dist/cli/parsing/modules/LogoutCommandModule.js +30 -28
  62. package/dist/cli/parsing/modules/LogoutCommandModule.js.map +1 -1
  63. package/dist/cli/parsing/modules/OutdatedCommandModule.d.ts +8 -5
  64. package/dist/cli/parsing/modules/OutdatedCommandModule.d.ts.map +1 -1
  65. package/dist/cli/parsing/modules/OutdatedCommandModule.js +21 -16
  66. package/dist/cli/parsing/modules/OutdatedCommandModule.js.map +1 -1
  67. package/dist/cli/parsing/modules/PackCommandModule.d.ts +8 -5
  68. package/dist/cli/parsing/modules/PackCommandModule.d.ts.map +1 -1
  69. package/dist/cli/parsing/modules/PackCommandModule.js +30 -28
  70. package/dist/cli/parsing/modules/PackCommandModule.js.map +1 -1
  71. package/dist/cli/parsing/modules/ProjectGetNameCommandModule.d.ts +8 -5
  72. package/dist/cli/parsing/modules/ProjectGetNameCommandModule.d.ts.map +1 -1
  73. package/dist/cli/parsing/modules/ProjectGetNameCommandModule.js +14 -11
  74. package/dist/cli/parsing/modules/ProjectGetNameCommandModule.js.map +1 -1
  75. package/dist/cli/parsing/modules/PublishCommandModule.d.ts +8 -5
  76. package/dist/cli/parsing/modules/PublishCommandModule.d.ts.map +1 -1
  77. package/dist/cli/parsing/modules/PublishCommandModule.js +63 -47
  78. package/dist/cli/parsing/modules/PublishCommandModule.js.map +1 -1
  79. package/dist/cli/parsing/modules/RegistryCommandModule.d.ts +8 -5
  80. package/dist/cli/parsing/modules/RegistryCommandModule.d.ts.map +1 -1
  81. package/dist/cli/parsing/modules/RegistryCommandModule.js +117 -120
  82. package/dist/cli/parsing/modules/RegistryCommandModule.js.map +1 -1
  83. package/dist/cli/parsing/modules/RemoveCommandModule.d.ts +8 -5
  84. package/dist/cli/parsing/modules/RemoveCommandModule.d.ts.map +1 -1
  85. package/dist/cli/parsing/modules/RemoveCommandModule.js +25 -14
  86. package/dist/cli/parsing/modules/RemoveCommandModule.js.map +1 -1
  87. package/dist/cli/parsing/modules/RequestsCommandModule.d.ts +8 -5
  88. package/dist/cli/parsing/modules/RequestsCommandModule.d.ts.map +1 -1
  89. package/dist/cli/parsing/modules/RequestsCommandModule.js +56 -60
  90. package/dist/cli/parsing/modules/RequestsCommandModule.js.map +1 -1
  91. package/dist/cli/parsing/modules/UpdateCommandModule.d.ts +8 -5
  92. package/dist/cli/parsing/modules/UpdateCommandModule.d.ts.map +1 -1
  93. package/dist/cli/parsing/modules/UpdateCommandModule.js +38 -25
  94. package/dist/cli/parsing/modules/UpdateCommandModule.js.map +1 -1
  95. package/dist/cli/parsing/modules/WhoamiCommandModule.d.ts +8 -5
  96. package/dist/cli/parsing/modules/WhoamiCommandModule.d.ts.map +1 -1
  97. package/dist/cli/parsing/modules/WhoamiCommandModule.js +30 -28
  98. package/dist/cli/parsing/modules/WhoamiCommandModule.js.map +1 -1
  99. package/dist/cli/parsing/modules/WhyCommandModule.d.ts +8 -5
  100. package/dist/cli/parsing/modules/WhyCommandModule.d.ts.map +1 -1
  101. package/dist/cli/parsing/modules/WhyCommandModule.js +25 -14
  102. package/dist/cli/parsing/modules/WhyCommandModule.js.map +1 -1
  103. package/dist/cli/parsing/modules/sharedOptions.d.ts +8 -5
  104. package/dist/cli/parsing/modules/sharedOptions.d.ts.map +1 -1
  105. package/dist/cli/parsing/modules/sharedOptions.js +18 -23
  106. package/dist/cli/parsing/modules/sharedOptions.js.map +1 -1
  107. package/dist/cli/runUAPKGCLI.d.ts +4 -1
  108. package/dist/cli/runUAPKGCLI.d.ts.map +1 -1
  109. package/dist/cli/runUAPKGCLI.js +10 -5
  110. package/dist/cli/runUAPKGCLI.js.map +1 -1
  111. package/dist/cli-bootstrap.d.ts +1 -2
  112. package/dist/cli-bootstrap.js +15 -12
  113. package/dist/cli-bootstrap.js.map +1 -1
  114. package/dist/commands/AddCommand.d.ts +19 -16
  115. package/dist/commands/AddCommand.d.ts.map +1 -1
  116. package/dist/commands/AddCommand.js +49 -53
  117. package/dist/commands/AddCommand.js.map +1 -1
  118. package/dist/commands/Command.d.ts +5 -2
  119. package/dist/commands/Command.d.ts.map +1 -1
  120. package/dist/commands/Command.js +1 -2
  121. package/dist/commands/ConfigCommand.d.ts +28 -25
  122. package/dist/commands/ConfigCommand.d.ts.map +1 -1
  123. package/dist/commands/ConfigCommand.js +165 -186
  124. package/dist/commands/ConfigCommand.js.map +1 -1
  125. package/dist/commands/InitCommand.d.ts +19 -16
  126. package/dist/commands/InitCommand.d.ts.map +1 -1
  127. package/dist/commands/InitCommand.js +65 -60
  128. package/dist/commands/InitCommand.js.map +1 -1
  129. package/dist/commands/InstallCommand.d.ts +16 -13
  130. package/dist/commands/InstallCommand.d.ts.map +1 -1
  131. package/dist/commands/InstallCommand.js +118 -110
  132. package/dist/commands/InstallCommand.js.map +1 -1
  133. package/dist/commands/ListCommand.d.ts +13 -10
  134. package/dist/commands/ListCommand.d.ts.map +1 -1
  135. package/dist/commands/ListCommand.js +76 -81
  136. package/dist/commands/ListCommand.js.map +1 -1
  137. package/dist/commands/LoginCommand.d.ts +17 -14
  138. package/dist/commands/LoginCommand.d.ts.map +1 -1
  139. package/dist/commands/LoginCommand.js +66 -72
  140. package/dist/commands/LoginCommand.js.map +1 -1
  141. package/dist/commands/LogoutCommand.d.ts +15 -12
  142. package/dist/commands/LogoutCommand.d.ts.map +1 -1
  143. package/dist/commands/LogoutCommand.js +36 -37
  144. package/dist/commands/LogoutCommand.js.map +1 -1
  145. package/dist/commands/OutdatedCommand.d.ts +12 -9
  146. package/dist/commands/OutdatedCommand.d.ts.map +1 -1
  147. package/dist/commands/OutdatedCommand.js +41 -40
  148. package/dist/commands/OutdatedCommand.js.map +1 -1
  149. package/dist/commands/PackCommand.d.ts +13 -10
  150. package/dist/commands/PackCommand.d.ts.map +1 -1
  151. package/dist/commands/PackCommand.js +26 -21
  152. package/dist/commands/PackCommand.js.map +1 -1
  153. package/dist/commands/PackageLifecycleCommand.d.ts +23 -19
  154. package/dist/commands/PackageLifecycleCommand.d.ts.map +1 -1
  155. package/dist/commands/PackageLifecycleCommand.js +144 -138
  156. package/dist/commands/PackageLifecycleCommand.js.map +1 -1
  157. package/dist/commands/PostinstallCandidateBuilder.d.ts +11 -8
  158. package/dist/commands/PostinstallCandidateBuilder.d.ts.map +1 -1
  159. package/dist/commands/PostinstallCandidateBuilder.js +42 -42
  160. package/dist/commands/PostinstallCandidateBuilder.js.map +1 -1
  161. package/dist/commands/ProjectGetNameCommand.d.ts +10 -7
  162. package/dist/commands/ProjectGetNameCommand.d.ts.map +1 -1
  163. package/dist/commands/ProjectGetNameCommand.js +25 -25
  164. package/dist/commands/ProjectGetNameCommand.js.map +1 -1
  165. package/dist/commands/PublishCommand.d.ts +29 -23
  166. package/dist/commands/PublishCommand.d.ts.map +1 -1
  167. package/dist/commands/PublishCommand.js +243 -254
  168. package/dist/commands/PublishCommand.js.map +1 -1
  169. package/dist/commands/RegistryCommand.d.ts +38 -35
  170. package/dist/commands/RegistryCommand.d.ts.map +1 -1
  171. package/dist/commands/RegistryCommand.js +195 -223
  172. package/dist/commands/RegistryCommand.js.map +1 -1
  173. package/dist/commands/RemoveCommand.d.ts +14 -11
  174. package/dist/commands/RemoveCommand.d.ts.map +1 -1
  175. package/dist/commands/RemoveCommand.js +47 -54
  176. package/dist/commands/RemoveCommand.js.map +1 -1
  177. package/dist/commands/RequestsCommand.d.ts +21 -18
  178. package/dist/commands/RequestsCommand.d.ts.map +1 -1
  179. package/dist/commands/RequestsCommand.js +82 -95
  180. package/dist/commands/RequestsCommand.js.map +1 -1
  181. package/dist/commands/UpdateCommand.d.ts +29 -26
  182. package/dist/commands/UpdateCommand.d.ts.map +1 -1
  183. package/dist/commands/UpdateCommand.js +111 -111
  184. package/dist/commands/UpdateCommand.js.map +1 -1
  185. package/dist/commands/WhoamiCommand.d.ts +30 -27
  186. package/dist/commands/WhoamiCommand.d.ts.map +1 -1
  187. package/dist/commands/WhoamiCommand.js +63 -72
  188. package/dist/commands/WhoamiCommand.js.map +1 -1
  189. package/dist/commands/WhyCommand.d.ts +13 -10
  190. package/dist/commands/WhyCommand.d.ts.map +1 -1
  191. package/dist/commands/WhyCommand.js +45 -44
  192. package/dist/commands/WhyCommand.js.map +1 -1
  193. package/dist/commands/add/DependencyAddResolver.d.ts +14 -11
  194. package/dist/commands/add/DependencyAddResolver.d.ts.map +1 -1
  195. package/dist/commands/add/DependencyAddResolver.js +36 -36
  196. package/dist/commands/add/DependencyAddResolver.js.map +1 -1
  197. package/dist/control-plane/AccountManager.d.ts +96 -94
  198. package/dist/control-plane/AccountManager.d.ts.map +1 -1
  199. package/dist/control-plane/AccountManager.js +775 -967
  200. package/dist/control-plane/AccountManager.js.map +1 -1
  201. package/dist/control-plane/ArtifactObserver.d.ts +19 -16
  202. package/dist/control-plane/ArtifactObserver.d.ts.map +1 -1
  203. package/dist/control-plane/ArtifactObserver.js +73 -59
  204. package/dist/control-plane/ArtifactObserver.js.map +1 -1
  205. package/dist/control-plane/AuthMetadataStore.d.ts +16 -13
  206. package/dist/control-plane/AuthMetadataStore.d.ts.map +1 -1
  207. package/dist/control-plane/AuthMetadataStore.js +111 -113
  208. package/dist/control-plane/AuthMetadataStore.js.map +1 -1
  209. package/dist/control-plane/AuthStoragePaths.d.ts +7 -4
  210. package/dist/control-plane/AuthStoragePaths.d.ts.map +1 -1
  211. package/dist/control-plane/AuthStoragePaths.js +19 -14
  212. package/dist/control-plane/AuthStoragePaths.js.map +1 -1
  213. package/dist/control-plane/AuthenticationSelector.d.ts +21 -18
  214. package/dist/control-plane/AuthenticationSelector.d.ts.map +1 -1
  215. package/dist/control-plane/AuthenticationSelector.js +69 -63
  216. package/dist/control-plane/AuthenticationSelector.js.map +1 -1
  217. package/dist/control-plane/ControlPlaneClient.d.ts +37 -28
  218. package/dist/control-plane/ControlPlaneClient.d.ts.map +1 -1
  219. package/dist/control-plane/ControlPlaneClient.js +265 -254
  220. package/dist/control-plane/ControlPlaneClient.js.map +1 -1
  221. package/dist/control-plane/ControlPlaneEndpoints.d.ts +9 -6
  222. package/dist/control-plane/ControlPlaneEndpoints.d.ts.map +1 -1
  223. package/dist/control-plane/ControlPlaneEndpoints.js +17 -12
  224. package/dist/control-plane/ControlPlaneEndpoints.js.map +1 -1
  225. package/dist/control-plane/ControlPlaneTypes.d.ts +176 -152
  226. package/dist/control-plane/ControlPlaneTypes.d.ts.map +1 -1
  227. package/dist/control-plane/ControlPlaneTypes.js +88 -81
  228. package/dist/control-plane/ControlPlaneTypes.js.map +1 -1
  229. package/dist/control-plane/CredentialStore.d.ts +20 -18
  230. package/dist/control-plane/CredentialStore.d.ts.map +1 -1
  231. package/dist/control-plane/CredentialStore.js +66 -83
  232. package/dist/control-plane/CredentialStore.js.map +1 -1
  233. package/dist/control-plane/DPoPKeyStore.d.ts +12 -9
  234. package/dist/control-plane/DPoPKeyStore.d.ts.map +1 -1
  235. package/dist/control-plane/DPoPKeyStore.js +57 -53
  236. package/dist/control-plane/DPoPKeyStore.js.map +1 -1
  237. package/dist/control-plane/GitHubActionsOidcCredentialProvider.d.ts +37 -4
  238. package/dist/control-plane/GitHubActionsOidcCredentialProvider.d.ts.map +1 -1
  239. package/dist/control-plane/GitHubActionsOidcCredentialProvider.js +197 -63
  240. package/dist/control-plane/GitHubActionsOidcCredentialProvider.js.map +1 -1
  241. package/dist/control-plane/PublishIdempotencyStore.d.ts +25 -9
  242. package/dist/control-plane/PublishIdempotencyStore.d.ts.map +1 -1
  243. package/dist/control-plane/PublishIdempotencyStore.js +97 -68
  244. package/dist/control-plane/PublishIdempotencyStore.js.map +1 -1
  245. package/dist/control-plane/PublishRequestErrorMapper.d.ts +155 -0
  246. package/dist/control-plane/PublishRequestErrorMapper.d.ts.map +1 -0
  247. package/dist/control-plane/PublishRequestErrorMapper.js +597 -0
  248. package/dist/control-plane/PublishRequestErrorMapper.js.map +1 -0
  249. package/dist/control-plane/RegistryGrantLock.d.ts +29 -26
  250. package/dist/control-plane/RegistryGrantLock.d.ts.map +1 -1
  251. package/dist/control-plane/RegistryGrantLock.js +149 -185
  252. package/dist/control-plane/RegistryGrantLock.js.map +1 -1
  253. package/dist/control-plane/RegistryTrustResolver.d.ts +13 -10
  254. package/dist/control-plane/RegistryTrustResolver.d.ts.map +1 -1
  255. package/dist/control-plane/RegistryTrustResolver.js +97 -132
  256. package/dist/control-plane/RegistryTrustResolver.js.map +1 -1
  257. package/dist/index.d.ts +62 -39
  258. package/dist/index.js +60 -53
  259. package/dist/postinstall/api/PostinstallDsl.d.ts +24 -21
  260. package/dist/postinstall/api/PostinstallDsl.d.ts.map +1 -1
  261. package/dist/postinstall/api/PostinstallDsl.js +32 -35
  262. package/dist/postinstall/api/PostinstallDsl.js.map +1 -1
  263. package/dist/postinstall/api/definePostinstall.d.ts +5 -2
  264. package/dist/postinstall/api/definePostinstall.d.ts.map +1 -1
  265. package/dist/postinstall/api/definePostinstall.js +20 -16
  266. package/dist/postinstall/api/definePostinstall.js.map +1 -1
  267. package/dist/postinstall/index.d.ts +25 -26
  268. package/dist/postinstall/index.js +25 -37
  269. package/dist/postinstall/loader/EntryResolver.d.ts +11 -9
  270. package/dist/postinstall/loader/EntryResolver.d.ts.map +1 -1
  271. package/dist/postinstall/loader/EntryResolver.js +36 -32
  272. package/dist/postinstall/loader/EntryResolver.js.map +1 -1
  273. package/dist/postinstall/loader/EsbuildTranspiler.d.ts +6 -3
  274. package/dist/postinstall/loader/EsbuildTranspiler.d.ts.map +1 -1
  275. package/dist/postinstall/loader/EsbuildTranspiler.js +52 -56
  276. package/dist/postinstall/loader/EsbuildTranspiler.js.map +1 -1
  277. package/dist/postinstall/loader/ExportValidator.d.ts +8 -5
  278. package/dist/postinstall/loader/ExportValidator.d.ts.map +1 -1
  279. package/dist/postinstall/loader/ExportValidator.js +36 -32
  280. package/dist/postinstall/loader/ExportValidator.js.map +1 -1
  281. package/dist/postinstall/loader/ModuleImporter.d.ts +17 -14
  282. package/dist/postinstall/loader/ModuleImporter.d.ts.map +1 -1
  283. package/dist/postinstall/loader/ModuleImporter.js +50 -58
  284. package/dist/postinstall/loader/ModuleImporter.js.map +1 -1
  285. package/dist/postinstall/loader/PostinstallLoader.d.ts +22 -19
  286. package/dist/postinstall/loader/PostinstallLoader.d.ts.map +1 -1
  287. package/dist/postinstall/loader/PostinstallLoader.js +62 -58
  288. package/dist/postinstall/loader/PostinstallLoader.js.map +1 -1
  289. package/dist/postinstall/markers/MarkerBlockEditor.d.ts +19 -16
  290. package/dist/postinstall/markers/MarkerBlockEditor.d.ts.map +1 -1
  291. package/dist/postinstall/markers/MarkerBlockEditor.js +48 -44
  292. package/dist/postinstall/markers/MarkerBlockEditor.js.map +1 -1
  293. package/dist/postinstall/markers/MarkerBlockService.d.ts +10 -7
  294. package/dist/postinstall/markers/MarkerBlockService.d.ts.map +1 -1
  295. package/dist/postinstall/markers/MarkerBlockService.js +44 -44
  296. package/dist/postinstall/markers/MarkerBlockService.js.map +1 -1
  297. package/dist/postinstall/markers/MarkerIntegrityValidator.d.ts +12 -9
  298. package/dist/postinstall/markers/MarkerIntegrityValidator.d.ts.map +1 -1
  299. package/dist/postinstall/markers/MarkerIntegrityValidator.js +47 -52
  300. package/dist/postinstall/markers/MarkerIntegrityValidator.js.map +1 -1
  301. package/dist/postinstall/policy/PostinstallPolicyGate.d.ts +25 -23
  302. package/dist/postinstall/policy/PostinstallPolicyGate.d.ts.map +1 -1
  303. package/dist/postinstall/policy/PostinstallPolicyGate.js +63 -52
  304. package/dist/postinstall/policy/PostinstallPolicyGate.js.map +1 -1
  305. package/dist/postinstall/runner/PostinstallOrchestrator.d.ts +48 -45
  306. package/dist/postinstall/runner/PostinstallOrchestrator.d.ts.map +1 -1
  307. package/dist/postinstall/runner/PostinstallOrchestrator.js +172 -170
  308. package/dist/postinstall/runner/PostinstallOrchestrator.js.map +1 -1
  309. package/dist/postinstall/unreal/BuildCsInjector.d.ts +16 -13
  310. package/dist/postinstall/unreal/BuildCsInjector.d.ts.map +1 -1
  311. package/dist/postinstall/unreal/BuildCsInjector.js +58 -53
  312. package/dist/postinstall/unreal/BuildCsInjector.js.map +1 -1
  313. package/dist/postinstall/unreal/CSharpInjectionEngine.d.ts +13 -10
  314. package/dist/postinstall/unreal/CSharpInjectionEngine.d.ts.map +1 -1
  315. package/dist/postinstall/unreal/CSharpInjectionEngine.js +56 -59
  316. package/dist/postinstall/unreal/CSharpInjectionEngine.js.map +1 -1
  317. package/dist/postinstall/unreal/CSharpStructureAnalyzer.d.ts +11 -8
  318. package/dist/postinstall/unreal/CSharpStructureAnalyzer.d.ts.map +1 -1
  319. package/dist/postinstall/unreal/CSharpStructureAnalyzer.js +123 -127
  320. package/dist/postinstall/unreal/CSharpStructureAnalyzer.js.map +1 -1
  321. package/dist/postinstall/unreal/CSharpStructures.d.ts +18 -15
  322. package/dist/postinstall/unreal/CSharpStructures.d.ts.map +1 -1
  323. package/dist/postinstall/unreal/CSharpStructures.js +1 -2
  324. package/dist/postinstall/unreal/CSharpWrapperFactory.d.ts +7 -4
  325. package/dist/postinstall/unreal/CSharpWrapperFactory.d.ts.map +1 -1
  326. package/dist/postinstall/unreal/CSharpWrapperFactory.js +54 -58
  327. package/dist/postinstall/unreal/CSharpWrapperFactory.js.map +1 -1
  328. package/dist/postinstall/unreal/PluginHash.d.ts +5 -2
  329. package/dist/postinstall/unreal/PluginHash.d.ts.map +1 -1
  330. package/dist/postinstall/unreal/PluginHash.js +13 -8
  331. package/dist/postinstall/unreal/PluginHash.js.map +1 -1
  332. package/dist/postinstall/unreal/PrettyParseError.d.ts +8 -5
  333. package/dist/postinstall/unreal/PrettyParseError.d.ts.map +1 -1
  334. package/dist/postinstall/unreal/PrettyParseError.js +37 -37
  335. package/dist/postinstall/unreal/PrettyParseError.js.map +1 -1
  336. package/dist/postinstall/unreal/ProjectFileLocator.d.ts +12 -9
  337. package/dist/postinstall/unreal/ProjectFileLocator.d.ts.map +1 -1
  338. package/dist/postinstall/unreal/ProjectFileLocator.js +49 -51
  339. package/dist/postinstall/unreal/ProjectFileLocator.js.map +1 -1
  340. package/dist/postinstall/unreal/TargetCsInjector.d.ts +16 -13
  341. package/dist/postinstall/unreal/TargetCsInjector.d.ts.map +1 -1
  342. package/dist/postinstall/unreal/TargetCsInjector.js +58 -53
  343. package/dist/postinstall/unreal/TargetCsInjector.js.map +1 -1
  344. package/dist/postinstall/unreal/UProjectInjector.d.ts +6 -3
  345. package/dist/postinstall/unreal/UProjectInjector.d.ts.map +1 -1
  346. package/dist/postinstall/unreal/UProjectInjector.js +56 -52
  347. package/dist/postinstall/unreal/UProjectInjector.js.map +1 -1
  348. package/dist/postinstall/unreal/UProjectMetadataReader.d.ts +5 -2
  349. package/dist/postinstall/unreal/UProjectMetadataReader.d.ts.map +1 -1
  350. package/dist/postinstall/unreal/UProjectMetadataReader.js +22 -18
  351. package/dist/postinstall/unreal/UProjectMetadataReader.js.map +1 -1
  352. package/dist/postinstall/unreal/UnrealSourceCatalog.d.ts +17 -14
  353. package/dist/postinstall/unreal/UnrealSourceCatalog.d.ts.map +1 -1
  354. package/dist/postinstall/unreal/UnrealSourceCatalog.js +50 -50
  355. package/dist/postinstall/unreal/UnrealSourceCatalog.js.map +1 -1
  356. package/dist/prompts/InkPromptService.d.ts +10 -7
  357. package/dist/prompts/InkPromptService.d.ts.map +1 -1
  358. package/dist/prompts/InkPromptService.js +100 -71
  359. package/dist/prompts/InkPromptService.js.map +1 -1
  360. package/dist/prompts/ProjectContextDetector.d.ts +10 -7
  361. package/dist/prompts/ProjectContextDetector.d.ts.map +1 -1
  362. package/dist/prompts/ProjectContextDetector.js +32 -26
  363. package/dist/prompts/ProjectContextDetector.js.map +1 -1
  364. package/dist/prompts/PromptService.d.ts +11 -8
  365. package/dist/prompts/PromptService.d.ts.map +1 -1
  366. package/dist/prompts/PromptService.js +1 -8
  367. package/dist/reporting/DiagnosticDeduplicator.d.ts +8 -5
  368. package/dist/reporting/DiagnosticDeduplicator.d.ts.map +1 -1
  369. package/dist/reporting/DiagnosticDeduplicator.js +36 -35
  370. package/dist/reporting/DiagnosticDeduplicator.js.map +1 -1
  371. package/dist/reporting/DiagnosticRenderer.d.ts +11 -8
  372. package/dist/reporting/DiagnosticRenderer.d.ts.map +1 -1
  373. package/dist/reporting/DiagnosticRenderer.js +1 -2
  374. package/dist/reporting/DiagnosticReporter.d.ts +12 -9
  375. package/dist/reporting/DiagnosticReporter.d.ts.map +1 -1
  376. package/dist/reporting/DiagnosticReporter.js +40 -39
  377. package/dist/reporting/DiagnosticReporter.js.map +1 -1
  378. package/dist/reporting/InkDiagnosticRenderer.d.ts +12 -9
  379. package/dist/reporting/InkDiagnosticRenderer.d.ts.map +1 -1
  380. package/dist/reporting/InkDiagnosticRenderer.js +50 -42
  381. package/dist/reporting/InkDiagnosticRenderer.js.map +1 -1
  382. package/dist/reporting/InstallProgressReporter.d.ts +23 -20
  383. package/dist/reporting/InstallProgressReporter.d.ts.map +1 -1
  384. package/dist/reporting/InstallProgressReporter.js +48 -47
  385. package/dist/reporting/InstallProgressReporter.js.map +1 -1
  386. package/dist/reporting/JsonReporter.d.ts +16 -13
  387. package/dist/reporting/JsonReporter.d.ts.map +1 -1
  388. package/dist/reporting/JsonReporter.js +34 -20
  389. package/dist/reporting/JsonReporter.js.map +1 -1
  390. package/dist/reporting/RegistryRequestTerminalFormatter.d.ts +36 -0
  391. package/dist/reporting/RegistryRequestTerminalFormatter.d.ts.map +1 -0
  392. package/dist/reporting/RegistryRequestTerminalFormatter.js +90 -0
  393. package/dist/reporting/RegistryRequestTerminalFormatter.js.map +1 -0
  394. package/dist/reporting/TextDiagnosticRenderer.d.ts +11 -8
  395. package/dist/reporting/TextDiagnosticRenderer.d.ts.map +1 -1
  396. package/dist/reporting/TextDiagnosticRenderer.js +36 -28
  397. package/dist/reporting/TextDiagnosticRenderer.js.map +1 -1
  398. package/dist/reporting/TextSink.d.ts +14 -11
  399. package/dist/reporting/TextSink.d.ts.map +1 -1
  400. package/dist/reporting/TextSink.js +24 -20
  401. package/dist/reporting/TextSink.js.map +1 -1
  402. package/package.json +31 -32
  403. package/dist/cli/parsing/contracts/UAPKGCommandModule.js.map +0 -1
  404. package/dist/cli-bootstrap.d.ts.map +0 -1
  405. package/dist/commands/Command.js.map +0 -1
  406. package/dist/index.d.ts.map +0 -1
  407. package/dist/index.js.map +0 -1
  408. package/dist/postinstall/index.d.ts.map +0 -1
  409. package/dist/postinstall/index.js.map +0 -1
  410. package/dist/postinstall/unreal/CSharpStructures.js.map +0 -1
  411. package/dist/prompts/PromptService.js.map +0 -1
  412. package/dist/reporting/DiagnosticRenderer.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"CSharpInjectionEngine.d.ts","sourceRoot":"","sources":["../../../src/postinstall/unreal/CSharpInjectionEngine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D;;;;;;;;;GASG;AACH,qBAAa,qBAAqB;IACb,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,GAAE,kBAA6C;IAEvF,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAahG,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAW7G,oBAAoB,CACzB,MAAM,EAAE,gBAAgB,EACxB,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,MAAM,GACX,MAAM;IAcT,OAAO,CAAC,uBAAuB;IAO/B,OAAO,CAAC,uBAAuB;CAMhC"}
1
+ {"version":3,"file":"CSharpInjectionEngine.d.ts","names":[],"sources":["../../../src/postinstall/unreal/CSharpInjectionEngine.ts"],"mappings":";;;;;;;;;;;;;cAaa;mBACyB;EAApC,YAAoC,cAAa;EAE1C,cAAc,gBAAgB,oBAAoB,yBAAyB;EAa3E,kBAAkB,QAAQ,kBAAkB,oBAAoB,wBAAwB;EAWxF,qBACL,QAAQ,kBACR,oBACA,wBACA;UAeM;UAOA"}
@@ -1,61 +1,58 @@
1
- import { MarkerBlockService } from '../markers/MarkerBlockService.js';
1
+ import { MarkerBlockService } from "../markers/MarkerBlockService.js";
2
+
3
+ //#region src/postinstall/unreal/CSharpInjectionEngine.ts
2
4
  /**
3
- * Applies marker-delimited edits to a parsed C# file at three well-known anchors:
4
- *
5
- * 1. `applyIncludes` — `using ...;` block just after the last top-level `using`.
6
- * 2. `applyClassWrapper` — nested helper class inside the rules class body.
7
- * 3. `applyConstructorCall` — a single statement at the top of the constructor.
8
- *
9
- * Every edit is wrapped in an owned `UAPKG-BEGIN/END` marker block so re-running
10
- * uapkg is idempotent. Existing owned blocks are stripped before re-insert.
11
- */
12
- export class CSharpInjectionEngine {
13
- markerBlock;
14
- constructor(markerBlock = new MarkerBlockService()) {
15
- this.markerBlock = markerBlock;
16
- }
17
- applyIncludes(source, pluginName, includesContent, zone) {
18
- const withoutOwnedBlock = this.markerBlock.stripOwnedBlock(source, pluginName, zone);
19
- const includeBlock = this.markerBlock.createBlock(pluginName, zone, includesContent);
20
- const usingMatches = [...withoutOwnedBlock.matchAll(/^[ \t]*using\s+[^;]+;\s*$/gm)];
21
- if (usingMatches.length === 0) {
22
- return `${includeBlock}\n${withoutOwnedBlock}`.trimStart();
23
- }
24
- const lastUsing = usingMatches[usingMatches.length - 1];
25
- const lastUsingIndex = (lastUsing.index ?? 0) + lastUsing[0].length;
26
- return `${withoutOwnedBlock.slice(0, lastUsingIndex)}\n${includeBlock}\n${withoutOwnedBlock.slice(lastUsingIndex).trimStart()}`;
27
- }
28
- applyClassWrapper(parsed, pluginName, wrapperContent, zone) {
29
- const classStart = parsed.classInfo.classOpenBraceIndex + 1;
30
- const classEnd = parsed.classInfo.classCloseBraceIndex;
31
- const classBody = parsed.source.slice(classStart, classEnd);
32
- const stripped = this.markerBlock.stripOwnedBlock(classBody, pluginName, zone).trimStart();
33
- const indent = this.detectClassMemberIndent(parsed.source, parsed.classInfo.classOpenBraceIndex);
34
- const block = this.markerBlock.createBlock(pluginName, zone, wrapperContent, indent);
35
- const nextBody = `\n${block}\n\n${stripped}`.replace(/\n{3,}/g, '\n\n');
36
- return `${parsed.source.slice(0, classStart)}${nextBody}${parsed.source.slice(classEnd)}`;
37
- }
38
- applyConstructorCall(parsed, pluginName, callExpression, zone) {
39
- const bodyStart = parsed.constructorInfo.bodyOpenBraceIndex + 1;
40
- const bodyEnd = parsed.constructorInfo.bodyCloseBraceIndex;
41
- const body = parsed.source.slice(bodyStart, bodyEnd);
42
- const withoutOwnedBlock = this.markerBlock.stripOwnedBlock(body, pluginName, zone).trimStart();
43
- const indent = this.detectConstructorIndent(parsed.source, parsed.constructorInfo.bodyOpenBraceIndex);
44
- const block = this.markerBlock.createBlock(pluginName, zone, `${callExpression};`, indent);
45
- const nextBody = `\n${block}\n${withoutOwnedBlock.length > 0 ? `\n${withoutOwnedBlock}` : ''}`.replace(/\n{3,}/g, '\n\n');
46
- return `${parsed.source.slice(0, bodyStart)}${nextBody}${parsed.source.slice(bodyEnd)}`;
47
- }
48
- detectClassMemberIndent(source, classOpenBraceIndex) {
49
- const lineStart = source.lastIndexOf('\n', classOpenBraceIndex);
50
- const classLine = source.slice(lineStart + 1, classOpenBraceIndex);
51
- const classIndent = classLine.match(/^\s*/)?.[0] ?? '';
52
- return `${classIndent} `;
53
- }
54
- detectConstructorIndent(source, constructorOpenBraceIndex) {
55
- const lineStart = source.lastIndexOf('\n', constructorOpenBraceIndex);
56
- const constructorLine = source.slice(lineStart + 1, constructorOpenBraceIndex);
57
- const constructorIndent = constructorLine.match(/^\s*/)?.[0] ?? '';
58
- return `${constructorIndent} `;
59
- }
60
- }
5
+ * Applies marker-delimited edits to a parsed C# file at three well-known anchors:
6
+ *
7
+ * 1. `applyIncludes` — `using ...;` block just after the last top-level `using`.
8
+ * 2. `applyClassWrapper` — nested helper class inside the rules class body.
9
+ * 3. `applyConstructorCall` — a single statement at the top of the constructor.
10
+ *
11
+ * Every edit is wrapped in an owned `UAPKG-BEGIN/END` marker block so re-running
12
+ * uapkg is idempotent. Existing owned blocks are stripped before re-insert.
13
+ */
14
+ var CSharpInjectionEngine = class {
15
+ markerBlock;
16
+ constructor(markerBlock = new MarkerBlockService()) {
17
+ this.markerBlock = markerBlock;
18
+ }
19
+ applyIncludes(source, pluginName, includesContent, zone) {
20
+ const withoutOwnedBlock = this.markerBlock.stripOwnedBlock(source, pluginName, zone);
21
+ const includeBlock = this.markerBlock.createBlock(pluginName, zone, includesContent);
22
+ const usingMatches = [...withoutOwnedBlock.matchAll(/^[ \t]*using\s+[^;]+;\s*$/gm)];
23
+ if (usingMatches.length === 0) return `${includeBlock}\n${withoutOwnedBlock}`.trimStart();
24
+ const lastUsing = usingMatches[usingMatches.length - 1];
25
+ const lastUsingIndex = (lastUsing.index ?? 0) + lastUsing[0].length;
26
+ return `${withoutOwnedBlock.slice(0, lastUsingIndex)}\n${includeBlock}\n${withoutOwnedBlock.slice(lastUsingIndex).trimStart()}`;
27
+ }
28
+ applyClassWrapper(parsed, pluginName, wrapperContent, zone) {
29
+ const classStart = parsed.classInfo.classOpenBraceIndex + 1;
30
+ const classEnd = parsed.classInfo.classCloseBraceIndex;
31
+ const classBody = parsed.source.slice(classStart, classEnd);
32
+ const stripped = this.markerBlock.stripOwnedBlock(classBody, pluginName, zone).trimStart();
33
+ const indent = this.detectClassMemberIndent(parsed.source, parsed.classInfo.classOpenBraceIndex);
34
+ const nextBody = `\n${this.markerBlock.createBlock(pluginName, zone, wrapperContent, indent)}\n\n${stripped}`.replace(/\n{3,}/g, "\n\n");
35
+ return `${parsed.source.slice(0, classStart)}${nextBody}${parsed.source.slice(classEnd)}`;
36
+ }
37
+ applyConstructorCall(parsed, pluginName, callExpression, zone) {
38
+ const bodyStart = parsed.constructorInfo.bodyOpenBraceIndex + 1;
39
+ const bodyEnd = parsed.constructorInfo.bodyCloseBraceIndex;
40
+ const body = parsed.source.slice(bodyStart, bodyEnd);
41
+ const withoutOwnedBlock = this.markerBlock.stripOwnedBlock(body, pluginName, zone).trimStart();
42
+ const indent = this.detectConstructorIndent(parsed.source, parsed.constructorInfo.bodyOpenBraceIndex);
43
+ const nextBody = `\n${this.markerBlock.createBlock(pluginName, zone, `${callExpression};`, indent)}\n${withoutOwnedBlock.length > 0 ? `\n${withoutOwnedBlock}` : ""}`.replace(/\n{3,}/g, "\n\n");
44
+ return `${parsed.source.slice(0, bodyStart)}${nextBody}${parsed.source.slice(bodyEnd)}`;
45
+ }
46
+ detectClassMemberIndent(source, classOpenBraceIndex) {
47
+ const lineStart = source.lastIndexOf("\n", classOpenBraceIndex);
48
+ return `${source.slice(lineStart + 1, classOpenBraceIndex).match(/^\s*/)?.[0] ?? ""} `;
49
+ }
50
+ detectConstructorIndent(source, constructorOpenBraceIndex) {
51
+ const lineStart = source.lastIndexOf("\n", constructorOpenBraceIndex);
52
+ return `${source.slice(lineStart + 1, constructorOpenBraceIndex).match(/^\s*/)?.[0] ?? ""} `;
53
+ }
54
+ };
55
+
56
+ //#endregion
57
+ export { CSharpInjectionEngine };
61
58
  //# sourceMappingURL=CSharpInjectionEngine.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CSharpInjectionEngine.js","sourceRoot":"","sources":["../../../src/postinstall/unreal/CSharpInjectionEngine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAGtE;;;;;;;;;GASG;AACH,MAAM,OAAO,qBAAqB;IACI;IAApC,YAAoC,cAAkC,IAAI,kBAAkB,EAAE;QAA1D,gBAAW,GAAX,WAAW,CAA+C;IAAG,CAAC;IAE3F,aAAa,C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G,KAAK,KAAK,KAAK,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,iBAAiB,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CACpG,SAAS,EACT,MAAM,CACP,CAAC;QACF,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;IAC1F,CAAC;IAEO,uBAAuB,CAAC,MAAc,EAAE,mBAA2B;QACzE,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC;QAChE,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,EAAE,mBAAmB,CAAC,CAAC;QACnE,MAAM,WAAW,GAAG,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QACvD,OAAO,GAAG,WAAW,MAAM,CAAC;IAC9B,CAAC;IAEO,uBAAuB,CAAC,MAAc,EAAE,yBAAiC;QAC/E,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,yBAAyB,CAAC,CAAC;QACtE,MAAM,eAAe,GAAG,MAAM,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,EAAE,yBAAyB,CAAC,CAAC;QAC/E,MAAM,iBAAiB,GAAG,eAAe,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QACnE,OAAO,GAAG,iBAAiB,MAAM,CAAC;IACpC,CAAC;CACF"}
1
+ {"version":3,"file":"CSharpInjectionEngine.js","names":[],"sources":["../../../src/postinstall/unreal/CSharpInjectionEngine.ts"],"sourcesContent":["import { MarkerBlockService } from '../markers/MarkerBlockService.js';\nimport type { ParsedCSharpFile } from './CSharpStructures.js';\n\n/**\n * Applies marker-delimited edits to a parsed C# file at three well-known anchors:\n *\n * 1. `applyIncludes` — `using ...;` block just after the last top-level `using`.\n * 2. `applyClassWrapper` — nested helper class inside the rules class body.\n * 3. `applyConstructorCall` — a single statement at the top of the constructor.\n *\n * Every edit is wrapped in an owned `UAPKG-BEGIN/END` marker block so re-running\n * uapkg is idempotent. Existing owned blocks are stripped before re-insert.\n */\nexport class CSharpInjectionEngine {\n public constructor(private readonly markerBlock: MarkerBlockService = new MarkerBlockService()) {}\n\n public applyIncludes(source: string, pluginName: string, includesContent: string, zone: string): string {\n const withoutOwnedBlock = this.markerBlock.stripOwnedBlock(source, pluginName, zone);\n const includeBlock = this.markerBlock.createBlock(pluginName, zone, includesContent);\n const usingMatches = [...withoutOwnedBlock.matchAll(/^[ \\t]*using\\s+[^;]+;\\s*$/gm)];\n if (usingMatches.length === 0) {\n return `${includeBlock}\\n${withoutOwnedBlock}`.trimStart();\n }\n\n const lastUsing = usingMatches[usingMatches.length - 1];\n const lastUsingIndex = (lastUsing.index ?? 0) + lastUsing[0].length;\n return `${withoutOwnedBlock.slice(0, lastUsingIndex)}\\n${includeBlock}\\n${withoutOwnedBlock.slice(lastUsingIndex).trimStart()}`;\n }\n\n public applyClassWrapper(parsed: ParsedCSharpFile, pluginName: string, wrapperContent: string, zone: string): string {\n const classStart = parsed.classInfo.classOpenBraceIndex + 1;\n const classEnd = parsed.classInfo.classCloseBraceIndex;\n const classBody = parsed.source.slice(classStart, classEnd);\n const stripped = this.markerBlock.stripOwnedBlock(classBody, pluginName, zone).trimStart();\n const indent = this.detectClassMemberIndent(parsed.source, parsed.classInfo.classOpenBraceIndex);\n const block = this.markerBlock.createBlock(pluginName, zone, wrapperContent, indent);\n const nextBody = `\\n${block}\\n\\n${stripped}`.replace(/\\n{3,}/g, '\\n\\n');\n return `${parsed.source.slice(0, classStart)}${nextBody}${parsed.source.slice(classEnd)}`;\n }\n\n public applyConstructorCall(\n parsed: ParsedCSharpFile,\n pluginName: string,\n callExpression: string,\n zone: string,\n ): string {\n const bodyStart = parsed.constructorInfo.bodyOpenBraceIndex + 1;\n const bodyEnd = parsed.constructorInfo.bodyCloseBraceIndex;\n const body = parsed.source.slice(bodyStart, bodyEnd);\n const withoutOwnedBlock = this.markerBlock.stripOwnedBlock(body, pluginName, zone).trimStart();\n const indent = this.detectConstructorIndent(parsed.source, parsed.constructorInfo.bodyOpenBraceIndex);\n const block = this.markerBlock.createBlock(pluginName, zone, `${callExpression};`, indent);\n const nextBody = `\\n${block}\\n${withoutOwnedBlock.length > 0 ? `\\n${withoutOwnedBlock}` : ''}`.replace(\n /\\n{3,}/g,\n '\\n\\n',\n );\n return `${parsed.source.slice(0, bodyStart)}${nextBody}${parsed.source.slice(bodyEnd)}`;\n }\n\n private detectClassMemberIndent(source: string, classOpenBraceIndex: number): string {\n const lineStart = source.lastIndexOf('\\n', classOpenBraceIndex);\n const classLine = source.slice(lineStart + 1, classOpenBraceIndex);\n const classIndent = classLine.match(/^\\s*/)?.[0] ?? '';\n return `${classIndent} `;\n }\n\n private detectConstructorIndent(source: string, constructorOpenBraceIndex: number): string {\n const lineStart = source.lastIndexOf('\\n', constructorOpenBraceIndex);\n const constructorLine = source.slice(lineStart + 1, constructorOpenBraceIndex);\n const constructorIndent = constructorLine.match(/^\\s*/)?.[0] ?? '';\n return `${constructorIndent} `;\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAaA,IAAa,wBAAb,MAAmC;CACG;CAApC,AAAO,YAAY,AAAiB,cAAkC,IAAI,mBAAmB,GAAG;EAA5D;CAA6D;CAEjG,AAAO,cAAc,QAAgB,YAAoB,iBAAyB,MAAsB;EACtG,MAAM,oBAAoB,KAAK,YAAY,gBAAgB,QAAQ,YAAY,IAAI;EACnF,MAAM,eAAe,KAAK,YAAY,YAAY,YAAY,MAAM,eAAe;EACnF,MAAM,eAAe,CAAC,GAAG,kBAAkB,SAAS,6BAA6B,CAAC;EAClF,IAAI,aAAa,WAAW,GAC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,OAAO,OAAO,MAAM,GAAG,SAAS,IAAI,WAAW,OAAO,OAAO,MAAM,OAAO;CACtF;CAEA,AAAQ,wBAAwB,QAAgB,qBAAqC;EACnF,MAAM,YAAY,OAAO,YAAY,MAAM,mBAAmB;EAG9D,OAAO,GAFW,OAAO,MAAM,YAAY,GAAG,mBAClB,CAAC,CAAC,MAAM,MAAM,CAAC,GAAG,MAAM,GAC9B;CACxB;CAEA,AAAQ,wBAAwB,QAAgB,2BAA2C;EACzF,MAAM,YAAY,OAAO,YAAY,MAAM,yBAAyB;EAGpE,OAAO,GAFiB,OAAO,MAAM,YAAY,GAAG,yBACZ,CAAC,CAAC,MAAM,MAAM,CAAC,GAAG,MAAM,GACpC;CAC9B;AACF"}
@@ -1,4 +1,5 @@
1
- import type { ParsedCSharpFile } from './CSharpStructures.js';
1
+ import { ParsedCSharpFile } from "./CSharpStructures.js";
2
+ //#region src/postinstall/unreal/CSharpStructureAnalyzer.d.ts
2
3
  /**
3
4
  * Lightweight C# structural parser tailored to Unreal build files.
4
5
  *
@@ -11,12 +12,14 @@ import type { ParsedCSharpFile } from './CSharpStructures.js';
11
12
  * Lighter-than-AST parsing keeps this file < 200 LOC and avoids pulling a
12
13
  * heavyweight runtime into `uapkg install`.
13
14
  */
14
- export declare class CSharpStructureAnalyzer {
15
- parseModule(filePath: string, source: string): ParsedCSharpFile;
16
- parseTarget(filePath: string, source: string): ParsedCSharpFile;
17
- private parseFile;
18
- private findClassesByBase;
19
- private findConstructor;
20
- private findMatchingBrace;
15
+ declare class CSharpStructureAnalyzer {
16
+ parseModule(filePath: string, source: string): ParsedCSharpFile;
17
+ parseTarget(filePath: string, source: string): ParsedCSharpFile;
18
+ private parseFile;
19
+ private findClassesByBase;
20
+ private findConstructor;
21
+ private findMatchingBrace;
21
22
  }
23
+ //#endregion
24
+ export { CSharpStructureAnalyzer };
22
25
  //# sourceMappingURL=CSharpStructureAnalyzer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CSharpStructureAnalyzer.d.ts","sourceRoot":"","sources":["../../../src/postinstall/unreal/CSharpStructureAnalyzer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkD,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAK9G;;;;;;;;;;;GAWG;AACH,qBAAa,uBAAuB;IAC3B,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,gBAAgB;IAI/D,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,gBAAgB;IAQtE,OAAO,CAAC,SAAS;IAqBjB,OAAO,CAAC,iBAAiB;IAoBzB,OAAO,CAAC,eAAe;IAgCvB,OAAO,CAAC,iBAAiB;CAqD1B"}
1
+ {"version":3,"file":"CSharpStructureAnalyzer.d.ts","names":[],"sources":["../../../src/postinstall/unreal/CSharpStructureAnalyzer.ts"],"mappings":";;;;;;;;;;;;;;cAiBa;EACJ,YAAY,kBAAkB,iBAAiB;EAI/C,YAAY,kBAAkB,iBAAiB;UAQ9C;UAqBA;UAoBA;UAgCA"}
@@ -1,130 +1,126 @@
1
- import { PrettyParseError } from './PrettyParseError.js';
1
+ import { PrettyParseError } from "./PrettyParseError.js";
2
+
3
+ //#region src/postinstall/unreal/CSharpStructureAnalyzer.ts
2
4
  const CLASS_REGEX = /\bclass\s+([A-Za-z_][A-Za-z0-9_]*)\s*:\s*([^{\r\n]+)/g;
3
5
  /**
4
- * Lightweight C# structural parser tailored to Unreal build files.
5
- *
6
- * We do NOT invoke the Roslyn / csharp-ast graph for analysis because the
7
- * pipeline only needs three anchors:
8
- * 1. The single class inheriting `ModuleRules` / `TargetRules`.
9
- * 2. Its constructor matching `(ModuleRules|TargetRules)(Type Target) : base(Target)`.
10
- * 3. The body braces of (1) and (2) so injectors can splice content.
11
- *
12
- * Lighter-than-AST parsing keeps this file < 200 LOC and avoids pulling a
13
- * heavyweight runtime into `uapkg install`.
14
- */
15
- export class CSharpStructureAnalyzer {
16
- parseModule(filePath, source) {
17
- return this.parseFile('module', filePath, source, 'ModuleRules', 'ReadOnlyTargetRules');
18
- }
19
- parseTarget(filePath, source) {
20
- const parsed = this.parseFile('target', filePath, source, 'TargetRules', 'TargetInfo');
21
- if (!/\bType\s*=\s*TargetType\.[A-Za-z_][A-Za-z0-9_]*\s*;/.test(source)) {
22
- throw new PrettyParseError(filePath, 'TargetRules file missing `Type = TargetType.X;` assignment', source, 0);
23
- }
24
- return parsed;
25
- }
26
- parseFile(kind, filePath, source, expectedBaseClass, expectedConstructorArgType) {
27
- const matchingClasses = this.findClassesByBase(source, expectedBaseClass);
28
- if (matchingClasses.length !== 1) {
29
- throw new PrettyParseError(filePath, `Expected exactly one class extending ${expectedBaseClass}, found ${matchingClasses.length}`, source, matchingClasses[0]?.classKeywordIndex ?? 0);
30
- }
31
- const classInfo = matchingClasses[0];
32
- const constructorInfo = this.findConstructor(filePath, source, classInfo, expectedConstructorArgType);
33
- return { kind, classInfo, constructorInfo, source };
34
- }
35
- findClassesByBase(source, expectedBaseClass) {
36
- const classes = [];
37
- for (const match of source.matchAll(CLASS_REGEX)) {
38
- const className = match[1];
39
- const inheritance = match[2] ?? '';
40
- const inheritsExpected = inheritance
41
- .split(',')
42
- .map((item) => item.trim())
43
- .some((item) => item === expectedBaseClass);
44
- if (!inheritsExpected || !className)
45
- continue;
46
- const classKeywordIndex = match.index ?? 0;
47
- const classOpenBraceIndex = source.indexOf('{', classKeywordIndex);
48
- if (classOpenBraceIndex < 0)
49
- continue;
50
- const classCloseBraceIndex = this.findMatchingBrace(source, classOpenBraceIndex);
51
- classes.push({ className, classKeywordIndex, classOpenBraceIndex, classCloseBraceIndex });
52
- }
53
- return classes;
54
- }
55
- findConstructor(filePath, source, classInfo, expectedConstructorArgType) {
56
- const classBody = source.slice(classInfo.classOpenBraceIndex + 1, classInfo.classCloseBraceIndex);
57
- const signatureRegex = new RegExp(`\\bpublic\\s+${classInfo.className}\\s*\\(\\s*${expectedConstructorArgType}\\s+Target\\s*\\)\\s*:\\s*base\\s*\\(\\s*Target\\s*\\)`, 'g');
58
- const matches = [...classBody.matchAll(signatureRegex)];
59
- if (matches.length !== 1) {
60
- throw new PrettyParseError(filePath, `Expected exactly one constructor signature for ${classInfo.className}(${expectedConstructorArgType} Target) : base(Target), found ${matches.length}`, source, classInfo.classKeywordIndex);
61
- }
62
- const signatureRelativeIndex = matches[0].index ?? 0;
63
- const signatureIndex = classInfo.classOpenBraceIndex + 1 + signatureRelativeIndex;
64
- const bodyOpenBraceIndex = source.indexOf('{', signatureIndex);
65
- if (bodyOpenBraceIndex < 0) {
66
- throw new PrettyParseError(filePath, 'Constructor body opening brace not found', source, signatureIndex);
67
- }
68
- const bodyCloseBraceIndex = this.findMatchingBrace(source, bodyOpenBraceIndex);
69
- return { signatureIndex, bodyOpenBraceIndex, bodyCloseBraceIndex };
70
- }
71
- findMatchingBrace(source, openIndex) {
72
- let depth = 0;
73
- let inSingleLineComment = false;
74
- let inMultiLineComment = false;
75
- let inSingleQuote = false;
76
- let inDoubleQuote = false;
77
- for (let i = openIndex; i < source.length; i += 1) {
78
- const current = source[i];
79
- const next = source[i + 1];
80
- const prev = source[i - 1];
81
- if (inSingleLineComment) {
82
- if (current === '\n')
83
- inSingleLineComment = false;
84
- continue;
85
- }
86
- if (inMultiLineComment) {
87
- if (prev === '*' && current === '/')
88
- inMultiLineComment = false;
89
- continue;
90
- }
91
- if (inSingleQuote) {
92
- if (current === "'" && prev !== '\\')
93
- inSingleQuote = false;
94
- continue;
95
- }
96
- if (inDoubleQuote) {
97
- if (current === '"' && prev !== '\\')
98
- inDoubleQuote = false;
99
- continue;
100
- }
101
- if (current === '/' && next === '/') {
102
- inSingleLineComment = true;
103
- i += 1;
104
- continue;
105
- }
106
- if (current === '/' && next === '*') {
107
- inMultiLineComment = true;
108
- i += 1;
109
- continue;
110
- }
111
- if (current === "'") {
112
- inSingleQuote = true;
113
- continue;
114
- }
115
- if (current === '"') {
116
- inDoubleQuote = true;
117
- continue;
118
- }
119
- if (current === '{')
120
- depth += 1;
121
- else if (current === '}') {
122
- depth -= 1;
123
- if (depth === 0)
124
- return i;
125
- }
126
- }
127
- throw new Error('Unbalanced braces in C# file');
128
- }
129
- }
6
+ * Lightweight C# structural parser tailored to Unreal build files.
7
+ *
8
+ * We do NOT invoke the Roslyn / csharp-ast graph for analysis because the
9
+ * pipeline only needs three anchors:
10
+ * 1. The single class inheriting `ModuleRules` / `TargetRules`.
11
+ * 2. Its constructor matching `(ModuleRules|TargetRules)(Type Target) : base(Target)`.
12
+ * 3. The body braces of (1) and (2) so injectors can splice content.
13
+ *
14
+ * Lighter-than-AST parsing keeps this file < 200 LOC and avoids pulling a
15
+ * heavyweight runtime into `uapkg install`.
16
+ */
17
+ var CSharpStructureAnalyzer = class {
18
+ parseModule(filePath, source) {
19
+ return this.parseFile("module", filePath, source, "ModuleRules", "ReadOnlyTargetRules");
20
+ }
21
+ parseTarget(filePath, source) {
22
+ const parsed = this.parseFile("target", filePath, source, "TargetRules", "TargetInfo");
23
+ if (!/\bType\s*=\s*TargetType\.[A-Za-z_][A-Za-z0-9_]*\s*;/.test(source)) throw new PrettyParseError(filePath, "TargetRules file missing `Type = TargetType.X;` assignment", source, 0);
24
+ return parsed;
25
+ }
26
+ parseFile(kind, filePath, source, expectedBaseClass, expectedConstructorArgType) {
27
+ const matchingClasses = this.findClassesByBase(source, expectedBaseClass);
28
+ if (matchingClasses.length !== 1) throw new PrettyParseError(filePath, `Expected exactly one class extending ${expectedBaseClass}, found ${matchingClasses.length}`, source, matchingClasses[0]?.classKeywordIndex ?? 0);
29
+ const classInfo = matchingClasses[0];
30
+ return {
31
+ kind,
32
+ classInfo,
33
+ constructorInfo: this.findConstructor(filePath, source, classInfo, expectedConstructorArgType),
34
+ source
35
+ };
36
+ }
37
+ findClassesByBase(source, expectedBaseClass) {
38
+ const classes = [];
39
+ for (const match of source.matchAll(CLASS_REGEX)) {
40
+ const className = match[1];
41
+ if (!(match[2] ?? "").split(",").map((item) => item.trim()).some((item) => item === expectedBaseClass) || !className) continue;
42
+ const classKeywordIndex = match.index ?? 0;
43
+ const classOpenBraceIndex = source.indexOf("{", classKeywordIndex);
44
+ if (classOpenBraceIndex < 0) continue;
45
+ const classCloseBraceIndex = this.findMatchingBrace(source, classOpenBraceIndex);
46
+ classes.push({
47
+ className,
48
+ classKeywordIndex,
49
+ classOpenBraceIndex,
50
+ classCloseBraceIndex
51
+ });
52
+ }
53
+ return classes;
54
+ }
55
+ findConstructor(filePath, source, classInfo, expectedConstructorArgType) {
56
+ const classBody = source.slice(classInfo.classOpenBraceIndex + 1, classInfo.classCloseBraceIndex);
57
+ const signatureRegex = new RegExp(`\\bpublic\\s+${classInfo.className}\\s*\\(\\s*${expectedConstructorArgType}\\s+Target\\s*\\)\\s*:\\s*base\\s*\\(\\s*Target\\s*\\)`, "g");
58
+ const matches = [...classBody.matchAll(signatureRegex)];
59
+ if (matches.length !== 1) throw new PrettyParseError(filePath, `Expected exactly one constructor signature for ${classInfo.className}(${expectedConstructorArgType} Target) : base(Target), found ${matches.length}`, source, classInfo.classKeywordIndex);
60
+ const signatureRelativeIndex = matches[0].index ?? 0;
61
+ const signatureIndex = classInfo.classOpenBraceIndex + 1 + signatureRelativeIndex;
62
+ const bodyOpenBraceIndex = source.indexOf("{", signatureIndex);
63
+ if (bodyOpenBraceIndex < 0) throw new PrettyParseError(filePath, "Constructor body opening brace not found", source, signatureIndex);
64
+ return {
65
+ signatureIndex,
66
+ bodyOpenBraceIndex,
67
+ bodyCloseBraceIndex: this.findMatchingBrace(source, bodyOpenBraceIndex)
68
+ };
69
+ }
70
+ findMatchingBrace(source, openIndex) {
71
+ let depth = 0;
72
+ let inSingleLineComment = false;
73
+ let inMultiLineComment = false;
74
+ let inSingleQuote = false;
75
+ let inDoubleQuote = false;
76
+ for (let i = openIndex; i < source.length; i += 1) {
77
+ const current = source[i];
78
+ const next = source[i + 1];
79
+ const prev = source[i - 1];
80
+ if (inSingleLineComment) {
81
+ if (current === "\n") inSingleLineComment = false;
82
+ continue;
83
+ }
84
+ if (inMultiLineComment) {
85
+ if (prev === "*" && current === "/") inMultiLineComment = false;
86
+ continue;
87
+ }
88
+ if (inSingleQuote) {
89
+ if (current === "'" && prev !== "\\") inSingleQuote = false;
90
+ continue;
91
+ }
92
+ if (inDoubleQuote) {
93
+ if (current === "\"" && prev !== "\\") inDoubleQuote = false;
94
+ continue;
95
+ }
96
+ if (current === "/" && next === "/") {
97
+ inSingleLineComment = true;
98
+ i += 1;
99
+ continue;
100
+ }
101
+ if (current === "/" && next === "*") {
102
+ inMultiLineComment = true;
103
+ i += 1;
104
+ continue;
105
+ }
106
+ if (current === "'") {
107
+ inSingleQuote = true;
108
+ continue;
109
+ }
110
+ if (current === "\"") {
111
+ inDoubleQuote = true;
112
+ continue;
113
+ }
114
+ if (current === "{") depth += 1;
115
+ else if (current === "}") {
116
+ depth -= 1;
117
+ if (depth === 0) return i;
118
+ }
119
+ }
120
+ throw new Error("Unbalanced braces in C# file");
121
+ }
122
+ };
123
+
124
+ //#endregion
125
+ export { CSharpStructureAnalyzer };
130
126
  //# sourceMappingURL=CSharpStructureAnalyzer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CSharpStructureAnalyzer.js","sourceRoot":"","sources":["../../../src/postinstall/unreal/CSharpStructureAnalyzer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,WAAW,GAAG,uDAAuD,CAAC;AAE5E;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,uBAAuB;IAC3B,WAAW,CAAC,QAAgB,EAAE,MAAc;QACjD,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,qBAAqB,CAAC,CAAC;IAC1F,CAAC;IAEM,WAAW,CAAC,QAAgB,EAAE,MAAc;QACjD,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ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CACF"}
1
+ {"version":3,"file":"CSharpStructureAnalyzer.js","names":[],"sources":["../../../src/postinstall/unreal/CSharpStructureAnalyzer.ts"],"sourcesContent":["import type { CSharpFileKind, ParsedClass, ParsedConstructor, ParsedCSharpFile } from './CSharpStructures.js';\nimport { PrettyParseError } from './PrettyParseError.js';\n\nconst CLASS_REGEX = /\\bclass\\s+([A-Za-z_][A-Za-z0-9_]*)\\s*:\\s*([^{\\r\\n]+)/g;\n\n/**\n * Lightweight C# structural parser tailored to Unreal build files.\n *\n * We do NOT invoke the Roslyn / csharp-ast graph for analysis because the\n * pipeline only needs three anchors:\n * 1. The single class inheriting `ModuleRules` / `TargetRules`.\n * 2. Its constructor matching `(ModuleRules|TargetRules)(Type Target) : base(Target)`.\n * 3. The body braces of (1) and (2) so injectors can splice content.\n *\n * Lighter-than-AST parsing keeps this file < 200 LOC and avoids pulling a\n * heavyweight runtime into `uapkg install`.\n */\nexport class CSharpStructureAnalyzer {\n public parseModule(filePath: string, source: string): ParsedCSharpFile {\n return this.parseFile('module', filePath, source, 'ModuleRules', 'ReadOnlyTargetRules');\n }\n\n public parseTarget(filePath: string, source: string): ParsedCSharpFile {\n const parsed = this.parseFile('target', filePath, source, 'TargetRules', 'TargetInfo');\n if (!/\\bType\\s*=\\s*TargetType\\.[A-Za-z_][A-Za-z0-9_]*\\s*;/.test(source)) {\n throw new PrettyParseError(filePath, 'TargetRules file missing `Type = TargetType.X;` assignment', source, 0);\n }\n return parsed;\n }\n\n private parseFile(\n kind: CSharpFileKind,\n filePath: string,\n source: string,\n expectedBaseClass: string,\n expectedConstructorArgType: string,\n ): ParsedCSharpFile {\n const matchingClasses = this.findClassesByBase(source, expectedBaseClass);\n if (matchingClasses.length !== 1) {\n throw new PrettyParseError(\n filePath,\n `Expected exactly one class extending ${expectedBaseClass}, found ${matchingClasses.length}`,\n source,\n matchingClasses[0]?.classKeywordIndex ?? 0,\n );\n }\n const classInfo = matchingClasses[0];\n const constructorInfo = this.findConstructor(filePath, source, classInfo, expectedConstructorArgType);\n return { kind, classInfo, constructorInfo, source };\n }\n\n private findClassesByBase(source: string, expectedBaseClass: string): ParsedClass[] {\n const classes: ParsedClass[] = [];\n for (const match of source.matchAll(CLASS_REGEX)) {\n const className = match[1];\n const inheritance = match[2] ?? '';\n const inheritsExpected = inheritance\n .split(',')\n .map((item) => item.trim())\n .some((item) => item === expectedBaseClass);\n if (!inheritsExpected || !className) continue;\n\n const classKeywordIndex = match.index ?? 0;\n const classOpenBraceIndex = source.indexOf('{', classKeywordIndex);\n if (classOpenBraceIndex < 0) continue;\n const classCloseBraceIndex = this.findMatchingBrace(source, classOpenBraceIndex);\n classes.push({ className, classKeywordIndex, classOpenBraceIndex, classCloseBraceIndex });\n }\n return classes;\n }\n\n private findConstructor(\n filePath: string,\n source: string,\n classInfo: ParsedClass,\n expectedConstructorArgType: string,\n ): ParsedConstructor {\n const classBody = source.slice(classInfo.classOpenBraceIndex + 1, classInfo.classCloseBraceIndex);\n const signatureRegex = new RegExp(\n `\\\\bpublic\\\\s+${classInfo.className}\\\\s*\\\\(\\\\s*${expectedConstructorArgType}\\\\s+Target\\\\s*\\\\)\\\\s*:\\\\s*base\\\\s*\\\\(\\\\s*Target\\\\s*\\\\)`,\n 'g',\n );\n\n const matches = [...classBody.matchAll(signatureRegex)];\n if (matches.length !== 1) {\n throw new PrettyParseError(\n filePath,\n `Expected exactly one constructor signature for ${classInfo.className}(${expectedConstructorArgType} Target) : base(Target), found ${matches.length}`,\n source,\n classInfo.classKeywordIndex,\n );\n }\n\n const signatureRelativeIndex = matches[0].index ?? 0;\n const signatureIndex = classInfo.classOpenBraceIndex + 1 + signatureRelativeIndex;\n const bodyOpenBraceIndex = source.indexOf('{', signatureIndex);\n if (bodyOpenBraceIndex < 0) {\n throw new PrettyParseError(filePath, 'Constructor body opening brace not found', source, signatureIndex);\n }\n const bodyCloseBraceIndex = this.findMatchingBrace(source, bodyOpenBraceIndex);\n return { signatureIndex, bodyOpenBraceIndex, bodyCloseBraceIndex };\n }\n\n private findMatchingBrace(source: string, openIndex: number): number {\n let depth = 0;\n let inSingleLineComment = false;\n let inMultiLineComment = false;\n let inSingleQuote = false;\n let inDoubleQuote = false;\n for (let i = openIndex; i < source.length; i += 1) {\n const current = source[i];\n const next = source[i + 1];\n const prev = source[i - 1];\n\n if (inSingleLineComment) {\n if (current === '\\n') inSingleLineComment = false;\n continue;\n }\n if (inMultiLineComment) {\n if (prev === '*' && current === '/') inMultiLineComment = false;\n continue;\n }\n if (inSingleQuote) {\n if (current === \"'\" && prev !== '\\\\') inSingleQuote = false;\n continue;\n }\n if (inDoubleQuote) {\n if (current === '\"' && prev !== '\\\\') inDoubleQuote = false;\n continue;\n }\n if (current === '/' && next === '/') {\n inSingleLineComment = true;\n i += 1;\n continue;\n }\n if (current === '/' && next === '*') {\n inMultiLineComment = true;\n i += 1;\n continue;\n }\n if (current === \"'\") {\n inSingleQuote = true;\n continue;\n }\n if (current === '\"') {\n inDoubleQuote = true;\n continue;\n }\n if (current === '{') depth += 1;\n else if (current === '}') {\n depth -= 1;\n if (depth === 0) return i;\n }\n }\n throw new Error('Unbalanced braces in C# file');\n }\n}\n"],"mappings":";;;AAGA,MAAM,cAAc;;;;;;;;;;;;;AAcpB,IAAa,0BAAb,MAAqC;CACnC,AAAO,YAAY,UAAkB,QAAkC;EACrE,OAAO,KAAK,UAAU,UAAU,UAAU,QAAQ,eAAe,qBAAqB;CACxF;CAEA,AAAO,YAAY,UAAkB,QAAkC;EACrE,MAAM,SAAS,KAAK,UAAU,UAAU,UAAU,QAAQ,eAAe,YAAY;EACrF,IAAI,CAAC,sDAAsD,KAAK,MAAM,GACpE,MAAM,IAAI,iBAAiB,UAAU,8DAA8D,QAAQ,CAAC;EAE9G,OAAO;CACT;CAEA,AAAQ,UACN,MACA,UACA,QACA,mBACA,4BACkB;EAClB,MAAM,kBAAkB,KAAK,kBAAkB,QAAQ,iBAAiB;EACxE,IAAI,gBAAgB,WAAW,GAC7B,MAAM,IAA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KAAK,cAAc;EAC7D,IAAI,qBAAqB,GACvB,MAAM,IAAI,iBAAiB,UAAU,4CAA4C,QAAQ,cAAc;EAGzG,OAAO;GAAE;GAAgB;GAAoB,qBADjB,KAAK,kBAAkB,QAAQ,kBACI;EAAE;CACnE;CAEA,AAAQ,kBAAkB,QAAgB,WAA2B;EACnE,IAAI,QAAQ;EACZ,IAAI,sBAAsB;EAC1B,IAAI,qBAAqB;EACzB,IAAI,gBAAgB;EACpB,IAAI,gBAAgB;EACpB,KAAK,IAAI,IAAI,WAAW,IAAI,OAAO,QAAQ,KAAK,GAAG;GACjD,MAAM,UAAU,OAAO;GACvB,MAAM,OAAO,OAAO,IAAI;GACxB,MAAM,OAAO,OAAO,IAAI;GAExB,IAAI,qBAAqB;IACvB,IAAI,YAAY,MAAM,sBAAsB;IAC5C;GACF;GACA,IAAI,oBAAoB;IACtB,IAAI,SAAS,OAAO,YAAY,KAAK,qBAAqB;IAC1D;GACF;GACA,IAAI,eAAe;IACjB,IAAI,YAAY,OAAO,SAAS,MAAM,gBAAgB;IACtD;GACF;GACA,IAAI,eAAe;IACjB,IAAI,YAAY,QAAO,SAAS,MAAM,gBAAgB;IACtD;GACF;GACA,IAAI,YAAY,OAAO,SAAS,KAAK;IACnC,sBAAsB;IACtB,KAAK;IACL;GACF;GACA,IAAI,YAAY,OAAO,SAAS,KAAK;IACnC,qBAAqB;IACrB,KAAK;IACL;GACF;GACA,IAAI,YAAY,KAAK;IACnB,gBAAgB;IAChB;GACF;GACA,IAAI,YAAY,MAAK;IACnB,gBAAgB;IAChB;GACF;GACA,IAAI,YAAY,KAAK,SAAS;QACzB,IAAI,YAAY,KAAK;IACxB,SAAS;IACT,IAAI,UAAU,GAAG,OAAO;GAC1B;EACF;EACA,MAAM,IAAI,MAAM,8BAA8B;CAChD;AACF"}
@@ -1,19 +1,22 @@
1
- export type CSharpFileKind = 'module' | 'target';
2
- export interface ParsedClass {
3
- readonly className: string;
4
- readonly classKeywordIndex: number;
5
- readonly classOpenBraceIndex: number;
6
- readonly classCloseBraceIndex: number;
1
+ //#region src/postinstall/unreal/CSharpStructures.d.ts
2
+ type CSharpFileKind = 'module' | 'target';
3
+ interface ParsedClass {
4
+ readonly className: string;
5
+ readonly classKeywordIndex: number;
6
+ readonly classOpenBraceIndex: number;
7
+ readonly classCloseBraceIndex: number;
7
8
  }
8
- export interface ParsedConstructor {
9
- readonly signatureIndex: number;
10
- readonly bodyOpenBraceIndex: number;
11
- readonly bodyCloseBraceIndex: number;
9
+ interface ParsedConstructor {
10
+ readonly signatureIndex: number;
11
+ readonly bodyOpenBraceIndex: number;
12
+ readonly bodyCloseBraceIndex: number;
12
13
  }
13
- export interface ParsedCSharpFile {
14
- readonly kind: CSharpFileKind;
15
- readonly classInfo: ParsedClass;
16
- readonly constructorInfo: ParsedConstructor;
17
- readonly source: string;
14
+ interface ParsedCSharpFile {
15
+ readonly kind: CSharpFileKind;
16
+ readonly classInfo: ParsedClass;
17
+ readonly constructorInfo: ParsedConstructor;
18
+ readonly source: string;
18
19
  }
20
+ //#endregion
21
+ export { CSharpFileKind, ParsedCSharpFile, ParsedClass, ParsedConstructor };
19
22
  //# sourceMappingURL=CSharpStructures.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CSharpStructures.d.ts","sourceRoot":"","sources":["../../../src/postinstall/unreal/CSharpStructures.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEjD,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;CACvC;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;CACtC;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC;IAChC,QAAQ,CAAC,eAAe,EAAE,iBAAiB,CAAC;IAC5C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB"}
1
+ {"version":3,"file":"CSharpStructures.d.ts","names":[],"sources":["../../../src/postinstall/unreal/CSharpStructures.ts"],"mappings":";KAAY;UAEK;WACN;WACA;WACA;WACA;;UAGM;WACN;WACA;WACA;;UAGM;WACN,MAAM;WACN,WAAW;WACX,iBAAiB;WACjB"}
@@ -1,2 +1 @@
1
- export {};
2
- //# sourceMappingURL=CSharpStructures.js.map
1
+ export { };
@@ -1,4 +1,5 @@
1
- export type WrapperContextType = 'ModuleRules' | 'TargetRules';
1
+ //#region src/postinstall/unreal/CSharpWrapperFactory.d.ts
2
+ type WrapperContextType = 'ModuleRules' | 'TargetRules';
2
3
  /**
3
4
  * Produces the hashed helper class that wraps user-supplied `classBody` content.
4
5
  *
@@ -19,8 +20,10 @@ export type WrapperContextType = 'ModuleRules' | 'TargetRules';
19
20
  * * strip an invalid `using ;` line the library emits for empty namespaces;
20
21
  * * retype the `object` parameter back to the requested ModuleRules/TargetRules.
21
22
  */
22
- export declare class CSharpWrapperFactory {
23
- createWrapper(className: string, contextType: WrapperContextType, contextName: string, body: string): string;
24
- private normalize;
23
+ declare class CSharpWrapperFactory {
24
+ createWrapper(className: string, contextType: WrapperContextType, contextName: string, body: string): string;
25
+ private normalize;
25
26
  }
27
+ //#endregion
28
+ export { CSharpWrapperFactory, WrapperContextType };
26
29
  //# sourceMappingURL=CSharpWrapperFactory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CSharpWrapperFactory.d.ts","sourceRoot":"","sources":["../../../src/postinstall/unreal/CSharpWrapperFactory.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,kBAAkB,GAAG,aAAa,GAAG,aAAa,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,oBAAoB;IACxB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IA8BnH,OAAO,CAAC,SAAS;CAWlB"}
1
+ {"version":3,"file":"CSharpWrapperFactory.d.ts","names":[],"sources":["../../../src/postinstall/unreal/CSharpWrapperFactory.ts"],"mappings":";KAEY;;;;;;;;;;;;;;;;;;;;;cAsBC;EACJ,cAAc,mBAAmB,aAAa,oBAAoB,qBAAqB;UA8BtF"}