@uapkg/cli 1.2.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/CompositionRoot.d.ts +36 -33
- package/dist/app/CompositionRoot.d.ts.map +1 -1
- package/dist/app/CompositionRoot.js +91 -109
- package/dist/app/CompositionRoot.js.map +1 -1
- package/dist/app/UAPKGApplication.d.ts +6 -3
- package/dist/app/UAPKGApplication.d.ts.map +1 -1
- package/dist/app/UAPKGApplication.js +155 -169
- package/dist/app/UAPKGApplication.js.map +1 -1
- package/dist/build/BuildMetadata.d.ts +9 -6
- package/dist/build/BuildMetadata.d.ts.map +1 -1
- package/dist/build/BuildMetadata.js +2 -2
- package/dist/cli/UAPKGCommandLine.d.ts +259 -257
- package/dist/cli/UAPKGCommandLine.d.ts.map +1 -1
- package/dist/cli/UAPKGCommandLine.js +248 -239
- package/dist/cli/UAPKGCommandLine.js.map +1 -1
- package/dist/cli/parseCommandLine.d.ts +5 -1
- package/dist/cli/parseCommandLine.d.ts.map +1 -1
- package/dist/cli/parseCommandLine.js +8 -3
- package/dist/cli/parseCommandLine.js.map +1 -1
- package/dist/cli/parsing/UAPKGCommandLineParser.d.ts +9 -6
- package/dist/cli/parsing/UAPKGCommandLineParser.d.ts.map +1 -1
- package/dist/cli/parsing/UAPKGCommandLineParser.js +23 -31
- package/dist/cli/parsing/UAPKGCommandLineParser.js.map +1 -1
- package/dist/cli/parsing/UAPKGParserRegistry.d.ts +12 -9
- package/dist/cli/parsing/UAPKGParserRegistry.d.ts.map +1 -1
- package/dist/cli/parsing/UAPKGParserRegistry.js +53 -50
- package/dist/cli/parsing/UAPKGParserRegistry.js.map +1 -1
- package/dist/cli/parsing/contracts/UAPKGCommandModule.d.ts +9 -6
- package/dist/cli/parsing/contracts/UAPKGCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/contracts/UAPKGCommandModule.js +1 -2
- package/dist/cli/parsing/modules/AddCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/AddCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/AddCommandModule.js +49 -36
- package/dist/cli/parsing/modules/AddCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/ConfigCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/ConfigCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/ConfigCommandModule.js +87 -83
- package/dist/cli/parsing/modules/ConfigCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/InitCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/InitCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/InitCommandModule.js +25 -22
- package/dist/cli/parsing/modules/InitCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/InstallCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/InstallCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/InstallCommandModule.js +36 -28
- package/dist/cli/parsing/modules/InstallCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/LifecycleCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/LifecycleCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/LifecycleCommandModule.js +78 -50
- package/dist/cli/parsing/modules/LifecycleCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/ListCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/ListCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/ListCommandModule.js +26 -15
- package/dist/cli/parsing/modules/ListCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/LoginCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/LoginCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/LoginCommandModule.js +34 -33
- package/dist/cli/parsing/modules/LoginCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/LogoutCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/LogoutCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/LogoutCommandModule.js +30 -28
- package/dist/cli/parsing/modules/LogoutCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/OutdatedCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/OutdatedCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/OutdatedCommandModule.js +21 -16
- package/dist/cli/parsing/modules/OutdatedCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/PackCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/PackCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/PackCommandModule.js +30 -28
- package/dist/cli/parsing/modules/PackCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/ProjectGetNameCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/ProjectGetNameCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/ProjectGetNameCommandModule.js +14 -11
- package/dist/cli/parsing/modules/ProjectGetNameCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/PublishCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/PublishCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/PublishCommandModule.js +63 -47
- package/dist/cli/parsing/modules/PublishCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/RegistryCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/RegistryCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/RegistryCommandModule.js +117 -120
- package/dist/cli/parsing/modules/RegistryCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/RemoveCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/RemoveCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/RemoveCommandModule.js +25 -14
- package/dist/cli/parsing/modules/RemoveCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/RequestsCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/RequestsCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/RequestsCommandModule.js +56 -60
- package/dist/cli/parsing/modules/RequestsCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/UpdateCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/UpdateCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/UpdateCommandModule.js +38 -25
- package/dist/cli/parsing/modules/UpdateCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/WhoamiCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/WhoamiCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/WhoamiCommandModule.js +30 -28
- package/dist/cli/parsing/modules/WhoamiCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/WhyCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/WhyCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/WhyCommandModule.js +25 -14
- package/dist/cli/parsing/modules/WhyCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/sharedOptions.d.ts +8 -5
- package/dist/cli/parsing/modules/sharedOptions.d.ts.map +1 -1
- package/dist/cli/parsing/modules/sharedOptions.js +18 -23
- package/dist/cli/parsing/modules/sharedOptions.js.map +1 -1
- package/dist/cli/runUAPKGCLI.d.ts +4 -1
- package/dist/cli/runUAPKGCLI.d.ts.map +1 -1
- package/dist/cli/runUAPKGCLI.js +10 -5
- package/dist/cli/runUAPKGCLI.js.map +1 -1
- package/dist/cli-bootstrap.d.ts +1 -2
- package/dist/cli-bootstrap.js +15 -12
- package/dist/cli-bootstrap.js.map +1 -1
- package/dist/commands/AddCommand.d.ts +19 -16
- package/dist/commands/AddCommand.d.ts.map +1 -1
- package/dist/commands/AddCommand.js +49 -53
- package/dist/commands/AddCommand.js.map +1 -1
- package/dist/commands/Command.d.ts +5 -2
- package/dist/commands/Command.d.ts.map +1 -1
- package/dist/commands/Command.js +1 -2
- package/dist/commands/ConfigCommand.d.ts +28 -25
- package/dist/commands/ConfigCommand.d.ts.map +1 -1
- package/dist/commands/ConfigCommand.js +165 -186
- package/dist/commands/ConfigCommand.js.map +1 -1
- package/dist/commands/InitCommand.d.ts +19 -16
- package/dist/commands/InitCommand.d.ts.map +1 -1
- package/dist/commands/InitCommand.js +65 -60
- package/dist/commands/InitCommand.js.map +1 -1
- package/dist/commands/InstallCommand.d.ts +16 -13
- package/dist/commands/InstallCommand.d.ts.map +1 -1
- package/dist/commands/InstallCommand.js +118 -110
- package/dist/commands/InstallCommand.js.map +1 -1
- package/dist/commands/ListCommand.d.ts +13 -10
- package/dist/commands/ListCommand.d.ts.map +1 -1
- package/dist/commands/ListCommand.js +76 -81
- package/dist/commands/ListCommand.js.map +1 -1
- package/dist/commands/LoginCommand.d.ts +17 -14
- package/dist/commands/LoginCommand.d.ts.map +1 -1
- package/dist/commands/LoginCommand.js +66 -72
- package/dist/commands/LoginCommand.js.map +1 -1
- package/dist/commands/LogoutCommand.d.ts +15 -12
- package/dist/commands/LogoutCommand.d.ts.map +1 -1
- package/dist/commands/LogoutCommand.js +36 -37
- package/dist/commands/LogoutCommand.js.map +1 -1
- package/dist/commands/OutdatedCommand.d.ts +12 -9
- package/dist/commands/OutdatedCommand.d.ts.map +1 -1
- package/dist/commands/OutdatedCommand.js +41 -40
- package/dist/commands/OutdatedCommand.js.map +1 -1
- package/dist/commands/PackCommand.d.ts +13 -10
- package/dist/commands/PackCommand.d.ts.map +1 -1
- package/dist/commands/PackCommand.js +26 -21
- package/dist/commands/PackCommand.js.map +1 -1
- package/dist/commands/PackageLifecycleCommand.d.ts +23 -19
- package/dist/commands/PackageLifecycleCommand.d.ts.map +1 -1
- package/dist/commands/PackageLifecycleCommand.js +144 -129
- package/dist/commands/PackageLifecycleCommand.js.map +1 -1
- package/dist/commands/PostinstallCandidateBuilder.d.ts +11 -8
- package/dist/commands/PostinstallCandidateBuilder.d.ts.map +1 -1
- package/dist/commands/PostinstallCandidateBuilder.js +42 -42
- package/dist/commands/PostinstallCandidateBuilder.js.map +1 -1
- package/dist/commands/ProjectGetNameCommand.d.ts +10 -7
- package/dist/commands/ProjectGetNameCommand.d.ts.map +1 -1
- package/dist/commands/ProjectGetNameCommand.js +25 -25
- package/dist/commands/ProjectGetNameCommand.js.map +1 -1
- package/dist/commands/PublishCommand.d.ts +29 -23
- package/dist/commands/PublishCommand.d.ts.map +1 -1
- package/dist/commands/PublishCommand.js +243 -244
- package/dist/commands/PublishCommand.js.map +1 -1
- package/dist/commands/RegistryCommand.d.ts +38 -35
- package/dist/commands/RegistryCommand.d.ts.map +1 -1
- package/dist/commands/RegistryCommand.js +195 -223
- package/dist/commands/RegistryCommand.js.map +1 -1
- package/dist/commands/RemoveCommand.d.ts +14 -11
- package/dist/commands/RemoveCommand.d.ts.map +1 -1
- package/dist/commands/RemoveCommand.js +47 -54
- package/dist/commands/RemoveCommand.js.map +1 -1
- package/dist/commands/RequestsCommand.d.ts +21 -18
- package/dist/commands/RequestsCommand.d.ts.map +1 -1
- package/dist/commands/RequestsCommand.js +82 -95
- package/dist/commands/RequestsCommand.js.map +1 -1
- package/dist/commands/UpdateCommand.d.ts +29 -26
- package/dist/commands/UpdateCommand.d.ts.map +1 -1
- package/dist/commands/UpdateCommand.js +111 -111
- package/dist/commands/UpdateCommand.js.map +1 -1
- package/dist/commands/WhoamiCommand.d.ts +30 -27
- package/dist/commands/WhoamiCommand.d.ts.map +1 -1
- package/dist/commands/WhoamiCommand.js +63 -72
- package/dist/commands/WhoamiCommand.js.map +1 -1
- package/dist/commands/WhyCommand.d.ts +13 -10
- package/dist/commands/WhyCommand.d.ts.map +1 -1
- package/dist/commands/WhyCommand.js +45 -44
- package/dist/commands/WhyCommand.js.map +1 -1
- package/dist/commands/add/DependencyAddResolver.d.ts +14 -11
- package/dist/commands/add/DependencyAddResolver.d.ts.map +1 -1
- package/dist/commands/add/DependencyAddResolver.js +36 -36
- package/dist/commands/add/DependencyAddResolver.js.map +1 -1
- package/dist/control-plane/AccountManager.d.ts +96 -94
- package/dist/control-plane/AccountManager.d.ts.map +1 -1
- package/dist/control-plane/AccountManager.js +775 -967
- package/dist/control-plane/AccountManager.js.map +1 -1
- package/dist/control-plane/ArtifactObserver.d.ts +19 -16
- package/dist/control-plane/ArtifactObserver.d.ts.map +1 -1
- package/dist/control-plane/ArtifactObserver.js +73 -59
- package/dist/control-plane/ArtifactObserver.js.map +1 -1
- package/dist/control-plane/AuthMetadataStore.d.ts +16 -13
- package/dist/control-plane/AuthMetadataStore.d.ts.map +1 -1
- package/dist/control-plane/AuthMetadataStore.js +111 -113
- package/dist/control-plane/AuthMetadataStore.js.map +1 -1
- package/dist/control-plane/AuthStoragePaths.d.ts +7 -4
- package/dist/control-plane/AuthStoragePaths.d.ts.map +1 -1
- package/dist/control-plane/AuthStoragePaths.js +19 -14
- package/dist/control-plane/AuthStoragePaths.js.map +1 -1
- package/dist/control-plane/AuthenticationSelector.d.ts +21 -18
- package/dist/control-plane/AuthenticationSelector.d.ts.map +1 -1
- package/dist/control-plane/AuthenticationSelector.js +69 -63
- package/dist/control-plane/AuthenticationSelector.js.map +1 -1
- package/dist/control-plane/ControlPlaneClient.d.ts +37 -28
- package/dist/control-plane/ControlPlaneClient.d.ts.map +1 -1
- package/dist/control-plane/ControlPlaneClient.js +265 -254
- package/dist/control-plane/ControlPlaneClient.js.map +1 -1
- package/dist/control-plane/ControlPlaneEndpoints.d.ts +9 -6
- package/dist/control-plane/ControlPlaneEndpoints.d.ts.map +1 -1
- package/dist/control-plane/ControlPlaneEndpoints.js +17 -12
- package/dist/control-plane/ControlPlaneEndpoints.js.map +1 -1
- package/dist/control-plane/ControlPlaneTypes.d.ts +176 -152
- package/dist/control-plane/ControlPlaneTypes.d.ts.map +1 -1
- package/dist/control-plane/ControlPlaneTypes.js +88 -81
- package/dist/control-plane/ControlPlaneTypes.js.map +1 -1
- package/dist/control-plane/CredentialStore.d.ts +20 -18
- package/dist/control-plane/CredentialStore.d.ts.map +1 -1
- package/dist/control-plane/CredentialStore.js +66 -83
- package/dist/control-plane/CredentialStore.js.map +1 -1
- package/dist/control-plane/DPoPKeyStore.d.ts +12 -9
- package/dist/control-plane/DPoPKeyStore.d.ts.map +1 -1
- package/dist/control-plane/DPoPKeyStore.js +57 -53
- package/dist/control-plane/DPoPKeyStore.js.map +1 -1
- package/dist/control-plane/GitHubActionsOidcCredentialProvider.d.ts +37 -4
- package/dist/control-plane/GitHubActionsOidcCredentialProvider.d.ts.map +1 -1
- package/dist/control-plane/GitHubActionsOidcCredentialProvider.js +197 -63
- package/dist/control-plane/GitHubActionsOidcCredentialProvider.js.map +1 -1
- package/dist/control-plane/PublishIdempotencyStore.d.ts +25 -9
- package/dist/control-plane/PublishIdempotencyStore.d.ts.map +1 -1
- package/dist/control-plane/PublishIdempotencyStore.js +97 -68
- package/dist/control-plane/PublishIdempotencyStore.js.map +1 -1
- package/dist/control-plane/PublishRequestErrorMapper.d.ts +155 -0
- package/dist/control-plane/PublishRequestErrorMapper.d.ts.map +1 -0
- package/dist/control-plane/PublishRequestErrorMapper.js +597 -0
- package/dist/control-plane/PublishRequestErrorMapper.js.map +1 -0
- package/dist/control-plane/RegistryGrantLock.d.ts +29 -26
- package/dist/control-plane/RegistryGrantLock.d.ts.map +1 -1
- package/dist/control-plane/RegistryGrantLock.js +149 -185
- package/dist/control-plane/RegistryGrantLock.js.map +1 -1
- package/dist/control-plane/RegistryTrustResolver.d.ts +13 -10
- package/dist/control-plane/RegistryTrustResolver.d.ts.map +1 -1
- package/dist/control-plane/RegistryTrustResolver.js +97 -132
- package/dist/control-plane/RegistryTrustResolver.js.map +1 -1
- package/dist/index.d.ts +62 -39
- package/dist/index.js +60 -53
- package/dist/postinstall/api/PostinstallDsl.d.ts +24 -21
- package/dist/postinstall/api/PostinstallDsl.d.ts.map +1 -1
- package/dist/postinstall/api/PostinstallDsl.js +32 -35
- package/dist/postinstall/api/PostinstallDsl.js.map +1 -1
- package/dist/postinstall/api/definePostinstall.d.ts +5 -2
- package/dist/postinstall/api/definePostinstall.d.ts.map +1 -1
- package/dist/postinstall/api/definePostinstall.js +20 -16
- package/dist/postinstall/api/definePostinstall.js.map +1 -1
- package/dist/postinstall/index.d.ts +25 -26
- package/dist/postinstall/index.js +25 -37
- package/dist/postinstall/loader/EntryResolver.d.ts +11 -9
- package/dist/postinstall/loader/EntryResolver.d.ts.map +1 -1
- package/dist/postinstall/loader/EntryResolver.js +36 -32
- package/dist/postinstall/loader/EntryResolver.js.map +1 -1
- package/dist/postinstall/loader/EsbuildTranspiler.d.ts +6 -3
- package/dist/postinstall/loader/EsbuildTranspiler.d.ts.map +1 -1
- package/dist/postinstall/loader/EsbuildTranspiler.js +52 -56
- package/dist/postinstall/loader/EsbuildTranspiler.js.map +1 -1
- package/dist/postinstall/loader/ExportValidator.d.ts +8 -5
- package/dist/postinstall/loader/ExportValidator.d.ts.map +1 -1
- package/dist/postinstall/loader/ExportValidator.js +36 -32
- package/dist/postinstall/loader/ExportValidator.js.map +1 -1
- package/dist/postinstall/loader/ModuleImporter.d.ts +17 -14
- package/dist/postinstall/loader/ModuleImporter.d.ts.map +1 -1
- package/dist/postinstall/loader/ModuleImporter.js +50 -58
- package/dist/postinstall/loader/ModuleImporter.js.map +1 -1
- package/dist/postinstall/loader/PostinstallLoader.d.ts +22 -19
- package/dist/postinstall/loader/PostinstallLoader.d.ts.map +1 -1
- package/dist/postinstall/loader/PostinstallLoader.js +62 -58
- package/dist/postinstall/loader/PostinstallLoader.js.map +1 -1
- package/dist/postinstall/markers/MarkerBlockEditor.d.ts +19 -16
- package/dist/postinstall/markers/MarkerBlockEditor.d.ts.map +1 -1
- package/dist/postinstall/markers/MarkerBlockEditor.js +48 -44
- package/dist/postinstall/markers/MarkerBlockEditor.js.map +1 -1
- package/dist/postinstall/markers/MarkerBlockService.d.ts +10 -7
- package/dist/postinstall/markers/MarkerBlockService.d.ts.map +1 -1
- package/dist/postinstall/markers/MarkerBlockService.js +44 -44
- package/dist/postinstall/markers/MarkerBlockService.js.map +1 -1
- package/dist/postinstall/markers/MarkerIntegrityValidator.d.ts +12 -9
- package/dist/postinstall/markers/MarkerIntegrityValidator.d.ts.map +1 -1
- package/dist/postinstall/markers/MarkerIntegrityValidator.js +47 -52
- package/dist/postinstall/markers/MarkerIntegrityValidator.js.map +1 -1
- package/dist/postinstall/policy/PostinstallPolicyGate.d.ts +25 -23
- package/dist/postinstall/policy/PostinstallPolicyGate.d.ts.map +1 -1
- package/dist/postinstall/policy/PostinstallPolicyGate.js +63 -52
- package/dist/postinstall/policy/PostinstallPolicyGate.js.map +1 -1
- package/dist/postinstall/runner/PostinstallOrchestrator.d.ts +48 -45
- package/dist/postinstall/runner/PostinstallOrchestrator.d.ts.map +1 -1
- package/dist/postinstall/runner/PostinstallOrchestrator.js +172 -170
- package/dist/postinstall/runner/PostinstallOrchestrator.js.map +1 -1
- package/dist/postinstall/unreal/BuildCsInjector.d.ts +16 -13
- package/dist/postinstall/unreal/BuildCsInjector.d.ts.map +1 -1
- package/dist/postinstall/unreal/BuildCsInjector.js +58 -53
- package/dist/postinstall/unreal/BuildCsInjector.js.map +1 -1
- package/dist/postinstall/unreal/CSharpInjectionEngine.d.ts +13 -10
- package/dist/postinstall/unreal/CSharpInjectionEngine.d.ts.map +1 -1
- package/dist/postinstall/unreal/CSharpInjectionEngine.js +56 -59
- package/dist/postinstall/unreal/CSharpInjectionEngine.js.map +1 -1
- package/dist/postinstall/unreal/CSharpStructureAnalyzer.d.ts +11 -8
- package/dist/postinstall/unreal/CSharpStructureAnalyzer.d.ts.map +1 -1
- package/dist/postinstall/unreal/CSharpStructureAnalyzer.js +123 -127
- package/dist/postinstall/unreal/CSharpStructureAnalyzer.js.map +1 -1
- package/dist/postinstall/unreal/CSharpStructures.d.ts +18 -15
- package/dist/postinstall/unreal/CSharpStructures.d.ts.map +1 -1
- package/dist/postinstall/unreal/CSharpStructures.js +1 -2
- package/dist/postinstall/unreal/CSharpWrapperFactory.d.ts +7 -4
- package/dist/postinstall/unreal/CSharpWrapperFactory.d.ts.map +1 -1
- package/dist/postinstall/unreal/CSharpWrapperFactory.js +54 -58
- package/dist/postinstall/unreal/CSharpWrapperFactory.js.map +1 -1
- package/dist/postinstall/unreal/PluginHash.d.ts +5 -2
- package/dist/postinstall/unreal/PluginHash.d.ts.map +1 -1
- package/dist/postinstall/unreal/PluginHash.js +13 -8
- package/dist/postinstall/unreal/PluginHash.js.map +1 -1
- package/dist/postinstall/unreal/PrettyParseError.d.ts +8 -5
- package/dist/postinstall/unreal/PrettyParseError.d.ts.map +1 -1
- package/dist/postinstall/unreal/PrettyParseError.js +37 -37
- package/dist/postinstall/unreal/PrettyParseError.js.map +1 -1
- package/dist/postinstall/unreal/ProjectFileLocator.d.ts +12 -9
- package/dist/postinstall/unreal/ProjectFileLocator.d.ts.map +1 -1
- package/dist/postinstall/unreal/ProjectFileLocator.js +49 -51
- package/dist/postinstall/unreal/ProjectFileLocator.js.map +1 -1
- package/dist/postinstall/unreal/TargetCsInjector.d.ts +16 -13
- package/dist/postinstall/unreal/TargetCsInjector.d.ts.map +1 -1
- package/dist/postinstall/unreal/TargetCsInjector.js +58 -53
- package/dist/postinstall/unreal/TargetCsInjector.js.map +1 -1
- package/dist/postinstall/unreal/UProjectInjector.d.ts +6 -3
- package/dist/postinstall/unreal/UProjectInjector.d.ts.map +1 -1
- package/dist/postinstall/unreal/UProjectInjector.js +56 -52
- package/dist/postinstall/unreal/UProjectInjector.js.map +1 -1
- package/dist/postinstall/unreal/UProjectMetadataReader.d.ts +5 -2
- package/dist/postinstall/unreal/UProjectMetadataReader.d.ts.map +1 -1
- package/dist/postinstall/unreal/UProjectMetadataReader.js +22 -18
- package/dist/postinstall/unreal/UProjectMetadataReader.js.map +1 -1
- package/dist/postinstall/unreal/UnrealSourceCatalog.d.ts +17 -14
- package/dist/postinstall/unreal/UnrealSourceCatalog.d.ts.map +1 -1
- package/dist/postinstall/unreal/UnrealSourceCatalog.js +50 -50
- package/dist/postinstall/unreal/UnrealSourceCatalog.js.map +1 -1
- package/dist/prompts/InkPromptService.d.ts +10 -7
- package/dist/prompts/InkPromptService.d.ts.map +1 -1
- package/dist/prompts/InkPromptService.js +100 -71
- package/dist/prompts/InkPromptService.js.map +1 -1
- package/dist/prompts/ProjectContextDetector.d.ts +10 -7
- package/dist/prompts/ProjectContextDetector.d.ts.map +1 -1
- package/dist/prompts/ProjectContextDetector.js +32 -26
- package/dist/prompts/ProjectContextDetector.js.map +1 -1
- package/dist/prompts/PromptService.d.ts +11 -8
- package/dist/prompts/PromptService.d.ts.map +1 -1
- package/dist/prompts/PromptService.js +1 -8
- package/dist/reporting/DiagnosticDeduplicator.d.ts +8 -5
- package/dist/reporting/DiagnosticDeduplicator.d.ts.map +1 -1
- package/dist/reporting/DiagnosticDeduplicator.js +36 -35
- package/dist/reporting/DiagnosticDeduplicator.js.map +1 -1
- package/dist/reporting/DiagnosticRenderer.d.ts +11 -8
- package/dist/reporting/DiagnosticRenderer.d.ts.map +1 -1
- package/dist/reporting/DiagnosticRenderer.js +1 -2
- package/dist/reporting/DiagnosticReporter.d.ts +12 -9
- package/dist/reporting/DiagnosticReporter.d.ts.map +1 -1
- package/dist/reporting/DiagnosticReporter.js +40 -39
- package/dist/reporting/DiagnosticReporter.js.map +1 -1
- package/dist/reporting/InkDiagnosticRenderer.d.ts +12 -9
- package/dist/reporting/InkDiagnosticRenderer.d.ts.map +1 -1
- package/dist/reporting/InkDiagnosticRenderer.js +50 -42
- package/dist/reporting/InkDiagnosticRenderer.js.map +1 -1
- package/dist/reporting/InstallProgressReporter.d.ts +23 -20
- package/dist/reporting/InstallProgressReporter.d.ts.map +1 -1
- package/dist/reporting/InstallProgressReporter.js +48 -47
- package/dist/reporting/InstallProgressReporter.js.map +1 -1
- package/dist/reporting/JsonReporter.d.ts +16 -13
- package/dist/reporting/JsonReporter.d.ts.map +1 -1
- package/dist/reporting/JsonReporter.js +34 -20
- package/dist/reporting/JsonReporter.js.map +1 -1
- package/dist/reporting/RegistryRequestTerminalFormatter.d.ts +36 -0
- package/dist/reporting/RegistryRequestTerminalFormatter.d.ts.map +1 -0
- package/dist/reporting/RegistryRequestTerminalFormatter.js +90 -0
- package/dist/reporting/RegistryRequestTerminalFormatter.js.map +1 -0
- package/dist/reporting/TextDiagnosticRenderer.d.ts +11 -8
- package/dist/reporting/TextDiagnosticRenderer.d.ts.map +1 -1
- package/dist/reporting/TextDiagnosticRenderer.js +36 -28
- package/dist/reporting/TextDiagnosticRenderer.js.map +1 -1
- package/dist/reporting/TextSink.d.ts +14 -11
- package/dist/reporting/TextSink.d.ts.map +1 -1
- package/dist/reporting/TextSink.js +24 -20
- package/dist/reporting/TextSink.js.map +1 -1
- package/package.json +31 -32
- package/dist/cli/parsing/contracts/UAPKGCommandModule.js.map +0 -1
- package/dist/cli-bootstrap.d.ts.map +0 -1
- package/dist/commands/Command.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/postinstall/index.d.ts.map +0 -1
- package/dist/postinstall/index.js.map +0 -1
- package/dist/postinstall/unreal/CSharpStructures.js.map +0 -1
- package/dist/prompts/PromptService.js.map +0 -1
- package/dist/reporting/DiagnosticRenderer.js.map +0 -1
|
@@ -1,113 +1,113 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { InstallCommand } from "./InstallCommand.js";
|
|
2
|
+
import { parsePackageSpec } from "@uapkg/common";
|
|
3
|
+
import { createInvalidPackageSpecDiagnostic, createPackageNotFoundDiagnostic } from "@uapkg/diagnostics";
|
|
4
|
+
|
|
5
|
+
//#region src/commands/UpdateCommand.ts
|
|
4
6
|
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
}
|
|
7
|
+
* `uapkg update [specs...]` — re-resolve and re-install.
|
|
8
|
+
*
|
|
9
|
+
* Modes:
|
|
10
|
+
*
|
|
11
|
+
* * `uapkg update` — full update (all packages).
|
|
12
|
+
* * `uapkg update foo` — re-resolve `foo` via the
|
|
13
|
+
* normal install flow; lockfile diff skips untouched packages.
|
|
14
|
+
* * `uapkg update foo@^2.0.0` — rewrite `foo`'s range in the
|
|
15
|
+
* manifest (preserving its bucket + registry) then re-install.
|
|
16
|
+
* * `uapkg update foo@^2 @scope/bar@~1.5` — array form; each spec is
|
|
17
|
+
* processed in order before a single install pass.
|
|
18
|
+
*
|
|
19
|
+
* Never throws — errors become diagnostics. Specs that reference unknown
|
|
20
|
+
* packages produce `PACKAGE_NOT_FOUND` against the local manifest.
|
|
21
|
+
*/
|
|
22
|
+
var UpdateCommand = class {
|
|
23
|
+
root;
|
|
24
|
+
options;
|
|
25
|
+
constructor(root, options) {
|
|
26
|
+
this.root = root;
|
|
27
|
+
this.options = options;
|
|
28
|
+
}
|
|
29
|
+
async execute() {
|
|
30
|
+
if (this.options.specs.length === 0) return this.delegateToInstall();
|
|
31
|
+
const manifestResult = await this.root.packageManifest.readManifest();
|
|
32
|
+
if (!manifestResult.ok) return this.fail(manifestResult.diagnostics);
|
|
33
|
+
const diagnostics = [];
|
|
34
|
+
for (const rawSpec of this.options.specs) {
|
|
35
|
+
const applyResult = await this.applySpec(rawSpec, manifestResult.value);
|
|
36
|
+
if (!applyResult.ok) diagnostics.push(...applyResult.diagnostics);
|
|
37
|
+
}
|
|
38
|
+
if (diagnostics.length > 0) return this.fail(diagnostics);
|
|
39
|
+
return this.delegateToInstall();
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Parse a single `<name>[@range]` spec and, if a range is supplied, rewrite
|
|
43
|
+
* the manifest entry preserving its existing bucket + registry. Bare-name
|
|
44
|
+
* specs are a no-op at the manifest level — the subsequent install pass
|
|
45
|
+
* handles the re-resolve.
|
|
46
|
+
*/
|
|
47
|
+
async applySpec(rawSpec, manifest) {
|
|
48
|
+
const specResult = parsePackageSpec(rawSpec);
|
|
49
|
+
if (!specResult.ok) return {
|
|
50
|
+
ok: false,
|
|
51
|
+
diagnostics: [...specResult.diagnostics]
|
|
52
|
+
};
|
|
53
|
+
const spec = specResult.value;
|
|
54
|
+
if (spec.org) return {
|
|
55
|
+
ok: false,
|
|
56
|
+
diagnostics: [createInvalidPackageSpecDiagnostic(rawSpec, "scoped specifiers (@org/name) are reserved for a future registry iteration")]
|
|
57
|
+
};
|
|
58
|
+
const located = this.locateDependency(manifest, spec.name);
|
|
59
|
+
if (!located) return {
|
|
60
|
+
ok: false,
|
|
61
|
+
diagnostics: [createPackageNotFoundDiagnostic(spec.name, String(manifest.name))]
|
|
62
|
+
};
|
|
63
|
+
if (!spec.range) return { ok: true };
|
|
64
|
+
const addResult = await this.root.packageManifest.addDependency(spec.name, {
|
|
65
|
+
version: spec.range,
|
|
66
|
+
registry: located.registry
|
|
67
|
+
}, { bucket: located.bucket });
|
|
68
|
+
if (!addResult.ok) return {
|
|
69
|
+
ok: false,
|
|
70
|
+
diagnostics: [...addResult.diagnostics]
|
|
71
|
+
};
|
|
72
|
+
return { ok: true };
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Find `name` in the manifest buckets, preserving the source-of-truth
|
|
76
|
+
* bucket + registry so `applySpec` doesn't move the dep between buckets.
|
|
77
|
+
*/
|
|
78
|
+
locateDependency(manifest, name) {
|
|
79
|
+
for (const bucket of [
|
|
80
|
+
"dependencies",
|
|
81
|
+
"devDependencies",
|
|
82
|
+
"peerDependencies"
|
|
83
|
+
]) {
|
|
84
|
+
const entries = manifest[bucket];
|
|
85
|
+
if (entries && name in entries) return {
|
|
86
|
+
bucket,
|
|
87
|
+
registry: entries[name].registry
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
delegateToInstall() {
|
|
93
|
+
return new InstallCommand(this.root, {
|
|
94
|
+
force: this.options.force,
|
|
95
|
+
frozen: false,
|
|
96
|
+
dryRun: this.options.dryRun,
|
|
97
|
+
outputFormat: this.options.outputFormat
|
|
98
|
+
}).execute();
|
|
99
|
+
}
|
|
100
|
+
fail(diagnostics) {
|
|
101
|
+
if (this.options.outputFormat === "json") this.root.json.emit({
|
|
102
|
+
status: "error",
|
|
103
|
+
command: "update",
|
|
104
|
+
diagnostics
|
|
105
|
+
});
|
|
106
|
+
else this.root.diagnostics.reportAll(diagnostics);
|
|
107
|
+
return 1;
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
//#endregion
|
|
112
|
+
export { UpdateCommand };
|
|
113
113
|
//# sourceMappingURL=UpdateCommand.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateCommand.js","
|
|
1
|
+
{"version":3,"file":"UpdateCommand.js","names":[],"sources":["../../src/commands/UpdateCommand.ts"],"sourcesContent":["import { parsePackageSpec } from '@uapkg/common';\nimport type { PackageName, VersionRange } from '@uapkg/common-schema';\nimport {\n createInvalidPackageSpecDiagnostic,\n createPackageNotFoundDiagnostic,\n type Diagnostic,\n} from '@uapkg/diagnostics';\nimport type { Dependency, Manifest } from '@uapkg/package-manifest-schema';\nimport type { CompositionRoot } from '../app/CompositionRoot.js';\nimport type { Command } from './Command.js';\nimport { InstallCommand } from './InstallCommand.js';\n\nexport interface UpdateCommandOptions {\n readonly specs: readonly string[];\n readonly force: boolean;\n readonly dryRun: boolean;\n readonly outputFormat: 'text' | 'json';\n}\n\ntype Bucket = 'dependencies' | 'devDependencies' | 'peerDependencies';\n\ninterface LocatedDependency {\n readonly bucket: Bucket;\n readonly registry: Dependency['registry'];\n}\n\n/**\n * `uapkg update [specs...]` — re-resolve and re-install.\n *\n * Modes:\n *\n * * `uapkg update` — full update (all packages).\n * * `uapkg update foo` — re-resolve `foo` via the\n * normal install flow; lockfile diff skips untouched packages.\n * * `uapkg update foo@^2.0.0` — rewrite `foo`'s range in the\n * manifest (preserving its bucket + registry) then re-install.\n * * `uapkg update foo@^2 @scope/bar@~1.5` — array form; each spec is\n * processed in order before a single install pass.\n *\n * Never throws — errors become diagnostics. Specs that reference unknown\n * packages produce `PACKAGE_NOT_FOUND` against the local manifest.\n */\nexport class UpdateCommand implements Command {\n public constructor(\n private readonly root: CompositionRoot,\n private readonly options: UpdateCommandOptions,\n ) {}\n\n public async execute(): Promise<number> {\n if (this.options.specs.length === 0) {\n return this.delegateToInstall();\n }\n\n const manifestResult = await this.root.packageManifest.readManifest();\n if (!manifestResult.ok) return this.fail(manifestResult.diagnostics);\n\n const diagnostics: Diagnostic[] = [];\n for (const rawSpec of this.options.specs) {\n const applyResult = await this.applySpec(rawSpec, manifestResult.value);\n if (!applyResult.ok) diagnostics.push(...applyResult.diagnostics);\n }\n\n if (diagnostics.length > 0) return this.fail(diagnostics);\n\n return this.delegateToInstall();\n }\n\n /**\n * Parse a single `<name>[@range]` spec and, if a range is supplied, rewrite\n * the manifest entry preserving its existing bucket + registry. Bare-name\n * specs are a no-op at the manifest level — the subsequent install pass\n * handles the re-resolve.\n */\n private async applySpec(\n rawSpec: string,\n manifest: Manifest,\n ): Promise<{ ok: true } | { ok: false; diagnostics: Diagnostic[] }> {\n const specResult = parsePackageSpec(rawSpec);\n if (!specResult.ok) return { ok: false, diagnostics: [...specResult.diagnostics] };\n const spec = specResult.value;\n\n if (spec.org) {\n return {\n ok: false,\n diagnostics: [\n createInvalidPackageSpecDiagnostic(\n rawSpec,\n 'scoped specifiers (@org/name) are reserved for a future registry iteration',\n ),\n ],\n };\n }\n\n const located = this.locateDependency(manifest, spec.name as unknown as string);\n if (!located) {\n return {\n ok: false,\n diagnostics: [createPackageNotFoundDiagnostic(spec.name as unknown as PackageName, String(manifest.name))],\n };\n }\n\n if (!spec.range) return { ok: true };\n\n const addResult = await this.root.packageManifest.addDependency(\n spec.name as unknown as string,\n {\n version: spec.range as unknown as VersionRange,\n registry: located.registry,\n },\n { bucket: located.bucket },\n );\n if (!addResult.ok) return { ok: false, diagnostics: [...addResult.diagnostics] };\n return { ok: true };\n }\n\n /**\n * Find `name` in the manifest buckets, preserving the source-of-truth\n * bucket + registry so `applySpec` doesn't move the dep between buckets.\n */\n private locateDependency(manifest: Manifest, name: string): LocatedDependency | null {\n const order: Bucket[] = ['dependencies', 'devDependencies', 'peerDependencies'];\n for (const bucket of order) {\n const entries = manifest[bucket];\n if (entries && name in entries) {\n return { bucket, registry: entries[name].registry };\n }\n }\n return null;\n }\n\n private delegateToInstall(): Promise<number> {\n const install = new InstallCommand(this.root, {\n force: this.options.force,\n frozen: false,\n dryRun: this.options.dryRun,\n outputFormat: this.options.outputFormat,\n });\n return install.execute();\n }\n\n private fail(diagnostics: readonly Diagnostic[]): number {\n if (this.options.outputFormat === 'json') {\n this.root.json.emit({ status: 'error', command: 'update', diagnostics });\n } else {\n this.root.diagnostics.reportAll(diagnostics);\n }\n return 1;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA0CA,IAAa,gBAAb,MAA8C;CAEzB;CACA;CAFnB,AAAO,YACL,AAAiB,MACjB,AAAiB,SACjB;EAFiB;EACA;CAChB;CAEH,MAAa,UAA2B;EACtC,IAAI,KAAK,QAAQ,MAAM,WAAW,GAChC,OAAO,KAAK,kBAAkB;EAGhC,MAAM,iBAAiB,MAAM,KAAK,KAAK,gBAAgB,aAAa;EACpE,IAAI,CAAC,eAAe,IAAI,OAAO,KAAK,KAAK,eAAe,WAAW;EAEnE,MAAM,cAA4B,CAAC;EACnC,KAAK,MAAM,WAAW,KAAK,QAAQ,OAAO;GACxC,MAAM,cAAc,MAAM,KAAK,UAAU,SAAS,eAAe,KAAK;GACtE,IAAI,CAAC,YAAY,IAAI,YAAY,KAAK,GAAG,YAAY,WAAW;EAClE;EAEA,IAAI,YAAY,SAAS,GAAG,OAAO,KAAK,KAAK,WAAW;EAExD,OAAO,KAAK,kBAAkB;CAChC;;;;;;;CAQA,MAAc,UACZ,SACA,UACkE;EAClE,MAAM,aAAa,iBAAiB,OAAO;EAC3C,IAAI,CAAC,WAAW,IAAI,OAAO;GAAE,IAAI;GAAO,aAAa,CAAC,GAAG,WAAW,WAAW;EAAE;EACjF,MAAM,OAAO,WAAW;EAExB,IAAI,KAAK,KACP,OAAO;GACL,IAAI;GACJ,aAAa,CACX,mCACE,SACA,4EACF,CACF;EACF;EAGF,MAAM,UAAU,KAAK,iBAAiB,UAAU,KAAK,IAAyB;EAC9E,IAAI,CAAC,SACH,OAAO;GACL,IAAI;GACJ,aAAa,CAAC,gCAAgC,KAAK,MAAgC,OAAO,SAAS,IAAI,CAAC,CAAC;EAC3G;EAGF,IAAI,CAAC,KAAK,OAAO,OAAO,EAAE,IAAI,KAAK;EAEnC,MAAM,YAAY,MAAM,KAAK,KAAK,gBAAgB,cAChD,KAAK,MACL;GACE,SAAS,KAAK;GACd,UAAU,QAAQ;EACpB,GACA,EAAE,QAAQ,QAAQ,OAAO,CAC3B;EACA,IAAI,CAAC,UAAU,IAAI,OAAO;GAAE,IAAI;GAAO,aAAa,CAAC,GAAG,UAAU,WAAW;EAAE;EAC/E,OAAO,EAAE,IAAI,KAAK;CACpB;;;;;CAMA,AAAQ,iBAAiB,UAAoB,MAAwC;EAEnF,KAAK,MAAM,UAAU;GADI;GAAgB;GAAmB;EACnC,GAAG;GAC1B,MAAM,UAAU,SAAS;GACzB,IAAI,WAAW,QAAQ,SACrB,OAAO;IAAE;IAAQ,UAAU,QAAQ,KAAK,CAAC;GAAS;EAEtD;EACA,OAAO;CACT;CAEA,AAAQ,oBAAqC;EAO3C,OAAO,IANa,eAAe,KAAK,MAAM;GAC5C,OAAO,KAAK,QAAQ;GACpB,QAAQ;GACR,QAAQ,KAAK,QAAQ;GACrB,cAAc,KAAK,QAAQ;EAC7B,CACa,CAAC,CAAC,QAAQ;CACzB;CAEA,AAAQ,KAAK,aAA4C;EACvD,IAAI,KAAK,QAAQ,iBAAiB,QAChC,KAAK,KAAK,KAAK,KAAK;GAAE,QAAQ;GAAS,SAAS;GAAU;EAAY,CAAC;OAEvE,KAAK,KAAK,YAAY,UAAU,WAAW;EAE7C,OAAO;CACT;AACF"}
|
|
@@ -1,32 +1,35 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { CompositionRoot } from "../app/CompositionRoot.js";
|
|
2
|
+
import { UAPKGOutputFormat, UAPKGWhoamiField } from "../cli/UAPKGCommandLine.js";
|
|
3
|
+
import { Command } from "./Command.js";
|
|
4
|
+
//#region src/commands/WhoamiCommand.d.ts
|
|
5
|
+
interface WhoamiCommandOptions {
|
|
6
|
+
readonly field?: UAPKGWhoamiField;
|
|
7
|
+
readonly registry?: string;
|
|
8
|
+
readonly outputFormat: UAPKGOutputFormat;
|
|
8
9
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
interface WhoamiCommandData {
|
|
11
|
+
readonly account: {
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly username: string;
|
|
14
|
+
readonly displayName: string;
|
|
15
|
+
};
|
|
16
|
+
readonly registry: {
|
|
17
|
+
readonly id: string;
|
|
18
|
+
readonly name: string;
|
|
19
|
+
readonly alias: string;
|
|
20
|
+
};
|
|
21
|
+
readonly deviceName: string;
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
interface WhoamiFieldData {
|
|
24
|
+
readonly field: UAPKGWhoamiField;
|
|
25
|
+
readonly value: string;
|
|
25
26
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
declare class WhoamiCommand implements Command {
|
|
28
|
+
private readonly root;
|
|
29
|
+
private readonly options;
|
|
30
|
+
constructor(root: CompositionRoot, options: WhoamiCommandOptions);
|
|
31
|
+
execute(): Promise<number>;
|
|
31
32
|
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { WhoamiCommand, WhoamiCommandData, WhoamiCommandOptions, WhoamiFieldData };
|
|
32
35
|
//# sourceMappingURL=WhoamiCommand.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WhoamiCommand.d.ts","
|
|
1
|
+
{"version":3,"file":"WhoamiCommand.d.ts","names":[],"sources":["../../src/commands/WhoamiCommand.ts"],"mappings":";;;;UAMiB;WACN,QAAQ;WACR;WACA,cAAc;;UAGR;WACN;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;;UAGM;WACN,OAAO;WACP;;cAGE,yBAAyB;mBAEjB;mBACA;EAFnB,YACmB,MAAM,iBACN,SAAS;EAGf,WAAW"}
|
|
@@ -1,75 +1,66 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
else {
|
|
55
|
-
process.stderr.write(`${describeControlPlaneError(error)}\n`);
|
|
56
|
-
}
|
|
57
|
-
return 1;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
1
|
+
import { ControlPlaneClient } from "../control-plane/ControlPlaneClient.js";
|
|
2
|
+
import { controlPlaneDiagnosticForError, describeControlPlaneError } from "../control-plane/AccountManager.js";
|
|
3
|
+
|
|
4
|
+
//#region src/commands/WhoamiCommand.ts
|
|
5
|
+
var WhoamiCommand = class {
|
|
6
|
+
root;
|
|
7
|
+
options;
|
|
8
|
+
constructor(root, options) {
|
|
9
|
+
this.root = root;
|
|
10
|
+
this.options = options;
|
|
11
|
+
}
|
|
12
|
+
async execute() {
|
|
13
|
+
try {
|
|
14
|
+
const trust = await this.root.registryTrustResolver.resolve(this.options.registry);
|
|
15
|
+
const access = await this.root.accountManager.getAccessCredential(trust, ["identity.self.read"]);
|
|
16
|
+
const self = await new ControlPlaneClient(trust.apiBaseUrl).getSelf(access.credential);
|
|
17
|
+
if (self.registry.id !== trust.registryId || self.grant.id !== access.grant.grantId) throw new Error("The control plane returned identity information for an unexpected registry grant.");
|
|
18
|
+
const data = {
|
|
19
|
+
account: self.account,
|
|
20
|
+
registry: {
|
|
21
|
+
id: trust.registryId,
|
|
22
|
+
name: trust.registryName,
|
|
23
|
+
alias: trust.alias
|
|
24
|
+
},
|
|
25
|
+
deviceName: self.grant.deviceName
|
|
26
|
+
};
|
|
27
|
+
if (this.options.field) {
|
|
28
|
+
const fieldData = {
|
|
29
|
+
field: this.options.field,
|
|
30
|
+
value: selectedFieldValue(this.options.field, data)
|
|
31
|
+
};
|
|
32
|
+
if (this.options.outputFormat === "json") this.root.json.emitSuccess("whoami", fieldData);
|
|
33
|
+
else process.stdout.write(`${fieldData.value}\n`);
|
|
34
|
+
return 0;
|
|
35
|
+
}
|
|
36
|
+
if (this.options.outputFormat === "json") this.root.json.emitSuccess("whoami", data);
|
|
37
|
+
else {
|
|
38
|
+
process.stdout.write(`Username: ${data.account.username}\n`);
|
|
39
|
+
process.stdout.write(`User ID: ${data.account.id}\n`);
|
|
40
|
+
process.stdout.write(`Display Name: ${data.account.displayName}\n`);
|
|
41
|
+
process.stdout.write(`Registry: ${data.registry.name}\n`);
|
|
42
|
+
process.stdout.write(`Registry ID: ${data.registry.id}\n`);
|
|
43
|
+
process.stdout.write(`Registry Alias: ${data.registry.alias}\n`);
|
|
44
|
+
process.stdout.write(`Device: ${data.deviceName}\n`);
|
|
45
|
+
}
|
|
46
|
+
return 0;
|
|
47
|
+
} catch (error) {
|
|
48
|
+
if (this.options.outputFormat === "json") this.root.json.emitError("whoami", [controlPlaneDiagnosticForError(error, "whoami")]);
|
|
49
|
+
else process.stderr.write(`${describeControlPlaneError(error)}\n`);
|
|
50
|
+
return 1;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
61
54
|
function selectedFieldValue(field, data) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
case 'registry-id':
|
|
70
|
-
return data.registry.id;
|
|
71
|
-
default:
|
|
72
|
-
return field;
|
|
73
|
-
}
|
|
55
|
+
switch (field) {
|
|
56
|
+
case "username": return data.account.username;
|
|
57
|
+
case "user-id": return data.account.id;
|
|
58
|
+
case "registry": return data.registry.name;
|
|
59
|
+
case "registry-id": return data.registry.id;
|
|
60
|
+
default: return field;
|
|
61
|
+
}
|
|
74
62
|
}
|
|
63
|
+
|
|
64
|
+
//#endregion
|
|
65
|
+
export { WhoamiCommand };
|
|
75
66
|
//# sourceMappingURL=WhoamiCommand.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WhoamiCommand.js","
|
|
1
|
+
{"version":3,"file":"WhoamiCommand.js","names":[],"sources":["../../src/commands/WhoamiCommand.ts"],"sourcesContent":["import type { CompositionRoot } from '../app/CompositionRoot.js';\nimport type { UAPKGOutputFormat, UAPKGWhoamiField } from '../cli/UAPKGCommandLine.js';\nimport { controlPlaneDiagnosticForError, describeControlPlaneError } from '../control-plane/AccountManager.js';\nimport { ControlPlaneClient } from '../control-plane/ControlPlaneClient.js';\nimport type { Command } from './Command.js';\n\nexport interface WhoamiCommandOptions {\n readonly field?: UAPKGWhoamiField;\n readonly registry?: string;\n readonly outputFormat: UAPKGOutputFormat;\n}\n\nexport interface WhoamiCommandData {\n readonly account: {\n readonly id: string;\n readonly username: string;\n readonly displayName: string;\n };\n readonly registry: {\n readonly id: string;\n readonly name: string;\n readonly alias: string;\n };\n readonly deviceName: string;\n}\n\nexport interface WhoamiFieldData {\n readonly field: UAPKGWhoamiField;\n readonly value: string;\n}\n\nexport class WhoamiCommand implements Command {\n public constructor(\n private readonly root: CompositionRoot,\n private readonly options: WhoamiCommandOptions,\n ) {}\n\n public async execute(): Promise<number> {\n try {\n const trust = await this.root.registryTrustResolver.resolve(this.options.registry);\n const access = await this.root.accountManager.getAccessCredential(trust, ['identity.self.read']);\n const self = await new ControlPlaneClient(trust.apiBaseUrl).getSelf(access.credential);\n if (self.registry.id !== trust.registryId || self.grant.id !== access.grant.grantId) {\n throw new Error('The control plane returned identity information for an unexpected registry grant.');\n }\n\n const data: WhoamiCommandData = {\n account: self.account,\n registry: { id: trust.registryId, name: trust.registryName, alias: trust.alias },\n deviceName: self.grant.deviceName,\n };\n\n if (this.options.field) {\n const fieldData: WhoamiFieldData = {\n field: this.options.field,\n value: selectedFieldValue(this.options.field, data),\n };\n if (this.options.outputFormat === 'json') {\n this.root.json.emitSuccess('whoami', fieldData);\n } else {\n process.stdout.write(`${fieldData.value}\\n`);\n }\n return 0;\n }\n\n if (this.options.outputFormat === 'json') {\n this.root.json.emitSuccess('whoami', data);\n } else {\n process.stdout.write(`Username: ${data.account.username}\\n`);\n process.stdout.write(`User ID: ${data.account.id}\\n`);\n process.stdout.write(`Display Name: ${data.account.displayName}\\n`);\n process.stdout.write(`Registry: ${data.registry.name}\\n`);\n process.stdout.write(`Registry ID: ${data.registry.id}\\n`);\n process.stdout.write(`Registry Alias: ${data.registry.alias}\\n`);\n process.stdout.write(`Device: ${data.deviceName}\\n`);\n }\n return 0;\n } catch (error) {\n if (this.options.outputFormat === 'json') {\n this.root.json.emitError('whoami', [controlPlaneDiagnosticForError(error, 'whoami')]);\n } else {\n process.stderr.write(`${describeControlPlaneError(error)}\\n`);\n }\n return 1;\n }\n }\n}\n\nfunction selectedFieldValue(field: UAPKGWhoamiField, data: WhoamiCommandData): string {\n switch (field) {\n case 'username':\n return data.account.username;\n case 'user-id':\n return data.account.id;\n case 'registry':\n return data.registry.name;\n case 'registry-id':\n return data.registry.id;\n default:\n return field satisfies never;\n }\n}\n"],"mappings":";;;;AA+BA,IAAa,gBAAb,MAA8C;CAEzB;CACA;CAFnB,AAAO,YACL,AAAiB,MACjB,AAAiB,SACjB;EAFiB;EACA;CAChB;CAEH,MAAa,UAA2B;EACtC,IAAI;GACF,MAAM,QAAQ,MAAM,KAAK,KAAK,sBAAsB,QAAQ,KAAK,QAAQ,QAAQ;GACjF,MAAM,SAAS,MAAM,KAAK,KAAK,eAAe,oBAAoB,OAAO,CAAC,oBAAoB,CAAC;GAC/F,MAAM,OAAO,MAAM,IAAI,mBAAmB,MAAM,UAAU,CAAC,CAAC,QAAQ,OAAO,UAAU;GACrF,IAAI,KAAK,SAAS,OAAO,MAAM,cAAc,KAAK,MAAM,OAAO,OAAO,MAAM,SAC1E,MAAM,IAAI,MAAM,mFAAmF;GAGrG,MAAM,OAA0B;IAC9B,SAAS,KAAK;IACd,UAAU;KAAE,IAAI,MAAM;KAAY,MAAM,MAAM;KAAc,OAAO,MAAM;IAAM;IAC/E,YAAY,KAAK,MAAM;GACzB;GAEA,IAAI,KAAK,QAAQ,OAAO;IACtB,MAAM,YAA6B;KACjC,OAAO,KAAK,QAAQ;KACpB,OAAO,mBAAmB,KAAK,QAAQ,OAAO,IAAI;IACpD;IACA,IAAI,KAAK,QAAQ,iBAAiB,QAChC,KAAK,KAAK,KAAK,YAAY,UAAU,SAAS;SAE9C,QAAQ,OAAO,MAAM,GAAG,UAAU,MAAM,GAAG;IAE7C,OAAO;GACT;GAEA,IAAI,KAAK,QAAQ,iBAAiB,QAChC,KAAK,KAAK,KAAK,YAAY,UAAU,IAAI;QACpC;IACL,QAAQ,OAAO,MAAM,aAAa,KAAK,QAAQ,SAAS,GAAG;IAC3D,QAAQ,OAAO,MAAM,YAAY,KAAK,QAAQ,GAAG,GAAG;IACpD,QAAQ,OAAO,MAAM,iBAAiB,KAAK,QAAQ,YAAY,GAAG;IAClE,QAAQ,OAAO,MAAM,aAAa,KAAK,SAAS,KAAK,GAAG;IACxD,QAAQ,OAAO,MAAM,gBAAgB,KAAK,SAAS,GAAG,GAAG;IACzD,QAAQ,OAAO,MAAM,mBAAmB,KAAK,SAAS,MAAM,GAAG;IAC/D,QAAQ,OAAO,MAAM,WAAW,KAAK,WAAW,GAAG;GACrD;GACA,OAAO;EACT,SAAS,OAAO;GACd,IAAI,KAAK,QAAQ,iBAAiB,QAChC,KAAK,KAAK,KAAK,UAAU,UAAU,CAAC,+BAA+B,OAAO,QAAQ,CAAC,CAAC;QAEpF,QAAQ,OAAO,MAAM,GAAG,0BAA0B,KAAK,EAAE,GAAG;GAE9D,OAAO;EACT;CACF;AACF;AAEA,SAAS,mBAAmB,OAAyB,MAAiC;CACpF,QAAQ,OAAR;EACE,KAAK,YACH,OAAO,KAAK,QAAQ;EACtB,KAAK,WACH,OAAO,KAAK,QAAQ;EACtB,KAAK,YACH,OAAO,KAAK,SAAS;EACvB,KAAK,eACH,OAAO,KAAK,SAAS;EACvB,SACE,OAAO;CACX;AACF"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { CompositionRoot } from "../app/CompositionRoot.js";
|
|
2
|
+
import { Command } from "./Command.js";
|
|
3
|
+
//#region src/commands/WhyCommand.d.ts
|
|
4
|
+
interface WhyCommandOptions {
|
|
5
|
+
readonly target: string;
|
|
6
|
+
readonly outputFormat: 'text' | 'json';
|
|
6
7
|
}
|
|
7
8
|
/**
|
|
8
9
|
* `uapkg why <name>` — prints every dependency path from a graph root to the
|
|
@@ -12,10 +13,12 @@ export interface WhyCommandOptions {
|
|
|
12
13
|
* Exit code 0 when the target is present, 3 when not found, 1 on any
|
|
13
14
|
* resolver error.
|
|
14
15
|
*/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
declare class WhyCommand implements Command {
|
|
17
|
+
private readonly root;
|
|
18
|
+
private readonly options;
|
|
19
|
+
constructor(root: CompositionRoot, options: WhyCommandOptions);
|
|
20
|
+
execute(): Promise<number>;
|
|
20
21
|
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { WhyCommand, WhyCommandOptions };
|
|
21
24
|
//# sourceMappingURL=WhyCommand.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WhyCommand.d.ts","
|
|
1
|
+
{"version":3,"file":"WhyCommand.d.ts","names":[],"sources":["../../src/commands/WhyCommand.ts"],"mappings":";;;UAIiB;WACN;WACA;;;;;;;;;;cAWE,sBAAsB;mBAEd;mBACA;EAFnB,YACmB,MAAM,iBACN,SAAS;EAGf,WAAW"}
|