@uapkg/cli 1.3.2 → 1.5.0

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 (625) hide show
  1. package/README.md +3 -0
  2. package/dist/build/BuildMetadata.js +2 -2
  3. package/dist/cli-bootstrap.js +19846 -13
  4. package/dist/cli.js +1 -1
  5. package/dist/index.js +19980 -60
  6. package/dist/licenses/semver-LICENSE +15 -0
  7. package/dist/profile.js +25 -0
  8. package/dist/runtime-lock.json +2142 -0
  9. package/dist/{app → types/uapkg/app}/CompositionRoot.d.ts +4 -5
  10. package/dist/{app → types/uapkg/app}/UAPKGApplication.d.ts +0 -1
  11. package/dist/{build → types/uapkg/build}/BuildMetadata.d.ts +1 -2
  12. package/dist/types/uapkg/cli/DebugEnvironment.d.ts +15 -0
  13. package/dist/types/uapkg/cli/DebugInfo.d.ts +15 -0
  14. package/dist/{cli → types/uapkg/cli}/UAPKGCommandLine.d.ts +0 -1
  15. package/dist/{cli → types/uapkg/cli}/parseCommandLine.d.ts +0 -1
  16. package/dist/{cli → types/uapkg/cli}/parsing/UAPKGCommandLineParser.d.ts +0 -1
  17. package/dist/{cli → types/uapkg/cli}/parsing/UAPKGParserRegistry.d.ts +0 -1
  18. package/dist/{cli → types/uapkg/cli}/parsing/contracts/UAPKGCommandModule.d.ts +0 -1
  19. package/dist/{cli → types/uapkg/cli}/parsing/modules/AddCommandModule.d.ts +0 -1
  20. package/dist/{cli → types/uapkg/cli}/parsing/modules/ConfigCommandModule.d.ts +0 -1
  21. package/dist/{cli → types/uapkg/cli}/parsing/modules/InitCommandModule.d.ts +0 -1
  22. package/dist/{cli → types/uapkg/cli}/parsing/modules/InstallCommandModule.d.ts +0 -1
  23. package/dist/{cli → types/uapkg/cli}/parsing/modules/LifecycleCommandModule.d.ts +0 -1
  24. package/dist/{cli → types/uapkg/cli}/parsing/modules/ListCommandModule.d.ts +0 -1
  25. package/dist/{cli → types/uapkg/cli}/parsing/modules/LoginCommandModule.d.ts +0 -1
  26. package/dist/{cli → types/uapkg/cli}/parsing/modules/LogoutCommandModule.d.ts +0 -1
  27. package/dist/{cli → types/uapkg/cli}/parsing/modules/OutdatedCommandModule.d.ts +0 -1
  28. package/dist/{cli → types/uapkg/cli}/parsing/modules/PackCommandModule.d.ts +0 -1
  29. package/dist/{cli → types/uapkg/cli}/parsing/modules/ProjectGetNameCommandModule.d.ts +0 -1
  30. package/dist/{cli → types/uapkg/cli}/parsing/modules/PublishCommandModule.d.ts +0 -1
  31. package/dist/{cli → types/uapkg/cli}/parsing/modules/RegistryCommandModule.d.ts +0 -1
  32. package/dist/{cli → types/uapkg/cli}/parsing/modules/RemoveCommandModule.d.ts +0 -1
  33. package/dist/{cli → types/uapkg/cli}/parsing/modules/RequestsCommandModule.d.ts +0 -1
  34. package/dist/{cli → types/uapkg/cli}/parsing/modules/UpdateCommandModule.d.ts +0 -1
  35. package/dist/{cli → types/uapkg/cli}/parsing/modules/WhoamiCommandModule.d.ts +0 -1
  36. package/dist/{cli → types/uapkg/cli}/parsing/modules/WhyCommandModule.d.ts +0 -1
  37. package/dist/{cli → types/uapkg/cli}/parsing/modules/sharedOptions.d.ts +0 -1
  38. package/dist/{cli → types/uapkg/cli}/runUAPKGCLI.d.ts +0 -1
  39. package/dist/{commands → types/uapkg/commands}/AddCommand.d.ts +0 -1
  40. package/dist/{commands → types/uapkg/commands}/Command.d.ts +0 -1
  41. package/dist/{commands → types/uapkg/commands}/ConfigCommand.d.ts +0 -1
  42. package/dist/{commands → types/uapkg/commands}/InitCommand.d.ts +1 -2
  43. package/dist/{commands → types/uapkg/commands}/InstallCommand.d.ts +0 -1
  44. package/dist/{commands → types/uapkg/commands}/ListCommand.d.ts +0 -1
  45. package/dist/{commands → types/uapkg/commands}/LoginCommand.d.ts +0 -1
  46. package/dist/{commands → types/uapkg/commands}/LogoutCommand.d.ts +0 -1
  47. package/dist/{commands → types/uapkg/commands}/OutdatedCommand.d.ts +0 -1
  48. package/dist/{commands → types/uapkg/commands}/PackCommand.d.ts +0 -1
  49. package/dist/{commands → types/uapkg/commands}/PackageLifecycleCommand.d.ts +0 -1
  50. package/dist/{commands → types/uapkg/commands}/PostinstallCandidateBuilder.d.ts +2 -3
  51. package/dist/{commands → types/uapkg/commands}/ProjectGetNameCommand.d.ts +0 -1
  52. package/dist/{commands → types/uapkg/commands}/PublishCommand.d.ts +1 -2
  53. package/dist/{commands → types/uapkg/commands}/RegistryCommand.d.ts +0 -1
  54. package/dist/{commands → types/uapkg/commands}/RemoveCommand.d.ts +0 -1
  55. package/dist/{commands → types/uapkg/commands}/RequestsCommand.d.ts +0 -1
  56. package/dist/{commands → types/uapkg/commands}/UpdateCommand.d.ts +0 -1
  57. package/dist/{commands → types/uapkg/commands}/WhoamiCommand.d.ts +0 -1
  58. package/dist/{commands → types/uapkg/commands}/WhyCommand.d.ts +0 -1
  59. package/dist/{commands → types/uapkg/commands}/add/DependencyAddResolver.d.ts +3 -4
  60. package/dist/{control-plane → types/uapkg/control-plane}/AccountManager.d.ts +1 -2
  61. package/dist/{control-plane → types/uapkg/control-plane}/ArtifactObserver.d.ts +0 -1
  62. package/dist/{control-plane → types/uapkg/control-plane}/AuthMetadataStore.d.ts +0 -1
  63. package/dist/{control-plane → types/uapkg/control-plane}/AuthStoragePaths.d.ts +0 -1
  64. package/dist/{control-plane → types/uapkg/control-plane}/AuthenticationSelector.d.ts +0 -1
  65. package/dist/{control-plane → types/uapkg/control-plane}/ControlPlaneClient.d.ts +1 -2
  66. package/dist/{control-plane → types/uapkg/control-plane}/ControlPlaneEndpoints.d.ts +1 -2
  67. package/dist/{control-plane → types/uapkg/control-plane}/ControlPlaneTypes.d.ts +4 -2
  68. package/dist/{control-plane → types/uapkg/control-plane}/CredentialStore.d.ts +0 -1
  69. package/dist/{control-plane → types/uapkg/control-plane}/DPoPKeyStore.d.ts +0 -1
  70. package/dist/{control-plane → types/uapkg/control-plane}/GitHubActionsOidcCredentialProvider.d.ts +4 -3
  71. package/dist/{control-plane → types/uapkg/control-plane}/PublishIdempotencyStore.d.ts +0 -1
  72. package/dist/{control-plane → types/uapkg/control-plane}/PublishRequestErrorMapper.d.ts +1 -2
  73. package/dist/{control-plane → types/uapkg/control-plane}/RegistryGrantLock.d.ts +0 -1
  74. package/dist/{control-plane → types/uapkg/control-plane}/RegistryTrustResolver.d.ts +0 -1
  75. package/dist/types/uapkg/control-plane/RequestWatch.d.ts +15 -0
  76. package/dist/types/uapkg/control-plane/RetryAfter.d.ts +6 -0
  77. package/dist/{postinstall → types/uapkg/postinstall}/api/PostinstallDsl.d.ts +0 -1
  78. package/dist/{postinstall → types/uapkg/postinstall}/api/definePostinstall.d.ts +0 -1
  79. package/dist/{postinstall → types/uapkg/postinstall}/loader/EntryResolver.d.ts +1 -2
  80. package/dist/{postinstall → types/uapkg/postinstall}/loader/EsbuildTranspiler.d.ts +1 -2
  81. package/dist/{postinstall → types/uapkg/postinstall}/loader/ExportValidator.d.ts +1 -2
  82. package/dist/{postinstall → types/uapkg/postinstall}/loader/ModuleImporter.d.ts +1 -2
  83. package/dist/{postinstall → types/uapkg/postinstall}/loader/PostinstallLoader.d.ts +1 -2
  84. package/dist/{postinstall → types/uapkg/postinstall}/markers/MarkerBlockEditor.d.ts +1 -2
  85. package/dist/{postinstall → types/uapkg/postinstall}/markers/MarkerBlockService.d.ts +0 -1
  86. package/dist/{postinstall → types/uapkg/postinstall}/markers/MarkerIntegrityValidator.d.ts +0 -1
  87. package/dist/{postinstall → types/uapkg/postinstall}/policy/PostinstallPolicyGate.d.ts +2 -3
  88. package/dist/{postinstall → types/uapkg/postinstall}/runner/PostinstallOrchestrator.d.ts +1 -2
  89. package/dist/{postinstall → types/uapkg/postinstall}/unreal/BuildCsInjector.d.ts +1 -2
  90. package/dist/{postinstall → types/uapkg/postinstall}/unreal/CSharpInjectionEngine.d.ts +0 -1
  91. package/dist/{postinstall → types/uapkg/postinstall}/unreal/CSharpStructureAnalyzer.d.ts +0 -1
  92. package/dist/{postinstall → types/uapkg/postinstall}/unreal/CSharpStructures.d.ts +0 -1
  93. package/dist/{postinstall → types/uapkg/postinstall}/unreal/CSharpWrapperFactory.d.ts +0 -1
  94. package/dist/{postinstall → types/uapkg/postinstall}/unreal/PluginHash.d.ts +0 -1
  95. package/dist/{postinstall → types/uapkg/postinstall}/unreal/PrettyParseError.d.ts +0 -1
  96. package/dist/{postinstall → types/uapkg/postinstall}/unreal/ProjectFileLocator.d.ts +0 -1
  97. package/dist/{postinstall → types/uapkg/postinstall}/unreal/TargetCsInjector.d.ts +1 -2
  98. package/dist/{postinstall → types/uapkg/postinstall}/unreal/UProjectInjector.d.ts +1 -2
  99. package/dist/{postinstall → types/uapkg/postinstall}/unreal/UProjectMetadataReader.d.ts +0 -1
  100. package/dist/{postinstall → types/uapkg/postinstall}/unreal/UnrealSourceCatalog.d.ts +0 -1
  101. package/dist/{prompts → types/uapkg/prompts}/InkPromptService.d.ts +0 -1
  102. package/dist/{prompts → types/uapkg/prompts}/ProjectContextDetector.d.ts +1 -2
  103. package/dist/{prompts → types/uapkg/prompts}/PromptService.d.ts +0 -1
  104. package/dist/{reporting → types/uapkg/reporting}/DiagnosticDeduplicator.d.ts +1 -2
  105. package/dist/{reporting → types/uapkg/reporting}/DiagnosticRenderer.d.ts +1 -2
  106. package/dist/{reporting → types/uapkg/reporting}/DiagnosticReporter.d.ts +1 -2
  107. package/dist/{reporting → types/uapkg/reporting}/InkDiagnosticRenderer.d.ts +2 -3
  108. package/dist/{reporting → types/uapkg/reporting}/InstallProgressReporter.d.ts +1 -2
  109. package/dist/{reporting → types/uapkg/reporting}/JsonReporter.d.ts +1 -2
  110. package/dist/{reporting → types/uapkg/reporting}/RegistryRequestTerminalFormatter.d.ts +0 -1
  111. package/dist/{reporting → types/uapkg/reporting}/TextDiagnosticRenderer.d.ts +1 -2
  112. package/dist/{reporting → types/uapkg/reporting}/TextSink.d.ts +1 -2
  113. package/dist/types/uapkg-common/format/prettyBytes.d.ts +19 -0
  114. package/dist/types/uapkg-common/hash/registryIdentifier.d.ts +28 -0
  115. package/dist/types/uapkg-common/hash/sha256.d.ts +12 -0
  116. package/dist/types/uapkg-common/index.d.ts +10 -0
  117. package/dist/types/uapkg-common/json/safeJsonParse.d.ts +9 -0
  118. package/dist/types/uapkg-common/json/stableStringify.d.ts +9 -0
  119. package/dist/types/uapkg-common/normalize/normalizeUrl.d.ts +11 -0
  120. package/dist/types/uapkg-common/paths/forwardSlash.d.ts +12 -0
  121. package/dist/types/uapkg-common/runtime/UapkgRuntimeProfile.d.ts +19 -0
  122. package/dist/types/uapkg-common/spec/parsePackageSpec.d.ts +21 -0
  123. package/dist/types/uapkg-common-schema/brand/Brand.d.ts +15 -0
  124. package/dist/types/uapkg-common-schema/index.d.ts +17 -0
  125. package/dist/types/uapkg-common-schema/primitives/AssetHash.d.ts +11 -0
  126. package/dist/types/uapkg-common-schema/primitives/ConcurrencyCount.d.ts +11 -0
  127. package/dist/types/uapkg-common-schema/primitives/DurationSeconds.d.ts +11 -0
  128. package/dist/types/uapkg-common-schema/primitives/GitTree.d.ts +10 -0
  129. package/dist/types/uapkg-common-schema/primitives/InstallPath.d.ts +18 -0
  130. package/dist/types/uapkg-common-schema/primitives/OrgName.d.ts +12 -0
  131. package/dist/types/uapkg-common-schema/primitives/PackageName.d.ts +14 -0
  132. package/dist/types/uapkg-common-schema/primitives/PackageSpec.d.ts +21 -0
  133. package/dist/types/uapkg-common-schema/primitives/PackageVersion.d.ts +10 -0
  134. package/dist/types/uapkg-common-schema/primitives/PostInstallPolicy.d.ts +21 -0
  135. package/dist/types/uapkg-common-schema/primitives/RegistryIdentifier.d.ts +15 -0
  136. package/dist/types/uapkg-common-schema/primitives/RegistryName.d.ts +18 -0
  137. package/dist/types/uapkg-common-schema/primitives/RegistryURL.d.ts +10 -0
  138. package/dist/types/uapkg-common-schema/primitives/UnixTimestamp.d.ts +10 -0
  139. package/dist/types/uapkg-common-schema/primitives/VersionRange.d.ts +10 -0
  140. package/dist/types/uapkg-config/contracts/ConfigTypes.d.ts +58 -0
  141. package/dist/types/uapkg-config/core/ConfigInstance.d.ts +43 -0
  142. package/dist/types/uapkg-config/core/ConfigLayerBuilder.d.ts +13 -0
  143. package/dist/types/uapkg-config/core/ConfigResolver.d.ts +19 -0
  144. package/dist/types/uapkg-config/core/ConfigSemanticValidator.d.ts +13 -0
  145. package/dist/types/uapkg-config/core/ConfigWriter.d.ts +25 -0
  146. package/dist/types/uapkg-config/core/PostInstallPolicyResolver.d.ts +22 -0
  147. package/dist/types/uapkg-config/factory/createConfig.d.ts +6 -0
  148. package/dist/types/uapkg-config/files/ConfigFileRepository.d.ts +11 -0
  149. package/dist/types/uapkg-config/files/ConfigPathResolver.d.ts +14 -0
  150. package/dist/types/uapkg-config/index.d.ts +127 -0
  151. package/dist/types/uapkg-config/merge/ConfigMerger.d.ts +10 -0
  152. package/dist/types/uapkg-config/merge/ConfigSchemaMergeEngine.d.ts +26 -0
  153. package/dist/types/uapkg-config/schema/configSchema.d.ts +114 -0
  154. package/dist/types/uapkg-config/schema/pathSchema.d.ts +12 -0
  155. package/dist/types/uapkg-config/schema/runtime/ConfigCliValueParser.d.ts +18 -0
  156. package/dist/types/uapkg-config/schema/runtime/ConfigSchemaIntrospection.d.ts +13 -0
  157. package/dist/types/uapkg-config/schema/runtime/ConfigSchemaRuntime.d.ts +26 -0
  158. package/dist/types/uapkg-config/schema/runtime/ConfigSchemaRuntimeProvider.d.ts +7 -0
  159. package/dist/types/uapkg-diagnostics/base/Diagnostic.d.ts +32 -0
  160. package/dist/types/uapkg-diagnostics/base/DiagnosticBag.d.ts +44 -0
  161. package/dist/types/uapkg-diagnostics/base/DiagnosticFingerprint.d.ts +12 -0
  162. package/dist/types/uapkg-diagnostics/base/DiagnosticLevel.d.ts +11 -0
  163. package/dist/types/uapkg-diagnostics/base/Result.d.ts +26 -0
  164. package/dist/types/uapkg-diagnostics/config/ConfigDiagnostics.d.ts +49 -0
  165. package/dist/types/uapkg-diagnostics/controlPlane/ControlPlaneDiagnostics.d.ts +25 -0
  166. package/dist/types/uapkg-diagnostics/general/GeneralDiagnostics.d.ts +23 -0
  167. package/dist/types/uapkg-diagnostics/index.d.ts +20 -0
  168. package/dist/types/uapkg-diagnostics/installer/InstallerDiagnostics.d.ts +55 -0
  169. package/dist/types/uapkg-diagnostics/manifest/ManifestDiagnostics.d.ts +70 -0
  170. package/dist/types/uapkg-diagnostics/pack/PackDiagnostics.d.ts +49 -0
  171. package/dist/types/uapkg-diagnostics/postinstall/PostinstallDiagnostics.d.ts +47 -0
  172. package/dist/types/uapkg-diagnostics/publishing/PublishingDiagnostics.d.ts +77 -0
  173. package/dist/types/uapkg-diagnostics/registry/RegistryDiagnostics.d.ts +71 -0
  174. package/dist/types/uapkg-diagnostics/registryTools/RegistryToolsDiagnostics.d.ts +130 -0
  175. package/dist/types/uapkg-diagnostics/resolver/ResolverDiagnostics.d.ts +38 -0
  176. package/dist/types/uapkg-diagnostics/safety/SafetyDiagnostics.d.ts +33 -0
  177. package/dist/types/uapkg-diagnostics/spec/SpecDiagnostics.d.ts +23 -0
  178. package/dist/types/uapkg-diagnostics/types.d.ts +37 -0
  179. package/dist/types/uapkg-diagnostics-format/contracts/FormatterTypes.d.ts +23 -0
  180. package/dist/types/uapkg-diagnostics-format/defaults/defaultFormatters.d.ts +8 -0
  181. package/dist/types/uapkg-diagnostics-format/formatters/PlainTextFormatter.d.ts +11 -0
  182. package/dist/types/uapkg-diagnostics-format/formatters/config/configFormatters.d.ts +5 -0
  183. package/dist/types/uapkg-diagnostics-format/formatters/installer/installerFormatters.d.ts +5 -0
  184. package/dist/types/uapkg-diagnostics-format/formatters/manifest/manifestFormatters.d.ts +5 -0
  185. package/dist/types/uapkg-diagnostics-format/formatters/pack/packFormatters.d.ts +5 -0
  186. package/dist/types/uapkg-diagnostics-format/formatters/postinstall/postinstallFormatters.d.ts +5 -0
  187. package/dist/types/uapkg-diagnostics-format/formatters/publishing/publishingFormatters.d.ts +13 -0
  188. package/dist/types/uapkg-diagnostics-format/formatters/registry/registryFormatters.d.ts +5 -0
  189. package/dist/types/uapkg-diagnostics-format/formatters/registryTools/registryToolsFormatters.d.ts +5 -0
  190. package/dist/types/uapkg-diagnostics-format/formatters/resolver/resolverFormatters.d.ts +5 -0
  191. package/dist/types/uapkg-diagnostics-format/formatters/safety/safetyFormatters.d.ts +5 -0
  192. package/dist/types/uapkg-diagnostics-format/formatters/spec/specFormatters.d.ts +5 -0
  193. package/dist/types/uapkg-diagnostics-format/index.d.ts +15 -0
  194. package/dist/types/uapkg-diagnostics-format/ink/components/configInkComponents.d.ts +5 -0
  195. package/dist/types/uapkg-diagnostics-format/ink/components/installerInkComponents.d.ts +5 -0
  196. package/dist/types/uapkg-diagnostics-format/ink/components/manifestInkComponents.d.ts +5 -0
  197. package/dist/types/uapkg-diagnostics-format/ink/components/packInkComponents.d.ts +5 -0
  198. package/dist/types/uapkg-diagnostics-format/ink/components/postinstallInkComponents.d.ts +5 -0
  199. package/dist/types/uapkg-diagnostics-format/ink/components/publishingInkComponents.d.ts +5 -0
  200. package/dist/types/uapkg-diagnostics-format/ink/components/registryInkComponents.d.ts +5 -0
  201. package/dist/types/uapkg-diagnostics-format/ink/components/resolverInkComponents.d.ts +5 -0
  202. package/dist/types/uapkg-diagnostics-format/ink/components/safetyInkComponents.d.ts +5 -0
  203. package/dist/types/uapkg-diagnostics-format/ink/components/specInkComponents.d.ts +5 -0
  204. package/dist/types/uapkg-diagnostics-format/ink/contracts/InkTypes.d.ts +35 -0
  205. package/dist/types/uapkg-diagnostics-format/ink/defaults/defaultInkComponents.d.ts +15 -0
  206. package/dist/types/uapkg-diagnostics-format/ink/index.d.ts +17 -0
  207. package/dist/types/uapkg-diagnostics-format/ink/primitives/HintLine.d.ts +12 -0
  208. package/dist/types/uapkg-diagnostics-format/ink/primitives/PlainTextBody.d.ts +11 -0
  209. package/dist/types/uapkg-diagnostics-format/ink/primitives/SeverityBadge.d.ts +13 -0
  210. package/dist/types/uapkg-diagnostics-format/ink/registry/DiagnosticInkRegistry.d.ts +24 -0
  211. package/dist/types/uapkg-diagnostics-format/ink/views/DiagnosticView.d.ts +21 -0
  212. package/dist/types/uapkg-diagnostics-format/ink/views/DiagnosticsListView.d.ts +16 -0
  213. package/dist/types/uapkg-diagnostics-format/registry/FormatterRegistry.d.ts +26 -0
  214. package/dist/types/uapkg-diagnostics-format/utils/indent.d.ts +7 -0
  215. package/dist/types/uapkg-installer/contracts/InstallerTypes.d.ts +91 -0
  216. package/dist/types/uapkg-installer/contracts/SafetyPolicyTypes.d.ts +43 -0
  217. package/dist/types/uapkg-installer/contracts/StatusStreamTypes.d.ts +42 -0
  218. package/dist/types/uapkg-installer/core/ClaimsVerifier.d.ts +22 -0
  219. package/dist/types/uapkg-installer/core/DiskStateInspector.d.ts +29 -0
  220. package/dist/types/uapkg-installer/core/InstallPlanner.d.ts +35 -0
  221. package/dist/types/uapkg-installer/core/Installer.d.ts +61 -0
  222. package/dist/types/uapkg-installer/core/IntegrityVerifier.d.ts +16 -0
  223. package/dist/types/uapkg-installer/core/PackageDownloader.d.ts +40 -0
  224. package/dist/types/uapkg-installer/core/PackageExtractor.d.ts +20 -0
  225. package/dist/types/uapkg-installer/core/PackageRemover.d.ts +14 -0
  226. package/dist/types/uapkg-installer/index.d.ts +16 -0
  227. package/dist/types/uapkg-installer/safety/NoMarkerPolicy.d.ts +17 -0
  228. package/dist/types/uapkg-installer/safety/SafetyPolicyRegistry.d.ts +32 -0
  229. package/dist/types/uapkg-installer/status/SlotTable.d.ts +36 -0
  230. package/dist/types/uapkg-installer/status/StatusStream.d.ts +25 -0
  231. package/dist/types/uapkg-log/contracts/LoggerTypes.d.ts +22 -0
  232. package/dist/types/uapkg-log/core/LogLevelPolicy.d.ts +15 -0
  233. package/dist/types/uapkg-log/core/LoggerFactory.d.ts +11 -0
  234. package/dist/types/uapkg-log/core/LoggerInstance.d.ts +17 -0
  235. package/dist/types/uapkg-log/core/WinstonLoggerAdapter.d.ts +8 -0
  236. package/dist/types/uapkg-log/index.d.ts +8 -0
  237. package/dist/types/uapkg-pack/contracts/PackTypes.d.ts +29 -0
  238. package/dist/types/uapkg-pack/core/FileCrawler.d.ts +12 -0
  239. package/dist/types/uapkg-pack/core/IgnoreEvaluator.d.ts +7 -0
  240. package/dist/types/uapkg-pack/core/IgnoreRuleLoader.d.ts +14 -0
  241. package/dist/types/uapkg-pack/core/IntegrityWriter.d.ts +6 -0
  242. package/dist/types/uapkg-pack/core/LFSPointerDetector.d.ts +6 -0
  243. package/dist/types/uapkg-pack/core/PackArtifactExcluder.d.ts +11 -0
  244. package/dist/types/uapkg-pack/core/PackManifestReader.d.ts +8 -0
  245. package/dist/types/uapkg-pack/core/PackService.d.ts +32 -0
  246. package/dist/types/uapkg-pack/core/PluginDescriptorGuard.d.ts +11 -0
  247. package/dist/types/uapkg-pack/core/PluginRootResolver.d.ts +14 -0
  248. package/dist/types/uapkg-pack/core/TarArchiveWriter.d.ts +11 -0
  249. package/dist/types/uapkg-pack/index.d.ts +7 -0
  250. package/dist/types/uapkg-package-claims/archive/PackagedManifestReader.d.ts +28 -0
  251. package/dist/types/uapkg-package-claims/claims/ClaimsComparison.d.ts +44 -0
  252. package/dist/types/uapkg-package-claims/claims/PackageClaims.d.ts +9 -0
  253. package/dist/types/uapkg-package-claims/index.d.ts +7 -0
  254. package/dist/types/uapkg-package-claims/json/CanonicalJson.d.ts +17 -0
  255. package/dist/types/uapkg-package-claims/schema/PackageClaimsSchema.d.ts +27 -0
  256. package/dist/types/uapkg-package-claims/schema/index.d.ts +2 -0
  257. package/dist/types/uapkg-package-manifest/contracts/ManifestTypes.d.ts +37 -0
  258. package/dist/types/uapkg-package-manifest/core/DependencyMutator.d.ts +48 -0
  259. package/dist/types/uapkg-package-manifest/core/DevDependencyPolicy.d.ts +30 -0
  260. package/dist/types/uapkg-package-manifest/core/InstallPathResolver.d.ts +35 -0
  261. package/dist/types/uapkg-package-manifest/core/LockfileDiffer.d.ts +40 -0
  262. package/dist/types/uapkg-package-manifest/core/LockfileSyncIssue.d.ts +11 -0
  263. package/dist/types/uapkg-package-manifest/core/LockfileSyncValidator.d.ts +26 -0
  264. package/dist/types/uapkg-package-manifest/core/OutdatedChecker.d.ts +36 -0
  265. package/dist/types/uapkg-package-manifest/core/PackageManifest.d.ts +63 -0
  266. package/dist/types/uapkg-package-manifest/core/WhyGraph.d.ts +31 -0
  267. package/dist/types/uapkg-package-manifest/index.d.ts +18 -0
  268. package/dist/types/uapkg-package-manifest/io/LockfileReader.d.ts +12 -0
  269. package/dist/types/uapkg-package-manifest/io/LockfileSyncIssueWriter.d.ts +12 -0
  270. package/dist/types/uapkg-package-manifest/io/LockfileWriter.d.ts +11 -0
  271. package/dist/types/uapkg-package-manifest/io/ManifestReader.d.ts +12 -0
  272. package/dist/types/uapkg-package-manifest/io/ManifestWriter.d.ts +13 -0
  273. package/dist/types/uapkg-package-manifest/resolver/LockfileSync.d.ts +13 -0
  274. package/dist/types/uapkg-package-manifest/resolver/Resolver.d.ts +16 -0
  275. package/dist/types/uapkg-package-manifest-schema/index.d.ts +10 -0
  276. package/dist/types/uapkg-package-manifest-schema/lockfile/LockDependencySchema.d.ts +15 -0
  277. package/dist/types/uapkg-package-manifest-schema/lockfile/LockfileSchema.d.ts +22 -0
  278. package/dist/types/uapkg-package-manifest-schema/manifest/BaseManifestSchema.d.ts +56 -0
  279. package/dist/types/uapkg-package-manifest-schema/manifest/DependencySchema.d.ts +57 -0
  280. package/dist/types/uapkg-package-manifest-schema/manifest/ManifestKind.d.ts +17 -0
  281. package/dist/types/uapkg-package-manifest-schema/manifest/ManifestSchema.d.ts +106 -0
  282. package/dist/types/uapkg-package-manifest-schema/manifest/PluginManifestSchema.d.ts +52 -0
  283. package/dist/types/uapkg-package-manifest-schema/manifest/ProjectManifestSchema.d.ts +80 -0
  284. package/dist/types/uapkg-package-manifest-schema/manifest/PublishSchema.d.ts +15 -0
  285. package/dist/types/uapkg-registry-core/contracts/RegistryCoreTypes.d.ts +54 -0
  286. package/dist/types/uapkg-registry-core/core/RegistryCore.d.ts +26 -0
  287. package/dist/types/uapkg-registry-core/index.d.ts +14 -0
  288. package/dist/types/uapkg-registry-core/paths/RegistryPaths.d.ts +15 -0
  289. package/dist/types/uapkg-registry-core/registry/GitRunner.d.ts +31 -0
  290. package/dist/types/uapkg-registry-core/registry/Registry.d.ts +46 -0
  291. package/dist/types/uapkg-registry-core/registry/RegistryCacheValidator.d.ts +21 -0
  292. package/dist/types/uapkg-registry-core/registry/RegistryLock.d.ts +27 -0
  293. package/dist/types/uapkg-registry-core/registry/RegistryMetadataReader.d.ts +18 -0
  294. package/dist/types/uapkg-registry-core/registry/RegistryPackageReader.d.ts +24 -0
  295. package/dist/types/uapkg-registry-core/registry/RegistrySyncPolicy.d.ts +14 -0
  296. package/dist/types/uapkg-registry-core/registry/RegistryUpdater.d.ts +23 -0
  297. package/dist/types/uapkg-registry-core/registry/RegistryUrlSanitizer.d.ts +10 -0
  298. package/dist/types/uapkg-registry-core/resolution/PackageResolver.d.ts +21 -0
  299. package/dist/types/uapkg-registry-core/resolution/SemverSelectionPolicy.d.ts +36 -0
  300. package/dist/types/uapkg-registry-schema/index.d.ts +9 -0
  301. package/dist/types/uapkg-registry-schema/paths/RegistryPackagePath.d.ts +15 -0
  302. package/dist/types/uapkg-registry-schema/schemas/IntegritySchema.d.ts +12 -0
  303. package/dist/types/uapkg-registry-schema/schemas/PackageRegistryManifestSchema.d.ts +108 -0
  304. package/dist/types/uapkg-registry-schema/schemas/PackageSourceSchema.d.ts +12 -0
  305. package/dist/types/uapkg-registry-schema/schemas/RegistryAssetSchema.d.ts +15 -0
  306. package/dist/types/uapkg-registry-schema/schemas/RegistryDependencySchema.d.ts +36 -0
  307. package/dist/types/uapkg-registry-schema/schemas/RegistryMetaSchema.d.ts +29 -0
  308. package/dist/types/uapkg-registry-schema/schemas/RegistryVersionSchema.d.ts +71 -0
  309. package/dist/types/uapkg-registry-tools/aggregator/RegistryToolsAggregator.d.ts +45 -0
  310. package/dist/types/uapkg-registry-tools/contracts/RegistryToolsTypes.d.ts +116 -0
  311. package/dist/types/uapkg-registry-tools/index.d.ts +18 -0
  312. package/dist/types/uapkg-registry-tools/io/IntegrityCalculator.d.ts +20 -0
  313. package/dist/types/uapkg-registry-tools/io/ManifestStore.d.ts +41 -0
  314. package/dist/types/uapkg-registry-tools/listing/PackageLister.d.ts +22 -0
  315. package/dist/types/uapkg-registry-tools/mutation/AddPackageVersionPlanner.d.ts +25 -0
  316. package/dist/types/uapkg-registry-tools/mutation/RemovePackagePlanner.d.ts +22 -0
  317. package/dist/types/uapkg-registry-tools/mutation/RemovePackageVersionPlanner.d.ts +21 -0
  318. package/dist/types/uapkg-registry-tools/mutation/VersionSorter.d.ts +10 -0
  319. package/dist/types/uapkg-registry-tools/paths/RegistryRepoPaths.d.ts +23 -0
  320. package/dist/types/uapkg-registry-tools/tools/RegistryTools.d.ts +64 -0
  321. package/dist/types/uapkg-registry-tools/validation/DependencyReachabilityValidator.d.ts +24 -0
  322. package/dist/types/uapkg-registry-tools/validation/ExternalRegistryPolicyValidator.d.ts +22 -0
  323. package/dist/types/uapkg-registry-tools/validation/ManifestValidator.d.ts +16 -0
  324. package/dist/types/uapkg-registry-tools/validation/OfficialRegistryPolicyValidator.d.ts +34 -0
  325. package/dist/types/uapkg-registry-tools/validation/RegistryValidator.d.ts +31 -0
  326. package/dist/types/uapkg-registry-tools/validation/ReleaseFileNameValidator.d.ts +21 -0
  327. package/package.json +21 -36
  328. package/dist/app/CompositionRoot.d.ts.map +0 -1
  329. package/dist/app/CompositionRoot.js +0 -93
  330. package/dist/app/CompositionRoot.js.map +0 -1
  331. package/dist/app/UAPKGApplication.d.ts.map +0 -1
  332. package/dist/app/UAPKGApplication.js +0 -157
  333. package/dist/app/UAPKGApplication.js.map +0 -1
  334. package/dist/build/BuildMetadata.d.ts.map +0 -1
  335. package/dist/cli/UAPKGCommandLine.d.ts.map +0 -1
  336. package/dist/cli/UAPKGCommandLine.js +0 -250
  337. package/dist/cli/UAPKGCommandLine.js.map +0 -1
  338. package/dist/cli/parseCommandLine.d.ts.map +0 -1
  339. package/dist/cli/parseCommandLine.js +0 -11
  340. package/dist/cli/parseCommandLine.js.map +0 -1
  341. package/dist/cli/parsing/UAPKGCommandLineParser.d.ts.map +0 -1
  342. package/dist/cli/parsing/UAPKGCommandLineParser.js +0 -24
  343. package/dist/cli/parsing/UAPKGCommandLineParser.js.map +0 -1
  344. package/dist/cli/parsing/UAPKGParserRegistry.d.ts.map +0 -1
  345. package/dist/cli/parsing/UAPKGParserRegistry.js +0 -54
  346. package/dist/cli/parsing/UAPKGParserRegistry.js.map +0 -1
  347. package/dist/cli/parsing/contracts/UAPKGCommandModule.d.ts.map +0 -1
  348. package/dist/cli/parsing/contracts/UAPKGCommandModule.js +0 -1
  349. package/dist/cli/parsing/modules/AddCommandModule.d.ts.map +0 -1
  350. package/dist/cli/parsing/modules/AddCommandModule.js +0 -50
  351. package/dist/cli/parsing/modules/AddCommandModule.js.map +0 -1
  352. package/dist/cli/parsing/modules/ConfigCommandModule.d.ts.map +0 -1
  353. package/dist/cli/parsing/modules/ConfigCommandModule.js +0 -88
  354. package/dist/cli/parsing/modules/ConfigCommandModule.js.map +0 -1
  355. package/dist/cli/parsing/modules/InitCommandModule.d.ts.map +0 -1
  356. package/dist/cli/parsing/modules/InitCommandModule.js +0 -26
  357. package/dist/cli/parsing/modules/InitCommandModule.js.map +0 -1
  358. package/dist/cli/parsing/modules/InstallCommandModule.d.ts.map +0 -1
  359. package/dist/cli/parsing/modules/InstallCommandModule.js +0 -37
  360. package/dist/cli/parsing/modules/InstallCommandModule.js.map +0 -1
  361. package/dist/cli/parsing/modules/LifecycleCommandModule.d.ts.map +0 -1
  362. package/dist/cli/parsing/modules/LifecycleCommandModule.js +0 -84
  363. package/dist/cli/parsing/modules/LifecycleCommandModule.js.map +0 -1
  364. package/dist/cli/parsing/modules/ListCommandModule.d.ts.map +0 -1
  365. package/dist/cli/parsing/modules/ListCommandModule.js +0 -27
  366. package/dist/cli/parsing/modules/ListCommandModule.js.map +0 -1
  367. package/dist/cli/parsing/modules/LoginCommandModule.d.ts.map +0 -1
  368. package/dist/cli/parsing/modules/LoginCommandModule.js +0 -35
  369. package/dist/cli/parsing/modules/LoginCommandModule.js.map +0 -1
  370. package/dist/cli/parsing/modules/LogoutCommandModule.d.ts.map +0 -1
  371. package/dist/cli/parsing/modules/LogoutCommandModule.js +0 -31
  372. package/dist/cli/parsing/modules/LogoutCommandModule.js.map +0 -1
  373. package/dist/cli/parsing/modules/OutdatedCommandModule.d.ts.map +0 -1
  374. package/dist/cli/parsing/modules/OutdatedCommandModule.js +0 -22
  375. package/dist/cli/parsing/modules/OutdatedCommandModule.js.map +0 -1
  376. package/dist/cli/parsing/modules/PackCommandModule.d.ts.map +0 -1
  377. package/dist/cli/parsing/modules/PackCommandModule.js +0 -31
  378. package/dist/cli/parsing/modules/PackCommandModule.js.map +0 -1
  379. package/dist/cli/parsing/modules/ProjectGetNameCommandModule.d.ts.map +0 -1
  380. package/dist/cli/parsing/modules/ProjectGetNameCommandModule.js +0 -15
  381. package/dist/cli/parsing/modules/ProjectGetNameCommandModule.js.map +0 -1
  382. package/dist/cli/parsing/modules/PublishCommandModule.d.ts.map +0 -1
  383. package/dist/cli/parsing/modules/PublishCommandModule.js +0 -66
  384. package/dist/cli/parsing/modules/PublishCommandModule.js.map +0 -1
  385. package/dist/cli/parsing/modules/RegistryCommandModule.d.ts.map +0 -1
  386. package/dist/cli/parsing/modules/RegistryCommandModule.js +0 -118
  387. package/dist/cli/parsing/modules/RegistryCommandModule.js.map +0 -1
  388. package/dist/cli/parsing/modules/RemoveCommandModule.d.ts.map +0 -1
  389. package/dist/cli/parsing/modules/RemoveCommandModule.js +0 -26
  390. package/dist/cli/parsing/modules/RemoveCommandModule.js.map +0 -1
  391. package/dist/cli/parsing/modules/RequestsCommandModule.d.ts.map +0 -1
  392. package/dist/cli/parsing/modules/RequestsCommandModule.js +0 -59
  393. package/dist/cli/parsing/modules/RequestsCommandModule.js.map +0 -1
  394. package/dist/cli/parsing/modules/UpdateCommandModule.d.ts.map +0 -1
  395. package/dist/cli/parsing/modules/UpdateCommandModule.js +0 -39
  396. package/dist/cli/parsing/modules/UpdateCommandModule.js.map +0 -1
  397. package/dist/cli/parsing/modules/WhoamiCommandModule.d.ts.map +0 -1
  398. package/dist/cli/parsing/modules/WhoamiCommandModule.js +0 -31
  399. package/dist/cli/parsing/modules/WhoamiCommandModule.js.map +0 -1
  400. package/dist/cli/parsing/modules/WhyCommandModule.d.ts.map +0 -1
  401. package/dist/cli/parsing/modules/WhyCommandModule.js +0 -26
  402. package/dist/cli/parsing/modules/WhyCommandModule.js.map +0 -1
  403. package/dist/cli/parsing/modules/sharedOptions.d.ts.map +0 -1
  404. package/dist/cli/parsing/modules/sharedOptions.js +0 -21
  405. package/dist/cli/parsing/modules/sharedOptions.js.map +0 -1
  406. package/dist/cli/runUAPKGCLI.d.ts.map +0 -1
  407. package/dist/cli/runUAPKGCLI.js +0 -12
  408. package/dist/cli/runUAPKGCLI.js.map +0 -1
  409. package/dist/cli-bootstrap.js.map +0 -1
  410. package/dist/commands/AddCommand.d.ts.map +0 -1
  411. package/dist/commands/AddCommand.js +0 -51
  412. package/dist/commands/AddCommand.js.map +0 -1
  413. package/dist/commands/Command.d.ts.map +0 -1
  414. package/dist/commands/Command.js +0 -1
  415. package/dist/commands/ConfigCommand.d.ts.map +0 -1
  416. package/dist/commands/ConfigCommand.js +0 -166
  417. package/dist/commands/ConfigCommand.js.map +0 -1
  418. package/dist/commands/InitCommand.d.ts.map +0 -1
  419. package/dist/commands/InitCommand.js +0 -66
  420. package/dist/commands/InitCommand.js.map +0 -1
  421. package/dist/commands/InstallCommand.d.ts.map +0 -1
  422. package/dist/commands/InstallCommand.js +0 -120
  423. package/dist/commands/InstallCommand.js.map +0 -1
  424. package/dist/commands/ListCommand.d.ts.map +0 -1
  425. package/dist/commands/ListCommand.js +0 -78
  426. package/dist/commands/ListCommand.js.map +0 -1
  427. package/dist/commands/LoginCommand.d.ts.map +0 -1
  428. package/dist/commands/LoginCommand.js +0 -67
  429. package/dist/commands/LoginCommand.js.map +0 -1
  430. package/dist/commands/LogoutCommand.d.ts.map +0 -1
  431. package/dist/commands/LogoutCommand.js +0 -37
  432. package/dist/commands/LogoutCommand.js.map +0 -1
  433. package/dist/commands/OutdatedCommand.d.ts.map +0 -1
  434. package/dist/commands/OutdatedCommand.js +0 -43
  435. package/dist/commands/OutdatedCommand.js.map +0 -1
  436. package/dist/commands/PackCommand.d.ts.map +0 -1
  437. package/dist/commands/PackCommand.js +0 -27
  438. package/dist/commands/PackCommand.js.map +0 -1
  439. package/dist/commands/PackageLifecycleCommand.d.ts.map +0 -1
  440. package/dist/commands/PackageLifecycleCommand.js +0 -149
  441. package/dist/commands/PackageLifecycleCommand.js.map +0 -1
  442. package/dist/commands/PostinstallCandidateBuilder.d.ts.map +0 -1
  443. package/dist/commands/PostinstallCandidateBuilder.js +0 -44
  444. package/dist/commands/PostinstallCandidateBuilder.js.map +0 -1
  445. package/dist/commands/ProjectGetNameCommand.d.ts.map +0 -1
  446. package/dist/commands/ProjectGetNameCommand.js +0 -26
  447. package/dist/commands/ProjectGetNameCommand.js.map +0 -1
  448. package/dist/commands/PublishCommand.d.ts.map +0 -1
  449. package/dist/commands/PublishCommand.js +0 -259
  450. package/dist/commands/PublishCommand.js.map +0 -1
  451. package/dist/commands/RegistryCommand.d.ts.map +0 -1
  452. package/dist/commands/RegistryCommand.js +0 -197
  453. package/dist/commands/RegistryCommand.js.map +0 -1
  454. package/dist/commands/RemoveCommand.d.ts.map +0 -1
  455. package/dist/commands/RemoveCommand.js +0 -48
  456. package/dist/commands/RemoveCommand.js.map +0 -1
  457. package/dist/commands/RequestsCommand.d.ts.map +0 -1
  458. package/dist/commands/RequestsCommand.js +0 -85
  459. package/dist/commands/RequestsCommand.js.map +0 -1
  460. package/dist/commands/UpdateCommand.d.ts.map +0 -1
  461. package/dist/commands/UpdateCommand.js +0 -113
  462. package/dist/commands/UpdateCommand.js.map +0 -1
  463. package/dist/commands/WhoamiCommand.d.ts.map +0 -1
  464. package/dist/commands/WhoamiCommand.js +0 -66
  465. package/dist/commands/WhoamiCommand.js.map +0 -1
  466. package/dist/commands/WhyCommand.d.ts.map +0 -1
  467. package/dist/commands/WhyCommand.js +0 -47
  468. package/dist/commands/WhyCommand.js.map +0 -1
  469. package/dist/commands/add/DependencyAddResolver.d.ts.map +0 -1
  470. package/dist/commands/add/DependencyAddResolver.js +0 -38
  471. package/dist/commands/add/DependencyAddResolver.js.map +0 -1
  472. package/dist/control-plane/AccountManager.d.ts.map +0 -1
  473. package/dist/control-plane/AccountManager.js +0 -822
  474. package/dist/control-plane/AccountManager.js.map +0 -1
  475. package/dist/control-plane/ArtifactObserver.d.ts.map +0 -1
  476. package/dist/control-plane/ArtifactObserver.js +0 -77
  477. package/dist/control-plane/ArtifactObserver.js.map +0 -1
  478. package/dist/control-plane/AuthMetadataStore.d.ts.map +0 -1
  479. package/dist/control-plane/AuthMetadataStore.js +0 -114
  480. package/dist/control-plane/AuthMetadataStore.js.map +0 -1
  481. package/dist/control-plane/AuthStoragePaths.d.ts.map +0 -1
  482. package/dist/control-plane/AuthStoragePaths.js +0 -22
  483. package/dist/control-plane/AuthStoragePaths.js.map +0 -1
  484. package/dist/control-plane/AuthenticationSelector.d.ts.map +0 -1
  485. package/dist/control-plane/AuthenticationSelector.js +0 -70
  486. package/dist/control-plane/AuthenticationSelector.js.map +0 -1
  487. package/dist/control-plane/ControlPlaneClient.d.ts.map +0 -1
  488. package/dist/control-plane/ControlPlaneClient.js +0 -291
  489. package/dist/control-plane/ControlPlaneClient.js.map +0 -1
  490. package/dist/control-plane/ControlPlaneEndpoints.d.ts.map +0 -1
  491. package/dist/control-plane/ControlPlaneEndpoints.js +0 -24
  492. package/dist/control-plane/ControlPlaneEndpoints.js.map +0 -1
  493. package/dist/control-plane/ControlPlaneTypes.d.ts.map +0 -1
  494. package/dist/control-plane/ControlPlaneTypes.js +0 -100
  495. package/dist/control-plane/ControlPlaneTypes.js.map +0 -1
  496. package/dist/control-plane/CredentialStore.d.ts.map +0 -1
  497. package/dist/control-plane/CredentialStore.js +0 -70
  498. package/dist/control-plane/CredentialStore.js.map +0 -1
  499. package/dist/control-plane/DPoPKeyStore.d.ts.map +0 -1
  500. package/dist/control-plane/DPoPKeyStore.js +0 -58
  501. package/dist/control-plane/DPoPKeyStore.js.map +0 -1
  502. package/dist/control-plane/GitHubActionsOidcCredentialProvider.d.ts.map +0 -1
  503. package/dist/control-plane/GitHubActionsOidcCredentialProvider.js +0 -201
  504. package/dist/control-plane/GitHubActionsOidcCredentialProvider.js.map +0 -1
  505. package/dist/control-plane/PublishIdempotencyStore.d.ts.map +0 -1
  506. package/dist/control-plane/PublishIdempotencyStore.js +0 -100
  507. package/dist/control-plane/PublishIdempotencyStore.js.map +0 -1
  508. package/dist/control-plane/PublishRequestErrorMapper.d.ts.map +0 -1
  509. package/dist/control-plane/PublishRequestErrorMapper.js +0 -597
  510. package/dist/control-plane/PublishRequestErrorMapper.js.map +0 -1
  511. package/dist/control-plane/RegistryGrantLock.d.ts.map +0 -1
  512. package/dist/control-plane/RegistryGrantLock.js +0 -163
  513. package/dist/control-plane/RegistryGrantLock.js.map +0 -1
  514. package/dist/control-plane/RegistryTrustResolver.d.ts.map +0 -1
  515. package/dist/control-plane/RegistryTrustResolver.js +0 -105
  516. package/dist/control-plane/RegistryTrustResolver.js.map +0 -1
  517. package/dist/postinstall/api/PostinstallDsl.d.ts.map +0 -1
  518. package/dist/postinstall/api/PostinstallDsl.js +0 -36
  519. package/dist/postinstall/api/PostinstallDsl.js.map +0 -1
  520. package/dist/postinstall/api/definePostinstall.d.ts.map +0 -1
  521. package/dist/postinstall/api/definePostinstall.js +0 -23
  522. package/dist/postinstall/api/definePostinstall.js.map +0 -1
  523. package/dist/postinstall/index.js +0 -25
  524. package/dist/postinstall/loader/EntryResolver.d.ts.map +0 -1
  525. package/dist/postinstall/loader/EntryResolver.js +0 -39
  526. package/dist/postinstall/loader/EntryResolver.js.map +0 -1
  527. package/dist/postinstall/loader/EsbuildTranspiler.d.ts.map +0 -1
  528. package/dist/postinstall/loader/EsbuildTranspiler.js +0 -54
  529. package/dist/postinstall/loader/EsbuildTranspiler.js.map +0 -1
  530. package/dist/postinstall/loader/ExportValidator.d.ts.map +0 -1
  531. package/dist/postinstall/loader/ExportValidator.js +0 -38
  532. package/dist/postinstall/loader/ExportValidator.js.map +0 -1
  533. package/dist/postinstall/loader/ModuleImporter.d.ts.map +0 -1
  534. package/dist/postinstall/loader/ModuleImporter.js +0 -52
  535. package/dist/postinstall/loader/ModuleImporter.js.map +0 -1
  536. package/dist/postinstall/loader/PostinstallLoader.d.ts.map +0 -1
  537. package/dist/postinstall/loader/PostinstallLoader.js +0 -64
  538. package/dist/postinstall/loader/PostinstallLoader.js.map +0 -1
  539. package/dist/postinstall/markers/MarkerBlockEditor.d.ts.map +0 -1
  540. package/dist/postinstall/markers/MarkerBlockEditor.js +0 -50
  541. package/dist/postinstall/markers/MarkerBlockEditor.js.map +0 -1
  542. package/dist/postinstall/markers/MarkerBlockService.d.ts.map +0 -1
  543. package/dist/postinstall/markers/MarkerBlockService.js +0 -46
  544. package/dist/postinstall/markers/MarkerBlockService.js.map +0 -1
  545. package/dist/postinstall/markers/MarkerIntegrityValidator.d.ts.map +0 -1
  546. package/dist/postinstall/markers/MarkerIntegrityValidator.js +0 -48
  547. package/dist/postinstall/markers/MarkerIntegrityValidator.js.map +0 -1
  548. package/dist/postinstall/policy/PostinstallPolicyGate.d.ts.map +0 -1
  549. package/dist/postinstall/policy/PostinstallPolicyGate.js +0 -68
  550. package/dist/postinstall/policy/PostinstallPolicyGate.js.map +0 -1
  551. package/dist/postinstall/runner/PostinstallOrchestrator.d.ts.map +0 -1
  552. package/dist/postinstall/runner/PostinstallOrchestrator.js +0 -174
  553. package/dist/postinstall/runner/PostinstallOrchestrator.js.map +0 -1
  554. package/dist/postinstall/unreal/BuildCsInjector.d.ts.map +0 -1
  555. package/dist/postinstall/unreal/BuildCsInjector.js +0 -60
  556. package/dist/postinstall/unreal/BuildCsInjector.js.map +0 -1
  557. package/dist/postinstall/unreal/CSharpInjectionEngine.d.ts.map +0 -1
  558. package/dist/postinstall/unreal/CSharpInjectionEngine.js +0 -58
  559. package/dist/postinstall/unreal/CSharpInjectionEngine.js.map +0 -1
  560. package/dist/postinstall/unreal/CSharpStructureAnalyzer.d.ts.map +0 -1
  561. package/dist/postinstall/unreal/CSharpStructureAnalyzer.js +0 -126
  562. package/dist/postinstall/unreal/CSharpStructureAnalyzer.js.map +0 -1
  563. package/dist/postinstall/unreal/CSharpStructures.d.ts.map +0 -1
  564. package/dist/postinstall/unreal/CSharpStructures.js +0 -1
  565. package/dist/postinstall/unreal/CSharpWrapperFactory.d.ts.map +0 -1
  566. package/dist/postinstall/unreal/CSharpWrapperFactory.js +0 -56
  567. package/dist/postinstall/unreal/CSharpWrapperFactory.js.map +0 -1
  568. package/dist/postinstall/unreal/PluginHash.d.ts.map +0 -1
  569. package/dist/postinstall/unreal/PluginHash.js +0 -18
  570. package/dist/postinstall/unreal/PluginHash.js.map +0 -1
  571. package/dist/postinstall/unreal/PrettyParseError.d.ts.map +0 -1
  572. package/dist/postinstall/unreal/PrettyParseError.js +0 -43
  573. package/dist/postinstall/unreal/PrettyParseError.js.map +0 -1
  574. package/dist/postinstall/unreal/ProjectFileLocator.d.ts.map +0 -1
  575. package/dist/postinstall/unreal/ProjectFileLocator.js +0 -51
  576. package/dist/postinstall/unreal/ProjectFileLocator.js.map +0 -1
  577. package/dist/postinstall/unreal/TargetCsInjector.d.ts.map +0 -1
  578. package/dist/postinstall/unreal/TargetCsInjector.js +0 -60
  579. package/dist/postinstall/unreal/TargetCsInjector.js.map +0 -1
  580. package/dist/postinstall/unreal/UProjectInjector.d.ts.map +0 -1
  581. package/dist/postinstall/unreal/UProjectInjector.js +0 -58
  582. package/dist/postinstall/unreal/UProjectInjector.js.map +0 -1
  583. package/dist/postinstall/unreal/UProjectMetadataReader.d.ts.map +0 -1
  584. package/dist/postinstall/unreal/UProjectMetadataReader.js +0 -24
  585. package/dist/postinstall/unreal/UProjectMetadataReader.js.map +0 -1
  586. package/dist/postinstall/unreal/UnrealSourceCatalog.d.ts.map +0 -1
  587. package/dist/postinstall/unreal/UnrealSourceCatalog.js +0 -52
  588. package/dist/postinstall/unreal/UnrealSourceCatalog.js.map +0 -1
  589. package/dist/prompts/InkPromptService.d.ts.map +0 -1
  590. package/dist/prompts/InkPromptService.js +0 -105
  591. package/dist/prompts/InkPromptService.js.map +0 -1
  592. package/dist/prompts/ProjectContextDetector.d.ts.map +0 -1
  593. package/dist/prompts/ProjectContextDetector.js +0 -33
  594. package/dist/prompts/ProjectContextDetector.js.map +0 -1
  595. package/dist/prompts/PromptService.d.ts.map +0 -1
  596. package/dist/prompts/PromptService.js +0 -1
  597. package/dist/reporting/DiagnosticDeduplicator.d.ts.map +0 -1
  598. package/dist/reporting/DiagnosticDeduplicator.js +0 -38
  599. package/dist/reporting/DiagnosticDeduplicator.js.map +0 -1
  600. package/dist/reporting/DiagnosticRenderer.d.ts.map +0 -1
  601. package/dist/reporting/DiagnosticRenderer.js +0 -1
  602. package/dist/reporting/DiagnosticReporter.d.ts.map +0 -1
  603. package/dist/reporting/DiagnosticReporter.js +0 -42
  604. package/dist/reporting/DiagnosticReporter.js.map +0 -1
  605. package/dist/reporting/InkDiagnosticRenderer.d.ts.map +0 -1
  606. package/dist/reporting/InkDiagnosticRenderer.js +0 -52
  607. package/dist/reporting/InkDiagnosticRenderer.js.map +0 -1
  608. package/dist/reporting/InstallProgressReporter.d.ts.map +0 -1
  609. package/dist/reporting/InstallProgressReporter.js +0 -50
  610. package/dist/reporting/InstallProgressReporter.js.map +0 -1
  611. package/dist/reporting/JsonReporter.d.ts.map +0 -1
  612. package/dist/reporting/JsonReporter.js +0 -36
  613. package/dist/reporting/JsonReporter.js.map +0 -1
  614. package/dist/reporting/RegistryRequestTerminalFormatter.d.ts.map +0 -1
  615. package/dist/reporting/RegistryRequestTerminalFormatter.js +0 -90
  616. package/dist/reporting/RegistryRequestTerminalFormatter.js.map +0 -1
  617. package/dist/reporting/TextDiagnosticRenderer.d.ts.map +0 -1
  618. package/dist/reporting/TextDiagnosticRenderer.js +0 -38
  619. package/dist/reporting/TextDiagnosticRenderer.js.map +0 -1
  620. package/dist/reporting/TextSink.d.ts.map +0 -1
  621. package/dist/reporting/TextSink.js +0 -29
  622. package/dist/reporting/TextSink.js.map +0 -1
  623. /package/dist/{cli-bootstrap.d.ts → types/uapkg/cli-bootstrap.d.ts} +0 -0
  624. /package/dist/{index.d.ts → types/uapkg/index.d.ts} +0 -0
  625. /package/dist/{postinstall → types/uapkg/postinstall}/index.d.ts +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"PublishRequestErrorMapper.js","names":[],"sources":["../../src/control-plane/PublishRequestErrorMapper.ts"],"sourcesContent":["import {\n createPublishRequestFailedDiagnostic,\n type PublishDiagnosticFact,\n type PublishDiagnosticResource,\n type PublishRequestFailedDiagnostic,\n} from '@uapkg/diagnostics';\nimport { z } from 'zod';\nimport { ControlPlaneError } from './ControlPlaneTypes.js';\n\nconst SERVER_CODE_PATTERN = /^[A-Z][A-Z0-9_]{0,127}$/u;\n\nconst boundedText = (maximumLength: number) =>\n z\n .string()\n .trim()\n .min(1)\n .max(maximumLength)\n .refine((value) => !hasUnsafeDisplayCharacter(value));\nconst packageNameSchema = boundedText(214);\nconst packageVersionSchema = boundedText(256);\nconst ownerNameSchema = boundedText(100).regex(/^[A-Za-z0-9][A-Za-z0-9_-]*$/u);\nconst repositorySchema = boundedText(255).regex(/^[A-Za-z0-9_.-]+\\/[A-Za-z0-9_.-]+$/u);\nconst requestIdSchema = boundedText(128).regex(/^[A-Za-z0-9][A-Za-z0-9._:-]*$/u);\nconst accessModeSchema = z.enum(['none', 'selected', 'all']);\nconst missingCapabilitiesSchema = z\n .array(z.enum(['package.publish', 'publishing.request.create']))\n .max(10)\n .transform((values) => [...new Set(values)]);\nconst missingOAuthScopesSchema = z\n .array(z.enum(['publishing.request.create', 'publishing.request.read.self']))\n .max(2)\n .transform((values) => [...new Set(values)]);\nconst ownerNamesSchema = z\n .array(ownerNameSchema)\n .max(20)\n .transform((values) => [...new Set(values)].sort());\n\nconst emptyDetailsSchema = z.object({});\nconst packageDetailsSchema = z.object({ packageName: packageNameSchema.optional() });\nconst ownerRequiredDetailsSchema = packageDetailsSchema;\nconst requestedOwnerDetailsSchema = packageDetailsSchema.extend({\n requestedOwnerOrganizationName: ownerNameSchema.optional(),\n ownerOrganizationName: ownerNameSchema.optional(),\n allowedOwnerOrganizationNames: ownerNamesSchema.optional(),\n});\nconst gatOwnerMismatchDetailsSchema = packageDetailsSchema.extend({\n requestedOwnerOrganizationName: ownerNameSchema.optional(),\n tokenOwnerOrganizationNames: ownerNamesSchema.optional(),\n});\nconst scopeMismatchDetailsSchema = packageDetailsSchema.extend({\n requestedScopeOwner: ownerNameSchema.optional(),\n scopeOwner: ownerNameSchema.optional(),\n allowedScopeOwners: ownerNamesSchema.optional(),\n tokenOwnerOrganizationNames: ownerNamesSchema.optional(),\n});\nconst tokenAccessDetailsSchema = packageDetailsSchema.extend({\n actualPackageAccessMode: accessModeSchema.optional(),\n requiredPackageAccessMode: z.literal('all').optional(),\n missingCapabilities: missingCapabilitiesSchema.optional(),\n packageAccess: z.object({ mode: accessModeSchema }).optional(),\n actualRegistryAccessMode: accessModeSchema.optional(),\n requiredRegistryAccessModes: z\n .array(z.enum(['selected', 'all']))\n .max(2)\n .optional(),\n requiredPackageAccessModes: z\n .array(z.enum(['selected', 'all']))\n .max(2)\n .optional(),\n registryAccess: z.object({ mode: accessModeSchema }).optional(),\n});\nconst tokenPermissionDetailsSchema = z.object({\n missingCapabilities: missingCapabilitiesSchema.optional(),\n});\nconst oauthScopeDetailsSchema = z.object({\n missingScopes: missingOAuthScopesSchema.optional(),\n});\nconst oidcRepositoryDetailsSchema = packageDetailsSchema.extend({\n submittedRepository: repositorySchema.optional(),\n trustedRepository: repositorySchema.optional(),\n});\nconst versionDetailsSchema = z.object({\n packageName: packageNameSchema.optional(),\n packageVersion: packageVersionSchema.optional(),\n});\nconst activeRequestDetailsSchema = versionDetailsSchema.extend({\n activeRequestId: requestIdSchema.optional(),\n});\nconst haltedPackageDetailsSchema = packageDetailsSchema.extend({\n blockingRequestId: requestIdSchema.optional(),\n});\nconst retryDetailsSchema = z.object({\n retryAfterSeconds: z.number().int().min(1).max(86_400).optional(),\n});\n\nexport interface PublishRequestErrorContext {\n readonly packageName: string;\n readonly packageVersion: string;\n readonly registryAlias: string;\n readonly registryName?: string;\n readonly registryIssuer: string;\n readonly credentialKind: 'login' | 'gat' | 'oidc';\n readonly requestedOwner?: string;\n readonly repository: string;\n}\n\ntype ResourceKind =\n | 'access-tokens'\n | 'help'\n | 'login'\n | 'owner-command'\n | 'requests'\n | 'security'\n | 'registries'\n | 'trusted-publishers';\n\ninterface PublishGuidance {\n readonly message: string;\n readonly hint: string;\n readonly facts?: readonly PublishDiagnosticFact[];\n readonly resources?: readonly ResourceKind[];\n readonly requestId?: string;\n}\n\ninterface PublishErrorSpec {\n build(details: unknown, context: PublishRequestErrorContext): PublishGuidance;\n}\n\nfunction defineSpec<Schema extends z.ZodObject>(\n schema: Schema,\n build: (details: z.output<Schema>, context: PublishRequestErrorContext) => PublishGuidance,\n): PublishErrorSpec {\n const empty = schema.parse({});\n return {\n build(details, context) {\n const parsed = schema.safeParse(details ?? {});\n return build(parsed.success ? parsed.data : empty, context);\n },\n };\n}\n\nfunction fixedSpec(message: string, hint: string, resources: readonly ResourceKind[] = []): PublishErrorSpec {\n return defineSpec(emptyDetailsSchema, () => ({ message, hint, resources }));\n}\n\nconst UPDATE_CLIENT_AND_RETRY =\n 'Update UAPKG CLI and try again. If the problem remains, report the server code to the registry operator.';\nconst RETRY_AND_REPORT =\n 'Try publishing again. If the failure continues, report the server code to the registry operator.';\nconst LOGIN_AGAIN = 'Sign in again for this registry, then retry the publication.';\nconst CHECK_TOKEN =\n 'Create or use an active granular access token with the correct owner, permissions, and package access, then try again.';\n\nconst clientRequestSpec = (message: string) => fixedSpec(message, UPDATE_CLIENT_AND_RETRY);\nconst internalServiceSpec = (message: string) => fixedSpec(message, RETRY_AND_REPORT);\nconst loginSpec = (message: string) => fixedSpec(message, LOGIN_AGAIN, ['login']);\nconst tokenSpec = (message: string) => fixedSpec(message, CHECK_TOKEN, ['access-tokens']);\n\nconst unscopedOwnerSpec = defineSpec(ownerRequiredDetailsSchema, (_details, context) => {\n const packageName = safeDisplayValue(context.packageName, 214);\n return {\n message: packageName\n ? `\"${packageName}\" needs an owner organization before it can be published for the first time.`\n : 'This unscoped package needs an owner organization before it can be published for the first time.',\n hint: 'Pass `--owner <organization>`, set `publish.owner` in uapkg.json, or publish the package under an `@organization/name` scope.',\n resources: ['owner-command'],\n };\n});\n\nconst gatOwnerMismatchSpec = defineSpec(gatOwnerMismatchDetailsSchema, (details, context) => {\n const requestedOwner = details.requestedOwnerOrganizationName ?? safeOwner(context.requestedOwner);\n const tokenOwners = details.tokenOwnerOrganizationNames ?? [];\n const ownerDescription = tokenOwners.length > 0 ? quotedList(tokenOwners) : 'a different organization';\n const requestedDescription = requestedOwner ? `\"${requestedOwner}\"` : 'the requested organization';\n const scoped = scopedOwner(context.packageName);\n return {\n message: `The selected token was created for ${ownerDescription}, but this publication asks to use ${requestedDescription}.`,\n hint: scoped\n ? `Use a token created for \"${scoped}\", or rebuild the package under the organization scope this token acts for.`\n : 'Correct or remove the explicit owner, or use a token created for the organization that should own this package.',\n facts: compactFacts([\n fact('requested-owner', requestedOwner),\n ...tokenOwners.map((owner) => fact('token-owner', owner)),\n ]),\n resources: ['access-tokens'],\n };\n});\n\nconst scopeMismatchSpec = defineSpec(scopeMismatchDetailsSchema, (details, context) => {\n const requestedOwner = details.requestedScopeOwner ?? details.scopeOwner ?? scopedOwner(context.packageName);\n const allowedOwners = details.allowedScopeOwners ?? details.tokenOwnerOrganizationNames ?? [];\n const requestedDescription = requestedOwner ? `\"@${requestedOwner}\"` : 'The package scope';\n const allowedDescription =\n allowedOwners.length > 0\n ? quotedList(allowedOwners.map((owner) => `@${owner}`))\n : 'the organization this token acts for';\n return {\n message: `${requestedDescription} does not match ${allowedDescription}.`,\n hint: 'Use a token created for the package scope, or rebuild the package under the organization scope this token acts for.',\n facts: compactFacts([\n fact('requested-owner', requestedOwner),\n ...allowedOwners.map((owner) => fact('allowed-owner', owner)),\n ]),\n resources: ['access-tokens'],\n };\n});\n\nconst initialTokenAccessSpec = defineSpec(tokenAccessDetailsSchema, (details) => {\n const actualMode = details.actualPackageAccessMode ?? details.packageAccess?.mode;\n const requiredMode = details.requiredPackageAccessMode ?? 'all';\n const missing = details.missingCapabilities ?? (actualMode === undefined ? ['package.publish'] : []);\n return {\n message: 'This token cannot create a package during its first publication.',\n hint: 'Create or use a token with Package Access set to All and permission to publish packages.',\n facts: compactFacts([\n fact('actual-access-mode', accessModeLabel(actualMode, 'package')),\n fact('required-access-mode', accessModeLabel(requiredMode, 'package')),\n ...missing.map((capability) => fact('missing-capability', capabilityLabel(capability))),\n ]),\n resources: ['access-tokens'],\n };\n});\n\nconst tokenPermissionSpec = defineSpec(tokenPermissionDetailsSchema, (details) => ({\n message: 'This token does not allow package publication.',\n hint: 'Create or use a token with permission to publish packages, then try again.',\n facts: (details.missingCapabilities ?? ['package.publish']).map((capability) => ({\n kind: 'missing-capability' as const,\n value: capabilityLabel(capability),\n })),\n resources: ['access-tokens'],\n}));\n\nconst oauthScopeSpec = defineSpec(oauthScopeDetailsSchema, (details) => ({\n message: 'This CLI login does not include permission to submit publishing requests.',\n hint: 'Reauthorize the login for this registry, then try publishing again.',\n facts: (details.missingScopes ?? ['publishing.request.create']).map((scope) => ({\n kind: 'missing-capability' as const,\n value: oauthScopeLabel(scope),\n })),\n resources: ['login'],\n}));\n\nconst packageOwnerNotAuthorizedSpec = defineSpec(requestedOwnerDetailsSchema, (details, context) => {\n const owner =\n details.requestedOwnerOrganizationName ?? details.ownerOrganizationName ?? safeOwner(context.requestedOwner);\n const allowedOwners = details.allowedOwnerOrganizationNames ?? [];\n const scoped = scopedOwner(context.packageName);\n const retryOwner = allowedOwners.length === 1 && !scoped ? allowedOwners[0] : undefined;\n return {\n message: owner\n ? `Your account is not allowed to create this package for UAPKG organization \"${owner}\".`\n : 'Your account is not allowed to create this package for the requested UAPKG organization.',\n hint: scoped\n ? allowedOwners.length > 0\n ? 'This package’s `@owner` scope determines ownership. Rebuild it under one of the allowed UAPKG organization scopes shown above.'\n : 'This package’s `@owner` scope determines ownership. Rebuild it under a UAPKG organization scope where you can publish, or ask an organization administrator to grant access.'\n : retryOwner\n ? `Retry with \\`--owner ${retryOwner}\\` to use the allowed UAPKG organization namespace.`\n : allowedOwners.length > 0\n ? 'Choose one of the allowed UAPKG organization namespaces with `--owner`, or ask a UAPKG organization administrator to grant access.'\n : 'Choose a UAPKG organization namespace where you can publish, or ask a UAPKG organization administrator to grant access.',\n facts: compactFacts([\n fact('requested-owner', owner),\n ...allowedOwners.map((allowedOwner) => fact('allowed-owner', allowedOwner)),\n ]),\n };\n});\n\nconst publishingAuthorityDeniedSpec = defineSpec(emptyDetailsSchema, (_details, context) => {\n switch (context.credentialKind) {\n case 'oidc':\n return {\n message: 'This GitHub Actions workflow does not currently have publishing authority for the package.',\n hint: 'Check the package’s trusted-publisher repository, workflow, and optional GitHub Environment setting, then run the workflow again.',\n resources: ['trusted-publishers'],\n };\n case 'gat':\n return {\n message: 'This granular access token does not currently have publishing authority for the package.',\n hint: 'Create or use a token for the package owner with the required package access and publishing permission.',\n resources: ['access-tokens'],\n };\n case 'login':\n return {\n message: 'Your account does not currently have publishing authority for the package.',\n hint: 'Choose an owner organization where you can publish, or ask an organization administrator to grant access.',\n };\n }\n});\n\nconst tokenResourceAccessSpec = defineSpec(tokenAccessDetailsSchema, (details) => {\n const actualPackageMode = details.actualPackageAccessMode ?? details.packageAccess?.mode;\n const actualRegistryMode = details.actualRegistryAccessMode ?? details.registryAccess?.mode;\n const requiredPackageModes = details.requiredPackageAccessModes;\n const requiredRegistryModes = details.requiredRegistryAccessModes;\n return {\n message: 'This token does not cover the package or registry selected for publication.',\n hint: 'Create or use a token whose package and registry access cover this publication.',\n facts: compactFacts([\n fact('actual-access-mode', accessModeLabel(actualPackageMode, 'package')),\n fact('actual-access-mode', accessModeLabel(actualRegistryMode, 'registry')),\n fact('required-access-mode', accessModesLabel(requiredPackageModes, 'package')),\n fact('required-access-mode', accessModesLabel(requiredRegistryModes, 'registry')),\n ]),\n resources: ['access-tokens'],\n };\n});\n\nconst oidcRepositorySpec = defineSpec(oidcRepositoryDetailsSchema, (details, context) => {\n const submitted = details.submittedRepository ?? safeRepository(context.repository);\n const trusted = details.trustedRepository;\n if (!trusted) {\n return {\n message: 'The registry could not determine the trusted repository for this workflow session.',\n hint: 'Start a new trusted-publishing workflow and try again. If the failure continues, review the trusted-publisher rule and report the server code.',\n facts: compactFacts([fact('requested-repository', submitted)]),\n resources: ['trusted-publishers'],\n };\n }\n return {\n message: submitted\n ? `This workflow submitted \"${submitted}\", but its trusted-publisher rule is bound to \"${trusted}\".`\n : 'The registry could not compare the package source with this workflow’s trusted-publisher rule.',\n hint: submitted\n ? 'Publish from the repository named by the trusted-publisher rule, or update the rule for the intended package source.'\n : 'Start a new trusted-publishing workflow and try again. If the failure continues, report the server code.',\n facts: compactFacts([fact('requested-repository', submitted), fact('trusted-repository', trusted)]),\n resources: ['trusted-publishers'],\n };\n});\n\nconst versionConflictSpec = (kind: 'exists' | 'tombstoned') =>\n defineSpec(versionDetailsSchema, (_details, context) => {\n const coordinate = packageCoordinate(context);\n return kind === 'exists'\n ? {\n message: `${coordinate} is already published in this registry.`,\n hint: 'Choose a new version in uapkg.json, rebuild the archive, and publish that version instead.',\n resources: ['requests'],\n }\n : {\n message: `${coordinate} was previously unpublished and cannot be reused.`,\n hint: 'Choose a new version in uapkg.json, rebuild the archive, and publish that version instead.',\n resources: ['requests'],\n };\n });\n\nconst activeRequestSpec = (ownershipConflict: boolean) =>\n defineSpec(activeRequestDetailsSchema, (details, context) => {\n const coordinate = packageCoordinate(context);\n const readableRequestId = ownershipConflict ? undefined : details.activeRequestId;\n return {\n message: ownershipConflict\n ? `Another organization already has an active first-publication request for ${safePackageLabel(context.packageName)}.`\n : `An active publishing request already covers ${coordinate}.`,\n hint: ownershipConflict\n ? 'Wait for that request to finish before trying to claim this package name, or review your own request when a request ID is shown.'\n : 'Wait for the active request to finish instead of submitting the same publication again.',\n facts: compactFacts([fact('request-id', readableRequestId)]),\n resources: ['requests'],\n requestId: readableRequestId,\n };\n });\n\nconst haltedPackageSpec = defineSpec(haltedPackageDetailsSchema, (details, context) => ({\n message: `Publishing for ${safePackageLabel(context.packageName)} is paused because an earlier request could not be completed.`,\n hint: 'Review the earlier request and ask the registry operator to resolve its failure before publishing again.',\n facts: compactFacts([fact('request-id', details.blockingRequestId)]),\n resources: ['requests'],\n requestId: details.blockingRequestId,\n}));\n\nconst rateLimitSpec = defineSpec(retryDetailsSchema, (details) => ({\n message: 'Too many publishing requests were submitted in a short time.',\n hint: details.retryAfterSeconds\n ? `Wait ${formatDuration(details.retryAfterSeconds)}, then try publishing again.`\n : 'Wait a moment, then try publishing again.',\n facts: compactFacts([\n fact('retry-after', details.retryAfterSeconds ? formatDuration(details.retryAfterSeconds) : undefined),\n ]),\n}));\n\n/**\n * Explicit inventory of errors that can be returned synchronously while the\n * CLI submits POST /v1/registry-requests/publish. Unknown future codes use the\n * non-leaking fallback in {@link publishRequestDiagnosticForError}.\n */\nexport const PUBLISH_SUBMISSION_ERROR_CATALOG = {\n // Authentication and request-bound authorization.\n AUTH_REQUIRED: loginSpec('Authentication is required to publish this package.'),\n CONTROL_PLANE_AUTHENTICATION_REQUIRED: loginSpec('The saved registry login was rejected.'),\n DPOP_AUTH_UNAVAILABLE: internalServiceSpec('The registry cannot validate CLI logins right now.'),\n DPOP_AUTH_REQUIRED: loginSpec('The publishing request did not include a valid CLI login.'),\n DPOP_PROOF_INVALID: loginSpec('The saved CLI login proof was rejected.'),\n DPOP_PROOF_REPLAYED: fixedSpec(\n 'The security proof for this CLI login was already used.',\n 'Run the publish command again. If the failure continues, sign in to the selected registry again.',\n ['login'],\n ),\n DPOP_ACCESS_TOKEN_INVALID: loginSpec('The saved CLI login is invalid or no longer usable.'),\n DPOP_PROOF_STALE: fixedSpec(\n 'The security proof for this CLI login expired before the request arrived.',\n 'Run the publish command again. If the failure continues, sign in to the selected registry again.',\n ['login'],\n ),\n DPOP_NONCE_REQUIRED: fixedSpec(\n 'The registry could not complete the security challenge for this CLI login.',\n 'Run the publish command again. If the failure continues, sign in to the selected registry again.',\n ['login'],\n ),\n REGISTRY_GRANT_INVALID: loginSpec('The registry login was revoked, expired, or belongs to another registry.'),\n CLI_LOGIN_ACTIVATION_EXPIRED: loginSpec('This CLI login expired before the device finished confirming it.'),\n ACCOUNT_NOT_ACTIVE: loginSpec('The account for this registry login is not active.'),\n CLI_ACCESS_TOKEN_INVALID: loginSpec('The saved CLI login is invalid.'),\n CLI_ACCESS_TOKEN_EXPIRED: loginSpec('The saved CLI login has expired.'),\n OAUTH_SCOPE_INSUFFICIENT: oauthScopeSpec,\n OAUTH_SCOPE_UNSUPPORTED: fixedSpec(\n 'This CLI version does not understand a capability required by the registry.',\n 'Update UAPKG CLI, sign in again, and retry the publication.',\n ['login'],\n ),\n TOKEN_INVALID: tokenSpec('The selected granular access token is invalid.'),\n TOKEN_REVOKED: tokenSpec('The selected granular access token has been revoked.'),\n TOKEN_EXPIRED: tokenSpec('The selected granular access token has expired.'),\n UAPKG_TOKEN_APPROVAL_PENDING: fixedSpec(\n 'The selected token is still waiting for organization approval.',\n 'Ask an organization administrator to approve the token, or select a different active token.',\n ['access-tokens'],\n ),\n UAPKG_TOKEN_APPROVAL_DENIED: fixedSpec(\n 'The organization denied the selected token request.',\n 'Use an approved token, or request a new token from the organization.',\n ['access-tokens'],\n ),\n UAPKG_TOKEN_ORGANIZATION_POLICY_DENIED: fixedSpec(\n 'The organization’s token policy blocks this publication.',\n 'Ask an organization administrator to review the token policy, or publish with an allowed credential.',\n ['access-tokens'],\n ),\n UAPKG_TOKEN_TEMPORARILY_BLOCKED_OWNER_MFA_REQUIRED: fixedSpec(\n 'This token is temporarily blocked because its owner must enable two-factor authentication.',\n 'Enable two-factor authentication for the token owner, then try again.',\n ['access-tokens', 'security'],\n ),\n UAPKG_TOKEN_LIFECYCLE_DISABLED: tokenSpec('The selected token is not currently usable.'),\n UAPKG_TOKEN_PERMISSION_DENIED: tokenPermissionSpec,\n UAPKG_TOKEN_RESOURCE_ACCESS_DENIED: tokenResourceAccessSpec,\n SECOND_FACTOR_REQUIRED: fixedSpec(\n 'A current two-factor authentication code is required for this publication.',\n 'Run the publish command again and enter the current code when prompted.',\n ['security'],\n ),\n OTP_INVALID: fixedSpec(\n 'The two-factor authentication code was incorrect or expired.',\n 'Run the publish command again and enter a new code when prompted.',\n ['security'],\n ),\n OTP_NOT_ENROLLED: fixedSpec(\n 'This account must enroll in two-factor authentication before publishing.',\n 'Enable two-factor authentication in account settings, then try publishing again.',\n ['security'],\n ),\n OTP_RATE_LIMITED: rateLimitSpec,\n OTP_ERROR: internalServiceSpec('The registry could not verify the two-factor authentication code.'),\n OTP_UNSUPPORTED_PRINCIPAL: fixedSpec(\n 'This credential cannot use an interactive two-factor authentication code.',\n 'Select a CLI login or granular access token that supports attended publication.',\n ),\n SECURED_ACCOUNT_REQUIRED: fixedSpec(\n 'Publishing requires an active account with two-factor authentication enabled.',\n 'Activate the account and enable two-factor authentication, then try again.',\n ['security'],\n ),\n ACTOR_WRITE_FORBIDDEN: fixedSpec(\n 'This account is not allowed to submit registry changes.',\n 'Use an account with publishing access, or ask an organization administrator for access.',\n ),\n UAPKG_PRINCIPAL_NOT_ALLOWED: fixedSpec(\n 'This kind of credential cannot submit a publishing request.',\n 'Use a CLI login, granular access token, or configured GitHub Actions trusted publisher.',\n ),\n\n // Ownership, package naming, and token access.\n UNSCOPED_PACKAGE_OWNER_REQUIRED: unscopedOwnerSpec,\n GAT_OWNER_ORGANIZATION_MISMATCH: gatOwnerMismatchSpec,\n UAPKG_PACKAGE_SCOPE_OWNER_MISMATCH: scopeMismatchSpec,\n UAPKG_REGISTRY_REQUIRES_SCOPED_PACKAGE: defineSpec(packageDetailsSchema, (_details, context) => ({\n message: `This registry requires a scoped name for the first publication of ${safePackageLabel(context.packageName)}.`,\n hint: 'Rename the package to `@organization/name`, rebuild the archive, and publish it again.',\n })),\n INITIAL_PUBLICATION_PACKAGE_ACCESS_ALL_REQUIRED: initialTokenAccessSpec,\n PACKAGE_OWNER_NOT_AUTHORIZED: packageOwnerNotAuthorizedSpec,\n INITIAL_PUBLICATION_CREDENTIAL_UNSUPPORTED: fixedSpec(\n 'This credential cannot create a package during its first publication.',\n 'Publish the package once with an interactive CLI login or an attended granular access token.',\n ['login', 'access-tokens'],\n ),\n CLI_REGISTRY_GRANT_NOT_AUTHORIZED: fixedSpec(\n 'The saved CLI login cannot publish to this registry.',\n 'Reauthorize the login for the selected registry, then try again.',\n ['login'],\n ),\n REGISTRY_WRITE_DENIED_REBAC: publishingAuthorityDeniedSpec,\n GAT_CREDENTIAL_CONTEXT_REQUIRED: internalServiceSpec('The registry could not validate the selected token.'),\n PACKAGE_OWNER_NOT_RESOLVED: internalServiceSpec('The registry could not determine this package’s owner.'),\n\n // GitHub Actions trusted publishing.\n OIDC_SESSION_INVALID: fixedSpec(\n 'The GitHub Actions publishing session expired or is no longer trusted.',\n 'Run the workflow again. If it still fails, verify that the package still has an active trusted-publisher rule for this repository and workflow.',\n ['trusted-publishers'],\n ),\n OIDC_PROVIDER_UNAVAILABLE: fixedSpec(\n 'The registry cannot validate GitHub trusted publishing right now.',\n 'Run the workflow again later. If the failure continues, report the server code to the registry operator.',\n ['trusted-publishers'],\n ),\n OIDC_INITIAL_PUBLICATION_NOT_SUPPORTED: fixedSpec(\n 'GitHub Actions cannot create this package during its first publication.',\n 'Publish the package once with an interactive CLI login, then configure its trusted-publisher rule and rerun the workflow.',\n ['login', 'trusted-publishers'],\n ),\n OIDC_SOURCE_REPOSITORY_MISMATCH: oidcRepositorySpec,\n TRUSTED_PUBLISHER_NOT_AUTHORIZED: fixedSpec(\n 'This GitHub Actions workflow is not authorized to publish the package.',\n 'Check the package’s trusted-publisher repository, workflow, and optional GitHub Environment setting, then rerun the workflow.',\n ['trusted-publishers'],\n ),\n\n // Archive, source, claims, and request-contract validation.\n INVALID_PACKAGE_NAME: fixedSpec(\n 'The packaged manifest contains an invalid package name.',\n 'Set `name` in uapkg.json to a name such as `my-package` or `@organization/my-package`, rebuild the archive, and publish it again.',\n ),\n SCOPED_PACKAGES_DISABLED: fixedSpec(\n 'The selected registry does not accept organization-scoped package names.',\n 'Select a registry that supports scoped packages, or intentionally rename and rebuild the package as an unscoped package with an explicit owner.',\n ['registries', 'owner-command'],\n ),\n INVALID_VERSION: fixedSpec(\n 'The packaged manifest contains an invalid semantic version.',\n 'Set `version` in uapkg.json to a semantic version such as `1.2.3`, rebuild the archive, and publish it again.',\n ),\n INVALID_OWNER_ORGANIZATION_NAME: fixedSpec(\n 'The selected owner is not a valid organization name.',\n 'Correct `--owner <organization>` or `publish.owner` in uapkg.json, then try publishing again.',\n ['owner-command'],\n ),\n SOURCE_REQUIRED: fixedSpec(\n 'The publishing request did not identify its GitHub Release source.',\n 'Set `publish.repository` or pass `--repository owner/repository`, and make sure the release tag and asset exist before retrying.',\n ),\n GITHUB_RELEASE_SOURCE_REQUIRED: fixedSpec(\n 'The publishing request did not identify its GitHub Release source.',\n 'Set `publish.repository` or pass `--repository owner/repository`, and make sure the release tag and asset exist before retrying.',\n ),\n SOURCE_TYPE_UNSUPPORTED: fixedSpec(\n 'The registry does not support this kind of package source.',\n 'Publish from an uploaded GitHub Release asset. If this CLI produced another source type, update it and try again.',\n ),\n GITHUB_REPOSITORY_INVALID: fixedSpec(\n 'The publishing request contains an invalid GitHub repository coordinate.',\n 'Pass `--repository owner/repository` or correct `publish.repository` in uapkg.json, then try again.',\n ),\n RELEASE_TAG_INVALID: fixedSpec(\n 'The publishing request contains an invalid GitHub Release tag.',\n 'Pass a non-empty GitHub Release tag with `--tag <tag>`, or correct the package version used by the default tag.',\n ),\n RELEASE_ASSET_NAME_INVALID: fixedSpec(\n 'The publishing request contains an invalid GitHub Release asset name.',\n 'Pass the uploaded file name—not a path—with `--asset <file-name>`, then try again.',\n ),\n OBSERVED_INTEGRITY_REQUIRED: fixedSpec(\n 'The publishing request is missing the archive’s integrity information.',\n 'Re-read or rebuild the archive and try again. If the problem remains, update UAPKG CLI and report the server code.',\n ),\n OBSERVED_DIGEST_INVALID: fixedSpec(\n 'The publishing request contains an invalid archive digest.',\n 'Re-read or rebuild the archive and try again. If the problem remains, update UAPKG CLI and report the server code.',\n ),\n OBSERVED_SIZE_INVALID: fixedSpec(\n 'The publishing request contains an invalid archive size.',\n 'Re-read or rebuild the archive and try again. If the problem remains, update UAPKG CLI and report the server code.',\n ),\n CLAIMS_REQUIRED: fixedSpec(\n 'The publishing request is missing package information from the packaged manifest.',\n 'Rebuild the archive so it contains a valid uapkg.json, then publish the rebuilt file.',\n ),\n CLAIMS_IDENTITY_MISMATCH: fixedSpec(\n 'The package name or version inside the archive does not match the publication being submitted.',\n 'Rebuild the archive from the intended uapkg.json and publish the rebuilt file.',\n ),\n CLAIMS_PRIVATE_INVALID: fixedSpec(\n 'The packaged manifest has an invalid private-package setting.',\n 'Set `private` in uapkg.json to `true` or `false`, rebuild the archive, and publish it again.',\n ),\n CLAIMS_BUCKET_INVALID: fixedSpec(\n 'The packaged manifest has an invalid dependency section.',\n 'Make each dependency section in uapkg.json an object, rebuild the archive, and publish it again.',\n ),\n CLAIMS_DEPENDENCIES_TOO_MANY: fixedSpec(\n 'A dependency section in the packaged manifest is too large.',\n 'Reduce the dependency entries in uapkg.json, rebuild the archive, and publish it again.',\n ),\n CLAIMS_DEPENDENCY_NAME_INVALID: fixedSpec(\n 'The packaged manifest contains an invalid dependency name.',\n 'Correct the dependency name in uapkg.json, rebuild the archive, and publish it again.',\n ),\n CLAIMS_DEPENDENCY_RANGE_INVALID: fixedSpec(\n 'The packaged manifest contains an invalid dependency version range.',\n 'Set a non-empty bounded version range for the dependency, rebuild the archive, and publish it again.',\n ),\n CLAIMS_DEPENDENCY_REGISTRY_INVALID: fixedSpec(\n 'The packaged manifest contains an invalid dependency registry.',\n 'Correct the dependency registry alias in uapkg.json, rebuild the archive, and publish it again.',\n ),\n CLAIMS_DEPENDENCY_FIELDS_INVALID: fixedSpec(\n 'A packaged dependency contains unsupported fields.',\n 'Remove unsupported dependency fields from uapkg.json, rebuild the archive, and publish it again.',\n ),\n OFFICIAL_REGISTRY_PRIVATE_PACKAGE_FORBIDDEN: fixedSpec(\n 'This package is marked private, but the selected registry accepts only public packages.',\n 'Publish to a private registry, or intentionally remove the private setting, rebuild the archive, and try again.',\n ['registries'],\n ),\n SERVER_RESOLVED_METADATA_NOT_ALLOWED: clientRequestSpec('The publishing request contains server-owned metadata.'),\n UNRECOGNIZED_REQUEST_FIELDS: clientRequestSpec(\n 'The publishing request contains fields this registry does not recognize.',\n ),\n INVALID_REGISTRY_ID: clientRequestSpec('The CLI resolved an invalid registry identity.'),\n PAYLOAD_TOO_LARGE: fixedSpec(\n 'The packaged publication information is too large for this registry.',\n 'Reduce oversized manifest metadata or dependency entries, rebuild the archive, and try again.',\n ),\n REQUEST_BODY_TOO_LARGE: fixedSpec(\n 'The publishing request is too large for this registry.',\n 'Reduce oversized manifest metadata or dependency entries, rebuild the archive, and try again.',\n ),\n UAPKG_OPERATION_INPUT_TOO_LARGE: fixedSpec(\n 'The publishing request is too large for this registry.',\n 'Reduce oversized manifest metadata or dependency entries, rebuild the archive, and try again.',\n ),\n INVALID_CONTENT_LENGTH: clientRequestSpec('The registry received an incomplete publishing request.'),\n INVALID_JSON: clientRequestSpec('The registry could not read the publishing request.'),\n INVALID_REQUEST_BODY: clientRequestSpec('The registry could not understand the publishing request.'),\n UAPKG_OPERATION_INPUT_INVALID: clientRequestSpec('The registry could not understand the publishing request.'),\n IDEMPOTENCY_KEY_REQUIRED: clientRequestSpec('The publishing request was missing its retry-safety key.'),\n REQUEST_KIND_NOT_PUBLIC: internalServiceSpec('The CLI reached the wrong registry operation.'),\n SOURCE_NOT_ALLOWED: internalServiceSpec('The CLI reached the wrong registry operation for an artifact publication.'),\n REASON_REQUIRED: internalServiceSpec('The CLI reached an operation that requires a reason.'),\n DEPRECATION_MESSAGE_REQUIRED: internalServiceSpec(\n 'The CLI reached an operation that requires a deprecation message.',\n ),\n\n // Registry readiness, versions, and concurrent requests.\n REGISTRY_NOT_FOUND: fixedSpec(\n 'The selected registry is no longer available to the publishing service.',\n 'Refresh or reconfigure the registry, then try publishing again.',\n ['registries'],\n ),\n REGISTRY_LINK_MISSING: fixedSpec(\n 'The selected registry is not connected to an initialized repository.',\n 'Finish the registry repository connection in account settings, then try publishing again.',\n ['registries'],\n ),\n REGISTRY_LINK_NOT_READY: fixedSpec(\n 'The selected registry repository connection is incomplete.',\n 'Finish reconnecting the registry repository in account settings, then try publishing again.',\n ['registries'],\n ),\n PACKAGE_POLICY_NOT_CONFIGURED: internalServiceSpec(\n 'The registry is not ready to assign ownership for a new package.',\n ),\n PACKAGE_NOT_FOUND: fixedSpec(\n 'The package does not exist in the selected registry.',\n 'Check the package and registry, then try again.',\n ['registries'],\n ),\n PACKAGE_HALTED: haltedPackageSpec,\n VERSION_ALREADY_EXISTS: versionConflictSpec('exists'),\n VERSION_TOMBSTONED: versionConflictSpec('tombstoned'),\n DUPLICATE_ACTIVE_REQUEST: activeRequestSpec(false),\n PACKAGE_OWNERSHIP_PENDING_CONFLICT: activeRequestSpec(true),\n IDEMPOTENCY_KEY_CONFLICT: fixedSpec(\n 'The retry-safety key for this publication is already attached to a different request.',\n 'Run the publication again. If the conflict continues, report the server code to the registry operator.',\n ['requests'],\n ),\n RATE_LIMIT_EXCEEDED: rateLimitSpec,\n\n // Defensive catalog entries for invalid route state and server failures.\n REQUEST_ATTRIBUTION_INVALID: internalServiceSpec('The registry could not safely attribute this publishing request.'),\n AUTHORIZATION_RECEIPT_REQUIRED: internalServiceSpec(\n 'The registry could not preserve authorization for this request.',\n ),\n REQUEST_CREATE_FAILED: internalServiceSpec('The registry could not save the publishing request.'),\n OPERATION_AUTHORIZATION_ACTION_MISMATCH: internalServiceSpec('The publishing endpoint is misconfigured.'),\n OPERATION_BODY_LIMIT_UNREGISTERED: internalServiceSpec('The publishing endpoint is missing its request-size policy.'),\n UAPKG_OPERATION_BINDING_MISMATCH: internalServiceSpec('The publishing endpoint is bound incorrectly.'),\n UAPKG_OPERATION_BINDER_MISMATCH: internalServiceSpec(\n 'The publishing endpoint uses the wrong authentication boundary.',\n ),\n UAPKG_OPERATION_BODY_LIMIT_UNREGISTERED: internalServiceSpec(\n 'The publishing endpoint is missing its request-size policy.',\n ),\n UAPKG_SERVICE_AUTHENTICATION_REQUIRED: internalServiceSpec(\n 'The publishing endpoint rejected an unsupported credential.',\n ),\n REGISTRY_REQUEST_RESPONSE_INVALID: internalServiceSpec('The registry returned an invalid publishing response.'),\n CONTROL_PLANE_RESPONSE_NOT_JSON: internalServiceSpec('The registry returned an unreadable publishing response.'),\n\n // These normally belong to lifecycle routes, but cataloging them keeps a\n // misrouted publish response helpful and non-leaking.\n DESTRUCTIVE_POLICY_NOT_CONFIGURED: internalServiceSpec('The registry’s version policy is not configured.'),\n PACKAGE_VERSION_TARGET_NOT_FOUND: fixedSpec(\n 'The selected package version does not exist in the registry.',\n 'Check the package version and selected registry.',\n ['requests'],\n ),\n VERSION_ALREADY_UNPUBLISHED: fixedSpec(\n 'This package version is already unpublished.',\n 'No further action is needed.',\n ),\n VERSION_ALREADY_YANKED: fixedSpec('This package version is already yanked.', 'No further action is needed.'),\n VERSION_NOT_YANKED: fixedSpec(\n 'This package version is not yanked.',\n 'Check the current request state before trying again.',\n ),\n VERSION_ALREADY_DEPRECATED: fixedSpec('This package version is already deprecated.', 'No further action is needed.'),\n VERSION_NOT_DEPRECATED: fixedSpec(\n 'This package version is not deprecated.',\n 'Check the current request state before trying again.',\n ),\n UNPUBLISH_WINDOW_EXPIRED: fixedSpec(\n 'The allowed time window for unpublishing this version has closed.',\n 'Contact the registry operator if the version presents a security or legal issue.',\n ),\n} as const satisfies Record<string, PublishErrorSpec>;\n\nexport type PublishSubmissionErrorCode = keyof typeof PUBLISH_SUBMISSION_ERROR_CATALOG;\n\nexport function publishRequestDiagnosticForError(\n error: unknown,\n context: PublishRequestErrorContext,\n): PublishRequestFailedDiagnostic {\n const serverCode = validatedServerCode(error);\n const status = validatedStatus(error);\n const spec = serverCode\n ? (PUBLISH_SUBMISSION_ERROR_CATALOG as Record<string, PublishErrorSpec>)[serverCode]\n : undefined;\n const guidance = spec\n ? spec.build(error instanceof ControlPlaneError ? error.details : undefined, context)\n : fallback(error, status);\n const facts = dedupeFacts([...baseFacts(context), ...(guidance.facts ?? [])]);\n const resources = resourcesFor(guidance.resources ?? [], context, guidance.requestId);\n\n return createPublishRequestFailedDiagnostic(\n guidance.message,\n {\n ...(serverCode ? { serverCode } : {}),\n ...(status !== undefined ? { status } : {}),\n facts,\n resources,\n },\n guidance.hint,\n );\n}\n\nfunction fallback(error: unknown, status: number | undefined): PublishGuidance {\n if (isNetworkFailure(error)) {\n return {\n message: 'UAPKG could not reach the publishing service.',\n hint: 'Check the network connection and registry availability, then try publishing again.',\n };\n }\n if (status !== undefined && status >= 500) {\n return {\n message: 'The publishing service could not complete the request.',\n hint: RETRY_AND_REPORT,\n };\n }\n return {\n message: 'The registry did not accept the publishing request.',\n hint: 'Review the publication details and try again. If the failure continues, report this diagnostic to the registry operator.',\n };\n}\n\nfunction baseFacts(context: PublishRequestErrorContext): PublishDiagnosticFact[] {\n const registryName = safeDisplayValue(context.registryName ?? '', 100);\n const registryAlias = safeDisplayValue(context.registryAlias, 100);\n const registry =\n registryName && registryAlias && registryName !== registryAlias\n ? `${registryName} (${registryAlias})`\n : (registryName ?? registryAlias);\n return compactFacts([\n fact('package', safeDisplayValue(context.packageName, 214)),\n fact('version', safeDisplayValue(context.packageVersion, 256)),\n fact('registry', registry),\n fact('credential-kind', credentialKindLabel(context.credentialKind)),\n fact('requested-owner', safeOwner(context.requestedOwner)),\n fact('repository', safeRepository(context.repository)),\n ]);\n}\n\nfunction resourcesFor(\n requested: readonly ResourceKind[],\n context: PublishRequestErrorContext,\n requestId?: string,\n): PublishDiagnosticResource[] {\n const kinds = [...new Set([...requested, 'help' as const])];\n const accountOrigin = accountOriginForIssuer(context.registryIssuer);\n const resources: PublishDiagnosticResource[] = [];\n for (const kind of kinds) {\n switch (kind) {\n case 'help':\n resources.push({ kind: 'command', command: 'uapkg publish --help', label: 'Publish command help' });\n break;\n case 'login':\n resources.push({\n kind: 'command',\n command: `uapkg login --registry ${shellDisplayArgument(context.registryAlias)} --reauthorize`,\n label: 'Reauthorize this registry login',\n });\n break;\n case 'owner-command':\n resources.push({\n kind: 'command',\n command: 'uapkg publish --owner <organization>',\n label: 'Publish with an explicit owner',\n });\n break;\n case 'requests':\n if (requestId) {\n resources.push({\n kind: 'command',\n command: `uapkg requests status ${requestId}`,\n label: 'Inspect the related request',\n });\n }\n addAccountUrl(resources, accountOrigin, '/requests', 'Publishing requests');\n break;\n case 'access-tokens':\n addAccountUrl(resources, accountOrigin, '/settings/access-tokens', 'Access token settings');\n break;\n case 'trusted-publishers':\n addAccountUrl(resources, accountOrigin, '/trusted-publishers', 'Trusted publishers');\n break;\n case 'registries':\n addAccountUrl(resources, accountOrigin, '/settings/registries', 'Registry settings');\n break;\n case 'security':\n addAccountUrl(\n resources,\n accountOrigin,\n '/settings/two-factor-authentication',\n 'Two-factor authentication settings',\n );\n break;\n }\n }\n return dedupeResources(resources);\n}\n\nfunction addAccountUrl(\n resources: PublishDiagnosticResource[],\n origin: string | undefined,\n path: string,\n label: string,\n): void {\n if (!origin) return;\n resources.push({ kind: 'url', url: new URL(path, origin).href, label });\n}\n\nfunction accountOriginForIssuer(issuer: string): string | undefined {\n try {\n const url = new URL(issuer);\n return url.protocol === 'https:' || url.protocol === 'http:' ? url.origin : undefined;\n } catch {\n return undefined;\n }\n}\n\nfunction validatedServerCode(error: unknown): string | undefined {\n return error instanceof ControlPlaneError && SERVER_CODE_PATTERN.test(error.code) ? error.code : undefined;\n}\n\nfunction validatedStatus(error: unknown): number | undefined {\n if (!(error instanceof ControlPlaneError) || error.status === undefined) return undefined;\n return Number.isInteger(error.status) && error.status >= 100 && error.status <= 599 ? error.status : undefined;\n}\n\nfunction isNetworkFailure(error: unknown): boolean {\n return (\n error instanceof TypeError ||\n (error instanceof Error && (error.name === 'AbortError' || error.name === 'TimeoutError'))\n );\n}\n\nfunction safeDisplayValue(value: unknown, maximumLength: number): string | undefined {\n if (typeof value !== 'string') return undefined;\n const normalized = value.trim();\n return normalized.length > 0 && normalized.length <= maximumLength && !hasUnsafeDisplayCharacter(normalized)\n ? normalized\n : undefined;\n}\n\nfunction hasUnsafeDisplayCharacter(value: string): boolean {\n for (const character of value) {\n const codePoint = character.codePointAt(0);\n if (\n codePoint !== undefined &&\n (codePoint <= 0x1f ||\n (codePoint >= 0x7f && codePoint <= 0x9f) ||\n codePoint === 0x061c ||\n codePoint === 0x200e ||\n codePoint === 0x200f ||\n (codePoint >= 0x2028 && codePoint <= 0x202e) ||\n (codePoint >= 0x2066 && codePoint <= 0x2069))\n ) {\n return true;\n }\n }\n return false;\n}\n\nfunction safeOwner(value: unknown): string | undefined {\n const parsed = ownerNameSchema.safeParse(value);\n return parsed.success ? parsed.data : undefined;\n}\n\nfunction safeRepository(value: unknown): string | undefined {\n const parsed = repositorySchema.safeParse(value);\n return parsed.success ? parsed.data : undefined;\n}\n\nfunction safePackageLabel(packageName: string): string {\n const safe = safeDisplayValue(packageName, 214);\n return safe ? `\"${safe}\"` : 'this package';\n}\n\nfunction packageCoordinate(context: PublishRequestErrorContext): string {\n const packageName = safeDisplayValue(context.packageName, 214);\n const version = safeDisplayValue(context.packageVersion, 256);\n return packageName && version ? `\"${packageName}@${version}\"` : 'This package version';\n}\n\nfunction scopedOwner(packageName: string): string | undefined {\n const match = safeDisplayValue(packageName, 214)?.match(/^@([^/]+)\\//u);\n return safeOwner(match?.[1]);\n}\n\nfunction credentialKindLabel(kind: PublishRequestErrorContext['credentialKind']): string {\n switch (kind) {\n case 'login':\n return 'CLI login';\n case 'gat':\n return 'Granular access token';\n case 'oidc':\n return 'GitHub Actions trusted publishing';\n }\n}\n\nfunction capabilityLabel(capability: z.output<typeof missingCapabilitiesSchema>[number]): string {\n return capability === 'package.publish' ? 'Publish packages' : 'Submit publishing requests';\n}\n\nfunction oauthScopeLabel(scope: z.output<typeof missingOAuthScopesSchema>[number]): string {\n return scope === 'publishing.request.create' ? 'Submit publishing requests' : 'Read your publishing requests';\n}\n\nfunction accessModeLabel(\n mode: z.output<typeof accessModeSchema> | undefined,\n category: 'package' | 'registry',\n): string | undefined {\n if (!mode) return undefined;\n const noun = category === 'package' ? 'packages' : 'registries';\n switch (mode) {\n case 'none':\n return `No ${noun}`;\n case 'selected':\n return `Selected ${noun}`;\n case 'all':\n return `All ${noun}`;\n }\n}\n\nfunction accessModesLabel(\n modes: readonly ('selected' | 'all')[] | undefined,\n category: 'package' | 'registry',\n): string | undefined {\n if (!modes || modes.length === 0) return undefined;\n const labels = [...new Set(modes)].map((mode) => accessModeLabel(mode, category)).filter(Boolean);\n return labels.join(' or ');\n}\n\nfunction formatDuration(seconds: number): string {\n if (seconds === 1) return '1 second';\n if (seconds < 60) return `${seconds} seconds`;\n if (seconds % 60 === 0) {\n const minutes = seconds / 60;\n return `${minutes} ${minutes === 1 ? 'minute' : 'minutes'}`;\n }\n return `${seconds} seconds`;\n}\n\nfunction quotedList(values: readonly string[]): string {\n const quoted = values.map((value) => `\"${value}\"`);\n if (quoted.length === 1) return quoted[0] as string;\n if (quoted.length === 2) return `${quoted[0]} or ${quoted[1]}`;\n return `${quoted.slice(0, -1).join(', ')}, or ${quoted.at(-1)}`;\n}\n\nfunction fact(kind: PublishDiagnosticFact['kind'], value: string | undefined): PublishDiagnosticFact | undefined {\n return value ? { kind, value } : undefined;\n}\n\nfunction compactFacts(facts: readonly (PublishDiagnosticFact | undefined)[]): PublishDiagnosticFact[] {\n return facts.filter((value): value is PublishDiagnosticFact => value !== undefined);\n}\n\nfunction dedupeFacts(facts: readonly PublishDiagnosticFact[]): PublishDiagnosticFact[] {\n const seen = new Set<string>();\n return facts.filter((factValue) => {\n const key = `${factValue.kind}\\0${factValue.value}`;\n if (seen.has(key)) return false;\n seen.add(key);\n return true;\n });\n}\n\nfunction dedupeResources(resources: readonly PublishDiagnosticResource[]): PublishDiagnosticResource[] {\n const seen = new Set<string>();\n return resources.filter((resource) => {\n const key = resource.kind === 'command' ? `command\\0${resource.command}` : `url\\0${resource.url}`;\n if (seen.has(key)) return false;\n seen.add(key);\n return true;\n });\n}\n\nfunction shellDisplayArgument(value: string): string {\n const safe = safeDisplayValue(value, 100);\n return safe && /^[A-Za-z0-9._-]+$/u.test(safe) ? safe : '<registry>';\n}\n"],"mappings":";;;;;AASA,MAAM,sBAAsB;AAE5B,MAAM,eAAe,kBACnB,EACG,OAAO,CAAC,CACR,KAAK,CAAC,CACN,IAAI,CAAC,CAAC,CACN,IAAI,aAAa,CAAC,CAClB,QAAQ,UAAU,CAAC,0BAA0B,KAAK,CAAC;AACxD,MAAM,oBAAoB,YAAY,GAAG;AACzC,MAAM,uBAAuB,YAAY,GAAG;AAC5C,MAAM,kBAAkB,YAAY,GAAG,CAAC,CAAC,MAAM,8BAA8B;AAC7E,MAAM,mBAAmB,YAAY,GAAG,CAAC,CAAC,MAAM,qCAAqC;AACrF,MAAM,kBAAkB,YAAY,GAAG,CAAC,CAAC,MAAM,gCAAgC;AAC/E,MAAM,mBAAmB,EAAE,KAAK;CAAC;CAAQ;CAAY;AAAK,CAAC;AAC3D,MAAM,4BAA4B,EAC/B,MAAM,EAA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C,UAC9B,sEACA,kIACF;CACA,yBAAyB,UACvB,8DACA,mHACF;CACA,2BAA2B,UACzB,4EACA,qGACF;CACA,qBAAqB,UACnB,kEACA,iHACF;CACA,4BAA4B,UAC1B,yEACA,oFACF;CACA,6BAA6B,UAC3B,0EACA,oHACF;CACA,yBAAyB,UACvB,8DACA,oHACF;CACA,uBAAuB,UACrB,4DACA,oHACF;CACA,iBAAiB,UACf,qFACA,uFACF;CACA,0BAA0B,UACxB,kGACA,gFACF;CACA,wBAAwB,UACtB,iEACA,8FACF;CACA,uBAAuB,UACrB,4DACA,kGACF;CACA,8BAA8B,UAC5B,+DACA,yFACF;CACA,gCAAgC,UAC9B,8DACA,uFACF;CACA,iCAAiC,UAC/B,uEACA,sGACF;CACA,oCAAoC,UAClC,kEACA,iGACF;CACA,kCAAkC,UAChC,sDACA,kGACF;CACA,6CAA6C,UAC3C,2FACA,mHACA,CAAC,YAAY,CACf;CACA,sCAAsC,kBAAkB,wDAAwD;CAChH,6BAA6B,kBAC3B,0EACF;CACA,qBAAqB,kBAAkB,gDAAgD;CACvF,mBAAmB,UACjB,wEACA,+FACF;CACA,wBAAwB,UACtB,0DACA,+FACF;CACA,iCAAiC,UAC/B,0DACA,+FACF;CACA,wBAAwB,kBAAkB,yDAAyD;CACnG,cAAc,kBAAkB,qDAAqD;CACrF,sBAAsB,kBAAkB,2DAA2D;CACnG,+BAA+B,kBAAkB,2DAA2D;CAC5G,0BAA0B,kBAAkB,0DAA0D;CACtG,yBAAyB,oBAAoB,+CAA+C;CAC5F,oBAAoB,oBAAoB,2EAA2E;CACnH,iBAAiB,oBAAoB,sDAAsD;CAC3F,8BAA8B,oBAC5B,mEACF;CAGA,oBAAoB,UAClB,2EACA,mEACA,CAAC,YAAY,CACf;CACA,uBAAuB,UACrB,wEACA,6FACA,CAAC,YAAY,CACf;CACA,yBAAyB,UACvB,8DACA,+FACA,CAAC,YAAY,CACf;CACA,+BAA+B,oBAC7B,kEACF;CACA,mBAAmB,UACjB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,SAAS,aAAa,OAAgF;CACpG,OAAO,MAAM,QAAQ,UAA0C,UAAU,MAAS;AACpF;AAEA,SAAS,YAAY,OAAkE;CACrF,MAAM,uBAAO,IAAI,IAAY;CAC7B,OAAO,MAAM,QAAQ,cAAc;EACjC,MAAM,MAAM,GAAG,UAAU,KAAK,IAAI,UAAU;EAC5C,IAAI,KAAK,IAAI,GAAG,GAAG,OAAO;EAC1B,KAAK,IAAI,GAAG;EACZ,OAAO;CACT,CAAC;AACH;AAEA,SAAS,gBAAgB,WAA8E;CACrG,MAAM,uBAAO,IAAI,IAAY;CAC7B,OAAO,UAAU,QAAQ,aAAa;EACpC,MAAM,MAAM,SAAS,SAAS,YAAY,YAAY,SAAS,YAAY,QAAQ,SAAS;EAC5F,IAAI,KAAK,IAAI,GAAG,GAAG,OAAO;EAC1B,KAAK,IAAI,GAAG;EACZ,OAAO;CACT,CAAC;AACH;AAEA,SAAS,qBAAqB,OAAuB;CACnD,MAAM,OAAO,iBAAiB,OAAO,GAAG;CACxC,OAAO,QAAQ,qBAAqB,KAAK,IAAI,IAAI,OAAO;AAC1D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"RegistryGrantLock.d.ts","names":[],"sources":["../../src/control-plane/RegistryGrantLock.ts"],"mappings":";UAiBiB;EACf,SAAS,GAAG,gBAAgB,oBAAoB,iBAAiB,QAAQ,KAAK,QAAQ;;UAGvE;WACN;WACA;WACA;WACA;WACA;WACA,SAAS,yBAAyB;WAClC,kBAAkB;;;;;;;cAQhB,iCAAiC;mBAUzB;mBATF;mBACA;mBACA;mBACA;mBACA;mBACA;mBACA;EAEjB,YACmB,mBACjB,UAAS;EAcJ,QAAQ,gBAAgB;EAOlB,SAAS,GAAG,gBAAgB,oBAAoB,iBAAiB,QAAQ,KAAK,QAAQ;UAmCrF;UAoBA;UA2CA;UAOA"}
