@uapkg/cli 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/CompositionRoot.d.ts +36 -33
- package/dist/app/CompositionRoot.d.ts.map +1 -1
- package/dist/app/CompositionRoot.js +91 -109
- package/dist/app/CompositionRoot.js.map +1 -1
- package/dist/app/UAPKGApplication.d.ts +6 -3
- package/dist/app/UAPKGApplication.d.ts.map +1 -1
- package/dist/app/UAPKGApplication.js +155 -169
- package/dist/app/UAPKGApplication.js.map +1 -1
- package/dist/build/BuildMetadata.d.ts +9 -6
- package/dist/build/BuildMetadata.d.ts.map +1 -1
- package/dist/build/BuildMetadata.js +2 -2
- package/dist/cli/UAPKGCommandLine.d.ts +259 -257
- package/dist/cli/UAPKGCommandLine.d.ts.map +1 -1
- package/dist/cli/UAPKGCommandLine.js +248 -239
- package/dist/cli/UAPKGCommandLine.js.map +1 -1
- package/dist/cli/parseCommandLine.d.ts +5 -1
- package/dist/cli/parseCommandLine.d.ts.map +1 -1
- package/dist/cli/parseCommandLine.js +8 -3
- package/dist/cli/parseCommandLine.js.map +1 -1
- package/dist/cli/parsing/UAPKGCommandLineParser.d.ts +9 -6
- package/dist/cli/parsing/UAPKGCommandLineParser.d.ts.map +1 -1
- package/dist/cli/parsing/UAPKGCommandLineParser.js +23 -31
- package/dist/cli/parsing/UAPKGCommandLineParser.js.map +1 -1
- package/dist/cli/parsing/UAPKGParserRegistry.d.ts +12 -9
- package/dist/cli/parsing/UAPKGParserRegistry.d.ts.map +1 -1
- package/dist/cli/parsing/UAPKGParserRegistry.js +53 -50
- package/dist/cli/parsing/UAPKGParserRegistry.js.map +1 -1
- package/dist/cli/parsing/contracts/UAPKGCommandModule.d.ts +9 -6
- package/dist/cli/parsing/contracts/UAPKGCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/contracts/UAPKGCommandModule.js +1 -2
- package/dist/cli/parsing/modules/AddCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/AddCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/AddCommandModule.js +49 -36
- package/dist/cli/parsing/modules/AddCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/ConfigCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/ConfigCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/ConfigCommandModule.js +87 -83
- package/dist/cli/parsing/modules/ConfigCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/InitCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/InitCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/InitCommandModule.js +25 -22
- package/dist/cli/parsing/modules/InitCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/InstallCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/InstallCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/InstallCommandModule.js +36 -28
- package/dist/cli/parsing/modules/InstallCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/LifecycleCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/LifecycleCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/LifecycleCommandModule.js +78 -50
- package/dist/cli/parsing/modules/LifecycleCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/ListCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/ListCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/ListCommandModule.js +26 -15
- package/dist/cli/parsing/modules/ListCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/LoginCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/LoginCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/LoginCommandModule.js +34 -33
- package/dist/cli/parsing/modules/LoginCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/LogoutCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/LogoutCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/LogoutCommandModule.js +30 -28
- package/dist/cli/parsing/modules/LogoutCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/OutdatedCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/OutdatedCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/OutdatedCommandModule.js +21 -16
- package/dist/cli/parsing/modules/OutdatedCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/PackCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/PackCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/PackCommandModule.js +30 -28
- package/dist/cli/parsing/modules/PackCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/ProjectGetNameCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/ProjectGetNameCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/ProjectGetNameCommandModule.js +14 -11
- package/dist/cli/parsing/modules/ProjectGetNameCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/PublishCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/PublishCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/PublishCommandModule.js +63 -47
- package/dist/cli/parsing/modules/PublishCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/RegistryCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/RegistryCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/RegistryCommandModule.js +117 -120
- package/dist/cli/parsing/modules/RegistryCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/RemoveCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/RemoveCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/RemoveCommandModule.js +25 -14
- package/dist/cli/parsing/modules/RemoveCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/RequestsCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/RequestsCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/RequestsCommandModule.js +56 -60
- package/dist/cli/parsing/modules/RequestsCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/UpdateCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/UpdateCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/UpdateCommandModule.js +38 -25
- package/dist/cli/parsing/modules/UpdateCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/WhoamiCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/WhoamiCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/WhoamiCommandModule.js +30 -28
- package/dist/cli/parsing/modules/WhoamiCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/WhyCommandModule.d.ts +8 -5
- package/dist/cli/parsing/modules/WhyCommandModule.d.ts.map +1 -1
- package/dist/cli/parsing/modules/WhyCommandModule.js +25 -14
- package/dist/cli/parsing/modules/WhyCommandModule.js.map +1 -1
- package/dist/cli/parsing/modules/sharedOptions.d.ts +8 -5
- package/dist/cli/parsing/modules/sharedOptions.d.ts.map +1 -1
- package/dist/cli/parsing/modules/sharedOptions.js +18 -23
- package/dist/cli/parsing/modules/sharedOptions.js.map +1 -1
- package/dist/cli/runUAPKGCLI.d.ts +4 -1
- package/dist/cli/runUAPKGCLI.d.ts.map +1 -1
- package/dist/cli/runUAPKGCLI.js +10 -5
- package/dist/cli/runUAPKGCLI.js.map +1 -1
- package/dist/cli-bootstrap.d.ts +1 -2
- package/dist/cli-bootstrap.js +15 -12
- package/dist/cli-bootstrap.js.map +1 -1
- package/dist/commands/AddCommand.d.ts +19 -16
- package/dist/commands/AddCommand.d.ts.map +1 -1
- package/dist/commands/AddCommand.js +49 -53
- package/dist/commands/AddCommand.js.map +1 -1
- package/dist/commands/Command.d.ts +5 -2
- package/dist/commands/Command.d.ts.map +1 -1
- package/dist/commands/Command.js +1 -2
- package/dist/commands/ConfigCommand.d.ts +28 -25
- package/dist/commands/ConfigCommand.d.ts.map +1 -1
- package/dist/commands/ConfigCommand.js +165 -186
- package/dist/commands/ConfigCommand.js.map +1 -1
- package/dist/commands/InitCommand.d.ts +19 -16
- package/dist/commands/InitCommand.d.ts.map +1 -1
- package/dist/commands/InitCommand.js +65 -60
- package/dist/commands/InitCommand.js.map +1 -1
- package/dist/commands/InstallCommand.d.ts +16 -13
- package/dist/commands/InstallCommand.d.ts.map +1 -1
- package/dist/commands/InstallCommand.js +118 -110
- package/dist/commands/InstallCommand.js.map +1 -1
- package/dist/commands/ListCommand.d.ts +13 -10
- package/dist/commands/ListCommand.d.ts.map +1 -1
- package/dist/commands/ListCommand.js +76 -81
- package/dist/commands/ListCommand.js.map +1 -1
- package/dist/commands/LoginCommand.d.ts +17 -14
- package/dist/commands/LoginCommand.d.ts.map +1 -1
- package/dist/commands/LoginCommand.js +66 -72
- package/dist/commands/LoginCommand.js.map +1 -1
- package/dist/commands/LogoutCommand.d.ts +15 -12
- package/dist/commands/LogoutCommand.d.ts.map +1 -1
- package/dist/commands/LogoutCommand.js +36 -37
- package/dist/commands/LogoutCommand.js.map +1 -1
- package/dist/commands/OutdatedCommand.d.ts +12 -9
- package/dist/commands/OutdatedCommand.d.ts.map +1 -1
- package/dist/commands/OutdatedCommand.js +41 -40
- package/dist/commands/OutdatedCommand.js.map +1 -1
- package/dist/commands/PackCommand.d.ts +13 -10
- package/dist/commands/PackCommand.d.ts.map +1 -1
- package/dist/commands/PackCommand.js +26 -21
- package/dist/commands/PackCommand.js.map +1 -1
- package/dist/commands/PackageLifecycleCommand.d.ts +23 -19
- package/dist/commands/PackageLifecycleCommand.d.ts.map +1 -1
- package/dist/commands/PackageLifecycleCommand.js +144 -138
- package/dist/commands/PackageLifecycleCommand.js.map +1 -1
- package/dist/commands/PostinstallCandidateBuilder.d.ts +11 -8
- package/dist/commands/PostinstallCandidateBuilder.d.ts.map +1 -1
- package/dist/commands/PostinstallCandidateBuilder.js +42 -42
- package/dist/commands/PostinstallCandidateBuilder.js.map +1 -1
- package/dist/commands/ProjectGetNameCommand.d.ts +10 -7
- package/dist/commands/ProjectGetNameCommand.d.ts.map +1 -1
- package/dist/commands/ProjectGetNameCommand.js +25 -25
- package/dist/commands/ProjectGetNameCommand.js.map +1 -1
- package/dist/commands/PublishCommand.d.ts +29 -23
- package/dist/commands/PublishCommand.d.ts.map +1 -1
- package/dist/commands/PublishCommand.js +243 -254
- package/dist/commands/PublishCommand.js.map +1 -1
- package/dist/commands/RegistryCommand.d.ts +38 -35
- package/dist/commands/RegistryCommand.d.ts.map +1 -1
- package/dist/commands/RegistryCommand.js +195 -223
- package/dist/commands/RegistryCommand.js.map +1 -1
- package/dist/commands/RemoveCommand.d.ts +14 -11
- package/dist/commands/RemoveCommand.d.ts.map +1 -1
- package/dist/commands/RemoveCommand.js +47 -54
- package/dist/commands/RemoveCommand.js.map +1 -1
- package/dist/commands/RequestsCommand.d.ts +21 -18
- package/dist/commands/RequestsCommand.d.ts.map +1 -1
- package/dist/commands/RequestsCommand.js +82 -95
- package/dist/commands/RequestsCommand.js.map +1 -1
- package/dist/commands/UpdateCommand.d.ts +29 -26
- package/dist/commands/UpdateCommand.d.ts.map +1 -1
- package/dist/commands/UpdateCommand.js +111 -111
- package/dist/commands/UpdateCommand.js.map +1 -1
- package/dist/commands/WhoamiCommand.d.ts +30 -27
- package/dist/commands/WhoamiCommand.d.ts.map +1 -1
- package/dist/commands/WhoamiCommand.js +63 -72
- package/dist/commands/WhoamiCommand.js.map +1 -1
- package/dist/commands/WhyCommand.d.ts +13 -10
- package/dist/commands/WhyCommand.d.ts.map +1 -1
- package/dist/commands/WhyCommand.js +45 -44
- package/dist/commands/WhyCommand.js.map +1 -1
- package/dist/commands/add/DependencyAddResolver.d.ts +14 -11
- package/dist/commands/add/DependencyAddResolver.d.ts.map +1 -1
- package/dist/commands/add/DependencyAddResolver.js +36 -36
- package/dist/commands/add/DependencyAddResolver.js.map +1 -1
- package/dist/control-plane/AccountManager.d.ts +96 -94
- package/dist/control-plane/AccountManager.d.ts.map +1 -1
- package/dist/control-plane/AccountManager.js +775 -967
- package/dist/control-plane/AccountManager.js.map +1 -1
- package/dist/control-plane/ArtifactObserver.d.ts +19 -16
- package/dist/control-plane/ArtifactObserver.d.ts.map +1 -1
- package/dist/control-plane/ArtifactObserver.js +73 -59
- package/dist/control-plane/ArtifactObserver.js.map +1 -1
- package/dist/control-plane/AuthMetadataStore.d.ts +16 -13
- package/dist/control-plane/AuthMetadataStore.d.ts.map +1 -1
- package/dist/control-plane/AuthMetadataStore.js +111 -113
- package/dist/control-plane/AuthMetadataStore.js.map +1 -1
- package/dist/control-plane/AuthStoragePaths.d.ts +7 -4
- package/dist/control-plane/AuthStoragePaths.d.ts.map +1 -1
- package/dist/control-plane/AuthStoragePaths.js +19 -14
- package/dist/control-plane/AuthStoragePaths.js.map +1 -1
- package/dist/control-plane/AuthenticationSelector.d.ts +21 -18
- package/dist/control-plane/AuthenticationSelector.d.ts.map +1 -1
- package/dist/control-plane/AuthenticationSelector.js +69 -63
- package/dist/control-plane/AuthenticationSelector.js.map +1 -1
- package/dist/control-plane/ControlPlaneClient.d.ts +37 -28
- package/dist/control-plane/ControlPlaneClient.d.ts.map +1 -1
- package/dist/control-plane/ControlPlaneClient.js +265 -254
- package/dist/control-plane/ControlPlaneClient.js.map +1 -1
- package/dist/control-plane/ControlPlaneEndpoints.d.ts +9 -6
- package/dist/control-plane/ControlPlaneEndpoints.d.ts.map +1 -1
- package/dist/control-plane/ControlPlaneEndpoints.js +17 -12
- package/dist/control-plane/ControlPlaneEndpoints.js.map +1 -1
- package/dist/control-plane/ControlPlaneTypes.d.ts +176 -152
- package/dist/control-plane/ControlPlaneTypes.d.ts.map +1 -1
- package/dist/control-plane/ControlPlaneTypes.js +88 -81
- package/dist/control-plane/ControlPlaneTypes.js.map +1 -1
- package/dist/control-plane/CredentialStore.d.ts +20 -18
- package/dist/control-plane/CredentialStore.d.ts.map +1 -1
- package/dist/control-plane/CredentialStore.js +66 -83
- package/dist/control-plane/CredentialStore.js.map +1 -1
- package/dist/control-plane/DPoPKeyStore.d.ts +12 -9
- package/dist/control-plane/DPoPKeyStore.d.ts.map +1 -1
- package/dist/control-plane/DPoPKeyStore.js +57 -53
- package/dist/control-plane/DPoPKeyStore.js.map +1 -1
- package/dist/control-plane/GitHubActionsOidcCredentialProvider.d.ts +37 -4
- package/dist/control-plane/GitHubActionsOidcCredentialProvider.d.ts.map +1 -1
- package/dist/control-plane/GitHubActionsOidcCredentialProvider.js +197 -63
- package/dist/control-plane/GitHubActionsOidcCredentialProvider.js.map +1 -1
- package/dist/control-plane/PublishIdempotencyStore.d.ts +25 -9
- package/dist/control-plane/PublishIdempotencyStore.d.ts.map +1 -1
- package/dist/control-plane/PublishIdempotencyStore.js +97 -68
- package/dist/control-plane/PublishIdempotencyStore.js.map +1 -1
- package/dist/control-plane/PublishRequestErrorMapper.d.ts +155 -0
- package/dist/control-plane/PublishRequestErrorMapper.d.ts.map +1 -0
- package/dist/control-plane/PublishRequestErrorMapper.js +597 -0
- package/dist/control-plane/PublishRequestErrorMapper.js.map +1 -0
- package/dist/control-plane/RegistryGrantLock.d.ts +29 -26
- package/dist/control-plane/RegistryGrantLock.d.ts.map +1 -1
- package/dist/control-plane/RegistryGrantLock.js +149 -185
- package/dist/control-plane/RegistryGrantLock.js.map +1 -1
- package/dist/control-plane/RegistryTrustResolver.d.ts +13 -10
- package/dist/control-plane/RegistryTrustResolver.d.ts.map +1 -1
- package/dist/control-plane/RegistryTrustResolver.js +97 -132
- package/dist/control-plane/RegistryTrustResolver.js.map +1 -1
- package/dist/index.d.ts +62 -39
- package/dist/index.js +60 -53
- package/dist/postinstall/api/PostinstallDsl.d.ts +24 -21
- package/dist/postinstall/api/PostinstallDsl.d.ts.map +1 -1
- package/dist/postinstall/api/PostinstallDsl.js +32 -35
- package/dist/postinstall/api/PostinstallDsl.js.map +1 -1
- package/dist/postinstall/api/definePostinstall.d.ts +5 -2
- package/dist/postinstall/api/definePostinstall.d.ts.map +1 -1
- package/dist/postinstall/api/definePostinstall.js +20 -16
- package/dist/postinstall/api/definePostinstall.js.map +1 -1
- package/dist/postinstall/index.d.ts +25 -26
- package/dist/postinstall/index.js +25 -37
- package/dist/postinstall/loader/EntryResolver.d.ts +11 -9
- package/dist/postinstall/loader/EntryResolver.d.ts.map +1 -1
- package/dist/postinstall/loader/EntryResolver.js +36 -32
- package/dist/postinstall/loader/EntryResolver.js.map +1 -1
- package/dist/postinstall/loader/EsbuildTranspiler.d.ts +6 -3
- package/dist/postinstall/loader/EsbuildTranspiler.d.ts.map +1 -1
- package/dist/postinstall/loader/EsbuildTranspiler.js +52 -56
- package/dist/postinstall/loader/EsbuildTranspiler.js.map +1 -1
- package/dist/postinstall/loader/ExportValidator.d.ts +8 -5
- package/dist/postinstall/loader/ExportValidator.d.ts.map +1 -1
- package/dist/postinstall/loader/ExportValidator.js +36 -32
- package/dist/postinstall/loader/ExportValidator.js.map +1 -1
- package/dist/postinstall/loader/ModuleImporter.d.ts +17 -14
- package/dist/postinstall/loader/ModuleImporter.d.ts.map +1 -1
- package/dist/postinstall/loader/ModuleImporter.js +50 -58
- package/dist/postinstall/loader/ModuleImporter.js.map +1 -1
- package/dist/postinstall/loader/PostinstallLoader.d.ts +22 -19
- package/dist/postinstall/loader/PostinstallLoader.d.ts.map +1 -1
- package/dist/postinstall/loader/PostinstallLoader.js +62 -58
- package/dist/postinstall/loader/PostinstallLoader.js.map +1 -1
- package/dist/postinstall/markers/MarkerBlockEditor.d.ts +19 -16
- package/dist/postinstall/markers/MarkerBlockEditor.d.ts.map +1 -1
- package/dist/postinstall/markers/MarkerBlockEditor.js +48 -44
- package/dist/postinstall/markers/MarkerBlockEditor.js.map +1 -1
- package/dist/postinstall/markers/MarkerBlockService.d.ts +10 -7
- package/dist/postinstall/markers/MarkerBlockService.d.ts.map +1 -1
- package/dist/postinstall/markers/MarkerBlockService.js +44 -44
- package/dist/postinstall/markers/MarkerBlockService.js.map +1 -1
- package/dist/postinstall/markers/MarkerIntegrityValidator.d.ts +12 -9
- package/dist/postinstall/markers/MarkerIntegrityValidator.d.ts.map +1 -1
- package/dist/postinstall/markers/MarkerIntegrityValidator.js +47 -52
- package/dist/postinstall/markers/MarkerIntegrityValidator.js.map +1 -1
- package/dist/postinstall/policy/PostinstallPolicyGate.d.ts +25 -23
- package/dist/postinstall/policy/PostinstallPolicyGate.d.ts.map +1 -1
- package/dist/postinstall/policy/PostinstallPolicyGate.js +63 -52
- package/dist/postinstall/policy/PostinstallPolicyGate.js.map +1 -1
- package/dist/postinstall/runner/PostinstallOrchestrator.d.ts +48 -45
- package/dist/postinstall/runner/PostinstallOrchestrator.d.ts.map +1 -1
- package/dist/postinstall/runner/PostinstallOrchestrator.js +172 -170
- package/dist/postinstall/runner/PostinstallOrchestrator.js.map +1 -1
- package/dist/postinstall/unreal/BuildCsInjector.d.ts +16 -13
- package/dist/postinstall/unreal/BuildCsInjector.d.ts.map +1 -1
- package/dist/postinstall/unreal/BuildCsInjector.js +58 -53
- package/dist/postinstall/unreal/BuildCsInjector.js.map +1 -1
- package/dist/postinstall/unreal/CSharpInjectionEngine.d.ts +13 -10
- package/dist/postinstall/unreal/CSharpInjectionEngine.d.ts.map +1 -1
- package/dist/postinstall/unreal/CSharpInjectionEngine.js +56 -59
- package/dist/postinstall/unreal/CSharpInjectionEngine.js.map +1 -1
- package/dist/postinstall/unreal/CSharpStructureAnalyzer.d.ts +11 -8
- package/dist/postinstall/unreal/CSharpStructureAnalyzer.d.ts.map +1 -1
- package/dist/postinstall/unreal/CSharpStructureAnalyzer.js +123 -127
- package/dist/postinstall/unreal/CSharpStructureAnalyzer.js.map +1 -1
- package/dist/postinstall/unreal/CSharpStructures.d.ts +18 -15
- package/dist/postinstall/unreal/CSharpStructures.d.ts.map +1 -1
- package/dist/postinstall/unreal/CSharpStructures.js +1 -2
- package/dist/postinstall/unreal/CSharpWrapperFactory.d.ts +7 -4
- package/dist/postinstall/unreal/CSharpWrapperFactory.d.ts.map +1 -1
- package/dist/postinstall/unreal/CSharpWrapperFactory.js +54 -58
- package/dist/postinstall/unreal/CSharpWrapperFactory.js.map +1 -1
- package/dist/postinstall/unreal/PluginHash.d.ts +5 -2
- package/dist/postinstall/unreal/PluginHash.d.ts.map +1 -1
- package/dist/postinstall/unreal/PluginHash.js +13 -8
- package/dist/postinstall/unreal/PluginHash.js.map +1 -1
- package/dist/postinstall/unreal/PrettyParseError.d.ts +8 -5
- package/dist/postinstall/unreal/PrettyParseError.d.ts.map +1 -1
- package/dist/postinstall/unreal/PrettyParseError.js +37 -37
- package/dist/postinstall/unreal/PrettyParseError.js.map +1 -1
- package/dist/postinstall/unreal/ProjectFileLocator.d.ts +12 -9
- package/dist/postinstall/unreal/ProjectFileLocator.d.ts.map +1 -1
- package/dist/postinstall/unreal/ProjectFileLocator.js +49 -51
- package/dist/postinstall/unreal/ProjectFileLocator.js.map +1 -1
- package/dist/postinstall/unreal/TargetCsInjector.d.ts +16 -13
- package/dist/postinstall/unreal/TargetCsInjector.d.ts.map +1 -1
- package/dist/postinstall/unreal/TargetCsInjector.js +58 -53
- package/dist/postinstall/unreal/TargetCsInjector.js.map +1 -1
- package/dist/postinstall/unreal/UProjectInjector.d.ts +6 -3
- package/dist/postinstall/unreal/UProjectInjector.d.ts.map +1 -1
- package/dist/postinstall/unreal/UProjectInjector.js +56 -52
- package/dist/postinstall/unreal/UProjectInjector.js.map +1 -1
- package/dist/postinstall/unreal/UProjectMetadataReader.d.ts +5 -2
- package/dist/postinstall/unreal/UProjectMetadataReader.d.ts.map +1 -1
- package/dist/postinstall/unreal/UProjectMetadataReader.js +22 -18
- package/dist/postinstall/unreal/UProjectMetadataReader.js.map +1 -1
- package/dist/postinstall/unreal/UnrealSourceCatalog.d.ts +17 -14
- package/dist/postinstall/unreal/UnrealSourceCatalog.d.ts.map +1 -1
- package/dist/postinstall/unreal/UnrealSourceCatalog.js +50 -50
- package/dist/postinstall/unreal/UnrealSourceCatalog.js.map +1 -1
- package/dist/prompts/InkPromptService.d.ts +10 -7
- package/dist/prompts/InkPromptService.d.ts.map +1 -1
- package/dist/prompts/InkPromptService.js +100 -71
- package/dist/prompts/InkPromptService.js.map +1 -1
- package/dist/prompts/ProjectContextDetector.d.ts +10 -7
- package/dist/prompts/ProjectContextDetector.d.ts.map +1 -1
- package/dist/prompts/ProjectContextDetector.js +32 -26
- package/dist/prompts/ProjectContextDetector.js.map +1 -1
- package/dist/prompts/PromptService.d.ts +11 -8
- package/dist/prompts/PromptService.d.ts.map +1 -1
- package/dist/prompts/PromptService.js +1 -8
- package/dist/reporting/DiagnosticDeduplicator.d.ts +8 -5
- package/dist/reporting/DiagnosticDeduplicator.d.ts.map +1 -1
- package/dist/reporting/DiagnosticDeduplicator.js +36 -35
- package/dist/reporting/DiagnosticDeduplicator.js.map +1 -1
- package/dist/reporting/DiagnosticRenderer.d.ts +11 -8
- package/dist/reporting/DiagnosticRenderer.d.ts.map +1 -1
- package/dist/reporting/DiagnosticRenderer.js +1 -2
- package/dist/reporting/DiagnosticReporter.d.ts +12 -9
- package/dist/reporting/DiagnosticReporter.d.ts.map +1 -1
- package/dist/reporting/DiagnosticReporter.js +40 -39
- package/dist/reporting/DiagnosticReporter.js.map +1 -1
- package/dist/reporting/InkDiagnosticRenderer.d.ts +12 -9
- package/dist/reporting/InkDiagnosticRenderer.d.ts.map +1 -1
- package/dist/reporting/InkDiagnosticRenderer.js +50 -42
- package/dist/reporting/InkDiagnosticRenderer.js.map +1 -1
- package/dist/reporting/InstallProgressReporter.d.ts +23 -20
- package/dist/reporting/InstallProgressReporter.d.ts.map +1 -1
- package/dist/reporting/InstallProgressReporter.js +48 -47
- package/dist/reporting/InstallProgressReporter.js.map +1 -1
- package/dist/reporting/JsonReporter.d.ts +16 -13
- package/dist/reporting/JsonReporter.d.ts.map +1 -1
- package/dist/reporting/JsonReporter.js +34 -20
- package/dist/reporting/JsonReporter.js.map +1 -1
- package/dist/reporting/RegistryRequestTerminalFormatter.d.ts +36 -0
- package/dist/reporting/RegistryRequestTerminalFormatter.d.ts.map +1 -0
- package/dist/reporting/RegistryRequestTerminalFormatter.js +90 -0
- package/dist/reporting/RegistryRequestTerminalFormatter.js.map +1 -0
- package/dist/reporting/TextDiagnosticRenderer.d.ts +11 -8
- package/dist/reporting/TextDiagnosticRenderer.d.ts.map +1 -1
- package/dist/reporting/TextDiagnosticRenderer.js +36 -28
- package/dist/reporting/TextDiagnosticRenderer.js.map +1 -1
- package/dist/reporting/TextSink.d.ts +14 -11
- package/dist/reporting/TextSink.d.ts.map +1 -1
- package/dist/reporting/TextSink.js +24 -20
- package/dist/reporting/TextSink.js.map +1 -1
- package/package.json +31 -32
- package/dist/cli/parsing/contracts/UAPKGCommandModule.js.map +0 -1
- package/dist/cli-bootstrap.d.ts.map +0 -1
- package/dist/commands/Command.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/postinstall/index.d.ts.map +0 -1
- package/dist/postinstall/index.js.map +0 -1
- package/dist/postinstall/unreal/CSharpStructures.js.map +0 -1
- package/dist/prompts/PromptService.js.map +0 -1
- package/dist/reporting/DiagnosticRenderer.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntryResolver.js","
|
|
1
|
+
{"version":3,"file":"EntryResolver.js","names":["path"],"sources":["../../../src/postinstall/loader/EntryResolver.ts"],"sourcesContent":["import fs from 'node:fs';\nimport * as path from 'node:path';\nimport { createPostinstallDuplicateEntryDiagnostic, fail, ok, type Result } from '@uapkg/diagnostics';\n\n/** Candidate extensions in resolution order (spec-mandated). */\nconst CANDIDATE_EXTENSIONS = ['ts', 'js', 'mjs'] as const;\nexport type PostinstallEntryKind = (typeof CANDIDATE_EXTENSIONS)[number];\n\nexport interface ResolvedEntry {\n readonly path: string;\n readonly kind: PostinstallEntryKind;\n}\n\n/**\n * Locates `.uapkg/postinstall.<ext>` inside a plugin root, enforcing the\n * order `ts → js → mjs`. If the plugin has two or more candidate files an\n * error diagnostic `POSTINSTALL_DUPLICATE_ENTRY` is returned so the user can\n * clean up ambiguity. `ok(null)` means \"no postinstall defined\" — a valid,\n * silent state.\n */\nexport class EntryResolver {\n public resolve(packageName: string, pluginRoot: string): Result<ResolvedEntry | null> {\n const dir = path.join(pluginRoot, '.uapkg');\n if (!fs.existsSync(dir)) return ok(null);\n\n const found: ResolvedEntry[] = [];\n for (const kind of CANDIDATE_EXTENSIONS) {\n const candidate = path.join(dir, `postinstall.${kind}`);\n if (fs.existsSync(candidate) && fs.statSync(candidate).isFile()) {\n found.push({ path: candidate, kind });\n }\n }\n\n if (found.length === 0) return ok(null);\n if (found.length > 1) {\n return fail([\n createPostinstallDuplicateEntryDiagnostic(\n packageName,\n found.map((entry) => entry.path),\n ),\n ]);\n }\n return ok(found[0]);\n }\n}\n"],"mappings":";;;;;;AAKA,MAAM,uBAAuB;CAAC;CAAM;CAAM;AAAK;;;;;;;;AAe/C,IAAa,gBAAb,MAA2B;CACzB,AAAO,QAAQ,aAAqB,YAAkD;EACpF,MAAM,MAAMA,OAAK,KAAK,YAAY,QAAQ;EAC1C,IAAI,CAAC,GAAG,WAAW,GAAG,GAAG,OAAO,GAAG,IAAI;EAEvC,MAAM,QAAyB,CAAC;EAChC,KAAK,MAAM,QAAQ,sBAAsB;GACvC,MAAM,YAAYA,OAAK,KAAK,KAAK,eAAe,MAAM;GACtD,IAAI,GAAG,WAAW,SAAS,KAAK,GAAG,SAAS,SAAS,CAAC,CAAC,OAAO,GAC5D,MAAM,KAAK;IAAE,MAAM;IAAW;GAAK,CAAC;EAExC;EAEA,IAAI,MAAM,WAAW,GAAG,OAAO,GAAG,IAAI;EACtC,IAAI,MAAM,SAAS,GACjB,OAAO,KAAK,CACV,0CACE,aACA,MAAM,KAAK,UAAU,MAAM,IAAI,CACjC,CACF,CAAC;EAEH,OAAO,GAAG,MAAM,EAAE;CACpB;AACF"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Result } from "@uapkg/diagnostics";
|
|
2
|
+
//#region src/postinstall/loader/EsbuildTranspiler.d.ts
|
|
2
3
|
/**
|
|
3
4
|
* Transpiles a single `.ts` postinstall entry into an in-memory ESM bundle.
|
|
4
5
|
*
|
|
@@ -12,7 +13,9 @@ import { type Result } from '@uapkg/diagnostics';
|
|
|
12
13
|
*
|
|
13
14
|
* On failure returns a `POSTINSTALL_ESBUILD_ERROR` diagnostic.
|
|
14
15
|
*/
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
declare class EsbuildTranspiler {
|
|
17
|
+
transpile(packageName: string, entryFile: string): Promise<Result<string>>;
|
|
17
18
|
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { EsbuildTranspiler };
|
|
18
21
|
//# sourceMappingURL=EsbuildTranspiler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EsbuildTranspiler.d.ts","
|
|
1
|
+
{"version":3,"file":"EsbuildTranspiler.d.ts","names":[],"sources":["../../../src/postinstall/loader/EsbuildTranspiler.ts"],"mappings":";;;;;;;;;;;;;;;cAiBa;EACE,UAAU,qBAAqB,oBAAoB,QAAQ"}
|
|
@@ -1,58 +1,54 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { build } from
|
|
1
|
+
import { createPostinstallEsbuildErrorDiagnostic, fail, ok } from "@uapkg/diagnostics";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import { build } from "esbuild";
|
|
4
|
+
|
|
5
|
+
//#region src/postinstall/loader/EsbuildTranspiler.ts
|
|
4
6
|
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
return fail([
|
|
53
|
-
createPostinstallEsbuildErrorDiagnostic(packageName, entryFile, error instanceof Error ? error.message : String(error)),
|
|
54
|
-
]);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
7
|
+
* Transpiles a single `.ts` postinstall entry into an in-memory ESM bundle.
|
|
8
|
+
*
|
|
9
|
+
* Constraints:
|
|
10
|
+
* * `bundle: false` — we only lower TypeScript to JS; users are expected to
|
|
11
|
+
* import shared modules via `node_modules` which the loader's dynamic
|
|
12
|
+
* import handles natively.
|
|
13
|
+
* * No type-checking. The user's IDE / CI catches type errors; `uapkg` only
|
|
14
|
+
* needs a runnable module.
|
|
15
|
+
* * `platform: node`, `format: esm`, `target: node20`.
|
|
16
|
+
*
|
|
17
|
+
* On failure returns a `POSTINSTALL_ESBUILD_ERROR` diagnostic.
|
|
18
|
+
*/
|
|
19
|
+
var EsbuildTranspiler = class {
|
|
20
|
+
async transpile(packageName, entryFile) {
|
|
21
|
+
let source;
|
|
22
|
+
try {
|
|
23
|
+
source = fs.readFileSync(entryFile, "utf-8");
|
|
24
|
+
} catch (error) {
|
|
25
|
+
return fail([createPostinstallEsbuildErrorDiagnostic(packageName, entryFile, error instanceof Error ? error.message : String(error))]);
|
|
26
|
+
}
|
|
27
|
+
const options = {
|
|
28
|
+
stdin: {
|
|
29
|
+
contents: source,
|
|
30
|
+
loader: "ts",
|
|
31
|
+
sourcefile: entryFile,
|
|
32
|
+
resolveDir: entryFile.replace(/[\\/][^\\/]+$/, "")
|
|
33
|
+
},
|
|
34
|
+
bundle: false,
|
|
35
|
+
write: false,
|
|
36
|
+
format: "esm",
|
|
37
|
+
platform: "node",
|
|
38
|
+
target: "node20",
|
|
39
|
+
sourcemap: false,
|
|
40
|
+
logLevel: "silent"
|
|
41
|
+
};
|
|
42
|
+
try {
|
|
43
|
+
const file = (await build(options)).outputFiles?.[0];
|
|
44
|
+
if (!file) return fail([createPostinstallEsbuildErrorDiagnostic(packageName, entryFile, "esbuild produced no output")]);
|
|
45
|
+
return ok(file.text);
|
|
46
|
+
} catch (error) {
|
|
47
|
+
return fail([createPostinstallEsbuildErrorDiagnostic(packageName, entryFile, error instanceof Error ? error.message : String(error))]);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
//#endregion
|
|
53
|
+
export { EsbuildTranspiler };
|
|
58
54
|
//# sourceMappingURL=EsbuildTranspiler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EsbuildTranspiler.js","
|
|
1
|
+
{"version":3,"file":"EsbuildTranspiler.js","names":[],"sources":["../../../src/postinstall/loader/EsbuildTranspiler.ts"],"sourcesContent":["import fs from 'node:fs';\nimport { createPostinstallEsbuildErrorDiagnostic, fail, ok, type Result } from '@uapkg/diagnostics';\nimport { type BuildOptions, build } from 'esbuild';\n\n/**\n * Transpiles a single `.ts` postinstall entry into an in-memory ESM bundle.\n *\n * Constraints:\n * * `bundle: false` — we only lower TypeScript to JS; users are expected to\n * import shared modules via `node_modules` which the loader's dynamic\n * import handles natively.\n * * No type-checking. The user's IDE / CI catches type errors; `uapkg` only\n * needs a runnable module.\n * * `platform: node`, `format: esm`, `target: node20`.\n *\n * On failure returns a `POSTINSTALL_ESBUILD_ERROR` diagnostic.\n */\nexport class EsbuildTranspiler {\n public async transpile(packageName: string, entryFile: string): Promise<Result<string>> {\n let source: string;\n try {\n source = fs.readFileSync(entryFile, 'utf-8');\n } catch (error) {\n return fail([\n createPostinstallEsbuildErrorDiagnostic(\n packageName,\n entryFile,\n error instanceof Error ? error.message : String(error),\n ),\n ]);\n }\n\n const options: BuildOptions = {\n stdin: {\n contents: source,\n loader: 'ts',\n sourcefile: entryFile,\n resolveDir: entryFile.replace(/[\\\\/][^\\\\/]+$/, ''),\n },\n bundle: false,\n write: false,\n format: 'esm',\n platform: 'node',\n target: 'node20',\n sourcemap: false,\n logLevel: 'silent',\n };\n\n try {\n const result = await build(options);\n const file = result.outputFiles?.[0];\n if (!file) {\n return fail([createPostinstallEsbuildErrorDiagnostic(packageName, entryFile, 'esbuild produced no output')]);\n }\n return ok(file.text);\n } catch (error) {\n return fail([\n createPostinstallEsbuildErrorDiagnostic(\n packageName,\n entryFile,\n error instanceof Error ? error.message : String(error),\n ),\n ]);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,IAAa,oBAAb,MAA+B;CAC7B,MAAa,UAAU,aAAqB,WAA4C;EACtF,IAAI;EACJ,IAAI;GACF,SAAS,GAAG,aAAa,WAAW,OAAO;EAC7C,SAAS,OAAO;GACd,OAAO,KAAK,CACV,wCACE,aACA,WACA,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CACvD,CACF,CAAC;EACH;EAEA,MAAM,UAAwB;GAC5B,OAAO;IACL,UAAU;IACV,QAAQ;IACR,YAAY;IACZ,YAAY,UAAU,QAAQ,iBAAiB,EAAE;GACnD;GACA,QAAQ;GACR,OAAO;GACP,QAAQ;GACR,UAAU;GACV,QAAQ;GACR,WAAW;GACX,UAAU;EACZ;EAEA,IAAI;GAEF,MAAM,QAAO,MADQ,MAAM,OAAO,EACf,CAAC,cAAc;GAClC,IAAI,CAAC,MACH,OAAO,KAAK,CAAC,wCAAwC,aAAa,WAAW,4BAA4B,CAAC,CAAC;GAE7G,OAAO,GAAG,KAAK,IAAI;EACrB,SAAS,OAAO;GACd,OAAO,KAAK,CACV,wCACE,aACA,WACA,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CACvD,CACF,CAAC;EACH;CACF;AACF"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { PostinstallDefinition } from "../api/PostinstallDsl.js";
|
|
2
|
+
import { Result } from "@uapkg/diagnostics";
|
|
3
|
+
//#region src/postinstall/loader/ExportValidator.d.ts
|
|
3
4
|
/**
|
|
4
5
|
* Normalizes an imported module to its default export (or the module object
|
|
5
6
|
* itself for CommonJS-style returns) and validates against
|
|
@@ -8,8 +9,10 @@ import { type PostinstallDefinition } from '../api/PostinstallDsl.js';
|
|
|
8
9
|
* Emits `POSTINSTALL_INVALID_EXPORT` with flattened Zod issue messages when
|
|
9
10
|
* the shape is wrong.
|
|
10
11
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
declare class ExportValidator {
|
|
13
|
+
validate(packageName: string, entryFile: string, moduleValue: unknown): Result<PostinstallDefinition>;
|
|
14
|
+
private unwrap;
|
|
14
15
|
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { ExportValidator };
|
|
15
18
|
//# sourceMappingURL=ExportValidator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExportValidator.d.ts","
|
|
1
|
+
{"version":3,"file":"ExportValidator.d.ts","names":[],"sources":["../../../src/postinstall/loader/ExportValidator.ts"],"mappings":";;;;;;;;;;;cAWa;EACJ,SAAS,qBAAqB,mBAAmB,uBAAuB,OAAO;UAa9E"}
|
|
@@ -1,34 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { PostinstallDefinitionSchema } from "../api/PostinstallDsl.js";
|
|
2
|
+
import { createPostinstallInvalidExportDiagnostic, fail, ok } from "@uapkg/diagnostics";
|
|
3
|
+
|
|
4
|
+
//#region src/postinstall/loader/ExportValidator.ts
|
|
3
5
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
6
|
+
* Normalizes an imported module to its default export (or the module object
|
|
7
|
+
* itself for CommonJS-style returns) and validates against
|
|
8
|
+
* {@link PostinstallDefinitionSchema}.
|
|
9
|
+
*
|
|
10
|
+
* Emits `POSTINSTALL_INVALID_EXPORT` with flattened Zod issue messages when
|
|
11
|
+
* the shape is wrong.
|
|
12
|
+
*/
|
|
13
|
+
var ExportValidator = class {
|
|
14
|
+
validate(packageName, entryFile, moduleValue) {
|
|
15
|
+
const unwrapped = this.unwrap(moduleValue);
|
|
16
|
+
const parsed = PostinstallDefinitionSchema.safeParse(unwrapped);
|
|
17
|
+
if (!parsed.success) {
|
|
18
|
+
const issues = parsed.error.issues.map((issue) => {
|
|
19
|
+
const where = issue.path.length > 0 ? ` at ${issue.path.join(".")}` : "";
|
|
20
|
+
return `${issue.message}${where}`;
|
|
21
|
+
});
|
|
22
|
+
return fail([createPostinstallInvalidExportDiagnostic(packageName, entryFile, issues)]);
|
|
23
|
+
}
|
|
24
|
+
return ok(parsed.data);
|
|
25
|
+
}
|
|
26
|
+
unwrap(moduleValue) {
|
|
27
|
+
if (moduleValue && typeof moduleValue === "object") {
|
|
28
|
+
const record = moduleValue;
|
|
29
|
+
if ("default" in record) return record.default;
|
|
30
|
+
return record;
|
|
31
|
+
}
|
|
32
|
+
return moduleValue;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { ExportValidator };
|
|
34
38
|
//# sourceMappingURL=ExportValidator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExportValidator.js","
|
|
1
|
+
{"version":3,"file":"ExportValidator.js","names":[],"sources":["../../../src/postinstall/loader/ExportValidator.ts"],"sourcesContent":["import { createPostinstallInvalidExportDiagnostic, fail, ok, type Result } from '@uapkg/diagnostics';\nimport { type PostinstallDefinition, PostinstallDefinitionSchema } from '../api/PostinstallDsl.js';\n\n/**\n * Normalizes an imported module to its default export (or the module object\n * itself for CommonJS-style returns) and validates against\n * {@link PostinstallDefinitionSchema}.\n *\n * Emits `POSTINSTALL_INVALID_EXPORT` with flattened Zod issue messages when\n * the shape is wrong.\n */\nexport class ExportValidator {\n public validate(packageName: string, entryFile: string, moduleValue: unknown): Result<PostinstallDefinition> {\n const unwrapped = this.unwrap(moduleValue);\n const parsed = PostinstallDefinitionSchema.safeParse(unwrapped);\n if (!parsed.success) {\n const issues = parsed.error.issues.map((issue) => {\n const where = issue.path.length > 0 ? ` at ${issue.path.join('.')}` : '';\n return `${issue.message}${where}`;\n });\n return fail([createPostinstallInvalidExportDiagnostic(packageName, entryFile, issues)]);\n }\n return ok(parsed.data);\n }\n\n private unwrap(moduleValue: unknown): unknown {\n if (moduleValue && typeof moduleValue === 'object') {\n const record = moduleValue as Record<string, unknown>;\n if ('default' in record) return record.default;\n return record;\n }\n return moduleValue;\n }\n}\n"],"mappings":";;;;;;;;;;;;AAWA,IAAa,kBAAb,MAA6B;CAC3B,AAAO,SAAS,aAAqB,WAAmB,aAAqD;EAC3G,MAAM,YAAY,KAAK,OAAO,WAAW;EACzC,MAAM,SAAS,4BAA4B,UAAU,SAAS;EAC9D,IAAI,CAAC,OAAO,SAAS;GACnB,MAAM,SAAS,OAAO,MAAM,OAAO,KAAK,UAAU;IAChD,MAAM,QAAQ,MAAM,KAAK,SAAS,IAAI,OAAO,MAAM,KAAK,KAAK,GAAG,MAAM;IACtE,OAAO,GAAG,MAAM,UAAU;GAC5B,CAAC;GACD,OAAO,KAAK,CAAC,yCAAyC,aAAa,WAAW,MAAM,CAAC,CAAC;EACxF;EACA,OAAO,GAAG,OAAO,IAAI;CACvB;CAEA,AAAQ,OAAO,aAA+B;EAC5C,IAAI,eAAe,OAAO,gBAAgB,UAAU;GAClD,MAAM,SAAS;GACf,IAAI,aAAa,QAAQ,OAAO,OAAO;GACvC,OAAO;EACT;EACA,OAAO;CACT;AACF"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { Result } from "@uapkg/diagnostics";
|
|
2
|
+
//#region src/postinstall/loader/ModuleImporter.d.ts
|
|
3
|
+
type ModuleSource = {
|
|
4
|
+
readonly kind: 'file';
|
|
5
|
+
readonly path: string;
|
|
6
|
+
} |
|
|
6
7
|
/** ESM source already transpiled by {@link EsbuildTranspiler}. */
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
{
|
|
9
|
+
readonly kind: 'transpiled';
|
|
10
|
+
readonly code: string;
|
|
11
|
+
readonly originalPath: string;
|
|
11
12
|
};
|
|
12
13
|
/**
|
|
13
14
|
* Imports a postinstall module.
|
|
@@ -20,10 +21,12 @@ export type ModuleSource = {
|
|
|
20
21
|
* it on best-effort basis after import. The file lives in the OS tmp dir
|
|
21
22
|
* keyed by a timestamp+pid, avoiding collisions across concurrent installs.
|
|
22
23
|
*/
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
declare class ModuleImporter {
|
|
25
|
+
import(packageName: string, source: ModuleSource): Promise<Result<unknown>>;
|
|
26
|
+
private importFileUrl;
|
|
27
|
+
private createTempFile;
|
|
28
|
+
private safeUnlink;
|
|
28
29
|
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { ModuleImporter, ModuleSource };
|
|
29
32
|
//# sourceMappingURL=ModuleImporter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModuleImporter.d.ts","
|
|
1
|
+
{"version":3,"file":"ModuleImporter.d.ts","names":[],"sources":["../../../src/postinstall/loader/ModuleImporter.ts"],"mappings":";;KAMY;WACG;WAAuB;;;;WAEvB;WAA6B;WAAuB;;;;;;;;;;;;;cAatD;EACE,OAAO,qBAAqB,QAAQ,eAAe,QAAQ;UAY1D;UAkBN;UAQA"}
|
|
@@ -1,60 +1,52 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
1
|
+
import { createPostinstallLoadFailedDiagnostic, fail, ok } from "@uapkg/diagnostics";
|
|
2
|
+
import * as path$1 from "node:path";
|
|
3
|
+
import fs from "node:fs";
|
|
4
|
+
import * as os from "node:os";
|
|
5
|
+
import { pathToFileURL } from "node:url";
|
|
6
|
+
|
|
7
|
+
//#region src/postinstall/loader/ModuleImporter.ts
|
|
6
8
|
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
safeUnlink(filePath) {
|
|
52
|
-
try {
|
|
53
|
-
fs.unlinkSync(filePath);
|
|
54
|
-
}
|
|
55
|
-
catch {
|
|
56
|
-
// Best-effort cleanup; OS tmp dir is rotated anyway.
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
9
|
+
* Imports a postinstall module.
|
|
10
|
+
*
|
|
11
|
+
* For `.js`/`.mjs` files we use the file URL directly so relative imports and
|
|
12
|
+
* `node_modules` resolution work.
|
|
13
|
+
*
|
|
14
|
+
* For transpiled `.ts` code we write to a sibling temp file next to the
|
|
15
|
+
* original entry — data: URLs cannot resolve relative specifiers — and delete
|
|
16
|
+
* it on best-effort basis after import. The file lives in the OS tmp dir
|
|
17
|
+
* keyed by a timestamp+pid, avoiding collisions across concurrent installs.
|
|
18
|
+
*/
|
|
19
|
+
var ModuleImporter = class {
|
|
20
|
+
async import(packageName, source) {
|
|
21
|
+
if (source.kind === "file") return this.importFileUrl(packageName, source.path, source.path);
|
|
22
|
+
const tmpFile = this.createTempFile(source.originalPath, source.code);
|
|
23
|
+
try {
|
|
24
|
+
return await this.importFileUrl(packageName, tmpFile, source.originalPath);
|
|
25
|
+
} finally {
|
|
26
|
+
this.safeUnlink(tmpFile);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
async importFileUrl(packageName, filePath, reportedPath) {
|
|
30
|
+
try {
|
|
31
|
+
const moduleValue = await import(`${pathToFileURL(filePath).href}?t=${Date.now()}`);
|
|
32
|
+
return ok(moduleValue);
|
|
33
|
+
} catch (error) {
|
|
34
|
+
return fail([createPostinstallLoadFailedDiagnostic(packageName, reportedPath, error instanceof Error ? error.message : String(error))]);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
createTempFile(originalPath, code) {
|
|
38
|
+
const fileName = `uapkg-postinstall-${path$1.basename(originalPath, path$1.extname(originalPath))}-${process.pid}-${Date.now()}.mjs`;
|
|
39
|
+
const tmpFile = path$1.join(os.tmpdir(), fileName);
|
|
40
|
+
fs.writeFileSync(tmpFile, code, "utf-8");
|
|
41
|
+
return tmpFile;
|
|
42
|
+
}
|
|
43
|
+
safeUnlink(filePath) {
|
|
44
|
+
try {
|
|
45
|
+
fs.unlinkSync(filePath);
|
|
46
|
+
} catch {}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
//#endregion
|
|
51
|
+
export { ModuleImporter };
|
|
60
52
|
//# sourceMappingURL=ModuleImporter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModuleImporter.js","
|
|
1
|
+
{"version":3,"file":"ModuleImporter.js","names":["path"],"sources":["../../../src/postinstall/loader/ModuleImporter.ts"],"sourcesContent":["import fs from 'node:fs';\nimport * as os from 'node:os';\nimport * as path from 'node:path';\nimport { pathToFileURL } from 'node:url';\nimport { createPostinstallLoadFailedDiagnostic, fail, ok, type Result } from '@uapkg/diagnostics';\n\nexport type ModuleSource =\n | { readonly kind: 'file'; readonly path: string }\n /** ESM source already transpiled by {@link EsbuildTranspiler}. */\n | { readonly kind: 'transpiled'; readonly code: string; readonly originalPath: string };\n\n/**\n * Imports a postinstall module.\n *\n * For `.js`/`.mjs` files we use the file URL directly so relative imports and\n * `node_modules` resolution work.\n *\n * For transpiled `.ts` code we write to a sibling temp file next to the\n * original entry — data: URLs cannot resolve relative specifiers — and delete\n * it on best-effort basis after import. The file lives in the OS tmp dir\n * keyed by a timestamp+pid, avoiding collisions across concurrent installs.\n */\nexport class ModuleImporter {\n public async import(packageName: string, source: ModuleSource): Promise<Result<unknown>> {\n if (source.kind === 'file') {\n return this.importFileUrl(packageName, source.path, source.path);\n }\n const tmpFile = this.createTempFile(source.originalPath, source.code);\n try {\n return await this.importFileUrl(packageName, tmpFile, source.originalPath);\n } finally {\n this.safeUnlink(tmpFile);\n }\n }\n\n private async importFileUrl(packageName: string, filePath: string, reportedPath: string): Promise<Result<unknown>> {\n try {\n // Cache-bust with a query parameter so repeated postinstall runs in the\n // same process (e.g. tests) always reload the latest bytes on disk.\n const url = `${pathToFileURL(filePath).href}?t=${Date.now()}`;\n const moduleValue = await import(url);\n return ok(moduleValue);\n } catch (error) {\n return fail([\n createPostinstallLoadFailedDiagnostic(\n packageName,\n reportedPath,\n error instanceof Error ? error.message : String(error),\n ),\n ]);\n }\n }\n\n private createTempFile(originalPath: string, code: string): string {\n const base = path.basename(originalPath, path.extname(originalPath));\n const fileName = `uapkg-postinstall-${base}-${process.pid}-${Date.now()}.mjs`;\n const tmpFile = path.join(os.tmpdir(), fileName);\n fs.writeFileSync(tmpFile, code, 'utf-8');\n return tmpFile;\n }\n\n private safeUnlink(filePath: string): void {\n try {\n fs.unlinkSync(filePath);\n } catch {\n // Best-effort cleanup; OS tmp dir is rotated anyway.\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAsBA,IAAa,iBAAb,MAA4B;CAC1B,MAAa,OAAO,aAAqB,QAAgD;EACvF,IAAI,OAAO,SAAS,QAClB,OAAO,KAAK,cAAc,aAAa,OAAO,MAAM,OAAO,IAAI;EAEjE,MAAM,UAAU,KAAK,eAAe,OAAO,cAAc,OAAO,IAAI;EACpE,IAAI;GACF,OAAO,MAAM,KAAK,cAAc,aAAa,SAAS,OAAO,YAAY;EAC3E,UAAU;GACR,KAAK,WAAW,OAAO;EACzB;CACF;CAEA,MAAc,cAAc,aAAqB,UAAkB,cAAgD;EACjH,IAAI;GAIF,MAAM,cAAc,MAAM,OAAO,GADlB,cAAc,QAAQ,CAAC,CAAC,KAAK,KAAK,KAAK,IAAI;GAE1D,OAAO,GAAG,WAAW;EACvB,SAAS,OAAO;GACd,OAAO,KAAK,CACV,sCACE,aACA,cACA,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CACvD,CACF,CAAC;EACH;CACF;CAEA,AAAQ,eAAe,cAAsB,MAAsB;EAEjE,MAAM,WAAW,qBADJA,OAAK,SAAS,cAAcA,OAAK,QAAQ,YAAY,CACzB,EAAE,GAAG,QAAQ,IAAI,GAAG,KAAK,IAAI,EAAE;EACxE,MAAM,UAAUA,OAAK,KAAK,GAAG,OAAO,GAAG,QAAQ;EAC/C,GAAG,cAAc,SAAS,MAAM,OAAO;EACvC,OAAO;CACT;CAEA,AAAQ,WAAW,UAAwB;EACzC,IAAI;GACF,GAAG,WAAW,QAAQ;EACxB,QAAQ,CAER;CACF;AACF"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { PostinstallDefinition } from "../api/PostinstallDsl.js";
|
|
2
|
+
import { EntryResolver } from "./EntryResolver.js";
|
|
3
|
+
import { EsbuildTranspiler } from "./EsbuildTranspiler.js";
|
|
4
|
+
import { ExportValidator } from "./ExportValidator.js";
|
|
5
|
+
import { ModuleImporter } from "./ModuleImporter.js";
|
|
6
|
+
import { Result } from "@uapkg/diagnostics";
|
|
7
|
+
//#region src/postinstall/loader/PostinstallLoader.d.ts
|
|
8
|
+
interface LoadedPostinstall {
|
|
9
|
+
readonly packageName: string;
|
|
10
|
+
readonly pluginRoot: string;
|
|
11
|
+
readonly entryFile: string;
|
|
12
|
+
readonly definition: PostinstallDefinition;
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* Facade that composes the four loader stages:
|
|
@@ -20,13 +21,15 @@ export interface LoadedPostinstall {
|
|
|
20
21
|
* Returns `ok(null)` when a plugin has no postinstall — a valid, silent state.
|
|
21
22
|
* Never throws: every stage returns `Result`.
|
|
22
23
|
*/
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
declare class PostinstallLoader {
|
|
25
|
+
private readonly entryResolver;
|
|
26
|
+
private readonly transpiler;
|
|
27
|
+
private readonly importer;
|
|
28
|
+
private readonly validator;
|
|
29
|
+
constructor(entryResolver?: EntryResolver, transpiler?: EsbuildTranspiler, importer?: ModuleImporter, validator?: ExportValidator);
|
|
30
|
+
load(packageName: string, pluginRoot: string): Promise<Result<LoadedPostinstall | null>>;
|
|
31
|
+
private buildModuleSource;
|
|
31
32
|
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { LoadedPostinstall, PostinstallLoader };
|
|
32
35
|
//# sourceMappingURL=PostinstallLoader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostinstallLoader.d.ts","
|
|
1
|
+
{"version":3,"file":"PostinstallLoader.d.ts","names":[],"sources":["../../../src/postinstall/loader/PostinstallLoader.ts"],"mappings":";;;;;;;UAOiB;WACN;WACA;WACA;WACA,YAAY;;;;;;;;;;;;cAaV;mBAEQ;mBACA;mBACA;mBACA;EAJnB,YACmB,gBAAe,eACf,aAAY,mBACZ,WAAU,gBACV,YAAW;EAGjB,KAAK,qBAAqB,qBAAqB,QAAQ,OAAO;UAuB7D"}
|