@uapkg/cli 1.3.0 → 1.3.1

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,60 +1,64 @@
1
- import { fail, ok } from '@uapkg/diagnostics';
2
- import { EntryResolver } from './EntryResolver.js';
3
- import { EsbuildTranspiler } from './EsbuildTranspiler.js';
4
- import { ExportValidator } from './ExportValidator.js';
5
- import { ModuleImporter } from './ModuleImporter.js';
1
+ import { EntryResolver } from "./EntryResolver.js";
2
+ import { EsbuildTranspiler } from "./EsbuildTranspiler.js";
3
+ import { ExportValidator } from "./ExportValidator.js";
4
+ import { ModuleImporter } from "./ModuleImporter.js";
5
+ import { fail, ok } from "@uapkg/diagnostics";
6
+
7
+ //#region src/postinstall/loader/PostinstallLoader.ts
6
8
  /**
7
- * Facade that composes the four loader stages:
8
- * 1. {@link EntryResolver} locate `.uapkg/postinstall.<ext>`
9
- * 2. {@link EsbuildTranspiler} if `.ts`, transpile to ESM
10
- * 3. {@link ModuleImporter} dynamic import → raw module value
11
- * 4. {@link ExportValidator} Zod-validate default export
12
- *
13
- * Returns `ok(null)` when a plugin has no postinstall — a valid, silent state.
14
- * Never throws: every stage returns `Result`.
15
- */
16
- export class PostinstallLoader {
17
- entryResolver;
18
- transpiler;
19
- importer;
20
- validator;
21
- constructor(entryResolver = new EntryResolver(), transpiler = new EsbuildTranspiler(), importer = new ModuleImporter(), validator = new ExportValidator()) {
22
- this.entryResolver = entryResolver;
23
- this.transpiler = transpiler;
24
- this.importer = importer;
25
- this.validator = validator;
26
- }
27
- async load(packageName, pluginRoot) {
28
- const entryResult = this.entryResolver.resolve(packageName, pluginRoot);
29
- if (!entryResult.ok)
30
- return entryResult;
31
- const entry = entryResult.value;
32
- if (entry === null)
33
- return ok(null);
34
- const sourceResult = await this.buildModuleSource(packageName, entry);
35
- if (!sourceResult.ok)
36
- return sourceResult;
37
- const importResult = await this.importer.import(packageName, sourceResult.value);
38
- if (!importResult.ok)
39
- return importResult;
40
- const validated = this.validator.validate(packageName, entry.path, importResult.value);
41
- if (!validated.ok)
42
- return validated;
43
- return ok({
44
- packageName,
45
- pluginRoot,
46
- entryFile: entry.path,
47
- definition: validated.value,
48
- });
49
- }
50
- async buildModuleSource(packageName, entry) {
51
- if (entry.kind !== 'ts') {
52
- return ok({ kind: 'file', path: entry.path });
53
- }
54
- const transpiled = await this.transpiler.transpile(packageName, entry.path);
55
- if (!transpiled.ok)
56
- return fail(transpiled.diagnostics);
57
- return ok({ kind: 'transpiled', code: transpiled.value, originalPath: entry.path });
58
- }
59
- }
9
+ * Facade that composes the four loader stages:
10
+ * 1. {@link EntryResolver} locate `.uapkg/postinstall.<ext>`
11
+ * 2. {@link EsbuildTranspiler} if `.ts`, transpile to ESM
12
+ * 3. {@link ModuleImporter} dynamic import → raw module value
13
+ * 4. {@link ExportValidator} Zod-validate default export
14
+ *
15
+ * Returns `ok(null)` when a plugin has no postinstall — a valid, silent state.
16
+ * Never throws: every stage returns `Result`.
17
+ */
18
+ var PostinstallLoader = class {
19
+ entryResolver;
20
+ transpiler;
21
+ importer;
22
+ validator;
23
+ constructor(entryResolver = new EntryResolver(), transpiler = new EsbuildTranspiler(), importer = new ModuleImporter(), validator = new ExportValidator()) {
24
+ this.entryResolver = entryResolver;
25
+ this.transpiler = transpiler;
26
+ this.importer = importer;
27
+ this.validator = validator;
28
+ }
29
+ async load(packageName, pluginRoot) {
30
+ const entryResult = this.entryResolver.resolve(packageName, pluginRoot);
31
+ if (!entryResult.ok) return entryResult;
32
+ const entry = entryResult.value;
33
+ if (entry === null) return ok(null);
34
+ const sourceResult = await this.buildModuleSource(packageName, entry);
35
+ if (!sourceResult.ok) return sourceResult;
36
+ const importResult = await this.importer.import(packageName, sourceResult.value);
37
+ if (!importResult.ok) return importResult;
38
+ const validated = this.validator.validate(packageName, entry.path, importResult.value);
39
+ if (!validated.ok) return validated;
40
+ return ok({
41
+ packageName,
42
+ pluginRoot,
43
+ entryFile: entry.path,
44
+ definition: validated.value
45
+ });
46
+ }
47
+ async buildModuleSource(packageName, entry) {
48
+ if (entry.kind !== "ts") return ok({
49
+ kind: "file",
50
+ path: entry.path
51
+ });
52
+ const transpiled = await this.transpiler.transpile(packageName, entry.path);
53
+ if (!transpiled.ok) return fail(transpiled.diagnostics);
54
+ return ok({
55
+ kind: "transpiled",
56
+ code: transpiled.value,
57
+ originalPath: entry.path
58
+ });
59
+ }
60
+ };
61
+
62
+ //#endregion
63
+ export { PostinstallLoader };
60
64
  //# sourceMappingURL=PostinstallLoader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PostinstallLoader.js","sourceRoot":"","sources":["../../../src/postinstall/loader/PostinstallLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,EAAE,EAAe,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAsB,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAqB,MAAM,qBAAqB,CAAC;AASxE;;;;;;;;;GASG;AACH,MAAM,OAAO,iBAAiB;IAET;IACA;IACA;IACA;IAJnB,YACmB,gBAA+B,IAAI,aAAa,EAAE,EAClD,aAAgC,IAAI,iBAAiB,EAAE,EACvD,WAA2B,IAAI,cAAc,EAAE,EAC/C,YAA6B,IAAI,eAAe,EAAE;QAHlD,kBAAa,GAAb,aAAa,CAAqC;QAClD,eAAU,GAAV,UAAU,CAA6C;QACvD,aAAQ,GAAR,QAAQ,CAAuC;QAC/C,cAAS,GAAT,SAAS,CAAyC;IAClE,CAAC;IAEG,KAAK,CAAC,IAAI,CAAC,WAAmB,EAAE,UAAkB;QACvD,MAAM,WAAW,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QACxE,IAAI,CAAC,WAAW,CAAC,EAAE;YAAE,OAAO,WAAW,CAAC;QACxC,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC;QAChC,IAAI,KAAK,KAAK,IAAI;YAAE,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC;QAEpC,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QACtE,IAAI,CAAC,YAAY,CAAC,EAAE;YAAE,OAAO,YAAY,CAAC;QAE1C,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC;QACjF,IAAI,CAAC,YAAY,CAAC,EAAE;YAAE,OAAO,YAAY,CAAC;QAE1C,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,CAAC,IAAI,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC;QACvF,IAAI,CAAC,SAAS,CAAC,EAAE;YAAE,OAAO,SAAS,CAAC;QAEpC,OAAO,EAAE,CAAC;YACR,WAAW;YACX,UAAU;YACV,SAAS,EAAE,KAAK,CAAC,IAAI;YACrB,UAAU,EAAE,SAAS,CAAC,KAAK;SAC5B,CAAC,CAAC;IACL,CAAC;IAEO,KAAK,CAAC,iBAAiB,CAAC,WAAmB,EAAE,KAAoB;QACvE,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;YACxB,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QAChD,CAAC;QACD,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,WAAW,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QAC5E,IAAI,CAAC,UAAU,CAAC,EAAE;YAAE,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QACxD,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IACtF,CAAC;CACF"}
