@uapkg/cli 1.1.8 → 1.1.9

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 (297) hide show
  1. package/dist/app/CompositionRoot.d.ts +47 -0
  2. package/dist/app/CompositionRoot.d.ts.map +1 -0
  3. package/dist/app/CompositionRoot.js +95 -0
  4. package/dist/app/CompositionRoot.js.map +1 -0
  5. package/dist/app/UAPKGApplication.d.ts +14 -0
  6. package/dist/app/UAPKGApplication.d.ts.map +1 -0
  7. package/dist/app/UAPKGApplication.js +111 -0
  8. package/dist/app/UAPKGApplication.js.map +1 -0
  9. package/dist/cli/UAPKGCommandLine.d.ts +166 -0
  10. package/dist/cli/UAPKGCommandLine.d.ts.map +1 -0
  11. package/dist/cli/UAPKGCommandLine.js +172 -0
  12. package/dist/cli/UAPKGCommandLine.js.map +1 -0
  13. package/dist/cli/parseCommandLine.d.ts +2 -0
  14. package/dist/cli/parseCommandLine.d.ts.map +1 -0
  15. package/dist/cli/parseCommandLine.js +6 -0
  16. package/dist/cli/parseCommandLine.js.map +1 -0
  17. package/dist/cli/parsing/UAPKGCommandLineParser.d.ts +8 -0
  18. package/dist/cli/parsing/UAPKGCommandLineParser.d.ts.map +1 -0
  19. package/dist/cli/parsing/UAPKGCommandLineParser.js +25 -0
  20. package/dist/cli/parsing/UAPKGCommandLineParser.js.map +1 -0
  21. package/dist/cli/parsing/UAPKGParserRegistry.d.ts +11 -0
  22. package/dist/cli/parsing/UAPKGParserRegistry.d.ts.map +1 -0
  23. package/dist/cli/parsing/UAPKGParserRegistry.js +39 -0
  24. package/dist/cli/parsing/UAPKGParserRegistry.js.map +1 -0
  25. package/dist/cli/parsing/contracts/UAPKGCommandModule.d.ts +9 -0
  26. package/dist/cli/parsing/contracts/UAPKGCommandModule.d.ts.map +1 -0
  27. package/dist/cli/parsing/contracts/UAPKGCommandModule.js +2 -0
  28. package/dist/cli/parsing/contracts/UAPKGCommandModule.js.map +1 -0
  29. package/dist/cli/parsing/modules/AddCommandModule.d.ts +7 -0
  30. package/dist/cli/parsing/modules/AddCommandModule.d.ts.map +1 -0
  31. package/dist/cli/parsing/modules/AddCommandModule.js +37 -0
  32. package/dist/cli/parsing/modules/AddCommandModule.js.map +1 -0
  33. package/dist/cli/parsing/modules/ConfigCommandModule.d.ts +7 -0
  34. package/dist/cli/parsing/modules/ConfigCommandModule.d.ts.map +1 -0
  35. package/dist/cli/parsing/modules/ConfigCommandModule.js +84 -0
  36. package/dist/cli/parsing/modules/ConfigCommandModule.js.map +1 -0
  37. package/dist/cli/parsing/modules/InitCommandModule.d.ts +7 -0
  38. package/dist/cli/parsing/modules/InitCommandModule.d.ts.map +1 -0
  39. package/dist/cli/parsing/modules/InitCommandModule.js +23 -0
  40. package/dist/cli/parsing/modules/InitCommandModule.js.map +1 -0
  41. package/dist/cli/parsing/modules/InstallCommandModule.d.ts +7 -0
  42. package/dist/cli/parsing/modules/InstallCommandModule.d.ts.map +1 -0
  43. package/dist/cli/parsing/modules/InstallCommandModule.js +29 -0
  44. package/dist/cli/parsing/modules/InstallCommandModule.js.map +1 -0
  45. package/dist/cli/parsing/modules/ListCommandModule.d.ts +7 -0
  46. package/dist/cli/parsing/modules/ListCommandModule.d.ts.map +1 -0
  47. package/dist/cli/parsing/modules/ListCommandModule.js +16 -0
  48. package/dist/cli/parsing/modules/ListCommandModule.js.map +1 -0
  49. package/dist/cli/parsing/modules/OutdatedCommandModule.d.ts +7 -0
  50. package/dist/cli/parsing/modules/OutdatedCommandModule.d.ts.map +1 -0
  51. package/dist/cli/parsing/modules/OutdatedCommandModule.js +17 -0
  52. package/dist/cli/parsing/modules/OutdatedCommandModule.js.map +1 -0
  53. package/dist/cli/parsing/modules/PackCommandModule.d.ts +7 -0
  54. package/dist/cli/parsing/modules/PackCommandModule.d.ts.map +1 -0
  55. package/dist/cli/parsing/modules/PackCommandModule.js +29 -0
  56. package/dist/cli/parsing/modules/PackCommandModule.js.map +1 -0
  57. package/dist/cli/parsing/modules/ProjectGetNameCommandModule.d.ts +7 -0
  58. package/dist/cli/parsing/modules/ProjectGetNameCommandModule.d.ts.map +1 -0
  59. package/dist/cli/parsing/modules/ProjectGetNameCommandModule.js +12 -0
  60. package/dist/cli/parsing/modules/ProjectGetNameCommandModule.js.map +1 -0
  61. package/dist/cli/parsing/modules/RegistryCommandModule.d.ts +7 -0
  62. package/dist/cli/parsing/modules/RegistryCommandModule.d.ts.map +1 -0
  63. package/dist/cli/parsing/modules/RegistryCommandModule.js +92 -0
  64. package/dist/cli/parsing/modules/RegistryCommandModule.js.map +1 -0
  65. package/dist/cli/parsing/modules/RemoveCommandModule.d.ts +7 -0
  66. package/dist/cli/parsing/modules/RemoveCommandModule.d.ts.map +1 -0
  67. package/dist/cli/parsing/modules/RemoveCommandModule.js +15 -0
  68. package/dist/cli/parsing/modules/RemoveCommandModule.js.map +1 -0
  69. package/dist/cli/parsing/modules/UpdateCommandModule.d.ts +7 -0
  70. package/dist/cli/parsing/modules/UpdateCommandModule.d.ts.map +1 -0
  71. package/dist/cli/parsing/modules/UpdateCommandModule.js +26 -0
  72. package/dist/cli/parsing/modules/UpdateCommandModule.js.map +1 -0
  73. package/dist/cli/parsing/modules/WhyCommandModule.d.ts +7 -0
  74. package/dist/cli/parsing/modules/WhyCommandModule.d.ts.map +1 -0
  75. package/dist/cli/parsing/modules/WhyCommandModule.js +15 -0
  76. package/dist/cli/parsing/modules/WhyCommandModule.js.map +1 -0
  77. package/dist/cli/parsing/modules/sharedOptions.d.ts +8 -0
  78. package/dist/cli/parsing/modules/sharedOptions.d.ts.map +1 -0
  79. package/dist/cli/parsing/modules/sharedOptions.js +26 -0
  80. package/dist/cli/parsing/modules/sharedOptions.js.map +1 -0
  81. package/dist/cli/runUAPKGCLI.d.ts +2 -0
  82. package/dist/cli/runUAPKGCLI.d.ts.map +1 -0
  83. package/dist/cli/runUAPKGCLI.js +7 -0
  84. package/dist/cli/runUAPKGCLI.js.map +1 -0
  85. package/dist/cli.d.ts +3 -0
  86. package/dist/cli.d.ts.map +1 -0
  87. package/dist/cli.js +18 -0
  88. package/dist/cli.js.map +1 -0
  89. package/dist/commands/AddCommand.d.ts +26 -0
  90. package/dist/commands/AddCommand.d.ts.map +1 -0
  91. package/dist/commands/AddCommand.js +55 -0
  92. package/dist/commands/AddCommand.js.map +1 -0
  93. package/dist/commands/Command.d.ts +4 -0
  94. package/dist/commands/Command.d.ts.map +1 -0
  95. package/dist/commands/Command.js +2 -0
  96. package/dist/commands/Command.js.map +1 -0
  97. package/dist/commands/ConfigCommand.d.ts +28 -0
  98. package/dist/commands/ConfigCommand.d.ts.map +1 -0
  99. package/dist/commands/ConfigCommand.js +187 -0
  100. package/dist/commands/ConfigCommand.js.map +1 -0
  101. package/dist/commands/InitCommand.d.ts +19 -0
  102. package/dist/commands/InitCommand.d.ts.map +1 -0
  103. package/dist/commands/InitCommand.js +61 -0
  104. package/dist/commands/InitCommand.js.map +1 -0
  105. package/dist/commands/InstallCommand.d.ts +30 -0
  106. package/dist/commands/InstallCommand.d.ts.map +1 -0
  107. package/dist/commands/InstallCommand.js +97 -0
  108. package/dist/commands/InstallCommand.js.map +1 -0
  109. package/dist/commands/ListCommand.d.ts +20 -0
  110. package/dist/commands/ListCommand.d.ts.map +1 -0
  111. package/dist/commands/ListCommand.js +83 -0
  112. package/dist/commands/ListCommand.js.map +1 -0
  113. package/dist/commands/OutdatedCommand.d.ts +20 -0
  114. package/dist/commands/OutdatedCommand.d.ts.map +1 -0
  115. package/dist/commands/OutdatedCommand.js +42 -0
  116. package/dist/commands/OutdatedCommand.js.map +1 -0
  117. package/dist/commands/PackCommand.d.ts +13 -0
  118. package/dist/commands/PackCommand.d.ts.map +1 -0
  119. package/dist/commands/PackCommand.js +22 -0
  120. package/dist/commands/PackCommand.js.map +1 -0
  121. package/dist/commands/PostinstallCandidateBuilder.d.ts +25 -0
  122. package/dist/commands/PostinstallCandidateBuilder.d.ts.map +1 -0
  123. package/dist/commands/PostinstallCandidateBuilder.js +41 -0
  124. package/dist/commands/PostinstallCandidateBuilder.js.map +1 -0
  125. package/dist/commands/ProjectGetNameCommand.d.ts +14 -0
  126. package/dist/commands/ProjectGetNameCommand.d.ts.map +1 -0
  127. package/dist/commands/ProjectGetNameCommand.js +26 -0
  128. package/dist/commands/ProjectGetNameCommand.js.map +1 -0
  129. package/dist/commands/RegistryCommand.d.ts +29 -0
  130. package/dist/commands/RegistryCommand.d.ts.map +1 -0
  131. package/dist/commands/RegistryCommand.js +121 -0
  132. package/dist/commands/RegistryCommand.js.map +1 -0
  133. package/dist/commands/RemoveCommand.d.ts +14 -0
  134. package/dist/commands/RemoveCommand.d.ts.map +1 -0
  135. package/dist/commands/RemoveCommand.js +55 -0
  136. package/dist/commands/RemoveCommand.js.map +1 -0
  137. package/dist/commands/UpdateCommand.d.ts +45 -0
  138. package/dist/commands/UpdateCommand.d.ts.map +1 -0
  139. package/dist/commands/UpdateCommand.js +113 -0
  140. package/dist/commands/UpdateCommand.js.map +1 -0
  141. package/dist/commands/WhyCommand.d.ts +21 -0
  142. package/dist/commands/WhyCommand.d.ts.map +1 -0
  143. package/dist/commands/WhyCommand.js +46 -0
  144. package/dist/commands/WhyCommand.js.map +1 -0
  145. package/dist/commands/add/DependencyAddResolver.d.ts +18 -0
  146. package/dist/commands/add/DependencyAddResolver.d.ts.map +1 -0
  147. package/dist/commands/add/DependencyAddResolver.js +36 -0
  148. package/dist/commands/add/DependencyAddResolver.js.map +1 -0
  149. package/dist/index.d.ts +26 -0
  150. package/dist/index.d.ts.map +1 -0
  151. package/dist/index.js +39 -0
  152. package/dist/index.js.map +1 -0
  153. package/dist/postinstall/api/PostinstallDsl.d.ts +44 -0
  154. package/dist/postinstall/api/PostinstallDsl.d.ts.map +1 -0
  155. package/dist/postinstall/api/PostinstallDsl.js +39 -0
  156. package/dist/postinstall/api/PostinstallDsl.js.map +1 -0
  157. package/dist/postinstall/api/definePostinstall.d.ts +18 -0
  158. package/dist/postinstall/api/definePostinstall.d.ts.map +1 -0
  159. package/dist/postinstall/api/definePostinstall.js +19 -0
  160. package/dist/postinstall/api/definePostinstall.js.map +1 -0
  161. package/dist/postinstall/index.d.ts +26 -0
  162. package/dist/postinstall/index.d.ts.map +1 -0
  163. package/dist/postinstall/index.js +37 -0
  164. package/dist/postinstall/index.js.map +1 -0
  165. package/dist/postinstall/loader/EntryResolver.d.ts +20 -0
  166. package/dist/postinstall/loader/EntryResolver.d.ts.map +1 -0
  167. package/dist/postinstall/loader/EntryResolver.js +35 -0
  168. package/dist/postinstall/loader/EntryResolver.js.map +1 -0
  169. package/dist/postinstall/loader/EsbuildTranspiler.d.ts +18 -0
  170. package/dist/postinstall/loader/EsbuildTranspiler.d.ts.map +1 -0
  171. package/dist/postinstall/loader/EsbuildTranspiler.js +58 -0
  172. package/dist/postinstall/loader/EsbuildTranspiler.js.map +1 -0
  173. package/dist/postinstall/loader/ExportValidator.d.ts +15 -0
  174. package/dist/postinstall/loader/ExportValidator.d.ts.map +1 -0
  175. package/dist/postinstall/loader/ExportValidator.js +34 -0
  176. package/dist/postinstall/loader/ExportValidator.js.map +1 -0
  177. package/dist/postinstall/loader/ModuleImporter.d.ts +29 -0
  178. package/dist/postinstall/loader/ModuleImporter.d.ts.map +1 -0
  179. package/dist/postinstall/loader/ModuleImporter.js +60 -0
  180. package/dist/postinstall/loader/ModuleImporter.js.map +1 -0
  181. package/dist/postinstall/loader/PostinstallLoader.d.ts +32 -0
  182. package/dist/postinstall/loader/PostinstallLoader.d.ts.map +1 -0
  183. package/dist/postinstall/loader/PostinstallLoader.js +60 -0
  184. package/dist/postinstall/loader/PostinstallLoader.js.map +1 -0
  185. package/dist/postinstall/markers/MarkerBlockEditor.d.ts +30 -0
  186. package/dist/postinstall/markers/MarkerBlockEditor.d.ts.map +1 -0
  187. package/dist/postinstall/markers/MarkerBlockEditor.js +46 -0
  188. package/dist/postinstall/markers/MarkerBlockEditor.js.map +1 -0
  189. package/dist/postinstall/markers/MarkerBlockService.d.ts +24 -0
  190. package/dist/postinstall/markers/MarkerBlockService.d.ts.map +1 -0
  191. package/dist/postinstall/markers/MarkerBlockService.js +46 -0
  192. package/dist/postinstall/markers/MarkerBlockService.js.map +1 -0
  193. package/dist/postinstall/markers/MarkerIntegrityValidator.d.ts +29 -0
  194. package/dist/postinstall/markers/MarkerIntegrityValidator.d.ts.map +1 -0
  195. package/dist/postinstall/markers/MarkerIntegrityValidator.js +53 -0
  196. package/dist/postinstall/markers/MarkerIntegrityValidator.js.map +1 -0
  197. package/dist/postinstall/policy/PostinstallPolicyGate.d.ts +36 -0
  198. package/dist/postinstall/policy/PostinstallPolicyGate.d.ts.map +1 -0
  199. package/dist/postinstall/policy/PostinstallPolicyGate.js +57 -0
  200. package/dist/postinstall/policy/PostinstallPolicyGate.js.map +1 -0
  201. package/dist/postinstall/runner/PostinstallOrchestrator.d.ts +71 -0
  202. package/dist/postinstall/runner/PostinstallOrchestrator.d.ts.map +1 -0
  203. package/dist/postinstall/runner/PostinstallOrchestrator.js +172 -0
  204. package/dist/postinstall/runner/PostinstallOrchestrator.js.map +1 -0
  205. package/dist/postinstall/unreal/BuildCsInjector.d.ts +23 -0
  206. package/dist/postinstall/unreal/BuildCsInjector.d.ts.map +1 -0
  207. package/dist/postinstall/unreal/BuildCsInjector.js +55 -0
  208. package/dist/postinstall/unreal/BuildCsInjector.js.map +1 -0
  209. package/dist/postinstall/unreal/CSharpInjectionEngine.d.ts +22 -0
  210. package/dist/postinstall/unreal/CSharpInjectionEngine.d.ts.map +1 -0
  211. package/dist/postinstall/unreal/CSharpInjectionEngine.js +61 -0
  212. package/dist/postinstall/unreal/CSharpInjectionEngine.js.map +1 -0
  213. package/dist/postinstall/unreal/CSharpStructureAnalyzer.d.ts +22 -0
  214. package/dist/postinstall/unreal/CSharpStructureAnalyzer.d.ts.map +1 -0
  215. package/dist/postinstall/unreal/CSharpStructureAnalyzer.js +130 -0
  216. package/dist/postinstall/unreal/CSharpStructureAnalyzer.js.map +1 -0
  217. package/dist/postinstall/unreal/CSharpStructures.d.ts +19 -0
  218. package/dist/postinstall/unreal/CSharpStructures.d.ts.map +1 -0
  219. package/dist/postinstall/unreal/CSharpStructures.js +2 -0
  220. package/dist/postinstall/unreal/CSharpStructures.js.map +1 -0
  221. package/dist/postinstall/unreal/CSharpWrapperFactory.d.ts +26 -0
  222. package/dist/postinstall/unreal/CSharpWrapperFactory.d.ts.map +1 -0
  223. package/dist/postinstall/unreal/CSharpWrapperFactory.js +60 -0
  224. package/dist/postinstall/unreal/CSharpWrapperFactory.js.map +1 -0
  225. package/dist/postinstall/unreal/PluginHash.d.ts +8 -0
  226. package/dist/postinstall/unreal/PluginHash.d.ts.map +1 -0
  227. package/dist/postinstall/unreal/PluginHash.js +13 -0
  228. package/dist/postinstall/unreal/PluginHash.js.map +1 -0
  229. package/dist/postinstall/unreal/PrettyParseError.d.ts +15 -0
  230. package/dist/postinstall/unreal/PrettyParseError.d.ts.map +1 -0
  231. package/dist/postinstall/unreal/PrettyParseError.js +43 -0
  232. package/dist/postinstall/unreal/PrettyParseError.js.map +1 -0
  233. package/dist/postinstall/unreal/ProjectFileLocator.d.ts +20 -0
  234. package/dist/postinstall/unreal/ProjectFileLocator.d.ts.map +1 -0
  235. package/dist/postinstall/unreal/ProjectFileLocator.js +53 -0
  236. package/dist/postinstall/unreal/ProjectFileLocator.js.map +1 -0
  237. package/dist/postinstall/unreal/TargetCsInjector.d.ts +23 -0
  238. package/dist/postinstall/unreal/TargetCsInjector.d.ts.map +1 -0
  239. package/dist/postinstall/unreal/TargetCsInjector.js +55 -0
  240. package/dist/postinstall/unreal/TargetCsInjector.js.map +1 -0
  241. package/dist/postinstall/unreal/UProjectInjector.d.ts +12 -0
  242. package/dist/postinstall/unreal/UProjectInjector.d.ts.map +1 -0
  243. package/dist/postinstall/unreal/UProjectInjector.js +54 -0
  244. package/dist/postinstall/unreal/UProjectInjector.js.map +1 -0
  245. package/dist/postinstall/unreal/UProjectMetadataReader.d.ts +9 -0
  246. package/dist/postinstall/unreal/UProjectMetadataReader.d.ts.map +1 -0
  247. package/dist/postinstall/unreal/UProjectMetadataReader.js +20 -0
  248. package/dist/postinstall/unreal/UProjectMetadataReader.js.map +1 -0
  249. package/dist/postinstall/unreal/UnrealSourceCatalog.d.ts +23 -0
  250. package/dist/postinstall/unreal/UnrealSourceCatalog.d.ts.map +1 -0
  251. package/dist/postinstall/unreal/UnrealSourceCatalog.js +52 -0
  252. package/dist/postinstall/unreal/UnrealSourceCatalog.js.map +1 -0
  253. package/dist/prompts/InkPromptService.d.ts +8 -0
  254. package/dist/prompts/InkPromptService.d.ts.map +1 -0
  255. package/dist/prompts/InkPromptService.js +56 -0
  256. package/dist/prompts/InkPromptService.js.map +1 -0
  257. package/dist/prompts/ProjectContextDetector.d.ts +10 -0
  258. package/dist/prompts/ProjectContextDetector.d.ts.map +1 -0
  259. package/dist/prompts/ProjectContextDetector.js +27 -0
  260. package/dist/prompts/ProjectContextDetector.js.map +1 -0
  261. package/dist/prompts/PromptService.d.ts +9 -0
  262. package/dist/prompts/PromptService.d.ts.map +1 -0
  263. package/dist/prompts/PromptService.js +8 -0
  264. package/dist/prompts/PromptService.js.map +1 -0
  265. package/dist/reporting/DiagnosticDeduplicator.d.ts +11 -0
  266. package/dist/reporting/DiagnosticDeduplicator.d.ts.map +1 -0
  267. package/dist/reporting/DiagnosticDeduplicator.js +37 -0
  268. package/dist/reporting/DiagnosticDeduplicator.js.map +1 -0
  269. package/dist/reporting/DiagnosticRenderer.d.ts +18 -0
  270. package/dist/reporting/DiagnosticRenderer.d.ts.map +1 -0
  271. package/dist/reporting/DiagnosticRenderer.js +2 -0
  272. package/dist/reporting/DiagnosticRenderer.js.map +1 -0
  273. package/dist/reporting/DiagnosticReporter.d.ts +23 -0
  274. package/dist/reporting/DiagnosticReporter.d.ts.map +1 -0
  275. package/dist/reporting/DiagnosticReporter.js +41 -0
  276. package/dist/reporting/DiagnosticReporter.js.map +1 -0
  277. package/dist/reporting/InkDiagnosticRenderer.d.ts +21 -0
  278. package/dist/reporting/InkDiagnosticRenderer.d.ts.map +1 -0
  279. package/dist/reporting/InkDiagnosticRenderer.js +44 -0
  280. package/dist/reporting/InkDiagnosticRenderer.js.map +1 -0
  281. package/dist/reporting/InstallProgressReporter.d.ts +34 -0
  282. package/dist/reporting/InstallProgressReporter.d.ts.map +1 -0
  283. package/dist/reporting/InstallProgressReporter.js +49 -0
  284. package/dist/reporting/InstallProgressReporter.js.map +1 -0
  285. package/dist/reporting/JsonReporter.d.ts +26 -0
  286. package/dist/reporting/JsonReporter.d.ts.map +1 -0
  287. package/dist/reporting/JsonReporter.js +16 -0
  288. package/dist/reporting/JsonReporter.js.map +1 -0
  289. package/dist/reporting/TextDiagnosticRenderer.d.ts +20 -0
  290. package/dist/reporting/TextDiagnosticRenderer.d.ts.map +1 -0
  291. package/dist/reporting/TextDiagnosticRenderer.js +30 -0
  292. package/dist/reporting/TextDiagnosticRenderer.js.map +1 -0
  293. package/dist/reporting/TextSink.d.ts +21 -0
  294. package/dist/reporting/TextSink.d.ts.map +1 -0
  295. package/dist/reporting/TextSink.js +25 -0
  296. package/dist/reporting/TextSink.js.map +1 -0
  297. package/package.json +12 -12
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WhyCommand.js","sourceRoot":"","sources":["../../src/commands/WhyCommand.ts"],"names":[],"mappings":"AASA;;;;;;;GAOG;AACH,MAAM,OAAO,UAAU;IAEF;IACA;IAFnB,YACmB,IAAqB,EACrB,OAA0B;QAD1B,SAAI,GAAJ,IAAI,CAAiB;QACrB,YAAO,GAAP,OAAO,CAAmB;IAC1C,CAAC;IAEG,KAAK,CAAC,OAAO;QAClB,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,MAAqB,CAAC;QAClD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAElE,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,KAAK,MAAM,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AAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACzE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC;QAC1C,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;CACF"}
@@ -0,0 +1,18 @@
1
+ import type { PackageSpec } from '@uapkg/common-schema';
2
+ import { type Result } from '@uapkg/diagnostics';
3
+ import type { Dependency } from '@uapkg/package-manifest-schema';
4
+ import type { CompositionRoot } from '../../app/CompositionRoot.js';
5
+ export interface ResolvedAddDependency {
6
+ readonly dependency: Dependency;
7
+ readonly resolvedVersion: string;
8
+ }
9
+ /**
10
+ * Resolves an `add` request against the selected registry before mutating the
11
+ * manifest, ensuring package and version existence.
12
+ */
13
+ export declare class DependencyAddResolver {
14
+ private readonly root;
15
+ constructor(root: CompositionRoot);
16
+ resolve(spec: PackageSpec, registryNameInput?: string): Promise<Result<ResolvedAddDependency>>;
17
+ }
18
+ //# sourceMappingURL=DependencyAddResolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DependencyAddResolver.d.ts","sourceRoot":"","sources":["../../../src/commands/add/DependencyAddResolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAgB,MAAM,sBAAsB,CAAC;AAEtE,OAAO,EAA8C,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC7F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;CAClC;AAED;;;GAGG;AACH,qBAAa,qBAAqB;IACb,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,eAAe;IAE5C,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;CAgC5G"}
@@ -0,0 +1,36 @@
1
+ import { RegistryNameSchema, VersionRangeSchema } from '@uapkg/common-schema';
2
+ import { createRegistryNotFoundDiagnostic, fail, ok } from '@uapkg/diagnostics';
3
+ /**
4
+ * Resolves an `add` request against the selected registry before mutating the
5
+ * manifest, ensuring package and version existence.
6
+ */
7
+ export class DependencyAddResolver {
8
+ root;
9
+ constructor(root) {
10
+ this.root = root;
11
+ }
12
+ async resolve(spec, registryNameInput) {
13
+ const registryCandidate = registryNameInput ?? this.root.config.get('registry') ?? 'default';
14
+ const registryNameResult = RegistryNameSchema.safeParse(registryCandidate);
15
+ if (!registryNameResult.success) {
16
+ return fail([createRegistryNotFoundDiagnostic(registryCandidate)]);
17
+ }
18
+ const registryName = registryNameResult.data;
19
+ const registryResult = this.root.registryCore.getOrCreateRegistry(registryName);
20
+ if (!registryResult.ok)
21
+ return registryResult;
22
+ const requestedRange = spec.range ?? '*';
23
+ const resolution = await registryResult.value.resolvePackage(spec.name, requestedRange, registryName);
24
+ if (!resolution.ok)
25
+ return resolution;
26
+ const dependencyRange = spec.range ?? VersionRangeSchema.parse(`^${resolution.value.version}`);
27
+ return ok({
28
+ dependency: {
29
+ version: dependencyRange,
30
+ registry: registryName,
31
+ },
32
+ resolvedVersion: resolution.value.version,
33
+ }, resolution.diagnostics);
34
+ }
35
+ }
36
+ //# sourceMappingURL=DependencyAddResolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DependencyAddResolver.js","sourceRoot":"","sources":["../../../src/commands/add/DependencyAddResolver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,gCAAgC,EAAE,IAAI,EAAE,EAAE,EAAe,MAA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OAAO;SAC1C,EACD,UAAU,CAAC,WAAW,CACvB,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,26 @@
1
+ export { CompositionRoot, type CompositionRootOptions } from './app/CompositionRoot.js';
2
+ export { UAPKGApplication } from './app/UAPKGApplication.js';
3
+ export { parseUAPKGCommandLine } from './cli/parseCommandLine.js';
4
+ export { runUAPKGCLI } from './cli/runUAPKGCLI.js';
5
+ export type { UAPKGCommandLine } from './cli/UAPKGCommandLine.js';
6
+ export { createUAPKGCommandLineFactory, UAPKGCommandLineFactory } from './cli/UAPKGCommandLine.js';
7
+ export { AddCommand, type AddCommandOptions } from './commands/AddCommand.js';
8
+ export { ConfigCommand } from './commands/ConfigCommand.js';
9
+ export { InitCommand, type InitCommandOptions } from './commands/InitCommand.js';
10
+ export { InstallCommand, type InstallCommandOptions } from './commands/InstallCommand.js';
11
+ export { ListCommand, type ListCommandOptions } from './commands/ListCommand.js';
12
+ export { OutdatedCommand, type OutdatedCommandOptions } from './commands/OutdatedCommand.js';
13
+ export { PackCommand } from './commands/PackCommand.js';
14
+ export { ProjectGetNameCommand, type ProjectGetNameCommandOptions, } from './commands/ProjectGetNameCommand.js';
15
+ export { RegistryCommand, type RegistryCommandOptions } from './commands/RegistryCommand.js';
16
+ export { RemoveCommand, type RemoveCommandOptions } from './commands/RemoveCommand.js';
17
+ export { UpdateCommand, type UpdateCommandOptions } from './commands/UpdateCommand.js';
18
+ export { WhyCommand, type WhyCommandOptions } from './commands/WhyCommand.js';
19
+ export * from './postinstall/index.js';
20
+ export { InkPromptService } from './prompts/InkPromptService.js';
21
+ export { type ProjectContextDetection, ProjectContextDetector, } from './prompts/ProjectContextDetector.js';
22
+ export type { PromptService, SelectOption } from './prompts/PromptService.js';
23
+ export { DiagnosticReporter } from './reporting/DiagnosticReporter.js';
24
+ export { InstallProgressReporter } from './reporting/InstallProgressReporter.js';
25
+ export { type JsonEnvelope, JsonReporter } from './reporting/JsonReporter.js';
26
+ //# sourceMappingURL=index.d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EAAE,MAAM,0BAA0B,CAAC;AAE9E,cAAc,wBAAwB,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EACL,KAAK,uBAAuB,EAC5B,sBAAsB,GACvB,MAAM,qCAAqC,CAAC;AAC7C,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,KAAK,YAAY,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,39 @@
1
+ // ---------------------------------------------------------------------------
2
+ // @uapkg/uapkg — public API
3
+ //
4
+ // Phase 8 + Phase 10 final surface. Legacy exports (`UAPKGManifest`,
5
+ // `FileManifestRepository`, `DependencyGraphBuilder`, `TOMLLockfileRepository`,
6
+ // `DependencyInstaller`, `SafetyPolicy`, etc.) were removed in Phase 10; use
7
+ // `@uapkg/package-manifest` + `@uapkg/package-manifest-schema` instead.
8
+ // ---------------------------------------------------------------------------
9
+ // Application dispatcher + composition root
10
+ export { CompositionRoot } from './app/CompositionRoot.js';
11
+ export { UAPKGApplication } from './app/UAPKGApplication.js';
12
+ // CLI
13
+ export { parseUAPKGCommandLine } from './cli/parseCommandLine.js';
14
+ export { runUAPKGCLI } from './cli/runUAPKGCLI.js';
15
+ export { createUAPKGCommandLineFactory, UAPKGCommandLineFactory } from './cli/UAPKGCommandLine.js';
16
+ // Commands — new surface
17
+ export { AddCommand } from './commands/AddCommand.js';
18
+ // Commands — retained, ported onto CompositionRoot in Phase 10
19
+ export { ConfigCommand } from './commands/ConfigCommand.js';
20
+ export { InitCommand } from './commands/InitCommand.js';
21
+ export { InstallCommand } from './commands/InstallCommand.js';
22
+ export { ListCommand } from './commands/ListCommand.js';
23
+ export { OutdatedCommand } from './commands/OutdatedCommand.js';
24
+ export { PackCommand } from './commands/PackCommand.js';
25
+ export { ProjectGetNameCommand, } from './commands/ProjectGetNameCommand.js';
26
+ export { RegistryCommand } from './commands/RegistryCommand.js';
27
+ export { RemoveCommand } from './commands/RemoveCommand.js';
28
+ export { UpdateCommand } from './commands/UpdateCommand.js';
29
+ export { WhyCommand } from './commands/WhyCommand.js';
30
+ // Postinstall — new subsystem (Phase 7)
31
+ export * from './postinstall/index.js';
32
+ // Prompt abstractions (used by init)
33
+ export { InkPromptService } from './prompts/InkPromptService.js';
34
+ export { ProjectContextDetector, } from './prompts/ProjectContextDetector.js';
35
+ // Reporting
36
+ export { DiagnosticReporter } from './reporting/DiagnosticReporter.js';
37
+ export { InstallProgressReporter } from './reporting/InstallProgressReporter.js';
38
+ export { JsonReporter } from './reporting/JsonReporter.js';
39
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,4BAA4B;AAC5B,EAAE;AACF,qEAAqE;AACrE,gFAAgF;AAChF,6EAA6E;AAC7E,wEAAwE;AACxE,8EAA8E;AAE9E,4CAA4C;AAC5C,OAAO,EAAE,eAAe,EAA+B,MAAM,0BAA0B,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,MAAM;AACN,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAE,6BAA6B,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEnG,yBAAyB;AACzB,OAAO,EAAE,UAAU,EAA0B,MAAM,0BAA0B,CAAC;AAC9E,+DAA+D;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAA2B,MAAM,2BAA2B,CAAC;AACjF,OAAO,EAAE,cAAc,EAA8B,MAAM,8BAA8B,CAAC;AAC1F,OAAO,EAAE,WAAW,EAA2B,MAAM,2BAA2B,CAAC;AACjF,OAAO,EAAE,eAAe,EAA+B,MAAM,+BAA+B,CAAC;AAC7F,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EACL,qBAAqB,GAEtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,eAAe,EAA+B,MAAM,+BAA+B,CAAC;AAC7F,OAAO,EAAE,aAAa,EAA6B,MAAM,6BAA6B,CAAC;AACvF,OAAO,EAAE,aAAa,EAA6B,MAAM,6BAA6B,CAAC;AACvF,OAAO,EAAE,UAAU,EAA0B,MAAM,0BAA0B,CAAC;AAC9E,wCAAwC;AACxC,cAAc,wBAAwB,CAAC;AACvC,qCAAqC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAEL,sBAAsB,GACvB,MAAM,qCAAqC,CAAC;AAE7C,YAAY;AACZ,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAqB,YAAY,EAAE,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,44 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zone-level content injected into a single Unreal build file (Build.cs or Target.cs).
4
+ *
5
+ * - `includes`: raw C# `using ...;` lines appended to the file's using block.
6
+ * - `classBody`: raw C# members placed inside the target class; uapkg wraps them
7
+ * in a hashed helper class and inserts a single `Apply(this)` call into the
8
+ * constructor. The content must compile as a member list.
9
+ */
10
+ export declare const ZoneSchema: z.ZodObject<{
11
+ includes: z.ZodOptional<z.ZodString>;
12
+ classBody: z.ZodOptional<z.ZodString>;
13
+ }, z.core.$strict>;
14
+ /**
15
+ * Project-level setup: plugins to enable in the host project's `.uproject`.
16
+ */
17
+ export declare const ProjectSetupSchema: z.ZodObject<{
18
+ plugins: z.ZodOptional<z.ZodArray<z.ZodString>>;
19
+ }, z.core.$strict>;
20
+ /**
21
+ * The authoritative shape of `export default definePostinstall({...})`.
22
+ *
23
+ * Scopes:
24
+ * - `setupModules`: applied to each *project postinstall module* Build.cs file.
25
+ * - `setupTargets`: applied to every *.Target.cs in the host project.
26
+ * - `setupProject`: edits the host project's `.uproject`.
27
+ */
28
+ export declare const PostinstallDefinitionSchema: z.ZodObject<{
29
+ setupModules: z.ZodOptional<z.ZodObject<{
30
+ includes: z.ZodOptional<z.ZodString>;
31
+ classBody: z.ZodOptional<z.ZodString>;
32
+ }, z.core.$strict>>;
33
+ setupTargets: z.ZodOptional<z.ZodObject<{
34
+ includes: z.ZodOptional<z.ZodString>;
35
+ classBody: z.ZodOptional<z.ZodString>;
36
+ }, z.core.$strict>>;
37
+ setupProject: z.ZodOptional<z.ZodObject<{
38
+ plugins: z.ZodOptional<z.ZodArray<z.ZodString>>;
39
+ }, z.core.$strict>>;
40
+ }, z.core.$strict>;
41
+ export type ZoneDefinition = z.infer<typeof ZoneSchema>;
42
+ export type ProjectSetupDefinition = z.infer<typeof ProjectSetupSchema>;
43
+ export type PostinstallDefinition = z.infer<typeof PostinstallDefinitionSchema>;
44
+ //# sourceMappingURL=PostinstallDsl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PostinstallDsl.d.ts","sourceRoot":"","sources":["../../../src/postinstall/api/PostinstallDsl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU;;;kBAKZ,CAAC;AAEZ;;GAEG;AACH,eAAO,MAAM,kBAAkB;;kBAIpB,CAAC;AAEZ;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;kBAM7B,CAAC;AAEZ,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AACxD,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACxE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
@@ -0,0 +1,39 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zone-level content injected into a single Unreal build file (Build.cs or Target.cs).
4
+ *
5
+ * - `includes`: raw C# `using ...;` lines appended to the file's using block.
6
+ * - `classBody`: raw C# members placed inside the target class; uapkg wraps them
7
+ * in a hashed helper class and inserts a single `Apply(this)` call into the
8
+ * constructor. The content must compile as a member list.
9
+ */
10
+ export const ZoneSchema = z
11
+ .object({
12
+ includes: z.string().min(1).optional(),
13
+ classBody: z.string().min(1).optional(),
14
+ })
15
+ .strict();
16
+ /**
17
+ * Project-level setup: plugins to enable in the host project's `.uproject`.
18
+ */
19
+ export const ProjectSetupSchema = z
20
+ .object({
21
+ plugins: z.array(z.string().min(1)).optional(),
22
+ })
23
+ .strict();
24
+ /**
25
+ * The authoritative shape of `export default definePostinstall({...})`.
26
+ *
27
+ * Scopes:
28
+ * - `setupModules`: applied to each *project postinstall module* Build.cs file.
29
+ * - `setupTargets`: applied to every *.Target.cs in the host project.
30
+ * - `setupProject`: edits the host project's `.uproject`.
31
+ */
32
+ export const PostinstallDefinitionSchema = z
33
+ .object({
34
+ setupModules: ZoneSchema.optional(),
35
+ setupTargets: ZoneSchema.optional(),
36
+ setupProject: ProjectSetupSchema.optional(),
37
+ })
38
+ .strict();
39
+ //# sourceMappingURL=PostinstallDsl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PostinstallDsl.js","sourceRoot":"","sources":["../../../src/postinstall/api/PostinstallDsl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC;KACxB,MAAM,CAAC;IACN,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACtC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CACxC,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC;KAChC,MAAM,CAAC;IACN,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC/C,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC;KACzC,MAAM,CAAC;IACN,YAAY,EAAE,UAAU,CAAC,QAAQ,EAAE;IACnC,YAAY,EAAE,UAAU,CAAC,QAAQ,EAAE;IACnC,YAAY,EAAE,kBAAkB,CAAC,QAAQ,EAAE;CAC5C,CAAC;KACD,MAAM,EAAE,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { PostinstallDefinition } from './PostinstallDsl.js';
2
+ /**
3
+ * Identity helper used in user-authored `.uapkg/postinstall.ts` files:
4
+ *
5
+ * ```ts
6
+ * import { definePostinstall } from 'uapkg/postinstall';
7
+ * export default definePostinstall({
8
+ * setupModules: { classBody: '...' },
9
+ * });
10
+ * ```
11
+ *
12
+ * At runtime this is the identity function; at edit time it gives authors
13
+ * full TypeScript autocomplete/validation against {@link PostinstallDefinition}.
14
+ * The loader validates the shape regardless of whether the author used this
15
+ * helper, so it is purely ergonomic.
16
+ */
17
+ export declare function definePostinstall(definition: PostinstallDefinition): PostinstallDefinition;
18
+ //# sourceMappingURL=definePostinstall.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definePostinstall.d.ts","sourceRoot":"","sources":["../../../src/postinstall/api/definePostinstall.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEjE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,qBAAqB,GAAG,qBAAqB,CAE1F"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Identity helper used in user-authored `.uapkg/postinstall.ts` files:
3
+ *
4
+ * ```ts
5
+ * import { definePostinstall } from 'uapkg/postinstall';
6
+ * export default definePostinstall({
7
+ * setupModules: { classBody: '...' },
8
+ * });
9
+ * ```
10
+ *
11
+ * At runtime this is the identity function; at edit time it gives authors
12
+ * full TypeScript autocomplete/validation against {@link PostinstallDefinition}.
13
+ * The loader validates the shape regardless of whether the author used this
14
+ * helper, so it is purely ergonomic.
15
+ */
16
+ export function definePostinstall(definition) {
17
+ return definition;
18
+ }
19
+ //# sourceMappingURL=definePostinstall.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definePostinstall.js","sourceRoot":"","sources":["../../../src/postinstall/api/definePostinstall.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,iBAAiB,CAAC,UAAiC;IACjE,OAAO,UAAU,CAAC;AACpB,CAAC"}
@@ -0,0 +1,26 @@
1
+ export { definePostinstall } from './api/definePostinstall.js';
2
+ export type { PostinstallDefinition, ProjectSetupDefinition, ZoneDefinition } from './api/PostinstallDsl.js';
3
+ export { PostinstallDefinitionSchema, ProjectSetupSchema, ZoneSchema, } from './api/PostinstallDsl.js';
4
+ export { EntryResolver, type PostinstallEntryKind, type ResolvedEntry } from './loader/EntryResolver.js';
5
+ export { EsbuildTranspiler } from './loader/EsbuildTranspiler.js';
6
+ export { ExportValidator } from './loader/ExportValidator.js';
7
+ export { ModuleImporter, type ModuleSource } from './loader/ModuleImporter.js';
8
+ export { type LoadedPostinstall, PostinstallLoader } from './loader/PostinstallLoader.js';
9
+ export { MarkerBlockEditor } from './markers/MarkerBlockEditor.js';
10
+ export { MarkerBlockService } from './markers/MarkerBlockService.js';
11
+ export { type MarkerIntegrityFail, type MarkerIntegrityOk, type MarkerIntegrityResult, MarkerIntegrityValidator, } from './markers/MarkerIntegrityValidator.js';
12
+ export { type PolicyConfigReader, type PolicyDecision, PostinstallPolicyGate, } from './policy/PostinstallPolicyGate.js';
13
+ export { type PostinstallCandidate, PostinstallOrchestrator, type PostinstallOrchestratorInput, type PostinstallReport, } from './runner/PostinstallOrchestrator.js';
14
+ export { BuildCsInjector } from './unreal/BuildCsInjector.js';
15
+ export { CSharpInjectionEngine } from './unreal/CSharpInjectionEngine.js';
16
+ export { CSharpStructureAnalyzer } from './unreal/CSharpStructureAnalyzer.js';
17
+ export type { CSharpFileKind, ParsedClass, ParsedConstructor, ParsedCSharpFile, } from './unreal/CSharpStructures.js';
18
+ export { CSharpWrapperFactory, type WrapperContextType } from './unreal/CSharpWrapperFactory.js';
19
+ export { getPluginHash, getWrapperClassName } from './unreal/PluginHash.js';
20
+ export { PrettyParseError } from './unreal/PrettyParseError.js';
21
+ export { ProjectFileLocator } from './unreal/ProjectFileLocator.js';
22
+ export { TargetCsInjector } from './unreal/TargetCsInjector.js';
23
+ export { type SourceCatalog, UnrealSourceCatalogBuilder } from './unreal/UnrealSourceCatalog.js';
24
+ export { UProjectInjector } from './unreal/UProjectInjector.js';
25
+ export { UProjectMetadataReader } from './unreal/UProjectMetadataReader.js';
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/postinstall/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,YAAY,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC7G,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,UAAU,GACX,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,aAA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AAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,KAAK,aAAa,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AACjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC"}
@@ -0,0 +1,37 @@
1
+ // ---------------------------------------------------------------------------
2
+ // New postinstall subsystem — public surface.
3
+ //
4
+ // The legacy flat files in this directory (PostinstallRunner, BuildCsInjector,
5
+ // etc.) remain in place until Phase 10 prunes them, so `packages/uapkg/src/
6
+ // index.ts` keeps compiling. New consumers (Phase 8 CLI) should import from
7
+ // this barrel only.
8
+ // ---------------------------------------------------------------------------
9
+ export { definePostinstall } from './api/definePostinstall.js';
10
+ export { PostinstallDefinitionSchema, ProjectSetupSchema, ZoneSchema, } from './api/PostinstallDsl.js';
11
+ // Loader
12
+ export { EntryResolver } from './loader/EntryResolver.js';
13
+ export { EsbuildTranspiler } from './loader/EsbuildTranspiler.js';
14
+ export { ExportValidator } from './loader/ExportValidator.js';
15
+ export { ModuleImporter } from './loader/ModuleImporter.js';
16
+ export { PostinstallLoader } from './loader/PostinstallLoader.js';
17
+ // Markers
18
+ export { MarkerBlockEditor } from './markers/MarkerBlockEditor.js';
19
+ export { MarkerBlockService } from './markers/MarkerBlockService.js';
20
+ export { MarkerIntegrityValidator, } from './markers/MarkerIntegrityValidator.js';
21
+ // Policy
22
+ export { PostinstallPolicyGate, } from './policy/PostinstallPolicyGate.js';
23
+ // Runner
24
+ export { PostinstallOrchestrator, } from './runner/PostinstallOrchestrator.js';
25
+ // Unreal
26
+ export { BuildCsInjector } from './unreal/BuildCsInjector.js';
27
+ export { CSharpInjectionEngine } from './unreal/CSharpInjectionEngine.js';
28
+ export { CSharpStructureAnalyzer } from './unreal/CSharpStructureAnalyzer.js';
29
+ export { CSharpWrapperFactory } from './unreal/CSharpWrapperFactory.js';
30
+ export { getPluginHash, getWrapperClassName } from './unreal/PluginHash.js';
31
+ export { PrettyParseError } from './unreal/PrettyParseError.js';
32
+ export { ProjectFileLocator } from './unreal/ProjectFileLocator.js';
33
+ export { TargetCsInjector } from './unreal/TargetCsInjector.js';
34
+ export { UnrealSourceCatalogBuilder } from './unreal/UnrealSourceCatalog.js';
35
+ export { UProjectInjector } from './unreal/UProjectInjector.js';
36
+ export { UProjectMetadataReader } from './unreal/UProjectMetadataReader.js';
37
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/postinstall/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,8CAA8C;AAC9C,EAAE;AACF,+EAA+E;AAC/E,4EAA4E;AAC5E,4EAA4E;AAC5E,oBAAoB;AACpB,8EAA8E;AAE9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG/D,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,UAAU,GACX,MAAM,yBAAyB,CAAC;AAEjC,SAAS;AACT,OAAO,EAAE,aAAa,EAAiD,MAAM,2BAA2B,CAAC;AACzG,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAqB,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAA0B,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAC1F,UAAU;AACV,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAIL,wBAAwB,GACzB,MAAM,uCAAuC,CAAC;AAC/C,SAAS;AACT,OAAO,EAGL,qBAAqB,GACtB,MAAM,mCAAmC,CAAC;AAC3C,SAAS;AACT,OAAO,EAEL,uBAAuB,GAGxB,MAAM,qCAAqC,CAAC;AAC7C,SAAS;AACT,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAO9E,OAAO,EAAE,oBAAoB,EAA2B,MAAM,kCAAkC,CAAC;AACjG,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAsB,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AACjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { type Result } from '@uapkg/diagnostics';
2
+ /** Candidate extensions in resolution order (spec-mandated). */
3
+ declare const CANDIDATE_EXTENSIONS: readonly ["ts", "js", "mjs"];
4
+ export type PostinstallEntryKind = (typeof CANDIDATE_EXTENSIONS)[number];
5
+ export interface ResolvedEntry {
6
+ readonly path: string;
7
+ readonly kind: PostinstallEntryKind;
8
+ }
9
+ /**
10
+ * Locates `.uapkg/postinstall.<ext>` inside a plugin root, enforcing the
11
+ * order `ts → js → mjs`. If the plugin has two or more candidate files an
12
+ * error diagnostic `POSTINSTALL_DUPLICATE_ENTRY` is returned so the user can
13
+ * clean up ambiguity. `ok(null)` means "no postinstall defined" — a valid,
14
+ * silent state.
15
+ */
16
+ export declare class EntryResolver {
17
+ resolve(packageName: string, pluginRoot: string): Result<ResolvedEntry | null>;
18
+ }
19
+ export {};
20
+ //# sourceMappingURL=EntryResolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntryResolver.d.ts","sourceRoot":"","sources":["../../../src/postinstall/loader/EntryResolver.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuD,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEtG,gEAAgE;AAChE,QAAA,MAAM,oBAAoB,8BAA+B,CAAC;AAC1D,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC;CACrC;AAED;;;;;;GAMG;AACH,qBAAa,aAAa;IACjB,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC,aAAa,GAAG,IAAI,CAAC;CAuBtF"}
@@ -0,0 +1,35 @@
1
+ import fs from 'node:fs';
2
+ import * as path from 'node:path';
3
+ import { createPostinstallDuplicateEntryDiagnostic, fail, ok } from '@uapkg/diagnostics';
4
+ /** Candidate extensions in resolution order (spec-mandated). */
5
+ const CANDIDATE_EXTENSIONS = ['ts', 'js', 'mjs'];
6
+ /**
7
+ * Locates `.uapkg/postinstall.<ext>` inside a plugin root, enforcing the
8
+ * order `ts → js → mjs`. If the plugin has two or more candidate files an
9
+ * error diagnostic `POSTINSTALL_DUPLICATE_ENTRY` is returned so the user can
10
+ * clean up ambiguity. `ok(null)` means "no postinstall defined" — a valid,
11
+ * silent state.
12
+ */
13
+ export class EntryResolver {
14
+ resolve(packageName, pluginRoot) {
15
+ const dir = path.join(pluginRoot, '.uapkg');
16
+ if (!fs.existsSync(dir))
17
+ return ok(null);
18
+ const found = [];
19
+ for (const kind of CANDIDATE_EXTENSIONS) {
20
+ const candidate = path.join(dir, `postinstall.${kind}`);
21
+ if (fs.existsSync(candidate) && fs.statSync(candidate).isFile()) {
22
+ found.push({ path: candidate, kind });
23
+ }
24
+ }
25
+ if (found.length === 0)
26
+ return ok(null);
27
+ if (found.length > 1) {
28
+ return fail([
29
+ createPostinstallDuplicateEntryDiagnostic(packageName, found.map((entry) => entry.path)),
30
+ ]);
31
+ }
32
+ return ok(found[0]);
33
+ }
34
+ }
35
+ //# sourceMappingURL=EntryResolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntryResolver.js","sourceRoot":"","sources":["../../../src/postinstall/loader/EntryResolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,yCAAyC,EAAE,IAAI,EAAE,EAAE,EAAe,MAAM,oBAAoB,CAAC;AAEtG,gEAAgE;AAChE,MAAM,oBAAoB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAU,CAAC;AAQ1D;;;;;;GAMG;AACH,MAAM,OAAO,aAAa;IACjB,OAAO,CAAC,WAAmB,EAAE,UAAkB;QACpD,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAC5C,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC;QAEzC,MAAM,KAAK,GAAoB,EAAE,CAAC;QAClC,KAAK,MAAM,IAAI,IAAI,oBAAoB,EAAE,CAAC;YACxC,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,eAAe,IAAI,EAAE,CAAC,CAAC;YACxD,IAAI,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;gBAChE,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YACxC,CAAC;QACH,CAAC;QAED,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACrB,OAAO,IAAI,CAAC;gBACV,yCAAyC,CACvC,WAAW,EACX,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CACjC;aACF,CAAC,CAAC;QACL,CAAC;QACD,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACtB,CAAC;CACF"}
@@ -0,0 +1,18 @@
1
+ import { type Result } from '@uapkg/diagnostics';
2
+ /**
3
+ * Transpiles a single `.ts` postinstall entry into an in-memory ESM bundle.
4
+ *
5
+ * Constraints:
6
+ * * `bundle: false` — we only lower TypeScript to JS; users are expected to
7
+ * import shared modules via `node_modules` which the loader's dynamic
8
+ * import handles natively.
9
+ * * No type-checking. The user's IDE / CI catches type errors; `uapkg` only
10
+ * needs a runnable module.
11
+ * * `platform: node`, `format: esm`, `target: node20`.
12
+ *
13
+ * On failure returns a `POSTINSTALL_ESBUILD_ERROR` diagnostic.
14
+ */
15
+ export declare class EsbuildTranspiler {
16
+ transpile(packageName: string, entryFile: string): Promise<Result<string>>;
17
+ }
18
+ //# sourceMappingURL=EsbuildTranspiler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EsbuildTranspiler.d.ts","sourceRoot":"","sources":["../../../src/postinstall/loader/EsbuildTranspiler.ts"],"names":[],"mappings":"AACA,OAAO,EAAqD,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAGpG;;;;;;;;;;;;GAYG;AACH,qBAAa,iBAAiB;IACf,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;CA+CxF"}
@@ -0,0 +1,58 @@
1
+ import fs from 'node:fs';
2
+ import { createPostinstallEsbuildErrorDiagnostic, fail, ok } from '@uapkg/diagnostics';
3
+ import { build } from 'esbuild';
4
+ /**
5
+ * Transpiles a single `.ts` postinstall entry into an in-memory ESM bundle.
6
+ *
7
+ * Constraints:
8
+ * * `bundle: false` — we only lower TypeScript to JS; users are expected to
9
+ * import shared modules via `node_modules` which the loader's dynamic
10
+ * import handles natively.
11
+ * * No type-checking. The user's IDE / CI catches type errors; `uapkg` only
12
+ * needs a runnable module.
13
+ * * `platform: node`, `format: esm`, `target: node20`.
14
+ *
15
+ * On failure returns a `POSTINSTALL_ESBUILD_ERROR` diagnostic.
16
+ */
17
+ export class EsbuildTranspiler {
18
+ async transpile(packageName, entryFile) {
19
+ let source;
20
+ try {
21
+ source = fs.readFileSync(entryFile, 'utf-8');
22
+ }
23
+ catch (error) {
24
+ return fail([
25
+ createPostinstallEsbuildErrorDiagnostic(packageName, entryFile, error instanceof Error ? error.message : String(error)),
26
+ ]);
27
+ }
28
+ const options = {
29
+ stdin: {
30
+ contents: source,
31
+ loader: 'ts',
32
+ sourcefile: entryFile,
33
+ resolveDir: entryFile.replace(/[\\/][^\\/]+$/, ''),
34
+ },
35
+ bundle: false,
36
+ write: false,
37
+ format: 'esm',
38
+ platform: 'node',
39
+ target: 'node20',
40
+ sourcemap: false,
41
+ logLevel: 'silent',
42
+ };
43
+ try {
44
+ const result = await build(options);
45
+ const file = result.outputFiles?.[0];
46
+ if (!file) {
47
+ return fail([createPostinstallEsbuildErrorDiagnostic(packageName, entryFile, 'esbuild produced no output')]);
48
+ }
49
+ return ok(file.text);
50
+ }
51
+ catch (error) {
52
+ return fail([
53
+ createPostinstallEsbuildErrorDiagnostic(packageName, entryFile, error instanceof Error ? error.message : String(error)),
54
+ ]);
55
+ }
56
+ }
57
+ }
58
+ //# sourceMappingURL=EsbuildTranspiler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EsbuildTranspiler.js","sourceRoot":"","sources":["../../../src/postinstall/loader/EsbuildTranspiler.ts"],"names":[],"mappings":"AAAA,OAAO,E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4BAA4B,CAAC,CAAC,CAAC,CAAC;YAC/G,CAAC;YACD,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC;gBACV,uCAAuC,CACrC,WAAW,EACX,SAAS,EACT,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CACvD;aACF,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,15 @@
1
+ import { type Result } from '@uapkg/diagnostics';
2
+ import { type PostinstallDefinition } from '../api/PostinstallDsl.js';
3
+ /**
4
+ * Normalizes an imported module to its default export (or the module object
5
+ * itself for CommonJS-style returns) and validates against
6
+ * {@link PostinstallDefinitionSchema}.
7
+ *
8
+ * Emits `POSTINSTALL_INVALID_EXPORT` with flattened Zod issue messages when
9
+ * the shape is wrong.
10
+ */
11
+ export declare class ExportValidator {
12
+ validate(packageName: string, entryFile: string, moduleValue: unknown): Result<PostinstallDefinition>;
13
+ private unwrap;
14
+ }
15
+ //# sourceMappingURL=ExportValidator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportValidator.d.ts","sourceRoot":"","sources":["../../../src/postinstall/loader/ExportValidator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsD,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACrG,OAAO,EAAE,KAAK,qBAAqB,EAA+B,MAAM,0BAA0B,CAAC;AAEnG;;;;;;;GAOG;AACH,qBAAa,eAAe;IACnB,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,MAAM,CAAC,qBAAqB,CAAC;IAa5G,OAAO,CAAC,MAAM;CAQf"}
@@ -0,0 +1,34 @@
1
+ import { createPostinstallInvalidExportDiagnostic, fail, ok } from '@uapkg/diagnostics';
2
+ import { PostinstallDefinitionSchema } from '../api/PostinstallDsl.js';
3
+ /**
4
+ * Normalizes an imported module to its default export (or the module object
5
+ * itself for CommonJS-style returns) and validates against
6
+ * {@link PostinstallDefinitionSchema}.
7
+ *
8
+ * Emits `POSTINSTALL_INVALID_EXPORT` with flattened Zod issue messages when
9
+ * the shape is wrong.
10
+ */
11
+ export class ExportValidator {
12
+ validate(packageName, entryFile, moduleValue) {
13
+ const unwrapped = this.unwrap(moduleValue);
14
+ const parsed = PostinstallDefinitionSchema.safeParse(unwrapped);
15
+ if (!parsed.success) {
16
+ const issues = parsed.error.issues.map((issue) => {
17
+ const where = issue.path.length > 0 ? ` at ${issue.path.join('.')}` : '';
18
+ return `${issue.message}${where}`;
19
+ });
20
+ return fail([createPostinstallInvalidExportDiagnostic(packageName, entryFile, issues)]);
21
+ }
22
+ return ok(parsed.data);
23
+ }
24
+ unwrap(moduleValue) {
25
+ if (moduleValue && typeof moduleValue === 'object') {
26
+ const record = moduleValue;
27
+ if ('default' in record)
28
+ return record.default;
29
+ return record;
30
+ }
31
+ return moduleValue;
32
+ }
33
+ }
34
+ //# sourceMappingURL=ExportValidator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportValidator.js","sourceRoot":"","sources":["../../../src/postinstall/loader/ExportValidator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wCAAwC,EAAE,IAAI,EAAE,EAAE,EAAe,MAAM,oBAAoB,CAAC;AACrG,OAAO,EAA8B,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAEnG;;;;;;;GAOG;AACH,MAAM,OAAO,eAAe;IACnB,QAAQ,CAAC,WAAmB,EAAE,SAAiB,EAAE,WAAoB;QAC1E,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAC3C,MAAM,MAAM,GAAG,2BAA2B,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAChE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;gBAC/C,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBACzE,OAAO,GAAG,KAAK,CAAC,OAAO,GAAG,KAAK,EAAE,CAAC;YACpC,CAAC,CAAC,CAAC;YACH,OAAO,IAAI,CAAC,CAAC,wCAAwC,CAAC,WAAW,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;QAC1F,CAAC;QACD,OAAO,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;IAEO,MAAM,CAAC,WAAoB;QACjC,IAAI,WAAW,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE,CAAC;YACnD,MAAM,MAAM,GAAG,WAAsC,CAAC;YACtD,IAAI,SAAS,IAAI,MAAM;gBAAE,OAAO,MAAM,CAAC,OAAO,CAAC;YAC/C,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;CACF"}
@@ -0,0 +1,29 @@
1
+ import { type Result } from '@uapkg/diagnostics';
2
+ export type ModuleSource = {
3
+ readonly kind: 'file';
4
+ readonly path: string;
5
+ }
6
+ /** ESM source already transpiled by {@link EsbuildTranspiler}. */
7
+ | {
8
+ readonly kind: 'transpiled';
9
+ readonly code: string;
10
+ readonly originalPath: string;
11
+ };
12
+ /**
13
+ * Imports a postinstall module.
14
+ *
15
+ * For `.js`/`.mjs` files we use the file URL directly so relative imports and
16
+ * `node_modules` resolution work.
17
+ *
18
+ * For transpiled `.ts` code we write to a sibling temp file next to the
19
+ * original entry — data: URLs cannot resolve relative specifiers — and delete
20
+ * it on best-effort basis after import. The file lives in the OS tmp dir
21
+ * keyed by a timestamp+pid, avoiding collisions across concurrent installs.
22
+ */
23
+ export declare class ModuleImporter {
24
+ import(packageName: string, source: ModuleSource): Promise<Result<unknown>>;
25
+ private importFileUrl;
26
+ private createTempFile;
27
+ private safeUnlink;
28
+ }
29
+ //# sourceMappingURL=ModuleImporter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModuleImporter.d.ts","sourceRoot":"","sources":["../../../src/postinstall/loader/ModuleImporter.ts"],"names":[],"mappings":"AAIA,OAAO,EAAmD,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAElG,MAAM,MAAM,YAAY,GACpB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AAClD,kEAAkE;GAChE;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1F;;;;;;;;;;GAUG;AACH,qBAAa,cAAc;IACZ,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAY1E,aAAa;IAkB3B,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,UAAU;CAOnB"}