@uapkg/cli 1.3.0 → 1.3.2
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 -138
- 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 -254
- 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,116 +1,114 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const grantSchema = z
|
|
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
|
-
async withMutationLock(operation) {
|
|
110
|
-
return this.mutationLock.withLock(AUTH_METADATA_LOCK_NAMESPACE, resolve(this.filePath), operation);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
1
|
+
import { resolveAuthStoragePaths } from "./AuthStoragePaths.js";
|
|
2
|
+
import { FileRegistryGrantLock } from "./RegistryGrantLock.js";
|
|
3
|
+
import { dirname, resolve } from "node:path";
|
|
4
|
+
import { existsSync } from "node:fs";
|
|
5
|
+
import { randomUUID } from "node:crypto";
|
|
6
|
+
import { mkdir, readFile, rename, writeFile } from "node:fs/promises";
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
|
|
9
|
+
//#region src/control-plane/AuthMetadataStore.ts
|
|
10
|
+
const AUTH_METADATA_LOCK_NAMESPACE = "urn:uapkg:auth-metadata";
|
|
11
|
+
const accountSchema = z.object({
|
|
12
|
+
id: z.uuid(),
|
|
13
|
+
username: z.string().min(1),
|
|
14
|
+
displayName: z.string().min(1)
|
|
15
|
+
}).strict();
|
|
16
|
+
const grantSchema = z.object({
|
|
17
|
+
issuer: z.url(),
|
|
18
|
+
registryId: z.uuid(),
|
|
19
|
+
registryName: z.string().min(1),
|
|
20
|
+
grantId: z.uuid(),
|
|
21
|
+
clientId: z.string().min(1),
|
|
22
|
+
keyReference: z.string().min(1),
|
|
23
|
+
refreshTokenReference: z.string().min(1),
|
|
24
|
+
publicKeyThumbprint: z.string().min(1),
|
|
25
|
+
deviceName: z.string().min(1),
|
|
26
|
+
repositoryFingerprint: z.string().regex(/^sha256:[0-9a-f]{64}$/),
|
|
27
|
+
account: accountSchema,
|
|
28
|
+
createdAt: z.number().int().nonnegative(),
|
|
29
|
+
idleExpiresAt: z.number().int().positive(),
|
|
30
|
+
expiresAt: z.number().int().positive()
|
|
31
|
+
}).strict();
|
|
32
|
+
const fileSchema = z.object({
|
|
33
|
+
schemaVersion: z.literal(1),
|
|
34
|
+
grants: z.record(z.string(), grantSchema)
|
|
35
|
+
}).strict();
|
|
36
|
+
var AuthMetadataStore = class {
|
|
37
|
+
filePath;
|
|
38
|
+
mutationLock;
|
|
39
|
+
constructor(filePath = resolveAuthStoragePaths().metadataFile, mutationLock) {
|
|
40
|
+
this.filePath = filePath;
|
|
41
|
+
this.mutationLock = mutationLock ?? new FileRegistryGrantLock(resolveAuthStoragePaths(filePath).locksDirectory);
|
|
42
|
+
}
|
|
43
|
+
get path() {
|
|
44
|
+
return this.filePath;
|
|
45
|
+
}
|
|
46
|
+
async find(issuer, registryId) {
|
|
47
|
+
return (await this.read()).grants[grantKey(issuer, registryId)];
|
|
48
|
+
}
|
|
49
|
+
async upsert(metadata) {
|
|
50
|
+
await this.withMutationLock(async () => {
|
|
51
|
+
const current = await this.read();
|
|
52
|
+
await this.write({
|
|
53
|
+
schemaVersion: 1,
|
|
54
|
+
grants: {
|
|
55
|
+
...current.grants,
|
|
56
|
+
[grantKey(metadata.issuer, metadata.registryId)]: metadata
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
async remove(issuer, registryId) {
|
|
62
|
+
await this.withMutationLock(async () => {
|
|
63
|
+
const current = await this.read();
|
|
64
|
+
const key = grantKey(issuer, registryId);
|
|
65
|
+
if (!(key in current.grants)) return;
|
|
66
|
+
const next = { ...current.grants };
|
|
67
|
+
delete next[key];
|
|
68
|
+
await this.write({
|
|
69
|
+
schemaVersion: 1,
|
|
70
|
+
grants: next
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
async read() {
|
|
75
|
+
if (!existsSync(this.filePath)) return {
|
|
76
|
+
schemaVersion: 1,
|
|
77
|
+
grants: {}
|
|
78
|
+
};
|
|
79
|
+
let raw;
|
|
80
|
+
try {
|
|
81
|
+
raw = await readFile(this.filePath, "utf8");
|
|
82
|
+
} catch (error) {
|
|
83
|
+
throw new Error(`Unable to read saved UAPKG login metadata at ${this.filePath}.`, { cause: error });
|
|
84
|
+
}
|
|
85
|
+
let json;
|
|
86
|
+
try {
|
|
87
|
+
json = JSON.parse(raw);
|
|
88
|
+
} catch (error) {
|
|
89
|
+
throw new Error(`Saved UAPKG login metadata at ${this.filePath} is not valid JSON. Move it aside and run \`uapkg login\` again.`, { cause: error });
|
|
90
|
+
}
|
|
91
|
+
const parsed = fileSchema.safeParse(json);
|
|
92
|
+
if (!parsed.success) throw new Error(`Saved UAPKG login metadata at ${this.filePath} is invalid. Move it aside and run \`uapkg login\` again.`);
|
|
93
|
+
return parsed.data;
|
|
94
|
+
}
|
|
95
|
+
async write(value) {
|
|
96
|
+
await mkdir(dirname(this.filePath), { recursive: true });
|
|
97
|
+
const temporaryPath = `${this.filePath}.${process.pid}.${randomUUID()}.tmp`;
|
|
98
|
+
await writeFile(temporaryPath, `${JSON.stringify(value, null, 2)}\n`, {
|
|
99
|
+
encoding: "utf8",
|
|
100
|
+
mode: 384
|
|
101
|
+
});
|
|
102
|
+
await rename(temporaryPath, this.filePath);
|
|
103
|
+
}
|
|
104
|
+
async withMutationLock(operation) {
|
|
105
|
+
return this.mutationLock.withLock(AUTH_METADATA_LOCK_NAMESPACE, resolve(this.filePath), operation);
|
|
106
|
+
}
|
|
107
|
+
};
|
|
113
108
|
function grantKey(issuer, registryId) {
|
|
114
|
-
|
|
109
|
+
return `${issuer.replace(/\/+$/, "")}|${registryId.toLowerCase()}`;
|
|
115
110
|
}
|
|
111
|
+
|
|
112
|
+
//#endregion
|
|
113
|
+
export { AuthMetadataStore };
|
|
116
114
|
//# sourceMappingURL=AuthMetadataStore.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthMetadataStore.js","
|
|
1
|
+
{"version":3,"file":"AuthMetadataStore.js","names":[],"sources":["../../src/control-plane/AuthMetadataStore.ts"],"sourcesContent":["import { randomUUID } from 'node:crypto';\nimport { existsSync } from 'node:fs';\nimport { mkdir, readFile, rename, writeFile } from 'node:fs/promises';\nimport { dirname, resolve } from 'node:path';\nimport { z } from 'zod';\nimport { resolveAuthStoragePaths } from './AuthStoragePaths.js';\nimport type { AuthMetadataFile, RegistryGrantMetadata } from './ControlPlaneTypes.js';\nimport { FileRegistryGrantLock, type RegistryGrantLock } from './RegistryGrantLock.js';\n\nconst AUTH_METADATA_LOCK_NAMESPACE = 'urn:uapkg:auth-metadata';\n\nconst accountSchema = z\n .object({\n id: z.uuid(),\n username: z.string().min(1),\n displayName: z.string().min(1),\n })\n .strict();\n\nconst grantSchema = z\n .object({\n issuer: z.url(),\n registryId: z.uuid(),\n registryName: z.string().min(1),\n grantId: z.uuid(),\n clientId: z.string().min(1),\n keyReference: z.string().min(1),\n refreshTokenReference: z.string().min(1),\n publicKeyThumbprint: z.string().min(1),\n deviceName: z.string().min(1),\n repositoryFingerprint: z.string().regex(/^sha256:[0-9a-f]{64}$/),\n account: accountSchema,\n createdAt: z.number().int().nonnegative(),\n idleExpiresAt: z.number().int().positive(),\n expiresAt: z.number().int().positive(),\n })\n .strict();\n\nconst fileSchema = z\n .object({\n schemaVersion: z.literal(1),\n grants: z.record(z.string(), grantSchema),\n })\n .strict();\n\nexport class AuthMetadataStore {\n private readonly mutationLock: RegistryGrantLock;\n\n public constructor(\n private readonly filePath = resolveAuthStoragePaths().metadataFile,\n mutationLock?: RegistryGrantLock,\n ) {\n this.mutationLock = mutationLock ?? new FileRegistryGrantLock(resolveAuthStoragePaths(filePath).locksDirectory);\n }\n\n public get path(): string {\n return this.filePath;\n }\n\n public async find(issuer: string, registryId: string): Promise<RegistryGrantMetadata | undefined> {\n return (await this.read()).grants[grantKey(issuer, registryId)];\n }\n\n public async upsert(metadata: RegistryGrantMetadata): Promise<void> {\n await this.withMutationLock(async () => {\n const current = await this.read();\n await this.write({\n schemaVersion: 1,\n grants: {\n ...current.grants,\n [grantKey(metadata.issuer, metadata.registryId)]: metadata,\n },\n });\n });\n }\n\n public async remove(issuer: string, registryId: string): Promise<void> {\n await this.withMutationLock(async () => {\n const current = await this.read();\n const key = grantKey(issuer, registryId);\n if (!(key in current.grants)) return;\n const next = { ...current.grants };\n delete next[key];\n await this.write({ schemaVersion: 1, grants: next });\n });\n }\n\n private async read(): Promise<AuthMetadataFile> {\n if (!existsSync(this.filePath)) {\n return { schemaVersion: 1, grants: {} };\n }\n\n let raw: string;\n try {\n raw = await readFile(this.filePath, 'utf8');\n } catch (error) {\n throw new Error(`Unable to read saved UAPKG login metadata at ${this.filePath}.`, { cause: error });\n }\n\n let json: unknown;\n try {\n json = JSON.parse(raw) as unknown;\n } catch (error) {\n throw new Error(\n `Saved UAPKG login metadata at ${this.filePath} is not valid JSON. Move it aside and run \\`uapkg login\\` again.`,\n { cause: error },\n );\n }\n\n const parsed = fileSchema.safeParse(json);\n if (!parsed.success) {\n throw new Error(\n `Saved UAPKG login metadata at ${this.filePath} is invalid. Move it aside and run \\`uapkg login\\` again.`,\n );\n }\n return parsed.data;\n }\n\n private async write(value: AuthMetadataFile): Promise<void> {\n await mkdir(dirname(this.filePath), { recursive: true });\n const temporaryPath = `${this.filePath}.${process.pid}.${randomUUID()}.tmp`;\n await writeFile(temporaryPath, `${JSON.stringify(value, null, 2)}\\n`, {\n encoding: 'utf8',\n mode: 0o600,\n });\n await rename(temporaryPath, this.filePath);\n }\n\n private async withMutationLock<T>(operation: () => Promise<T>): Promise<T> {\n return this.mutationLock.withLock(AUTH_METADATA_LOCK_NAMESPACE, resolve(this.filePath), operation);\n }\n}\n\nfunction grantKey(issuer: string, registryId: string): string {\n return `${issuer.replace(/\\/+$/, '')}|${registryId.toLowerCase()}`;\n}\n"],"mappings":"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"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
//#region src/control-plane/AuthStoragePaths.d.ts
|
|
2
|
+
interface AuthStoragePaths {
|
|
3
|
+
readonly metadataFile: string;
|
|
4
|
+
readonly locksDirectory: string;
|
|
4
5
|
}
|
|
5
6
|
/**
|
|
6
7
|
* Resolves the CLI-owned files used for persistent authentication state.
|
|
7
8
|
* An explicit metadata path keeps the historical custom-store behavior by
|
|
8
9
|
* placing its locks alongside that file.
|
|
9
10
|
*/
|
|
10
|
-
|
|
11
|
+
declare function resolveAuthStoragePaths(metadataFile?: string): AuthStoragePaths;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { AuthStoragePaths, resolveAuthStoragePaths };
|
|
11
14
|
//# sourceMappingURL=AuthStoragePaths.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthStoragePaths.d.ts","
|
|
1
|
+
{"version":3,"file":"AuthStoragePaths.d.ts","names":[],"sources":["../../src/control-plane/AuthStoragePaths.ts"],"mappings":";UAMiB;WACN;WACA;;;;;;;iBAQK,wBAAwB,wBAAwB"}
|
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { resolveActiveUapkgProfileRoot } from "@uapkg/common";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
|
|
4
|
+
//#region src/control-plane/AuthStoragePaths.ts
|
|
5
|
+
const AUTH_METADATA_FILE_NAME = "auth.json";
|
|
6
|
+
const AUTH_LOCKS_DIRECTORY_NAME = "auth-locks";
|
|
5
7
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
* Resolves the CLI-owned files used for persistent authentication state.
|
|
9
|
+
* An explicit metadata path keeps the historical custom-store behavior by
|
|
10
|
+
* placing its locks alongside that file.
|
|
11
|
+
*/
|
|
12
|
+
function resolveAuthStoragePaths(metadataFile) {
|
|
13
|
+
const resolvedMetadataFile = metadataFile ?? join(resolveActiveUapkgProfileRoot(), AUTH_METADATA_FILE_NAME);
|
|
14
|
+
return {
|
|
15
|
+
metadataFile: resolvedMetadataFile,
|
|
16
|
+
locksDirectory: join(dirname(resolvedMetadataFile), AUTH_LOCKS_DIRECTORY_NAME)
|
|
17
|
+
};
|
|
16
18
|
}
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
export { resolveAuthStoragePaths };
|
|
17
22
|
//# sourceMappingURL=AuthStoragePaths.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthStoragePaths.js","
|
|
1
|
+
{"version":3,"file":"AuthStoragePaths.js","names":[],"sources":["../../src/control-plane/AuthStoragePaths.ts"],"sourcesContent":["import { dirname, join } from 'node:path';\nimport { resolveActiveUapkgProfileRoot } from '@uapkg/common';\n\nconst AUTH_METADATA_FILE_NAME = 'auth.json';\nconst AUTH_LOCKS_DIRECTORY_NAME = 'auth-locks';\n\nexport interface AuthStoragePaths {\n readonly metadataFile: string;\n readonly locksDirectory: string;\n}\n\n/**\n * Resolves the CLI-owned files used for persistent authentication state.\n * An explicit metadata path keeps the historical custom-store behavior by\n * placing its locks alongside that file.\n */\nexport function resolveAuthStoragePaths(metadataFile?: string): AuthStoragePaths {\n const resolvedMetadataFile = metadataFile ?? join(resolveActiveUapkgProfileRoot(), AUTH_METADATA_FILE_NAME);\n return {\n metadataFile: resolvedMetadataFile,\n locksDirectory: join(dirname(resolvedMetadataFile), AUTH_LOCKS_DIRECTORY_NAME),\n };\n}\n"],"mappings":";;;;AAGA,MAAM,0BAA0B;AAChC,MAAM,4BAA4B;;;;;;AAYlC,SAAgB,wBAAwB,cAAyC;CAC/E,MAAM,uBAAuB,gBAAgB,KAAK,8BAA8B,GAAG,uBAAuB;CAC1G,OAAO;EACL,cAAc;EACd,gBAAgB,KAAK,QAAQ,oBAAoB,GAAG,yBAAyB;CAC/E;AACF"}
|
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { GitHubActionsOidcCredentialProvider } from
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { ControlPlaneAuthMode, RegistryTrust, UAPKGCliScope } from "./ControlPlaneTypes.js";
|
|
2
|
+
import { ControlPlaneCredential } from "./ControlPlaneClient.js";
|
|
3
|
+
import { AccountManager } from "./AccountManager.js";
|
|
4
|
+
import { PromptService } from "../prompts/PromptService.js";
|
|
5
|
+
import { GitHubActionsOidcCredentialProvider, GitHubActionsOidcTarget } from "./GitHubActionsOidcCredentialProvider.js";
|
|
6
|
+
//#region src/control-plane/AuthenticationSelector.d.ts
|
|
7
|
+
interface SelectedAuthentication {
|
|
8
|
+
readonly kind: 'oidc' | 'login' | 'gat';
|
|
9
|
+
readonly credential: ControlPlaneCredential;
|
|
10
|
+
readonly otp?: string;
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
declare class AuthenticationSelector {
|
|
13
|
+
private readonly account;
|
|
14
|
+
private readonly prompts;
|
|
15
|
+
private readonly oidc;
|
|
16
|
+
private readonly isInteractive;
|
|
17
|
+
constructor(account: AccountManager, prompts: PromptService, oidc?: GitHubActionsOidcCredentialProvider, isInteractive?: () => boolean);
|
|
18
|
+
select(mode: ControlPlaneAuthMode, trust: RegistryTrust, scopes: readonly UAPKGCliScope[], requireRequestOtp: boolean, oidcTarget?: GitHubActionsOidcTarget): Promise<SelectedAuthentication>;
|
|
19
|
+
private readOtp;
|
|
20
|
+
private assertInteractiveRequestOtp;
|
|
20
21
|
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { AuthenticationSelector, SelectedAuthentication };
|
|
21
24
|
//# sourceMappingURL=AuthenticationSelector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthenticationSelector.d.ts","
|
|
1
|
+
{"version":3,"file":"AuthenticationSelector.d.ts","names":[],"sources":["../../src/control-plane/AuthenticationSelector.ts"],"mappings":";;;;;;UAUiB;WACN;WACA,YAAY;WACZ;;cAGE;mBAEQ;mBACA;mBACA;mBACA;EAJnB,YACmB,SAAS,gBACT,SAAS,eACT,OAAI,qCACJ;EAGN,OACX,MAAM,sBACN,OAAO,eACP,iBAAiB,iBACjB,4BACA,aAAa,0BACZ,QAAQ;UA6CG;UASN"}
|
|
@@ -1,64 +1,70 @@
|
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
1
|
+
import { GitHubActionsOidcCredentialProvider } from "./GitHubActionsOidcCredentialProvider.js";
|
|
2
|
+
import isCI from "is-ci";
|
|
3
|
+
|
|
4
|
+
//#region src/control-plane/AuthenticationSelector.ts
|
|
5
|
+
var AuthenticationSelector = class {
|
|
6
|
+
account;
|
|
7
|
+
prompts;
|
|
8
|
+
oidc;
|
|
9
|
+
isInteractive;
|
|
10
|
+
constructor(account, prompts, oidc = new GitHubActionsOidcCredentialProvider(), isInteractive = () => Boolean(process.stdin.isTTY && process.stdout.isTTY && !isCI)) {
|
|
11
|
+
this.account = account;
|
|
12
|
+
this.prompts = prompts;
|
|
13
|
+
this.oidc = oidc;
|
|
14
|
+
this.isInteractive = isInteractive;
|
|
15
|
+
}
|
|
16
|
+
async select(mode, trust, scopes, requireRequestOtp, oidcTarget) {
|
|
17
|
+
if (mode === "oidc" || mode === "auto" && this.oidc.isAvailable()) {
|
|
18
|
+
if (!oidcTarget) throw new Error("GitHub Actions OIDC requires a target package resolved from the requested operation.");
|
|
19
|
+
return {
|
|
20
|
+
kind: "oidc",
|
|
21
|
+
credential: {
|
|
22
|
+
kind: "bearer",
|
|
23
|
+
accessToken: await this.oidc.exchange(trust, oidcTarget)
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
if (mode === "login" || mode === "auto" && await this.account.hasGrant(trust)) {
|
|
28
|
+
if (requireRequestOtp) this.assertInteractiveRequestOtp();
|
|
29
|
+
return {
|
|
30
|
+
kind: "login",
|
|
31
|
+
credential: (await this.account.getAccessCredential(trust, scopes)).credential,
|
|
32
|
+
otp: requireRequestOtp ? await this.readOtp() : void 0
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
const environmentToken = process.env.UAPKG_TOKEN?.trim();
|
|
36
|
+
if (mode === "gat" || mode === "auto" && environmentToken) {
|
|
37
|
+
if (!this.isInteractive()) throw new Error("Human GAT authentication requires an attended TTY. Headless publishing must use a configured GitHub Actions OIDC trusted publisher.");
|
|
38
|
+
const accessToken = environmentToken || (await this.prompts.secret("UAPKG granular access token")).trim();
|
|
39
|
+
if (!accessToken) throw new Error("A granular access token is required.");
|
|
40
|
+
return {
|
|
41
|
+
kind: "gat",
|
|
42
|
+
credential: {
|
|
43
|
+
kind: "bearer",
|
|
44
|
+
accessToken
|
|
45
|
+
},
|
|
46
|
+
otp: requireRequestOtp ? await this.readOtp() : void 0
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
throw new Error([
|
|
50
|
+
`No supported publishing credential is available for "${trust.alias}".`,
|
|
51
|
+
"",
|
|
52
|
+
`Run \`uapkg login --registry ${trust.alias}\` on a browser-capable workstation,`,
|
|
53
|
+
"set UAPKG_TOKEN for an attended GAT publish, or configure GitHub Actions OIDC."
|
|
54
|
+
].join("\n"));
|
|
55
|
+
}
|
|
56
|
+
async readOtp() {
|
|
57
|
+
this.assertInteractiveRequestOtp();
|
|
58
|
+
const otp = (await this.prompts.secret("Current TOTP code")).trim();
|
|
59
|
+
if (!/^[0-9]{6}$/.test(otp)) throw new Error("A current 6-digit TOTP code is required for this publishing request.");
|
|
60
|
+
return otp;
|
|
61
|
+
}
|
|
62
|
+
assertInteractiveRequestOtp() {
|
|
63
|
+
if (this.isInteractive()) return;
|
|
64
|
+
throw new Error("Request-scoped TOTP confirmation requires an attended TTY. Human publishing is not supported in headless environments.");
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
//#endregion
|
|
69
|
+
export { AuthenticationSelector };
|
|
64
70
|
//# sourceMappingURL=AuthenticationSelector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthenticationSelector.js","
|
|
1
|
+
{"version":3,"file":"AuthenticationSelector.js","names":[],"sources":["../../src/control-plane/AuthenticationSelector.ts"],"sourcesContent":["import isCI from 'is-ci';\nimport type { PromptService } from '../prompts/PromptService.js';\nimport type { AccountManager } from './AccountManager.js';\nimport type { ControlPlaneCredential } from './ControlPlaneClient.js';\nimport type { ControlPlaneAuthMode, RegistryTrust, UAPKGCliScope } from './ControlPlaneTypes.js';\nimport {\n GitHubActionsOidcCredentialProvider,\n type GitHubActionsOidcTarget,\n} from './GitHubActionsOidcCredentialProvider.js';\n\nexport interface SelectedAuthentication {\n readonly kind: 'oidc' | 'login' | 'gat';\n readonly credential: ControlPlaneCredential;\n readonly otp?: string;\n}\n\nexport class AuthenticationSelector {\n public constructor(\n private readonly account: AccountManager,\n private readonly prompts: PromptService,\n private readonly oidc = new GitHubActionsOidcCredentialProvider(),\n private readonly isInteractive = () => Boolean(process.stdin.isTTY && process.stdout.isTTY && !isCI),\n ) {}\n\n public async select(\n mode: ControlPlaneAuthMode,\n trust: RegistryTrust,\n scopes: readonly UAPKGCliScope[],\n requireRequestOtp: boolean,\n oidcTarget?: GitHubActionsOidcTarget,\n ): Promise<SelectedAuthentication> {\n if (mode === 'oidc' || (mode === 'auto' && this.oidc.isAvailable())) {\n if (!oidcTarget) {\n throw new Error('GitHub Actions OIDC requires a target package resolved from the requested operation.');\n }\n const accessToken = await this.oidc.exchange(trust, oidcTarget);\n return { kind: 'oidc', credential: { kind: 'bearer', accessToken } };\n }\n\n if (mode === 'login' || (mode === 'auto' && (await this.account.hasGrant(trust)))) {\n if (requireRequestOtp) this.assertInteractiveRequestOtp();\n const access = await this.account.getAccessCredential(trust, scopes);\n return {\n kind: 'login',\n credential: access.credential,\n otp: requireRequestOtp ? await this.readOtp() : undefined,\n };\n }\n\n const environmentToken = process.env.UAPKG_TOKEN?.trim();\n if (mode === 'gat' || (mode === 'auto' && environmentToken)) {\n if (!this.isInteractive()) {\n throw new Error(\n 'Human GAT authentication requires an attended TTY. Headless publishing must use a configured GitHub Actions OIDC trusted publisher.',\n );\n }\n const accessToken = environmentToken || (await this.prompts.secret('UAPKG granular access token')).trim();\n if (!accessToken) throw new Error('A granular access token is required.');\n return {\n kind: 'gat',\n credential: { kind: 'bearer', accessToken },\n otp: requireRequestOtp ? await this.readOtp() : undefined,\n };\n }\n\n throw new Error(\n [\n `No supported publishing credential is available for \"${trust.alias}\".`,\n '',\n `Run \\`uapkg login --registry ${trust.alias}\\` on a browser-capable workstation,`,\n 'set UAPKG_TOKEN for an attended GAT publish, or configure GitHub Actions OIDC.',\n ].join('\\n'),\n );\n }\n\n private async readOtp(): Promise<string> {\n this.assertInteractiveRequestOtp();\n const otp = (await this.prompts.secret('Current TOTP code')).trim();\n if (!/^[0-9]{6}$/.test(otp)) {\n throw new Error('A current 6-digit TOTP code is required for this publishing request.');\n }\n return otp;\n }\n\n private assertInteractiveRequestOtp(): void {\n if (this.isInteractive()) return;\n throw new Error(\n 'Request-scoped TOTP confirmation requires an attended TTY. Human publishing is not supported in headless environments.',\n );\n }\n}\n"],"mappings":";;;;AAgBA,IAAa,yBAAb,MAAoC;CAEf;CACA;CACA;CACA;CAJnB,AAAO,YACL,AAAiB,SACjB,AAAiB,SACjB,AAAiB,OAAO,IAAI,oCAAoC,GAChE,AAAiB,sBAAsB,QAAQ,QAAQ,MAAM,SAAS,QAAQ,OAAO,SAAS,CAAC,IAAI,GACnG;EAJiB;EACA;EACA;EACA;CAChB;CAEH,MAAa,OACX,MACA,OACA,QACA,mBACA,YACiC;EACjC,IAAI,SAAS,UAAW,SAAS,UAAU,KAAK,KAAK,YAAY,GAAI;GACnE,IAAI,CAAC,YACH,MAAM,IAAI,MAAM,sFAAsF;GAGxG,OAAO;IAAE,MAAM;IAAQ,YAAY;KAAE,MAAM;KAAU,mBAD3B,KAAK,KAAK,SAAS,OAAO,UAAU;IACG;GAAE;EACrE;EAEA,IAAI,SAAS,WAAY,SAAS,UAAW,MAAM,KAAK,QAAQ,SAAS,KAAK,GAAK;GACjF,IAAI,mBAAmB,KAAK,4BAA4B;GAExD,OAAO;IACL,MAAM;IACN,aAAY,MAHO,KAAK,QAAQ,oBAAoB,OAAO,MAAM,EAG/C,CAAC;IACnB,KAAK,oBAAoB,MAAM,KAAK,QAAQ,IAAI;GAClD;EACF;EAEA,MAAM,mBAAmB,QAAQ,IAAI,aAAa,KAAK;EACvD,IAAI,SAAS,SAAU,SAAS,UAAU,kBAAmB;GAC3D,IAAI,CAAC,KAAK,cAAc,GACtB,MAAM,IAAI,MACR,qIACF;GAEF,MAAM,cAAc,qBAAqB,MAAM,KAAK,QAAQ,OAAO,6BAA6B,EAAC,CAAE,KAAK;GACxG,IAAI,CAAC,aAAa,MAAM,IAAI,MAAM,sCAAsC;GACxE,OAAO;IACL,MAAM;IACN,YAAY;KAAE,MAAM;KAAU;IAAY;IAC1C,KAAK,oBAAoB,MAAM,KAAK,QAAQ,IAAI;GAClD;EACF;EAEA,MAAM,IAAI,MACR;GACE,wDAAwD,MAAM,MAAM;GACpE;GACA,gCAAgC,MAAM,MAAM;GAC5C;EACF,CAAC,CAAC,KAAK,IAAI,CACb;CACF;CAEA,MAAc,UAA2B;EACvC,KAAK,4BAA4B;EACjC,MAAM,OAAO,MAAM,KAAK,QAAQ,OAAO,mBAAmB,EAAC,CAAE,KAAK;EAClE,IAAI,CAAC,aAAa,KAAK,GAAG,GACxB,MAAM,IAAI,MAAM,sEAAsE;EAExF,OAAO;CACT;CAEA,AAAQ,8BAAoC;EAC1C,IAAI,KAAK,cAAc,GAAG;EAC1B,MAAM,IAAI,MACR,wHACF;CACF;AACF"}
|