1
+ {"version":3,"file":"PostinstallLoader.js","names":[],"sources":["../../../src/postinstall/loader/PostinstallLoader.ts"],"sourcesContent":["import { fail, ok, type Result } from '@uapkg/diagnostics';\nimport type { PostinstallDefinition } from '../api/PostinstallDsl.js';\nimport { EntryResolver, type ResolvedEntry } from './EntryResolver.js';\nimport { EsbuildTranspiler } from './EsbuildTranspiler.js';\nimport { ExportValidator } from './ExportValidator.js';\nimport { ModuleImporter, type ModuleSource } from './ModuleImporter.js';\n\nexport interface LoadedPostinstall {\n readonly packageName: string;\n readonly pluginRoot: string;\n readonly entryFile: string;\n readonly definition: PostinstallDefinition;\n}\n\n/**\n * Facade that composes the four loader stages:\n * 1. {@link EntryResolver} locate `.uapkg/postinstall.<ext>`\n * 2. {@link EsbuildTranspiler} if `.ts`, transpile to ESM\n * 3. {@link ModuleImporter} dynamic import → raw module value\n * 4. {@link ExportValidator} Zod-validate default export\n *\n * Returns `ok(null)` when a plugin has no postinstall — a valid, silent state.\n * Never throws: every stage returns `Result`.\n */\nexport class PostinstallLoader {\n public constructor(\n private readonly entryResolver: EntryResolver = new EntryResolver(),\n private readonly transpiler: EsbuildTranspiler = new EsbuildTranspiler(),\n private readonly importer: ModuleImporter = new ModuleImporter(),\n private readonly validator: ExportValidator = new ExportValidator(),\n ) {}\n\n public async load(packageName: string, pluginRoot: string): Promise<Result<LoadedPostinstall | null>> {\n const entryResult = this.entryResolver.resolve(packageName, pluginRoot);\n if (!entryResult.ok) return entryResult;\n const entry = entryResult.value;\n if (entry === null) return ok(null);\n\n const sourceResult = await this.buildModuleSource(packageName, entry);\n if (!sourceResult.ok) return sourceResult;\n\n const importResult = await this.importer.import(packageName, sourceResult.value);\n if (!importResult.ok) return importResult;\n\n const validated = this.validator.validate(packageName, entry.path, importResult.value);\n if (!validated.ok) return validated;\n\n return ok({\n packageName,\n pluginRoot,\n entryFile: entry.path,\n definition: validated.value,\n });\n }\n\n private async buildModuleSource(packageName: string, entry: ResolvedEntry): Promise<Result<ModuleSource>> {\n if (entry.kind !== 'ts') {\n return ok({ kind: 'file', path: entry.path });\n }\n const transpiled = await this.transpiler.transpile(packageName, entry.path);\n if (!transpiled.ok) return fail(transpiled.diagnostics);\n return ok({ kind: 'transpiled', code: transpiled.value, originalPath: entry.path });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAwBA,IAAa,oBAAb,MAA+B;CAEV;CACA;CACA;CACA;CAJnB,AAAO,YACL,AAAiB,gBAA+B,IAAI,cAAc,GAClE,AAAiB,aAAgC,IAAI,kBAAkB,GACvE,AAAiB,WAA2B,IAAI,eAAe,GAC/D,AAAiB,YAA6B,IAAI,gBAAgB,GAClE;EAJiB;EACA;EACA;EACA;CAChB;CAEH,MAAa,KAAK,aAAqB,YAA+D;EACpG,MAAM,cAAc,KAAK,cAAc,QAAQ,aAAa,UAAU;EACtE,IAAI,CAAC,YAAY,IAAI,OAAO;EAC5B,MAAM,QAAQ,YAAY;EAC1B,IAAI,UAAU,MAAM,OAAO,GAAG,IAAI;EAElC,MAAM,eAAe,MAAM,KAAK,kBAAkB,aAAa,KAAK;EACpE,IAAI,CAAC,aAAa,IAAI,OAAO;EAE7B,MAAM,eAAe,MAAM,KAAK,SAAS,OAAO,aAAa,aAAa,KAAK;EAC/E,IAAI,CAAC,aAAa,IAAI,OAAO;EAE7B,MAAM,YAAY,KAAK,UAAU,SAAS,aAAa,MAAM,MAAM,aAAa,KAAK;EACrF,IAAI,CAAC,UAAU,IAAI,OAAO;EAE1B,OAAO,GAAG;GACR;GACA;GACA,WAAW,MAAM;GACjB,YAAY,UAAU;EACxB,CAAC;CACH;CAEA,MAAc,kBAAkB,aAAqB,OAAqD;EACxG,IAAI,MAAM,SAAS,MACjB,OAAO,GAAG;GAAE,MAAM;GAAQ,MAAM,MAAM;EAAK,CAAC;EAE9C,MAAM,aAAa,MAAM,KAAK,WAAW,UAAU,aAAa,MAAM,IAAI;EAC1E,IAAI,CAAC,WAAW,IAAI,OAAO,KAAK,WAAW,WAAW;EACtD,OAAO,GAAG;GAAE,MAAM;GAAc,MAAM,WAAW;GAAO,cAAc,MAAM;EAAK,CAAC;CACpF;AACF"}
@@ -1,6 +1,7 @@
1
- import { type Result } from '@uapkg/diagnostics';
2
- import { MarkerBlockService } from './MarkerBlockService.js';
3
- import { MarkerIntegrityValidator } from './MarkerIntegrityValidator.js';
1
+ import { MarkerBlockService } from "./MarkerBlockService.js";
2
+ import { MarkerIntegrityValidator } from "./MarkerIntegrityValidator.js";
3
+ import { Result } from "@uapkg/diagnostics";
4
+ //#region src/postinstall/markers/MarkerBlockEditor.d.ts
4
5
  /**
5
6
  * Higher-level idempotent wrapper around {@link MarkerBlockService}.
6
7
  *
@@ -13,18 +14,20 @@ import { MarkerIntegrityValidator } from './MarkerIntegrityValidator.js';
13
14
  *
14
15
  * Injectors compose this helper to achieve "edit once, safe to re-run" semantics.
15
16
  */
16
- export declare class MarkerBlockEditor {
17
- private readonly service;
18
- private readonly integrity;
19
- constructor(service?: MarkerBlockService, integrity?: MarkerIntegrityValidator);
20
- upsert(source: string, pluginName: string, zone: string, content: string, indent?: string): string;
21
- remove(source: string, pluginName: string, zone: string): string;
22
- contains(source: string, pluginName: string, zone: string): boolean;
23
- /**
24
- * Validates that the source contains a well-formed marker block for the
25
- * owning `(pluginName, zone)` pair. Returns `Result.ok` when clean; returns
26
- * `Result.fail` with a `POSTINSTALL_MARKER_CORRUPT` diagnostic otherwise.
27
- */
28
- validate(source: string, pluginName: string, zone: string, filePath: string): Result<void>;
17
+ declare class MarkerBlockEditor {
18
+ private readonly service;
19
+ private readonly integrity;
20
+ constructor(service?: MarkerBlockService, integrity?: MarkerIntegrityValidator);
21
+ upsert(source: string, pluginName: string, zone: string, content: string, indent?: string): string;
22
+ remove(source: string, pluginName: string, zone: string): string;
23
+ contains(source: string, pluginName: string, zone: string): boolean;
24
+ /**
25
+ * Validates that the source contains a well-formed marker block for the
26
+ * owning `(pluginName, zone)` pair. Returns `Result.ok` when clean; returns
27
+ * `Result.fail` with a `POSTINSTALL_MARKER_CORRUPT` diagnostic otherwise.
28
+ */
29
+ validate(source: string, pluginName: string, zone: string, filePath: string): Result<void>;
29
30
  }
31
+ //#endregion
32
+ export { MarkerBlockEditor };
30
33
  //# sourceMappingURL=MarkerBlockEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MarkerBlockEditor.d.ts","sourceRoot":"","sources":["../../../src/postinstall/markers/MarkerBlockEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsD,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACrG,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE;;;;;;;;;;;GAWG;AACH,qBAAa,iBAAiB;IAE1B,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,SAAS;gBADT,OAAO,GAAE,kBAA6C,EACtD,SAAS,GAAE,wBAAyD;IAGhF,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAK,GAAG,MAAM;IAM9F,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAIhE,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO;IAI1E;;;;OAIG;IACI,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC;CAKlG"}
1
+ {"version":3,"file":"MarkerBlockEditor.d.ts","names":[],"sources":["../../../src/postinstall/markers/MarkerBlockEditor.ts"],"mappings":";;;;;;;;;;;;;;;;cAgBa;mBAEQ;mBACA;EAFnB,YACmB,UAAS,oBACT,YAAW;EAGvB,OAAO,gBAAgB,oBAAoB,cAAc,iBAAiB;EAM1E,OAAO,gBAAgB,oBAAoB;EAI3C,SAAS,gBAAgB,oBAAoB;;;;;;EAS7C,SAAS,gBAAgB,oBAAoB,cAAc,mBAAmB"}
@@ -1,46 +1,50 @@
1
- import { createPostinstallMarkerCorruptDiagnostic, fail, ok } from '@uapkg/diagnostics';
2
- import { MarkerBlockService } from './MarkerBlockService.js';
3
- import { MarkerIntegrityValidator } from './MarkerIntegrityValidator.js';
1
+ import { MarkerBlockService } from "./MarkerBlockService.js";
2
+ import { MarkerIntegrityValidator } from "./MarkerIntegrityValidator.js";
3
+ import { createPostinstallMarkerCorruptDiagnostic, fail, ok } from "@uapkg/diagnostics";
4
+
5
+ //#region src/postinstall/markers/MarkerBlockEditor.ts
4
6
  /**
5
- * Higher-level idempotent wrapper around {@link MarkerBlockService}.
6
- *
7
- * - `upsert`: remove any existing owned block and re-insert fresh content.
8
- * Idempotent: calling twice with the same input yields the same result.
9
- * - `remove`: strip the owned block if present; no-op otherwise.
10
- * - `validate`: detect corruption (orphaned/nested markers) in the source for
11
- * the owning `(pluginName, zone)` pair. Returns a `POSTINSTALL_MARKER_CORRUPT`
12
- * diagnostic on failure; never throws.
13
- *
14
- * Injectors compose this helper to achieve "edit once, safe to re-run" semantics.
15
- */
16
- export class MarkerBlockEditor {
17
- service;
18
- integrity;
19
- constructor(service = new MarkerBlockService(), integrity = new MarkerIntegrityValidator()) {
20
- this.service = service;
21
- this.integrity = integrity;
22
- }
23
- upsert(source, pluginName, zone, content, indent = '') {
24
- const stripped = this.service.stripOwnedBlock(source, pluginName, zone);
25
- const block = this.service.createBlock(pluginName, zone, content, indent);
26
- return `${stripped.trimEnd()}\n${block}\n`;
27
- }
28
- remove(source, pluginName, zone) {
29
- return this.service.stripOwnedBlock(source, pluginName, zone);
30
- }
31
- contains(source, pluginName, zone) {
32
- return this.service.containsOwnedBlock(source, pluginName, zone);
33
- }
34
- /**
35
- * Validates that the source contains a well-formed marker block for the
36
- * owning `(pluginName, zone)` pair. Returns `Result.ok` when clean; returns
37
- * `Result.fail` with a `POSTINSTALL_MARKER_CORRUPT` diagnostic otherwise.
38
- */
39
- validate(source, pluginName, zone, filePath) {
40
- const result = this.integrity.validate(source, pluginName, zone);
41
- if (result.ok)
42
- return ok(undefined);
43
- return fail([createPostinstallMarkerCorruptDiagnostic(pluginName, filePath, result.reason)]);
44
- }
45
- }
7
+ * Higher-level idempotent wrapper around {@link MarkerBlockService}.
8
+ *
9
+ * - `upsert`: remove any existing owned block and re-insert fresh content.
10
+ * Idempotent: calling twice with the same input yields the same result.
11
+ * - `remove`: strip the owned block if present; no-op otherwise.
12
+ * - `validate`: detect corruption (orphaned/nested markers) in the source for
13
+ * the owning `(pluginName, zone)` pair. Returns a `POSTINSTALL_MARKER_CORRUPT`
14
+ * diagnostic on failure; never throws.
15
+ *
16
+ * Injectors compose this helper to achieve "edit once, safe to re-run" semantics.
17
+ */
18
+ var MarkerBlockEditor = class {
19
+ service;
20
+ integrity;
21
+ constructor(service = new MarkerBlockService(), integrity = new MarkerIntegrityValidator()) {
22
+ this.service = service;
23
+ this.integrity = integrity;
24
+ }
25
+ upsert(source, pluginName, zone, content, indent = "") {
26
+ const stripped = this.service.stripOwnedBlock(source, pluginName, zone);
27
+ const block = this.service.createBlock(pluginName, zone, content, indent);
28
+ return `${stripped.trimEnd()}\n${block}\n`;
29
+ }
30
+ remove(source, pluginName, zone) {
31
+ return this.service.stripOwnedBlock(source, pluginName, zone);
32
+ }
33
+ contains(source, pluginName, zone) {
34
+ return this.service.containsOwnedBlock(source, pluginName, zone);
35
+ }
36
+ /**
37
+ * Validates that the source contains a well-formed marker block for the
38
+ * owning `(pluginName, zone)` pair. Returns `Result.ok` when clean; returns
39
+ * `Result.fail` with a `POSTINSTALL_MARKER_CORRUPT` diagnostic otherwise.
40
+ */
41
+ validate(source, pluginName, zone, filePath) {
42
+ const result = this.integrity.validate(source, pluginName, zone);
43
+ if (result.ok) return ok(void 0);
44
+ return fail([createPostinstallMarkerCorruptDiagnostic(pluginName, filePath, result.reason)]);
45
+ }
46
+ };
47
+
48
+ //#endregion
49
+ export { MarkerBlockEditor };
46
50
  //# sourceMappingURL=MarkerBlockEditor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MarkerBlockEditor.js","sourceRoot":"","sources":["../../../src/postinstall/markers/MarkerBlockEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wCAAwC,EAAE,IAAI,EAAE,EAAE,EAAe,MAAM,oBAAoB,CAAC;AACrG,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,iBAAiB;IAET;IACA;IAFnB,YACmB,UAA8B,IAAI,kBAAkB,EAAE,EACtD,YAAsC,IAAI,wBAAwB,EAAE;QADpE,YAAO,GAAP,OAAO,CAA+C;QACtD,cAAS,GAAT,SAAS,CAA2D;IACpF,CAAC;IAEG,MAAM,CAAC,MAAc,EAAE,UAAkB,EAAE,IAAY,EAAE,OAAe,EAAE,MAAM,GAAG,EAAE;QAC1F,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;QACxE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAC1E,OAAO,GAAG,QAAQ,CAAC,OAAO,EAAE,KAAK,KAAK,IAAI,CAAC;IAC7C,CAAC;IAEM,MAAM,CAAC,MAAc,EAAE,UAAkB,EAAE,IAAY;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;IAChE,CAAC;IAEM,QAAQ,CAAC,MAAc,EAAE,UAAkB,EAAE,IAAY;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;IACnE,CAAC;IAED;;;;OAIG;IACI,QAAQ,CAAC,MAAc,EAAE,UAAkB,EAAE,IAAY,EAAE,QAAgB;QAChF,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;QACjE,IAAI,MAAM,CAAC,EAAE;YAAE,OAAO,EAAE,CAAC,SAAS,CAAC,CAAC;QACpC,OAAO,IAAI,CAAC,CAAC,wCAAwC,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC/F,CAAC;CACF"}
1
+ {"version":3,"file":"MarkerBlockEditor.js","names":[],"sources":["../../../src/postinstall/markers/MarkerBlockEditor.ts"],"sourcesContent":["import { createPostinstallMarkerCorruptDiagnostic, fail, ok, type Result } from '@uapkg/diagnostics';\nimport { MarkerBlockService } from './MarkerBlockService.js';\nimport { MarkerIntegrityValidator } from './MarkerIntegrityValidator.js';\n\n/**\n * Higher-level idempotent wrapper around {@link MarkerBlockService}.\n *\n * - `upsert`: remove any existing owned block and re-insert fresh content.\n * Idempotent: calling twice with the same input yields the same result.\n * - `remove`: strip the owned block if present; no-op otherwise.\n * - `validate`: detect corruption (orphaned/nested markers) in the source for\n * the owning `(pluginName, zone)` pair. Returns a `POSTINSTALL_MARKER_CORRUPT`\n * diagnostic on failure; never throws.\n *\n * Injectors compose this helper to achieve \"edit once, safe to re-run\" semantics.\n */\nexport class MarkerBlockEditor {\n public constructor(\n private readonly service: MarkerBlockService = new MarkerBlockService(),\n private readonly integrity: MarkerIntegrityValidator = new MarkerIntegrityValidator(),\n ) {}\n\n public upsert(source: string, pluginName: string, zone: string, content: string, indent = ''): string {\n const stripped = this.service.stripOwnedBlock(source, pluginName, zone);\n const block = this.service.createBlock(pluginName, zone, content, indent);\n return `${stripped.trimEnd()}\\n${block}\\n`;\n }\n\n public remove(source: string, pluginName: string, zone: string): string {\n return this.service.stripOwnedBlock(source, pluginName, zone);\n }\n\n public contains(source: string, pluginName: string, zone: string): boolean {\n return this.service.containsOwnedBlock(source, pluginName, zone);\n }\n\n /**\n * Validates that the source contains a well-formed marker block for the\n * owning `(pluginName, zone)` pair. Returns `Result.ok` when clean; returns\n * `Result.fail` with a `POSTINSTALL_MARKER_CORRUPT` diagnostic otherwise.\n */\n public validate(source: string, pluginName: string, zone: string, filePath: string): Result<void> {\n const result = this.integrity.validate(source, pluginName, zone);\n if (result.ok) return ok(undefined);\n return fail([createPostinstallMarkerCorruptDiagnostic(pluginName, filePath, result.reason)]);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAgBA,IAAa,oBAAb,MAA+B;CAEV;CACA;CAFnB,AAAO,YACL,AAAiB,UAA8B,IAAI,mBAAmB,GACtE,AAAiB,YAAsC,IAAI,yBAAyB,GACpF;EAFiB;EACA;CAChB;CAEH,AAAO,OAAO,QAAgB,YAAoB,MAAc,SAAiB,SAAS,IAAY;EACpG,MAAM,WAAW,KAAK,QAAQ,gBAAgB,QAAQ,YAAY,IAAI;EACtE,MAAM,QAAQ,KAAK,QAAQ,YAAY,YAAY,MAAM,SAAS,MAAM;EACxE,OAAO,GAAG,SAAS,QAAQ,EAAE,IAAI,MAAM;CACzC;CAEA,AAAO,OAAO,QAAgB,YAAoB,MAAsB;EACtE,OAAO,KAAK,QAAQ,gBAAgB,QAAQ,YAAY,IAAI;CAC9D;CAEA,AAAO,SAAS,QAAgB,YAAoB,MAAuB;EACzE,OAAO,KAAK,QAAQ,mBAAmB,QAAQ,YAAY,IAAI;CACjE;;;;;;CAOA,AAAO,SAAS,QAAgB,YAAoB,MAAc,UAAgC;EAChG,MAAM,SAAS,KAAK,UAAU,SAAS,QAAQ,YAAY,IAAI;EAC/D,IAAI,OAAO,IAAI,OAAO,GAAG,MAAS;EAClC,OAAO,KAAK,CAAC,yCAAyC,YAAY,UAAU,OAAO,MAAM,CAAC,CAAC;CAC7F;AACF"}
@@ -1,3 +1,4 @@
1
+ //#region src/postinstall/markers/MarkerBlockService.d.ts
1
2
  /**
2
3
  * Low-level marker-block primitives.
3
4
  *
@@ -13,12 +14,14 @@
13
14
  * blocks are ever rewritten. Behavior mirrors the legacy `MarkerBlockService`
14
15
  * so existing host-project files stay stable across the rewrite.
15
16
  */
16
- export declare class MarkerBlockService {
17
- makeBegin(pluginName: string, zone: string): string;
18
- makeEnd(pluginName: string, zone: string): string;
19
- createBlock(pluginName: string, zone: string, content: string, indent?: string): string;
20
- stripOwnedBlock(source: string, pluginName: string, zone: string): string;
21
- containsOwnedBlock(source: string, pluginName: string, zone: string): boolean;
22
- private escapeForRegex;
17
+ declare class MarkerBlockService {
18
+ makeBegin(pluginName: string, zone: string): string;
19
+ makeEnd(pluginName: string, zone: string): string;
20
+ createBlock(pluginName: string, zone: string, content: string, indent?: string): string;
21
+ stripOwnedBlock(source: string, pluginName: string, zone: string): string;
22
+ containsOwnedBlock(source: string, pluginName: string, zone: string): boolean;
23
+ private escapeForRegex;
23
24
  }
25
+ //#endregion
26
+ export { MarkerBlockService };
24
27
  //# sourceMappingURL=MarkerBlockService.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MarkerBlockService.d.ts","sourceRoot":"","sources":["../../../src/postinstall/markers/MarkerBlockService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,qBAAa,kBAAkB;IACtB,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAInD,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAIjD,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAK,GAAG,MAAM;IAUnF,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAOzE,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO;IAKpF,OAAO,CAAC,cAAc;CAGvB"}
1
+ {"version":3,"file":"MarkerBlockService.d.ts","names":[],"sources":["../../../src/postinstall/markers/MarkerBlockService.ts"],"mappings":";;;;;;;;;;;;;;;;cAea;EACJ,UAAU,oBAAoB;EAI9B,QAAQ,oBAAoB;EAI5B,YAAY,oBAAoB,cAAc,iBAAiB;EAU/D,gBAAgB,gBAAgB,oBAAoB;EAOpD,mBAAmB,gBAAgB,oBAAoB;UAKtD"}
@@ -1,46 +1,46 @@
1
+ //#region src/postinstall/markers/MarkerBlockService.ts
1
2
  /**
2
- * Low-level marker-block primitives.
3
- *
4
- * A marker block has the form:
5
- *
6
- * ```
7
- * <indent>// UAPKG-BEGIN <pluginName>:<zone>
8
- * <indent><content...>
9
- * <indent>// UAPKG-END <pluginName>:<zone>
10
- * ```
11
- *
12
- * Blocks are *owned* by a `(pluginName, zone)` pair — only the owning pair's
13
- * blocks are ever rewritten. Behavior mirrors the legacy `MarkerBlockService`
14
- * so existing host-project files stay stable across the rewrite.
15
- */
16
- export class MarkerBlockService {
17
- makeBegin(pluginName, zone) {
18
- return `// UAPKG-BEGIN ${pluginName}:${zone}`;
19
- }
20
- makeEnd(pluginName, zone) {
21
- return `// UAPKG-END ${pluginName}:${zone}`;
22
- }
23
- createBlock(pluginName, zone, content, indent = '') {
24
- const begin = `${indent}${this.makeBegin(pluginName, zone)}`;
25
- const end = `${indent}${this.makeEnd(pluginName, zone)}`;
26
- const lines = content
27
- .trim()
28
- .split(/\r?\n/)
29
- .map((line) => `${indent}${line}`.replace(/[ \t]+$/g, ''));
30
- return `${begin}\n${lines.join('\n')}\n${end}`;
31
- }
32
- stripOwnedBlock(source, pluginName, zone) {
33
- const begin = this.escapeForRegex(this.makeBegin(pluginName, zone));
34
- const end = this.escapeForRegex(this.makeEnd(pluginName, zone));
35
- const pattern = new RegExp(`^[ \\t]*${begin}[\\s\\S]*?^[ \\t]*${end}\\s*\\r?\\n?`, 'gm');
36
- return source.replace(pattern, '');
37
- }
38
- containsOwnedBlock(source, pluginName, zone) {
39
- const begin = this.escapeForRegex(this.makeBegin(pluginName, zone));
40
- return new RegExp(`^[ \\t]*${begin}$`, 'm').test(source);
41
- }
42
- escapeForRegex(value) {
43
- return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
44
- }
45
- }
3
+ * Low-level marker-block primitives.
4
+ *
5
+ * A marker block has the form:
6
+ *
7
+ * ```
8
+ * <indent>// UAPKG-BEGIN <pluginName>:<zone>
9
+ * <indent><content...>
10
+ * <indent>// UAPKG-END <pluginName>:<zone>
11
+ * ```
12
+ *
13
+ * Blocks are *owned* by a `(pluginName, zone)` pair — only the owning pair's
14
+ * blocks are ever rewritten. Behavior mirrors the legacy `MarkerBlockService`
15
+ * so existing host-project files stay stable across the rewrite.
16
+ */
17
+ var MarkerBlockService = class {
18
+ makeBegin(pluginName, zone) {
19
+ return `// UAPKG-BEGIN ${pluginName}:${zone}`;
20
+ }
21
+ makeEnd(pluginName, zone) {
22
+ return `// UAPKG-END ${pluginName}:${zone}`;
23
+ }
24
+ createBlock(pluginName, zone, content, indent = "") {
25
+ const begin = `${indent}${this.makeBegin(pluginName, zone)}`;
26
+ const end = `${indent}${this.makeEnd(pluginName, zone)}`;
27
+ return `${begin}\n${content.trim().split(/\r?\n/).map((line) => `${indent}${line}`.replace(/[ \t]+$/g, "")).join("\n")}\n${end}`;
28
+ }
29
+ stripOwnedBlock(source, pluginName, zone) {
30
+ const begin = this.escapeForRegex(this.makeBegin(pluginName, zone));
31
+ const end = this.escapeForRegex(this.makeEnd(pluginName, zone));
32
+ const pattern = new RegExp(`^[ \\t]*${begin}[\\s\\S]*?^[ \\t]*${end}\\s*\\r?\\n?`, "gm");
33
+ return source.replace(pattern, "");
34
+ }
35
+ containsOwnedBlock(source, pluginName, zone) {
36
+ const begin = this.escapeForRegex(this.makeBegin(pluginName, zone));
37
+ return new RegExp(`^[ \\t]*${begin}$`, "m").test(source);
38
+ }
39
+ escapeForRegex(value) {
40
+ return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
41
+ }
42
+ };
43
+
44
+ //#endregion
45
+ export { MarkerBlockService };
46
46
  //# sourceMappingURL=MarkerBlockService.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MarkerBlockService.js","sourceRoot":"","sources":["../../../src/postinstall/markers/MarkerBlockService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,kBAAkB;IACtB,SAAS,CAAC,UAAkB,EAAE,IAAY;QAC/C,OAAO,kBAAkB,UAAU,IAAI,IAAI,EAAE,CAAC;IAChD,CAAC;IAEM,OAAO,CAAC,UAAkB,EAAE,IAAY;QAC7C,OAAO,gBAAgB,UAAU,IAAI,IAAI,EAAE,CAAC;IAC9C,CAAC;IAEM,WAAW,CAAC,UAAkB,EAAE,IAAY,EAAE,OAAe,EAAE,MAAM,GAAG,EAAE;QAC/E,MAAM,KAAK,GAAG,GAAG,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,EAAE,CAAC;QAC7D,MAAM,GAAG,GAAG,GAAG,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,EAAE,CAAC;QACzD,MAAM,KAAK,GAAG,OAAO;aAClB,IAAI,EAAE;aACN,KAAK,CAAC,OAAO,CAAC;aACd,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,MAAM,GAAG,IAAI,EAAE,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,CAAC;QAC7D,OAAO,GAAG,KAAK,KAAK,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;IACjD,CAAC;IAEM,eAAe,CAAC,MAAc,EAAE,UAAkB,EAAE,IAAY;QACrE,MAAM,KAAK,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC;QACpE,MAAM,GAAG,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC;QAChE,MAAM,OAAO,GAAG,IAAI,MAAM,CAAC,WAAW,KAAK,qBAAqB,GAAG,cAAc,EAAE,IAAI,CAAC,CAAC;QACzF,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACrC,CAAC;IAEM,kBAAkB,CAAC,MAAc,EAAE,UAAkB,EAAE,IAAY;QACxE,MAAM,KAAK,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC;QACpE,OAAO,IAAI,MAAM,CAAC,WAAW,KAAK,GAAG,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC3D,CAAC;IAEO,cAAc,CAAC,KAAa;QAClC,OAAO,KAAK,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;IACtD,CAAC;CACF"}
1
+ {"version":3,"file":"MarkerBlockService.js","names":[],"sources":["../../../src/postinstall/markers/MarkerBlockService.ts"],"sourcesContent":["/**\n * Low-level marker-block primitives.\n *\n * A marker block has the form:\n *\n * ```\n * <indent>// UAPKG-BEGIN <pluginName>:<zone>\n * <indent><content...>\n * <indent>// UAPKG-END <pluginName>:<zone>\n * ```\n *\n * Blocks are *owned* by a `(pluginName, zone)` pair — only the owning pair's\n * blocks are ever rewritten. Behavior mirrors the legacy `MarkerBlockService`\n * so existing host-project files stay stable across the rewrite.\n */\nexport class MarkerBlockService {\n public makeBegin(pluginName: string, zone: string): string {\n return `// UAPKG-BEGIN ${pluginName}:${zone}`;\n }\n\n public makeEnd(pluginName: string, zone: string): string {\n return `// UAPKG-END ${pluginName}:${zone}`;\n }\n\n public createBlock(pluginName: string, zone: string, content: string, indent = ''): string {\n const begin = `${indent}${this.makeBegin(pluginName, zone)}`;\n const end = `${indent}${this.makeEnd(pluginName, zone)}`;\n const lines = content\n .trim()\n .split(/\\r?\\n/)\n .map((line) => `${indent}${line}`.replace(/[ \\t]+$/g, ''));\n return `${begin}\\n${lines.join('\\n')}\\n${end}`;\n }\n\n public stripOwnedBlock(source: string, pluginName: string, zone: string): string {\n const begin = this.escapeForRegex(this.makeBegin(pluginName, zone));\n const end = this.escapeForRegex(this.makeEnd(pluginName, zone));\n const pattern = new RegExp(`^[ \\\\t]*${begin}[\\\\s\\\\S]*?^[ \\\\t]*${end}\\\\s*\\\\r?\\\\n?`, 'gm');\n return source.replace(pattern, '');\n }\n\n public containsOwnedBlock(source: string, pluginName: string, zone: string): boolean {\n const begin = this.escapeForRegex(this.makeBegin(pluginName, zone));\n return new RegExp(`^[ \\\\t]*${begin}$`, 'm').test(source);\n }\n\n private escapeForRegex(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAeA,IAAa,qBAAb,MAAgC;CAC9B,AAAO,UAAU,YAAoB,MAAsB;EACzD,OAAO,kBAAkB,WAAW,GAAG;CACzC;CAEA,AAAO,QAAQ,YAAoB,MAAsB;EACvD,OAAO,gBAAgB,WAAW,GAAG;CACvC;CAEA,AAAO,YAAY,YAAoB,MAAc,SAAiB,SAAS,IAAY;EACzF,MAAM,QAAQ,GAAG,SAAS,KAAK,UAAU,YAAY,IAAI;EACzD,MAAM,MAAM,GAAG,SAAS,KAAK,QAAQ,YAAY,IAAI;EAKrD,OAAO,GAAG,MAAM,IAJF,QACX,KAAK,CAAC,CACN,MAAM,OAAO,CAAC,CACd,KAAK,SAAS,GAAG,SAAS,OAAO,QAAQ,YAAY,EAAE,CAClC,CAAC,CAAC,KAAK,IAAI,EAAE,IAAI;CAC3C;CAEA,AAAO,gBAAgB,QAAgB,YAAoB,MAAsB;EAC/E,MAAM,QAAQ,KAAK,eAAe,KAAK,UAAU,YAAY,IAAI,CAAC;EAClE,MAAM,MAAM,KAAK,eAAe,KAAK,QAAQ,YAAY,IAAI,CAAC;EAC9D,MAAM,UAAU,IAAI,OAAO,WAAW,MAAM,oBAAoB,IAAI,eAAe,IAAI;EACvF,OAAO,OAAO,QAAQ,SAAS,EAAE;CACnC;CAEA,AAAO,mBAAmB,QAAgB,YAAoB,MAAuB;EACnF,MAAM,QAAQ,KAAK,eAAe,KAAK,UAAU,YAAY,IAAI,CAAC;EAClE,OAAO,IAAI,OAAO,WAAW,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,MAAM;CACzD;CAEA,AAAQ,eAAe,OAAuB;EAC5C,OAAO,MAAM,QAAQ,uBAAuB,MAAM;CACpD;AACF"}
@@ -1,3 +1,4 @@
1
+ //#region src/postinstall/markers/MarkerIntegrityValidator.d.ts
1
2
  /**
2
3
  * Detects corruption in uapkg marker blocks for a single `(pluginName, zone)`
3
4
  * owning pair. Corruption rules (scoped to the owning pair — foreign plugins'
@@ -14,16 +15,18 @@
14
15
  * returns the first violation encountered so callers can surface exactly one
15
16
  * diagnostic per file.
16
17
  */
17
- export interface MarkerIntegrityOk {
18
- readonly ok: true;
18
+ interface MarkerIntegrityOk {
19
+ readonly ok: true;
19
20
  }
20
- export interface MarkerIntegrityFail {
21
- readonly ok: false;
22
- readonly reason: string;
23
- readonly line: number;
21
+ interface MarkerIntegrityFail {
22
+ readonly ok: false;
23
+ readonly reason: string;
24
+ readonly line: number;
24
25
  }
25
- export type MarkerIntegrityResult = MarkerIntegrityOk | MarkerIntegrityFail;
26
- export declare class MarkerIntegrityValidator {
27
- validate(source: string, pluginName: string, zone: string): MarkerIntegrityResult;
26
+ type MarkerIntegrityResult = MarkerIntegrityOk | MarkerIntegrityFail;
27
+ declare class MarkerIntegrityValidator {
28
+ validate(source: string, pluginName: string, zone: string): MarkerIntegrityResult;
28
29
  }
30
+ //#endregion
31
+ export { MarkerIntegrityFail, MarkerIntegrityOk, MarkerIntegrityResult, MarkerIntegrityValidator };
29
32
  //# sourceMappingURL=MarkerIntegrityValidator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MarkerIntegrityValidator.d.ts","sourceRoot":"","sources":["../../../src/postinstall/markers/MarkerIntegrityValidator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,GAAG,mBAAmB,CAAC;AAE5E,qBAAa,wBAAwB;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,qBAAqB;CAyDzF"}
1
+ {"version":3,"file":"MarkerIntegrityValidator.d.ts","names":[],"sources":["../../../src/postinstall/markers/MarkerIntegrityValidator.ts"],"mappings":";;;;;;;;;;;;;;;;;UAgBiB;WACN;;UAGM;WACN;WACA;WACA;;KAGC,wBAAwB,oBAAoB;cAE3C;EACJ,SAAS,gBAAgB,oBAAoB,eAAe"}
@@ -1,53 +1,48 @@
1
- export class MarkerIntegrityValidator {
2
- validate(source, pluginName, zone) {
3
- const beginToken = `UAPKG-BEGIN ${pluginName}:${zone}`;
4
- const endToken = `UAPKG-END ${pluginName}:${zone}`;
5
- const lines = source.split(/\r?\n/);
6
- let depth = 0;
7
- let lastBeginLine = -1;
8
- for (let i = 0; i < lines.length; i += 1) {
9
- const line = lines[i];
10
- const hasBegin = line.includes(beginToken);
11
- const hasEnd = line.includes(endToken);
12
- if (hasBegin && hasEnd) {
13
- // Same-line BEGIN+END is not a shape we emit; treat as malformed.
14
- return {
15
- ok: false,
16
- reason: `BEGIN and END on same line at line ${i + 1}`,
17
- line: i + 1,
18
- };
19
- }
20
- if (hasBegin) {
21
- if (depth >= 1) {
22
- return {
23
- ok: false,
24
- reason: `nested BEGIN at line ${i + 1} (previous BEGIN at line ${lastBeginLine + 1} was not closed)`,
25
- line: i + 1,
26
- };
27
- }
28
- depth += 1;
29
- lastBeginLine = i;
30
- continue;
31
- }
32
- if (hasEnd) {
33
- if (depth === 0) {
34
- return {
35
- ok: false,
36
- reason: `orphaned END at line ${i + 1} (no preceding BEGIN)`,
37
- line: i + 1,
38
- };
39
- }
40
- depth -= 1;
41
- }
42
- }
43
- if (depth > 0) {
44
- return {
45
- ok: false,
46
- reason: `orphaned BEGIN at line ${lastBeginLine + 1} (missing END)`,
47
- line: lastBeginLine + 1,
48
- };
49
- }
50
- return { ok: true };
51
- }
52
- }
1
+ //#region src/postinstall/markers/MarkerIntegrityValidator.ts
2
+ var MarkerIntegrityValidator = class {
3
+ validate(source, pluginName, zone) {
4
+ const beginToken = `UAPKG-BEGIN ${pluginName}:${zone}`;
5
+ const endToken = `UAPKG-END ${pluginName}:${zone}`;
6
+ const lines = source.split(/\r?\n/);
7
+ let depth = 0;
8
+ let lastBeginLine = -1;
9
+ for (let i = 0; i < lines.length; i += 1) {
10
+ const line = lines[i];
11
+ const hasBegin = line.includes(beginToken);
12
+ const hasEnd = line.includes(endToken);
13
+ if (hasBegin && hasEnd) return {
14
+ ok: false,
15
+ reason: `BEGIN and END on same line at line ${i + 1}`,
16
+ line: i + 1
17
+ };
18
+ if (hasBegin) {
19
+ if (depth >= 1) return {
20
+ ok: false,
21
+ reason: `nested BEGIN at line ${i + 1} (previous BEGIN at line ${lastBeginLine + 1} was not closed)`,
22
+ line: i + 1
23
+ };
24
+ depth += 1;
25
+ lastBeginLine = i;
26
+ continue;
27
+ }
28
+ if (hasEnd) {
29
+ if (depth === 0) return {
30
+ ok: false,
31
+ reason: `orphaned END at line ${i + 1} (no preceding BEGIN)`,
32
+ line: i + 1
33
+ };
34
+ depth -= 1;
35
+ }
36
+ }
37
+ if (depth > 0) return {
38
+ ok: false,
39
+ reason: `orphaned BEGIN at line ${lastBeginLine + 1} (missing END)`,
40
+ line: lastBeginLine + 1
41
+ };
42
+ return { ok: true };
43
+ }
44
+ };
45
+
46
+ //#endregion
47
+ export { MarkerIntegrityValidator };
53
48
  //# sourceMappingURL=MarkerIntegrityValidator.js.map