@uapkg/cli 1.1.8 → 1.1.10

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,22 @@
1
+ import { pack } from '@uapkg/pack';
2
+ import { DiagnosticReporter } from '../reporting/DiagnosticReporter.js';
3
+ export class PackCommand {
4
+ options;
5
+ constructor(options) {
6
+ this.options = options;
7
+ }
8
+ async execute() {
9
+ const result = await pack({
10
+ cwd: this.options.cwd,
11
+ dryRun: this.options.dryRun,
12
+ allowMissingLfs: this.options.allowMissingLfs,
13
+ outFile: this.options.outFile,
14
+ });
15
+ if (!result.ok) {
16
+ new DiagnosticReporter().reportAll(result.diagnostics);
17
+ return 1;
18
+ }
19
+ return 0;
20
+ }
21
+ }
22
+ //# sourceMappingURL=PackCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PackCommand.js","sourceRoot":"","sources":["../../src/commands/PackCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAUxE,MAAM,OAAO,WAAW;IACO;IAA7B,YAA6B,OAA2B;QAA3B,YAAO,GAAP,OAAO,CAAoB;IAAG,CAAC;IAE5D,KAAK,CAAC,OAAO;QACX,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC;YACxB,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG;YACrB,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM;YAC3B,eAAe,EAAE,IAAI,CAAC,OAAO,CAAC,eAAe;YAC7C,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO;SAC9B,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,IAAI,kBAAkB,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;YACvD,OAAO,CAAC,CAAC;QACX,CAAC;QAED,OAAO,CAAC,CAAC;IACX,CAAC;CACF"}
@@ -0,0 +1,25 @@
1
+ import type { InstallPlan } from '@uapkg/installer';
2
+ import type { Lockfile, Manifest } from '@uapkg/package-manifest-schema';
3
+ import type { CompositionRoot } from '../app/CompositionRoot.js';
4
+ import type { PostinstallCandidate } from '../postinstall/runner/PostinstallOrchestrator.js';
5
+ /**
6
+ * Builds the {@link PostinstallCandidate} list that the postinstall
7
+ * orchestrator consumes after an installer run.
8
+ *
9
+ * Rules:
10
+ * * Only `add` and `update` actions produce candidates (unchanged/remove never run postinstall).
11
+ * * `pluginRoot` is derived from the action's declared install `path` resolved
12
+ * against the manifest root — matching what the extractor wrote to disk.
13
+ * * `registry` is sourced from the lockfile entry; if the lockfile lacks the
14
+ * package (shouldn't happen post-install, but be defensive), the action is
15
+ * dropped.
16
+ *
17
+ * This adapter lives in the CLI rather than in `@uapkg/uapkg/postinstall/`
18
+ * to keep the postinstall subsystem independent of `@uapkg/installer`.
19
+ */
20
+ export declare class PostinstallCandidateBuilder {
21
+ build(root: CompositionRoot, plan: InstallPlan, lockfile: Lockfile): PostinstallCandidate[];
22
+ /** Convenience: returns `'project' | 'plugin'` for the orchestrator's input. */
23
+ resolveManifestType(manifest: Manifest): 'project' | 'plugin';
24
+ }
25
+ //# sourceMappingURL=PostinstallCandidateBuilder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PostinstallCandidateBuilder.d.ts","sourceRoot":"","sources":["../../src/commands/PostinstallCandidateBuilder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F;;;;;;;;;;;;;;GAcG;AACH,qBAAa,2BAA2B;IAC/B,KAAK,CAAC,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,GAAG,oBAAoB,EAAE;IAiBlG,gFAAgF;IACzE,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ;CAGrE"}
@@ -0,0 +1,41 @@
1
+ import * as path from 'node:path';
2
+ /**
3
+ * Builds the {@link PostinstallCandidate} list that the postinstall
4
+ * orchestrator consumes after an installer run.
5
+ *
6
+ * Rules:
7
+ * * Only `add` and `update` actions produce candidates (unchanged/remove never run postinstall).
8
+ * * `pluginRoot` is derived from the action's declared install `path` resolved
9
+ * against the manifest root — matching what the extractor wrote to disk.
10
+ * * `registry` is sourced from the lockfile entry; if the lockfile lacks the
11
+ * package (shouldn't happen post-install, but be defensive), the action is
12
+ * dropped.
13
+ *
14
+ * This adapter lives in the CLI rather than in `@uapkg/uapkg/postinstall/`
15
+ * to keep the postinstall subsystem independent of `@uapkg/installer`.
16
+ */
17
+ export class PostinstallCandidateBuilder {
18
+ build(root, plan, lockfile) {
19
+ const lockPackages = lockfile.packages;
20
+ const candidates = [];
21
+ for (const action of plan.actions) {
22
+ if (action.type !== 'add' && action.type !== 'update')
23
+ continue;
24
+ const locked = lockPackages[action.packageName];
25
+ const registry = locked?.registry ?? action.registry;
26
+ if (!registry)
27
+ continue;
28
+ candidates.push({
29
+ packageName: action.packageName,
30
+ registry: registry,
31
+ pluginRoot: path.join(root.cwd, action.path),
32
+ });
33
+ }
34
+ return candidates;
35
+ }
36
+ /** Convenience: returns `'project' | 'plugin'` for the orchestrator's input. */
37
+ resolveManifestType(manifest) {
38
+ return manifest.kind === 'project' ? 'project' : 'plugin';
39
+ }
40
+ }
41
+ //# sourceMappingURL=PostinstallCandidateBuilder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PostinstallCandidateBuilder.js","sourceRoot":"","sources":["../../src/commands/PostinstallCandidateBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAMlC;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,2BAA2B;IAC/B,KAAK,CAAC,IAAqB,EAAE,IAAiB,EAAE,QAAkB;QACvE,MAAM,YAAY,GAAG,QAAQ,CAAC,QAAgD,CAAC;QAC/E,MAAM,UAAU,GAA2B,EAAE,CAAC;QAC9C,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YAClC,IAAI,MAAM,CAAC,IAAI,KAAK,KAAK,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ;gBAAE,SAAS;YAChE,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;YAChD,MAAM,QAAQ,GAAG,MAAM,EAAE,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC;YACrD,IAAI,CAAC,QAAQ;gBAAE,SAAS;YACxB,UAAU,CAAC,IAAI,CAAC;gBACd,WAAW,EAAE,MAAM,CAAC,WAAW;gBAC/B,QAAQ,EAAE,QAAkB;gBAC5B,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC;aAC7C,CAAC,CAAC;QACL,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,gFAAgF;IACzE,mBAAmB,CAAC,QAAkB;QAC3C,OAAO,QAAQ,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC5D,CAAC;CACF"}
@@ -0,0 +1,14 @@
1
+ import type { CompositionRoot } from '../app/CompositionRoot.js';
2
+ import type { Command } from './Command.js';
3
+ /**
4
+ * Options for {@link ProjectGetNameCommand}. Reserved for future expansion
5
+ * (e.g. alternate output format); today the command is fully parameterized
6
+ * by {@link CompositionRoot}.
7
+ */
8
+ export type ProjectGetNameCommandOptions = Record<string, never>;
9
+ export declare class ProjectGetNameCommand implements Command {
10
+ private readonly root;
11
+ constructor(root: CompositionRoot);
12
+ execute(): Promise<number>;
13
+ }
14
+ //# sourceMappingURL=ProjectGetNameCommand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProjectGetNameCommand.d.ts","sourceRoot":"","sources":["../../src/commands/ProjectGetNameCommand.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;;;GAIG;AACH,MAAM,MAAM,4BAA4B,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAQjE,qBAAa,qBAAsB,YAAW,OAAO;IAChC,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,eAAe;IAE5C,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;CAaxC"}
@@ -0,0 +1,26 @@
1
+ import { ManifestReader } from '@uapkg/package-manifest';
2
+ // ---------------------------------------------------------------------------
3
+ // ProjectGetNameCommand — prints the `name` field of the current project
4
+ // manifest to stdout. Fails with exit code 1 if the manifest is absent, not
5
+ // a project, or invalid. Intended for shell wrapping in CI scripts.
6
+ // ---------------------------------------------------------------------------
7
+ export class ProjectGetNameCommand {
8
+ root;
9
+ constructor(root) {
10
+ this.root = root;
11
+ }
12
+ async execute() {
13
+ const result = await new ManifestReader().read(this.root.cwd);
14
+ if (!result.ok) {
15
+ this.root.diagnostics.reportAll(result.diagnostics);
16
+ return 1;
17
+ }
18
+ if (result.value.kind !== 'project') {
19
+ process.stderr.write(`[uapkg] Expected manifest kind 'project', received '${result.value.kind}'\n`);
20
+ return 1;
21
+ }
22
+ process.stdout.write(`${String(result.value.name)}\n`);
23
+ return 0;
24
+ }
25
+ }
26
+ //# sourceMappingURL=ProjectGetNameCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProjectGetNameCommand.js","sourceRoot":"","sources":["../../src/commands/ProjectGetNameCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAWzD,8EAA8E;AAC9E,yEAAyE;AACzE,4EAA4E;AAC5E,oEAAoE;AACpE,8EAA8E;AAE9E,MAAM,OAAO,qBAAqB;IACI;IAApC,YAAoC,IAAqB;QAArB,SAAI,GAAJ,IAAI,CAAiB;IAAG,CAAC;IAEtD,KAAK,CAAC,OAAO;QAClB,MAAM,MAAM,GAAG,MAAM,IAAI,cAAc,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC9D,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;YACpD,OAAO,CAAC,CAAC;QACX,CAAC;QACD,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YACpC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,uDAAuD,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC;YACpG,OAAO,CAAC,CAAC;QACX,CAAC;QACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvD,OAAO,CAAC,CAAC;IACX,CAAC;CACF"}
@@ -0,0 +1,29 @@
1
+ import type { UAPKGConfigScope, UAPKGOutputFormat, UAPKGRegistryAction } from '../cli/UAPKGCommandLine.js';
2
+ import type { Command } from './Command.js';
3
+ export interface RegistryCommandOptions {
4
+ cwd: string;
5
+ action: UAPKGRegistryAction;
6
+ name?: string;
7
+ url?: string;
8
+ refType?: 'branch' | 'tag' | 'rev';
9
+ refValue?: string;
10
+ scope?: UAPKGConfigScope;
11
+ output: UAPKGOutputFormat;
12
+ }
13
+ export declare class RegistryCommand implements Command {
14
+ private readonly options;
15
+ private readonly reporter;
16
+ constructor(options: RegistryCommandOptions);
17
+ execute(): Promise<number>;
18
+ private executeList;
19
+ private executeAdd;
20
+ private executeRemove;
21
+ private executeUse;
22
+ private resolveRef;
23
+ private scopeOptions;
24
+ private persistPlan;
25
+ private fail;
26
+ private reportIfText;
27
+ private print;
28
+ }
29
+ //# sourceMappingURL=RegistryCommand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RegistryCommand.d.ts","sourceRoot":"","sources":["../../src/commands/RegistryCommand.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAE3G,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,mBAAmB,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,KAAK,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,MAAM,EAAE,iBAAiB,CAAC;CAC3B;AAED,qBAAa,eAAgB,YAAW,OAAO;IAGjC,OAAO,CAAC,QAAQ,CAAC,OAAO;IAFpC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA4B;gBAExB,OAAO,EAAE,sBAAsB;IAE/C,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;IAoBvC,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,UAAU;IA6BlB,OAAO,CAAC,aAAa;IAgBrB,OAAO,CAAC,UAAU;IAgBlB,OAAO,CAAC,UAAU;IAMlB,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,WAAW;IAKnB,OAAO,CAAC,IAAI;IAKZ,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,KAAK;CAOd"}
@@ -0,0 +1,121 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import { createConfig } from '@uapkg/config';
4
+ import { createParseErrorDiagnostic } from '@uapkg/diagnostics';
5
+ import Log from '@uapkg/log';
6
+ import { DiagnosticReporter } from '../reporting/DiagnosticReporter.js';
7
+ export class RegistryCommand {
8
+ options;
9
+ reporter = new DiagnosticReporter();
10
+ constructor(options) {
11
+ this.options = options;
12
+ }
13
+ async execute() {
14
+ const config = createConfig({ cwd: this.options.cwd });
15
+ this.reportIfText(config.getDiagnostics());
16
+ switch (this.options.action) {
17
+ case 'list':
18
+ return this.executeList(config);
19
+ case 'add':
20
+ return this.executeAdd(config);
21
+ case 'remove':
22
+ return this.executeRemove(config);
23
+ case 'use':
24
+ return this.executeUse(config);
25
+ default:
26
+ return this.fail([
27
+ createParseErrorDiagnostic(`Unsupported registry action: ${this.options.action}`),
28
+ ]);
29
+ }
30
+ }
31
+ executeList(config) {
32
+ const registries = this.options.scope
33
+ ? config.get('registries', { scope: this.options.scope })
34
+ : config.get('registries');
35
+ this.print(registries ?? {});
36
+ return 0;
37
+ }
38
+ executeAdd(config) {
39
+ const name = this.options.name;
40
+ const url = this.options.url;
41
+ if (!name || !url) {
42
+ return this.fail([createParseErrorDiagnostic('registry add requires <name> and <url>.')]);
43
+ }
44
+ const ref = this.resolveRef();
45
+ const setUrl = config.set(`registries.${name}.url`, url, this.scopeOptions());
46
+ if (!setUrl.ok)
47
+ return this.fail(setUrl.diagnostics);
48
+ this.persistPlan(setUrl.value.file, setUrl.value.values);
49
+ const setRef = config.set(`registries.${name}.ref`, ref, this.scopeOptions());
50
+ if (!setRef.ok)
51
+ return this.fail(setRef.diagnostics);
52
+ this.persistPlan(setRef.value.file, setRef.value.values);
53
+ config.reload({ cwd: this.options.cwd });
54
+ this.reportIfText(config.getDiagnostics());
55
+ this.print({
56
+ action: 'add',
57
+ name,
58
+ url,
59
+ ref,
60
+ scope: this.options.scope ?? 'auto',
61
+ });
62
+ return 0;
63
+ }
64
+ executeRemove(config) {
65
+ const name = this.options.name;
66
+ if (!name) {
67
+ return this.fail([createParseErrorDiagnostic('registry remove requires <name>.')]);
68
+ }
69
+ const plan = config.delete(`registries.${name}`, this.scopeOptions());
70
+ if (!plan.ok)
71
+ return this.fail(plan.diagnostics);
72
+ this.persistPlan(plan.value.file, plan.value.values);
73
+ config.reload({ cwd: this.options.cwd });
74
+ this.reportIfText(config.getDiagnostics());
75
+ this.print({ action: 'remove', name, scope: this.options.scope ?? 'auto' });
76
+ return 0;
77
+ }
78
+ executeUse(config) {
79
+ const name = this.options.name;
80
+ if (!name) {
81
+ return this.fail([createParseErrorDiagnostic('registry use requires <name>.')]);
82
+ }
83
+ const plan = config.set('registry', name, this.scopeOptions());
84
+ if (!plan.ok)
85
+ return this.fail(plan.diagnostics);
86
+ this.persistPlan(plan.value.file, plan.value.values);
87
+ config.reload({ cwd: this.options.cwd });
88
+ this.reportIfText(config.getDiagnostics());
89
+ this.print({ action: 'use', name, scope: this.options.scope ?? 'auto' });
90
+ return 0;
91
+ }
92
+ resolveRef() {
93
+ const type = this.options.refType ?? 'branch';
94
+ const value = this.options.refValue ?? 'main';
95
+ return { type, value };
96
+ }
97
+ scopeOptions() {
98
+ return this.options.scope ? { scope: this.options.scope } : {};
99
+ }
100
+ persistPlan(filePath, values) {
101
+ fs.mkdirSync(path.dirname(filePath), { recursive: true });
102
+ fs.writeFileSync(filePath, `${JSON.stringify(values, null, 2)}\n`, 'utf8');
103
+ }
104
+ fail(diagnostics) {
105
+ this.reporter.reportAll(diagnostics);
106
+ return 1;
107
+ }
108
+ reportIfText(diagnostics) {
109
+ if (this.options.output === 'text') {
110
+ this.reporter.reportAll(diagnostics);
111
+ }
112
+ }
113
+ print(value) {
114
+ if (this.options.output === 'json' || typeof value === 'object') {
115
+ Log.info(JSON.stringify(value, null, 2));
116
+ return;
117
+ }
118
+ Log.info(JSON.stringify(value));
119
+ }
120
+ }
121
+ //# sourceMappingURL=RegistryCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RegistryCommand.js","sourceRoot":"","sources":["../../src/commands/RegistryCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAuB,YAAY,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAmB,MAAM,oBAAoB,CAAC;AACjF,OAAO,GAAG,MAAM,YAAY,CAAC;AAE7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAcxE,MAAM,OAAO,eAAe;IAGG;IAFZ,QAAQ,GAAG,IAAI,kBAAkB,EAAE,CAAC;IAErD,YAA6B,OAA+B;QAA/B,YAAO,GAAP,OAAO,CAAwB;IAAG,CAAC;IAEzD,KAAK,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CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QACrC,OAAO,CAAC,CAAC;IACX,CAAC;IAEO,YAAY,CAAC,WAAkC;QACrD,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;YACnC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QACvC,CAAC;IACH,CAAC;IAEO,KAAK,CAAC,KAAc;QAC1B,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,MAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAChE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YACzC,OAAO;QACT,CAAC;QACD,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;IAClC,CAAC;CACF"}
@@ -0,0 +1,14 @@
1
+ import type { CompositionRoot } from '../app/CompositionRoot.js';
2
+ import type { Command } from './Command.js';
3
+ export interface RemoveCommandOptions {
4
+ readonly packageName: string;
5
+ readonly outputFormat: 'text' | 'json';
6
+ readonly dryRun?: boolean;
7
+ }
8
+ export declare class RemoveCommand implements Command {
9
+ private readonly root;
10
+ private readonly options;
11
+ constructor(root: CompositionRoot, options: RemoveCommandOptions);
12
+ execute(): Promise<number>;
13
+ }
14
+ //# sourceMappingURL=RemoveCommand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RemoveCommand.d.ts","sourceRoot":"","sources":["../../src/commands/RemoveCommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAG5C,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;IACvC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;CAC3B;AASD,qBAAa,aAAc,YAAW,OAAO;IAEzC,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBADP,IAAI,EAAE,eAAe,EACrB,OAAO,EAAE,oBAAoB;IAGnC,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;CA2CxC"}
@@ -0,0 +1,55 @@
1
+ import { InstallCommand } from './InstallCommand.js';
2
+ // ---------------------------------------------------------------------------
3
+ // RemoveCommand — removes a dependency from every bucket in the manifest and
4
+ // then immediately re-runs `InstallCommand` so on-disk state is reconciled.
5
+ //
6
+ // The installer's plan diff is what actually deletes the installed plugin —
7
+ // RemoveCommand's job is (1) mutate the manifest, (2) trigger the install.
8
+ // ---------------------------------------------------------------------------
9
+ export class RemoveCommand {
10
+ root;
11
+ options;
12
+ constructor(root, options) {
13
+ this.root = root;
14
+ this.options = options;
15
+ }
16
+ async execute() {
17
+ const result = await this.root.packageManifest.removeDependency(this.options.packageName);
18
+ if (!result.ok) {
19
+ if (this.options.outputFormat === 'json') {
20
+ this.root.json.emit({ status: 'error', command: 'remove', diagnostics: result.diagnostics });
21
+ }
22
+ else {
23
+ this.root.diagnostics.reportAll(result.diagnostics);
24
+ }
25
+ return 1;
26
+ }
27
+ const missing = result.diagnostics.some((d) => d.code === 'DEPENDENCY_NOT_FOUND');
28
+ if (result.diagnostics.length > 0 && this.options.outputFormat === 'text') {
29
+ this.root.diagnostics.reportAll(result.diagnostics);
30
+ }
31
+ if (missing) {
32
+ if (this.options.outputFormat === 'json') {
33
+ this.root.json.emit({
34
+ status: 'ok',
35
+ command: 'remove',
36
+ data: { removed: false, packageName: this.options.packageName },
37
+ diagnostics: result.diagnostics,
38
+ });
39
+ }
40
+ return 0;
41
+ }
42
+ if (this.options.outputFormat === 'text') {
43
+ process.stdout.write(`Removed "${this.options.packageName}" from uapkg.json\n`);
44
+ }
45
+ // Reconcile on-disk state by delegating to the installer pipeline.
46
+ const install = new InstallCommand(this.root, {
47
+ force: false,
48
+ frozen: false,
49
+ dryRun: this.options.dryRun === true,
50
+ outputFormat: this.options.outputFormat,
51
+ });
52
+ return install.execute();
53
+ }
54
+ }
55
+ //# sourceMappingURL=RemoveCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RemoveCommand.js","sourceRoot":"","sources":["../../src/commands/RemoveCommand.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAQrD,8EAA8E;AAC9E,6EAA6E;AAC7E,4EAA4E;AAC5E,EAAE;AACF,4EAA4E;AAC5E,2EAA2E;AAC3E,8EAA8E;AAC9E,MAAM,OAAO,aAAa;IAEL;IACA;IAFnB,YACmB,IAAqB,EACrB,OAA6B;QAD7B,SAAI,GAAJ,IAAI,CAAiB;QACrB,YAAO,GAAP,OAAO,CAAsB;IAC7C,CAAC;IAEG,KAAK,CAAC,OAAO;QAClB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAE1F,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,KAAK,MAAM,EAAE,CAAC;gBACzC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;YAC/F,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;YACtD,CAAC;YACD,OAAO,CAAC,CAAC;QACX,CAAC;QAED,MAAM,OAAO,GAAG,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@
1
+ import type { CompositionRoot } from '../app/CompositionRoot.js';
2
+ import type { Command } from './Command.js';
3
+ export interface UpdateCommandOptions {
4
+ readonly specs: readonly string[];
5
+ readonly force: boolean;
6
+ readonly dryRun: boolean;
7
+ readonly outputFormat: 'text' | 'json';
8
+ }
9
+ /**
10
+ * `uapkg update [specs...]` — re-resolve and re-install.
11
+ *
12
+ * Modes:
13
+ *
14
+ * * `uapkg update` — full update (all packages).
15
+ * * `uapkg update foo` — re-resolve `foo` via the
16
+ * normal install flow; lockfile diff skips untouched packages.
17
+ * * `uapkg update foo@^2.0.0` — rewrite `foo`'s range in the
18
+ * manifest (preserving its bucket + registry) then re-install.
19
+ * * `uapkg update foo@^2 @scope/bar@~1.5` — array form; each spec is
20
+ * processed in order before a single install pass.
21
+ *
22
+ * Never throws — errors become diagnostics. Specs that reference unknown
23
+ * packages produce `PACKAGE_NOT_FOUND` against the local manifest.
24
+ */
25
+ export declare class UpdateCommand implements Command {
26
+ private readonly root;
27
+ private readonly options;
28
+ constructor(root: CompositionRoot, options: UpdateCommandOptions);
29
+ execute(): Promise<number>;
30
+ /**
31
+ * Parse a single `<name>[@range]` spec and, if a range is supplied, rewrite
32
+ * the manifest entry preserving its existing bucket + registry. Bare-name
33
+ * specs are a no-op at the manifest level — the subsequent install pass
34
+ * handles the re-resolve.
35
+ */
36
+ private applySpec;
37
+ /**
38
+ * Find `name` in the manifest buckets, preserving the source-of-truth
39
+ * bucket + registry so `applySpec` doesn't move the dep between buckets.
40
+ */
41
+ private locateDependency;
42
+ private delegateToInstall;
43
+ private fail;
44
+ }
45
+ //# sourceMappingURL=UpdateCommand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UpdateCommand.d.ts","sourceRoot":"","sources":["../../src/commands/UpdateCommand.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAG5C,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;CACxC;AASD;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,aAAc,YAAW,OAAO;IAEzC,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBADP,IAAI,EAAE,eAAe,EACrB,OAAO,EAAE,oBAAoB;IAGnC,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;IAmBvC;;;;;OAKG;YACW,SAAS;IA0CvB;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAWxB,OAAO,CAAC,iBAAiB;IAUzB,OAAO,CAAC,IAAI;CAQb"}
@@ -0,0 +1,113 @@
1
+ import { parsePackageSpec } from '@uapkg/common';
2
+ import { createInvalidPackageSpecDiagnostic, createPackageNotFoundDiagnostic, } from '@uapkg/diagnostics';
3
+ import { InstallCommand } from './InstallCommand.js';
4
+ /**
5
+ * `uapkg update [specs...]` — re-resolve and re-install.
6
+ *
7
+ * Modes:
8
+ *
9
+ * * `uapkg update` — full update (all packages).
10
+ * * `uapkg update foo` — re-resolve `foo` via the
11
+ * normal install flow; lockfile diff skips untouched packages.
12
+ * * `uapkg update foo@^2.0.0` — rewrite `foo`'s range in the
13
+ * manifest (preserving its bucket + registry) then re-install.
14
+ * * `uapkg update foo@^2 @scope/bar@~1.5` — array form; each spec is
15
+ * processed in order before a single install pass.
16
+ *
17
+ * Never throws — errors become diagnostics. Specs that reference unknown
18
+ * packages produce `PACKAGE_NOT_FOUND` against the local manifest.
19
+ */
20
+ export class UpdateCommand {
21
+ root;
22
+ options;
23
+ constructor(root, options) {
24
+ this.root = root;
25
+ this.options = options;
26
+ }
27
+ async execute() {
28
+ if (this.options.specs.length === 0) {
29
+ return this.delegateToInstall();
30
+ }
31
+ const manifestResult = await this.root.packageManifest.readManifest();
32
+ if (!manifestResult.ok)
33
+ return this.fail(manifestResult.diagnostics);
34
+ const diagnostics = [];
35
+ for (const rawSpec of this.options.specs) {
36
+ const applyResult = await this.applySpec(rawSpec, manifestResult.value);
37
+ if (!applyResult.ok)
38
+ diagnostics.push(...applyResult.diagnostics);
39
+ }
40
+ if (diagnostics.length > 0)
41
+ return this.fail(diagnostics);
42
+ return this.delegateToInstall();
43
+ }
44
+ /**
45
+ * Parse a single `<name>[@range]` spec and, if a range is supplied, rewrite
46
+ * the manifest entry preserving its existing bucket + registry. Bare-name
47
+ * specs are a no-op at the manifest level — the subsequent install pass
48
+ * handles the re-resolve.
49
+ */
50
+ async applySpec(rawSpec, manifest) {
51
+ const specResult = parsePackageSpec(rawSpec);
52
+ if (!specResult.ok)
53
+ return { ok: false, diagnostics: [...specResult.diagnostics] };
54
+ const spec = specResult.value;
55
+ if (spec.org) {
56
+ return {
57
+ ok: false,
58
+ diagnostics: [
59
+ createInvalidPackageSpecDiagnostic(rawSpec, 'scoped specifiers (@org/name) are reserved for a future registry iteration'),
60
+ ],
61
+ };
62
+ }
63
+ const located = this.locateDependency(manifest, spec.name);
64
+ if (!located) {
65
+ return {
66
+ ok: false,
67
+ diagnostics: [createPackageNotFoundDiagnostic(spec.name, String(manifest.name))],
68
+ };
69
+ }
70
+ if (!spec.range)
71
+ return { ok: true };
72
+ const addResult = await this.root.packageManifest.addDependency(spec.name, {
73
+ version: spec.range,
74
+ registry: located.registry,
75
+ }, { bucket: located.bucket });
76
+ if (!addResult.ok)
77
+ return { ok: false, diagnostics: [...addResult.diagnostics] };
78
+ return { ok: true };
79
+ }
80
+ /**
81
+ * Find `name` in the manifest buckets, preserving the source-of-truth
82
+ * bucket + registry so `applySpec` doesn't move the dep between buckets.
83
+ */
84
+ locateDependency(manifest, name) {
85
+ const order = ['dependencies', 'devDependencies', 'peerDependencies'];
86
+ for (const bucket of order) {
87
+ const entries = manifest[bucket];
88
+ if (entries && name in entries) {
89
+ return { bucket, registry: entries[name].registry };
90
+ }
91
+ }
92
+ return null;
93
+ }
94
+ delegateToInstall() {
95
+ const install = new InstallCommand(this.root, {
96
+ force: this.options.force,
97
+ frozen: false,
98
+ dryRun: this.options.dryRun,
99
+ outputFormat: this.options.outputFormat,
100
+ });
101
+ return install.execute();
102
+ }
103
+ fail(diagnostics) {
104
+ if (this.options.outputFormat === 'json') {
105
+ this.root.json.emit({ status: 'error', command: 'update', diagnostics });
106
+ }
107
+ else {
108
+ this.root.diagnostics.reportAll(diagnostics);
109
+ }
110
+ return 1;
111
+ }
112
+ }
113
+ //# sourceMappingURL=UpdateCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UpdateCommand.js","sourceRoot":"","sources":["../../src/commands/UpdateCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EACL,kCAAkC,EAClC,+BAA+B,GAEhC,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAgBrD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,OAAO,aAAa;IAEL;IACA;IAFnB,YACmB,IAAqB,EACrB,OAA6B;QAD7B,SAAI,GAAJ,IAAI,CAAiB;QACrB,YAAO,GAAP,OAAO,CAAsB;IAC7C,CAAC;IAEG,KAAK,CAAC,OAAO;QAClB,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACpC,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAClC,CAAC;QAED,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,YAAY,EAAE,CAAC;QACtE,IAAI,CAAC,cAAc,CAAC,EAAE;YAAE,OAAO,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,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AAI,CAAC,OAAO,CAAC,YAAY;SACxC,CAAC,CAAC;QACH,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IAEO,IAAI,CAAC,WAAkC;QAC7C,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,KAAK,MAAM,EAAE,CAAC;YACzC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC;QAC3E,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QAC/C,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;CACF"}
@@ -0,0 +1,21 @@
1
+ import type { CompositionRoot } from '../app/CompositionRoot.js';
2
+ import type { Command } from './Command.js';
3
+ export interface WhyCommandOptions {
4
+ readonly target: string;
5
+ readonly outputFormat: 'text' | 'json';
6
+ }
7
+ /**
8
+ * `uapkg why <name>` — prints every dependency path from a graph root to the
9
+ * target package. Implemented as a pure consumer of
10
+ * {@link PackageManifest.explainWhy}.
11
+ *
12
+ * Exit code 0 when the target is present, 3 when not found, 1 on any
13
+ * resolver error.
14
+ */
15
+ export declare class WhyCommand implements Command {
16
+ private readonly root;
17
+ private readonly options;
18
+ constructor(root: CompositionRoot, options: WhyCommandOptions);
19
+ execute(): Promise<number>;
20
+ }
21
+ //# sourceMappingURL=WhyCommand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WhyCommand.d.ts","sourceRoot":"","sources":["../../src/commands/WhyCommand.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;CACxC;AAED;;;;;;;GAOG;AACH,qBAAa,UAAW,YAAW,OAAO;IAEtC,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBADP,IAAI,EAAE,eAAe,EACrB,OAAO,EAAE,iBAAiB;IAGhC,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;CA+BxC"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * `uapkg why <name>` — prints every dependency path from a graph root to the
3
+ * target package. Implemented as a pure consumer of
4
+ * {@link PackageManifest.explainWhy}.
5
+ *
6
+ * Exit code 0 when the target is present, 3 when not found, 1 on any
7
+ * resolver error.
8
+ */
9
+ export class WhyCommand {
10
+ root;
11
+ options;
12
+ constructor(root, options) {
13
+ this.root = root;
14
+ this.options = options;
15
+ }
16
+ async execute() {
17
+ const target = this.options.target;
18
+ const result = await this.root.packageManifest.explainWhy(target);
19
+ if (this.options.outputFormat === 'json') {
20
+ this.root.json.emit({
21
+ status: result.ok ? 'ok' : 'error',
22
+ command: 'why',
23
+ data: result.ok ? result.value : undefined,
24
+ diagnostics: result.diagnostics,
25
+ });
26
+ return result.ok ? (result.value.paths.length === 0 && !result.value.foundAsRoot ? 3 : 0) : 1;
27
+ }
28
+ this.root.diagnostics.reportAll(result.diagnostics);
29
+ if (!result.ok)
30
+ return 1;
31
+ const { paths, foundAsRoot } = result.value;
32
+ if (paths.length === 0 && !foundAsRoot) {
33
+ process.stdout.write(`No installation of "${target}" in the resolved graph.\n`);
34
+ return 3;
35
+ }
36
+ if (foundAsRoot) {
37
+ process.stdout.write(`${target} (declared at root)\n`);
38
+ }
39
+ for (const p of paths) {
40
+ const rendered = p.path.map((e) => `${e.name}@${e.version}`).join(' → ');
41
+ process.stdout.write(` ${rendered}\n`);
42
+ }
43
+ return 0;
44
+ }
45
+ }
46
+ //# sourceMappingURL=WhyCommand.js.map