@uapkg/cli 1.3.2 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/build/BuildMetadata.js +2 -2
- package/dist/cli-bootstrap.js +19846 -13
- package/dist/cli.js +1 -1
- package/dist/index.js +19980 -60
- package/dist/licenses/semver-LICENSE +15 -0
- package/dist/profile.js +25 -0
- package/dist/runtime-lock.json +2142 -0
- package/dist/{app → types/uapkg/app}/CompositionRoot.d.ts +4 -5
- package/dist/{app → types/uapkg/app}/UAPKGApplication.d.ts +0 -1
- package/dist/{build → types/uapkg/build}/BuildMetadata.d.ts +1 -2
- package/dist/types/uapkg/cli/DebugEnvironment.d.ts +15 -0
- package/dist/types/uapkg/cli/DebugInfo.d.ts +15 -0
- package/dist/{cli → types/uapkg/cli}/UAPKGCommandLine.d.ts +0 -1
- package/dist/{cli → types/uapkg/cli}/parseCommandLine.d.ts +0 -1
- package/dist/{cli → types/uapkg/cli}/parsing/UAPKGCommandLineParser.d.ts +0 -1
- package/dist/{cli → types/uapkg/cli}/parsing/UAPKGParserRegistry.d.ts +0 -1
- package/dist/{cli → types/uapkg/cli}/parsing/contracts/UAPKGCommandModule.d.ts +0 -1
- package/dist/{cli → types/uapkg/cli}/parsing/modules/AddCommandModule.d.ts +0 -1
- package/dist/{cli → types/uapkg/cli}/parsing/modules/ConfigCommandModule.d.ts +0 -1
- package/dist/{cli → types/uapkg/cli}/parsing/modules/InitCommandModule.d.ts +0 -1
- package/dist/{cli → types/uapkg/cli}/parsing/modules/InstallCommandModule.d.ts +0 -1
- package/dist/{cli → types/uapkg/cli}/parsing/modules/LifecycleCommandModule.d.ts +0 -1
- package/dist/{cli → types/uapkg/cli}/parsing/modules/ListCommandModule.d.ts +0 -1
- package/dist/{cli → types/uapkg/cli}/parsing/modules/LoginCommandModule.d.ts +0 -1
- package/dist/{cli → types/uapkg/cli}/parsing/modules/LogoutCommandModule.d.ts +0 -1
- package/dist/{cli → types/uapkg/cli}/parsing/modules/OutdatedCommandModule.d.ts +0 -1
- package/dist/{cli → types/uapkg/cli}/parsing/modules/PackCommandModule.d.ts +0 -1
- package/dist/{cli → types/uapkg/cli}/parsing/modules/ProjectGetNameCommandModule.d.ts +0 -1
- package/dist/{cli → types/uapkg/cli}/parsing/modules/PublishCommandModule.d.ts +0 -1
- package/dist/{cli → types/uapkg/cli}/parsing/modules/RegistryCommandModule.d.ts +0 -1
- package/dist/{cli → types/uapkg/cli}/parsing/modules/RemoveCommandModule.d.ts +0 -1
- package/dist/{cli → types/uapkg/cli}/parsing/modules/RequestsCommandModule.d.ts +0 -1
- package/dist/{cli → types/uapkg/cli}/parsing/modules/UpdateCommandModule.d.ts +0 -1
- package/dist/{cli → types/uapkg/cli}/parsing/modules/WhoamiCommandModule.d.ts +0 -1
- package/dist/{cli → types/uapkg/cli}/parsing/modules/WhyCommandModule.d.ts +0 -1
- package/dist/{cli → types/uapkg/cli}/parsing/modules/sharedOptions.d.ts +0 -1
- package/dist/{cli → types/uapkg/cli}/runUAPKGCLI.d.ts +0 -1
- package/dist/{commands → types/uapkg/commands}/AddCommand.d.ts +0 -1
- package/dist/{commands → types/uapkg/commands}/Command.d.ts +0 -1
- package/dist/{commands → types/uapkg/commands}/ConfigCommand.d.ts +0 -1
- package/dist/{commands → types/uapkg/commands}/InitCommand.d.ts +1 -2
- package/dist/{commands → types/uapkg/commands}/InstallCommand.d.ts +0 -1
- package/dist/{commands → types/uapkg/commands}/ListCommand.d.ts +0 -1
- package/dist/{commands → types/uapkg/commands}/LoginCommand.d.ts +0 -1
- package/dist/{commands → types/uapkg/commands}/LogoutCommand.d.ts +0 -1
- package/dist/{commands → types/uapkg/commands}/OutdatedCommand.d.ts +0 -1
- package/dist/{commands → types/uapkg/commands}/PackCommand.d.ts +0 -1
- package/dist/{commands → types/uapkg/commands}/PackageLifecycleCommand.d.ts +0 -1
- package/dist/{commands → types/uapkg/commands}/PostinstallCandidateBuilder.d.ts +2 -3
- package/dist/{commands → types/uapkg/commands}/ProjectGetNameCommand.d.ts +0 -1
- package/dist/{commands → types/uapkg/commands}/PublishCommand.d.ts +1 -2
- package/dist/{commands → types/uapkg/commands}/RegistryCommand.d.ts +0 -1
- package/dist/{commands → types/uapkg/commands}/RemoveCommand.d.ts +0 -1
- package/dist/{commands → types/uapkg/commands}/RequestsCommand.d.ts +0 -1
- package/dist/{commands → types/uapkg/commands}/UpdateCommand.d.ts +0 -1
- package/dist/{commands → types/uapkg/commands}/WhoamiCommand.d.ts +0 -1
- package/dist/{commands → types/uapkg/commands}/WhyCommand.d.ts +0 -1
- package/dist/{commands → types/uapkg/commands}/add/DependencyAddResolver.d.ts +3 -4
- package/dist/{control-plane → types/uapkg/control-plane}/AccountManager.d.ts +1 -2
- package/dist/{control-plane → types/uapkg/control-plane}/ArtifactObserver.d.ts +0 -1
- package/dist/{control-plane → types/uapkg/control-plane}/AuthMetadataStore.d.ts +0 -1
- package/dist/{control-plane → types/uapkg/control-plane}/AuthStoragePaths.d.ts +0 -1
- package/dist/{control-plane → types/uapkg/control-plane}/AuthenticationSelector.d.ts +0 -1
- package/dist/{control-plane → types/uapkg/control-plane}/ControlPlaneClient.d.ts +1 -2
- package/dist/{control-plane → types/uapkg/control-plane}/ControlPlaneEndpoints.d.ts +1 -2
- package/dist/{control-plane → types/uapkg/control-plane}/ControlPlaneTypes.d.ts +4 -2
- package/dist/{control-plane → types/uapkg/control-plane}/CredentialStore.d.ts +0 -1
- package/dist/{control-plane → types/uapkg/control-plane}/DPoPKeyStore.d.ts +0 -1
- package/dist/{control-plane → types/uapkg/control-plane}/GitHubActionsOidcCredentialProvider.d.ts +4 -3
- package/dist/{control-plane → types/uapkg/control-plane}/PublishIdempotencyStore.d.ts +0 -1
- package/dist/{control-plane → types/uapkg/control-plane}/PublishRequestErrorMapper.d.ts +1 -2
- package/dist/{control-plane → types/uapkg/control-plane}/RegistryGrantLock.d.ts +0 -1
- package/dist/{control-plane → types/uapkg/control-plane}/RegistryTrustResolver.d.ts +0 -1
- package/dist/types/uapkg/control-plane/RequestWatch.d.ts +15 -0
- package/dist/types/uapkg/control-plane/RetryAfter.d.ts +6 -0
- package/dist/{postinstall → types/uapkg/postinstall}/api/PostinstallDsl.d.ts +0 -1
- package/dist/{postinstall → types/uapkg/postinstall}/api/definePostinstall.d.ts +0 -1
- package/dist/{postinstall → types/uapkg/postinstall}/loader/EntryResolver.d.ts +1 -2
- package/dist/{postinstall → types/uapkg/postinstall}/loader/EsbuildTranspiler.d.ts +1 -2
- package/dist/{postinstall → types/uapkg/postinstall}/loader/ExportValidator.d.ts +1 -2
- package/dist/{postinstall → types/uapkg/postinstall}/loader/ModuleImporter.d.ts +1 -2
- package/dist/{postinstall → types/uapkg/postinstall}/loader/PostinstallLoader.d.ts +1 -2
- package/dist/{postinstall → types/uapkg/postinstall}/markers/MarkerBlockEditor.d.ts +1 -2
- package/dist/{postinstall → types/uapkg/postinstall}/markers/MarkerBlockService.d.ts +0 -1
- package/dist/{postinstall → types/uapkg/postinstall}/markers/MarkerIntegrityValidator.d.ts +0 -1
- package/dist/{postinstall → types/uapkg/postinstall}/policy/PostinstallPolicyGate.d.ts +2 -3
- package/dist/{postinstall → types/uapkg/postinstall}/runner/PostinstallOrchestrator.d.ts +1 -2
- package/dist/{postinstall → types/uapkg/postinstall}/unreal/BuildCsInjector.d.ts +1 -2
- package/dist/{postinstall → types/uapkg/postinstall}/unreal/CSharpInjectionEngine.d.ts +0 -1
- package/dist/{postinstall → types/uapkg/postinstall}/unreal/CSharpStructureAnalyzer.d.ts +0 -1
- package/dist/{postinstall → types/uapkg/postinstall}/unreal/CSharpStructures.d.ts +0 -1
- package/dist/{postinstall → types/uapkg/postinstall}/unreal/CSharpWrapperFactory.d.ts +0 -1
- package/dist/{postinstall → types/uapkg/postinstall}/unreal/PluginHash.d.ts +0 -1
- package/dist/{postinstall → types/uapkg/postinstall}/unreal/PrettyParseError.d.ts +0 -1
- package/dist/{postinstall → types/uapkg/postinstall}/unreal/ProjectFileLocator.d.ts +0 -1
- package/dist/{postinstall → types/uapkg/postinstall}/unreal/TargetCsInjector.d.ts +1 -2
- package/dist/{postinstall → types/uapkg/postinstall}/unreal/UProjectInjector.d.ts +1 -2
- package/dist/{postinstall → types/uapkg/postinstall}/unreal/UProjectMetadataReader.d.ts +0 -1
- package/dist/{postinstall → types/uapkg/postinstall}/unreal/UnrealSourceCatalog.d.ts +0 -1
- package/dist/{prompts → types/uapkg/prompts}/InkPromptService.d.ts +0 -1
- package/dist/{prompts → types/uapkg/prompts}/ProjectContextDetector.d.ts +1 -2
- package/dist/{prompts → types/uapkg/prompts}/PromptService.d.ts +0 -1
- package/dist/{reporting → types/uapkg/reporting}/DiagnosticDeduplicator.d.ts +1 -2
- package/dist/{reporting → types/uapkg/reporting}/DiagnosticRenderer.d.ts +1 -2
- package/dist/{reporting → types/uapkg/reporting}/DiagnosticReporter.d.ts +1 -2
- package/dist/{reporting → types/uapkg/reporting}/InkDiagnosticRenderer.d.ts +2 -3
- package/dist/{reporting → types/uapkg/reporting}/InstallProgressReporter.d.ts +1 -2
- package/dist/{reporting → types/uapkg/reporting}/JsonReporter.d.ts +1 -2
- package/dist/{reporting → types/uapkg/reporting}/RegistryRequestTerminalFormatter.d.ts +0 -1
- package/dist/{reporting → types/uapkg/reporting}/TextDiagnosticRenderer.d.ts +1 -2
- package/dist/{reporting → types/uapkg/reporting}/TextSink.d.ts +1 -2
- package/dist/types/uapkg-common/format/prettyBytes.d.ts +19 -0
- package/dist/types/uapkg-common/hash/registryIdentifier.d.ts +28 -0
- package/dist/types/uapkg-common/hash/sha256.d.ts +12 -0
- package/dist/types/uapkg-common/index.d.ts +10 -0
- package/dist/types/uapkg-common/json/safeJsonParse.d.ts +9 -0
- package/dist/types/uapkg-common/json/stableStringify.d.ts +9 -0
- package/dist/types/uapkg-common/normalize/normalizeUrl.d.ts +11 -0
- package/dist/types/uapkg-common/paths/forwardSlash.d.ts +12 -0
- package/dist/types/uapkg-common/runtime/UapkgRuntimeProfile.d.ts +19 -0
- package/dist/types/uapkg-common/spec/parsePackageSpec.d.ts +21 -0
- package/dist/types/uapkg-common-schema/brand/Brand.d.ts +15 -0
- package/dist/types/uapkg-common-schema/index.d.ts +17 -0
- package/dist/types/uapkg-common-schema/primitives/AssetHash.d.ts +11 -0
- package/dist/types/uapkg-common-schema/primitives/ConcurrencyCount.d.ts +11 -0
- package/dist/types/uapkg-common-schema/primitives/DurationSeconds.d.ts +11 -0
- package/dist/types/uapkg-common-schema/primitives/GitTree.d.ts +10 -0
- package/dist/types/uapkg-common-schema/primitives/InstallPath.d.ts +18 -0
- package/dist/types/uapkg-common-schema/primitives/OrgName.d.ts +12 -0
- package/dist/types/uapkg-common-schema/primitives/PackageName.d.ts +14 -0
- package/dist/types/uapkg-common-schema/primitives/PackageSpec.d.ts +21 -0
- package/dist/types/uapkg-common-schema/primitives/PackageVersion.d.ts +10 -0
- package/dist/types/uapkg-common-schema/primitives/PostInstallPolicy.d.ts +21 -0
- package/dist/types/uapkg-common-schema/primitives/RegistryIdentifier.d.ts +15 -0
- package/dist/types/uapkg-common-schema/primitives/RegistryName.d.ts +18 -0
- package/dist/types/uapkg-common-schema/primitives/RegistryURL.d.ts +10 -0
- package/dist/types/uapkg-common-schema/primitives/UnixTimestamp.d.ts +10 -0
- package/dist/types/uapkg-common-schema/primitives/VersionRange.d.ts +10 -0
- package/dist/types/uapkg-config/contracts/ConfigTypes.d.ts +58 -0
- package/dist/types/uapkg-config/core/ConfigInstance.d.ts +43 -0
- package/dist/types/uapkg-config/core/ConfigLayerBuilder.d.ts +13 -0
- package/dist/types/uapkg-config/core/ConfigResolver.d.ts +19 -0
- package/dist/types/uapkg-config/core/ConfigSemanticValidator.d.ts +13 -0
- package/dist/types/uapkg-config/core/ConfigWriter.d.ts +25 -0
- package/dist/types/uapkg-config/core/PostInstallPolicyResolver.d.ts +22 -0
- package/dist/types/uapkg-config/factory/createConfig.d.ts +6 -0
- package/dist/types/uapkg-config/files/ConfigFileRepository.d.ts +11 -0
- package/dist/types/uapkg-config/files/ConfigPathResolver.d.ts +14 -0
- package/dist/types/uapkg-config/index.d.ts +127 -0
- package/dist/types/uapkg-config/merge/ConfigMerger.d.ts +10 -0
- package/dist/types/uapkg-config/merge/ConfigSchemaMergeEngine.d.ts +26 -0
- package/dist/types/uapkg-config/schema/configSchema.d.ts +114 -0
- package/dist/types/uapkg-config/schema/pathSchema.d.ts +12 -0
- package/dist/types/uapkg-config/schema/runtime/ConfigCliValueParser.d.ts +18 -0
- package/dist/types/uapkg-config/schema/runtime/ConfigSchemaIntrospection.d.ts +13 -0
- package/dist/types/uapkg-config/schema/runtime/ConfigSchemaRuntime.d.ts +26 -0
- package/dist/types/uapkg-config/schema/runtime/ConfigSchemaRuntimeProvider.d.ts +7 -0
- package/dist/types/uapkg-diagnostics/base/Diagnostic.d.ts +32 -0
- package/dist/types/uapkg-diagnostics/base/DiagnosticBag.d.ts +44 -0
- package/dist/types/uapkg-diagnostics/base/DiagnosticFingerprint.d.ts +12 -0
- package/dist/types/uapkg-diagnostics/base/DiagnosticLevel.d.ts +11 -0
- package/dist/types/uapkg-diagnostics/base/Result.d.ts +26 -0
- package/dist/types/uapkg-diagnostics/config/ConfigDiagnostics.d.ts +49 -0
- package/dist/types/uapkg-diagnostics/controlPlane/ControlPlaneDiagnostics.d.ts +25 -0
- package/dist/types/uapkg-diagnostics/general/GeneralDiagnostics.d.ts +23 -0
- package/dist/types/uapkg-diagnostics/index.d.ts +20 -0
- package/dist/types/uapkg-diagnostics/installer/InstallerDiagnostics.d.ts +55 -0
- package/dist/types/uapkg-diagnostics/manifest/ManifestDiagnostics.d.ts +70 -0
- package/dist/types/uapkg-diagnostics/pack/PackDiagnostics.d.ts +49 -0
- package/dist/types/uapkg-diagnostics/postinstall/PostinstallDiagnostics.d.ts +47 -0
- package/dist/types/uapkg-diagnostics/publishing/PublishingDiagnostics.d.ts +77 -0
- package/dist/types/uapkg-diagnostics/registry/RegistryDiagnostics.d.ts +71 -0
- package/dist/types/uapkg-diagnostics/registryTools/RegistryToolsDiagnostics.d.ts +130 -0
- package/dist/types/uapkg-diagnostics/resolver/ResolverDiagnostics.d.ts +38 -0
- package/dist/types/uapkg-diagnostics/safety/SafetyDiagnostics.d.ts +33 -0
- package/dist/types/uapkg-diagnostics/spec/SpecDiagnostics.d.ts +23 -0
- package/dist/types/uapkg-diagnostics/types.d.ts +37 -0
- package/dist/types/uapkg-diagnostics-format/contracts/FormatterTypes.d.ts +23 -0
- package/dist/types/uapkg-diagnostics-format/defaults/defaultFormatters.d.ts +8 -0
- package/dist/types/uapkg-diagnostics-format/formatters/PlainTextFormatter.d.ts +11 -0
- package/dist/types/uapkg-diagnostics-format/formatters/config/configFormatters.d.ts +5 -0
- package/dist/types/uapkg-diagnostics-format/formatters/installer/installerFormatters.d.ts +5 -0
- package/dist/types/uapkg-diagnostics-format/formatters/manifest/manifestFormatters.d.ts +5 -0
- package/dist/types/uapkg-diagnostics-format/formatters/pack/packFormatters.d.ts +5 -0
- package/dist/types/uapkg-diagnostics-format/formatters/postinstall/postinstallFormatters.d.ts +5 -0
- package/dist/types/uapkg-diagnostics-format/formatters/publishing/publishingFormatters.d.ts +13 -0
- package/dist/types/uapkg-diagnostics-format/formatters/registry/registryFormatters.d.ts +5 -0
- package/dist/types/uapkg-diagnostics-format/formatters/registryTools/registryToolsFormatters.d.ts +5 -0
- package/dist/types/uapkg-diagnostics-format/formatters/resolver/resolverFormatters.d.ts +5 -0
- package/dist/types/uapkg-diagnostics-format/formatters/safety/safetyFormatters.d.ts +5 -0
- package/dist/types/uapkg-diagnostics-format/formatters/spec/specFormatters.d.ts +5 -0
- package/dist/types/uapkg-diagnostics-format/index.d.ts +15 -0
- package/dist/types/uapkg-diagnostics-format/ink/components/configInkComponents.d.ts +5 -0
- package/dist/types/uapkg-diagnostics-format/ink/components/installerInkComponents.d.ts +5 -0
- package/dist/types/uapkg-diagnostics-format/ink/components/manifestInkComponents.d.ts +5 -0
- package/dist/types/uapkg-diagnostics-format/ink/components/packInkComponents.d.ts +5 -0
- package/dist/types/uapkg-diagnostics-format/ink/components/postinstallInkComponents.d.ts +5 -0
- package/dist/types/uapkg-diagnostics-format/ink/components/publishingInkComponents.d.ts +5 -0
- package/dist/types/uapkg-diagnostics-format/ink/components/registryInkComponents.d.ts +5 -0
- package/dist/types/uapkg-diagnostics-format/ink/components/resolverInkComponents.d.ts +5 -0
- package/dist/types/uapkg-diagnostics-format/ink/components/safetyInkComponents.d.ts +5 -0
- package/dist/types/uapkg-diagnostics-format/ink/components/specInkComponents.d.ts +5 -0
- package/dist/types/uapkg-diagnostics-format/ink/contracts/InkTypes.d.ts +35 -0
- package/dist/types/uapkg-diagnostics-format/ink/defaults/defaultInkComponents.d.ts +15 -0
- package/dist/types/uapkg-diagnostics-format/ink/index.d.ts +17 -0
- package/dist/types/uapkg-diagnostics-format/ink/primitives/HintLine.d.ts +12 -0
- package/dist/types/uapkg-diagnostics-format/ink/primitives/PlainTextBody.d.ts +11 -0
- package/dist/types/uapkg-diagnostics-format/ink/primitives/SeverityBadge.d.ts +13 -0
- package/dist/types/uapkg-diagnostics-format/ink/registry/DiagnosticInkRegistry.d.ts +24 -0
- package/dist/types/uapkg-diagnostics-format/ink/views/DiagnosticView.d.ts +21 -0
- package/dist/types/uapkg-diagnostics-format/ink/views/DiagnosticsListView.d.ts +16 -0
- package/dist/types/uapkg-diagnostics-format/registry/FormatterRegistry.d.ts +26 -0
- package/dist/types/uapkg-diagnostics-format/utils/indent.d.ts +7 -0
- package/dist/types/uapkg-installer/contracts/InstallerTypes.d.ts +91 -0
- package/dist/types/uapkg-installer/contracts/SafetyPolicyTypes.d.ts +43 -0
- package/dist/types/uapkg-installer/contracts/StatusStreamTypes.d.ts +42 -0
- package/dist/types/uapkg-installer/core/ClaimsVerifier.d.ts +22 -0
- package/dist/types/uapkg-installer/core/DiskStateInspector.d.ts +29 -0
- package/dist/types/uapkg-installer/core/InstallPlanner.d.ts +35 -0
- package/dist/types/uapkg-installer/core/Installer.d.ts +61 -0
- package/dist/types/uapkg-installer/core/IntegrityVerifier.d.ts +16 -0
- package/dist/types/uapkg-installer/core/PackageDownloader.d.ts +40 -0
- package/dist/types/uapkg-installer/core/PackageExtractor.d.ts +20 -0
- package/dist/types/uapkg-installer/core/PackageRemover.d.ts +14 -0
- package/dist/types/uapkg-installer/index.d.ts +16 -0
- package/dist/types/uapkg-installer/safety/NoMarkerPolicy.d.ts +17 -0
- package/dist/types/uapkg-installer/safety/SafetyPolicyRegistry.d.ts +32 -0
- package/dist/types/uapkg-installer/status/SlotTable.d.ts +36 -0
- package/dist/types/uapkg-installer/status/StatusStream.d.ts +25 -0
- package/dist/types/uapkg-log/contracts/LoggerTypes.d.ts +22 -0
- package/dist/types/uapkg-log/core/LogLevelPolicy.d.ts +15 -0
- package/dist/types/uapkg-log/core/LoggerFactory.d.ts +11 -0
- package/dist/types/uapkg-log/core/LoggerInstance.d.ts +17 -0
- package/dist/types/uapkg-log/core/WinstonLoggerAdapter.d.ts +8 -0
- package/dist/types/uapkg-log/index.d.ts +8 -0
- package/dist/types/uapkg-pack/contracts/PackTypes.d.ts +29 -0
- package/dist/types/uapkg-pack/core/FileCrawler.d.ts +12 -0
- package/dist/types/uapkg-pack/core/IgnoreEvaluator.d.ts +7 -0
- package/dist/types/uapkg-pack/core/IgnoreRuleLoader.d.ts +14 -0
- package/dist/types/uapkg-pack/core/IntegrityWriter.d.ts +6 -0
- package/dist/types/uapkg-pack/core/LFSPointerDetector.d.ts +6 -0
- package/dist/types/uapkg-pack/core/PackArtifactExcluder.d.ts +11 -0
- package/dist/types/uapkg-pack/core/PackManifestReader.d.ts +8 -0
- package/dist/types/uapkg-pack/core/PackService.d.ts +32 -0
- package/dist/types/uapkg-pack/core/PluginDescriptorGuard.d.ts +11 -0
- package/dist/types/uapkg-pack/core/PluginRootResolver.d.ts +14 -0
- package/dist/types/uapkg-pack/core/TarArchiveWriter.d.ts +11 -0
- package/dist/types/uapkg-pack/index.d.ts +7 -0
- package/dist/types/uapkg-package-claims/archive/PackagedManifestReader.d.ts +28 -0
- package/dist/types/uapkg-package-claims/claims/ClaimsComparison.d.ts +44 -0
- package/dist/types/uapkg-package-claims/claims/PackageClaims.d.ts +9 -0
- package/dist/types/uapkg-package-claims/index.d.ts +7 -0
- package/dist/types/uapkg-package-claims/json/CanonicalJson.d.ts +17 -0
- package/dist/types/uapkg-package-claims/schema/PackageClaimsSchema.d.ts +27 -0
- package/dist/types/uapkg-package-claims/schema/index.d.ts +2 -0
- package/dist/types/uapkg-package-manifest/contracts/ManifestTypes.d.ts +37 -0
- package/dist/types/uapkg-package-manifest/core/DependencyMutator.d.ts +48 -0
- package/dist/types/uapkg-package-manifest/core/DevDependencyPolicy.d.ts +30 -0
- package/dist/types/uapkg-package-manifest/core/InstallPathResolver.d.ts +35 -0
- package/dist/types/uapkg-package-manifest/core/LockfileDiffer.d.ts +40 -0
- package/dist/types/uapkg-package-manifest/core/LockfileSyncIssue.d.ts +11 -0
- package/dist/types/uapkg-package-manifest/core/LockfileSyncValidator.d.ts +26 -0
- package/dist/types/uapkg-package-manifest/core/OutdatedChecker.d.ts +36 -0
- package/dist/types/uapkg-package-manifest/core/PackageManifest.d.ts +63 -0
- package/dist/types/uapkg-package-manifest/core/WhyGraph.d.ts +31 -0
- package/dist/types/uapkg-package-manifest/index.d.ts +18 -0
- package/dist/types/uapkg-package-manifest/io/LockfileReader.d.ts +12 -0
- package/dist/types/uapkg-package-manifest/io/LockfileSyncIssueWriter.d.ts +12 -0
- package/dist/types/uapkg-package-manifest/io/LockfileWriter.d.ts +11 -0
- package/dist/types/uapkg-package-manifest/io/ManifestReader.d.ts +12 -0
- package/dist/types/uapkg-package-manifest/io/ManifestWriter.d.ts +13 -0
- package/dist/types/uapkg-package-manifest/resolver/LockfileSync.d.ts +13 -0
- package/dist/types/uapkg-package-manifest/resolver/Resolver.d.ts +16 -0
- package/dist/types/uapkg-package-manifest-schema/index.d.ts +10 -0
- package/dist/types/uapkg-package-manifest-schema/lockfile/LockDependencySchema.d.ts +15 -0
- package/dist/types/uapkg-package-manifest-schema/lockfile/LockfileSchema.d.ts +22 -0
- package/dist/types/uapkg-package-manifest-schema/manifest/BaseManifestSchema.d.ts +56 -0
- package/dist/types/uapkg-package-manifest-schema/manifest/DependencySchema.d.ts +57 -0
- package/dist/types/uapkg-package-manifest-schema/manifest/ManifestKind.d.ts +17 -0
- package/dist/types/uapkg-package-manifest-schema/manifest/ManifestSchema.d.ts +106 -0
- package/dist/types/uapkg-package-manifest-schema/manifest/PluginManifestSchema.d.ts +52 -0
- package/dist/types/uapkg-package-manifest-schema/manifest/ProjectManifestSchema.d.ts +80 -0
- package/dist/types/uapkg-package-manifest-schema/manifest/PublishSchema.d.ts +15 -0
- package/dist/types/uapkg-registry-core/contracts/RegistryCoreTypes.d.ts +54 -0
- package/dist/types/uapkg-registry-core/core/RegistryCore.d.ts +26 -0
- package/dist/types/uapkg-registry-core/index.d.ts +14 -0
- package/dist/types/uapkg-registry-core/paths/RegistryPaths.d.ts +15 -0
- package/dist/types/uapkg-registry-core/registry/GitRunner.d.ts +31 -0
- package/dist/types/uapkg-registry-core/registry/Registry.d.ts +46 -0
- package/dist/types/uapkg-registry-core/registry/RegistryCacheValidator.d.ts +21 -0
- package/dist/types/uapkg-registry-core/registry/RegistryLock.d.ts +27 -0
- package/dist/types/uapkg-registry-core/registry/RegistryMetadataReader.d.ts +18 -0
- package/dist/types/uapkg-registry-core/registry/RegistryPackageReader.d.ts +24 -0
- package/dist/types/uapkg-registry-core/registry/RegistrySyncPolicy.d.ts +14 -0
- package/dist/types/uapkg-registry-core/registry/RegistryUpdater.d.ts +23 -0
- package/dist/types/uapkg-registry-core/registry/RegistryUrlSanitizer.d.ts +10 -0
- package/dist/types/uapkg-registry-core/resolution/PackageResolver.d.ts +21 -0
- package/dist/types/uapkg-registry-core/resolution/SemverSelectionPolicy.d.ts +36 -0
- package/dist/types/uapkg-registry-schema/index.d.ts +9 -0
- package/dist/types/uapkg-registry-schema/paths/RegistryPackagePath.d.ts +15 -0
- package/dist/types/uapkg-registry-schema/schemas/IntegritySchema.d.ts +12 -0
- package/dist/types/uapkg-registry-schema/schemas/PackageRegistryManifestSchema.d.ts +108 -0
- package/dist/types/uapkg-registry-schema/schemas/PackageSourceSchema.d.ts +12 -0
- package/dist/types/uapkg-registry-schema/schemas/RegistryAssetSchema.d.ts +15 -0
- package/dist/types/uapkg-registry-schema/schemas/RegistryDependencySchema.d.ts +36 -0
- package/dist/types/uapkg-registry-schema/schemas/RegistryMetaSchema.d.ts +29 -0
- package/dist/types/uapkg-registry-schema/schemas/RegistryVersionSchema.d.ts +71 -0
- package/dist/types/uapkg-registry-tools/aggregator/RegistryToolsAggregator.d.ts +45 -0
- package/dist/types/uapkg-registry-tools/contracts/RegistryToolsTypes.d.ts +116 -0
- package/dist/types/uapkg-registry-tools/index.d.ts +18 -0
- package/dist/types/uapkg-registry-tools/io/IntegrityCalculator.d.ts +20 -0
- package/dist/types/uapkg-registry-tools/io/ManifestStore.d.ts +41 -0
- package/dist/types/uapkg-registry-tools/listing/PackageLister.d.ts +22 -0
- package/dist/types/uapkg-registry-tools/mutation/AddPackageVersionPlanner.d.ts +25 -0
- package/dist/types/uapkg-registry-tools/mutation/RemovePackagePlanner.d.ts +22 -0
- package/dist/types/uapkg-registry-tools/mutation/RemovePackageVersionPlanner.d.ts +21 -0
- package/dist/types/uapkg-registry-tools/mutation/VersionSorter.d.ts +10 -0
- package/dist/types/uapkg-registry-tools/paths/RegistryRepoPaths.d.ts +23 -0
- package/dist/types/uapkg-registry-tools/tools/RegistryTools.d.ts +64 -0
- package/dist/types/uapkg-registry-tools/validation/DependencyReachabilityValidator.d.ts +24 -0
- package/dist/types/uapkg-registry-tools/validation/ExternalRegistryPolicyValidator.d.ts +22 -0
- package/dist/types/uapkg-registry-tools/validation/ManifestValidator.d.ts +16 -0
- package/dist/types/uapkg-registry-tools/validation/OfficialRegistryPolicyValidator.d.ts +34 -0
- package/dist/types/uapkg-registry-tools/validation/RegistryValidator.d.ts +31 -0
- package/dist/types/uapkg-registry-tools/validation/ReleaseFileNameValidator.d.ts +21 -0
- package/package.json +21 -36
- package/dist/app/CompositionRoot.d.ts.map +0 -1
- package/dist/app/CompositionRoot.js +0 -93
- package/dist/app/CompositionRoot.js.map +0 -1
- package/dist/app/UAPKGApplication.d.ts.map +0 -1
- package/dist/app/UAPKGApplication.js +0 -157
- package/dist/app/UAPKGApplication.js.map +0 -1
- package/dist/build/BuildMetadata.d.ts.map +0 -1
- package/dist/cli/UAPKGCommandLine.d.ts.map +0 -1
- package/dist/cli/UAPKGCommandLine.js +0 -250
- package/dist/cli/UAPKGCommandLine.js.map +0 -1
- package/dist/cli/parseCommandLine.d.ts.map +0 -1
- package/dist/cli/parseCommandLine.js +0 -11
- package/dist/cli/parseCommandLine.js.map +0 -1
- package/dist/cli/parsing/UAPKGCommandLineParser.d.ts.map +0 -1
- package/dist/cli/parsing/UAPKGCommandLineParser.js +0 -24
- package/dist/cli/parsing/UAPKGCommandLineParser.js.map +0 -1
- package/dist/cli/parsing/UAPKGParserRegistry.d.ts.map +0 -1
- package/dist/cli/parsing/UAPKGParserRegistry.js +0 -54
- package/dist/cli/parsing/UAPKGParserRegistry.js.map +0 -1
- package/dist/cli/parsing/contracts/UAPKGCommandModule.d.ts.map +0 -1
- package/dist/cli/parsing/contracts/UAPKGCommandModule.js +0 -1
- package/dist/cli/parsing/modules/AddCommandModule.d.ts.map +0 -1
- package/dist/cli/parsing/modules/AddCommandModule.js +0 -50
- package/dist/cli/parsing/modules/AddCommandModule.js.map +0 -1
- package/dist/cli/parsing/modules/ConfigCommandModule.d.ts.map +0 -1
- package/dist/cli/parsing/modules/ConfigCommandModule.js +0 -88
- package/dist/cli/parsing/modules/ConfigCommandModule.js.map +0 -1
- package/dist/cli/parsing/modules/InitCommandModule.d.ts.map +0 -1
- package/dist/cli/parsing/modules/InitCommandModule.js +0 -26
- package/dist/cli/parsing/modules/InitCommandModule.js.map +0 -1
- package/dist/cli/parsing/modules/InstallCommandModule.d.ts.map +0 -1
- package/dist/cli/parsing/modules/InstallCommandModule.js +0 -37
- package/dist/cli/parsing/modules/InstallCommandModule.js.map +0 -1
- package/dist/cli/parsing/modules/LifecycleCommandModule.d.ts.map +0 -1
- package/dist/cli/parsing/modules/LifecycleCommandModule.js +0 -84
- package/dist/cli/parsing/modules/LifecycleCommandModule.js.map +0 -1
- package/dist/cli/parsing/modules/ListCommandModule.d.ts.map +0 -1
- package/dist/cli/parsing/modules/ListCommandModule.js +0 -27
- package/dist/cli/parsing/modules/ListCommandModule.js.map +0 -1
- package/dist/cli/parsing/modules/LoginCommandModule.d.ts.map +0 -1
- package/dist/cli/parsing/modules/LoginCommandModule.js +0 -35
- package/dist/cli/parsing/modules/LoginCommandModule.js.map +0 -1
- package/dist/cli/parsing/modules/LogoutCommandModule.d.ts.map +0 -1
- package/dist/cli/parsing/modules/LogoutCommandModule.js +0 -31
- package/dist/cli/parsing/modules/LogoutCommandModule.js.map +0 -1
- package/dist/cli/parsing/modules/OutdatedCommandModule.d.ts.map +0 -1
- package/dist/cli/parsing/modules/OutdatedCommandModule.js +0 -22
- package/dist/cli/parsing/modules/OutdatedCommandModule.js.map +0 -1
- package/dist/cli/parsing/modules/PackCommandModule.d.ts.map +0 -1
- package/dist/cli/parsing/modules/PackCommandModule.js +0 -31
- package/dist/cli/parsing/modules/PackCommandModule.js.map +0 -1
- package/dist/cli/parsing/modules/ProjectGetNameCommandModule.d.ts.map +0 -1
- package/dist/cli/parsing/modules/ProjectGetNameCommandModule.js +0 -15
- package/dist/cli/parsing/modules/ProjectGetNameCommandModule.js.map +0 -1
- package/dist/cli/parsing/modules/PublishCommandModule.d.ts.map +0 -1
- package/dist/cli/parsing/modules/PublishCommandModule.js +0 -66
- package/dist/cli/parsing/modules/PublishCommandModule.js.map +0 -1
- package/dist/cli/parsing/modules/RegistryCommandModule.d.ts.map +0 -1
- package/dist/cli/parsing/modules/RegistryCommandModule.js +0 -118
- package/dist/cli/parsing/modules/RegistryCommandModule.js.map +0 -1
- package/dist/cli/parsing/modules/RemoveCommandModule.d.ts.map +0 -1
- package/dist/cli/parsing/modules/RemoveCommandModule.js +0 -26
- package/dist/cli/parsing/modules/RemoveCommandModule.js.map +0 -1
- package/dist/cli/parsing/modules/RequestsCommandModule.d.ts.map +0 -1
- package/dist/cli/parsing/modules/RequestsCommandModule.js +0 -59
- package/dist/cli/parsing/modules/RequestsCommandModule.js.map +0 -1
- package/dist/cli/parsing/modules/UpdateCommandModule.d.ts.map +0 -1
- package/dist/cli/parsing/modules/UpdateCommandModule.js +0 -39
- package/dist/cli/parsing/modules/UpdateCommandModule.js.map +0 -1
- package/dist/cli/parsing/modules/WhoamiCommandModule.d.ts.map +0 -1
- package/dist/cli/parsing/modules/WhoamiCommandModule.js +0 -31
- package/dist/cli/parsing/modules/WhoamiCommandModule.js.map +0 -1
- package/dist/cli/parsing/modules/WhyCommandModule.d.ts.map +0 -1
- package/dist/cli/parsing/modules/WhyCommandModule.js +0 -26
- package/dist/cli/parsing/modules/WhyCommandModule.js.map +0 -1
- package/dist/cli/parsing/modules/sharedOptions.d.ts.map +0 -1
- package/dist/cli/parsing/modules/sharedOptions.js +0 -21
- package/dist/cli/parsing/modules/sharedOptions.js.map +0 -1
- package/dist/cli/runUAPKGCLI.d.ts.map +0 -1
- package/dist/cli/runUAPKGCLI.js +0 -12
- package/dist/cli/runUAPKGCLI.js.map +0 -1
- package/dist/cli-bootstrap.js.map +0 -1
- package/dist/commands/AddCommand.d.ts.map +0 -1
- package/dist/commands/AddCommand.js +0 -51
- package/dist/commands/AddCommand.js.map +0 -1
- package/dist/commands/Command.d.ts.map +0 -1
- package/dist/commands/Command.js +0 -1
- package/dist/commands/ConfigCommand.d.ts.map +0 -1
- package/dist/commands/ConfigCommand.js +0 -166
- package/dist/commands/ConfigCommand.js.map +0 -1
- package/dist/commands/InitCommand.d.ts.map +0 -1
- package/dist/commands/InitCommand.js +0 -66
- package/dist/commands/InitCommand.js.map +0 -1
- package/dist/commands/InstallCommand.d.ts.map +0 -1
- package/dist/commands/InstallCommand.js +0 -120
- package/dist/commands/InstallCommand.js.map +0 -1
- package/dist/commands/ListCommand.d.ts.map +0 -1
- package/dist/commands/ListCommand.js +0 -78
- package/dist/commands/ListCommand.js.map +0 -1
- package/dist/commands/LoginCommand.d.ts.map +0 -1
- package/dist/commands/LoginCommand.js +0 -67
- package/dist/commands/LoginCommand.js.map +0 -1
- package/dist/commands/LogoutCommand.d.ts.map +0 -1
- package/dist/commands/LogoutCommand.js +0 -37
- package/dist/commands/LogoutCommand.js.map +0 -1
- package/dist/commands/OutdatedCommand.d.ts.map +0 -1
- package/dist/commands/OutdatedCommand.js +0 -43
- package/dist/commands/OutdatedCommand.js.map +0 -1
- package/dist/commands/PackCommand.d.ts.map +0 -1
- package/dist/commands/PackCommand.js +0 -27
- package/dist/commands/PackCommand.js.map +0 -1
- package/dist/commands/PackageLifecycleCommand.d.ts.map +0 -1
- package/dist/commands/PackageLifecycleCommand.js +0 -149
- package/dist/commands/PackageLifecycleCommand.js.map +0 -1
- package/dist/commands/PostinstallCandidateBuilder.d.ts.map +0 -1
- package/dist/commands/PostinstallCandidateBuilder.js +0 -44
- package/dist/commands/PostinstallCandidateBuilder.js.map +0 -1
- package/dist/commands/ProjectGetNameCommand.d.ts.map +0 -1
- package/dist/commands/ProjectGetNameCommand.js +0 -26
- package/dist/commands/ProjectGetNameCommand.js.map +0 -1
- package/dist/commands/PublishCommand.d.ts.map +0 -1
- package/dist/commands/PublishCommand.js +0 -259
- package/dist/commands/PublishCommand.js.map +0 -1
- package/dist/commands/RegistryCommand.d.ts.map +0 -1
- package/dist/commands/RegistryCommand.js +0 -197
- package/dist/commands/RegistryCommand.js.map +0 -1
- package/dist/commands/RemoveCommand.d.ts.map +0 -1
- package/dist/commands/RemoveCommand.js +0 -48
- package/dist/commands/RemoveCommand.js.map +0 -1
- package/dist/commands/RequestsCommand.d.ts.map +0 -1
- package/dist/commands/RequestsCommand.js +0 -85
- package/dist/commands/RequestsCommand.js.map +0 -1
- package/dist/commands/UpdateCommand.d.ts.map +0 -1
- package/dist/commands/UpdateCommand.js +0 -113
- package/dist/commands/UpdateCommand.js.map +0 -1
- package/dist/commands/WhoamiCommand.d.ts.map +0 -1
- package/dist/commands/WhoamiCommand.js +0 -66
- package/dist/commands/WhoamiCommand.js.map +0 -1
- package/dist/commands/WhyCommand.d.ts.map +0 -1
- package/dist/commands/WhyCommand.js +0 -47
- package/dist/commands/WhyCommand.js.map +0 -1
- package/dist/commands/add/DependencyAddResolver.d.ts.map +0 -1
- package/dist/commands/add/DependencyAddResolver.js +0 -38
- package/dist/commands/add/DependencyAddResolver.js.map +0 -1
- package/dist/control-plane/AccountManager.d.ts.map +0 -1
- package/dist/control-plane/AccountManager.js +0 -822
- package/dist/control-plane/AccountManager.js.map +0 -1
- package/dist/control-plane/ArtifactObserver.d.ts.map +0 -1
- package/dist/control-plane/ArtifactObserver.js +0 -77
- package/dist/control-plane/ArtifactObserver.js.map +0 -1
- package/dist/control-plane/AuthMetadataStore.d.ts.map +0 -1
- package/dist/control-plane/AuthMetadataStore.js +0 -114
- package/dist/control-plane/AuthMetadataStore.js.map +0 -1
- package/dist/control-plane/AuthStoragePaths.d.ts.map +0 -1
- package/dist/control-plane/AuthStoragePaths.js +0 -22
- package/dist/control-plane/AuthStoragePaths.js.map +0 -1
- package/dist/control-plane/AuthenticationSelector.d.ts.map +0 -1
- package/dist/control-plane/AuthenticationSelector.js +0 -70
- package/dist/control-plane/AuthenticationSelector.js.map +0 -1
- package/dist/control-plane/ControlPlaneClient.d.ts.map +0 -1
- package/dist/control-plane/ControlPlaneClient.js +0 -291
- package/dist/control-plane/ControlPlaneClient.js.map +0 -1
- package/dist/control-plane/ControlPlaneEndpoints.d.ts.map +0 -1
- package/dist/control-plane/ControlPlaneEndpoints.js +0 -24
- package/dist/control-plane/ControlPlaneEndpoints.js.map +0 -1
- package/dist/control-plane/ControlPlaneTypes.d.ts.map +0 -1
- package/dist/control-plane/ControlPlaneTypes.js +0 -100
- package/dist/control-plane/ControlPlaneTypes.js.map +0 -1
- package/dist/control-plane/CredentialStore.d.ts.map +0 -1
- package/dist/control-plane/CredentialStore.js +0 -70
- package/dist/control-plane/CredentialStore.js.map +0 -1
- package/dist/control-plane/DPoPKeyStore.d.ts.map +0 -1
- package/dist/control-plane/DPoPKeyStore.js +0 -58
- package/dist/control-plane/DPoPKeyStore.js.map +0 -1
- package/dist/control-plane/GitHubActionsOidcCredentialProvider.d.ts.map +0 -1
- package/dist/control-plane/GitHubActionsOidcCredentialProvider.js +0 -201
- package/dist/control-plane/GitHubActionsOidcCredentialProvider.js.map +0 -1
- package/dist/control-plane/PublishIdempotencyStore.d.ts.map +0 -1
- package/dist/control-plane/PublishIdempotencyStore.js +0 -100
- package/dist/control-plane/PublishIdempotencyStore.js.map +0 -1
- package/dist/control-plane/PublishRequestErrorMapper.d.ts.map +0 -1
- package/dist/control-plane/PublishRequestErrorMapper.js +0 -597
- package/dist/control-plane/PublishRequestErrorMapper.js.map +0 -1
- package/dist/control-plane/RegistryGrantLock.d.ts.map +0 -1
- package/dist/control-plane/RegistryGrantLock.js +0 -163
- package/dist/control-plane/RegistryGrantLock.js.map +0 -1
- package/dist/control-plane/RegistryTrustResolver.d.ts.map +0 -1
- package/dist/control-plane/RegistryTrustResolver.js +0 -105
- package/dist/control-plane/RegistryTrustResolver.js.map +0 -1
- package/dist/postinstall/api/PostinstallDsl.d.ts.map +0 -1
- package/dist/postinstall/api/PostinstallDsl.js +0 -36
- package/dist/postinstall/api/PostinstallDsl.js.map +0 -1
- package/dist/postinstall/api/definePostinstall.d.ts.map +0 -1
- package/dist/postinstall/api/definePostinstall.js +0 -23
- package/dist/postinstall/api/definePostinstall.js.map +0 -1
- package/dist/postinstall/index.js +0 -25
- package/dist/postinstall/loader/EntryResolver.d.ts.map +0 -1
- package/dist/postinstall/loader/EntryResolver.js +0 -39
- package/dist/postinstall/loader/EntryResolver.js.map +0 -1
- package/dist/postinstall/loader/EsbuildTranspiler.d.ts.map +0 -1
- package/dist/postinstall/loader/EsbuildTranspiler.js +0 -54
- package/dist/postinstall/loader/EsbuildTranspiler.js.map +0 -1
- package/dist/postinstall/loader/ExportValidator.d.ts.map +0 -1
- package/dist/postinstall/loader/ExportValidator.js +0 -38
- package/dist/postinstall/loader/ExportValidator.js.map +0 -1
- package/dist/postinstall/loader/ModuleImporter.d.ts.map +0 -1
- package/dist/postinstall/loader/ModuleImporter.js +0 -52
- package/dist/postinstall/loader/ModuleImporter.js.map +0 -1
- package/dist/postinstall/loader/PostinstallLoader.d.ts.map +0 -1
- package/dist/postinstall/loader/PostinstallLoader.js +0 -64
- package/dist/postinstall/loader/PostinstallLoader.js.map +0 -1
- package/dist/postinstall/markers/MarkerBlockEditor.d.ts.map +0 -1
- package/dist/postinstall/markers/MarkerBlockEditor.js +0 -50
- package/dist/postinstall/markers/MarkerBlockEditor.js.map +0 -1
- package/dist/postinstall/markers/MarkerBlockService.d.ts.map +0 -1
- package/dist/postinstall/markers/MarkerBlockService.js +0 -46
- package/dist/postinstall/markers/MarkerBlockService.js.map +0 -1
- package/dist/postinstall/markers/MarkerIntegrityValidator.d.ts.map +0 -1
- package/dist/postinstall/markers/MarkerIntegrityValidator.js +0 -48
- package/dist/postinstall/markers/MarkerIntegrityValidator.js.map +0 -1
- package/dist/postinstall/policy/PostinstallPolicyGate.d.ts.map +0 -1
- package/dist/postinstall/policy/PostinstallPolicyGate.js +0 -68
- package/dist/postinstall/policy/PostinstallPolicyGate.js.map +0 -1
- package/dist/postinstall/runner/PostinstallOrchestrator.d.ts.map +0 -1
- package/dist/postinstall/runner/PostinstallOrchestrator.js +0 -174
- package/dist/postinstall/runner/PostinstallOrchestrator.js.map +0 -1
- package/dist/postinstall/unreal/BuildCsInjector.d.ts.map +0 -1
- package/dist/postinstall/unreal/BuildCsInjector.js +0 -60
- package/dist/postinstall/unreal/BuildCsInjector.js.map +0 -1
- package/dist/postinstall/unreal/CSharpInjectionEngine.d.ts.map +0 -1
- package/dist/postinstall/unreal/CSharpInjectionEngine.js +0 -58
- package/dist/postinstall/unreal/CSharpInjectionEngine.js.map +0 -1
- package/dist/postinstall/unreal/CSharpStructureAnalyzer.d.ts.map +0 -1
- package/dist/postinstall/unreal/CSharpStructureAnalyzer.js +0 -126
- package/dist/postinstall/unreal/CSharpStructureAnalyzer.js.map +0 -1
- package/dist/postinstall/unreal/CSharpStructures.d.ts.map +0 -1
- package/dist/postinstall/unreal/CSharpStructures.js +0 -1
- package/dist/postinstall/unreal/CSharpWrapperFactory.d.ts.map +0 -1
- package/dist/postinstall/unreal/CSharpWrapperFactory.js +0 -56
- package/dist/postinstall/unreal/CSharpWrapperFactory.js.map +0 -1
- package/dist/postinstall/unreal/PluginHash.d.ts.map +0 -1
- package/dist/postinstall/unreal/PluginHash.js +0 -18
- package/dist/postinstall/unreal/PluginHash.js.map +0 -1
- package/dist/postinstall/unreal/PrettyParseError.d.ts.map +0 -1
- package/dist/postinstall/unreal/PrettyParseError.js +0 -43
- package/dist/postinstall/unreal/PrettyParseError.js.map +0 -1
- package/dist/postinstall/unreal/ProjectFileLocator.d.ts.map +0 -1
- package/dist/postinstall/unreal/ProjectFileLocator.js +0 -51
- package/dist/postinstall/unreal/ProjectFileLocator.js.map +0 -1
- package/dist/postinstall/unreal/TargetCsInjector.d.ts.map +0 -1
- package/dist/postinstall/unreal/TargetCsInjector.js +0 -60
- package/dist/postinstall/unreal/TargetCsInjector.js.map +0 -1
- package/dist/postinstall/unreal/UProjectInjector.d.ts.map +0 -1
- package/dist/postinstall/unreal/UProjectInjector.js +0 -58
- package/dist/postinstall/unreal/UProjectInjector.js.map +0 -1
- package/dist/postinstall/unreal/UProjectMetadataReader.d.ts.map +0 -1
- package/dist/postinstall/unreal/UProjectMetadataReader.js +0 -24
- package/dist/postinstall/unreal/UProjectMetadataReader.js.map +0 -1
- package/dist/postinstall/unreal/UnrealSourceCatalog.d.ts.map +0 -1
- package/dist/postinstall/unreal/UnrealSourceCatalog.js +0 -52
- package/dist/postinstall/unreal/UnrealSourceCatalog.js.map +0 -1
- package/dist/prompts/InkPromptService.d.ts.map +0 -1
- package/dist/prompts/InkPromptService.js +0 -105
- package/dist/prompts/InkPromptService.js.map +0 -1
- package/dist/prompts/ProjectContextDetector.d.ts.map +0 -1
- package/dist/prompts/ProjectContextDetector.js +0 -33
- package/dist/prompts/ProjectContextDetector.js.map +0 -1
- package/dist/prompts/PromptService.d.ts.map +0 -1
- package/dist/prompts/PromptService.js +0 -1
- package/dist/reporting/DiagnosticDeduplicator.d.ts.map +0 -1
- package/dist/reporting/DiagnosticDeduplicator.js +0 -38
- package/dist/reporting/DiagnosticDeduplicator.js.map +0 -1
- package/dist/reporting/DiagnosticRenderer.d.ts.map +0 -1
- package/dist/reporting/DiagnosticRenderer.js +0 -1
- package/dist/reporting/DiagnosticReporter.d.ts.map +0 -1
- package/dist/reporting/DiagnosticReporter.js +0 -42
- package/dist/reporting/DiagnosticReporter.js.map +0 -1
- package/dist/reporting/InkDiagnosticRenderer.d.ts.map +0 -1
- package/dist/reporting/InkDiagnosticRenderer.js +0 -52
- package/dist/reporting/InkDiagnosticRenderer.js.map +0 -1
- package/dist/reporting/InstallProgressReporter.d.ts.map +0 -1
- package/dist/reporting/InstallProgressReporter.js +0 -50
- package/dist/reporting/InstallProgressReporter.js.map +0 -1
- package/dist/reporting/JsonReporter.d.ts.map +0 -1
- package/dist/reporting/JsonReporter.js +0 -36
- package/dist/reporting/JsonReporter.js.map +0 -1
- package/dist/reporting/RegistryRequestTerminalFormatter.d.ts.map +0 -1
- package/dist/reporting/RegistryRequestTerminalFormatter.js +0 -90
- package/dist/reporting/RegistryRequestTerminalFormatter.js.map +0 -1
- package/dist/reporting/TextDiagnosticRenderer.d.ts.map +0 -1
- package/dist/reporting/TextDiagnosticRenderer.js +0 -38
- package/dist/reporting/TextDiagnosticRenderer.js.map +0 -1
- package/dist/reporting/TextSink.d.ts.map +0 -1
- package/dist/reporting/TextSink.js +0 -29
- package/dist/reporting/TextSink.js.map +0 -1
- /package/dist/{cli-bootstrap.d.ts → types/uapkg/cli-bootstrap.d.ts} +0 -0
- /package/dist/{index.d.ts → types/uapkg/index.d.ts} +0 -0
- /package/dist/{postinstall → types/uapkg/postinstall}/index.d.ts +0 -0
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
//#region src/commands/OutdatedCommand.ts
|
|
2
|
-
/**
|
|
3
|
-
* `uapkg outdated` — emits one row per declared dependency with
|
|
4
|
-
* `current / wanted / latest / status` taken from
|
|
5
|
-
* {@link PackageManifest.checkOutdated}.
|
|
6
|
-
*
|
|
7
|
-
* Exit code 0 when all rows are `up-to-date`; otherwise 2 so CI gates can
|
|
8
|
-
* branch on it. JSON mode emits the full array on stdout in a single write.
|
|
9
|
-
*/
|
|
10
|
-
var OutdatedCommand = class {
|
|
11
|
-
root;
|
|
12
|
-
options;
|
|
13
|
-
constructor(root, options) {
|
|
14
|
-
this.root = root;
|
|
15
|
-
this.options = options;
|
|
16
|
-
}
|
|
17
|
-
async execute() {
|
|
18
|
-
const result = await this.root.packageManifest.checkOutdated();
|
|
19
|
-
if (this.options.outputFormat === "json") {
|
|
20
|
-
this.root.json.emit({
|
|
21
|
-
status: result.ok ? "ok" : "error",
|
|
22
|
-
command: "outdated",
|
|
23
|
-
data: result.ok ? result.value : void 0,
|
|
24
|
-
diagnostics: result.diagnostics
|
|
25
|
-
});
|
|
26
|
-
return result.ok ? result.value.some((r) => r.status !== "up-to-date") ? 2 : 0 : 1;
|
|
27
|
-
}
|
|
28
|
-
this.root.diagnostics.reportAll(result.diagnostics);
|
|
29
|
-
if (!result.ok) return 1;
|
|
30
|
-
const rows = result.value;
|
|
31
|
-
if (rows.length === 0) {
|
|
32
|
-
process.stdout.write("No declared dependencies.\n");
|
|
33
|
-
return 0;
|
|
34
|
-
}
|
|
35
|
-
const outdated = rows.filter((r) => r.status !== "up-to-date");
|
|
36
|
-
for (const row of rows) process.stdout.write(`${row.status.padEnd(16)} ${row.name.padEnd(32)} ${row.current} → ${row.wanted} (latest ${row.latest})\n`);
|
|
37
|
-
return outdated.length > 0 ? 2 : 0;
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
//#endregion
|
|
42
|
-
export { OutdatedCommand };
|
|
43
|
-
//# sourceMappingURL=OutdatedCommand.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OutdatedCommand.js","names":[],"sources":["../../src/commands/OutdatedCommand.ts"],"sourcesContent":["import type { CompositionRoot } from '../app/CompositionRoot.js';\nimport type { Command } from './Command.js';\n\nexport interface OutdatedCommandOptions {\n readonly outputFormat: 'text' | 'json';\n}\n\n/**\n * `uapkg outdated` — emits one row per declared dependency with\n * `current / wanted / latest / status` taken from\n * {@link PackageManifest.checkOutdated}.\n *\n * Exit code 0 when all rows are `up-to-date`; otherwise 2 so CI gates can\n * branch on it. JSON mode emits the full array on stdout in a single write.\n */\nexport class OutdatedCommand implements Command {\n public constructor(\n private readonly root: CompositionRoot,\n private readonly options: OutdatedCommandOptions,\n ) {}\n\n public async execute(): Promise<number> {\n const result = await this.root.packageManifest.checkOutdated();\n\n if (this.options.outputFormat === 'json') {\n this.root.json.emit({\n status: result.ok ? 'ok' : 'error',\n command: 'outdated',\n data: result.ok ? result.value : undefined,\n diagnostics: result.diagnostics,\n });\n return result.ok ? (result.value.some((r) => r.status !== 'up-to-date') ? 2 : 0) : 1;\n }\n\n this.root.diagnostics.reportAll(result.diagnostics);\n if (!result.ok) return 1;\n\n const rows = result.value;\n if (rows.length === 0) {\n process.stdout.write('No declared dependencies.\\n');\n return 0;\n }\n const outdated = rows.filter((r) => r.status !== 'up-to-date');\n for (const row of rows) {\n process.stdout.write(\n `${row.status.padEnd(16)} ${row.name.padEnd(32)} ${row.current} → ${row.wanted} (latest ${row.latest})\\n`,\n );\n }\n return outdated.length > 0 ? 2 : 0;\n }\n}\n"],"mappings":";;;;;;;;;AAeA,IAAa,kBAAb,MAAgD;CAE3B;CACA;CAFnB,AAAO,YACL,AAAiB,MACjB,AAAiB,SACjB;EAFiB;EACA;CAChB;CAEH,MAAa,UAA2B;EACtC,MAAM,SAAS,MAAM,KAAK,KAAK,gBAAgB,cAAc;EAE7D,IAAI,KAAK,QAAQ,iBAAiB,QAAQ;GACxC,KAAK,KAAK,KAAK,KAAK;IAClB,QAAQ,OAAO,KAAK,OAAO;IAC3B,SAAS;IACT,MAAM,OAAO,KAAK,OAAO,QAAQ;IACjC,aAAa,OAAO;GACtB,CAAC;GACD,OAAO,OAAO,KAAM,OAAO,MAAM,MAAM,MAAM,EAAE,WAAW,YAAY,IAAI,IAAI,IAAK;EACrF;EAEA,KAAK,KAAK,YAAY,UAAU,OAAO,WAAW;EAClD,IAAI,CAAC,OAAO,IAAI,OAAO;EAEvB,MAAM,OAAO,OAAO;EACpB,IAAI,KAAK,WAAW,GAAG;GACrB,QAAQ,OAAO,MAAM,6BAA6B;GAClD,OAAO;EACT;EACA,MAAM,WAAW,KAAK,QAAQ,MAAM,EAAE,WAAW,YAAY;EAC7D,KAAK,MAAM,OAAO,MAChB,QAAQ,OAAO,MACb,GAAG,IAAI,OAAO,OAAO,EAAE,EAAE,GAAG,IAAI,KAAK,OAAO,EAAE,EAAE,GAAG,IAAI,QAAQ,KAAK,IAAI,OAAO,WAAW,IAAI,OAAO,IACvG;EAEF,OAAO,SAAS,SAAS,IAAI,IAAI;CACnC;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PackCommand.d.ts","names":[],"sources":["../../src/commands/PackCommand.ts"],"mappings":";;UAIiB;EACf;EACA;EACA;EACA;;cAGW,uBAAuB;mBACL;EAA7B,YAA6B,SAAS;EAEhC,WAAO"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { DiagnosticReporter } from "../reporting/DiagnosticReporter.js";
|
|
2
|
-
import { pack } from "@uapkg/pack";
|
|
3
|
-
|
|
4
|
-
//#region src/commands/PackCommand.ts
|
|
5
|
-
var PackCommand = class {
|
|
6
|
-
options;
|
|
7
|
-
constructor(options) {
|
|
8
|
-
this.options = options;
|
|
9
|
-
}
|
|
10
|
-
async execute() {
|
|
11
|
-
const result = await pack({
|
|
12
|
-
cwd: this.options.cwd,
|
|
13
|
-
dryRun: this.options.dryRun,
|
|
14
|
-
allowMissingLfs: this.options.allowMissingLfs,
|
|
15
|
-
outFile: this.options.outFile
|
|
16
|
-
});
|
|
17
|
-
if (!result.ok) {
|
|
18
|
-
new DiagnosticReporter().reportAll(result.diagnostics);
|
|
19
|
-
return 1;
|
|
20
|
-
}
|
|
21
|
-
return 0;
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
//#endregion
|
|
26
|
-
export { PackCommand };
|
|
27
|
-
//# sourceMappingURL=PackCommand.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PackCommand.js","names":[],"sources":["../../src/commands/PackCommand.ts"],"sourcesContent":["import { pack } from '@uapkg/pack';\nimport { DiagnosticReporter } from '../reporting/DiagnosticReporter.js';\nimport type { Command } from './Command.js';\n\nexport interface PackCommandOptions {\n cwd: string;\n dryRun: boolean;\n allowMissingLfs: boolean;\n outFile?: string;\n}\n\nexport class PackCommand implements Command {\n constructor(private readonly options: PackCommandOptions) {}\n\n async execute() {\n const result = await pack({\n cwd: this.options.cwd,\n dryRun: this.options.dryRun,\n allowMissingLfs: this.options.allowMissingLfs,\n outFile: this.options.outFile,\n });\n\n if (!result.ok) {\n new DiagnosticReporter().reportAll(result.diagnostics);\n return 1;\n }\n\n return 0;\n }\n}\n"],"mappings":";;;;AAWA,IAAa,cAAb,MAA4C;CACb;CAA7B,YAAY,AAAiB,SAA6B;EAA7B;CAA8B;CAE3D,MAAM,UAAU;EACd,MAAM,SAAS,MAAM,KAAK;GACxB,KAAK,KAAK,QAAQ;GAClB,QAAQ,KAAK,QAAQ;GACrB,iBAAiB,KAAK,QAAQ;GAC9B,SAAS,KAAK,QAAQ;EACxB,CAAC;EAED,IAAI,CAAC,OAAO,IAAI;GACd,IAAI,mBAAmB,CAAC,CAAC,UAAU,OAAO,WAAW;GACrD,OAAO;EACT;EAEA,OAAO;CACT;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PackageLifecycleCommand.d.ts","names":[],"sources":["../../src/commands/PackageLifecycleCommand.ts"],"mappings":";;;;;UAyBiB;WACN,WAAW;WACX;WACA;WACA;WACA;WACA,MAAM;WACN;WACA,cAAc;;;;;;;;cASZ,mCAAmC;mBAE3B;mBACA;EAFnB,YACmB,MAAM,iBACN,SAAS;EAGf,WAAW;UA0GhB;UAkBA"}
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { ControlPlaneError } from "../control-plane/ControlPlaneTypes.js";
|
|
2
|
-
import { ControlPlaneClient } from "../control-plane/ControlPlaneClient.js";
|
|
3
|
-
import { describeControlPlaneError } from "../control-plane/AccountManager.js";
|
|
4
|
-
import { AuthenticationSelector } from "../control-plane/AuthenticationSelector.js";
|
|
5
|
-
import { PublishIdempotencyStore } from "../control-plane/PublishIdempotencyStore.js";
|
|
6
|
-
import { InkPromptService } from "../prompts/InkPromptService.js";
|
|
7
|
-
import { formatRegistryRequestTerminal, isRegistryRequestSuccessStatus, isRegistryRequestTerminalStatus } from "../reporting/RegistryRequestTerminalFormatter.js";
|
|
8
|
-
import { randomUUID } from "node:crypto";
|
|
9
|
-
|
|
10
|
-
//#region src/commands/PackageLifecycleCommand.ts
|
|
11
|
-
const WATCH_TIMEOUT_MS = 18e5;
|
|
12
|
-
const REASON_REQUIRED = /* @__PURE__ */ new Set([
|
|
13
|
-
"yank",
|
|
14
|
-
"unyank",
|
|
15
|
-
"unpublish",
|
|
16
|
-
"deprecate"
|
|
17
|
-
]);
|
|
18
|
-
/**
|
|
19
|
-
* Shared implementation of the five route-derived package lifecycle
|
|
20
|
-
* operations (`uapkg yank|unyank|unpublish|deprecate|undeprecate`). Each
|
|
21
|
-
* command posts to its dedicated submission route and watches the request
|
|
22
|
-
* to readiness unless detached.
|
|
23
|
-
*/
|
|
24
|
-
var PackageLifecycleCommand = class {
|
|
25
|
-
root;
|
|
26
|
-
options;
|
|
27
|
-
constructor(root, options) {
|
|
28
|
-
this.root = root;
|
|
29
|
-
this.options = options;
|
|
30
|
-
}
|
|
31
|
-
async execute() {
|
|
32
|
-
try {
|
|
33
|
-
const { operation, packageName, packageVersion } = this.options;
|
|
34
|
-
if (!packageName.trim() || !packageVersion.trim()) throw new Error(`uapkg ${operation} requires a package name and an exact version.`);
|
|
35
|
-
const reason = this.options.reason?.trim();
|
|
36
|
-
if (REASON_REQUIRED.has(operation) && !reason) throw new Error(`uapkg ${operation} requires --reason describing why the version is changing state.`);
|
|
37
|
-
const trust = await this.root.registryTrustResolver.resolve(this.options.registry);
|
|
38
|
-
const selector = new AuthenticationSelector(this.root.accountManager, new InkPromptService());
|
|
39
|
-
const oidcTarget = {
|
|
40
|
-
registryId: trust.registryId,
|
|
41
|
-
packageName: packageName.trim()
|
|
42
|
-
};
|
|
43
|
-
const requestedScopes = this.options.detach ? ["publishing.request.create"] : ["publishing.request.create", "publishing.request.read.self"];
|
|
44
|
-
let authentication = await selector.select(this.options.auth, trust, requestedScopes, true, oidcTarget);
|
|
45
|
-
let requestOtp = authentication.otp;
|
|
46
|
-
authentication = {
|
|
47
|
-
kind: authentication.kind,
|
|
48
|
-
credential: authentication.credential
|
|
49
|
-
};
|
|
50
|
-
const submission = {
|
|
51
|
-
registryId: trust.registryId,
|
|
52
|
-
payload: {
|
|
53
|
-
packageName: packageName.trim(),
|
|
54
|
-
packageVersion: packageVersion.trim(),
|
|
55
|
-
...reason ? { reason } : {}
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
const idempotencyStore = new PublishIdempotencyStore();
|
|
59
|
-
const submissionDigest = PublishIdempotencyStore.submissionDigest(operation, submission);
|
|
60
|
-
const idempotencyKey = idempotencyStore.getOrCreate(submissionDigest, () => randomUUID());
|
|
61
|
-
const client = new ControlPlaneClient(trust.apiBaseUrl);
|
|
62
|
-
let created;
|
|
63
|
-
try {
|
|
64
|
-
created = await client.submitRegistryRequest(authentication.credential, operation, submission, {
|
|
65
|
-
idempotencyKey,
|
|
66
|
-
otp: requestOtp
|
|
67
|
-
});
|
|
68
|
-
} finally {
|
|
69
|
-
requestOtp = void 0;
|
|
70
|
-
}
|
|
71
|
-
if (this.options.detach) {
|
|
72
|
-
this.printCreated(created.requestId, created.status, trust.alias);
|
|
73
|
-
return 0;
|
|
74
|
-
}
|
|
75
|
-
let detail = await client.getRegistryRequestDetail(authentication.credential, created.requestId);
|
|
76
|
-
let previousStatus = "";
|
|
77
|
-
const deadline = Date.now() + WATCH_TIMEOUT_MS;
|
|
78
|
-
while (!isRegistryRequestTerminalStatus(detail.request.status)) {
|
|
79
|
-
if (Date.now() >= deadline) throw new Error(`Timed out waiting for request ${detail.request.id}. Check it with \`uapkg requests status ${detail.request.id}\`.`);
|
|
80
|
-
if (this.options.outputFormat === "text" && detail.request.status !== previousStatus) {
|
|
81
|
-
process.stdout.write(`${detail.request.id}: ${detail.request.status}${detail.request.currentStep ? ` (${detail.request.currentStep})` : ""}\n`);
|
|
82
|
-
previousStatus = detail.request.status;
|
|
83
|
-
}
|
|
84
|
-
await delay(2e3);
|
|
85
|
-
try {
|
|
86
|
-
detail = await client.getRegistryRequestDetail(authentication.credential, created.requestId);
|
|
87
|
-
} catch (error) {
|
|
88
|
-
if (!(error instanceof ControlPlaneError) || error.status !== 401) throw error;
|
|
89
|
-
if (authentication.kind === "gat") throw error;
|
|
90
|
-
if (authentication.kind === "login") this.root.accountManager.invalidateAccessCredentials(trust);
|
|
91
|
-
authentication = await selector.select(authentication.kind, trust, ["publishing.request.read.self"], false, oidcTarget);
|
|
92
|
-
detail = await client.getRegistryRequestDetail(authentication.credential, created.requestId);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
idempotencyStore.clear(submissionDigest);
|
|
96
|
-
if (isRegistryRequestSuccessStatus(detail.request.status)) {
|
|
97
|
-
let refreshWarning;
|
|
98
|
-
try {
|
|
99
|
-
await this.root.registryTrustResolver.forceRefresh(trust);
|
|
100
|
-
} catch (error) {
|
|
101
|
-
refreshWarning = error instanceof Error ? error.message : String(error);
|
|
102
|
-
}
|
|
103
|
-
this.printTerminal(detail, trust.alias, refreshWarning);
|
|
104
|
-
return 0;
|
|
105
|
-
}
|
|
106
|
-
this.printTerminal(detail, trust.alias);
|
|
107
|
-
return 1;
|
|
108
|
-
} catch (error) {
|
|
109
|
-
process.stderr.write(`${describeControlPlaneError(error)}\n`);
|
|
110
|
-
return 1;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
printCreated(requestId, status, registryAlias) {
|
|
114
|
-
if (this.options.outputFormat === "json") {
|
|
115
|
-
process.stdout.write(`${JSON.stringify({
|
|
116
|
-
ok: true,
|
|
117
|
-
operation: this.options.operation,
|
|
118
|
-
registry: registryAlias,
|
|
119
|
-
requestId,
|
|
120
|
-
status
|
|
121
|
-
})}\n`);
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
process.stdout.write(`${this.options.operation} request ${requestId} for ${this.options.packageName}@${this.options.packageVersion}: ${status}.\n`);
|
|
125
|
-
}
|
|
126
|
-
printTerminal(detail, registryAlias, refreshWarning) {
|
|
127
|
-
const output = formatRegistryRequestTerminal({
|
|
128
|
-
detail,
|
|
129
|
-
registryAlias,
|
|
130
|
-
outputFormat: this.options.outputFormat,
|
|
131
|
-
presentation: {
|
|
132
|
-
kind: "lifecycle",
|
|
133
|
-
operation: this.options.operation,
|
|
134
|
-
packageName: this.options.packageName,
|
|
135
|
-
packageVersion: this.options.packageVersion
|
|
136
|
-
},
|
|
137
|
-
...refreshWarning ? { registryRefreshWarning: refreshWarning } : {}
|
|
138
|
-
});
|
|
139
|
-
process.stdout.write(output.stdout);
|
|
140
|
-
if (output.stderr) process.stderr.write(output.stderr);
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
function delay(milliseconds) {
|
|
144
|
-
return new Promise((resolve) => setTimeout(resolve, milliseconds));
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
//#endregion
|
|
148
|
-
export { PackageLifecycleCommand };
|
|
149
|
-
//# sourceMappingURL=PackageLifecycleCommand.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PackageLifecycleCommand.js","names":[],"sources":["../../src/commands/PackageLifecycleCommand.ts"],"sourcesContent":["import { randomUUID } from 'node:crypto';\nimport type { CompositionRoot } from '../app/CompositionRoot.js';\nimport type { UAPKGLifecycleCommandName, UAPKGOutputFormat } from '../cli/UAPKGCommandLine.js';\nimport { describeControlPlaneError } from '../control-plane/AccountManager.js';\nimport { AuthenticationSelector } from '../control-plane/AuthenticationSelector.js';\nimport { ControlPlaneClient } from '../control-plane/ControlPlaneClient.js';\nimport {\n type ControlPlaneAuthMode,\n ControlPlaneError,\n type RegistryRequestDetail,\n type RegistryRequestStatus,\n type RegistryRequestSubmission,\n} from '../control-plane/ControlPlaneTypes.js';\nimport { PublishIdempotencyStore } from '../control-plane/PublishIdempotencyStore.js';\nimport { InkPromptService } from '../prompts/InkPromptService.js';\nimport {\n formatRegistryRequestTerminal,\n isRegistryRequestSuccessStatus,\n isRegistryRequestTerminalStatus,\n} from '../reporting/RegistryRequestTerminalFormatter.js';\nimport type { Command } from './Command.js';\n\nconst WATCH_TIMEOUT_MS = 30 * 60 * 1000;\nconst REASON_REQUIRED: ReadonlySet<UAPKGLifecycleCommandName> = new Set(['yank', 'unyank', 'unpublish', 'deprecate']);\n\nexport interface PackageLifecycleCommandOptions {\n readonly operation: UAPKGLifecycleCommandName;\n readonly packageName: string;\n readonly packageVersion: string;\n readonly reason?: string;\n readonly registry?: string;\n readonly auth: ControlPlaneAuthMode;\n readonly detach: boolean;\n readonly outputFormat: UAPKGOutputFormat;\n}\n\n/**\n * Shared implementation of the five route-derived package lifecycle\n * operations (`uapkg yank|unyank|unpublish|deprecate|undeprecate`). Each\n * command posts to its dedicated submission route and watches the request\n * to readiness unless detached.\n */\nexport class PackageLifecycleCommand implements Command {\n public constructor(\n private readonly root: CompositionRoot,\n private readonly options: PackageLifecycleCommandOptions,\n ) {}\n\n public async execute(): Promise<number> {\n try {\n const { operation, packageName, packageVersion } = this.options;\n if (!packageName.trim() || !packageVersion.trim()) {\n throw new Error(`uapkg ${operation} requires a package name and an exact version.`);\n }\n const reason = this.options.reason?.trim();\n if (REASON_REQUIRED.has(operation) && !reason) {\n throw new Error(`uapkg ${operation} requires --reason describing why the version is changing state.`);\n }\n\n const trust = await this.root.registryTrustResolver.resolve(this.options.registry);\n const selector = new AuthenticationSelector(this.root.accountManager, new InkPromptService());\n const oidcTarget = { registryId: trust.registryId, packageName: packageName.trim() };\n const requestedScopes = this.options.detach\n ? (['publishing.request.create'] as const)\n : (['publishing.request.create', 'publishing.request.read.self'] as const);\n let authentication = await selector.select(this.options.auth, trust, requestedScopes, true, oidcTarget);\n let requestOtp = authentication.otp;\n authentication = { kind: authentication.kind, credential: authentication.credential };\n\n const submission: RegistryRequestSubmission = {\n registryId: trust.registryId,\n payload: {\n packageName: packageName.trim(),\n packageVersion: packageVersion.trim(),\n ...(reason ? { reason } : {}),\n },\n };\n\n const idempotencyStore = new PublishIdempotencyStore();\n const submissionDigest = PublishIdempotencyStore.submissionDigest(operation, submission);\n const idempotencyKey = idempotencyStore.getOrCreate(submissionDigest, () => randomUUID());\n\n const client = new ControlPlaneClient(trust.apiBaseUrl);\n let created: Awaited<ReturnType<ControlPlaneClient['submitRegistryRequest']>>;\n try {\n created = await client.submitRegistryRequest(authentication.credential, operation, submission, {\n idempotencyKey,\n otp: requestOtp,\n });\n } finally {\n // Do not retain the request-bound code during status reads or watch.\n requestOtp = undefined;\n }\n if (this.options.detach) {\n this.printCreated(created.requestId, created.status, trust.alias);\n return 0;\n }\n\n let detail = await client.getRegistryRequestDetail(authentication.credential, created.requestId);\n let previousStatus = '';\n const deadline = Date.now() + WATCH_TIMEOUT_MS;\n while (!isRegistryRequestTerminalStatus(detail.request.status)) {\n if (Date.now() >= deadline) {\n throw new Error(\n `Timed out waiting for request ${detail.request.id}. Check it with \\`uapkg requests status ${detail.request.id}\\`.`,\n );\n }\n if (this.options.outputFormat === 'text' && detail.request.status !== previousStatus) {\n process.stdout.write(\n `${detail.request.id}: ${detail.request.status}${detail.request.currentStep ? ` (${detail.request.currentStep})` : ''}\\n`,\n );\n previousStatus = detail.request.status;\n }\n await delay(2_000);\n try {\n detail = await client.getRegistryRequestDetail(authentication.credential, created.requestId);\n } catch (error) {\n if (!(error instanceof ControlPlaneError) || error.status !== 401) throw error;\n if (authentication.kind === 'gat') throw error;\n if (authentication.kind === 'login') {\n this.root.accountManager.invalidateAccessCredentials(trust);\n }\n authentication = await selector.select(\n authentication.kind,\n trust,\n ['publishing.request.read.self'],\n false,\n oidcTarget,\n );\n detail = await client.getRegistryRequestDetail(authentication.credential, created.requestId);\n }\n }\n\n idempotencyStore.clear(submissionDigest);\n\n if (isRegistryRequestSuccessStatus(detail.request.status)) {\n let refreshWarning: string | undefined;\n try {\n await this.root.registryTrustResolver.forceRefresh(trust);\n } catch (error) {\n refreshWarning = error instanceof Error ? error.message : String(error);\n }\n this.printTerminal(detail, trust.alias, refreshWarning);\n return 0;\n }\n\n this.printTerminal(detail, trust.alias);\n return 1;\n } catch (error) {\n process.stderr.write(`${describeControlPlaneError(error)}\\n`);\n return 1;\n }\n }\n\n private printCreated(requestId: string, status: RegistryRequestStatus, registryAlias: string): void {\n if (this.options.outputFormat === 'json') {\n process.stdout.write(\n `${JSON.stringify({\n ok: true,\n operation: this.options.operation,\n registry: registryAlias,\n requestId,\n status,\n })}\\n`,\n );\n return;\n }\n process.stdout.write(\n `${this.options.operation} request ${requestId} for ${this.options.packageName}@${this.options.packageVersion}: ${status}.\\n`,\n );\n }\n\n private printTerminal(detail: RegistryRequestDetail, registryAlias: string, refreshWarning?: string): void {\n const output = formatRegistryRequestTerminal({\n detail,\n registryAlias,\n outputFormat: this.options.outputFormat,\n presentation: {\n kind: 'lifecycle',\n operation: this.options.operation,\n packageName: this.options.packageName,\n packageVersion: this.options.packageVersion,\n },\n ...(refreshWarning ? { registryRefreshWarning: refreshWarning } : {}),\n });\n process.stdout.write(output.stdout);\n if (output.stderr) process.stderr.write(output.stderr);\n }\n}\n\nfunction delay(milliseconds: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, milliseconds));\n}\n"],"mappings":";;;;;;;;;;AAsBA,MAAM,mBAAmB;AACzB,MAAM,kCAA0D,IAAI,IAAI;CAAC;CAAQ;CAAU;CAAa;AAAW,CAAC;;;;;;;AAmBpH,IAAa,0BAAb,MAAwD;CAEnC;CACA;CAFnB,AAAO,YACL,AAAiB,MACjB,AAAiB,SACjB;EAFiB;EACA;CAChB;CAEH,MAAa,UAA2B;EACtC,IAAI;GACF,MAAM,EAAE,WAAW,aAAa,mBAAmB,KAAK;GACxD,IAAI,CAAC,YAAY,KAAK,KAAK,CAAC,eAAe,KAAK,GAC9C,MAAM,IAAI,MAAM,SAAS,UAAU,+CAA+C;GAEpF,MAAM,SAAS,KAAK,QAAQ,QAAQ,KAAK;GACzC,IAAI,gBAAgB,IAAI,SAAS,KAAK,CAAC,QACrC,MAAM,IAAI,MAAM,SAAS,UAAU,iEAAiE;GAGtG,MAAM,QAAQ,MAAM,KAAK,KAAK,sBAAsB,QAAQ,KAAK,QAAQ,QAAQ;GACjF,MAAM,WAAW,IAAI,uBAAuB,KAAK,KAAK,gBAAgB,IAAI,iBAAiB,CAAC;GAC5F,MAAM,aAAa;IAAE,YAAY,MAAM;IAAY,aAAa,YAAY,KAAK;GAAE;GACnF,MAAM,kBAAkB,KAAK,QAAQ,SAChC,CAAC,2BAA2B,IAC5B,CAAC,6BAA6B,8BAA8B;GACjE,IAAI,iBAAiB,MAAM,SAAS,OAAO,KAAK,QAAQ,MAAM,OAAO,iBAAiB,MAAM,UAAU;GACtG,IAAI,aAAa,eAAe;GAChC,iBAAiB;IAAE,MAAM,eAAe;IAAM,YAAY,eAAe;GAAW;GAEpF,MAAM,aAAwC;IAC5C,YAAY,MAAM;IAClB,SAAS;KACP,aAAa,YAAY,KAAK;KAC9B,gBAAgB,eAAe,KAAK;KACpC,GAAI,SAAS,EAAE,OAAO,IAAI,CAAC;IAC7B;GACF;GAEA,MAAM,mBAAmB,IAAI,wBAAwB;GACrD,MAAM,mBAAmB,wBAAwB,iBAAiB,WAAW,UAAU;GACvF,MAAM,iBAAiB,iBAAiB,YAAY,wBAAwB,WAAW,CAAC;GAExF,MAAM,SAAS,IAAI,mBAAmB,MAAM,UAAU;GACtD,IAAI;GACJ,IAAI;IACF,UAAU,MAAM,OAAO,sBAAsB,eAAe,YAAY,WAAW,YAAY;KAC7F;KACA,KAAK;IACP,CAAC;GACH,UAAU;IAER,aAAa;GACf;GACA,IAAI,KAAK,QAAQ,QAAQ;IACvB,KAAK,aAAa,QAAQ,WAAW,QAAQ,QAAQ,MAAM,KAAK;IAChE,OAAO;GACT;GAEA,IAAI,SAAS,MAAM,OAAO,yBAAyB,eAAe,YAAY,QAAQ,SAAS;GAC/F,IAAI,iBAAiB;GACrB,MAAM,WAAW,KAAK,IAAI,IAAI;GAC9B,OAAO,CAAC,gCAAgC,OAAO,QAAQ,MAAM,GAAG;IAC9D,IAAI,KAAK,IAAI,KAAK,UAChB,MAAM,IAAI,MACR,iCAAiC,OAAO,QAAQ,GAAG,0CAA0C,OAAO,QAAQ,GAAG,IACjH;IAEF,IAAI,KAAK,QAAQ,iBAAiB,UAAU,OAAO,QAAQ,WAAW,gBAAgB;KACpF,QAAQ,OAAO,MACb,GAAG,OAAO,QAAQ,GAAG,IAAI,OAAO,QAAQ,SAAS,OAAO,QAAQ,cAAc,KAAK,OAAO,QAAQ,YAAY,KAAK,GAAG,GACxH;KACA,iBAAiB,OAAO,QAAQ;IAClC;IACA,MAAM,MAAM,GAAK;IACjB,IAAI;KACF,SAAS,MAAM,OAAO,yBAAyB,eAAe,YAAY,QAAQ,SAAS;IAC7F,SAAS,OAAO;KACd,IAAI,EAAE,iBAAiB,sBAAsB,MAAM,WAAW,KAAK,MAAM;KACzE,IAAI,eAAe,SAAS,OAAO,MAAM;KACzC,IAAI,eAAe,SAAS,SAC1B,KAAK,KAAK,eAAe,4BAA4B,KAAK;KAE5D,iBAAiB,MAAM,SAAS,OAC9B,eAAe,MACf,OACA,CAAC,8BAA8B,GAC/B,OACA,UACF;KACA,SAAS,MAAM,OAAO,yBAAyB,eAAe,YAAY,QAAQ,SAAS;IAC7F;GACF;GAEA,iBAAiB,MAAM,gBAAgB;GAEvC,IAAI,+BAA+B,OAAO,QAAQ,MAAM,GAAG;IACzD,IAAI;IACJ,IAAI;KACF,MAAM,KAAK,KAAK,sBAAsB,aAAa,KAAK;IAC1D,SAAS,OAAO;KACd,iBAAiB,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;IACxE;IACA,KAAK,cAAc,QAAQ,MAAM,OAAO,cAAc;IACtD,OAAO;GACT;GAEA,KAAK,cAAc,QAAQ,MAAM,KAAK;GACtC,OAAO;EACT,SAAS,OAAO;GACd,QAAQ,OAAO,MAAM,GAAG,0BAA0B,KAAK,EAAE,GAAG;GAC5D,OAAO;EACT;CACF;CAEA,AAAQ,aAAa,WAAmB,QAA+B,eAA6B;EAClG,IAAI,KAAK,QAAQ,iBAAiB,QAAQ;GACxC,QAAQ,OAAO,MACb,GAAG,KAAK,UAAU;IAChB,IAAI;IACJ,WAAW,KAAK,QAAQ;IACxB,UAAU;IACV;IACA;GACF,CAAC,EAAE,GACL;GACA;EACF;EACA,QAAQ,OAAO,MACb,GAAG,KAAK,QAAQ,UAAU,WAAW,UAAU,OAAO,KAAK,QAAQ,YAAY,GAAG,KAAK,QAAQ,eAAe,IAAI,OAAO,IAC3H;CACF;CAEA,AAAQ,cAAc,QAA+B,eAAuB,gBAA+B;EACzG,MAAM,SAAS,8BAA8B;GAC3C;GACA;GACA,cAAc,KAAK,QAAQ;GAC3B,cAAc;IACZ,MAAM;IACN,WAAW,KAAK,QAAQ;IACxB,aAAa,KAAK,QAAQ;IAC1B,gBAAgB,KAAK,QAAQ;GAC/B;GACA,GAAI,iBAAiB,EAAE,wBAAwB,eAAe,IAAI,CAAC;EACrE,CAAC;EACD,QAAQ,OAAO,MAAM,OAAO,MAAM;EAClC,IAAI,OAAO,QAAQ,QAAQ,OAAO,MAAM,OAAO,MAAM;CACvD;AACF;AAEA,SAAS,MAAM,cAAqC;CAClD,OAAO,IAAI,SAAS,YAAY,WAAW,SAAS,YAAY,CAAC;AACnE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PostinstallCandidateBuilder.d.ts","names":[],"sources":["../../src/commands/PostinstallCandidateBuilder.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;cAqBa;EACJ,MACL,MAAM,iBACN,MAAM,aACN,UAAU,UACV,iBAAiB,sBAChB;;EAoBI,oBAAoB,UAAU"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import * as path$1 from "node:path";
|
|
2
|
-
|
|
3
|
-
//#region src/commands/PostinstallCandidateBuilder.ts
|
|
4
|
-
/**
|
|
5
|
-
* Builds the {@link PostinstallCandidate} list that the postinstall
|
|
6
|
-
* orchestrator consumes after an installer run.
|
|
7
|
-
*
|
|
8
|
-
* Rules:
|
|
9
|
-
* * Only `add` and `update` actions produce candidates (unchanged/remove never run postinstall).
|
|
10
|
-
* * `pluginRoot` is derived from the action's declared install `path` resolved
|
|
11
|
-
* against the manifest root — matching what the extractor wrote to disk.
|
|
12
|
-
* * `registry` is sourced from the lockfile entry; if the lockfile lacks the
|
|
13
|
-
* package (shouldn't happen post-install, but be defensive), the action is
|
|
14
|
-
* dropped.
|
|
15
|
-
*
|
|
16
|
-
* This adapter lives in the CLI rather than in `@uapkg/uapkg/postinstall/`
|
|
17
|
-
* to keep the postinstall subsystem independent of `@uapkg/installer`.
|
|
18
|
-
*/
|
|
19
|
-
var PostinstallCandidateBuilder = class {
|
|
20
|
-
build(root, plan, lockfile, installedNames) {
|
|
21
|
-
const lockPackages = lockfile.packages;
|
|
22
|
-
const candidates = [];
|
|
23
|
-
for (const action of plan.actions) {
|
|
24
|
-
if (action.type !== "add" && action.type !== "update") continue;
|
|
25
|
-
if (installedNames && !installedNames.has(action.packageName)) continue;
|
|
26
|
-
const registry = lockPackages[action.packageName]?.registry ?? action.registry;
|
|
27
|
-
if (!registry) continue;
|
|
28
|
-
candidates.push({
|
|
29
|
-
packageName: action.packageName,
|
|
30
|
-
registry,
|
|
31
|
-
pluginRoot: path$1.join(root.cwd, action.path)
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
return candidates;
|
|
35
|
-
}
|
|
36
|
-
/** Convenience: returns `'project' | 'plugin'` for the orchestrator's input. */
|
|
37
|
-
resolveManifestType(manifest) {
|
|
38
|
-
return manifest.kind === "project" ? "project" : "plugin";
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
//#endregion
|
|
43
|
-
export { PostinstallCandidateBuilder };
|
|
44
|
-
//# sourceMappingURL=PostinstallCandidateBuilder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PostinstallCandidateBuilder.js","names":["path"],"sources":["../../src/commands/PostinstallCandidateBuilder.ts"],"sourcesContent":["import * as path from 'node:path';\nimport type { InstallPlan } from '@uapkg/installer';\nimport type { Lockfile, Manifest } from '@uapkg/package-manifest-schema';\nimport type { CompositionRoot } from '../app/CompositionRoot.js';\nimport type { PostinstallCandidate } from '../postinstall/runner/PostinstallOrchestrator.js';\n\n/**\n * Builds the {@link PostinstallCandidate} list that the postinstall\n * orchestrator consumes after an installer run.\n *\n * Rules:\n * * Only `add` and `update` actions produce candidates (unchanged/remove never run postinstall).\n * * `pluginRoot` is derived from the action's declared install `path` resolved\n * against the manifest root — matching what the extractor wrote to disk.\n * * `registry` is sourced from the lockfile entry; if the lockfile lacks the\n * package (shouldn't happen post-install, but be defensive), the action is\n * dropped.\n *\n * This adapter lives in the CLI rather than in `@uapkg/uapkg/postinstall/`\n * to keep the postinstall subsystem independent of `@uapkg/installer`.\n */\nexport class PostinstallCandidateBuilder {\n public build(\n root: CompositionRoot,\n plan: InstallPlan,\n lockfile: Lockfile,\n installedNames?: ReadonlySet<string>,\n ): PostinstallCandidate[] {\n const lockPackages = lockfile.packages as Record<string, { registry: string }>;\n const candidates: PostinstallCandidate[] = [];\n for (const action of plan.actions) {\n if (action.type !== 'add' && action.type !== 'update') continue;\n // Failed/skipped branches never run postinstall.\n if (installedNames && !installedNames.has(action.packageName)) continue;\n const locked = lockPackages[action.packageName];\n const registry = locked?.registry ?? action.registry;\n if (!registry) continue;\n candidates.push({\n packageName: action.packageName,\n registry: registry as string,\n pluginRoot: path.join(root.cwd, action.path),\n });\n }\n return candidates;\n }\n\n /** Convenience: returns `'project' | 'plugin'` for the orchestrator's input. */\n public resolveManifestType(manifest: Manifest): 'project' | 'plugin' {\n return manifest.kind === 'project' ? 'project' : 'plugin';\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAqBA,IAAa,8BAAb,MAAyC;CACvC,AAAO,MACL,MACA,MACA,UACA,gBACwB;EACxB,MAAM,eAAe,SAAS;EAC9B,MAAM,aAAqC,CAAC;EAC5C,KAAK,MAAM,UAAU,KAAK,SAAS;GACjC,IAAI,OAAO,SAAS,SAAS,OAAO,SAAS,UAAU;GAEvD,IAAI,kBAAkB,CAAC,eAAe,IAAI,OAAO,WAAW,GAAG;GAE/D,MAAM,WADS,aAAa,OAAO,YACZ,EAAE,YAAY,OAAO;GAC5C,IAAI,CAAC,UAAU;GACf,WAAW,KAAK;IACd,aAAa,OAAO;IACV;IACV,YAAYA,OAAK,KAAK,KAAK,KAAK,OAAO,IAAI;GAC7C,CAAC;EACH;EACA,OAAO;CACT;;CAGA,AAAO,oBAAoB,UAA0C;EACnE,OAAO,SAAS,SAAS,YAAY,YAAY;CACnD;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectGetNameCommand.d.ts","names":[],"sources":["../../src/commands/ProjectGetNameCommand.ts"],"mappings":";;;;;;;;KASY,+BAA+B;cAQ9B,iCAAiC;mBACR;EAApC,YAAoC,MAAM;EAE7B,WAAW"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ManifestReader } from "@uapkg/package-manifest";
|
|
2
|
-
|
|
3
|
-
//#region src/commands/ProjectGetNameCommand.ts
|
|
4
|
-
var ProjectGetNameCommand = class {
|
|
5
|
-
root;
|
|
6
|
-
constructor(root) {
|
|
7
|
-
this.root = root;
|
|
8
|
-
}
|
|
9
|
-
async execute() {
|
|
10
|
-
const result = await new ManifestReader().read(this.root.cwd);
|
|
11
|
-
if (!result.ok) {
|
|
12
|
-
this.root.diagnostics.reportAll(result.diagnostics);
|
|
13
|
-
return 1;
|
|
14
|
-
}
|
|
15
|
-
if (result.value.kind !== "project") {
|
|
16
|
-
process.stderr.write(`[uapkg] Expected manifest kind 'project', received '${result.value.kind}'\n`);
|
|
17
|
-
return 1;
|
|
18
|
-
}
|
|
19
|
-
process.stdout.write(`${String(result.value.name)}\n`);
|
|
20
|
-
return 0;
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
//#endregion
|
|
25
|
-
export { ProjectGetNameCommand };
|
|
26
|
-
//# sourceMappingURL=ProjectGetNameCommand.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectGetNameCommand.js","names":[],"sources":["../../src/commands/ProjectGetNameCommand.ts"],"sourcesContent":["import { ManifestReader } from '@uapkg/package-manifest';\nimport type { CompositionRoot } from '../app/CompositionRoot.js';\nimport type { Command } from './Command.js';\n\n/**\n * Options for {@link ProjectGetNameCommand}. Reserved for future expansion\n * (e.g. alternate output format); today the command is fully parameterized\n * by {@link CompositionRoot}.\n */\nexport type ProjectGetNameCommandOptions = Record<string, never>;\n\n// ---------------------------------------------------------------------------\n// ProjectGetNameCommand — prints the `name` field of the current project\n// manifest to stdout. Fails with exit code 1 if the manifest is absent, not\n// a project, or invalid. Intended for shell wrapping in CI scripts.\n// ---------------------------------------------------------------------------\n\nexport class ProjectGetNameCommand implements Command {\n public constructor(private readonly root: CompositionRoot) {}\n\n public async execute(): Promise<number> {\n const result = await new ManifestReader().read(this.root.cwd);\n if (!result.ok) {\n this.root.diagnostics.reportAll(result.diagnostics);\n return 1;\n }\n if (result.value.kind !== 'project') {\n process.stderr.write(`[uapkg] Expected manifest kind 'project', received '${result.value.kind}'\\n`);\n return 1;\n }\n process.stdout.write(`${String(result.value.name)}\\n`);\n return 0;\n }\n}\n"],"mappings":";;;AAiBA,IAAa,wBAAb,MAAsD;CAChB;CAApC,AAAO,YAAY,AAAiB,MAAuB;EAAvB;CAAwB;CAE5D,MAAa,UAA2B;EACtC,MAAM,SAAS,MAAM,IAAI,eAAe,CAAC,CAAC,KAAK,KAAK,KAAK,GAAG;EAC5D,IAAI,CAAC,OAAO,IAAI;GACd,KAAK,KAAK,YAAY,UAAU,OAAO,WAAW;GAClD,OAAO;EACT;EACA,IAAI,OAAO,MAAM,SAAS,WAAW;GACnC,QAAQ,OAAO,MAAM,uDAAuD,OAAO,MAAM,KAAK,IAAI;GAClG,OAAO;EACT;EACA,QAAQ,OAAO,MAAM,GAAG,OAAO,OAAO,MAAM,IAAI,EAAE,GAAG;EACrD,OAAO;CACT;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PublishCommand.d.ts","names":[],"sources":["../../src/commands/PublishCommand.ts"],"mappings":";;;;;;UAsCiB;WACN;WACA;WACA;WACA;WACA;WACA;WACA,MAAM;WACN;WACA,cAAc;;;;;;;;cASZ,0BAA0B;mBAElB;mBACA;EAFnB,YACmB,MAAM,iBACN,SAAS;EAGf,WAAW;UAkLV;UA0BA;UAeN;UAQA;;;iBAcY,wBAAwB,uBAAuB,QAAQ"}
|
|
@@ -1,259 +0,0 @@
|
|
|
1
|
-
import { ControlPlaneError } from "../control-plane/ControlPlaneTypes.js";
|
|
2
|
-
import { ControlPlaneClient } from "../control-plane/ControlPlaneClient.js";
|
|
3
|
-
import { describeControlPlaneError } from "../control-plane/AccountManager.js";
|
|
4
|
-
import { AuthenticationSelector } from "../control-plane/AuthenticationSelector.js";
|
|
5
|
-
import { PublishIdempotencyStore, createGitHubActionsPublishIdempotencyKey } from "../control-plane/PublishIdempotencyStore.js";
|
|
6
|
-
import { InkPromptService } from "../prompts/InkPromptService.js";
|
|
7
|
-
import { formatRegistryRequestTerminal, isRegistryRequestSuccessStatus, isRegistryRequestTerminalStatus } from "../reporting/RegistryRequestTerminalFormatter.js";
|
|
8
|
-
import { ArtifactObserver } from "../control-plane/ArtifactObserver.js";
|
|
9
|
-
import { publishRequestDiagnosticForError } from "../control-plane/PublishRequestErrorMapper.js";
|
|
10
|
-
import { isAbsolute, join } from "node:path";
|
|
11
|
-
import { execFile } from "node:child_process";
|
|
12
|
-
import { existsSync } from "node:fs";
|
|
13
|
-
import { randomUUID } from "node:crypto";
|
|
14
|
-
import { readFile } from "node:fs/promises";
|
|
15
|
-
import { readPackageClaimsFromArchive } from "@uapkg/package-claims";
|
|
16
|
-
import { promisify } from "node:util";
|
|
17
|
-
import { getRegistryRepoPath } from "@uapkg/registry-core";
|
|
18
|
-
import { RegistryMetaSchema } from "@uapkg/registry-schema";
|
|
19
|
-
|
|
20
|
-
//#region src/commands/PublishCommand.ts
|
|
21
|
-
const execFileAsync = promisify(execFile);
|
|
22
|
-
const PUBLISH_WATCH_TIMEOUT_MS = 18e5;
|
|
23
|
-
/**
|
|
24
|
-
* Artifact-first publish (PS-REQ-002): the CLI observes the exact release
|
|
25
|
-
* artifact (download or `--asset-path`), reads packaged claims from it, and
|
|
26
|
-
* submits the route-derived publish operation. The packaged archive — never
|
|
27
|
-
* the working tree — is what gets published.
|
|
28
|
-
*/
|
|
29
|
-
var PublishCommand = class {
|
|
30
|
-
root;
|
|
31
|
-
options;
|
|
32
|
-
constructor(root, options) {
|
|
33
|
-
this.root = root;
|
|
34
|
-
this.options = options;
|
|
35
|
-
}
|
|
36
|
-
async execute() {
|
|
37
|
-
try {
|
|
38
|
-
const manifestResult = await this.root.packageManifest.readManifest();
|
|
39
|
-
if (!manifestResult.ok) throw new Error(manifestResult.diagnostics[0]?.message ?? "Unable to read uapkg.json.");
|
|
40
|
-
const manifest = manifestResult.value;
|
|
41
|
-
const registryAlias = this.options.registry ?? manifest.publish?.registry;
|
|
42
|
-
const trust = await this.root.registryTrustResolver.resolve(registryAlias);
|
|
43
|
-
const source = await this.resolveSource(manifest.version, manifest.publish);
|
|
44
|
-
const observer = new ArtifactObserver();
|
|
45
|
-
const artifact = this.options.assetPath ? await observer.observeLocalArchive(resolveAssetPath(this.root.cwd, this.options.assetPath)) : await observer.downloadReleaseAsset(source.repository, source.releaseTag, source.assetName);
|
|
46
|
-
try {
|
|
47
|
-
const claimsResult = await readPackageClaimsFromArchive(artifact.archivePath);
|
|
48
|
-
if (!claimsResult.ok) throw new Error(claimsResult.diagnostics[0]?.message ?? "Unable to read the packaged uapkg.json from the artifact.");
|
|
49
|
-
const claims = claimsResult.value;
|
|
50
|
-
if (this.options.outputFormat === "text" && (claims.name !== manifest.name || claims.version !== manifest.version)) process.stderr.write(`Publishing ${claims.name}@${claims.version} from the packaged artifact (local manifest says ${manifest.name}@${manifest.version}).\n`);
|
|
51
|
-
if (await readTrustedRegistryType(trust.cacheShortId) === "public" && claims.private) throw new Error(`"${claims.name}" is marked private in its packaged manifest; a public UAPKG registry does not accept private packages.`);
|
|
52
|
-
const scopedOwner = scopedOwnerName(claims.name);
|
|
53
|
-
const configuredOwner = normalizeOwner(this.options.owner ?? manifest.publish?.owner);
|
|
54
|
-
if (scopedOwner && configuredOwner && configuredOwner.toLowerCase() !== scopedOwner.toLowerCase()) throw new Error(`Package "${claims.name}" belongs to the "${scopedOwner}" namespace; --owner cannot select "${configuredOwner}".`);
|
|
55
|
-
const owner = scopedOwner ?? configuredOwner;
|
|
56
|
-
const selector = new AuthenticationSelector(this.root.accountManager, new InkPromptService());
|
|
57
|
-
const oidcTarget = {
|
|
58
|
-
registryId: trust.registryId,
|
|
59
|
-
packageName: claims.name
|
|
60
|
-
};
|
|
61
|
-
const requestedScopes = this.options.detach ? ["publishing.request.create"] : ["publishing.request.create", "publishing.request.read.self"];
|
|
62
|
-
let authentication = await selector.select(this.options.auth, trust, requestedScopes, true, oidcTarget);
|
|
63
|
-
let requestOtp = authentication.otp;
|
|
64
|
-
authentication = {
|
|
65
|
-
kind: authentication.kind,
|
|
66
|
-
credential: authentication.credential
|
|
67
|
-
};
|
|
68
|
-
const submission = {
|
|
69
|
-
registryId: trust.registryId,
|
|
70
|
-
...owner ? { ownerOrganizationName: owner } : {},
|
|
71
|
-
payload: {
|
|
72
|
-
packageName: claims.name,
|
|
73
|
-
packageVersion: claims.version,
|
|
74
|
-
source,
|
|
75
|
-
observedIntegrity: {
|
|
76
|
-
sha256: artifact.sha256,
|
|
77
|
-
sizeBytes: artifact.sizeBytes
|
|
78
|
-
},
|
|
79
|
-
claims
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
const idempotencyStore = new PublishIdempotencyStore();
|
|
83
|
-
const submissionDigest = PublishIdempotencyStore.submissionDigest("publish", submission);
|
|
84
|
-
const usesActionsIdempotency = authentication.kind === "oidc";
|
|
85
|
-
const idempotencyKey = usesActionsIdempotency ? createGitHubActionsPublishIdempotencyKey({
|
|
86
|
-
registryId: trust.registryId,
|
|
87
|
-
packageName: claims.name,
|
|
88
|
-
packageVersion: claims.version,
|
|
89
|
-
artifactSha256: artifact.sha256
|
|
90
|
-
}) : idempotencyStore.getOrCreate(submissionDigest, () => randomUUID());
|
|
91
|
-
const client = new ControlPlaneClient(trust.apiBaseUrl);
|
|
92
|
-
let created;
|
|
93
|
-
try {
|
|
94
|
-
created = await client.submitRegistryRequest(authentication.credential, "publish", submission, {
|
|
95
|
-
idempotencyKey,
|
|
96
|
-
otp: requestOtp
|
|
97
|
-
});
|
|
98
|
-
} catch (error) {
|
|
99
|
-
if (this.options.outputFormat === "json") throw error;
|
|
100
|
-
this.root.diagnostics.reportOne(publishRequestDiagnosticForError(error, {
|
|
101
|
-
packageName: claims.name,
|
|
102
|
-
packageVersion: claims.version,
|
|
103
|
-
registryAlias: trust.alias,
|
|
104
|
-
registryName: trust.registryName,
|
|
105
|
-
registryIssuer: trust.issuer,
|
|
106
|
-
credentialKind: authentication.kind,
|
|
107
|
-
...owner ? { requestedOwner: owner } : {},
|
|
108
|
-
repository: source.repository
|
|
109
|
-
}));
|
|
110
|
-
return 1;
|
|
111
|
-
} finally {
|
|
112
|
-
requestOtp = void 0;
|
|
113
|
-
}
|
|
114
|
-
if (this.options.detach) {
|
|
115
|
-
this.printCreated(created.requestId, created.status, trust.alias);
|
|
116
|
-
return 0;
|
|
117
|
-
}
|
|
118
|
-
const readRequest = async () => {
|
|
119
|
-
try {
|
|
120
|
-
return await client.getRegistryRequestDetail(authentication.credential, created.requestId);
|
|
121
|
-
} catch (error) {
|
|
122
|
-
if (!(error instanceof ControlPlaneError) || error.status !== 401) throw error;
|
|
123
|
-
if (authentication.kind === "gat") throw error;
|
|
124
|
-
if (authentication.kind === "login") this.root.accountManager.invalidateAccessCredentials(trust);
|
|
125
|
-
authentication = await selector.select(authentication.kind, trust, ["publishing.request.read.self"], false, oidcTarget);
|
|
126
|
-
return client.getRegistryRequestDetail(authentication.credential, created.requestId);
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
let detail = await readRequest();
|
|
130
|
-
let previousStatus = "";
|
|
131
|
-
const deadline = Date.now() + PUBLISH_WATCH_TIMEOUT_MS;
|
|
132
|
-
while (!isRegistryRequestTerminalStatus(detail.request.status)) {
|
|
133
|
-
if (Date.now() >= deadline) throw new Error(`Timed out waiting for publishing request ${detail.request.id}. Check it with \`uapkg requests status ${detail.request.id}\`.`);
|
|
134
|
-
if (this.options.outputFormat === "text" && detail.request.status !== previousStatus) {
|
|
135
|
-
process.stdout.write(`${detail.request.id}: ${detail.request.status}${detail.request.currentStep ? ` (${detail.request.currentStep})` : ""}\n`);
|
|
136
|
-
previousStatus = detail.request.status;
|
|
137
|
-
}
|
|
138
|
-
await delay(2e3);
|
|
139
|
-
detail = await readRequest();
|
|
140
|
-
}
|
|
141
|
-
if (!usesActionsIdempotency) idempotencyStore.clear(submissionDigest);
|
|
142
|
-
if (isRegistryRequestSuccessStatus(detail.request.status)) {
|
|
143
|
-
let refreshWarning;
|
|
144
|
-
try {
|
|
145
|
-
await this.root.registryTrustResolver.forceRefresh(trust);
|
|
146
|
-
} catch (error) {
|
|
147
|
-
refreshWarning = error instanceof Error ? error.message : String(error);
|
|
148
|
-
}
|
|
149
|
-
this.printTerminal(detail, trust.alias, refreshWarning);
|
|
150
|
-
return 0;
|
|
151
|
-
}
|
|
152
|
-
this.printTerminal(detail, trust.alias);
|
|
153
|
-
return 1;
|
|
154
|
-
} finally {
|
|
155
|
-
await artifact.cleanup();
|
|
156
|
-
}
|
|
157
|
-
} catch (error) {
|
|
158
|
-
process.stderr.write(`${describeControlPlaneError(error)}\n`);
|
|
159
|
-
return 1;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
async resolveSource(packageVersion, manifestPublish) {
|
|
163
|
-
const repository = normalizeGitHubRepository(this.options.repository ?? manifestPublish?.repository ?? await this.gitOrigin());
|
|
164
|
-
const releaseTag = (this.options.tag ?? `v${packageVersion}`).trim();
|
|
165
|
-
const assetName = (this.options.asset ?? manifestPublish?.asset ?? "package.tgz").trim();
|
|
166
|
-
if (!releaseTag) throw new Error("The GitHub Release tag cannot be empty.");
|
|
167
|
-
if (!assetName || assetName.includes("/") || assetName.includes("\\")) throw new Error("The GitHub Release asset must be a file name, not a path.");
|
|
168
|
-
return {
|
|
169
|
-
type: "github_release",
|
|
170
|
-
repository,
|
|
171
|
-
releaseTag,
|
|
172
|
-
assetName
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
async gitOrigin() {
|
|
176
|
-
const git = this.root.config.get("git") ?? "git";
|
|
177
|
-
try {
|
|
178
|
-
const { stdout } = await execFileAsync(git, [
|
|
179
|
-
"remote",
|
|
180
|
-
"get-url",
|
|
181
|
-
"origin"
|
|
182
|
-
], {
|
|
183
|
-
cwd: this.root.cwd,
|
|
184
|
-
timeout: 1e4
|
|
185
|
-
});
|
|
186
|
-
return stdout.trim();
|
|
187
|
-
} catch (error) {
|
|
188
|
-
throw new Error("Unable to derive the GitHub repository from remote \"origin\". Use --repository.", { cause: error });
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
printCreated(requestId, status, registryAlias) {
|
|
192
|
-
if (this.options.outputFormat === "json") {
|
|
193
|
-
process.stdout.write(`${JSON.stringify({
|
|
194
|
-
ok: true,
|
|
195
|
-
registry: registryAlias,
|
|
196
|
-
requestId,
|
|
197
|
-
status
|
|
198
|
-
})}\n`);
|
|
199
|
-
return;
|
|
200
|
-
}
|
|
201
|
-
process.stdout.write(`Publishing request ${requestId} submitted to "${registryAlias}" (${status}).\n`);
|
|
202
|
-
}
|
|
203
|
-
printTerminal(detail, registryAlias, refreshWarning) {
|
|
204
|
-
const output = formatRegistryRequestTerminal({
|
|
205
|
-
detail,
|
|
206
|
-
registryAlias,
|
|
207
|
-
outputFormat: this.options.outputFormat,
|
|
208
|
-
presentation: { kind: "publish" },
|
|
209
|
-
...refreshWarning ? { registryRefreshWarning: refreshWarning } : {}
|
|
210
|
-
});
|
|
211
|
-
process.stdout.write(output.stdout);
|
|
212
|
-
if (output.stderr) process.stderr.write(output.stderr);
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
|
-
/** Reads the installer-trusted registry type from the projected registry snapshot. */
|
|
216
|
-
async function readTrustedRegistryType(cacheShortId) {
|
|
217
|
-
const metaPath = join(getRegistryRepoPath(cacheShortId), ".uapkg", "registry.meta.json");
|
|
218
|
-
if (!existsSync(metaPath)) throw new Error("Trusted registry metadata is missing; registry policy cannot be determined.");
|
|
219
|
-
try {
|
|
220
|
-
const raw = await readFile(metaPath, "utf8");
|
|
221
|
-
const parsed = RegistryMetaSchema.safeParse(JSON.parse(raw));
|
|
222
|
-
if (!parsed.success) throw new Error("metadata does not match a supported registry schema");
|
|
223
|
-
return parsed.data.registry.registryType;
|
|
224
|
-
} catch (error) {
|
|
225
|
-
throw new Error("Trusted registry metadata is invalid or uses an unsupported schema version.", { cause: error });
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
function resolveAssetPath(cwd, assetPath) {
|
|
229
|
-
return isAbsolute(assetPath) ? assetPath : join(cwd, assetPath);
|
|
230
|
-
}
|
|
231
|
-
function normalizeGitHubRepository(input) {
|
|
232
|
-
let value = input.trim();
|
|
233
|
-
const scp = value.match(/^git@github\.com:([^/]+)\/(.+)$/i);
|
|
234
|
-
if (scp) value = `${scp[1]}/${scp[2]}`;
|
|
235
|
-
if (value.includes("://")) {
|
|
236
|
-
const url = new URL(value);
|
|
237
|
-
if (url.hostname.toLowerCase() !== "github.com") throw new Error("Publishing sources must be hosted on github.com in UAPKG v1.");
|
|
238
|
-
value = url.pathname.replace(/^\/+/, "");
|
|
239
|
-
}
|
|
240
|
-
value = value.replace(/\.git$/i, "").replace(/\/+$/, "");
|
|
241
|
-
if (!/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(value)) throw new Error("Expected a GitHub repository in owner/repository form.");
|
|
242
|
-
return value.toLowerCase();
|
|
243
|
-
}
|
|
244
|
-
function scopedOwnerName(packageName) {
|
|
245
|
-
return packageName.match(/^@([^/]+)\/[^/]+$/)?.[1]?.toLowerCase();
|
|
246
|
-
}
|
|
247
|
-
function normalizeOwner(value) {
|
|
248
|
-
if (value === void 0) return void 0;
|
|
249
|
-
const owner = value.trim().toLowerCase();
|
|
250
|
-
if (!/^[a-z0-9][a-z0-9-_]*$/.test(owner)) throw new Error("The publish owner must be a valid UAPKG organization name.");
|
|
251
|
-
return owner;
|
|
252
|
-
}
|
|
253
|
-
function delay(milliseconds) {
|
|
254
|
-
return new Promise((resolve) => setTimeout(resolve, milliseconds));
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
//#endregion
|
|
258
|
-
export { PublishCommand, readTrustedRegistryType };
|
|
259
|
-
//# sourceMappingURL=PublishCommand.js.map
|