trm-core 9.10.5 → 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 -2
- 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
|
@@ -14,86 +14,180 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.setManifestValues = void 0;
|
|
16
16
|
const trm_commons_1 = require("trm-commons");
|
|
17
|
+
const email_validator_1 = require("email-validator");
|
|
17
18
|
const registry_1 = require("../../registry");
|
|
18
19
|
const manifest_1 = require("../../manifest");
|
|
20
|
+
const getSystemEngines_1 = require("./getSystemEngines");
|
|
21
|
+
const enginesUi_1 = require("./enginesUi");
|
|
19
22
|
const FileSystem_1 = require("../../registry/FileSystem");
|
|
20
23
|
const lodash_1 = __importDefault(require("lodash"));
|
|
24
|
+
const trmPackage_1 = require("../../trmPackage");
|
|
25
|
+
const systemConnector_1 = require("../../systemConnector");
|
|
26
|
+
//maximum lengths accepted by the public registry
|
|
27
|
+
const PUBLIC_REGISTRY_LIMITS = {
|
|
28
|
+
description: 50,
|
|
29
|
+
website: 100,
|
|
30
|
+
git: 100
|
|
31
|
+
};
|
|
32
|
+
function checkPublicRegistryLimit(context, field, value) {
|
|
33
|
+
if (context.rawInput.packageData.registry.getRegistryType() === registry_1.RegistryType.PUBLIC && (value || '').length > PUBLIC_REGISTRY_LIMITS[field]) {
|
|
34
|
+
return `Maximum length: ${PUBLIC_REGISTRY_LIMITS[field]} characters`;
|
|
35
|
+
}
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
function isDependencyPackage(trmPackage, dependency) {
|
|
39
|
+
if (!(dependency === null || dependency === void 0 ? void 0 : dependency.name) || !trmPackage.compareName(dependency.name)) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
const registry = (dependency.registry || '').trim().toLowerCase();
|
|
43
|
+
if (!registry || registry === registry_1.PUBLIC_RESERVED_KEYWORD) {
|
|
44
|
+
return trmPackage.registry.getRegistryType() === registry_1.RegistryType.PUBLIC;
|
|
45
|
+
}
|
|
46
|
+
return (trmPackage.registry.endpoint || '').trim().toLowerCase() === registry;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Returns the post activity classes whose ABAP package is not part of the published package,
|
|
50
|
+
* of a declared TRM dependency or of trm-server.
|
|
51
|
+
*/
|
|
52
|
+
function getNotShippedPostActivities(context) {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
var _a, _b;
|
|
55
|
+
const ownDevclasses = new Set();
|
|
56
|
+
(((_a = context.runtime.sapPackage) === null || _a === void 0 ? void 0 : _a.objects) || []).forEach(o => {
|
|
57
|
+
if (o.devclass) {
|
|
58
|
+
ownDevclasses.add(o.devclass);
|
|
59
|
+
}
|
|
60
|
+
if (o.pgmid === 'R3TR' && o.object === 'DEVC' && o.objName) {
|
|
61
|
+
ownDevclasses.add(o.objName);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
if (context.rawInput.packageData.devclass) {
|
|
65
|
+
ownDevclasses.add(context.rawInput.packageData.devclass);
|
|
66
|
+
}
|
|
67
|
+
const systemPackages = ((_b = context.rawInput.contextData) === null || _b === void 0 ? void 0 : _b.systemPackages) || [];
|
|
68
|
+
const providerDevclasses = new Set(systemPackages.filter(p => (p.compareName(systemConnector_1.TRM_SERVER_PACKAGE_NAME) && p.registry.getRegistryType() === registry_1.RegistryType.PUBLIC) ||
|
|
69
|
+
(context.runtime.manifest.dependencies || []).some(d => isDependencyPackage(p, d))).map(p => p.getDevclass()).filter(Boolean));
|
|
70
|
+
const notShipped = [];
|
|
71
|
+
for (const name of lodash_1.default.uniq(context.runtime.manifest.postActivities.map(o => o.name).filter(Boolean))) {
|
|
72
|
+
const tadir = yield systemConnector_1.SystemConnector.getObject('R3TR', 'CLAS', name);
|
|
73
|
+
if (!(tadir === null || tadir === void 0 ? void 0 : tadir.devclass) || ownDevclasses.has(tadir.devclass) || providerDevclasses.has(tadir.devclass)) {
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
if (!providerDevclasses.has(yield systemConnector_1.SystemConnector.getRootDevclass(tadir.devclass))) {
|
|
77
|
+
notShipped.push({ name, devclass: tadir.devclass });
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return notShipped;
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Workflow step that merges, collects, normalizes, and serializes release manifest values.
|
|
85
|
+
*
|
|
86
|
+
* 1- check if previous release manifest values should be copied
|
|
87
|
+
*
|
|
88
|
+
* 2- input manifest values
|
|
89
|
+
*
|
|
90
|
+
* 3- set namespace values (if necessary)
|
|
91
|
+
*
|
|
92
|
+
* 4- set registry endpoint
|
|
93
|
+
*
|
|
94
|
+
* 5- set post install activities
|
|
95
|
+
*
|
|
96
|
+
* 6- edit dependencies/sap entries/engines
|
|
97
|
+
*
|
|
98
|
+
* 7- normalize manifest values
|
|
99
|
+
*
|
|
100
|
+
* 8- transform into xml
|
|
101
|
+
*
|
|
102
|
+
* 9- generate trm package
|
|
103
|
+
*
|
|
104
|
+
*/
|
|
21
105
|
exports.setManifestValues = {
|
|
22
106
|
name: 'set-manifest-values',
|
|
23
107
|
run: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
24
|
-
|
|
108
|
+
var _a, _b, _c;
|
|
109
|
+
var _d, _e, _f, _g, _h;
|
|
110
|
+
//1- check if previous release manifest values should be copied
|
|
25
111
|
if (context.rawInput.publishData.keepLatestReleaseManifestValues) {
|
|
26
|
-
if (context.runtime.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
112
|
+
if ((_a = context.runtime.latest.data) === null || _a === void 0 ? void 0 : _a.manifest) {
|
|
113
|
+
const latestManifest = context.runtime.latest.data.manifest;
|
|
114
|
+
//setting manifest values like latest version where there's no overwrite
|
|
115
|
+
(_d = context.runtime.manifest).description || (_d.description = latestManifest.description);
|
|
116
|
+
(_e = context.runtime.manifest).git || (_e.git = latestManifest.git);
|
|
117
|
+
(_f = context.runtime.manifest).license || (_f.license = latestManifest.license);
|
|
118
|
+
(_g = context.runtime.manifest).website || (_g.website = latestManifest.website);
|
|
119
|
+
(_h = context.runtime.manifest).engines || (_h.engines = latestManifest.engines);
|
|
120
|
+
//merging input authors with latest release authors
|
|
121
|
+
if (context.runtime.manifest.authors) {
|
|
122
|
+
if (Array.isArray(latestManifest.authors)) {
|
|
123
|
+
if (!Array.isArray(context.runtime.manifest.authors)) {
|
|
124
|
+
context.runtime.manifest.authors = manifest_1.Manifest.stringAuthorsToArray(context.runtime.manifest.authors);
|
|
36
125
|
}
|
|
37
|
-
|
|
126
|
+
latestManifest.authors.forEach(o => {
|
|
38
127
|
if (o.email && o.name) {
|
|
39
|
-
if (!context.runtime.
|
|
40
|
-
context.runtime.
|
|
128
|
+
if (!context.runtime.manifest.authors.find(k => k.email === o.email && k.name === o.name)) {
|
|
129
|
+
context.runtime.manifest.authors.push(o);
|
|
41
130
|
}
|
|
42
131
|
}
|
|
43
132
|
else if (o.email) {
|
|
44
|
-
if (!context.runtime.
|
|
45
|
-
context.runtime.
|
|
133
|
+
if (!context.runtime.manifest.authors.find(k => k.email === o.email)) {
|
|
134
|
+
context.runtime.manifest.authors.push(o);
|
|
46
135
|
}
|
|
47
136
|
}
|
|
48
137
|
else if (o.name) {
|
|
49
|
-
if (!context.runtime.
|
|
50
|
-
context.runtime.
|
|
138
|
+
if (!context.runtime.manifest.authors.find(k => k.name === o.name)) {
|
|
139
|
+
context.runtime.manifest.authors.push(o);
|
|
51
140
|
}
|
|
52
141
|
}
|
|
53
142
|
});
|
|
54
143
|
}
|
|
55
144
|
}
|
|
56
145
|
else {
|
|
57
|
-
context.runtime.
|
|
146
|
+
context.runtime.manifest.authors = latestManifest.authors;
|
|
58
147
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
148
|
+
//merging input keywords with latest release keywords
|
|
149
|
+
if (context.runtime.manifest.keywords) {
|
|
150
|
+
if (Array.isArray(latestManifest.keywords)) {
|
|
151
|
+
if (!Array.isArray(context.runtime.manifest.keywords)) {
|
|
152
|
+
context.runtime.manifest.keywords = manifest_1.Manifest.stringKeywordsToArray(context.runtime.manifest.keywords);
|
|
63
153
|
}
|
|
64
|
-
|
|
65
|
-
if (!context.runtime.
|
|
66
|
-
context.runtime.
|
|
154
|
+
latestManifest.keywords.forEach(o => {
|
|
155
|
+
if (!context.runtime.manifest.keywords.find(k => k === o)) {
|
|
156
|
+
context.runtime.manifest.keywords.push(o);
|
|
67
157
|
}
|
|
68
158
|
});
|
|
69
159
|
}
|
|
70
160
|
}
|
|
71
161
|
else {
|
|
72
|
-
context.runtime.
|
|
162
|
+
context.runtime.manifest.keywords = latestManifest.keywords;
|
|
73
163
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
164
|
+
//merging input post activities with latest release activities, by class
|
|
165
|
+
//an input post activity replaces the latest release one of the same class
|
|
166
|
+
if (context.runtime.manifest.postActivities) {
|
|
167
|
+
if (Array.isArray(latestManifest.postActivities)) {
|
|
168
|
+
const normalizeClass = (name) => (name || '').trim().toUpperCase();
|
|
169
|
+
latestManifest.postActivities.forEach(o => {
|
|
170
|
+
if (!context.runtime.manifest.postActivities.find(k => normalizeClass(k.name) === normalizeClass(o.name))) {
|
|
171
|
+
context.runtime.manifest.postActivities.push(o);
|
|
79
172
|
}
|
|
80
173
|
});
|
|
81
174
|
}
|
|
82
175
|
}
|
|
83
176
|
else {
|
|
84
|
-
context.runtime.
|
|
177
|
+
context.runtime.manifest.postActivities = latestManifest.postActivities;
|
|
85
178
|
}
|
|
179
|
+
//compare trm dependencies - if automatic dependency search disabled and one or more is missing
|
|
86
180
|
if (context.rawInput.publishData.noDependenciesDetection) {
|
|
87
181
|
var missingDependencies = [];
|
|
88
|
-
(
|
|
89
|
-
if (!(context.runtime.
|
|
182
|
+
(latestManifest.dependencies || []).forEach(o => {
|
|
183
|
+
if (!(context.runtime.manifest.dependencies || []).find(k => {
|
|
90
184
|
return k.name === o.name && k.registry === o.registry;
|
|
91
185
|
})) {
|
|
92
186
|
missingDependencies.push(o);
|
|
93
187
|
}
|
|
94
188
|
});
|
|
95
189
|
if (missingDependencies.length > 0) {
|
|
96
|
-
trm_commons_1.Logger.warning(`Latest version of the package had
|
|
190
|
+
trm_commons_1.Logger.warning(`Latest version of the package had ${missingDependencies.length} ${missingDependencies.length === 1 ? 'dependency that is now missing' : 'dependencies that are now missing'}.`, { important: true });
|
|
97
191
|
if (!context.rawInput.contextData.noInquirer) {
|
|
98
192
|
const inq = yield trm_commons_1.Inquirer.prompt({
|
|
99
193
|
type: 'select',
|
|
@@ -113,28 +207,29 @@ exports.setManifestValues = {
|
|
|
113
207
|
};
|
|
114
208
|
})
|
|
115
209
|
});
|
|
116
|
-
context.runtime.
|
|
210
|
+
context.runtime.manifest.dependencies = (context.runtime.manifest.dependencies || []).concat((inq.dependencies || []));
|
|
117
211
|
}
|
|
118
212
|
else {
|
|
119
213
|
missingDependencies.forEach(o => {
|
|
120
214
|
if (o.registry) {
|
|
121
|
-
trm_commons_1.Logger.warning(` ${o.name} (${o.registry})
|
|
215
|
+
trm_commons_1.Logger.warning(` ${o.name} (${o.registry})`, { important: true });
|
|
122
216
|
}
|
|
123
217
|
else {
|
|
124
|
-
trm_commons_1.Logger.warning(` ${o.name}
|
|
218
|
+
trm_commons_1.Logger.warning(` ${o.name}`, { important: true });
|
|
125
219
|
}
|
|
126
220
|
});
|
|
127
|
-
trm_commons_1.Logger.warning(`Include them manually later if still relveant
|
|
221
|
+
trm_commons_1.Logger.warning(`Include them manually later if still relveant.`, { important: true });
|
|
128
222
|
}
|
|
129
223
|
}
|
|
130
224
|
}
|
|
131
225
|
}
|
|
132
226
|
}
|
|
227
|
+
//2- input manifest values
|
|
133
228
|
if (!context.rawInput.contextData.noInquirer) {
|
|
134
229
|
var defaultAuthors;
|
|
135
230
|
var defaultKeywords;
|
|
136
|
-
if (Array.isArray(context.runtime.
|
|
137
|
-
defaultAuthors = context.runtime.
|
|
231
|
+
if (Array.isArray(context.runtime.manifest.authors)) {
|
|
232
|
+
defaultAuthors = context.runtime.manifest.authors.map(o => {
|
|
138
233
|
var author;
|
|
139
234
|
if (o.name) {
|
|
140
235
|
author = o.name;
|
|
@@ -149,74 +244,67 @@ exports.setManifestValues = {
|
|
|
149
244
|
}).filter(o => o !== undefined).join(', ');
|
|
150
245
|
}
|
|
151
246
|
else {
|
|
152
|
-
defaultAuthors = context.runtime.
|
|
247
|
+
defaultAuthors = context.runtime.manifest.authors;
|
|
153
248
|
}
|
|
154
|
-
if (Array.isArray(context.runtime.
|
|
155
|
-
defaultKeywords = context.runtime.
|
|
249
|
+
if (Array.isArray(context.runtime.manifest.keywords)) {
|
|
250
|
+
defaultKeywords = context.runtime.manifest.keywords.join(', ');
|
|
156
251
|
}
|
|
157
252
|
else {
|
|
158
|
-
defaultKeywords = context.runtime.
|
|
253
|
+
defaultKeywords = context.runtime.manifest.keywords;
|
|
159
254
|
}
|
|
160
255
|
var inq = yield trm_commons_1.Inquirer.prompt([{
|
|
161
256
|
type: "input",
|
|
162
257
|
message: "Short description",
|
|
163
258
|
name: "description",
|
|
164
|
-
default: context.runtime.
|
|
165
|
-
validate: (input) =>
|
|
166
|
-
if (context.rawInput.packageData.registry.getRegistryType() === registry_1.RegistryType.PUBLIC) {
|
|
167
|
-
if (input.length > 50) {
|
|
168
|
-
return "Maximum length: 50 characters";
|
|
169
|
-
}
|
|
170
|
-
else {
|
|
171
|
-
return true;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
else {
|
|
175
|
-
return true;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
259
|
+
default: context.runtime.manifest.description,
|
|
260
|
+
validate: (input) => checkPublicRegistryLimit(context, 'description', input)
|
|
178
261
|
}, {
|
|
179
262
|
type: "input",
|
|
180
263
|
message: "Website",
|
|
181
264
|
name: "website",
|
|
182
|
-
default: context.runtime.
|
|
183
|
-
validate: (input) =>
|
|
184
|
-
if (context.rawInput.packageData.registry.getRegistryType() === registry_1.RegistryType.PUBLIC) {
|
|
185
|
-
if (input.length > 100) {
|
|
186
|
-
return "Maximum length: 100 characters";
|
|
187
|
-
}
|
|
188
|
-
else {
|
|
189
|
-
return true;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
else {
|
|
193
|
-
return true;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
265
|
+
default: context.runtime.manifest.website,
|
|
266
|
+
validate: (input) => checkPublicRegistryLimit(context, 'website', input)
|
|
196
267
|
}, {
|
|
197
268
|
type: "input",
|
|
198
269
|
message: "Git repository",
|
|
199
270
|
name: "git",
|
|
200
|
-
default: context.runtime.
|
|
201
|
-
validate: (input) =>
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
271
|
+
default: context.runtime.manifest.git,
|
|
272
|
+
validate: (input) => checkPublicRegistryLimit(context, 'git', input)
|
|
273
|
+
}, trm_commons_1.Inquirer.isUi() ? {
|
|
274
|
+
type: "input",
|
|
275
|
+
message: "Authors",
|
|
276
|
+
name: "authors",
|
|
277
|
+
ui: {
|
|
278
|
+
kind: 'table',
|
|
279
|
+
addLabel: 'Add author',
|
|
280
|
+
value: Array.isArray(context.runtime.manifest.authors)
|
|
281
|
+
? context.runtime.manifest.authors
|
|
282
|
+
: (defaultAuthors ? manifest_1.Manifest.stringAuthorsToArray(defaultAuthors) : []),
|
|
283
|
+
columns: [{
|
|
284
|
+
name: 'name',
|
|
285
|
+
label: 'Name'
|
|
286
|
+
}, {
|
|
287
|
+
name: 'email',
|
|
288
|
+
label: 'Email',
|
|
289
|
+
case: 'lower',
|
|
290
|
+
validate: (value) => (0, email_validator_1.validate)(value) ? true : 'Invalid email'
|
|
291
|
+
}]
|
|
213
292
|
}
|
|
214
|
-
}
|
|
293
|
+
} : {
|
|
215
294
|
type: "input",
|
|
216
295
|
message: "Authors (separated by comma)",
|
|
217
296
|
name: "authors",
|
|
218
297
|
default: defaultAuthors
|
|
219
|
-
}, {
|
|
298
|
+
}, trm_commons_1.Inquirer.isUi() ? {
|
|
299
|
+
type: "input",
|
|
300
|
+
message: "Keywords",
|
|
301
|
+
name: "keywords",
|
|
302
|
+
ui: {
|
|
303
|
+
kind: 'tags',
|
|
304
|
+
case: 'lower',
|
|
305
|
+
value: defaultKeywords ? manifest_1.Manifest.stringKeywordsToArray(defaultKeywords) : []
|
|
306
|
+
}
|
|
307
|
+
} : {
|
|
220
308
|
type: "input",
|
|
221
309
|
message: "Keywords (separated by comma)",
|
|
222
310
|
name: "keywords",
|
|
@@ -225,15 +313,16 @@ exports.setManifestValues = {
|
|
|
225
313
|
type: "input",
|
|
226
314
|
message: "License",
|
|
227
315
|
name: "license",
|
|
228
|
-
default: context.runtime.
|
|
316
|
+
default: context.runtime.manifest.license
|
|
229
317
|
}]);
|
|
230
|
-
context.runtime.
|
|
318
|
+
context.runtime.manifest = Object.assign(Object.assign({}, context.runtime.manifest), inq);
|
|
231
319
|
}
|
|
232
|
-
if
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
320
|
+
//3- set namespace values (if necessary)
|
|
321
|
+
if (context.runtime.sapPackage.namespace) {
|
|
322
|
+
context.runtime.manifest.namespace = {
|
|
323
|
+
ns: context.runtime.sapPackage.namespace.trnspacet.namespace,
|
|
324
|
+
replicense: context.runtime.sapPackage.namespace.trnspacet.replicense,
|
|
325
|
+
texts: context.runtime.sapPackage.namespace.trnspacett.map(o => {
|
|
237
326
|
return {
|
|
238
327
|
description: o.descriptn,
|
|
239
328
|
language: o.spras,
|
|
@@ -242,14 +331,69 @@ exports.setManifestValues = {
|
|
|
242
331
|
})
|
|
243
332
|
};
|
|
244
333
|
}
|
|
334
|
+
else {
|
|
335
|
+
//derived from the SAP package only: never keep a caller value
|
|
336
|
+
delete context.runtime.manifest.namespace;
|
|
337
|
+
}
|
|
338
|
+
//4- set registry endpoint (derived from the target registry only: never keep a caller value)
|
|
245
339
|
if (context.rawInput.packageData.registry.getRegistryType() === registry_1.RegistryType.LOCAL) {
|
|
246
|
-
context.runtime.
|
|
340
|
+
context.runtime.manifest.registry = FileSystem_1.LOCAL_RESERVED_KEYWORD;
|
|
247
341
|
}
|
|
248
342
|
else if (context.rawInput.packageData.registry.getRegistryType() === registry_1.RegistryType.PRIVATE) {
|
|
249
|
-
context.runtime.
|
|
343
|
+
context.runtime.manifest.registry = context.rawInput.packageData.registry.endpoint;
|
|
250
344
|
}
|
|
251
|
-
|
|
252
|
-
|
|
345
|
+
else {
|
|
346
|
+
context.runtime.manifest.registry = registry_1.PUBLIC_RESERVED_KEYWORD;
|
|
347
|
+
}
|
|
348
|
+
//5- set post install activities
|
|
349
|
+
if (!context.rawInput.contextData.noInquirer && trm_commons_1.Inquirer.isUi()) {
|
|
350
|
+
const inqDefault1 = context.runtime.manifest.postActivities || [];
|
|
351
|
+
const inq = yield trm_commons_1.Inquirer.prompt({
|
|
352
|
+
message: 'Post activities',
|
|
353
|
+
type: 'input',
|
|
354
|
+
name: 'postActivities',
|
|
355
|
+
ui: {
|
|
356
|
+
kind: 'table',
|
|
357
|
+
addLabel: 'Add post activity',
|
|
358
|
+
value: inqDefault1,
|
|
359
|
+
columns: [{
|
|
360
|
+
name: 'name',
|
|
361
|
+
label: 'Class',
|
|
362
|
+
required: true,
|
|
363
|
+
case: 'upper',
|
|
364
|
+
valueHelp: {
|
|
365
|
+
key: 'name',
|
|
366
|
+
columns: [{ name: 'name', label: 'Class' }, { name: 'description', label: 'Description' }],
|
|
367
|
+
handler: (ctx) => systemConnector_1.SystemConnector.getPostActivities(ctx)
|
|
368
|
+
}
|
|
369
|
+
}, {
|
|
370
|
+
name: 'parameters',
|
|
371
|
+
label: 'Parameters',
|
|
372
|
+
type: 'table',
|
|
373
|
+
columns: [{
|
|
374
|
+
name: 'name',
|
|
375
|
+
label: 'Name',
|
|
376
|
+
required: true,
|
|
377
|
+
case: 'upper',
|
|
378
|
+
valueHelp: {
|
|
379
|
+
key: 'name',
|
|
380
|
+
columns: [{ name: 'name', label: 'Parameter' }, { name: 'description', label: 'Description' }],
|
|
381
|
+
handler: (ctx) => { var _a, _b; return systemConnector_1.SystemConnector.getPostActivityParameters((_b = (_a = ctx.parentRows) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.name, ctx); }
|
|
382
|
+
}
|
|
383
|
+
}, {
|
|
384
|
+
name: 'value',
|
|
385
|
+
label: 'Value'
|
|
386
|
+
}]
|
|
387
|
+
}]
|
|
388
|
+
}
|
|
389
|
+
});
|
|
390
|
+
if (!lodash_1.default.isEqual(inq.postActivities, inqDefault1)) {
|
|
391
|
+
trm_commons_1.Logger.log(`Post activities were manually changed: before -> ${JSON.stringify(context.runtime.manifest.postActivities)}, after -> ${JSON.stringify(inq.postActivities)}`, true);
|
|
392
|
+
context.runtime.manifest.postActivities = inq.postActivities;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
else if (!context.rawInput.contextData.noInquirer) {
|
|
396
|
+
const inqDefault1 = context.runtime.manifest.postActivities || [];
|
|
253
397
|
const inq = yield trm_commons_1.Inquirer.prompt([{
|
|
254
398
|
message: inqDefault1.length > 0 ? `Do you want to edit ${inqDefault1.length} post activities?` : `Do you want to add post activities?`,
|
|
255
399
|
type: 'confirm',
|
|
@@ -289,14 +433,14 @@ exports.setManifestValues = {
|
|
|
289
433
|
}
|
|
290
434
|
}]);
|
|
291
435
|
if (inq.postActivities) {
|
|
292
|
-
trm_commons_1.Logger.log(`Post activities were manually changed: before -> ${JSON.stringify(context.runtime.
|
|
293
|
-
context.runtime.
|
|
436
|
+
trm_commons_1.Logger.log(`Post activities were manually changed: before -> ${JSON.stringify(context.runtime.manifest.postActivities)}, after -> ${JSON.stringify(JSON.parse(inq.postActivities))}`, true);
|
|
437
|
+
context.runtime.manifest.postActivities = JSON.parse(inq.postActivities);
|
|
294
438
|
}
|
|
295
439
|
}
|
|
296
|
-
if (Array.isArray(context.runtime.
|
|
440
|
+
if (Array.isArray(context.runtime.manifest.postActivities) && context.runtime.manifest.postActivities.length > 0) {
|
|
297
441
|
var removedPostActivities = [];
|
|
298
442
|
trm_commons_1.Logger.loading(`Checking post activities...`);
|
|
299
|
-
for (var data of context.runtime.
|
|
443
|
+
for (var data of context.runtime.manifest.postActivities) {
|
|
300
444
|
if (data.name) {
|
|
301
445
|
data.name = data.name.trim().toUpperCase();
|
|
302
446
|
if (!removedPostActivities.find(c => c === data.name)) {
|
|
@@ -314,12 +458,46 @@ exports.setManifestValues = {
|
|
|
314
458
|
}
|
|
315
459
|
}
|
|
316
460
|
removedPostActivities.forEach(name => {
|
|
317
|
-
trm_commons_1.Logger.error(`Class "${name}" does not exist and will be removed from post activities list
|
|
318
|
-
context.runtime.
|
|
461
|
+
trm_commons_1.Logger.error(`Class "${name}" does not exist and will be removed from post activities list.`, { important: true });
|
|
462
|
+
context.runtime.manifest.postActivities = context.runtime.manifest.postActivities.filter(o => o.name !== name);
|
|
319
463
|
});
|
|
320
464
|
}
|
|
321
|
-
|
|
322
|
-
|
|
465
|
+
//6- edit dependencies/sap entries/engines
|
|
466
|
+
if (!context.rawInput.contextData.noInquirer && trm_commons_1.Inquirer.isUi()) {
|
|
467
|
+
const inqDefault2 = context.runtime.manifest.dependencies || [];
|
|
468
|
+
const inq = yield trm_commons_1.Inquirer.prompt({
|
|
469
|
+
message: 'Dependencies',
|
|
470
|
+
type: 'input',
|
|
471
|
+
name: 'dependencies',
|
|
472
|
+
ui: {
|
|
473
|
+
kind: 'table',
|
|
474
|
+
addLabel: 'Add dependency',
|
|
475
|
+
value: inqDefault2,
|
|
476
|
+
columns: [{
|
|
477
|
+
name: 'name',
|
|
478
|
+
label: 'Name',
|
|
479
|
+
required: true,
|
|
480
|
+
case: 'lower'
|
|
481
|
+
}, {
|
|
482
|
+
name: 'version',
|
|
483
|
+
label: 'Version',
|
|
484
|
+
required: true,
|
|
485
|
+
placeholder: '^1.0.0',
|
|
486
|
+
validate: (value) => manifest_1.Manifest.isValidDependencyRange(value) ? true : 'Invalid semver range'
|
|
487
|
+
}, {
|
|
488
|
+
name: 'registry',
|
|
489
|
+
label: 'Registry',
|
|
490
|
+
placeholder: 'public'
|
|
491
|
+
}]
|
|
492
|
+
}
|
|
493
|
+
});
|
|
494
|
+
if (!lodash_1.default.isEqual(inq.dependencies, inqDefault2)) {
|
|
495
|
+
trm_commons_1.Logger.log(`Dependencies were manually changed: before -> ${JSON.stringify(context.runtime.manifest.dependencies)}, after -> ${JSON.stringify(inq.dependencies)}`, true);
|
|
496
|
+
context.runtime.manifest.dependencies = inq.dependencies;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
else if (!context.rawInput.contextData.noInquirer) {
|
|
500
|
+
const inqDefault2 = context.runtime.manifest.dependencies || [];
|
|
323
501
|
const inq = yield trm_commons_1.Inquirer.prompt([{
|
|
324
502
|
message: `Do you want to manually edit dependencies?`,
|
|
325
503
|
type: 'confirm',
|
|
@@ -339,10 +517,12 @@ exports.setManifestValues = {
|
|
|
339
517
|
registry: '<<registry?>>'
|
|
340
518
|
}] : inqDefault2, null, 2),
|
|
341
519
|
validate: (input) => {
|
|
520
|
+
var _a, _b;
|
|
342
521
|
try {
|
|
343
522
|
const parsedInput = JSON.parse(input);
|
|
344
523
|
if (Array.isArray(parsedInput)) {
|
|
345
|
-
|
|
524
|
+
const invalid = parsedInput.find(o => !manifest_1.Manifest.isValidDependencyRange(o === null || o === void 0 ? void 0 : o.version));
|
|
525
|
+
return invalid ? `Invalid semver range "${(_a = invalid === null || invalid === void 0 ? void 0 : invalid.version) !== null && _a !== void 0 ? _a : ''}" for dependency "${(_b = invalid === null || invalid === void 0 ? void 0 : invalid.name) !== null && _b !== void 0 ? _b : ''}"` : true;
|
|
346
526
|
}
|
|
347
527
|
else {
|
|
348
528
|
return 'Invalid array';
|
|
@@ -354,14 +534,14 @@ exports.setManifestValues = {
|
|
|
354
534
|
}
|
|
355
535
|
}]);
|
|
356
536
|
if (inq.dependencies) {
|
|
357
|
-
trm_commons_1.Logger.log(`Dependencies were manually changed: before -> ${JSON.stringify(context.runtime.
|
|
358
|
-
context.runtime.
|
|
537
|
+
trm_commons_1.Logger.log(`Dependencies were manually changed: before -> ${JSON.stringify(context.runtime.manifest.dependencies)}, after -> ${JSON.stringify(JSON.parse(inq.dependencies))}`, true);
|
|
538
|
+
context.runtime.manifest.dependencies = JSON.parse(inq.dependencies);
|
|
359
539
|
}
|
|
360
540
|
}
|
|
361
541
|
if (!context.rawInput.contextData.noInquirer) {
|
|
362
|
-
const inqDefault3 = context.runtime.
|
|
542
|
+
const inqDefault3 = context.runtime.manifest.sapEntries || {};
|
|
363
543
|
const inq = yield trm_commons_1.Inquirer.prompt([{
|
|
364
|
-
message: `Do you want to manually required SAP objects?`,
|
|
544
|
+
message: `Do you want to manually edit the required SAP objects?`,
|
|
365
545
|
type: 'confirm',
|
|
366
546
|
name: 'editSapEntries',
|
|
367
547
|
default: false
|
|
@@ -382,8 +562,9 @@ exports.setManifestValues = {
|
|
|
382
562
|
validate: (input) => {
|
|
383
563
|
try {
|
|
384
564
|
const parsedInput = JSON.parse(input);
|
|
385
|
-
if (typeof (parsedInput) === 'object' && !Array.isArray(parsedInput)) {
|
|
386
|
-
|
|
565
|
+
if (typeof (parsedInput) === 'object' && parsedInput !== null && !Array.isArray(parsedInput)) {
|
|
566
|
+
const errors = (0, manifest_1.validateSapEntries)(parsedInput);
|
|
567
|
+
return errors.length === 0 ? true : errors[0];
|
|
387
568
|
}
|
|
388
569
|
else {
|
|
389
570
|
return 'Invalid object';
|
|
@@ -395,11 +576,166 @@ exports.setManifestValues = {
|
|
|
395
576
|
}
|
|
396
577
|
}]);
|
|
397
578
|
if (inq.sapEntries) {
|
|
398
|
-
trm_commons_1.Logger.log(`SAP entries were manually changed: before -> ${JSON.stringify(context.runtime.
|
|
399
|
-
context.runtime.
|
|
579
|
+
trm_commons_1.Logger.log(`SAP entries were manually changed: before -> ${JSON.stringify(context.runtime.manifest.sapEntries)}, after -> ${JSON.stringify(JSON.parse(inq.sapEntries))}`, true);
|
|
580
|
+
context.runtime.manifest.sapEntries = JSON.parse(inq.sapEntries);
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
if (!context.rawInput.contextData.noInquirer && trm_commons_1.Inquirer.isUi()) {
|
|
584
|
+
const hasEngines = !!context.runtime.manifest.engines && Object.keys(context.runtime.manifest.engines).length > 0;
|
|
585
|
+
const inqConfirm = yield trm_commons_1.Inquirer.prompt({
|
|
586
|
+
message: `Do you want to declare engines (TRM and SAP system requirements)?`,
|
|
587
|
+
type: 'confirm',
|
|
588
|
+
name: 'editEngines',
|
|
589
|
+
default: hasEngines
|
|
590
|
+
});
|
|
591
|
+
if (inqConfirm.editEngines) {
|
|
592
|
+
var inqDefault4 = hasEngines ? context.runtime.manifest.engines : yield (0, getSystemEngines_1.getSystemEngines)();
|
|
593
|
+
if (inqDefault4 === getSystemEngines_1.ENGINES_TEMPLATE) {
|
|
594
|
+
inqDefault4 = {};
|
|
595
|
+
}
|
|
596
|
+
if (!hasEngines) {
|
|
597
|
+
inqDefault4 = (0, getSystemEngines_1.withTrmEngines)(inqDefault4, context.rawInput.contextData.coreVersion);
|
|
598
|
+
}
|
|
599
|
+
const rows = (0, enginesUi_1.enginesToUiRows)(inqDefault4);
|
|
600
|
+
const sections = [
|
|
601
|
+
{ section: 'trm', message: 'Engines: TRM', addLabel: 'Add TRM package' },
|
|
602
|
+
{ section: 'components', message: 'Engines: software components', addLabel: 'Add component' },
|
|
603
|
+
{ section: 'products', message: 'Engines: product versions', addLabel: 'Add product' },
|
|
604
|
+
{ section: 'notes', message: 'Engines: SAP Notes', addLabel: 'Add SAP Note' },
|
|
605
|
+
{ section: 'tables', message: 'Engines: table conditions', addLabel: 'Add table condition' }
|
|
606
|
+
];
|
|
607
|
+
for (const o of sections) {
|
|
608
|
+
const inq = yield trm_commons_1.Inquirer.prompt({
|
|
609
|
+
message: o.message,
|
|
610
|
+
type: 'input',
|
|
611
|
+
name: o.section,
|
|
612
|
+
ui: {
|
|
613
|
+
kind: 'table',
|
|
614
|
+
addLabel: o.addLabel,
|
|
615
|
+
value: rows[o.section],
|
|
616
|
+
columns: enginesUi_1.ENGINES_UI_COLUMNS[o.section]
|
|
617
|
+
},
|
|
618
|
+
validate: (value) => (0, enginesUi_1.validateEnginesUiSection)(o.section, value)
|
|
619
|
+
});
|
|
620
|
+
rows[o.section] = inq[o.section] || [];
|
|
621
|
+
}
|
|
622
|
+
const hasAnyOf = Array.isArray(rows.anyOf) && rows.anyOf.length > 0;
|
|
623
|
+
const inqAnyOf = yield trm_commons_1.Inquirer.prompt([{
|
|
624
|
+
message: hasAnyOf ? `Do you want to edit engines alternatives (anyOf)?` : `Do you want to declare engines alternatives (anyOf)?`,
|
|
625
|
+
type: 'confirm',
|
|
626
|
+
name: 'editAnyOf',
|
|
627
|
+
default: false
|
|
628
|
+
}, {
|
|
629
|
+
message: 'Edit engines alternatives (anyOf)',
|
|
630
|
+
type: 'editor',
|
|
631
|
+
name: 'anyOf',
|
|
632
|
+
postfix: '.json',
|
|
633
|
+
when: (hash) => {
|
|
634
|
+
return hash.editAnyOf;
|
|
635
|
+
},
|
|
636
|
+
default: JSON.stringify(hasAnyOf ? rows.anyOf : [{
|
|
637
|
+
components: { '<<COMPONENT>>': { release: '<<release range>>' } }
|
|
638
|
+
}, {
|
|
639
|
+
components: { '<<COMPONENT>>': { release: '<<release range>>' } }
|
|
640
|
+
}], null, 2),
|
|
641
|
+
validate: (input) => {
|
|
642
|
+
var parsedInput;
|
|
643
|
+
try {
|
|
644
|
+
parsedInput = JSON.parse(input);
|
|
645
|
+
}
|
|
646
|
+
catch (e) {
|
|
647
|
+
return 'Invalid JSON';
|
|
648
|
+
}
|
|
649
|
+
if (!Array.isArray(parsedInput)) {
|
|
650
|
+
return 'Invalid array';
|
|
651
|
+
}
|
|
652
|
+
if (parsedInput.length === 0) {
|
|
653
|
+
return true;
|
|
654
|
+
}
|
|
655
|
+
const errors = (0, manifest_1.validateEngines)({ anyOf: parsedInput }, { strict: true });
|
|
656
|
+
return errors.length === 0 ? true : errors[0];
|
|
657
|
+
}
|
|
658
|
+
}]);
|
|
659
|
+
if (inqAnyOf.anyOf) {
|
|
660
|
+
rows.anyOf = JSON.parse(inqAnyOf.anyOf);
|
|
661
|
+
}
|
|
662
|
+
var engines = (0, enginesUi_1.uiRowsToEngines)(rows);
|
|
663
|
+
if (Object.keys(engines).length === 0) {
|
|
664
|
+
engines = undefined;
|
|
665
|
+
}
|
|
666
|
+
if (!lodash_1.default.isEqual(engines, context.runtime.manifest.engines)) {
|
|
667
|
+
trm_commons_1.Logger.log(`Engines were manually changed: before -> ${JSON.stringify(context.runtime.manifest.engines)}, after -> ${JSON.stringify(engines)}`, true);
|
|
668
|
+
context.runtime.manifest.engines = engines;
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
else if (!context.rawInput.contextData.noInquirer) {
|
|
673
|
+
const hasEngines = !!context.runtime.manifest.engines && Object.keys(context.runtime.manifest.engines).length > 0;
|
|
674
|
+
const inqConfirm = yield trm_commons_1.Inquirer.prompt({
|
|
675
|
+
message: `Do you want to declare engines (TRM and SAP system requirements)?`,
|
|
676
|
+
type: 'confirm',
|
|
677
|
+
name: 'editEngines',
|
|
678
|
+
default: hasEngines
|
|
679
|
+
});
|
|
680
|
+
if (inqConfirm.editEngines) {
|
|
681
|
+
const inqDefault4 = hasEngines ? context.runtime.manifest.engines : (0, getSystemEngines_1.withTrmEngines)(yield (0, getSystemEngines_1.getSystemEngines)(), context.rawInput.contextData.coreVersion);
|
|
682
|
+
const inq = yield trm_commons_1.Inquirer.prompt({
|
|
683
|
+
message: 'Edit engines',
|
|
684
|
+
type: 'editor',
|
|
685
|
+
name: 'engines',
|
|
686
|
+
postfix: '.json',
|
|
687
|
+
default: JSON.stringify(inqDefault4, null, 2),
|
|
688
|
+
validate: (input) => {
|
|
689
|
+
var parsedInput;
|
|
690
|
+
try {
|
|
691
|
+
parsedInput = JSON.parse(input);
|
|
692
|
+
}
|
|
693
|
+
catch (e) {
|
|
694
|
+
return 'Invalid JSON';
|
|
695
|
+
}
|
|
696
|
+
const errors = (0, manifest_1.validateEngines)(parsedInput, { strict: true });
|
|
697
|
+
return errors.length === 0 ? true : errors[0];
|
|
698
|
+
}
|
|
699
|
+
});
|
|
700
|
+
if (inq.engines) {
|
|
701
|
+
trm_commons_1.Logger.log(`Engines were manually changed: before -> ${JSON.stringify(context.runtime.manifest.engines)}, after -> ${JSON.stringify(JSON.parse(inq.engines))}`, true);
|
|
702
|
+
context.runtime.manifest.engines = JSON.parse(inq.engines);
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
//post activities run on the target system after import: a class not shipped by this package,
|
|
707
|
+
//its dependencies or trm-server makes the install fail there
|
|
708
|
+
if (Array.isArray(context.runtime.manifest.postActivities) && context.runtime.manifest.postActivities.length > 0) {
|
|
709
|
+
const notShipped = yield getNotShippedPostActivities(context);
|
|
710
|
+
notShipped.forEach(o => {
|
|
711
|
+
trm_commons_1.Logger.warning(`Post activity class "${o.name}" belongs to ABAP package "${o.devclass}", which is not shipped by this package or its dependencies: install will fail on systems where it doesn't exist.`, { important: true });
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
//7- normalize manifest values
|
|
715
|
+
for (const dependency of (context.runtime.manifest.dependencies || [])) {
|
|
716
|
+
if (!manifest_1.Manifest.isValidDependencyRange(dependency === null || dependency === void 0 ? void 0 : dependency.version)) {
|
|
717
|
+
throw new Error(`Invalid version range "${(_b = dependency === null || dependency === void 0 ? void 0 : dependency.version) !== null && _b !== void 0 ? _b : ''}" for dependency "${(_c = dependency === null || dependency === void 0 ? void 0 : dependency.name) !== null && _c !== void 0 ? _c : ''}".`);
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
//prompts validate strictly, but non-interactive, copied and unedited engines are not prompted:
|
|
721
|
+
//unknown keys or properties would be published and never enforced
|
|
722
|
+
if (context.runtime.manifest.engines && typeof context.runtime.manifest.engines === 'object' && Object.keys(context.runtime.manifest.engines).length > 0) {
|
|
723
|
+
const enginesErrors = (0, manifest_1.validateEngines)(context.runtime.manifest.engines, { strict: true });
|
|
724
|
+
if (enginesErrors.length > 0) {
|
|
725
|
+
throw new Error(`Invalid engines declaration: ${enginesErrors[0]}`);
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
context.runtime.manifest = manifest_1.Manifest.normalize(context.runtime.manifest);
|
|
729
|
+
//prompts already check the limits, but non-interactive and copied values are not prompted
|
|
730
|
+
for (const field of Object.keys(PUBLIC_REGISTRY_LIMITS)) {
|
|
731
|
+
const check = checkPublicRegistryLimit(context, field, context.runtime.manifest[field]);
|
|
732
|
+
if (check !== true) {
|
|
733
|
+
throw new Error(`Invalid manifest ${field} for the public registry: ${check}.`);
|
|
400
734
|
}
|
|
401
735
|
}
|
|
402
|
-
|
|
403
|
-
context.runtime.
|
|
736
|
+
//8- transform into xml
|
|
737
|
+
context.runtime.manifestXml = new manifest_1.Manifest(context.runtime.manifest).getAbapXml();
|
|
738
|
+
//9- generate trm package
|
|
739
|
+
context.output.trmPackage = new trmPackage_1.TrmPackage(context.runtime.manifest.name, context.rawInput.packageData.registry, new manifest_1.Manifest(context.runtime.manifest));
|
|
404
740
|
})
|
|
405
741
|
};
|