@@ -1,163 +0,0 @@
1
- import { join } from "node:path";
2
- import { createHash, randomUUID } from "node:crypto";
3
- import { mkdir, open, readFile, rename, stat, unlink, utimes } from "node:fs/promises";
4
-
5
- //#region src/control-plane/RegistryGrantLock.ts
6
- const LOCK_FILE_VERSION = 1;
7
- const DEFAULT_WAIT_TIMEOUT_MS = 3e4;
8
- const DEFAULT_STALE_AFTER_MS = 12e4;
9
- const DEFAULT_POLL_INTERVAL_MS = 50;
10
- const DEFAULT_HEARTBEAT_INTERVAL_MS = 5e3;
11
- /**
12
- * Cross-process serialization for a registry grant's rotating refresh-token
13
- * family. Lock file names contain only a SHA-256 digest of the issuer and
14
- * registry ID; lock contents contain only an opaque owner ID, PID, and time.
15
- */
16
- var FileRegistryGrantLock = class {
17
- directory;
18
- waitTimeoutMs;
19
- staleAfterMs;
20
- pollIntervalMs;
21
- heartbeatIntervalMs;
22
- now;
23
- sleep;
24
- isProcessAlive;
25
- constructor(directory, options = {}) {
26
- this.directory = directory;
27
- this.waitTimeoutMs = positiveMilliseconds(options.waitTimeoutMs, DEFAULT_WAIT_TIMEOUT_MS);
28
- this.staleAfterMs = positiveMilliseconds(options.staleAfterMs, DEFAULT_STALE_AFTER_MS);
29
- this.pollIntervalMs = positiveMilliseconds(options.pollIntervalMs, DEFAULT_POLL_INTERVAL_MS);
30
- this.heartbeatIntervalMs = positiveMilliseconds(options.heartbeatIntervalMs, Math.min(DEFAULT_HEARTBEAT_INTERVAL_MS, Math.max(1, Math.floor(this.staleAfterMs / 3))));
31
- this.now = options.now ?? Date.now;
32
- this.sleep = options.sleep ?? delay;
33
- this.isProcessAlive = options.isProcessAlive ?? processIsAlive;
34
- }
35
- pathFor(issuer, registryId) {
36
- const digest = createHash("sha256").update(`${issuer.replace(/\/+$/, "")}\0${registryId.toLowerCase()}`).digest("hex");
37
- return join(this.directory, `${digest}.lock`);
38
- }
39
- async withLock(issuer, registryId, operation) {
40
- await mkdir(this.directory, {
41
- recursive: true,
42
- mode: 448
43
- });
44
- const lockPath = this.pathFor(issuer, registryId);
45
- const owner = {
46
- version: LOCK_FILE_VERSION,
47
- ownerId: randomUUID(),
48
- pid: process.pid,
49
- acquiredAt: this.now()
50
- };
51
- const deadline = this.now() + this.waitTimeoutMs;
52
- while (!await this.tryAcquire(lockPath, owner)) {
53
- if (await this.reclaimIfStale(lockPath)) continue;
54
- const remaining = deadline - this.now();
55
- if (remaining <= 0) throw new Error("Timed out waiting for another UAPKG process to finish using the saved login for this registry.");
56
- await this.sleep(Math.min(this.pollIntervalMs, remaining));
57
- }
58
- const heartbeat = setInterval(() => {
59
- this.touchIfOwned(lockPath, owner.ownerId);
60
- }, this.heartbeatIntervalMs);
61
- heartbeat.unref?.();
62
- try {
63
- return await operation();
64
- } finally {
65
- clearInterval(heartbeat);
66
- await this.releaseIfOwned(lockPath, owner.ownerId);
67
- }
68
- }
69
- async tryAcquire(lockPath, owner) {
70
- let handle;
71
- try {
72
- handle = await open(lockPath, "wx", 384);
73
- } catch (error) {
74
- if (errorCode(error) === "EEXIST") return false;
75
- throw new Error("Unable to create the UAPKG registry-grant lock.", { cause: error });
76
- }
77
- try {
78
- await handle.writeFile(JSON.stringify(owner), { encoding: "utf8" });
79
- return true;
80
- } catch (error) {
81
- await unlink(lockPath).catch(() => void 0);
82
- throw new Error("Unable to initialize the UAPKG registry-grant lock.", { cause: error });
83
- } finally {
84
- await handle.close();
85
- }
86
- }
87
- async reclaimIfStale(lockPath) {
88
- let lockStat;
89
- try {
90
- lockStat = await stat(lockPath);
91
- } catch (error) {
92
- if (errorCode(error) === "ENOENT") return true;
93
- throw new Error("Unable to inspect the UAPKG registry-grant lock.", { cause: error });
94
- }
95
- const observedOwner = await readOwner(lockPath);
96
- if (observedOwner) {
97
- if (this.isProcessAlive(observedOwner.pid)) return false;
98
- } else if (this.now() - lockStat.mtimeMs <= this.staleAfterMs) return false;
99
- const quarantinePath = `${lockPath}.stale-${randomUUID()}`;
100
- try {
101
- await rename(lockPath, quarantinePath);
102
- } catch (error) {
103
- if (errorCode(error) === "ENOENT") return true;
104
- throw new Error("Unable to quarantine a stale UAPKG registry-grant lock.", { cause: error });
105
- }
106
- const movedOwner = await readOwner(quarantinePath);
107
- if (observedOwner && movedOwner?.ownerId !== observedOwner.ownerId) {
108
- await rename(quarantinePath, lockPath).catch(() => void 0);
109
- return false;
110
- }
111
- await unlink(quarantinePath).catch((error) => {
112
- throw new Error("Unable to remove a stale UAPKG registry-grant lock.", { cause: error });
113
- });
114
- return true;
115
- }
116
- async touchIfOwned(lockPath, ownerId) {
117
- if ((await readOwner(lockPath))?.ownerId !== ownerId) return;
118
- const now = new Date(this.now());
119
- await utimes(lockPath, now, now).catch(() => void 0);
120
- }
121
- async releaseIfOwned(lockPath, ownerId) {
122
- const owner = await readOwner(lockPath);
123
- if (!owner) return;
124
- if (owner.ownerId !== ownerId) throw new Error("The UAPKG registry-grant lock changed ownership before it could be released.");
125
- try {
126
- await unlink(lockPath);
127
- } catch (error) {
128
- if (errorCode(error) === "ENOENT") return;
129
- throw new Error("Unable to release the UAPKG registry-grant lock.", { cause: error });
130
- }
131
- }
132
- };
133
- async function readOwner(lockPath) {
134
- try {
135
- const value = JSON.parse(await readFile(lockPath, "utf8"));
136
- if (typeof value !== "object" || value === null || value.version !== LOCK_FILE_VERSION || typeof value.ownerId !== "string" || !Number.isInteger(value.pid) || typeof value.acquiredAt !== "number") return;
137
- return value;
138
- } catch {
139
- return;
140
- }
141
- }
142
- function processIsAlive(pid) {
143
- if (pid === process.pid) return true;
144
- try {
145
- process.kill(pid, 0);
146
- return true;
147
- } catch (error) {
148
- return errorCode(error) !== "ESRCH";
149
- }
150
- }
151
- function positiveMilliseconds(value, fallback) {
152
- return typeof value === "number" && Number.isFinite(value) && value > 0 ? value : fallback;
153
- }
154
- function errorCode(error) {
155
- return typeof error === "object" && error !== null && "code" in error ? String(error.code) : void 0;
156
- }
157
- function delay(milliseconds) {
158
- return new Promise((resolve) => setTimeout(resolve, milliseconds));
159
- }
160
-
161
- //#endregion
162
- export { FileRegistryGrantLock };
163
- //# sourceMappingURL=RegistryGrantLock.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RegistryGrantLock.js","names":[],"sources":["../../src/control-plane/RegistryGrantLock.ts"],"sourcesContent":["import { createHash, randomUUID } from 'node:crypto';\nimport { mkdir, open, readFile, rename, stat, unlink, utimes } from 'node:fs/promises';\nimport { join } from 'node:path';\n\nconst LOCK_FILE_VERSION = 1;\nconst DEFAULT_WAIT_TIMEOUT_MS = 30_000;\nconst DEFAULT_STALE_AFTER_MS = 120_000;\nconst DEFAULT_POLL_INTERVAL_MS = 50;\nconst DEFAULT_HEARTBEAT_INTERVAL_MS = 5_000;\n\ninterface LockOwner {\n readonly version: typeof LOCK_FILE_VERSION;\n readonly ownerId: string;\n readonly pid: number;\n readonly acquiredAt: number;\n}\n\nexport interface RegistryGrantLock {\n withLock<T>(issuer: string, registryId: string, operation: () => Promise<T>): Promise<T>;\n}\n\nexport interface FileRegistryGrantLockOptions {\n readonly waitTimeoutMs?: number;\n readonly staleAfterMs?: number;\n readonly pollIntervalMs?: number;\n readonly heartbeatIntervalMs?: number;\n readonly now?: () => number;\n readonly sleep?: (milliseconds: number) => Promise<void>;\n readonly isProcessAlive?: (pid: number) => boolean;\n}\n\n/**\n * Cross-process serialization for a registry grant's rotating refresh-token\n * family. Lock file names contain only a SHA-256 digest of the issuer and\n * registry ID; lock contents contain only an opaque owner ID, PID, and time.\n */\nexport class FileRegistryGrantLock implements RegistryGrantLock {\n private readonly waitTimeoutMs: number;\n private readonly staleAfterMs: number;\n private readonly pollIntervalMs: number;\n private readonly heartbeatIntervalMs: number;\n private readonly now: () => number;\n private readonly sleep: (milliseconds: number) => Promise<void>;\n private readonly isProcessAlive: (pid: number) => boolean;\n\n public constructor(\n private readonly directory: string,\n options: FileRegistryGrantLockOptions = {},\n ) {\n this.waitTimeoutMs = positiveMilliseconds(options.waitTimeoutMs, DEFAULT_WAIT_TIMEOUT_MS);\n this.staleAfterMs = positiveMilliseconds(options.staleAfterMs, DEFAULT_STALE_AFTER_MS);\n this.pollIntervalMs = positiveMilliseconds(options.pollIntervalMs, DEFAULT_POLL_INTERVAL_MS);\n this.heartbeatIntervalMs = positiveMilliseconds(\n options.heartbeatIntervalMs,\n Math.min(DEFAULT_HEARTBEAT_INTERVAL_MS, Math.max(1, Math.floor(this.staleAfterMs / 3))),\n );\n this.now = options.now ?? Date.now;\n this.sleep = options.sleep ?? delay;\n this.isProcessAlive = options.isProcessAlive ?? processIsAlive;\n }\n\n public pathFor(issuer: string, registryId: string): string {\n const digest = createHash('sha256')\n .update(`${issuer.replace(/\\/+$/, '')}\\0${registryId.toLowerCase()}`)\n .digest('hex');\n return join(this.directory, `${digest}.lock`);\n }\n\n public async withLock<T>(issuer: string, registryId: string, operation: () => Promise<T>): Promise<T> {\n await mkdir(this.directory, { recursive: true, mode: 0o700 });\n const lockPath = this.pathFor(issuer, registryId);\n const owner: LockOwner = {\n version: LOCK_FILE_VERSION,\n ownerId: randomUUID(),\n pid: process.pid,\n acquiredAt: this.now(),\n };\n const deadline = this.now() + this.waitTimeoutMs;\n\n while (!(await this.tryAcquire(lockPath, owner))) {\n if (await this.reclaimIfStale(lockPath)) continue;\n const remaining = deadline - this.now();\n if (remaining <= 0) {\n throw new Error(\n 'Timed out waiting for another UAPKG process to finish using the saved login for this registry.',\n );\n }\n await this.sleep(Math.min(this.pollIntervalMs, remaining));\n }\n\n const heartbeat = setInterval(() => {\n void this.touchIfOwned(lockPath, owner.ownerId);\n }, this.heartbeatIntervalMs);\n heartbeat.unref?.();\n\n try {\n return await operation();\n } finally {\n clearInterval(heartbeat);\n await this.releaseIfOwned(lockPath, owner.ownerId);\n }\n }\n\n private async tryAcquire(lockPath: string, owner: LockOwner): Promise<boolean> {\n let handle: Awaited<ReturnType<typeof open>>;\n try {\n handle = await open(lockPath, 'wx', 0o600);\n } catch (error) {\n if (errorCode(error) === 'EEXIST') return false;\n throw new Error('Unable to create the UAPKG registry-grant lock.', { cause: error });\n }\n\n try {\n await handle.writeFile(JSON.stringify(owner), { encoding: 'utf8' });\n return true;\n } catch (error) {\n await unlink(lockPath).catch(() => undefined);\n throw new Error('Unable to initialize the UAPKG registry-grant lock.', { cause: error });\n } finally {\n await handle.close();\n }\n }\n\n private async reclaimIfStale(lockPath: string): Promise<boolean> {\n let lockStat: Awaited<ReturnType<typeof stat>>;\n try {\n lockStat = await stat(lockPath);\n } catch (error) {\n if (errorCode(error) === 'ENOENT') return true;\n throw new Error('Unable to inspect the UAPKG registry-grant lock.', { cause: error });\n }\n\n const observedOwner = await readOwner(lockPath);\n if (observedOwner) {\n // A valid owner record with a definitely dead PID is safe to reclaim\n // immediately. Waiting for the general stale threshold would make a\n // refresh retry miss the authorization server's bounded predecessor\n // grace after a process dies between rotation and local persistence.\n if (this.isProcessAlive(observedOwner.pid)) return false;\n } else if (this.now() - lockStat.mtimeMs <= this.staleAfterMs) {\n // A just-created lock can briefly be empty while its owner record is\n // written. Malformed or unreadable ownership therefore remains subject\n // to the conservative stale threshold.\n return false;\n }\n\n const quarantinePath = `${lockPath}.stale-${randomUUID()}`;\n try {\n await rename(lockPath, quarantinePath);\n } catch (error) {\n if (errorCode(error) === 'ENOENT') return true;\n throw new Error('Unable to quarantine a stale UAPKG registry-grant lock.', { cause: error });\n }\n\n const movedOwner = await readOwner(quarantinePath);\n if (observedOwner && movedOwner?.ownerId !== observedOwner.ownerId) {\n await rename(quarantinePath, lockPath).catch(() => undefined);\n return false;\n }\n\n await unlink(quarantinePath).catch((error: unknown) => {\n throw new Error('Unable to remove a stale UAPKG registry-grant lock.', { cause: error });\n });\n return true;\n }\n\n private async touchIfOwned(lockPath: string, ownerId: string): Promise<void> {\n const owner = await readOwner(lockPath);\n if (owner?.ownerId !== ownerId) return;\n const now = new Date(this.now());\n await utimes(lockPath, now, now).catch(() => undefined);\n }\n\n private async releaseIfOwned(lockPath: string, ownerId: string): Promise<void> {\n const owner = await readOwner(lockPath);\n if (!owner) return;\n if (owner.ownerId !== ownerId) {\n throw new Error('The UAPKG registry-grant lock changed ownership before it could be released.');\n }\n try {\n await unlink(lockPath);\n } catch (error) {\n if (errorCode(error) === 'ENOENT') return;\n throw new Error('Unable to release the UAPKG registry-grant lock.', { cause: error });\n }\n }\n}\n\nasync function readOwner(lockPath: string): Promise<LockOwner | undefined> {\n try {\n const value = JSON.parse(await readFile(lockPath, 'utf8')) as unknown;\n if (\n typeof value !== 'object' ||\n value === null ||\n (value as Partial<LockOwner>).version !== LOCK_FILE_VERSION ||\n typeof (value as Partial<LockOwner>).ownerId !== 'string' ||\n !Number.isInteger((value as Partial<LockOwner>).pid) ||\n typeof (value as Partial<LockOwner>).acquiredAt !== 'number'\n ) {\n return undefined;\n }\n return value as LockOwner;\n } catch {\n return undefined;\n }\n}\n\nfunction processIsAlive(pid: number): boolean {\n if (pid === process.pid) return true;\n try {\n process.kill(pid, 0);\n return true;\n } catch (error) {\n return errorCode(error) !== 'ESRCH';\n }\n}\n\nfunction positiveMilliseconds(value: number | undefined, fallback: number): number {\n return typeof value === 'number' && Number.isFinite(value) && value > 0 ? value : fallback;\n}\n\nfunction errorCode(error: unknown): string | undefined {\n return typeof error === 'object' && error !== null && 'code' in error\n ? String((error as { readonly code?: unknown }).code)\n : undefined;\n}\n\nfunction delay(milliseconds: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, milliseconds));\n}\n"],"mappings":";;;;;AAIA,MAAM,oBAAoB;AAC1B,MAAM,0BAA0B;AAChC,MAAM,yBAAyB;AAC/B,MAAM,2BAA2B;AACjC,MAAM,gCAAgC;;;;;;AA4BtC,IAAa,wBAAb,MAAgE;CAU3C;CATnB,AAAiB;CACjB,AAAiB;CACjB,AAAiB;CACjB,AAAiB;CACjB,AAAiB;CACjB,AAAiB;CACjB,AAAiB;CAEjB,AAAO,YACL,AAAiB,WACjB,UAAwC,CAAC,GACzC;EAFiB;EAGjB,KAAK,gBAAgB,qBAAqB,QAAQ,eAAe,uBAAuB;EACxF,KAAK,eAAe,qBAAqB,QAAQ,cAAc,sBAAsB;EACrF,KAAK,iBAAiB,qBAAqB,QAAQ,gBAAgB,wBAAw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F;AAEA,SAAS,UAAU,OAAoC;CACrD,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,UAAU,QAC5D,OAAQ,MAAsC,IAAI,IAClD;AACN;AAEA,SAAS,MAAM,cAAqC;CAClD,OAAO,IAAI,SAAS,YAAY,WAAW,SAAS,YAAY,CAAC;AACnE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"RegistryTrustResolver.d.ts","names":[],"sources":["../../src/control-plane/RegistryTrustResolver.ts"],"mappings":";;;cAca;mBACyB;EAApC,YAAoC,MAAM;EAE7B,QAAQ,0BAA0B,QAAQ;EAoD1C,aAAa,OAAO,gBAAgB;UAczC;;;;;;;iBAcM,8BAA8B;iBAyB9B,6BAA6B"}
@@ -1,105 +0,0 @@
1
- import { UAPKG_AUTHORIZATION_ISSUER, UAPKG_CONTROL_PLANE_API, registryAudience } from "./ControlPlaneTypes.js";
2
- import { normalizeUrl } from "@uapkg/common";
3
- import { join } from "node:path";
4
- import { createHash } from "node:crypto";
5
- import { readFile } from "node:fs/promises";
6
- import { getRegistryRepoPath } from "@uapkg/registry-core";
7
- import { RegistryMetaSchema } from "@uapkg/registry-schema";
8
-
9
- //#region src/control-plane/RegistryTrustResolver.ts
10
- var RegistryTrustResolver = class {
11
- root;
12
- constructor(root) {
13
- this.root = root;
14
- }
15
- async resolve(requestedAlias) {
16
- const alias = requestedAlias ?? this.selectedAlias();
17
- const result = this.root.registryCore.getOrCreateRegistry(alias);
18
- if (!result.ok) throw new Error(firstDiagnostic(result.diagnostics, `Registry "${alias}" is not configured.`));
19
- const registry = result.value;
20
- const updated = await registry.ensureUpToDate({
21
- logicalRegistryName: alias,
22
- bypassFreshnessCheck: true
23
- });
24
- if (!updated.ok || updated.value === "Failed") throw new Error(firstDiagnostic(updated.diagnostics, `Unable to update registry "${alias}".`));
25
- const metadataPath = join(getRegistryRepoPath(registry.shortId), ".uapkg", "registry.meta.json");
26
- let raw;
27
- try {
28
- raw = await readFile(metadataPath, "utf8");
29
- } catch (error) {
30
- throw new Error(`Registry "${alias}" does not contain .uapkg/registry.meta.json. It cannot be used for authenticated control-plane commands.`, { cause: error });
31
- }
32
- let json;
33
- try {
34
- json = JSON.parse(raw);
35
- } catch (error) {
36
- throw new Error(`Registry metadata for "${alias}" is not valid JSON.`, { cause: error });
37
- }
38
- const parsed = RegistryMetaSchema.safeParse(json);
39
- if (!parsed.success) throw new Error(`Registry metadata for "${alias}" does not match the supported schema.`);
40
- const repositoryUrl = canonicalizeRegistryGitOrigin(registry.descriptor.url);
41
- return {
42
- alias,
43
- registryId: parsed.data.registry.id,
44
- registryName: parsed.data.registry.name,
45
- repositoryUrl,
46
- repositoryFingerprint: fingerprintRegistryGitOrigin(repositoryUrl),
47
- issuer: UAPKG_AUTHORIZATION_ISSUER,
48
- apiBaseUrl: UAPKG_CONTROL_PLANE_API,
49
- resource: registryAudience(parsed.data.registry.id),
50
- cacheShortId: registry.shortId
51
- };
52
- }
53
- async forceRefresh(trust) {
54
- const result = this.root.registryCore.getOrCreateRegistry(trust.alias);
55
- if (!result.ok) throw new Error(firstDiagnostic(result.diagnostics, `Registry "${trust.alias}" is not configured.`));
56
- const updated = await result.value.ensureUpToDate({
57
- logicalRegistryName: trust.alias,
58
- bypassFreshnessCheck: true
59
- });
60
- if (!updated.ok || updated.value === "Failed") throw new Error(firstDiagnostic(updated.diagnostics, `Unable to refresh registry "${trust.alias}".`));
61
- }
62
- selectedAlias() {
63
- const selected = this.root.config.get("registry");
64
- if (typeof selected !== "string" || selected.trim().length === 0) throw new Error("No registry is selected. Configure one with `uapkg registry use <name>`.");
65
- return selected;
66
- }
67
- };
68
- /**
69
- * GitHub accepts HTTPS, SSH URL, and SCP-like clone coordinates for the same
70
- * repository. Control-plane authorization must bind all three spellings to one
71
- * stable source identity.
72
- */
73
- function canonicalizeRegistryGitOrigin(origin) {
74
- const value = origin.trim();
75
- const scpLike = /^(?:git@)?github\.com:([^/\s]+)\/([^/\s]+?)\/?$/i.exec(value);
76
- if (scpLike) return canonicalGitHubRepository(scpLike[1], scpLike[2]);
77
- try {
78
- const parsed = new URL(value);
79
- if (parsed.hostname.toLowerCase() === "github.com") {
80
- const path = parsed.pathname.replace(/^\/+|\/+$/g, "").split("/");
81
- if (path.length !== 2) throw new Error("A GitHub registry origin must identify exactly one owner and repository.");
82
- return canonicalGitHubRepository(path[0], path[1]);
83
- }
84
- } catch (error) {
85
- if (error instanceof Error && error.message.startsWith("A GitHub registry origin")) throw error;
86
- }
87
- return normalizeUrl(value);
88
- }
89
- function fingerprintRegistryGitOrigin(origin) {
90
- const canonical = canonicalizeRegistryGitOrigin(origin);
91
- return `sha256:${createHash("sha256").update(canonical).digest("hex")}`;
92
- }
93
- function canonicalGitHubRepository(owner, repository) {
94
- const normalizedOwner = owner.trim().toLowerCase();
95
- const normalizedRepository = repository.trim().replace(/\.git$/i, "").toLowerCase();
96
- if (!normalizedOwner || !normalizedRepository) throw new Error("A GitHub registry origin must include an owner and repository.");
97
- return `https://github.com/${normalizedOwner}/${normalizedRepository}.git`;
98
- }
99
- function firstDiagnostic(diagnostics, fallback) {
100
- return diagnostics[0]?.message ?? fallback;
101
- }
102
-
103
- //#endregion
104
- export { RegistryTrustResolver, canonicalizeRegistryGitOrigin, fingerprintRegistryGitOrigin };
105
- //# sourceMappingURL=RegistryTrustResolver.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RegistryTrustResolver.js","names":[],"sources":["../../src/control-plane/RegistryTrustResolver.ts"],"sourcesContent":["import { createHash } from 'node:crypto';\nimport { readFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { normalizeUrl } from '@uapkg/common';\nimport { getRegistryRepoPath } from '@uapkg/registry-core';\nimport { RegistryMetaSchema } from '@uapkg/registry-schema';\nimport type { CompositionRoot } from '../app/CompositionRoot.js';\nimport {\n type RegistryTrust,\n registryAudience,\n UAPKG_AUTHORIZATION_ISSUER,\n UAPKG_CONTROL_PLANE_API,\n} from './ControlPlaneTypes.js';\n\nexport class RegistryTrustResolver {\n public constructor(private readonly root: CompositionRoot) {}\n\n public async resolve(requestedAlias?: string): Promise<RegistryTrust> {\n const alias = requestedAlias ?? this.selectedAlias();\n const result = this.root.registryCore.getOrCreateRegistry(alias);\n if (!result.ok) {\n throw new Error(firstDiagnostic(result.diagnostics, `Registry \"${alias}\" is not configured.`));\n }\n\n const registry = result.value;\n const updated = await registry.ensureUpToDate({\n logicalRegistryName: alias,\n bypassFreshnessCheck: true,\n });\n if (!updated.ok || updated.value === 'Failed') {\n throw new Error(firstDiagnostic(updated.diagnostics, `Unable to update registry \"${alias}\".`));\n }\n\n const metadataPath = join(getRegistryRepoPath(registry.shortId), '.uapkg', 'registry.meta.json');\n let raw: string;\n try {\n raw = await readFile(metadataPath, 'utf8');\n } catch (error) {\n throw new Error(\n `Registry \"${alias}\" does not contain .uapkg/registry.meta.json. It cannot be used for authenticated control-plane commands.`,\n { cause: error },\n );\n }\n\n let json: unknown;\n try {\n json = JSON.parse(raw) as unknown;\n } catch (error) {\n throw new Error(`Registry metadata for \"${alias}\" is not valid JSON.`, { cause: error });\n }\n const parsed = RegistryMetaSchema.safeParse(json);\n if (!parsed.success) {\n throw new Error(`Registry metadata for \"${alias}\" does not match the supported schema.`);\n }\n\n const repositoryUrl = canonicalizeRegistryGitOrigin(registry.descriptor.url);\n return {\n alias,\n registryId: parsed.data.registry.id,\n registryName: parsed.data.registry.name,\n repositoryUrl,\n repositoryFingerprint: fingerprintRegistryGitOrigin(repositoryUrl),\n issuer: UAPKG_AUTHORIZATION_ISSUER,\n apiBaseUrl: UAPKG_CONTROL_PLANE_API,\n resource: registryAudience(parsed.data.registry.id),\n cacheShortId: registry.shortId,\n };\n }\n\n public async forceRefresh(trust: RegistryTrust): Promise<void> {\n const result = this.root.registryCore.getOrCreateRegistry(trust.alias);\n if (!result.ok) {\n throw new Error(firstDiagnostic(result.diagnostics, `Registry \"${trust.alias}\" is not configured.`));\n }\n const updated = await result.value.ensureUpToDate({\n logicalRegistryName: trust.alias,\n bypassFreshnessCheck: true,\n });\n if (!updated.ok || updated.value === 'Failed') {\n throw new Error(firstDiagnostic(updated.diagnostics, `Unable to refresh registry \"${trust.alias}\".`));\n }\n }\n\n private selectedAlias(): string {\n const selected = this.root.config.get('registry');\n if (typeof selected !== 'string' || selected.trim().length === 0) {\n throw new Error('No registry is selected. Configure one with `uapkg registry use <name>`.');\n }\n return selected;\n }\n}\n\n/**\n * GitHub accepts HTTPS, SSH URL, and SCP-like clone coordinates for the same\n * repository. Control-plane authorization must bind all three spellings to one\n * stable source identity.\n */\nexport function canonicalizeRegistryGitOrigin(origin: string): string {\n const value = origin.trim();\n const scpLike = /^(?:git@)?github\\.com:([^/\\s]+)\\/([^/\\s]+?)\\/?$/i.exec(value);\n if (scpLike) {\n return canonicalGitHubRepository(scpLike[1], scpLike[2]);\n }\n\n try {\n const parsed = new URL(value);\n if (parsed.hostname.toLowerCase() === 'github.com') {\n const path = parsed.pathname.replace(/^\\/+|\\/+$/g, '').split('/');\n if (path.length !== 2) {\n throw new Error('A GitHub registry origin must identify exactly one owner and repository.');\n }\n return canonicalGitHubRepository(path[0], path[1]);\n }\n } catch (error) {\n if (error instanceof Error && error.message.startsWith('A GitHub registry origin')) {\n throw error;\n }\n }\n\n return normalizeUrl(value);\n}\n\nexport function fingerprintRegistryGitOrigin(origin: string): string {\n const canonical = canonicalizeRegistryGitOrigin(origin);\n return `sha256:${createHash('sha256').update(canonical).digest('hex')}`;\n}\n\nfunction canonicalGitHubRepository(owner: string, repository: string): string {\n const normalizedOwner = owner.trim().toLowerCase();\n const normalizedRepository = repository\n .trim()\n .replace(/\\.git$/i, '')\n .toLowerCase();\n if (!normalizedOwner || !normalizedRepository) {\n throw new Error('A GitHub registry origin must include an owner and repository.');\n }\n return `https://github.com/${normalizedOwner}/${normalizedRepository}.git`;\n}\n\nfunction firstDiagnostic(diagnostics: readonly { readonly message: string }[], fallback: string): string {\n return diagnostics[0]?.message ?? fallback;\n}\n"],"mappings":";;;;;;;;;AAcA,IAAa,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CAAC,CAAC,OAAO,SAAS,CAAC,CAAC,OAAO,KAAK;AACtE;AAEA,SAAS,0BAA0B,OAAe,YAA4B;CAC5E,MAAM,kBAAkB,MAAM,KAAK,CAAC,CAAC,YAAY;CACjD,MAAM,uBAAuB,WAC1B,KAAK,CAAC,CACN,QAAQ,WAAW,EAAE,CAAC,CACtB,YAAY;CACf,IAAI,CAAC,mBAAmB,CAAC,sBACvB,MAAM,IAAI,MAAM,gEAAgE;CAElF,OAAO,sBAAsB,gBAAgB,GAAG,qBAAqB;AACvE;AAEA,SAAS,gBAAgB,aAAsD,UAA0B;CACvG,OAAO,YAAY,EAAE,EAAE,WAAW;AACpC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"PostinstallDsl.d.ts","names":[],"sources":["../../../src/postinstall/api/PostinstallDsl.ts"],"mappings":";;;;;;;;;;cAUa,YAAU,EAAA;;;GAKZ,EAAA,KAAA;;;;cAKE,oBAAkB,EAAA;;GAIpB,EAAA,KAAA;;;;;;;;;cAUE,6BAA2B,EAAA;;;;;;;;;;;;GAM7B,EAAA,KAAA;KAEC,iBAAiB,EAAE,aAAa;KAChC,yBAAyB,EAAE,aAAa;KACxC,wBAAwB,EAAE,aAAa"}
@@ -1,36 +0,0 @@
1
- import { z } from "zod";
2
-
3
- //#region src/postinstall/api/PostinstallDsl.ts
4
- /**
5
- * Zone-level content injected into a single Unreal build file (Build.cs or Target.cs).
6
- *
7
- * - `includes`: raw C# `using ...;` lines appended to the file's using block.
8
- * - `classBody`: raw C# members placed inside the target class; uapkg wraps them
9
- * in a hashed helper class and inserts a single `Apply(this)` call into the
10
- * constructor. The content must compile as a member list.
11
- */
12
- const ZoneSchema = z.object({
13
- includes: z.string().min(1).optional(),
14
- classBody: z.string().min(1).optional()
15
- }).strict();
16
- /**
17
- * Project-level setup: plugins to enable in the host project's `.uproject`.
18
- */
19
- const ProjectSetupSchema = z.object({ plugins: z.array(z.string().min(1)).optional() }).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
- const PostinstallDefinitionSchema = z.object({
29
- setupModules: ZoneSchema.optional(),
30
- setupTargets: ZoneSchema.optional(),
31
- setupProject: ProjectSetupSchema.optional()
32
- }).strict();
33
-
34
- //#endregion
35
- export { PostinstallDefinitionSchema, ProjectSetupSchema, ZoneSchema };
36
- //# sourceMappingURL=PostinstallDsl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PostinstallDsl.js","names":[],"sources":["../../../src/postinstall/api/PostinstallDsl.ts"],"sourcesContent":["import { z } from 'zod';\n\n/**\n * Zone-level content injected into a single Unreal build file (Build.cs or Target.cs).\n *\n * - `includes`: raw C# `using ...;` lines appended to the file's using block.\n * - `classBody`: raw C# members placed inside the target class; uapkg wraps them\n * in a hashed helper class and inserts a single `Apply(this)` call into the\n * constructor. The content must compile as a member list.\n */\nexport const ZoneSchema = z\n .object({\n includes: z.string().min(1).optional(),\n classBody: z.string().min(1).optional(),\n })\n .strict();\n\n/**\n * Project-level setup: plugins to enable in the host project's `.uproject`.\n */\nexport const ProjectSetupSchema = z\n .object({\n plugins: z.array(z.string().min(1)).optional(),\n })\n .strict();\n\n/**\n * The authoritative shape of `export default definePostinstall({...})`.\n *\n * Scopes:\n * - `setupModules`: applied to each *project postinstall module* Build.cs file.\n * - `setupTargets`: applied to every *.Target.cs in the host project.\n * - `setupProject`: edits the host project's `.uproject`.\n */\nexport const PostinstallDefinitionSchema = z\n .object({\n setupModules: ZoneSchema.optional(),\n setupTargets: ZoneSchema.optional(),\n setupProject: ProjectSetupSchema.optional(),\n })\n .strict();\n\nexport type ZoneDefinition = z.infer<typeof ZoneSchema>;\nexport type ProjectSetupDefinition = z.infer<typeof ProjectSetupSchema>;\nexport type PostinstallDefinition = z.infer<typeof PostinstallDefinitionSchema>;\n"],"mappings":";;;;;;;;;;;AAUA,MAAa,aAAa,EACvB,OAAO;CACN,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;CACrC,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;AACxC,CAAC,CAAC,CACD,OAAO;;;;AAKV,MAAa,qBAAqB,EAC/B,OAAO,EACN,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,EAC/C,CAAC,CAAC,CACD,OAAO;;;;;;;;;AAUV,MAAa,8BAA8B,EACxC,OAAO;CACN,cAAc,WAAW,SAAS;CAClC,cAAc,WAAW,SAAS;CAClC,cAAc,mBAAmB,SAAS;AAC5C,CAAC,CAAC,CACD,OAAO"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"definePostinstall.d.ts","names":[],"sources":["../../../src/postinstall/api/definePostinstall.ts"],"mappings":";;;;;;;;;;;;;;;;;iBAiBgB,kBAAkB,YAAY,wBAAwB"}
@@ -1,23 +0,0 @@
1
- //#region src/postinstall/api/definePostinstall.ts
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
- function definePostinstall(definition) {
18
- return definition;
19
- }
20
-
21
- //#endregion
22
- export { definePostinstall };
23
- //# sourceMappingURL=definePostinstall.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"definePostinstall.js","names":[],"sources":["../../../src/postinstall/api/definePostinstall.ts"],"sourcesContent":["import type { PostinstallDefinition } from './PostinstallDsl.js';\n\n/**\n * Identity helper used in user-authored `.uapkg/postinstall.ts` files:\n *\n * ```ts\n * import { definePostinstall } from 'uapkg/postinstall';\n * export default definePostinstall({\n * setupModules: { classBody: '...' },\n * });\n * ```\n *\n * At runtime this is the identity function; at edit time it gives authors\n * full TypeScript autocomplete/validation against {@link PostinstallDefinition}.\n * The loader validates the shape regardless of whether the author used this\n * helper, so it is purely ergonomic.\n */\nexport function definePostinstall(definition: PostinstallDefinition): PostinstallDefinition {\n return definition;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAiBA,SAAgB,kBAAkB,YAA0D;CAC1F,OAAO;AACT"}
@@ -1,25 +0,0 @@
1
- import { EntryResolver } from "./loader/EntryResolver.js";
2
- import { EsbuildTranspiler } from "./loader/EsbuildTranspiler.js";
3
- import { PostinstallDefinitionSchema, ProjectSetupSchema, ZoneSchema } from "./api/PostinstallDsl.js";
4
- import { ExportValidator } from "./loader/ExportValidator.js";
5
- import { ModuleImporter } from "./loader/ModuleImporter.js";
6
- import { PostinstallLoader } from "./loader/PostinstallLoader.js";
7
- import { PostinstallPolicyGate } from "./policy/PostinstallPolicyGate.js";
8
- import { MarkerBlockService } from "./markers/MarkerBlockService.js";
9
- import { MarkerIntegrityValidator } from "./markers/MarkerIntegrityValidator.js";
10
- import { MarkerBlockEditor } from "./markers/MarkerBlockEditor.js";
11
- import { CSharpInjectionEngine } from "./unreal/CSharpInjectionEngine.js";
12
- import { PrettyParseError } from "./unreal/PrettyParseError.js";
13
- import { CSharpStructureAnalyzer } from "./unreal/CSharpStructureAnalyzer.js";
14
- import { CSharpWrapperFactory } from "./unreal/CSharpWrapperFactory.js";
15
- import { getPluginHash, getWrapperClassName } from "./unreal/PluginHash.js";
16
- import { BuildCsInjector } from "./unreal/BuildCsInjector.js";
17
- import { ProjectFileLocator } from "./unreal/ProjectFileLocator.js";
18
- import { TargetCsInjector } from "./unreal/TargetCsInjector.js";
19
- import { UnrealSourceCatalogBuilder } from "./unreal/UnrealSourceCatalog.js";
20
- import { UProjectInjector } from "./unreal/UProjectInjector.js";
21
- import { UProjectMetadataReader } from "./unreal/UProjectMetadataReader.js";
22
- import { PostinstallOrchestrator } from "./runner/PostinstallOrchestrator.js";
23
- import { definePostinstall } from "./api/definePostinstall.js";
24
-
25
- export { BuildCsInjector, CSharpInjectionEngine, CSharpStructureAnalyzer, CSharpWrapperFactory, EntryResolver, EsbuildTranspiler, ExportValidator, MarkerBlockEditor, MarkerBlockService, MarkerIntegrityValidator, ModuleImporter, PostinstallDefinitionSchema, PostinstallLoader, PostinstallOrchestrator, PostinstallPolicyGate, PrettyParseError, ProjectFileLocator, ProjectSetupSchema, TargetCsInjector, UProjectInjector, UProjectMetadataReader, UnrealSourceCatalogBuilder, ZoneSchema, definePostinstall, getPluginHash, getWrapperClassName };
@@ -1 +0,0 @@
1
- {"version":3,"file":"EntryResolver.d.ts","names":[],"sources":["../../../src/postinstall/loader/EntryResolver.ts"],"mappings":";;;cAKM;KACM,+BAA+B;UAE1B;WACN;WACA,MAAM;;;;;;;;;cAUJ;EACJ,QAAQ,qBAAqB,qBAAqB,OAAO"}