trm-core 9.10.6 → 10.0.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 +20 -0
- package/changelog.txt +3 -6
- package/dist/actions/cg3y/download.js +34 -4
- package/dist/actions/cg3y/index.d.ts +23 -0
- package/dist/actions/cg3y/index.js +13 -10
- package/dist/actions/cg3z/index.d.ts +67 -3
- package/dist/actions/cg3z/index.js +25 -14
- package/dist/actions/cg3z/upload.d.ts +20 -0
- package/dist/actions/cg3z/upload.js +165 -36
- package/dist/actions/checkEngines/analyze.d.ts +11 -0
- package/dist/actions/checkEngines/analyze.js +294 -0
- package/dist/actions/checkEngines/index.d.ts +87 -0
- package/dist/actions/checkEngines/index.js +38 -0
- package/dist/actions/checkEngines/init.d.ts +11 -0
- package/dist/actions/checkEngines/init.js +45 -0
- package/dist/actions/checkPackageDependencies/analyze.d.ts +10 -0
- package/dist/actions/checkPackageDependencies/analyze.js +37 -39
- package/dist/actions/checkPackageDependencies/index.d.ts +56 -0
- package/dist/actions/checkPackageDependencies/index.js +13 -10
- package/dist/actions/checkPackageDependencies/init.d.ts +8 -0
- package/dist/actions/checkPackageDependencies/init.js +24 -2
- package/dist/actions/checkSapEntries/analyze.d.ts +12 -0
- package/dist/actions/checkSapEntries/analyze.js +63 -47
- package/dist/actions/checkSapEntries/index.d.ts +35 -0
- package/dist/actions/checkSapEntries/index.js +12 -10
- package/dist/actions/checkSapEntries/init.d.ts +8 -0
- package/dist/actions/checkSapEntries/init.js +10 -2
- package/dist/actions/commons/IActionContext.d.ts +10 -0
- package/dist/actions/commons/checkServerAuth.d.ts +7 -0
- package/dist/actions/commons/checkServerAuth.js +10 -5
- package/dist/actions/commons/index.d.ts +1 -1
- package/dist/actions/commons/index.js +1 -1
- package/dist/actions/commons/prompts/index.d.ts +1 -0
- package/dist/actions/commons/prompts/index.js +1 -0
- package/dist/actions/commons/prompts/setLandscapeTarget.d.ts +14 -0
- package/dist/actions/commons/prompts/setLandscapeTarget.js +40 -0
- package/dist/actions/commons/prompts/setTransportTarget.d.ts +15 -0
- package/dist/actions/commons/prompts/setTransportTarget.js +20 -2
- package/dist/actions/commons/setSystemPackages.d.ts +7 -0
- package/dist/actions/commons/setSystemPackages.js +12 -2
- package/dist/actions/commons/utils/actionLocks.d.ts +32 -0
- package/dist/actions/commons/utils/actionLocks.js +135 -0
- package/dist/actions/commons/utils/dirtyEntries.d.ts +12 -0
- package/dist/actions/commons/utils/dirtyEntries.js +54 -0
- package/dist/actions/commons/utils/index.d.ts +10 -0
- package/dist/actions/commons/utils/index.js +26 -0
- package/dist/actions/commons/utils/installRegistry.d.ts +18 -0
- package/dist/actions/commons/utils/installRegistry.js +46 -0
- package/dist/actions/commons/utils/installedDependency.d.ts +15 -0
- package/dist/actions/commons/utils/installedDependency.js +30 -0
- package/dist/actions/commons/utils/owningInstallation.d.ts +6 -0
- package/dist/actions/commons/utils/owningInstallation.js +47 -0
- package/dist/actions/commons/utils/packageCleanup.d.ts +168 -0
- package/dist/actions/commons/utils/packageCleanup.js +1017 -0
- package/dist/actions/commons/utils/releaseDeletionTransport.d.ts +5 -0
- package/dist/actions/commons/utils/releaseDeletionTransport.js +67 -0
- package/dist/actions/commons/utils/restoreTransport.d.ts +6 -0
- package/dist/actions/commons/utils/restoreTransport.js +50 -0
- package/dist/actions/commons/utils/retainedWorkflow.d.ts +6 -0
- package/dist/actions/commons/utils/retainedWorkflow.js +49 -0
- package/dist/actions/commons/utils/withScopedPrefix.d.ts +5 -0
- package/dist/actions/commons/utils/withScopedPrefix.js +32 -0
- package/dist/actions/commons/workflowCallbacks.d.ts +21 -0
- package/dist/actions/commons/workflowCallbacks.js +157 -0
- package/dist/actions/index.d.ts +3 -0
- package/dist/actions/index.js +5 -0
- package/dist/actions/install/addNamespace.d.ts +18 -0
- package/dist/actions/install/addNamespace.js +121 -51
- package/dist/actions/install/checkDependants.d.ts +15 -0
- package/dist/actions/install/checkDependants.js +74 -0
- package/dist/actions/install/checkDependencies.d.ts +11 -0
- package/dist/actions/install/checkDependencies.js +32 -13
- package/dist/actions/install/checkDependencyCycles.d.ts +17 -0
- package/dist/actions/install/checkDependencyCycles.js +105 -0
- package/dist/actions/install/checkEngines.d.ts +11 -0
- package/dist/actions/install/checkEngines.js +100 -0
- package/dist/actions/install/checkInstallDevclass.d.ts +24 -0
- package/dist/actions/install/checkInstallDevclass.js +110 -0
- package/dist/actions/install/checkSapEntries.d.ts +9 -0
- package/dist/actions/install/checkSapEntries.js +20 -12
- package/dist/actions/install/checkTransports.d.ts +34 -0
- package/dist/actions/install/checkTransports.js +329 -170
- package/dist/actions/install/cleanupCheckpoint.d.ts +11 -0
- package/dist/actions/install/cleanupCheckpoint.js +62 -0
- package/dist/actions/install/defaultTransportLayer.d.ts +5 -0
- package/dist/actions/install/defaultTransportLayer.js +36 -0
- package/dist/actions/install/executePostActivities.d.ts +6 -0
- package/dist/actions/install/executePostActivities.js +28 -38
- package/dist/actions/install/generateDevclass.d.ts +10 -0
- package/dist/actions/install/generateDevclass.js +66 -20
- package/dist/actions/install/generateLandscapeTransport.d.ts +23 -0
- package/dist/actions/install/generateLandscapeTransport.js +136 -0
- package/dist/actions/install/generateUpdateTransport.d.ts +20 -0
- package/dist/actions/install/generateUpdateTransport.js +122 -0
- package/dist/actions/install/importBatch.d.ts +22 -0
- package/dist/actions/install/importBatch.js +0 -0
- package/dist/actions/install/index.d.ts +273 -44
- package/dist/actions/install/index.js +139 -59
- package/dist/actions/install/init.d.ts +14 -0
- package/dist/actions/install/init.js +215 -108
- package/dist/actions/install/installDependencies.d.ts +14 -0
- package/dist/actions/install/installDependencies.js +122 -45
- package/dist/actions/install/lockResources.d.ts +8 -0
- package/dist/actions/install/lockResources.js +100 -0
- package/dist/actions/install/prepareCust.d.ts +13 -0
- package/dist/actions/install/prepareCust.js +138 -0
- package/dist/actions/install/prepareDevc.d.ts +15 -0
- package/dist/actions/install/prepareDevc.js +113 -0
- package/dist/actions/install/prepareLang.d.ts +13 -0
- package/dist/actions/install/prepareLang.js +110 -0
- package/dist/actions/install/prepareTadir.d.ts +13 -0
- package/dist/actions/install/prepareTadir.js +95 -0
- package/dist/actions/install/releaseLandscapeTransport.d.ts +11 -0
- package/dist/actions/install/releaseLandscapeTransport.js +79 -0
- package/dist/actions/install/setInstallDevclass.d.ts +10 -0
- package/dist/actions/install/setInstallDevclass.js +140 -54
- package/dist/actions/install/updatePackageData.d.ts +9 -0
- package/dist/actions/install/updatePackageData.js +117 -13
- package/dist/actions/installDependency/checkInstalledRelease.d.ts +13 -0
- package/dist/actions/installDependency/checkInstalledRelease.js +50 -0
- package/dist/actions/installDependency/confirmDowngrade.d.ts +11 -0
- package/dist/actions/installDependency/confirmDowngrade.js +53 -0
- package/dist/actions/installDependency/findInstallRelease.d.ts +24 -0
- package/dist/actions/installDependency/findInstallRelease.js +42 -19
- package/dist/actions/installDependency/index.d.ts +64 -3
- package/dist/actions/installDependency/index.js +30 -13
- package/dist/actions/installDependency/init.d.ts +14 -0
- package/dist/actions/installDependency/init.js +24 -3
- package/dist/actions/installDependency/installRelease.d.ts +6 -0
- package/dist/actions/installDependency/installRelease.js +22 -12
- package/dist/actions/publish/enginesUi.d.ts +53 -0
- package/dist/actions/publish/enginesUi.js +289 -0
- package/dist/actions/publish/findDependencies.d.ts +19 -0
- package/dist/actions/publish/findDependencies.js +72 -37
- package/dist/actions/publish/generateCustTransport.d.ts +6 -0
- package/dist/actions/publish/generateCustTransport.js +42 -19
- package/dist/actions/publish/generateDevcTransport.d.ts +6 -0
- package/dist/actions/publish/generateDevcTransport.js +16 -18
- package/dist/actions/publish/generateLangTransport.d.ts +6 -0
- package/dist/actions/publish/generateLangTransport.js +20 -23
- package/dist/actions/publish/generateTadirTransport.d.ts +6 -0
- package/dist/actions/publish/generateTadirTransport.js +18 -17
- package/dist/actions/publish/getSystemEngines.d.ts +27 -0
- package/dist/actions/publish/getSystemEngines.js +112 -0
- package/dist/actions/publish/index.d.ts +162 -37
- package/dist/actions/publish/index.js +51 -34
- package/dist/actions/publish/init.d.ts +28 -0
- package/dist/actions/publish/init.js +304 -120
- package/dist/actions/publish/lockResources.d.ts +4 -0
- package/dist/actions/{install/refreshTmsTxt.js → publish/lockResources.js} +14 -17
- package/dist/actions/publish/publishToRegistry.d.ts +8 -0
- package/dist/actions/publish/publishToRegistry.js +18 -8
- package/dist/actions/publish/releaseTransports.d.ts +6 -0
- package/dist/actions/publish/releaseTransports.js +48 -20
- package/dist/actions/publish/setCustomizingTransports.d.ts +6 -0
- package/dist/actions/publish/setCustomizingTransports.js +227 -101
- package/dist/actions/publish/setManifestValues.d.ts +22 -0
- package/dist/actions/publish/setManifestValues.js +455 -119
- package/dist/actions/publish/setOptionalPublishData.d.ts +11 -0
- package/dist/actions/publish/setOptionalPublishData.js +133 -0
- package/dist/actions/publish/updatePackageData.d.ts +8 -0
- package/dist/actions/publish/updatePackageData.js +20 -7
- package/dist/actions/stopWarning.d.ts +5 -0
- package/dist/actions/stopWarning.js +5 -0
- package/dist/actions/uninstall/checkDependants.d.ts +7 -0
- package/dist/actions/uninstall/checkDependants.js +55 -0
- package/dist/actions/uninstall/forwardDeletionTransport.d.ts +10 -0
- package/dist/actions/uninstall/forwardDeletionTransport.js +51 -0
- package/dist/actions/uninstall/generateDeletionTransport.d.ts +10 -0
- package/dist/actions/uninstall/generateDeletionTransport.js +45 -0
- package/dist/actions/uninstall/index.d.ts +153 -0
- package/dist/actions/uninstall/index.js +141 -0
- package/dist/actions/uninstall/init.d.ts +17 -0
- package/dist/actions/uninstall/init.js +146 -0
- package/dist/actions/uninstall/lockResources.d.ts +4 -0
- package/dist/actions/{publish/setTransportTarget.js → uninstall/lockResources.js} +16 -7
- package/dist/actions/uninstall/removePackageData.d.ts +9 -0
- package/dist/actions/uninstall/removePackageData.js +64 -0
- package/dist/actions/uninstall/uninstallNestedPackages.d.ts +26 -0
- package/dist/actions/uninstall/uninstallNestedPackages.js +174 -0
- package/dist/client/ClientError.d.ts +3 -1
- package/dist/client/ClientError.js +2 -1
- package/dist/client/RESTClient.d.ts +18 -5
- package/dist/client/RESTClient.js +194 -56
- package/dist/client/RESTClientError.d.ts +1 -2
- package/dist/client/RESTClientError.js +3 -2
- package/dist/client/RFCClient.d.ts +28 -7
- package/dist/client/RFCClient.js +325 -77
- package/dist/client/RFCClientError.d.ts +1 -1
- package/dist/client/RFCClientError.js +2 -2
- package/dist/client/TransportEntries.d.ts +8 -0
- package/dist/client/TransportEntries.js +2 -0
- package/dist/client/components/BORM_ID.d.ts +1 -0
- package/dist/client/components/BORM_ID.js +2 -0
- package/dist/client/components/BORM_NAME.d.ts +1 -0
- package/dist/client/components/BORM_NAME.js +2 -0
- package/dist/client/components/BORM_NAMEL.d.ts +1 -0
- package/dist/client/components/BORM_NAMEL.js +2 -0
- package/dist/client/components/BORM_VEND.d.ts +1 -0
- package/dist/client/components/BORM_VEND.js +2 -0
- package/dist/client/components/BORM_VERS.d.ts +1 -0
- package/dist/client/components/BORM_VERS.js +2 -0
- package/dist/client/components/CWBNTNUMM.d.ts +1 -0
- package/dist/client/components/CWBNTNUMM.js +2 -0
- package/dist/client/components/CWBNTSTAT.d.ts +1 -0
- package/dist/client/components/CWBNTSTAT.js +2 -0
- package/dist/client/components/CWBNTVERS.d.ts +1 -0
- package/dist/client/components/CWBNTVERS.js +2 -0
- package/dist/client/components/CWBPRSTAT.d.ts +1 -0
- package/dist/client/components/CWBPRSTAT.js +2 -0
- package/dist/client/components/INSTSTATE.d.ts +1 -0
- package/dist/client/components/INSTSTATE.js +2 -0
- package/dist/client/components/RELC_TYPE.d.ts +1 -0
- package/dist/client/components/RELC_TYPE.js +2 -0
- package/dist/client/components/SAPPATCHLV.d.ts +1 -0
- package/dist/client/components/SAPPATCHLV.js +2 -0
- package/dist/client/components/SAPRELEASE.d.ts +1 -0
- package/dist/client/components/SAPRELEASE.js +2 -0
- package/dist/client/components/SYSYSID.d.ts +1 -0
- package/dist/client/components/SYSYSID.js +2 -0
- package/dist/client/components/ZTRM_INSTALLTR_TYPE.d.ts +1 -0
- package/dist/client/components/ZTRM_INSTALLTR_TYPE.js +2 -0
- package/dist/client/components/index.d.ts +15 -0
- package/dist/client/components/index.js +15 -0
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.js +1 -0
- package/dist/client/messageLog.d.ts +7 -0
- package/dist/client/messageLog.js +21 -0
- package/dist/client/struct/ActionLockKey.d.ts +6 -0
- package/dist/client/struct/ActionLockKey.js +2 -0
- package/dist/client/struct/CVERS.d.ts +7 -0
- package/dist/client/struct/CVERS.js +2 -0
- package/dist/client/struct/CWBNTCUST.d.ts +6 -0
- package/dist/client/struct/CWBNTCUST.js +2 -0
- package/dist/client/struct/CWBNTHEAD.d.ts +5 -0
- package/dist/client/struct/CWBNTHEAD.js +2 -0
- package/dist/client/struct/E070.d.ts +2 -1
- package/dist/client/struct/E071K.d.ts +9 -0
- package/dist/client/struct/E071K.js +2 -0
- package/dist/client/struct/PRDVERS.d.ts +9 -0
- package/dist/client/struct/PRDVERS.js +2 -0
- package/dist/client/struct/SCOMPKDTLN.d.ts +21 -0
- package/dist/client/struct/STMSCALERT.d.ts +21 -0
- package/dist/client/struct/STMSCALERT.js +2 -0
- package/dist/client/struct/STMS_TP_IMPORT.d.ts +14 -0
- package/dist/client/struct/STMS_TP_IMPORT.js +2 -0
- package/dist/client/struct/STMS_TR_REQUEST.d.ts +8 -0
- package/dist/client/struct/STMS_TR_REQUEST.js +2 -0
- package/dist/client/struct/TDEVC.d.ts +38 -0
- package/dist/client/struct/TPLOGPTR.d.ts +13 -0
- package/dist/client/struct/TPLOGPTR.js +2 -0
- package/dist/client/struct/TPSTDOUT.d.ts +3 -0
- package/dist/client/struct/TPSTDOUT.js +2 -0
- package/dist/client/struct/ZTRM_INSTALLTR.d.ts +8 -0
- package/dist/client/struct/ZTRM_INSTALLTR.js +2 -0
- package/dist/client/struct/index.d.ts +12 -0
- package/dist/client/struct/index.js +12 -0
- package/dist/commons/checkCoreTrmDependencies.js +1 -1
- package/dist/commons/getAxiosInstance.js +8 -17
- package/dist/commons/getNodePackage.js +7 -0
- package/dist/commons/getPackageHierarchy.js +2 -0
- package/dist/commons/getPackagesNamespace.d.ts +9 -0
- package/dist/commons/getPackagesNamespace.js +19 -0
- package/dist/commons/index.d.ts +4 -0
- package/dist/commons/index.js +4 -0
- package/dist/commons/packageDataFromTdevc.d.ts +12 -0
- package/dist/commons/packageDataFromTdevc.js +25 -0
- package/dist/commons/resolveCoreVersion.d.ts +10 -0
- package/dist/commons/resolveCoreVersion.js +24 -0
- package/dist/commons/summarizeForLog.d.ts +22 -0
- package/dist/commons/summarizeForLog.js +120 -0
- package/dist/connection/OpenRFCConnect.d.ts +13 -0
- package/dist/connection/OpenRFCConnect.js +23 -0
- package/dist/connection/index.d.ts +1 -0
- package/dist/connection/index.js +17 -0
- package/dist/dependencies/PackageDependencies.d.ts +2 -0
- package/dist/dependencies/PackageDependencies.js +24 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/lockfile/Lockfile.d.ts +23 -1
- package/dist/lockfile/Lockfile.js +45 -9
- package/dist/manifest/Manifest.d.ts +9 -5
- package/dist/manifest/Manifest.js +82 -29
- package/dist/manifest/PostActivity.js +3 -3
- package/dist/manifest/TrmManifest.d.ts +0 -2
- package/dist/manifest/TrmManifestBase.d.ts +2 -0
- package/dist/manifest/TrmManifestEngines.d.ts +64 -0
- package/dist/manifest/TrmManifestEngines.js +2 -0
- package/dist/manifest/engines/index.d.ts +2 -0
- package/dist/manifest/engines/index.js +18 -0
- package/dist/manifest/engines/sapRange.d.ts +38 -0
- package/dist/manifest/engines/sapRange.js +135 -0
- package/dist/manifest/engines/validateEngines.d.ts +44 -0
- package/dist/manifest/engines/validateEngines.js +282 -0
- package/dist/manifest/index.d.ts +3 -0
- package/dist/manifest/index.js +3 -0
- package/dist/manifest/sapEntries.d.ts +14 -0
- package/dist/manifest/sapEntries.js +63 -0
- package/dist/protocol/Protocol.js +7 -0
- package/dist/registry/AbstractRegistry.d.ts +18 -3
- package/dist/registry/FileSystem.d.ts +22 -13
- package/dist/registry/FileSystem.js +69 -18
- package/dist/registry/RegistryDeletionTransportUnauthorizedError.d.ts +4 -0
- package/dist/registry/RegistryDeletionTransportUnauthorizedError.js +12 -0
- package/dist/registry/RegistryDeletionTransportUnavailableError.d.ts +9 -0
- package/dist/registry/RegistryDeletionTransportUnavailableError.js +17 -0
- package/dist/registry/RegistryPackageNotFoundError.d.ts +7 -0
- package/dist/registry/RegistryPackageNotFoundError.js +14 -0
- package/dist/registry/RegistryV2.d.ts +15 -5
- package/dist/registry/RegistryV2.js +308 -48
- package/dist/registry/index.d.ts +4 -0
- package/dist/registry/index.js +4 -0
- package/dist/registry/registryKey.d.ts +7 -0
- package/dist/registry/registryKey.js +21 -0
- package/dist/systemConnector/ActionLock.d.ts +1 -0
- package/dist/systemConnector/ActionLock.js +2 -0
- package/dist/systemConnector/ISystemConnector.d.ts +21 -4
- package/dist/systemConnector/ISystemConnectorBase.d.ts +16 -0
- package/dist/systemConnector/InstallTransport.d.ts +6 -0
- package/dist/systemConnector/InstallTransport.js +2 -0
- package/dist/systemConnector/OpenRFCSystemConnector.d.ts +12 -0
- package/dist/systemConnector/OpenRFCSystemConnector.js +51 -0
- package/dist/systemConnector/RESTSystemConnector.d.ts +22 -7
- package/dist/systemConnector/RESTSystemConnector.js +95 -23
- package/dist/systemConnector/RFCConnection.d.ts +0 -1
- package/dist/systemConnector/RFCSystemConnector.d.ts +25 -7
- package/dist/systemConnector/RFCSystemConnector.js +75 -16
- package/dist/systemConnector/SystemConnector.d.ts +38 -6
- package/dist/systemConnector/SystemConnector.js +138 -12
- package/dist/systemConnector/SystemConnectorBase.d.ts +24 -1
- package/dist/systemConnector/SystemConnectorBase.js +174 -22
- package/dist/systemConnector/index.d.ts +3 -0
- package/dist/systemConnector/index.js +3 -0
- package/dist/transport/E071KOwner.d.ts +10 -0
- package/dist/transport/E071KOwner.js +15 -0
- package/dist/transport/R3transLogParser.d.ts +19 -0
- package/dist/transport/R3transLogParser.js +148 -0
- package/dist/transport/Transport.d.ts +36 -3
- package/dist/transport/Transport.js +304 -138
- package/dist/transport/index.d.ts +2 -0
- package/dist/transport/index.js +2 -0
- package/dist/trmPackage/TransportBinary.d.ts +4 -1
- package/dist/trmPackage/TrmArtifact.d.ts +12 -8
- package/dist/trmPackage/TrmArtifact.js +93 -74
- package/dist/trmPackage/TrmPackage.d.ts +20 -6
- package/dist/trmPackage/TrmPackage.js +27 -1
- package/dist/validators/validateDevclass.js +4 -0
- package/package.json +15 -7
- package/dist/actions/commons/trmServerPa.d.ts +0 -3
- package/dist/actions/commons/trmServerPa.js +0 -40
- package/dist/actions/install/checkAlreadyInstalled.d.ts +0 -3
- package/dist/actions/install/checkAlreadyInstalled.js +0 -71
- package/dist/actions/install/checkObjectTypes.d.ts +0 -3
- package/dist/actions/install/checkObjectTypes.js +0 -50
- package/dist/actions/install/checkObjectsLock.d.ts +0 -3
- package/dist/actions/install/checkObjectsLock.js +0 -52
- package/dist/actions/install/generateInstallTransports.d.ts +0 -3
- package/dist/actions/install/generateInstallTransports.js +0 -128
- package/dist/actions/install/importCustTransport.d.ts +0 -3
- package/dist/actions/install/importCustTransport.js +0 -73
- package/dist/actions/install/importDevcTransport.d.ts +0 -3
- package/dist/actions/install/importDevcTransport.js +0 -93
- package/dist/actions/install/importLangTransport.d.ts +0 -3
- package/dist/actions/install/importLangTransport.js +0 -72
- package/dist/actions/install/importTadirTransport.d.ts +0 -3
- package/dist/actions/install/importTadirTransport.js +0 -83
- package/dist/actions/install/readDevc.d.ts +0 -3
- package/dist/actions/install/readDevc.js +0 -33
- package/dist/actions/install/readTadir.d.ts +0 -3
- package/dist/actions/install/readTadir.js +0 -101
- package/dist/actions/install/refreshTmsTxt.d.ts +0 -3
- package/dist/actions/install/releaseInstallTransport.d.ts +0 -3
- package/dist/actions/install/releaseInstallTransport.js +0 -80
- package/dist/actions/publish/checkAllObjectsReleased.d.ts +0 -3
- package/dist/actions/publish/checkAllObjectsReleased.js +0 -46
- package/dist/actions/publish/getSourceCode.d.ts +0 -3
- package/dist/actions/publish/getSourceCode.js +0 -49
- package/dist/actions/publish/setChangelog.d.ts +0 -3
- package/dist/actions/publish/setChangelog.js +0 -69
- package/dist/actions/publish/setDevclass.d.ts +0 -3
- package/dist/actions/publish/setDevclass.js +0 -74
- package/dist/actions/publish/setReadme.d.ts +0 -3
- package/dist/actions/publish/setReadme.js +0 -52
- package/dist/actions/publish/setTransportTarget.d.ts +0 -3
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.setLandscapeTarget = setLandscapeTarget;
|
|
13
|
+
const trm_commons_1 = require("trm-commons");
|
|
14
|
+
const systemConnector_1 = require("../../../systemConnector");
|
|
15
|
+
const setTransportTarget_1 = require("./setTransportTarget");
|
|
16
|
+
/**
|
|
17
|
+
* Resolves the landscape target system that receives the transports generated by an action.
|
|
18
|
+
*
|
|
19
|
+
* When the connected system has no transport targets and none was supplied, it is treated
|
|
20
|
+
* as the final system of the landscape and `undefined` is returned.
|
|
21
|
+
*
|
|
22
|
+
* @param noInquirer Disable interactive target selection.
|
|
23
|
+
* @param userInput Explicit target to validate and use.
|
|
24
|
+
* @param inquirerMessage Prompt label used when interactive selection is required.
|
|
25
|
+
* @param skippedMessage Warning logged when no target is available, e.g. `Install transport won't be generated.`
|
|
26
|
+
* @returns The selected, valid transport target, or `undefined` for the final system.
|
|
27
|
+
*/
|
|
28
|
+
function setLandscapeTarget(noInquirer, userInput, inquirerMessage, skippedMessage) {
|
|
29
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
trm_commons_1.Logger.loading(`Checking system target...`);
|
|
31
|
+
const transportTargets = yield systemConnector_1.SystemConnector.getTransportTargets();
|
|
32
|
+
if (transportTargets.length === 0 && !userInput) {
|
|
33
|
+
//no transport targets: system is the last in the landscape?
|
|
34
|
+
trm_commons_1.Logger.info(`No transport targets in ${systemConnector_1.SystemConnector.getDest()}`);
|
|
35
|
+
trm_commons_1.Logger.warning(`Is ${systemConnector_1.SystemConnector.getDest()} final system in landscape? ${skippedMessage}`, true);
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
return (0, setTransportTarget_1.setTransportTarget)(noInquirer, transportTargets, userInput, inquirerMessage);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
@@ -1,2 +1,17 @@
|
|
|
1
1
|
import { TARSYSTEM } from "../../../client";
|
|
2
|
+
/**
|
|
3
|
+
* Resolves and validates the target system for a transport.
|
|
4
|
+
*
|
|
5
|
+
* A supplied `userInput` is validated against `systemTargets`. Without an explicit
|
|
6
|
+
* value, the sole available target is selected automatically; otherwise the user is
|
|
7
|
+
* prompted unless `noInquirer` is enabled.
|
|
8
|
+
*
|
|
9
|
+
* @param noInquirer Disable interactive target selection.
|
|
10
|
+
* @param systemTargets Transport targets available in the connected SAP system.
|
|
11
|
+
* @param userInput Explicit target to validate and use.
|
|
12
|
+
* @param inquirerMessage Prompt label used when interactive selection is required.
|
|
13
|
+
* @returns The selected, valid transport target, trimmed and uppercased.
|
|
14
|
+
* @throws When no targets are available, the explicit target is invalid, or a required target was
|
|
15
|
+
* not supplied in non-interactive mode.
|
|
16
|
+
*/
|
|
2
17
|
export declare function setTransportTarget(noInquirer: boolean, systemTargets: TARSYSTEM[], userInput?: TARSYSTEM, inquirerMessage?: string): Promise<TARSYSTEM>;
|
|
@@ -16,10 +16,28 @@ exports.setTransportTarget = setTransportTarget;
|
|
|
16
16
|
const trm_commons_1 = require("trm-commons");
|
|
17
17
|
const chalk_1 = __importDefault(require("chalk"));
|
|
18
18
|
const validators_1 = require("../../../validators");
|
|
19
|
+
/**
|
|
20
|
+
* Resolves and validates the target system for a transport.
|
|
21
|
+
*
|
|
22
|
+
* A supplied `userInput` is validated against `systemTargets`. Without an explicit
|
|
23
|
+
* value, the sole available target is selected automatically; otherwise the user is
|
|
24
|
+
* prompted unless `noInquirer` is enabled.
|
|
25
|
+
*
|
|
26
|
+
* @param noInquirer Disable interactive target selection.
|
|
27
|
+
* @param systemTargets Transport targets available in the connected SAP system.
|
|
28
|
+
* @param userInput Explicit target to validate and use.
|
|
29
|
+
* @param inquirerMessage Prompt label used when interactive selection is required.
|
|
30
|
+
* @returns The selected, valid transport target, trimmed and uppercased.
|
|
31
|
+
* @throws When no targets are available, the explicit target is invalid, or a required target was
|
|
32
|
+
* not supplied in non-interactive mode.
|
|
33
|
+
*/
|
|
19
34
|
function setTransportTarget(noInquirer, systemTargets, userInput, inquirerMessage) {
|
|
20
35
|
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
if (systemTargets.length === 0) {
|
|
37
|
+
throw new Error(`No transport targets are available in the connected SAP system.`);
|
|
38
|
+
}
|
|
21
39
|
var needsValidation;
|
|
22
|
-
var transportTarget = userInput;
|
|
40
|
+
var transportTarget = userInput === null || userInput === void 0 ? void 0 : userInput.trim().toUpperCase();
|
|
23
41
|
if (transportTarget === undefined) {
|
|
24
42
|
if (systemTargets.length === 1) {
|
|
25
43
|
transportTarget = systemTargets[0];
|
|
@@ -58,6 +76,6 @@ function setTransportTarget(noInquirer, systemTargets, userInput, inquirerMessag
|
|
|
58
76
|
}
|
|
59
77
|
trm_commons_1.Logger.info(`Target system: ${chalk_1.default.bold(transportTarget)}`);
|
|
60
78
|
}
|
|
61
|
-
return transportTarget;
|
|
79
|
+
return transportTarget.trim().toUpperCase();
|
|
62
80
|
});
|
|
63
81
|
}
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import { Step } from "@simonegaffurini/sammarksworkflow";
|
|
2
2
|
import { IActionContext } from "..";
|
|
3
|
+
/**
|
|
4
|
+
* Workflow step that populates `contextData.systemPackages` from the target system.
|
|
5
|
+
*
|
|
6
|
+
* A caller-supplied package list is preserved, allowing workflows to reuse a cached
|
|
7
|
+
* snapshot and avoid an additional system query.
|
|
8
|
+
* Local-registry packages are included, so dependencies and dependants published locally are matched.
|
|
9
|
+
*/
|
|
3
10
|
export declare const setSystemPackages: Step<IActionContext>;
|
|
@@ -12,13 +12,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.setSystemPackages = void 0;
|
|
13
13
|
const trm_commons_1 = require("trm-commons");
|
|
14
14
|
const systemConnector_1 = require("../../systemConnector");
|
|
15
|
+
/**
|
|
16
|
+
* Workflow step that populates `contextData.systemPackages` from the target system.
|
|
17
|
+
*
|
|
18
|
+
* A caller-supplied package list is preserved, allowing workflows to reuse a cached
|
|
19
|
+
* snapshot and avoid an additional system query.
|
|
20
|
+
* Local-registry packages are included, so dependencies and dependants published locally are matched.
|
|
21
|
+
*/
|
|
15
22
|
exports.setSystemPackages = {
|
|
16
23
|
name: 'set-system-packages',
|
|
17
24
|
run: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
-
|
|
25
|
+
//1- set system packages
|
|
26
|
+
if (!context.rawInput.contextData) { //guard
|
|
27
|
+
context.rawInput.contextData = {};
|
|
28
|
+
}
|
|
19
29
|
if (context.rawInput.contextData.systemPackages === undefined) {
|
|
20
30
|
trm_commons_1.Logger.loading(`Reading system data...`);
|
|
21
|
-
context.rawInput.contextData.systemPackages = yield systemConnector_1.SystemConnector.getInstalledPackages(true);
|
|
31
|
+
context.rawInput.contextData.systemPackages = yield systemConnector_1.SystemConnector.getInstalledPackages(true, true);
|
|
22
32
|
}
|
|
23
33
|
})
|
|
24
34
|
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { AbstractRegistry } from "../../../registry";
|
|
2
|
+
import { ActionLockKey } from "../../../systemConnector";
|
|
3
|
+
export type LockResource = {
|
|
4
|
+
type: "PACKAGE" | "DEVCLASS" | "OBJECT" | "TRANSPORT" | "NAMESPACE";
|
|
5
|
+
name: string;
|
|
6
|
+
};
|
|
7
|
+
/** Keep the same canonical key across separate processes and both SAP transports. */
|
|
8
|
+
export declare function actionLockKey(resource: LockResource): ActionLockKey;
|
|
9
|
+
export declare function packageLockResource(registry: AbstractRegistry, name: string): LockResource;
|
|
10
|
+
export declare function objectLockResource(object: {
|
|
11
|
+
pgmid: string;
|
|
12
|
+
object: string;
|
|
13
|
+
objName: string;
|
|
14
|
+
}): LockResource;
|
|
15
|
+
/** One non-expiring SAP lock owner; close only after workflow rollback has finished. */
|
|
16
|
+
export declare class ActionLockScope {
|
|
17
|
+
private readonly actionName;
|
|
18
|
+
private readonly ownerToken;
|
|
19
|
+
private readonly held;
|
|
20
|
+
constructor(actionName: string);
|
|
21
|
+
acquire(resources: LockResource[]): Promise<void>;
|
|
22
|
+
release(): Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Runs the work, then releases its locks once. A release failure is logged by the lock scope:
|
|
26
|
+
* after a success it doesn't reject the committed action, after a failure it never masks it.
|
|
27
|
+
*/
|
|
28
|
+
export declare function withLockRelease<T>(release: () => Promise<void>, work: () => Promise<T>): Promise<T>;
|
|
29
|
+
/** Releases locks whose failure was already logged by their {@link ActionLockScope}. */
|
|
30
|
+
export declare function releaseLogged(release: () => Promise<void>): Promise<void>;
|
|
31
|
+
/** Preserve the operation's result or failure while still attempting lock cleanup. */
|
|
32
|
+
export declare function withActionLockScope<T>(scope: ActionLockScope, work: () => Promise<T>): Promise<T>;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ActionLockScope = void 0;
|
|
13
|
+
exports.actionLockKey = actionLockKey;
|
|
14
|
+
exports.packageLockResource = packageLockResource;
|
|
15
|
+
exports.objectLockResource = objectLockResource;
|
|
16
|
+
exports.withLockRelease = withLockRelease;
|
|
17
|
+
exports.releaseLogged = releaseLogged;
|
|
18
|
+
exports.withActionLockScope = withActionLockScope;
|
|
19
|
+
const crypto_1 = require("crypto");
|
|
20
|
+
const trm_commons_1 = require("trm-commons");
|
|
21
|
+
const client_1 = require("../../../client");
|
|
22
|
+
const systemConnector_1 = require("../../../systemConnector");
|
|
23
|
+
/** Keep the same canonical key across separate processes and both SAP transports. */
|
|
24
|
+
function actionLockKey(resource) {
|
|
25
|
+
const name = resource.type === "PACKAGE"
|
|
26
|
+
? resource.name.trim()
|
|
27
|
+
: resource.name.trim().toUpperCase();
|
|
28
|
+
if (!name || name.length > 255) {
|
|
29
|
+
throw new Error(`Invalid ${resource.type} lock resource name.`);
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
resourceType: resource.type,
|
|
33
|
+
resourceHash: (0, crypto_1.createHash)("sha256").update(resource.type).update("\0").update(name).digest("hex").toUpperCase(),
|
|
34
|
+
resourceName: name
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function packageLockResource(registry, name) {
|
|
38
|
+
return { type: "PACKAGE", name: `${name.trim().toLowerCase()} [${registry.endpoint.trim()}]` };
|
|
39
|
+
}
|
|
40
|
+
function objectLockResource(object) {
|
|
41
|
+
return { type: "OBJECT", name: `${object.pgmid.trim().toUpperCase()} ${object.object.trim().toUpperCase()} ${object.objName.trim().toUpperCase()}` };
|
|
42
|
+
}
|
|
43
|
+
/** One non-expiring SAP lock owner; close only after workflow rollback has finished. */
|
|
44
|
+
class ActionLockScope {
|
|
45
|
+
constructor(actionName) {
|
|
46
|
+
this.actionName = actionName;
|
|
47
|
+
this.ownerToken = (0, crypto_1.randomUUID)().replace(/-/g, "").toUpperCase();
|
|
48
|
+
this.held = new Map();
|
|
49
|
+
}
|
|
50
|
+
acquire(resources) {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
const requested = resources.map(actionLockKey);
|
|
53
|
+
const fresh = requested.filter(key => !this.held.has(`${key.resourceType}:${key.resourceHash}`));
|
|
54
|
+
if (fresh.length === 0) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
fresh.sort((a, b) => a.resourceType.localeCompare(b.resourceType) || a.resourceHash.localeCompare(b.resourceHash));
|
|
58
|
+
try {
|
|
59
|
+
yield systemConnector_1.SystemConnector.acquireActionLocks(fresh, this.ownerToken, this.actionName);
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
if (error instanceof client_1.ClientError && error.sapMessage) {
|
|
63
|
+
// SAP answered and rejected the request: nothing was locked for this owner.
|
|
64
|
+
if (/lock held/i.test(error.message)) {
|
|
65
|
+
error.message = `${error.message}. If no other TRM action is running, the lock was left by an interrupted action: delete it with transaction /ATRM/LOCK.`;
|
|
66
|
+
}
|
|
67
|
+
throw error;
|
|
68
|
+
}
|
|
69
|
+
// A response can fail after SAP commits. Release only rows owned by this token.
|
|
70
|
+
try {
|
|
71
|
+
yield systemConnector_1.SystemConnector.releaseActionLocks(fresh, this.ownerToken);
|
|
72
|
+
}
|
|
73
|
+
catch (cleanupError) {
|
|
74
|
+
trm_commons_1.Logger.warning(`Could not clean up uncertain action lock acquisition: ${String(cleanupError)}`, { important: true });
|
|
75
|
+
}
|
|
76
|
+
throw error;
|
|
77
|
+
}
|
|
78
|
+
for (const key of fresh) {
|
|
79
|
+
this.held.set(`${key.resourceType}:${key.resourceHash}`, key);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
release() {
|
|
84
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
if (this.held.size === 0) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const keys = [...this.held.values()];
|
|
89
|
+
try {
|
|
90
|
+
yield systemConnector_1.SystemConnector.releaseActionLocks(keys, this.ownerToken);
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
// Locks never expire: name them so they can be deleted with transaction /ATRM/LOCK.
|
|
94
|
+
const resources = keys.map(key => `${key.resourceType} ${key.resourceName}`).join(", ");
|
|
95
|
+
trm_commons_1.Logger.warning(`Could not release ${this.actionName} action locks owned by ${this.ownerToken} (${resources}): ${error instanceof Error ? error.message : String(error)}. Delete them with transaction /ATRM/LOCK.`, { important: true });
|
|
96
|
+
throw error;
|
|
97
|
+
}
|
|
98
|
+
this.held.clear();
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
exports.ActionLockScope = ActionLockScope;
|
|
103
|
+
/**
|
|
104
|
+
* Runs the work, then releases its locks once. A release failure is logged by the lock scope:
|
|
105
|
+
* after a success it doesn't reject the committed action, after a failure it never masks it.
|
|
106
|
+
*/
|
|
107
|
+
function withLockRelease(release, work) {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
let result;
|
|
110
|
+
try {
|
|
111
|
+
result = yield work();
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
yield releaseLogged(release);
|
|
115
|
+
throw error;
|
|
116
|
+
}
|
|
117
|
+
yield releaseLogged(release);
|
|
118
|
+
return result;
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
/** Releases locks whose failure was already logged by their {@link ActionLockScope}. */
|
|
122
|
+
function releaseLogged(release) {
|
|
123
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
124
|
+
try {
|
|
125
|
+
yield release();
|
|
126
|
+
}
|
|
127
|
+
catch (_a) {
|
|
128
|
+
// Logged with resources and owner token by ActionLockScope.release.
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
/** Preserve the operation's result or failure while still attempting lock cleanup. */
|
|
133
|
+
function withActionLockScope(scope, work) {
|
|
134
|
+
return withLockRelease(() => scope.release(), work);
|
|
135
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ZTRM_DIRTY } from "../../../client";
|
|
2
|
+
/**
|
|
3
|
+
* Lists the changes made on the target system to an installed package,
|
|
4
|
+
* so the user can tell what a delete or an overwrite would discard.
|
|
5
|
+
*/
|
|
6
|
+
export declare function logDirtyEntries(entries: ZTRM_DIRTY[]): void;
|
|
7
|
+
/**
|
|
8
|
+
* Leaves out the entries of transports TRM generated for the package itself (its TRM comment rows name
|
|
9
|
+
* it): e.g. the landscape transport of a release whose install was rolled back. They aren't changes
|
|
10
|
+
* made on the system.
|
|
11
|
+
*/
|
|
12
|
+
export declare function withoutOwnTrmTransports(entries: ZTRM_DIRTY[], packageName: string): Promise<ZTRM_DIRTY[]>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.logDirtyEntries = logDirtyEntries;
|
|
13
|
+
exports.withoutOwnTrmTransports = withoutOwnTrmTransports;
|
|
14
|
+
const trm_commons_1 = require("trm-commons");
|
|
15
|
+
const transport_1 = require("../../../transport");
|
|
16
|
+
/**
|
|
17
|
+
* Lists the changes made on the target system to an installed package,
|
|
18
|
+
* so the user can tell what a delete or an overwrite would discard.
|
|
19
|
+
*/
|
|
20
|
+
function logDirtyEntries(entries) {
|
|
21
|
+
if (entries.length === 0) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
trm_commons_1.Logger.table(['Transport', 'Description', 'Object'], entries.map(o => [
|
|
25
|
+
o.trkorr,
|
|
26
|
+
// RFC rows are camel-cased (as4Text), REST rows keep the server field name (as4text)
|
|
27
|
+
o.as4Text || o.as4text || '',
|
|
28
|
+
`${o.pgmid} ${o.object} ${o.objName}`
|
|
29
|
+
]));
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Leaves out the entries of transports TRM generated for the package itself (its TRM comment rows name
|
|
33
|
+
* it): e.g. the landscape transport of a release whose install was rolled back. They aren't changes
|
|
34
|
+
* made on the system.
|
|
35
|
+
*/
|
|
36
|
+
function withoutOwnTrmTransports(entries, packageName) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (entries.length === 0) {
|
|
39
|
+
return entries;
|
|
40
|
+
}
|
|
41
|
+
const own = new Set();
|
|
42
|
+
for (const trkorr of new Set(entries.map(o => o.trkorr))) {
|
|
43
|
+
try {
|
|
44
|
+
if ((yield new transport_1.Transport(trkorr).getTrmPackageName()) === packageName) {
|
|
45
|
+
own.add(trkorr);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
catch (_a) {
|
|
49
|
+
//unreadable: keep its entries
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return entries.filter(o => !own.has(o.trkorr));
|
|
53
|
+
});
|
|
54
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./restoreTransport";
|
|
2
|
+
export * from "./releaseDeletionTransport";
|
|
3
|
+
export * from "./retainedWorkflow";
|
|
4
|
+
export * from "./withScopedPrefix";
|
|
5
|
+
export * from "./actionLocks";
|
|
6
|
+
export * from "./packageCleanup";
|
|
7
|
+
export * from "./installedDependency";
|
|
8
|
+
export * from "./installRegistry";
|
|
9
|
+
export * from "./dirtyEntries";
|
|
10
|
+
export * from "./owningInstallation";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./restoreTransport"), exports);
|
|
18
|
+
__exportStar(require("./releaseDeletionTransport"), exports);
|
|
19
|
+
__exportStar(require("./retainedWorkflow"), exports);
|
|
20
|
+
__exportStar(require("./withScopedPrefix"), exports);
|
|
21
|
+
__exportStar(require("./actionLocks"), exports);
|
|
22
|
+
__exportStar(require("./packageCleanup"), exports);
|
|
23
|
+
__exportStar(require("./installedDependency"), exports);
|
|
24
|
+
__exportStar(require("./installRegistry"), exports);
|
|
25
|
+
__exportStar(require("./dirtyEntries"), exports);
|
|
26
|
+
__exportStar(require("./owningInstallation"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AbstractRegistry } from "../../../registry";
|
|
2
|
+
/**
|
|
3
|
+
* Returns the package an install is recorded under: a local (.trm) artifact is recorded under the
|
|
4
|
+
* registry it was published to and the name in its manifest, not under the file directory.
|
|
5
|
+
*/
|
|
6
|
+
export declare function resolveInstallPackage(registry: AbstractRegistry, name: string): Promise<{
|
|
7
|
+
registry: AbstractRegistry;
|
|
8
|
+
name: string;
|
|
9
|
+
}>;
|
|
10
|
+
/**
|
|
11
|
+
* Returns the registry an install is recorded under: the registry a local (.trm) artifact was
|
|
12
|
+
* published to, otherwise the registry itself.
|
|
13
|
+
*/
|
|
14
|
+
export declare function resolveInstallRegistry(registry: AbstractRegistry): Promise<AbstractRegistry>;
|
|
15
|
+
/**
|
|
16
|
+
* Registry key stored in the TRM install tables for a resolved install registry.
|
|
17
|
+
*/
|
|
18
|
+
export declare function installRegistryKey(registry: AbstractRegistry): string;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.resolveInstallPackage = resolveInstallPackage;
|
|
13
|
+
exports.resolveInstallRegistry = resolveInstallRegistry;
|
|
14
|
+
exports.installRegistryKey = installRegistryKey;
|
|
15
|
+
const registry_1 = require("../../../registry");
|
|
16
|
+
/**
|
|
17
|
+
* Returns the package an install is recorded under: a local (.trm) artifact is recorded under the
|
|
18
|
+
* registry it was published to and the name in its manifest, not under the file directory.
|
|
19
|
+
*/
|
|
20
|
+
function resolveInstallPackage(registry, name) {
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
if (registry.getRegistryType() !== registry_1.RegistryType.LOCAL) {
|
|
23
|
+
return { registry, name };
|
|
24
|
+
}
|
|
25
|
+
const realPackage = yield registry.getRealPackage();
|
|
26
|
+
return { registry: realPackage.registry, name: realPackage.packageName };
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Returns the registry an install is recorded under: the registry a local (.trm) artifact was
|
|
31
|
+
* published to, otherwise the registry itself.
|
|
32
|
+
*/
|
|
33
|
+
function resolveInstallRegistry(registry) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
if (registry.getRegistryType() !== registry_1.RegistryType.LOCAL) {
|
|
36
|
+
return registry;
|
|
37
|
+
}
|
|
38
|
+
return registry.getRealRegistry();
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Registry key stored in the TRM install tables for a resolved install registry.
|
|
43
|
+
*/
|
|
44
|
+
function installRegistryKey(registry) {
|
|
45
|
+
return (0, registry_1.registryKey)(registry);
|
|
46
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DependencyCheckStatus } from "../../checkPackageDependencies";
|
|
2
|
+
import { TrmPackage } from "../../../trmPackage";
|
|
3
|
+
/** State of a dependency on the target system, compared with the range it is required in. */
|
|
4
|
+
export type InstalledDependency = {
|
|
5
|
+
status: DependencyCheckStatus;
|
|
6
|
+
/** Version on the system; set for `ok` and `versionMismatch`. */
|
|
7
|
+
installedVersion?: string;
|
|
8
|
+
/** Why the installed manifest could not be read; set only for `manifestUnreadable`. */
|
|
9
|
+
error?: unknown;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Finds `trmPackage` in the system package snapshot and checks the installed version against
|
|
13
|
+
* `versionRange`. Installed prereleases are matched with `includePrerelease`.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getInstalledDependency(systemPackages: TrmPackage[], trmPackage: TrmPackage, versionRange: string): InstalledDependency;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getInstalledDependency = getInstalledDependency;
|
|
4
|
+
const semver_1 = require("semver");
|
|
5
|
+
const trmPackage_1 = require("../../../trmPackage");
|
|
6
|
+
/**
|
|
7
|
+
* Finds `trmPackage` in the system package snapshot and checks the installed version against
|
|
8
|
+
* `versionRange`. Installed prereleases are matched with `includePrerelease`.
|
|
9
|
+
*/
|
|
10
|
+
function getInstalledDependency(systemPackages, trmPackage, versionRange) {
|
|
11
|
+
var _a;
|
|
12
|
+
const installed = (systemPackages || []).find(o => trmPackage_1.TrmPackage.compare(o, trmPackage));
|
|
13
|
+
if (!installed) {
|
|
14
|
+
return { status: 'notFound' };
|
|
15
|
+
}
|
|
16
|
+
let installedVersion;
|
|
17
|
+
try {
|
|
18
|
+
installedVersion = (_a = installed.manifest) === null || _a === void 0 ? void 0 : _a.get().version;
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
return { status: 'manifestUnreadable', error };
|
|
22
|
+
}
|
|
23
|
+
if (typeof installedVersion !== 'string' || (0, semver_1.valid)(installedVersion) === null) {
|
|
24
|
+
return { status: 'manifestUnreadable' };
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
status: (0, semver_1.satisfies)(installedVersion, versionRange, { includePrerelease: true }) ? 'ok' : 'versionMismatch',
|
|
28
|
+
installedVersion
|
|
29
|
+
};
|
|
30
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TrmPackage } from "../../../trmPackage";
|
|
2
|
+
/**
|
|
3
|
+
* Installed TRM package whose SAP packages contain `devclass`: its root package or one of the
|
|
4
|
+
* root's subpackages, at any depth. `exclude` (e.g. the package being upgraded) is never returned.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getOwningInstallation(devclass: string, systemPackages: TrmPackage[], exclude?: TrmPackage): Promise<TrmPackage | undefined>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getOwningInstallation = getOwningInstallation;
|
|
13
|
+
const systemConnector_1 = require("../../../systemConnector");
|
|
14
|
+
function normalize(value) {
|
|
15
|
+
return value.trim().toUpperCase();
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Installed TRM package whose SAP packages contain `devclass`: its root package or one of the
|
|
19
|
+
* root's subpackages, at any depth. `exclude` (e.g. the package being upgraded) is never returned.
|
|
20
|
+
*/
|
|
21
|
+
function getOwningInstallation(devclass, systemPackages, exclude) {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
var _a;
|
|
24
|
+
const excludedDevclass = normalize((exclude === null || exclude === void 0 ? void 0 : exclude.getDevclass()) || '');
|
|
25
|
+
const roots = new Map();
|
|
26
|
+
systemPackages.forEach(pkg => {
|
|
27
|
+
const root = normalize(pkg.getDevclass() || '');
|
|
28
|
+
if (root && pkg !== exclude && root !== excludedDevclass) {
|
|
29
|
+
roots.set(root, pkg);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
if (roots.size === 0) {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
const visited = new Set();
|
|
36
|
+
let current = devclass;
|
|
37
|
+
while (current && !visited.has(normalize(current))) {
|
|
38
|
+
const owner = roots.get(normalize(current));
|
|
39
|
+
if (owner) {
|
|
40
|
+
return owner;
|
|
41
|
+
}
|
|
42
|
+
visited.add(normalize(current));
|
|
43
|
+
current = (_a = (yield systemConnector_1.SystemConnector.getDevclass(current))) === null || _a === void 0 ? void 0 : _a.parentcl;
|
|
44
|
+
}
|
|
45
|
+
return undefined;
|
|
46
|
+
});
|
|
47
|
+
}
|