trm-core 9.10.6 → 10.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -0
- package/changelog.txt +11 -0
- 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 -52
- 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,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPackagesNamespace = getPackagesNamespace;
|
|
4
|
+
const getPackageNamespace_1 = require("./getPackageNamespace");
|
|
5
|
+
/**
|
|
6
|
+
* Returns the namespace of a set of SAP packages: the root package namespace, or the only
|
|
7
|
+
* reserved (/NAMESPACE/) namespace used by a subpackage when the root uses Z or Y.
|
|
8
|
+
*
|
|
9
|
+
* Only one reserved namespace is supported: a TRM package carries a single namespace and repair
|
|
10
|
+
* license. Z and Y need no namespace object and can be mixed with it.
|
|
11
|
+
*/
|
|
12
|
+
function getPackagesNamespace(rootDevclass, devclasses) {
|
|
13
|
+
const reservedNamespaces = [...new Set([rootDevclass, ...devclasses].map(getPackageNamespace_1.getPackageNamespace).filter(ns => ns[0] === '/'))];
|
|
14
|
+
if (reservedNamespaces.length > 1) {
|
|
15
|
+
throw new Error(`SAP packages must use at most one namespace, found: ${reservedNamespaces.join(', ')}.`);
|
|
16
|
+
}
|
|
17
|
+
const rootNamespace = (0, getPackageNamespace_1.getPackageNamespace)(rootDevclass);
|
|
18
|
+
return rootNamespace[0] === '/' || reservedNamespaces.length === 0 ? rootNamespace : reservedNamespaces[0];
|
|
19
|
+
}
|
package/dist/commons/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from "./normalize";
|
|
2
|
+
export * from "./packageDataFromTdevc";
|
|
2
3
|
export * from "./getFileSysSeparator";
|
|
3
4
|
export * from "./fromAbapToDate";
|
|
4
5
|
export * from "./PackageName";
|
|
@@ -8,6 +9,7 @@ export * from "./PackageHierarchy";
|
|
|
8
9
|
export * from "./getPackageHierarchy";
|
|
9
10
|
export * from "./getParentFromHierarchy";
|
|
10
11
|
export * from "./getPackageNamespace";
|
|
12
|
+
export * from "./getPackagesNamespace";
|
|
11
13
|
export * from "./LogTableStruct";
|
|
12
14
|
export * from "./getAxiosInstance";
|
|
13
15
|
export * from "./getNodePackage";
|
|
@@ -15,3 +17,5 @@ export * from "./getCoreTrmDependencies";
|
|
|
15
17
|
export * from "./checkCoreTrmDependencies";
|
|
16
18
|
export * from "./jsonStringifyWithKeyOrder";
|
|
17
19
|
export * from "./adjustTrmServerRestDevclass";
|
|
20
|
+
export * from "./summarizeForLog";
|
|
21
|
+
export * from "./resolveCoreVersion";
|
package/dist/commons/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./normalize"), exports);
|
|
18
|
+
__exportStar(require("./packageDataFromTdevc"), exports);
|
|
18
19
|
__exportStar(require("./getFileSysSeparator"), exports);
|
|
19
20
|
__exportStar(require("./fromAbapToDate"), exports);
|
|
20
21
|
__exportStar(require("./PackageName"), exports);
|
|
@@ -24,6 +25,7 @@ __exportStar(require("./PackageHierarchy"), exports);
|
|
|
24
25
|
__exportStar(require("./getPackageHierarchy"), exports);
|
|
25
26
|
__exportStar(require("./getParentFromHierarchy"), exports);
|
|
26
27
|
__exportStar(require("./getPackageNamespace"), exports);
|
|
28
|
+
__exportStar(require("./getPackagesNamespace"), exports);
|
|
27
29
|
__exportStar(require("./LogTableStruct"), exports);
|
|
28
30
|
__exportStar(require("./getAxiosInstance"), exports);
|
|
29
31
|
__exportStar(require("./getNodePackage"), exports);
|
|
@@ -31,3 +33,5 @@ __exportStar(require("./getCoreTrmDependencies"), exports);
|
|
|
31
33
|
__exportStar(require("./checkCoreTrmDependencies"), exports);
|
|
32
34
|
__exportStar(require("./jsonStringifyWithKeyOrder"), exports);
|
|
33
35
|
__exportStar(require("./adjustTrmServerRestDevclass"), exports);
|
|
36
|
+
__exportStar(require("./summarizeForLog"), exports);
|
|
37
|
+
__exportStar(require("./resolveCoreVersion"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SCOMPKDTLN, TDEVC } from "../client";
|
|
2
|
+
type PackageCreationOverrides = Pick<SCOMPKDTLN, "devclass" | "ctext" | "as4user" | "dlvunit" | "pdevclass">;
|
|
3
|
+
/**
|
|
4
|
+
* Convert the writable package attributes carried by a transported TDEVC row
|
|
5
|
+
* to the structure accepted by /ATRM/CREATE_PACKAGE.
|
|
6
|
+
*
|
|
7
|
+
* Target-owned routing and identity fields are supplied as overrides. Parentcl
|
|
8
|
+
* is intentionally omitted: the install workflow rebuilds the renamed package
|
|
9
|
+
* hierarchy only after every package exists.
|
|
10
|
+
*/
|
|
11
|
+
export declare function packageDataFromTdevc(source: TDEVC, overrides: PackageCreationOverrides): SCOMPKDTLN;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.packageDataFromTdevc = packageDataFromTdevc;
|
|
4
|
+
/**
|
|
5
|
+
* Convert the writable package attributes carried by a transported TDEVC row
|
|
6
|
+
* to the structure accepted by /ATRM/CREATE_PACKAGE.
|
|
7
|
+
*
|
|
8
|
+
* Target-owned routing and identity fields are supplied as overrides. Parentcl
|
|
9
|
+
* is intentionally omitted: the install workflow rebuilds the renamed package
|
|
10
|
+
* hierarchy only after every package exists.
|
|
11
|
+
*/
|
|
12
|
+
function packageDataFromTdevc(source, overrides) {
|
|
13
|
+
const result = Object.assign({}, overrides);
|
|
14
|
+
const copy = (target, value) => {
|
|
15
|
+
if (value !== undefined) {
|
|
16
|
+
result[target] = value;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
copy("korrflag", source.korrflag);
|
|
20
|
+
copy("perminher", source.perminher);
|
|
21
|
+
copy("packkind", source.packageKind);
|
|
22
|
+
copy("restricted", source.restricted);
|
|
23
|
+
copy("mainpack", source.mainpack);
|
|
24
|
+
return result;
|
|
25
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the version of trm-core in use.
|
|
3
|
+
*
|
|
4
|
+
* Clients may resolve trm-core from a different location (e.g. their global node modules), so a version
|
|
5
|
+
* they supply takes precedence over the package.json found by this package.
|
|
6
|
+
*
|
|
7
|
+
* @param coreVersion version supplied by the client
|
|
8
|
+
* @returns the version, or `undefined` when it can't be determined
|
|
9
|
+
*/
|
|
10
|
+
export declare function resolveCoreVersion(coreVersion?: string): string | undefined;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveCoreVersion = resolveCoreVersion;
|
|
4
|
+
const getNodePackage_1 = require("./getNodePackage");
|
|
5
|
+
/**
|
|
6
|
+
* Returns the version of trm-core in use.
|
|
7
|
+
*
|
|
8
|
+
* Clients may resolve trm-core from a different location (e.g. their global node modules), so a version
|
|
9
|
+
* they supply takes precedence over the package.json found by this package.
|
|
10
|
+
*
|
|
11
|
+
* @param coreVersion version supplied by the client
|
|
12
|
+
* @returns the version, or `undefined` when it can't be determined
|
|
13
|
+
*/
|
|
14
|
+
function resolveCoreVersion(coreVersion) {
|
|
15
|
+
if (coreVersion) {
|
|
16
|
+
return coreVersion;
|
|
17
|
+
}
|
|
18
|
+
try {
|
|
19
|
+
return (0, getNodePackage_1.getNodePackage)().version;
|
|
20
|
+
}
|
|
21
|
+
catch (_a) {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formats a request URL for diagnostic logging.
|
|
3
|
+
*
|
|
4
|
+
* Relative URLs are resolved against the base URL. Absolute URLs outside the base URL (such as
|
|
5
|
+
* signed download links) only keep their origin, since their path and query may grant access.
|
|
6
|
+
*
|
|
7
|
+
* @param baseURL Base URL of the client, if any.
|
|
8
|
+
* @param url Request URL.
|
|
9
|
+
* @returns A log-safe URL.
|
|
10
|
+
*/
|
|
11
|
+
export declare function summarizeUrlForLog(baseURL: string | undefined, url: string | undefined): string;
|
|
12
|
+
/**
|
|
13
|
+
* Creates a bounded, serialization-safe value for diagnostic logging.
|
|
14
|
+
*
|
|
15
|
+
* Sensitive fields are redacted, binary values are replaced with byte counts, non-plain class
|
|
16
|
+
* instances are represented by their type, circular references are marked, and large/deep values
|
|
17
|
+
* are truncated. The input value is never mutated.
|
|
18
|
+
*
|
|
19
|
+
* @param value Value to summarize.
|
|
20
|
+
* @returns A log-safe structure containing only primitives, arrays, and plain objects.
|
|
21
|
+
*/
|
|
22
|
+
export declare function summarizeForLog(value: any): any;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.summarizeUrlForLog = summarizeUrlForLog;
|
|
4
|
+
exports.summarizeForLog = summarizeForLog;
|
|
5
|
+
const MAX_LOG_DEPTH = 4;
|
|
6
|
+
const MAX_LOG_ARRAY_ITEMS = 20;
|
|
7
|
+
const MAX_LOG_OBJECT_KEYS = 30;
|
|
8
|
+
const MAX_LOG_STRING_LENGTH = 500;
|
|
9
|
+
function isSensitiveKey(key) {
|
|
10
|
+
const normalized = key.replace(/[^a-z]/gi, "").toLowerCase();
|
|
11
|
+
return [
|
|
12
|
+
"auth",
|
|
13
|
+
"authentication",
|
|
14
|
+
"authorization",
|
|
15
|
+
"cookie",
|
|
16
|
+
"cookies",
|
|
17
|
+
"credential",
|
|
18
|
+
"credentials",
|
|
19
|
+
"password",
|
|
20
|
+
"passwd",
|
|
21
|
+
"apikey",
|
|
22
|
+
"privatekey",
|
|
23
|
+
"downloadlink",
|
|
24
|
+
"replicense"
|
|
25
|
+
].includes(normalized) || normalized.endsWith("secret") || normalized.endsWith("token");
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Formats a request URL for diagnostic logging.
|
|
29
|
+
*
|
|
30
|
+
* Relative URLs are resolved against the base URL. Absolute URLs outside the base URL (such as
|
|
31
|
+
* signed download links) only keep their origin, since their path and query may grant access.
|
|
32
|
+
*
|
|
33
|
+
* @param baseURL Base URL of the client, if any.
|
|
34
|
+
* @param url Request URL.
|
|
35
|
+
* @returns A log-safe URL.
|
|
36
|
+
*/
|
|
37
|
+
function summarizeUrlForLog(baseURL, url) {
|
|
38
|
+
const sUrl = url || "";
|
|
39
|
+
if (!/^[a-z][a-z\d+\-.]*:\/\//i.test(sUrl)) {
|
|
40
|
+
return `${baseURL || ""}${sUrl}`;
|
|
41
|
+
}
|
|
42
|
+
if (baseURL && sUrl.startsWith(baseURL)) {
|
|
43
|
+
return sUrl;
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
return `${new URL(sUrl).origin}/[REDACTED]`;
|
|
47
|
+
}
|
|
48
|
+
catch (_a) {
|
|
49
|
+
return "[REDACTED]";
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Creates a bounded, serialization-safe value for diagnostic logging.
|
|
54
|
+
*
|
|
55
|
+
* Sensitive fields are redacted, binary values are replaced with byte counts, non-plain class
|
|
56
|
+
* instances are represented by their type, circular references are marked, and large/deep values
|
|
57
|
+
* are truncated. The input value is never mutated.
|
|
58
|
+
*
|
|
59
|
+
* @param value Value to summarize.
|
|
60
|
+
* @returns A log-safe structure containing only primitives, arrays, and plain objects.
|
|
61
|
+
*/
|
|
62
|
+
function summarizeForLog(value) {
|
|
63
|
+
return summarizeValue(value, 0, new WeakSet());
|
|
64
|
+
}
|
|
65
|
+
function summarizeValue(value, depth, seen) {
|
|
66
|
+
var _a, _b;
|
|
67
|
+
if (value === null || value === undefined || typeof value === "number" || typeof value === "boolean") {
|
|
68
|
+
return value;
|
|
69
|
+
}
|
|
70
|
+
if (typeof value === "string") {
|
|
71
|
+
return value.length <= MAX_LOG_STRING_LENGTH
|
|
72
|
+
? value
|
|
73
|
+
: `${value.slice(0, MAX_LOG_STRING_LENGTH)}… (${value.length} characters)`;
|
|
74
|
+
}
|
|
75
|
+
if (typeof value === "bigint") {
|
|
76
|
+
return value.toString();
|
|
77
|
+
}
|
|
78
|
+
if (typeof value === "symbol" || typeof value === "function") {
|
|
79
|
+
return `[${typeof value}]`;
|
|
80
|
+
}
|
|
81
|
+
if (Buffer.isBuffer(value)) {
|
|
82
|
+
return `<Buffer ${value.length} bytes>`;
|
|
83
|
+
}
|
|
84
|
+
if (ArrayBuffer.isView(value)) {
|
|
85
|
+
return `<${((_a = value.constructor) === null || _a === void 0 ? void 0 : _a.name) || "TypedArray"} ${value.byteLength} bytes>`;
|
|
86
|
+
}
|
|
87
|
+
if (value instanceof ArrayBuffer) {
|
|
88
|
+
return `<ArrayBuffer ${value.byteLength} bytes>`;
|
|
89
|
+
}
|
|
90
|
+
if (seen.has(value)) {
|
|
91
|
+
return "[Circular]";
|
|
92
|
+
}
|
|
93
|
+
const typeName = ((_b = value.constructor) === null || _b === void 0 ? void 0 : _b.name) || "Object";
|
|
94
|
+
if (depth >= MAX_LOG_DEPTH) {
|
|
95
|
+
return `[${typeName}]`;
|
|
96
|
+
}
|
|
97
|
+
seen.add(value);
|
|
98
|
+
if (Array.isArray(value)) {
|
|
99
|
+
const summary = value.slice(0, MAX_LOG_ARRAY_ITEMS).map(item => summarizeValue(item, depth + 1, seen));
|
|
100
|
+
if (value.length > MAX_LOG_ARRAY_ITEMS) {
|
|
101
|
+
summary.push(`… ${value.length - MAX_LOG_ARRAY_ITEMS} more items`);
|
|
102
|
+
}
|
|
103
|
+
return summary;
|
|
104
|
+
}
|
|
105
|
+
const prototype = Object.getPrototypeOf(value);
|
|
106
|
+
if (prototype !== Object.prototype && prototype !== null) {
|
|
107
|
+
return `[${typeName}]`;
|
|
108
|
+
}
|
|
109
|
+
const entries = Object.entries(value);
|
|
110
|
+
const summary = {};
|
|
111
|
+
entries.slice(0, MAX_LOG_OBJECT_KEYS).forEach(([key, entryValue]) => {
|
|
112
|
+
summary[key] = isSensitiveKey(key)
|
|
113
|
+
? "[REDACTED]"
|
|
114
|
+
: summarizeValue(entryValue, depth + 1, seen);
|
|
115
|
+
});
|
|
116
|
+
if (entries.length > MAX_LOG_OBJECT_KEYS) {
|
|
117
|
+
summary["…"] = `${entries.length - MAX_LOG_OBJECT_KEYS} more keys`;
|
|
118
|
+
}
|
|
119
|
+
return summary;
|
|
120
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RFCConnect } from "trm-commons";
|
|
2
|
+
import { ISystemConnector } from "../systemConnector";
|
|
3
|
+
/**
|
|
4
|
+
* Connection to an SAP system through RFC (open-rfc).
|
|
5
|
+
*
|
|
6
|
+
* Same connection data as {@link RFCConnect}, but the system connector
|
|
7
|
+
* uses open-rfc instead of node-rfc.
|
|
8
|
+
*/
|
|
9
|
+
export declare class OpenRFCConnect extends RFCConnect {
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
getSystemConnector(): ISystemConnector;
|
|
13
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OpenRFCConnect = void 0;
|
|
4
|
+
const trm_commons_1 = require("trm-commons");
|
|
5
|
+
const systemConnector_1 = require("../systemConnector");
|
|
6
|
+
/**
|
|
7
|
+
* Connection to an SAP system through RFC (open-rfc).
|
|
8
|
+
*
|
|
9
|
+
* Same connection data as {@link RFCConnect}, but the system connector
|
|
10
|
+
* uses open-rfc instead of node-rfc.
|
|
11
|
+
*/
|
|
12
|
+
class OpenRFCConnect extends trm_commons_1.RFCConnect {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.name = 'OPENRFC';
|
|
16
|
+
this.description = 'RFC (Uses open-rfc)';
|
|
17
|
+
}
|
|
18
|
+
getSystemConnector() {
|
|
19
|
+
const data = this.getData();
|
|
20
|
+
return new systemConnector_1.OpenRFCSystemConnector(data, data);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.OpenRFCConnect = OpenRFCConnect;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./OpenRFCConnect";
|
|
@@ -0,0 +1,17 @@
|
|
|
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("./OpenRFCConnect"), exports);
|
|
@@ -28,7 +28,9 @@ export declare class PackageDependencies {
|
|
|
28
28
|
readonly trmPackageDependencies: TrmPackageDependency[];
|
|
29
29
|
readonly abapPackageDependencies: AbapPackageDependency[];
|
|
30
30
|
private devclasses;
|
|
31
|
+
private ancestors;
|
|
31
32
|
constructor(devclass: DEVCLASS);
|
|
32
33
|
setDependencies(packageDependencies: ZTRM_OBJECT_DEPENDENCIES[]): Promise<PackageDependencies>;
|
|
34
|
+
private getAncestors;
|
|
33
35
|
private getDevclasses;
|
|
34
36
|
}
|
|
@@ -68,8 +68,10 @@ class PackageDependencies {
|
|
|
68
68
|
i = 0;
|
|
69
69
|
logProgress = trm_commons_1.Logger.progressbar('Building dependency tree [{bar}] {percentage}% ({value}/{total})', '>');
|
|
70
70
|
logProgress.start(this.allDependencies.length, 0);
|
|
71
|
+
//Logger.loading(`Building dependency tree...`, !log);
|
|
71
72
|
for (const o of this.allDependencies) {
|
|
72
73
|
for (const trmPackage of o.trmPackages) {
|
|
74
|
+
// only if the abap package of the trm package is not the same as the one analyzed
|
|
73
75
|
if (trmPackage.trmPackage.getDevclass() !== this.devclass) {
|
|
74
76
|
var depIndex = this.trmPackageDependencies.findIndex(k => k.trmPackage.compareName(trmPackage.trmPackage.packageName) && k.trmPackage.compareRegistry(trmPackage.trmPackage.registry));
|
|
75
77
|
if (depIndex < 0) {
|
|
@@ -86,9 +88,17 @@ class PackageDependencies {
|
|
|
86
88
|
}
|
|
87
89
|
}
|
|
88
90
|
}
|
|
91
|
+
// The root package's definition points to its superpackages: they're not shipped, and
|
|
92
|
+
// install places the root wherever the user chooses.
|
|
93
|
+
const isRootDefinition = o.object === 'DEVC' && o.objName === this.devclass;
|
|
89
94
|
for (const sapPackage of o.sapPackages) {
|
|
95
|
+
if (isRootDefinition && (yield this.getAncestors()).includes(sapPackage.package)) {
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
90
98
|
for (const dep of sapPackage.dependencies) {
|
|
99
|
+
// only if the abap package is not a subpackage of the one analyzed
|
|
91
100
|
if (!(yield this.getDevclasses()).includes(sapPackage.package)) {
|
|
101
|
+
// get the root, in trm we assume subpackages are part of the same package (supposing the user will generate on after a mising dependency)
|
|
92
102
|
const root = yield systemConnector_1.SystemConnector.getRootDevclass(sapPackage.package);
|
|
93
103
|
var packageIndex = this.abapPackageDependencies.findIndex(k => k.abapPackage.devclass === root);
|
|
94
104
|
if (packageIndex < 0) {
|
|
@@ -129,6 +139,20 @@ class PackageDependencies {
|
|
|
129
139
|
return this;
|
|
130
140
|
});
|
|
131
141
|
}
|
|
142
|
+
getAncestors() {
|
|
143
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
var _a, _b;
|
|
145
|
+
if (!this.ancestors) {
|
|
146
|
+
this.ancestors = [];
|
|
147
|
+
let parent = (_a = (yield systemConnector_1.SystemConnector.getDevclass(this.devclass))) === null || _a === void 0 ? void 0 : _a.parentcl;
|
|
148
|
+
while (parent && !this.ancestors.includes(parent)) {
|
|
149
|
+
this.ancestors.push(parent);
|
|
150
|
+
parent = (_b = (yield systemConnector_1.SystemConnector.getDevclass(parent))) === null || _b === void 0 ? void 0 : _b.parentcl;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return this.ancestors;
|
|
154
|
+
});
|
|
155
|
+
}
|
|
132
156
|
getDevclasses() {
|
|
133
157
|
return __awaiter(this, void 0, void 0, function* () {
|
|
134
158
|
if (!this.devclasses) {
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./actions"), exports);
|
|
18
18
|
__exportStar(require("./client"), exports);
|
|
19
19
|
__exportStar(require("./commons"), exports);
|
|
20
|
+
__exportStar(require("./connection"), exports);
|
|
20
21
|
__exportStar(require("./manifest"), exports);
|
|
21
22
|
__exportStar(require("./registry"), exports);
|
|
22
23
|
__exportStar(require("./dependencies"), exports);
|
|
@@ -8,16 +8,38 @@ export interface Lock {
|
|
|
8
8
|
export interface LockfileContent {
|
|
9
9
|
lockfileVersion: number;
|
|
10
10
|
source: string;
|
|
11
|
+
/** Name of the locked (root) package. */
|
|
11
12
|
name?: string;
|
|
13
|
+
/** Version of the locked (root) package. */
|
|
12
14
|
version?: string;
|
|
15
|
+
/** Registry endpoint of the locked (root) package; not recorded for a package installed from a local file. */
|
|
16
|
+
registry?: string;
|
|
17
|
+
/** Integrity of the locked (root) release; not recorded when the source system has none. */
|
|
18
|
+
integrity?: string;
|
|
13
19
|
packages?: Lock[];
|
|
14
20
|
}
|
|
21
|
+
/** Release of the locked (root) package recorded in a lockfile. */
|
|
22
|
+
export interface RootLock {
|
|
23
|
+
name: string;
|
|
24
|
+
version: string;
|
|
25
|
+
registry?: string;
|
|
26
|
+
integrity?: string;
|
|
27
|
+
}
|
|
15
28
|
export declare class Lockfile {
|
|
16
29
|
lockfile: LockfileContent;
|
|
17
30
|
private constructor();
|
|
18
31
|
static generate(root: TrmPackage, packages?: TrmPackage[]): Promise<Lockfile>;
|
|
19
32
|
static fromJson(json: any): Lockfile;
|
|
20
33
|
toJson(): string;
|
|
21
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Returns the locked (root) release, or `undefined` when the lockfile doesn't record it.
|
|
36
|
+
*/
|
|
37
|
+
getRootLock(): RootLock | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Returns the lock of `trmPackage`, or `undefined` when the lockfile has no entry for it
|
|
40
|
+
* (a lockfile generated without the package installed on the source system).
|
|
41
|
+
* @throws When the locked version does not satisfy `versionRange`.
|
|
42
|
+
*/
|
|
43
|
+
getLock(trmPackage: TrmPackage, versionRange: string): Lock | undefined;
|
|
22
44
|
static testReleaseByLock(lock: Lock): Promise<boolean>;
|
|
23
45
|
}
|
|
@@ -34,6 +34,16 @@ class Lockfile {
|
|
|
34
34
|
var dependencies = rootManifest.dependencies || [];
|
|
35
35
|
lock.name = rootManifest.name;
|
|
36
36
|
lock.version = rootManifest.version;
|
|
37
|
+
if (root.registry.getRegistryType() !== registry_1.RegistryType.LOCAL) {
|
|
38
|
+
lock.registry = root.registry.endpoint;
|
|
39
|
+
}
|
|
40
|
+
const rootIntegrity = yield systemConnector_1.SystemConnector.getPackageIntegrity(root);
|
|
41
|
+
if (rootIntegrity) {
|
|
42
|
+
lock.integrity = rootIntegrity;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
trm_commons_1.Logger.warning(`Integrity of package "${rootManifest.name}" is missing in system ${systemConnector_1.SystemConnector.getDest()}: clean installs won't verify its release. Reinstall it to restore its package data.`, { important: true });
|
|
46
|
+
}
|
|
37
47
|
for (const dep of dependencies) {
|
|
38
48
|
if (dep.registry === registry_1.LOCAL_RESERVED_KEYWORD) {
|
|
39
49
|
throw new Error(`Cannot generate lockfile: dependency with local package "${dep.name}"`);
|
|
@@ -48,6 +58,9 @@ class Lockfile {
|
|
|
48
58
|
if (depPackage) {
|
|
49
59
|
const depManifest = depPackage.manifest.get();
|
|
50
60
|
const depIntegrity = yield systemConnector_1.SystemConnector.getPackageIntegrity(depPackage);
|
|
61
|
+
if (!depIntegrity) {
|
|
62
|
+
throw new Error(`Cannot generate lockfile: integrity of dependency "${dep.name}", registry "${depRegistry.endpoint}" is missing in system ${systemConnector_1.SystemConnector.getDest()}. Reinstall it to restore its package data.`);
|
|
63
|
+
}
|
|
51
64
|
lock.packages.push({
|
|
52
65
|
name: dep.name,
|
|
53
66
|
version: depManifest.version,
|
|
@@ -57,7 +70,7 @@ class Lockfile {
|
|
|
57
70
|
dependencies = dependencies.concat(depManifest.dependencies || []);
|
|
58
71
|
}
|
|
59
72
|
else {
|
|
60
|
-
trm_commons_1.Logger.warning(`Dependency "${dep.name}", registry "${depRegistry.endpoint}" not found in system ${systemConnector_1.SystemConnector.getDest()}
|
|
73
|
+
trm_commons_1.Logger.warning(`Dependency "${dep.name}", registry "${depRegistry.endpoint}" not found in system ${systemConnector_1.SystemConnector.getDest()}`, { important: true });
|
|
61
74
|
}
|
|
62
75
|
}
|
|
63
76
|
}
|
|
@@ -76,31 +89,54 @@ class Lockfile {
|
|
|
76
89
|
"lockfileVersion",
|
|
77
90
|
"source",
|
|
78
91
|
"name",
|
|
79
|
-
"version"
|
|
92
|
+
"version",
|
|
93
|
+
"registry",
|
|
94
|
+
"integrity"
|
|
80
95
|
];
|
|
81
96
|
return (0, commons_1.jsonStringifyWithKeyOrder)(this.lockfile, KEYS_ORDER, 2);
|
|
82
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* Returns the locked (root) release, or `undefined` when the lockfile doesn't record it.
|
|
100
|
+
*/
|
|
101
|
+
getRootLock() {
|
|
102
|
+
const { name, version, registry, integrity } = this.lockfile;
|
|
103
|
+
if (!name || !version) {
|
|
104
|
+
return undefined;
|
|
105
|
+
}
|
|
106
|
+
return { name, version, registry: registry || undefined, integrity: integrity || undefined };
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Returns the lock of `trmPackage`, or `undefined` when the lockfile has no entry for it
|
|
110
|
+
* (a lockfile generated without the package installed on the source system).
|
|
111
|
+
* @throws When the locked version does not satisfy `versionRange`.
|
|
112
|
+
*/
|
|
83
113
|
getLock(trmPackage, versionRange) {
|
|
84
114
|
var _a;
|
|
85
115
|
const lock = (_a = this.lockfile.packages) === null || _a === void 0 ? void 0 : _a.find(o => trmPackage.compareName(o.name) && trmPackage.compareRegistry(registry_1.RegistryProvider.getRegistry(o.registry)));
|
|
86
|
-
if (!lock
|
|
87
|
-
|
|
116
|
+
if (!lock) {
|
|
117
|
+
return undefined;
|
|
118
|
+
}
|
|
119
|
+
if (!(0, semver_1.satisfies)(lock.version, versionRange, { includePrerelease: true })) {
|
|
120
|
+
throw new Error(`Lock for package "${trmPackage.packageName}", registry "${trmPackage.registry.endpoint}" pins v${lock.version}, which does not satisfy ${versionRange}.`);
|
|
88
121
|
}
|
|
89
122
|
return lock;
|
|
90
123
|
}
|
|
91
124
|
static testReleaseByLock(lock) {
|
|
92
125
|
return __awaiter(this, void 0, void 0, function* () {
|
|
126
|
+
if (!lock.integrity) {
|
|
127
|
+
throw new Error(`Lock for package "${lock.name}", registry "${lock.registry}" has no integrity: regenerate the lockfile.`);
|
|
128
|
+
}
|
|
93
129
|
const registry = registry_1.RegistryProvider.getRegistry(lock.registry);
|
|
94
130
|
const ping = yield registry.ping();
|
|
95
131
|
const release = yield registry.getPackage(lock.name, lock.version);
|
|
96
132
|
const artifact = yield registry.downloadArtifact(lock.name, lock.version);
|
|
97
133
|
const checksum = (0, crypto_1.createHash)("sha512").update(artifact.binary).digest("base64");
|
|
98
134
|
if (release.checksum !== lock.integrity || checksum !== lock.integrity) {
|
|
99
|
-
trm_commons_1.Logger.error(`SECURITY ISSUE! Release "${lock.name}", registry "${lock.registry}", integrity in lockfile does NOT match
|
|
100
|
-
trm_commons_1.Logger.error(`SECURITY ISSUE! Registry SHA is ${release.checksum}
|
|
101
|
-
trm_commons_1.Logger.error(`SECURITY ISSUE! Artifact SHA is ${checksum}
|
|
102
|
-
trm_commons_1.Logger.error(`SECURITY ISSUE! Lockfile SHA is ${lock.integrity}
|
|
103
|
-
trm_commons_1.Logger.error(`SECURITY ISSUE! Please, report the issue to ${ping && ping.alert_email ? ping.alert_email : 'registry moderation team'}
|
|
135
|
+
trm_commons_1.Logger.error(`SECURITY ISSUE! Release "${lock.name}", registry "${lock.registry}", integrity in lockfile does NOT match!`, { important: true });
|
|
136
|
+
trm_commons_1.Logger.error(`SECURITY ISSUE! Registry SHA is ${release.checksum}`, { important: true });
|
|
137
|
+
trm_commons_1.Logger.error(`SECURITY ISSUE! Artifact SHA is ${checksum}`, { important: true });
|
|
138
|
+
trm_commons_1.Logger.error(`SECURITY ISSUE! Lockfile SHA is ${lock.integrity}`, { important: true });
|
|
139
|
+
trm_commons_1.Logger.error(`SECURITY ISSUE! Please, report the issue to ${ping && ping.alert_email ? ping.alert_email : 'registry moderation team'}`, { important: true });
|
|
104
140
|
return false;
|
|
105
141
|
}
|
|
106
142
|
return true;
|
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
import { TrmManifest } from "./TrmManifest";
|
|
2
|
-
import { Transport } from "../transport";
|
|
3
2
|
import { TrmPackage } from "../trmPackage";
|
|
4
3
|
import { TrmManifestAuthor } from "./TrmManifestAuthor";
|
|
5
4
|
export declare class Manifest {
|
|
6
5
|
private _manifest;
|
|
7
6
|
private _filePath?;
|
|
8
7
|
constructor(_manifest: TrmManifest, _filePath?: string);
|
|
9
|
-
get(
|
|
8
|
+
get(): TrmManifest;
|
|
10
9
|
getKey(keepVersion?: boolean): string;
|
|
11
10
|
setDistFolder(dist: string): Manifest;
|
|
12
11
|
setSrcFolder(src: string): Manifest;
|
|
13
|
-
setLinkedTransport(transport: Transport): Manifest;
|
|
14
|
-
getLinkedTransport(): Transport | null;
|
|
15
12
|
setRegistryEndpoint(endpoint: string): void;
|
|
16
13
|
getJSON(ignoredKeys?: string[]): string;
|
|
17
14
|
getAbapXml(): string;
|
|
18
15
|
getPackage(): TrmPackage;
|
|
19
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Checks whether a dependency version is an acceptable semantic-version range.
|
|
18
|
+
*
|
|
19
|
+
* Stricter than `semver.validRange`: an empty or blank range (which semver reads as `*`)
|
|
20
|
+
* is rejected, so every dependency must declare an explicit range.
|
|
21
|
+
*/
|
|
22
|
+
static isValidDependencyRange(range: unknown): boolean;
|
|
23
|
+
static normalize(manifest: TrmManifest): TrmManifest;
|
|
20
24
|
static fromAbapXml(sXml: string): Manifest;
|
|
21
25
|
static _parseAbapXmlSapEntriesArray(input: any): any[];
|
|
22
26
|
static fromJson(sJson: string): Manifest;
|