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
package/dist/transport/index.js
CHANGED
|
@@ -15,8 +15,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./Transport"), exports);
|
|
18
|
+
__exportStar(require("./E071KOwner"), exports);
|
|
18
19
|
__exportStar(require("./BinaryTransport"), exports);
|
|
19
20
|
__exportStar(require("./FileNames"), exports);
|
|
20
21
|
__exportStar(require("./FilePaths"), exports);
|
|
21
22
|
__exportStar(require("./Documentation"), exports);
|
|
22
23
|
__exportStar(require("./TrmTransportIdentifier"), exports);
|
|
24
|
+
__exportStar(require("./R3transLogParser"), exports);
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { TRKORR } from "../client";
|
|
1
|
+
import { TRKORR, TransportEntries } from "../client";
|
|
2
2
|
import { TrmTransportIdentifier, BinaryTransport } from "../transport";
|
|
3
3
|
export type TransportBinary = {
|
|
4
4
|
trkorr: TRKORR;
|
|
5
5
|
type?: TrmTransportIdentifier;
|
|
6
6
|
binaries: BinaryTransport;
|
|
7
|
+
entries: TransportEntries;
|
|
8
|
+
/** SHA-512 (base64) of the packed entries JSON, set when read from an artifact. */
|
|
9
|
+
entriesChecksum?: string;
|
|
7
10
|
};
|
|
@@ -1,23 +1,27 @@
|
|
|
1
|
+
import { AS4TEXT, TRKORR } from "../client";
|
|
1
2
|
import { Manifest } from "../manifest";
|
|
2
|
-
import { Transport } from "../transport";
|
|
3
|
-
import { R3transOptions } from "node-r3trans";
|
|
3
|
+
import { Transport, TrmTransportIdentifier } from "../transport";
|
|
4
4
|
import { TransportBinary } from "./TransportBinary";
|
|
5
|
+
export declare const TRANSPORT_INDEX_FILE = "transport_index.json";
|
|
6
|
+
export type TransportIndexEntry = {
|
|
7
|
+
trkorr: TRKORR;
|
|
8
|
+
type: TrmTransportIdentifier;
|
|
9
|
+
description: AS4TEXT;
|
|
10
|
+
};
|
|
5
11
|
export declare class TrmArtifact {
|
|
6
12
|
binary: Buffer;
|
|
7
13
|
private _distFolder?;
|
|
8
|
-
private _srcFolder?;
|
|
9
14
|
private _manifest?;
|
|
10
15
|
private _zip;
|
|
11
|
-
private _binaries;
|
|
12
|
-
private _content;
|
|
13
16
|
private _filePath;
|
|
14
|
-
|
|
17
|
+
private _transportBinaries;
|
|
18
|
+
constructor(binary: Buffer, _distFolder?: string, _manifest?: Manifest);
|
|
15
19
|
setFilePath(filePath: string): void;
|
|
16
20
|
getManifest(): Manifest | null;
|
|
17
21
|
replaceManifest(oManifest: Manifest): void;
|
|
18
22
|
getDistFolder(): string | null;
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
getTransportIndex(): TransportIndexEntry[];
|
|
24
|
+
getTransportBinaries(): Promise<TransportBinary[]>;
|
|
21
25
|
static create(data: {
|
|
22
26
|
transports: Transport[];
|
|
23
27
|
manifest: Manifest;
|
|
@@ -42,18 +42,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
42
42
|
});
|
|
43
43
|
};
|
|
44
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
-
exports.TrmArtifact = void 0;
|
|
45
|
+
exports.TrmArtifact = exports.TRANSPORT_INDEX_FILE = void 0;
|
|
46
46
|
const trm_commons_1 = require("trm-commons");
|
|
47
47
|
const manifest_1 = require("../manifest");
|
|
48
|
+
const transport_1 = require("../transport");
|
|
48
49
|
const AdmZip = __importStar(require("adm-zip"));
|
|
49
|
-
const
|
|
50
|
+
const commons_1 = require("../commons");
|
|
51
|
+
const crypto_1 = require("crypto");
|
|
50
52
|
const DIST_FOLDER = 'dist';
|
|
51
53
|
const SRC_FOLDER = 'src';
|
|
54
|
+
exports.TRANSPORT_INDEX_FILE = 'transport_index.json';
|
|
52
55
|
class TrmArtifact {
|
|
53
|
-
constructor(binary, _distFolder,
|
|
56
|
+
constructor(binary, _distFolder, _manifest) {
|
|
54
57
|
this.binary = binary;
|
|
55
58
|
this._distFolder = _distFolder;
|
|
56
|
-
this._srcFolder = _srcFolder;
|
|
57
59
|
this._manifest = _manifest;
|
|
58
60
|
this._zip = new AdmZip.default(binary);
|
|
59
61
|
}
|
|
@@ -63,8 +65,8 @@ class TrmArtifact {
|
|
|
63
65
|
getManifest() {
|
|
64
66
|
if (this._manifest === undefined) {
|
|
65
67
|
const zipEntries = this._zip.getEntries();
|
|
66
|
-
const manifestEntry = zipEntries.find(o => o.
|
|
67
|
-
const sapEntriesEntry = zipEntries.find(o => o.
|
|
68
|
+
const manifestEntry = zipEntries.find(o => { var _a; return ((_a = o.comment) === null || _a === void 0 ? void 0 : _a.trim().toLowerCase()) === 'manifest'; });
|
|
69
|
+
const sapEntriesEntry = zipEntries.find(o => { var _a; return ((_a = o.comment) === null || _a === void 0 ? void 0 : _a.trim().toLowerCase()) === 'sap_entries'; });
|
|
68
70
|
if (!manifestEntry) {
|
|
69
71
|
this._manifest = null;
|
|
70
72
|
}
|
|
@@ -77,7 +79,7 @@ class TrmArtifact {
|
|
|
77
79
|
const sapEntries = JSON.parse(sapEntriesEntry.getData().toString());
|
|
78
80
|
jsonManifest.sapEntries = Object.assign(Object.assign({}, jsonManifest.sapEntries), sapEntries);
|
|
79
81
|
}
|
|
80
|
-
const trmManifest = manifest_1.Manifest.normalize(jsonManifest
|
|
82
|
+
const trmManifest = manifest_1.Manifest.normalize(jsonManifest);
|
|
81
83
|
this._manifest = new manifest_1.Manifest(trmManifest, this._filePath);
|
|
82
84
|
}
|
|
83
85
|
}
|
|
@@ -94,84 +96,85 @@ class TrmArtifact {
|
|
|
94
96
|
}
|
|
95
97
|
return this._distFolder;
|
|
96
98
|
}
|
|
97
|
-
|
|
99
|
+
getTransportIndex() {
|
|
100
|
+
const matches = this._zip.getEntries().filter(entry => entry.entryName === exports.TRANSPORT_INDEX_FILE);
|
|
101
|
+
if (matches.length !== 1) {
|
|
102
|
+
throw new Error(`Artifact is missing a unique ${exports.TRANSPORT_INDEX_FILE}. Republish the package with a current TRM version.`);
|
|
103
|
+
}
|
|
104
|
+
let value;
|
|
105
|
+
try {
|
|
106
|
+
value = JSON.parse(matches[0].getData().toString('utf8'));
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
throw new Error(`Artifact ${exports.TRANSPORT_INDEX_FILE} is malformed. Republish the package with a current TRM version.`);
|
|
110
|
+
}
|
|
111
|
+
if (!Array.isArray(value) || value.length === 0) {
|
|
112
|
+
throw new Error(`Artifact ${exports.TRANSPORT_INDEX_FILE} is incomplete. Republish the package with a current TRM version.`);
|
|
113
|
+
}
|
|
114
|
+
const allowed = new Set(Object.values(transport_1.TrmTransportIdentifier));
|
|
115
|
+
const seen = new Set();
|
|
116
|
+
for (const item of value) {
|
|
117
|
+
if (!item || typeof item.trkorr !== 'string' || !item.trkorr || !allowed.has(item.type) || typeof item.description !== 'string' || seen.has(item.trkorr)) {
|
|
118
|
+
throw new Error(`Artifact ${exports.TRANSPORT_INDEX_FILE} contains invalid or duplicate transports. Republish the package with a current TRM version.`);
|
|
119
|
+
}
|
|
120
|
+
seen.add(item.trkorr);
|
|
121
|
+
}
|
|
122
|
+
return value;
|
|
123
|
+
}
|
|
124
|
+
getTransportBinaries() {
|
|
98
125
|
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
-
|
|
100
|
-
if (!this._binaries) {
|
|
126
|
+
if (this._transportBinaries === undefined) {
|
|
101
127
|
const distFolder = this.getDistFolder();
|
|
102
128
|
if (!distFolder) {
|
|
103
|
-
throw new Error(`
|
|
129
|
+
throw new Error(`Unable to locate dist folder.`);
|
|
104
130
|
}
|
|
105
131
|
const zipEntries = this._zip.getEntries();
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
if (
|
|
110
|
-
|
|
132
|
+
const transportBinaries = [];
|
|
133
|
+
const index = this.getTransportIndex();
|
|
134
|
+
const packedEntries = zipEntries.filter(o => o.entryName.startsWith(`${distFolder}/`) && !o.isDirectory);
|
|
135
|
+
if (packedEntries.length !== index.length) {
|
|
136
|
+
throw new Error(`Artifact transport files do not match ${exports.TRANSPORT_INDEX_FILE}. Republish the package.`);
|
|
111
137
|
}
|
|
112
|
-
for (const
|
|
138
|
+
for (const metadata of index) {
|
|
113
139
|
try {
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
const oHeader = (_a = aPackedTransportEntries.find(o => o.comment === 'header')) === null || _a === void 0 ? void 0 : _a.getData();
|
|
118
|
-
const oData = (_b = aPackedTransportEntries.find(o => o.comment === 'data')) === null || _b === void 0 ? void 0 : _b.getData();
|
|
119
|
-
if (oHeader && oData) {
|
|
120
|
-
var trkorr;
|
|
121
|
-
if (noCheck) {
|
|
122
|
-
const filename = aPackedTransportEntries.find(o => o.comment === 'header').entryName;
|
|
123
|
-
trkorr = (filename.slice(-3) + filename.slice(0, -3)).slice(0, -1);
|
|
124
|
-
}
|
|
125
|
-
else {
|
|
126
|
-
trkorr = yield r3trans.getTransportTrkorr(oData);
|
|
127
|
-
}
|
|
128
|
-
aResult.push({
|
|
129
|
-
trkorr,
|
|
130
|
-
type: type,
|
|
131
|
-
binaries: {
|
|
132
|
-
header: oHeader,
|
|
133
|
-
data: oData
|
|
134
|
-
}
|
|
135
|
-
});
|
|
140
|
+
const matches = packedEntries.filter(entry => entry.name === metadata.trkorr);
|
|
141
|
+
if (matches.length !== 1 || matches[0].comment !== metadata.type) {
|
|
142
|
+
throw new Error(`Packed transport ${metadata.trkorr} does not match its index entry`);
|
|
136
143
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
try {
|
|
151
|
-
const transportBinaries = yield this.getTransportBinaries(r3transConfig);
|
|
152
|
-
const r3trans = new node_r3trans_1.R3trans(r3transConfig);
|
|
153
|
-
for (const transportBinary of transportBinaries) {
|
|
154
|
-
const tableEntries = yield r3trans.getTableEntries(transportBinary.binaries.data);
|
|
155
|
-
if (!this._content[transportBinary.type]) {
|
|
156
|
-
this._content[transportBinary.type] = {
|
|
157
|
-
trkorr: transportBinary.trkorr,
|
|
158
|
-
content: {}
|
|
159
|
-
};
|
|
144
|
+
const entry = matches[0];
|
|
145
|
+
const zippedTransport = new AdmZip.default(entry.getData());
|
|
146
|
+
const header = zippedTransport.getEntries().find(o => o.comment === 'header');
|
|
147
|
+
const data = zippedTransport.getEntries().find(o => o.comment === 'data');
|
|
148
|
+
const entryFiles = zippedTransport.getEntries().filter(o => o.comment === 'entries' && o.name === `${metadata.trkorr}.JSON`);
|
|
149
|
+
if (!header || !data || entryFiles.length !== 1) {
|
|
150
|
+
throw new Error(`Packed transport ${metadata.trkorr} is incomplete`);
|
|
151
|
+
}
|
|
152
|
+
const entriesData = entryFiles[0].getData();
|
|
153
|
+
const transportEntries = JSON.parse(entriesData.toString());
|
|
154
|
+
if (!transportEntries || !Array.isArray(transportEntries.e071) || transportEntries.e071.length === 0 ||
|
|
155
|
+
!Array.isArray(transportEntries.tdevc) || !Array.isArray(transportEntries.tdevct) || !Array.isArray(transportEntries.tadir)) {
|
|
156
|
+
throw new Error(`Packed transport ${metadata.trkorr} has incomplete entries`);
|
|
160
157
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
158
|
+
transportBinaries.push({
|
|
159
|
+
trkorr: metadata.trkorr,
|
|
160
|
+
type: metadata.type,
|
|
161
|
+
entries: (0, commons_1.normalize)(transportEntries),
|
|
162
|
+
entriesChecksum: (0, crypto_1.createHash)('sha512').update(entriesData).digest('base64'),
|
|
163
|
+
binaries: {
|
|
164
|
+
header: header.getData(),
|
|
165
|
+
data: data.getData()
|
|
164
166
|
}
|
|
165
|
-
this._content[transportBinary.type].content[table] = this._content[transportBinary.type].content[table].concat(tableEntries[table]);
|
|
166
167
|
});
|
|
167
168
|
}
|
|
169
|
+
catch (e) {
|
|
170
|
+
trm_commons_1.Logger.error(`Malformed artifact!`, true);
|
|
171
|
+
trm_commons_1.Logger.error(e.toString(), true);
|
|
172
|
+
throw new Error(`Artifact transport ${metadata.trkorr} is malformed. Republish the package with a current TRM version.`);
|
|
173
|
+
}
|
|
168
174
|
}
|
|
169
|
-
|
|
170
|
-
delete this._content;
|
|
171
|
-
throw e;
|
|
172
|
-
}
|
|
175
|
+
this._transportBinaries = transportBinaries;
|
|
173
176
|
}
|
|
174
|
-
return this.
|
|
177
|
+
return this._transportBinaries;
|
|
175
178
|
});
|
|
176
179
|
}
|
|
177
180
|
static create(data) {
|
|
@@ -185,13 +188,23 @@ class TrmArtifact {
|
|
|
185
188
|
var binaries = [];
|
|
186
189
|
var packedTransports = [];
|
|
187
190
|
for (const transport of data.transports) {
|
|
191
|
+
if (!transport.trmIdentifier || !Object.values(transport_1.TrmTransportIdentifier).includes(transport.trmIdentifier)) {
|
|
192
|
+
throw new Error(`Transport ${transport.trkorr} has no valid TRM transport type.`);
|
|
193
|
+
}
|
|
188
194
|
trm_commons_1.Logger.log(`Downloading transport ${transport.trmIdentifier}`, true);
|
|
189
195
|
const trBinary = yield transport.download();
|
|
196
|
+
const entries = yield transport.getEntries();
|
|
197
|
+
if (!entries || !Array.isArray(entries.e071) || entries.e071.length === 0 ||
|
|
198
|
+
!Array.isArray(entries.tdevc) || !Array.isArray(entries.tdevct) || !Array.isArray(entries.tadir)) {
|
|
199
|
+
throw new Error(`Transport ${transport.trkorr} returned incomplete entries.`);
|
|
200
|
+
}
|
|
190
201
|
binaries.push({
|
|
191
202
|
trkorr: transport.trkorr,
|
|
192
203
|
type: transport.trmIdentifier,
|
|
193
204
|
binaries: trBinary.binaries,
|
|
194
|
-
filenames: trBinary.filenames
|
|
205
|
+
filenames: trBinary.filenames,
|
|
206
|
+
entries,
|
|
207
|
+
description: yield transport.getDescription()
|
|
195
208
|
});
|
|
196
209
|
}
|
|
197
210
|
for (const bin of binaries) {
|
|
@@ -200,6 +213,7 @@ class TrmArtifact {
|
|
|
200
213
|
packedTransport.addZipComment(`Transport request: ${bin.trkorr}\nContent type: ${bin.type || 'Unknown'}`);
|
|
201
214
|
packedTransport.addFile(bin.filenames.header, bin.binaries.header, "header");
|
|
202
215
|
packedTransport.addFile(bin.filenames.data, bin.binaries.data, "data");
|
|
216
|
+
packedTransport.addFile(`${bin.trkorr}.JSON`, Buffer.from(JSON.stringify(bin.entries, null, 2), 'utf8'), "entries");
|
|
203
217
|
packedTransports.push({
|
|
204
218
|
filename: bin.trkorr,
|
|
205
219
|
binary: packedTransport.toBuffer(),
|
|
@@ -210,6 +224,11 @@ class TrmArtifact {
|
|
|
210
224
|
trm_commons_1.Logger.log(`Adding packed transport ${file.comment} to artifact`, true);
|
|
211
225
|
artifact.addFile(`${data.distFolder}/${file.filename}`, file.binary, file.comment);
|
|
212
226
|
}
|
|
227
|
+
artifact.addFile(exports.TRANSPORT_INDEX_FILE, Buffer.from(JSON.stringify(binaries.map(bin => ({
|
|
228
|
+
trkorr: bin.trkorr,
|
|
229
|
+
type: bin.type,
|
|
230
|
+
description: bin.description
|
|
231
|
+
})), null, 2), 'utf8'));
|
|
213
232
|
data.manifest.setDistFolder(data.distFolder);
|
|
214
233
|
if (data.sourceCode) {
|
|
215
234
|
trm_commons_1.Logger.log(`Adding source code`, true);
|
|
@@ -225,7 +244,7 @@ class TrmArtifact {
|
|
|
225
244
|
}
|
|
226
245
|
catch (e) {
|
|
227
246
|
trm_commons_1.Logger.error(e.toString(), true);
|
|
228
|
-
trm_commons_1.Logger.error(`Couldn't add source code to TRM artifact
|
|
247
|
+
trm_commons_1.Logger.error(`Couldn't add source code to TRM artifact!`, { important: true });
|
|
229
248
|
}
|
|
230
249
|
}
|
|
231
250
|
const oSapEntries = data.manifest.get().sapEntries;
|
|
@@ -237,7 +256,7 @@ class TrmArtifact {
|
|
|
237
256
|
trm_commons_1.Logger.log(`Adding sap_entries.json`, true);
|
|
238
257
|
artifact.addFile(`sap_entries.json`, sapEntriesBuffer, `sap_entries`);
|
|
239
258
|
}
|
|
240
|
-
return new TrmArtifact(artifact.toBuffer(), data.distFolder, data.
|
|
259
|
+
return new TrmArtifact(artifact.toBuffer(), data.distFolder, data.manifest);
|
|
241
260
|
});
|
|
242
261
|
}
|
|
243
262
|
}
|
|
@@ -2,30 +2,44 @@ import { Manifest } from "../manifest";
|
|
|
2
2
|
import { AbstractRegistry } from "../registry";
|
|
3
3
|
import { TrmArtifact } from "./TrmArtifact";
|
|
4
4
|
import { DEVCLASS, ZTRM_DIRTY } from "../client";
|
|
5
|
-
import { Transport, TrmTransportIdentifier } from "../transport";
|
|
6
5
|
import { Lockfile } from "../lockfile";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
import { Transport } from "../transport";
|
|
7
|
+
/** Exact persisted TRM package row, retained for transactional install rollback. */
|
|
8
|
+
export interface TrmPackageMetadataSnapshot {
|
|
9
|
+
package_name: string;
|
|
10
|
+
package_registry: string;
|
|
11
|
+
manifest: Buffer;
|
|
12
|
+
trkorr: string;
|
|
13
|
+
integrity: string;
|
|
14
|
+
devclass: string;
|
|
15
|
+
}
|
|
11
16
|
export declare class TrmPackage {
|
|
12
17
|
packageName: string;
|
|
13
18
|
registry: AbstractRegistry;
|
|
14
19
|
manifest?: Manifest;
|
|
15
20
|
private _devclass;
|
|
16
21
|
private _dirtyEntries;
|
|
17
|
-
private
|
|
22
|
+
private _transport;
|
|
23
|
+
private _metadataSnapshot?;
|
|
24
|
+
private _publishedIntegrity?;
|
|
18
25
|
constructor(packageName: string, registry: AbstractRegistry, manifest?: Manifest);
|
|
19
26
|
setDirtyEntries(entries: ZTRM_DIRTY[]): TrmPackage;
|
|
20
27
|
isDirty(): boolean;
|
|
21
28
|
getDirtyEntries(): ZTRM_DIRTY[];
|
|
22
29
|
setDevclass(devclass: DEVCLASS): TrmPackage;
|
|
23
30
|
getDevclass(): DEVCLASS;
|
|
31
|
+
setTransport(transport: Transport): TrmPackage;
|
|
32
|
+
getTransport(): Transport | undefined;
|
|
33
|
+
setMetadataSnapshot(snapshot: TrmPackageMetadataSnapshot): TrmPackage;
|
|
34
|
+
getMetadataSnapshot(): TrmPackageMetadataSnapshot | undefined;
|
|
35
|
+
/** Release integrity reported by the registry on publish, if any. */
|
|
36
|
+
getPublishedIntegrity(): string | undefined;
|
|
24
37
|
publish(data: {
|
|
25
38
|
artifact: TrmArtifact;
|
|
26
39
|
readme?: string;
|
|
27
40
|
tags?: string[];
|
|
28
41
|
changelog?: string;
|
|
42
|
+
retainedCustomizing?: string[];
|
|
29
43
|
}): Promise<TrmPackage>;
|
|
30
44
|
compareRegistry(registry: AbstractRegistry): boolean;
|
|
31
45
|
compareName(name: string): boolean;
|
|
@@ -37,6 +37,24 @@ class TrmPackage {
|
|
|
37
37
|
getDevclass() {
|
|
38
38
|
return this._devclass;
|
|
39
39
|
}
|
|
40
|
+
setTransport(transport) {
|
|
41
|
+
this._transport = transport;
|
|
42
|
+
return this;
|
|
43
|
+
}
|
|
44
|
+
getTransport() {
|
|
45
|
+
return this._transport;
|
|
46
|
+
}
|
|
47
|
+
setMetadataSnapshot(snapshot) {
|
|
48
|
+
this._metadataSnapshot = snapshot;
|
|
49
|
+
return this;
|
|
50
|
+
}
|
|
51
|
+
getMetadataSnapshot() {
|
|
52
|
+
return this._metadataSnapshot;
|
|
53
|
+
}
|
|
54
|
+
/** Release integrity reported by the registry on publish, if any. */
|
|
55
|
+
getPublishedIntegrity() {
|
|
56
|
+
return this._publishedIntegrity;
|
|
57
|
+
}
|
|
40
58
|
publish(data) {
|
|
41
59
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
60
|
const artifact = data.artifact;
|
|
@@ -51,7 +69,14 @@ class TrmPackage {
|
|
|
51
69
|
tags = data.tags.join(',');
|
|
52
70
|
}
|
|
53
71
|
trm_commons_1.Logger.loading(`Publishing "${packageName}" ${packageVersion} to registry "${this.registry.name}"...`, false);
|
|
54
|
-
yield this.registry.publish(packageName, packageVersion, artifact,
|
|
72
|
+
const result = yield this.registry.publish(packageName, packageVersion, artifact, {
|
|
73
|
+
readme: data.readme,
|
|
74
|
+
retainedCustomizing: data.retainedCustomizing,
|
|
75
|
+
changelog: data.changelog,
|
|
76
|
+
tags
|
|
77
|
+
});
|
|
78
|
+
this._publishedIntegrity = result ? result.integrity : undefined;
|
|
79
|
+
//set
|
|
55
80
|
this.manifest = new manifest_1.Manifest(trmManifest);
|
|
56
81
|
return this;
|
|
57
82
|
});
|
|
@@ -73,6 +98,7 @@ class TrmPackage {
|
|
|
73
98
|
});
|
|
74
99
|
}
|
|
75
100
|
static compare(o1, o2) {
|
|
101
|
+
//this only compares name and registry NOT version!
|
|
76
102
|
return o1.compareName(o2.packageName) && o1.compareRegistry(o2.registry);
|
|
77
103
|
}
|
|
78
104
|
}
|
|
@@ -20,10 +20,14 @@ function validateDevclass(devclass, allowTemporaryPackages) {
|
|
|
20
20
|
return 'Temporary packages cannot be released. Move content to a transportable package.';
|
|
21
21
|
}
|
|
22
22
|
else {
|
|
23
|
+
//check if this package exists
|
|
23
24
|
const tdevc = yield systemConnector_1.SystemConnector.getDevclass(devclass);
|
|
24
25
|
if (!tdevc) {
|
|
25
26
|
return `ABAP package "${devclass}" does not exist.`;
|
|
26
27
|
}
|
|
28
|
+
else if (tdevc.dlvunit !== 'HOME') {
|
|
29
|
+
return `ABAP package "${devclass}" has software component "${tdevc.dlvunit}", only "HOME" allowed!`;
|
|
30
|
+
}
|
|
27
31
|
else {
|
|
28
32
|
return true;
|
|
29
33
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trm-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.1",
|
|
4
4
|
"description": "TRM (Transport Request Manager) Core",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"scripts": {
|
|
17
17
|
"cleanBuild": "rimraf dist/",
|
|
18
18
|
"build": "npm run cleanBuild && tsc --sourceMap false",
|
|
19
|
+
"test": "jest --runInBand",
|
|
19
20
|
"prepublishOnly": "npm run build",
|
|
20
21
|
"postinstall": "node -e \"if (require('fs').existsSync('dist/scripts/checkEngine.js')) require('child_process').execFileSync(process.execPath, ['dist/scripts/checkEngine.js'], { stdio: 'inherit' })\""
|
|
21
22
|
},
|
|
@@ -34,12 +35,12 @@
|
|
|
34
35
|
},
|
|
35
36
|
"license": "MIT",
|
|
36
37
|
"trmDependencies": {
|
|
37
|
-
"trm-server": "^
|
|
38
|
+
"trm-server": "^7.0.0"
|
|
38
39
|
},
|
|
39
40
|
"dependencies": {
|
|
40
41
|
"@esm2cjs/normalize-url": "^8.0.0",
|
|
41
42
|
"@inquirer/prompts": "^7.8.1",
|
|
42
|
-
"@simonegaffurini/sammarksworkflow": "^1.3.2-
|
|
43
|
+
"@simonegaffurini/sammarksworkflow": "^1.3.2-fork3",
|
|
43
44
|
"@xmldom/xmldom": "^0.9.8",
|
|
44
45
|
"adm-zip": "^0.6.0",
|
|
45
46
|
"axios": "^1.7.9",
|
|
@@ -54,7 +55,6 @@
|
|
|
54
55
|
"minimatch": "^10.2.6",
|
|
55
56
|
"node-cache": "^5.1.2",
|
|
56
57
|
"node-html-parser": "^7.0.1",
|
|
57
|
-
"node-r3trans": "^2.0.3",
|
|
58
58
|
"object-keys-normalizer": "^1.0.1",
|
|
59
59
|
"opener": "^1.5.2",
|
|
60
60
|
"parse-multipart-data": "^1.5.0",
|
|
@@ -62,18 +62,19 @@
|
|
|
62
62
|
"semver": "^7.5.4",
|
|
63
63
|
"semver-sort": "^1.0.0",
|
|
64
64
|
"spdx-license-ids": "^3.0.13",
|
|
65
|
-
"trm-registry-types": "^
|
|
65
|
+
"trm-registry-types": "^5.0.0",
|
|
66
66
|
"xml-beautify": "^1.2.3",
|
|
67
67
|
"xml-js": "^1.6.11"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"trm-commons": "^5.
|
|
70
|
+
"trm-commons": "^5.3.0"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@types/adm-zip": "^0.5.0",
|
|
74
74
|
"@types/debug": "^4.1.12",
|
|
75
75
|
"@types/express": "^4.17.17",
|
|
76
76
|
"@types/inquirer": "^9.0.3",
|
|
77
|
+
"@types/jest": "^30.0.0",
|
|
77
78
|
"@types/lodash": "^4.14.202",
|
|
78
79
|
"@types/luxon": "^3.7.1",
|
|
79
80
|
"@types/node": "^20.4.4",
|
|
@@ -81,11 +82,18 @@
|
|
|
81
82
|
"@types/semver": "^7.5.0",
|
|
82
83
|
"@types/semver-sort": "^0.0.1",
|
|
83
84
|
"@types/stack-trace": "^0.0.33",
|
|
85
|
+
"jest": "^30.5.2",
|
|
84
86
|
"rimraf": "^6.0.1",
|
|
85
|
-
"trm-commons": "^5.
|
|
87
|
+
"trm-commons": "^5.3.0",
|
|
88
|
+
"ts-jest": "^29.4.1",
|
|
86
89
|
"ts-node": "^10.9.2",
|
|
87
90
|
"typescript": "^5.8.2"
|
|
88
91
|
},
|
|
92
|
+
"overrides": {
|
|
93
|
+
"@istanbuljs/load-nyc-config": {
|
|
94
|
+
"js-yaml": "^4.1.1"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
89
97
|
"engines": {
|
|
90
98
|
"node": ">=22.12.0"
|
|
91
99
|
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.trmServerPa = void 0;
|
|
13
|
-
const trm_commons_1 = require("trm-commons");
|
|
14
|
-
const systemConnector_1 = require("../../systemConnector");
|
|
15
|
-
const registry_1 = require("../../registry");
|
|
16
|
-
const manifest_1 = require("../../manifest");
|
|
17
|
-
exports.trmServerPa = {
|
|
18
|
-
name: 'trm-server-pa',
|
|
19
|
-
run: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
|
-
var _a, _b, _c, _d;
|
|
21
|
-
trm_commons_1.Logger.log('Run trm-server pa step', true);
|
|
22
|
-
const trmServerPackage = (_b = (_a = context.rawInput.contextData) === null || _a === void 0 ? void 0 : _a.systemPackages) === null || _b === void 0 ? void 0 : _b.find(o => o.packageName === systemConnector_1.TRM_SERVER_PACKAGE_NAME && o.compareRegistry(registry_1.RegistryProvider.getRegistry()));
|
|
23
|
-
if (trmServerPackage) {
|
|
24
|
-
const pa = (_c = trmServerPackage.manifest) === null || _c === void 0 ? void 0 : _c.get().postActivities;
|
|
25
|
-
if (pa) {
|
|
26
|
-
trm_commons_1.Logger.setPrefix(`Initialize trm-server v${(_d = trmServerPackage.manifest) === null || _d === void 0 ? void 0 : _d.get().version} -> `);
|
|
27
|
-
for (const data of pa) {
|
|
28
|
-
try {
|
|
29
|
-
const postActivity = new manifest_1.PostActivity(data);
|
|
30
|
-
yield postActivity.execute();
|
|
31
|
-
}
|
|
32
|
-
catch (e) {
|
|
33
|
-
trm_commons_1.Logger.error(e.toString(), true);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
trm_commons_1.Logger.removePrefix();
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
})
|
|
40
|
-
};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.checkAlreadyInstalled = void 0;
|
|
16
|
-
const trm_commons_1 = require("trm-commons");
|
|
17
|
-
const manifest_1 = require("../../manifest");
|
|
18
|
-
const semver_1 = require("semver");
|
|
19
|
-
const systemConnector_1 = require("../../systemConnector");
|
|
20
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
21
|
-
exports.checkAlreadyInstalled = {
|
|
22
|
-
name: 'check-already-installed',
|
|
23
|
-
run: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
24
|
-
trm_commons_1.Logger.log('Check already installed step', true);
|
|
25
|
-
const installedPackages = context.rawInput.contextData.systemPackages;
|
|
26
|
-
const manifest = context.runtime.remotePackageData.manifest;
|
|
27
|
-
const trmManifest = context.runtime.remotePackageData.manifest;
|
|
28
|
-
context.runtime.installData.upgradingPackage = installedPackages.find(o => manifest_1.Manifest.compare(o.manifest, new manifest_1.Manifest(manifest), false));
|
|
29
|
-
if (context.runtime.installData.upgradingPackage) {
|
|
30
|
-
const installVersion = trmManifest.version;
|
|
31
|
-
const installedVersion = context.runtime.installData.upgradingPackage.manifest.get().version;
|
|
32
|
-
context.runtime.update = true;
|
|
33
|
-
if ((0, semver_1.eq)(installVersion, installedVersion)) {
|
|
34
|
-
if (context.rawInput.packageData.overwrite) {
|
|
35
|
-
trm_commons_1.Logger.info(`Package "${trmManifest.name}" version ${installedVersion} already installed, overwriting.`);
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
throw new Error(`Package "${trmManifest.name}" version ${installedVersion} already installed.`);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
if ((0, semver_1.gt)(installVersion, installedVersion)) {
|
|
43
|
-
trm_commons_1.Logger.info(`${chalk_1.default.bold('Upgrading')} ${installedVersion} -> ${installVersion}`);
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
trm_commons_1.Logger.warning(`${chalk_1.default.bold('Downgrading')} ${installedVersion} -> ${installVersion}`);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
if (context.runtime.installData.upgradingPackage.isDirty()) {
|
|
50
|
-
var ignoreDirty = false;
|
|
51
|
-
trm_commons_1.Logger.warning(`There are some changes on ${systemConnector_1.SystemConnector.getDest()} that may be overwritten!`);
|
|
52
|
-
trm_commons_1.Logger.warning(`Consider analyzing dirty entries for package "${trmManifest.name}"`);
|
|
53
|
-
if (!context.rawInput.contextData.noInquirer) {
|
|
54
|
-
ignoreDirty = (yield trm_commons_1.Inquirer.prompt({
|
|
55
|
-
message: `Continue with install?`,
|
|
56
|
-
type: 'confirm',
|
|
57
|
-
default: false,
|
|
58
|
-
name: 'ignoreDirty'
|
|
59
|
-
})).ignoreDirty;
|
|
60
|
-
}
|
|
61
|
-
if (!ignoreDirty) {
|
|
62
|
-
throw new Error(`Install of package "${trmManifest.name}" aborted.`);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
context.runtime.update = false;
|
|
68
|
-
trm_commons_1.Logger.info(`Package not installed yet`, true);
|
|
69
|
-
}
|
|
70
|
-
})
|
|
71
|
-
};
|