trm-core 2.2.2 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/checkPackageDependencies/analizeDependencies.d.ts +3 -0
- package/dist/actions/checkPackageDependencies/analizeDependencies.js +84 -0
- package/dist/actions/checkPackageDependencies/buildOutput.d.ts +3 -0
- package/dist/actions/checkPackageDependencies/buildOutput.js +82 -0
- package/dist/actions/checkPackageDependencies/index.d.ts +37 -0
- package/dist/actions/checkPackageDependencies/index.js +44 -0
- package/dist/actions/checkPackageDependencies/init.d.ts +3 -0
- package/dist/actions/checkPackageDependencies/init.js +30 -0
- package/dist/actions/checkPackageDependencies/setSystemPackages.d.ts +3 -0
- package/dist/actions/checkPackageDependencies/setSystemPackages.js +28 -0
- package/dist/actions/checkSapEntries/analizeSapEntries.d.ts +3 -0
- package/dist/actions/checkSapEntries/analizeSapEntries.js +120 -0
- package/dist/actions/checkSapEntries/buildOutput.d.ts +3 -0
- package/dist/actions/checkSapEntries/buildOutput.js +46 -0
- package/dist/actions/checkSapEntries/index.d.ts +29 -0
- package/dist/actions/checkSapEntries/index.js +42 -0
- package/dist/actions/checkSapEntries/init.d.ts +3 -0
- package/dist/actions/checkSapEntries/init.js +29 -0
- package/dist/actions/findDependencies/acknowledgementSize.d.ts +3 -0
- package/dist/actions/findDependencies/acknowledgementSize.js +36 -0
- package/dist/actions/findDependencies/index.d.ts +52 -0
- package/dist/actions/findDependencies/index.js +53 -0
- package/dist/actions/findDependencies/init.d.ts +3 -0
- package/dist/actions/findDependencies/init.js +36 -0
- package/dist/actions/findDependencies/parseSenvi.d.ts +3 -0
- package/dist/actions/findDependencies/parseSenvi.js +76 -0
- package/dist/actions/findDependencies/print.d.ts +3 -0
- package/dist/actions/findDependencies/print.js +120 -0
- package/dist/actions/findDependencies/readPackageData.d.ts +3 -0
- package/dist/actions/findDependencies/readPackageData.js +22 -0
- package/dist/actions/findDependencies/readPackageObjects.d.ts +3 -0
- package/dist/actions/findDependencies/readPackageObjects.js +26 -0
- package/dist/actions/findDependencies/readRepositoryEnvironment.d.ts +3 -0
- package/dist/actions/findDependencies/readRepositoryEnvironment.js +31 -0
- package/dist/actions/findDependencies/setSystemPackages.d.ts +3 -0
- package/dist/actions/findDependencies/setSystemPackages.js +25 -0
- package/dist/actions/findDependencies/setTrmDependencies.d.ts +3 -0
- package/dist/actions/findDependencies/setTrmDependencies.js +145 -0
- package/dist/actions/index.d.ts +3 -4
- package/dist/actions/index.js +3 -4
- package/dist/actions/install/checkAlreadyInstalled.d.ts +3 -0
- package/dist/actions/install/checkAlreadyInstalled.js +59 -0
- package/dist/actions/install/checkDependencies.d.ts +3 -0
- package/dist/actions/install/checkDependencies.js +69 -0
- package/dist/actions/install/checkIntegrity.d.ts +3 -0
- package/dist/actions/install/checkIntegrity.js +42 -0
- package/dist/actions/install/checkSapEntries.d.ts +3 -0
- package/dist/actions/install/checkSapEntries.js +52 -0
- package/dist/actions/install/checkTadirContent.d.ts +3 -0
- package/dist/actions/install/checkTadirContent.js +50 -0
- package/dist/actions/install/checkTadirObjectTypes.d.ts +3 -0
- package/dist/actions/install/checkTadirObjectTypes.js +45 -0
- package/dist/actions/install/checkTransports.d.ts +3 -0
- package/dist/actions/install/checkTransports.js +71 -0
- package/dist/actions/install/generateDevclass.d.ts +3 -0
- package/dist/actions/install/generateDevclass.js +110 -0
- package/dist/actions/install/generateWbTransport.d.ts +3 -0
- package/dist/actions/install/generateWbTransport.js +90 -0
- package/dist/actions/install/importCustTransport.d.ts +3 -0
- package/dist/actions/install/importCustTransport.js +48 -0
- package/dist/actions/install/importLangTransport.d.ts +3 -0
- package/dist/actions/install/importLangTransport.js +48 -0
- package/dist/actions/install/importTadirTransport.d.ts +3 -0
- package/dist/actions/install/importTadirTransport.js +66 -0
- package/dist/actions/install/index.d.ts +95 -0
- package/dist/actions/install/index.js +79 -0
- package/dist/actions/install/init.d.ts +3 -0
- package/dist/actions/install/init.js +80 -0
- package/dist/actions/install/installDependencies.d.ts +3 -0
- package/dist/actions/install/installDependencies.js +77 -0
- package/dist/actions/install/readDevcTransport.d.ts +3 -0
- package/dist/actions/install/readDevcTransport.js +30 -0
- package/dist/actions/install/setDevclass.d.ts +3 -0
- package/dist/actions/install/setDevclass.js +115 -0
- package/dist/actions/install/setPackageIntegrity.d.ts +3 -0
- package/dist/actions/install/setPackageIntegrity.js +30 -0
- package/dist/actions/install/setR3trans.d.ts +3 -0
- package/dist/actions/install/setR3trans.js +24 -0
- package/dist/actions/install/setSystemPackages.d.ts +3 -0
- package/dist/actions/install/setSystemPackages.js +25 -0
- package/dist/actions/installDependency/checkAlreadyInstalled.d.ts +3 -0
- package/dist/actions/installDependency/checkAlreadyInstalled.js +42 -0
- package/dist/actions/installDependency/findInstallRelease.d.ts +3 -0
- package/dist/actions/installDependency/findInstallRelease.js +59 -0
- package/dist/actions/installDependency/getRangeReleases.d.ts +3 -0
- package/dist/actions/installDependency/getRangeReleases.js +38 -0
- package/dist/actions/installDependency/index.d.ts +39 -0
- package/dist/actions/installDependency/index.js +46 -0
- package/dist/actions/installDependency/init.d.ts +3 -0
- package/dist/actions/installDependency/init.js +39 -0
- package/dist/actions/installDependency/installRelease.d.ts +3 -0
- package/dist/actions/installDependency/installRelease.js +43 -0
- package/dist/actions/installDependency/setSystemPackages.d.ts +3 -0
- package/dist/actions/installDependency/setSystemPackages.js +25 -0
- package/dist/actions/publish/buildTrmPackageInstance.d.ts +3 -0
- package/dist/actions/publish/buildTrmPackageInstance.js +22 -0
- package/dist/actions/publish/checkPackageExistance.d.ts +3 -0
- package/dist/actions/publish/checkPackageExistance.js +27 -0
- package/dist/actions/publish/checkPublishAllowed.d.ts +3 -0
- package/dist/actions/publish/checkPublishAllowed.js +33 -0
- package/dist/actions/publish/editSapEntries.d.ts +3 -0
- package/dist/actions/publish/editSapEntries.js +69 -0
- package/dist/actions/publish/editTrmDependencies.d.ts +3 -0
- package/dist/actions/publish/editTrmDependencies.js +69 -0
- package/dist/actions/publish/finalizePublish.d.ts +3 -0
- package/dist/actions/publish/finalizePublish.js +51 -0
- package/dist/actions/publish/findDependencies.d.ts +3 -0
- package/dist/actions/publish/findDependencies.js +49 -0
- package/dist/actions/publish/generateCustTr.d.ts +3 -0
- package/dist/actions/publish/generateCustTr.js +72 -0
- package/dist/actions/publish/generateDevcTr.d.ts +3 -0
- package/dist/actions/publish/generateDevcTr.js +47 -0
- package/dist/actions/publish/generateLangTr.d.ts +3 -0
- package/dist/actions/publish/generateLangTr.js +69 -0
- package/dist/actions/publish/generateTadirTr.d.ts +3 -0
- package/dist/actions/publish/generateTadirTr.js +52 -0
- package/dist/actions/publish/generateTrmArtifact.d.ts +3 -0
- package/dist/actions/publish/generateTrmArtifact.js +30 -0
- package/dist/actions/publish/index.d.ts +76 -0
- package/dist/actions/publish/index.js +99 -0
- package/dist/actions/publish/init.d.ts +3 -0
- package/dist/actions/publish/init.js +110 -0
- package/dist/actions/publish/logDependencies.d.ts +3 -0
- package/dist/actions/publish/logDependencies.js +31 -0
- package/dist/actions/publish/overwriteManifestValues.d.ts +3 -0
- package/dist/actions/publish/overwriteManifestValues.js +46 -0
- package/dist/actions/publish/publishTrmArtifact.d.ts +3 -0
- package/dist/actions/publish/publishTrmArtifact.js +23 -0
- package/dist/actions/publish/releaseCustTr.d.ts +3 -0
- package/dist/actions/publish/releaseCustTr.js +34 -0
- package/dist/actions/publish/releaseDevcTr.d.ts +3 -0
- package/dist/actions/publish/releaseDevcTr.js +23 -0
- package/dist/actions/publish/releaseLangTr.d.ts +3 -0
- package/dist/actions/publish/releaseLangTr.js +34 -0
- package/dist/actions/publish/releaseTadirTr.d.ts +3 -0
- package/dist/actions/publish/releaseTadirTr.js +23 -0
- package/dist/actions/publish/setBackwardsCompatible.d.ts +3 -0
- package/dist/actions/publish/setBackwardsCompatible.js +54 -0
- package/dist/actions/publish/setCustTransports.d.ts +3 -0
- package/dist/actions/publish/setCustTransports.js +49 -0
- package/dist/actions/publish/setDevclass.d.ts +3 -0
- package/dist/actions/publish/setDevclass.js +42 -0
- package/dist/actions/publish/setDevclassObjs.d.ts +3 -0
- package/dist/actions/publish/setDevclassObjs.js +22 -0
- package/dist/actions/publish/setManifestValues.d.ts +3 -0
- package/dist/actions/publish/setManifestValues.js +111 -0
- package/dist/actions/publish/setPrivate.d.ts +3 -0
- package/dist/actions/publish/setPrivate.js +60 -0
- package/dist/actions/publish/setReadme.d.ts +3 -0
- package/dist/actions/publish/setReadme.js +47 -0
- package/dist/actions/publish/setSapEntries.d.ts +3 -0
- package/dist/actions/publish/setSapEntries.js +46 -0
- package/dist/actions/publish/setTransportTarget.d.ts +3 -0
- package/dist/actions/publish/setTransportTarget.js +63 -0
- package/dist/actions/publish/setTrmDependencies.d.ts +3 -0
- package/dist/actions/publish/setTrmDependencies.js +59 -0
- package/dist/client/IClient.d.ts +4 -0
- package/dist/{rfc/client → client}/RFCClient.d.ts +6 -4
- package/dist/{rfc/client → client}/RFCClient.js +24 -6
- package/dist/client/components/PNAME.d.ts +1 -0
- package/dist/client/components/RS38L_FNAME.d.ts +1 -0
- package/dist/{rfc → client}/components/index.d.ts +2 -0
- package/dist/{rfc → client}/components/index.js +2 -0
- package/dist/{rfc → client}/index.d.ts +2 -1
- package/dist/{rfc → client}/index.js +2 -1
- package/dist/client/struct/TFDIR.d.ts +5 -0
- package/dist/client/struct/TLINE.js +2 -0
- package/dist/{rfc → client}/struct/TMSCSYS.d.ts +1 -0
- package/dist/client/struct/TMSCSYS.js +2 -0
- package/dist/client/struct/ZTRM_INSTALLDEVC.js +2 -0
- package/dist/client/struct/ZTRM_INTEGRITY.js +2 -0
- package/dist/{rfc → client}/struct/index.d.ts +1 -0
- package/dist/{rfc → client}/struct/index.js +1 -0
- package/dist/commons/fromAbapToDate.d.ts +1 -1
- package/dist/commons/getFileSysSeparator.d.ts +1 -1
- package/dist/commons/getPackageHierarchy.d.ts +1 -1
- package/dist/commons/getPackageNamespace.d.ts +1 -1
- package/dist/commons/getParentFromHierarchy.d.ts +1 -1
- package/dist/commons/index.d.ts +0 -1
- package/dist/commons/index.js +0 -1
- package/dist/dependency/IParser.d.ts +7 -5
- package/dist/dependency/SenviParser.d.ts +4 -5
- package/dist/dependency/SenviParser.js +2 -4
- package/dist/dependency/objects/ClasSenviParser.d.ts +2 -4
- package/dist/dependency/objects/ClasSenviParser.js +3 -3
- package/dist/dependency/objects/DtelSenviParser.d.ts +2 -4
- package/dist/dependency/objects/DtelSenviParser.js +3 -3
- package/dist/dependency/objects/FugrSenviParser.d.ts +2 -4
- package/dist/dependency/objects/FugrSenviParser.js +3 -3
- package/dist/dependency/objects/FuncSenviParser.d.ts +7 -0
- package/dist/dependency/objects/FuncSenviParser.js +34 -0
- package/dist/dependency/objects/OmSenviParser.d.ts +2 -4
- package/dist/dependency/objects/OmSenviParser.js +1 -2
- package/dist/dependency/objects/ProgSenviParser.d.ts +2 -4
- package/dist/dependency/objects/ProgSenviParser.js +3 -3
- package/dist/dependency/objects/TablSenviParser.d.ts +2 -4
- package/dist/dependency/objects/TablSenviParser.js +3 -3
- package/dist/dependency/objects/ViewSenviParser.d.ts +2 -4
- package/dist/dependency/objects/ViewSenviParser.js +3 -3
- package/dist/dependency/objects/index.d.ts +1 -0
- package/dist/dependency/objects/index.js +1 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/inquirer/CliInquirer.d.ts +6 -0
- package/dist/inquirer/CliInquirer.js +49 -0
- package/dist/inquirer/IInquirer.d.ts +4 -0
- package/dist/inquirer/IInquirer.js +2 -0
- package/dist/inquirer/Inquirer.d.ts +4 -5
- package/dist/inquirer/Inquirer.js +11 -45
- package/dist/inquirer/index.d.ts +3 -1
- package/dist/inquirer/index.js +3 -1
- package/dist/inquirer/validators/validateDevclass.d.ts +2 -3
- package/dist/inquirer/validators/validateDevclass.js +4 -3
- package/dist/inquirer/validators/validateTransportTarget.d.ts +1 -2
- package/dist/logger/CliLogFileLogger.d.ts +25 -0
- package/dist/logger/CliLogFileLogger.js +92 -0
- package/dist/logger/CliLogger.d.ts +20 -0
- package/dist/logger/CliLogger.js +178 -0
- package/dist/logger/ConsoleLogger.d.ts +16 -0
- package/dist/logger/ConsoleLogger.js +74 -0
- package/dist/logger/DummyLogger.d.ts +16 -0
- package/dist/logger/DummyLogger.js +16 -0
- package/dist/logger/ILogger.d.ts +14 -0
- package/dist/logger/ILogger.js +2 -0
- package/dist/logger/Logger.d.ts +13 -18
- package/dist/logger/Logger.js +55 -196
- package/dist/logger/TreeLog.d.ts +4 -0
- package/dist/logger/TreeLog.js +2 -0
- package/dist/logger/index.d.ts +7 -2
- package/dist/logger/index.js +7 -2
- package/dist/manifest/Manifest.d.ts +1 -0
- package/dist/manifest/Manifest.js +77 -4
- package/dist/registry/Registry.d.ts +2 -3
- package/dist/registry/Registry.js +96 -26
- package/dist/systemConnector/ISystemConnector.d.ts +65 -0
- package/dist/systemConnector/ISystemConnector.js +2 -0
- package/dist/systemConnector/InstallPackage.d.ts +5 -0
- package/dist/systemConnector/InstallPackage.js +2 -0
- package/dist/systemConnector/SapMessage.d.ts +8 -0
- package/dist/systemConnector/SapMessage.js +2 -0
- package/dist/systemConnector/ServerSystemConnector.d.ts +77 -0
- package/dist/systemConnector/ServerSystemConnector.js +527 -0
- package/dist/systemConnector/SystemConnector.d.ts +61 -53
- package/dist/systemConnector/SystemConnector.js +329 -302
- package/dist/systemConnector/index.d.ts +4 -1
- package/dist/systemConnector/index.js +4 -1
- package/dist/transport/Transport.d.ts +14 -19
- package/dist/transport/Transport.js +123 -104
- package/dist/transport/TransportContent.d.ts +1 -2
- package/dist/transport/TrmTransportIdentifier.d.ts +2 -1
- package/dist/transport/TrmTransportIdentifier.js +1 -0
- package/dist/trmPackage/TransportBinary.d.ts +7 -0
- package/dist/trmPackage/TransportBinary.js +2 -0
- package/dist/trmPackage/TrmArtifact.d.ts +4 -8
- package/dist/trmPackage/TrmArtifact.js +31 -6
- package/dist/trmPackage/TrmPackage.d.ts +4 -6
- package/dist/trmPackage/TrmPackage.js +14 -17
- package/dist/trmPackage/index.d.ts +1 -0
- package/dist/trmPackage/index.js +1 -0
- package/package.json +13 -2
- package/dist/actions/checkDependencies.d.ts +0 -12
- package/dist/actions/checkDependencies.js +0 -61
- package/dist/actions/checkSapEntries.d.ts +0 -8
- package/dist/actions/checkSapEntries.js +0 -37
- package/dist/actions/findTadirDependencies.d.ts +0 -15
- package/dist/actions/findTadirDependencies.js +0 -97
- package/dist/actions/install.d.ts +0 -24
- package/dist/actions/install.js +0 -477
- package/dist/actions/installDependency.d.ts +0 -12
- package/dist/actions/installDependency.js +0 -108
- package/dist/actions/publish.d.ts +0 -22
- package/dist/actions/publish.js +0 -557
- package/dist/commons/CoreEnv.d.ts +0 -5
- package/dist/commons/CoreEnv.js +0 -9
- package/dist/logger/TraceLevel.d.ts +0 -3
- package/dist/logger/TraceLevel.js +0 -7
- package/dist/rfc/client/index.d.ts +0 -1
- package/dist/rfc/client/index.js +0 -17
- /package/dist/{rfc/components/ARBGB.js → client/IClient.js} +0 -0
- /package/dist/{rfc → client}/components/ARBGB.d.ts +0 -0
- /package/dist/{rfc/components/AS4DATE.js → client/components/ARBGB.js} +0 -0
- /package/dist/{rfc → client}/components/AS4DATE.d.ts +0 -0
- /package/dist/{rfc/components/AS4TEXT.js → client/components/AS4DATE.js} +0 -0
- /package/dist/{rfc → client}/components/AS4TEXT.d.ts +0 -0
- /package/dist/{rfc/components/AS4TIME.js → client/components/AS4TEXT.js} +0 -0
- /package/dist/{rfc → client}/components/AS4TIME.d.ts +0 -0
- /package/dist/{rfc/components/DDOPTION.js → client/components/AS4TIME.js} +0 -0
- /package/dist/{rfc → client}/components/DDOPTION.d.ts +0 -0
- /package/dist/{rfc/components/DDPOSITION.js → client/components/DDOPTION.js} +0 -0
- /package/dist/{rfc → client}/components/DDPOSITION.d.ts +0 -0
- /package/dist/{rfc/components/DDSIGN.js → client/components/DDPOSITION.js} +0 -0
- /package/dist/{rfc → client}/components/DDSIGN.d.ts +0 -0
- /package/dist/{rfc/components/DDTEXT.js → client/components/DDSIGN.js} +0 -0
- /package/dist/{rfc → client}/components/DDTEXT.d.ts +0 -0
- /package/dist/{rfc/components/DEVCLASS.js → client/components/DDTEXT.js} +0 -0
- /package/dist/{rfc → client}/components/DEVCLASS.d.ts +0 -0
- /package/dist/{rfc/components/DEVLAYER.js → client/components/DEVCLASS.js} +0 -0
- /package/dist/{rfc → client}/components/DEVLAYER.d.ts +0 -0
- /package/dist/{rfc/components/DLVUNIT.js → client/components/DEVLAYER.js} +0 -0
- /package/dist/{rfc → client}/components/DLVUNIT.d.ts +0 -0
- /package/dist/{rfc/components/FIELDNAME.js → client/components/DLVUNIT.js} +0 -0
- /package/dist/{rfc → client}/components/FIELDNAME.d.ts +0 -0
- /package/dist/{rfc/components/FILESYS_D.js → client/components/FIELDNAME.js} +0 -0
- /package/dist/{rfc → client}/components/FILESYS_D.d.ts +0 -0
- /package/dist/{rfc/components/MSGNR.js → client/components/FILESYS_D.js} +0 -0
- /package/dist/{rfc → client}/components/MSGNR.d.ts +0 -0
- /package/dist/{rfc/components/NATXT.js → client/components/MSGNR.js} +0 -0
- /package/dist/{rfc → client}/components/NATXT.d.ts +0 -0
- /package/dist/{rfc/components/PACKAUTHOR.js → client/components/NATXT.js} +0 -0
- /package/dist/{rfc → client}/components/PACKAUTHOR.d.ts +0 -0
- /package/dist/{rfc/components/PARENTCL.js → client/components/PACKAUTHOR.js} +0 -0
- /package/dist/{rfc → client}/components/PARENTCL.d.ts +0 -0
- /package/dist/{rfc/components/PFEVALUE.js → client/components/PARENTCL.js} +0 -0
- /package/dist/{rfc → client}/components/PFEVALUE.d.ts +0 -0
- /package/dist/{rfc/components/PGMID.js → client/components/PFEVALUE.js} +0 -0
- /package/dist/{rfc → client}/components/PGMID.d.ts +0 -0
- /package/dist/{rfc/components/RESPONSIBL.js → client/components/PGMID.js} +0 -0
- /package/dist/{rfc/components/SEU_OBJ.js → client/components/PNAME.js} +0 -0
- /package/dist/{rfc → client}/components/RESPONSIBL.d.ts +0 -0
- /package/dist/{rfc/components/SEU_OBJKEY.js → client/components/RESPONSIBL.js} +0 -0
- /package/dist/{rfc/components/SOBJ_NAME.js → client/components/RS38L_FNAME.js} +0 -0
- /package/dist/{rfc → client}/components/SEU_OBJ.d.ts +0 -0
- /package/dist/{rfc/components/SO_TEXT.js → client/components/SEU_OBJ.js} +0 -0
- /package/dist/{rfc → client}/components/SEU_OBJKEY.d.ts +0 -0
- /package/dist/{rfc/components/SPRAS.js → client/components/SEU_OBJKEY.js} +0 -0
- /package/dist/{rfc → client}/components/SOBJ_NAME.d.ts +0 -0
- /package/dist/{rfc/components/SRCSYSTEM.js → client/components/SOBJ_NAME.js} +0 -0
- /package/dist/{rfc → client}/components/SO_TEXT.d.ts +0 -0
- /package/dist/{rfc/components/SYCHAR512.js → client/components/SO_TEXT.js} +0 -0
- /package/dist/{rfc → client}/components/SPRAS.d.ts +0 -0
- /package/dist/{rfc/components/TABNAME.js → client/components/SPRAS.js} +0 -0
- /package/dist/{rfc → client}/components/SRCSYSTEM.d.ts +0 -0
- /package/dist/{rfc/components/TDFORMAT.js → client/components/SRCSYSTEM.js} +0 -0
- /package/dist/{rfc → client}/components/SYCHAR512.d.ts +0 -0
- /package/dist/{rfc/components/TDLINE.js → client/components/SYCHAR512.js} +0 -0
- /package/dist/{rfc → client}/components/TABNAME.d.ts +0 -0
- /package/dist/{rfc/components/TMSSYSNAM.js → client/components/TABNAME.js} +0 -0
- /package/dist/{rfc → client}/components/TDFORMAT.d.ts +0 -0
- /package/dist/{rfc/components/TRKORR.js → client/components/TDFORMAT.js} +0 -0
- /package/dist/{rfc → client}/components/TDLINE.d.ts +0 -0
- /package/dist/{rfc/components/TROBJTYPE.js → client/components/TDLINE.js} +0 -0
- /package/dist/{rfc → client}/components/TMSSYSNAM.d.ts +0 -0
- /package/dist/{rfc/components/TROBJ_NAME.js → client/components/TMSSYSNAM.js} +0 -0
- /package/dist/{rfc → client}/components/TRKORR.d.ts +0 -0
- /package/dist/{rfc/components/TRPARFLAG.js → client/components/TRKORR.js} +0 -0
- /package/dist/{rfc → client}/components/TROBJTYPE.d.ts +0 -0
- /package/dist/{rfc/components/TR_TARGET.js → client/components/TROBJTYPE.js} +0 -0
- /package/dist/{rfc → client}/components/TROBJ_NAME.d.ts +0 -0
- /package/dist/{rfc/components/ZTRM_PACKAGE_INTEGRITY.js → client/components/TROBJ_NAME.js} +0 -0
- /package/dist/{rfc → client}/components/TRPARFLAG.d.ts +0 -0
- /package/dist/{rfc/components/ZTRM_PACKAGE_NAME.js → client/components/TRPARFLAG.js} +0 -0
- /package/dist/{rfc → client}/components/TR_TARGET.d.ts +0 -0
- /package/dist/{rfc/components/ZTRM_PACKAGE_REGISTRY.js → client/components/TR_TARGET.js} +0 -0
- /package/dist/{rfc → client}/components/ZTRM_PACKAGE_INTEGRITY.d.ts +0 -0
- /package/dist/{rfc/struct/E070.js → client/components/ZTRM_PACKAGE_INTEGRITY.js} +0 -0
- /package/dist/{rfc → client}/components/ZTRM_PACKAGE_NAME.d.ts +0 -0
- /package/dist/{rfc/struct/E071.js → client/components/ZTRM_PACKAGE_NAME.js} +0 -0
- /package/dist/{rfc → client}/components/ZTRM_PACKAGE_REGISTRY.d.ts +0 -0
- /package/dist/{rfc/struct/FILESYS.js → client/components/ZTRM_PACKAGE_REGISTRY.js} +0 -0
- /package/dist/{rfc → client}/struct/E070.d.ts +0 -0
- /package/dist/{rfc/struct/KO100.js → client/struct/E070.js} +0 -0
- /package/dist/{rfc → client}/struct/E071.d.ts +0 -0
- /package/dist/{rfc/struct/LXE_TT_PACKG_LINE.js → client/struct/E071.js} +0 -0
- /package/dist/{rfc → client}/struct/FILESYS.d.ts +0 -0
- /package/dist/{rfc/struct/RFC_DB_FLD.js → client/struct/FILESYS.js} +0 -0
- /package/dist/{rfc → client}/struct/KO100.d.ts +0 -0
- /package/dist/{rfc/struct/RFC_DB_OPT.js → client/struct/KO100.js} +0 -0
- /package/dist/{rfc → client}/struct/LXE_TT_PACKG_LINE.d.ts +0 -0
- /package/dist/{rfc/struct/SCOMPKDTLN.js → client/struct/LXE_TT_PACKG_LINE.js} +0 -0
- /package/dist/{rfc → client}/struct/RFC_DB_FLD.d.ts +0 -0
- /package/dist/{rfc/struct/SENVI.js → client/struct/RFC_DB_FLD.js} +0 -0
- /package/dist/{rfc → client}/struct/RFC_DB_OPT.d.ts +0 -0
- /package/dist/{rfc/struct/STMSIQREQ.js → client/struct/RFC_DB_OPT.js} +0 -0
- /package/dist/{rfc → client}/struct/SCOMPKDTLN.d.ts +0 -0
- /package/dist/{rfc/struct/T100.js → client/struct/SCOMPKDTLN.js} +0 -0
- /package/dist/{rfc → client}/struct/SENVI.d.ts +0 -0
- /package/dist/{rfc/struct/TAB512.js → client/struct/SENVI.js} +0 -0
- /package/dist/{rfc → client}/struct/STMSIQREQ.d.ts +0 -0
- /package/dist/{rfc/struct/TADIR.js → client/struct/STMSIQREQ.js} +0 -0
- /package/dist/{rfc → client}/struct/T100.d.ts +0 -0
- /package/dist/{rfc/struct/TDEVC.js → client/struct/T100.js} +0 -0
- /package/dist/{rfc → client}/struct/TAB512.d.ts +0 -0
- /package/dist/{rfc/struct/TDEVCT.js → client/struct/TAB512.js} +0 -0
- /package/dist/{rfc → client}/struct/TADIR.d.ts +0 -0
- /package/dist/{rfc/struct/TLINE.js → client/struct/TADIR.js} +0 -0
- /package/dist/{rfc → client}/struct/TDEVC.d.ts +0 -0
- /package/dist/{rfc/struct/TMSCSYS.js → client/struct/TDEVC.js} +0 -0
- /package/dist/{rfc → client}/struct/TDEVCT.d.ts +0 -0
- /package/dist/{rfc/struct/ZTRM_INSTALLDEVC.js → client/struct/TDEVCT.js} +0 -0
- /package/dist/{rfc/struct/ZTRM_INTEGRITY.js → client/struct/TFDIR.js} +0 -0
- /package/dist/{rfc → client}/struct/TLINE.d.ts +0 -0
- /package/dist/{rfc → client}/struct/ZTRM_INSTALLDEVC.d.ts +0 -0
- /package/dist/{rfc → client}/struct/ZTRM_INTEGRITY.d.ts +0 -0
|
@@ -0,0 +1,84 @@
|
|
|
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.analizeDependencies = void 0;
|
|
13
|
+
const logger_1 = require("../../logger");
|
|
14
|
+
const trmPackage_1 = require("../../trmPackage");
|
|
15
|
+
const registry_1 = require("../../registry");
|
|
16
|
+
const semver_1 = require("semver");
|
|
17
|
+
const systemConnector_1 = require("../../systemConnector");
|
|
18
|
+
exports.analizeDependencies = {
|
|
19
|
+
name: 'analize-dependencies',
|
|
20
|
+
filter: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
+
if (context.parsedInput.systemPackages && context.parsedInput.systemPackages.length > 0) {
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
logger_1.Logger.info(`Package ${context.parsedInput.packageName} has no TRM package dependencies`, context.parsedInput.print);
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
}),
|
|
29
|
+
run: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
30
|
+
const dependencies = context.parsedInput.dependencies;
|
|
31
|
+
const systemPackages = context.parsedInput.systemPackages;
|
|
32
|
+
logger_1.Logger.info(`Package ${context.parsedInput.packageName} has ${dependencies.length} TRM package dependencies`, context.parsedInput.print);
|
|
33
|
+
context.runtime.versionOkDependencies = [];
|
|
34
|
+
context.runtime.versionKoDependencies = [];
|
|
35
|
+
context.runtime.integrityOkDependencies = [];
|
|
36
|
+
context.runtime.integrityKoDependencies = [];
|
|
37
|
+
context.runtime.table = {
|
|
38
|
+
head: ['Dependency', 'Registry', 'Dependency range', 'Version on system', 'Version status', 'Integrity status'],
|
|
39
|
+
data: []
|
|
40
|
+
};
|
|
41
|
+
var tableData;
|
|
42
|
+
for (const dependency of dependencies) {
|
|
43
|
+
tableData = [dependency.name, dependency.registry || 'public', dependency.version];
|
|
44
|
+
const dependencyTrmPackage = new trmPackage_1.TrmPackage(dependency.name, new registry_1.Registry(dependency.registry || 'public'));
|
|
45
|
+
const systemInstalledPackage = systemPackages.find(o => trmPackage_1.TrmPackage.compare(o, dependencyTrmPackage));
|
|
46
|
+
if (systemInstalledPackage && systemInstalledPackage.manifest) {
|
|
47
|
+
const installedVersion = systemInstalledPackage.manifest.get().version;
|
|
48
|
+
tableData.push(installedVersion);
|
|
49
|
+
if ((0, semver_1.satisfies)(installedVersion, dependency.version)) {
|
|
50
|
+
tableData.push('OK');
|
|
51
|
+
context.runtime.versionOkDependencies.push(dependency);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
tableData.push('ERR!');
|
|
55
|
+
context.runtime.versionKoDependencies.push(dependency);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
tableData.push('Not found');
|
|
60
|
+
tableData.push('ERR!');
|
|
61
|
+
context.runtime.versionKoDependencies.push(dependency);
|
|
62
|
+
}
|
|
63
|
+
try {
|
|
64
|
+
const installedPackageIntegrity = yield systemConnector_1.SystemConnector.getPackageIntegrity(systemInstalledPackage);
|
|
65
|
+
if (installedPackageIntegrity === dependency.integrity) {
|
|
66
|
+
tableData.push('Safe');
|
|
67
|
+
context.runtime.integrityOkDependencies.push(dependency);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
tableData.push('Unsafe');
|
|
71
|
+
context.runtime.integrityKoDependencies.push(dependency);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
catch (e) {
|
|
75
|
+
tableData.push('Unknown');
|
|
76
|
+
context.runtime.integrityKoDependencies.push(dependency);
|
|
77
|
+
logger_1.Logger.error(e.toString(), true);
|
|
78
|
+
logger_1.Logger.error(`Couldn't retrieve package integrity`, true);
|
|
79
|
+
}
|
|
80
|
+
context.runtime.table.data.push(tableData);
|
|
81
|
+
}
|
|
82
|
+
logger_1.Logger.table(context.runtime.table.head, context.runtime.table.data, context.parsedInput.print);
|
|
83
|
+
})
|
|
84
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
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.buildOutput = void 0;
|
|
13
|
+
exports.buildOutput = {
|
|
14
|
+
name: 'build-output',
|
|
15
|
+
filter: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
try {
|
|
17
|
+
const items = context.runtime.versionOkDependencies.length +
|
|
18
|
+
context.runtime.versionKoDependencies.length +
|
|
19
|
+
context.runtime.integrityOkDependencies.length +
|
|
20
|
+
context.runtime.integrityKoDependencies.length;
|
|
21
|
+
return items > 0;
|
|
22
|
+
}
|
|
23
|
+
catch (e) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
}),
|
|
27
|
+
run: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
28
|
+
context.output.dependencyStatus = [];
|
|
29
|
+
context.runtime.versionOkDependencies.forEach(o => {
|
|
30
|
+
const i = context.output.dependencyStatus.findIndex(k => k.dependency.name === o.name && k.dependency.registry === o.registry);
|
|
31
|
+
if (i >= 0) {
|
|
32
|
+
context.output.dependencyStatus[i].match = true;
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
context.output.dependencyStatus.push({
|
|
36
|
+
dependency: o,
|
|
37
|
+
match: true,
|
|
38
|
+
safe: null
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
context.runtime.versionKoDependencies.forEach(o => {
|
|
43
|
+
const i = context.output.dependencyStatus.findIndex(k => k.dependency.name === o.name && k.dependency.registry === o.registry);
|
|
44
|
+
if (i >= 0) {
|
|
45
|
+
context.output.dependencyStatus[i].match = false;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
context.output.dependencyStatus.push({
|
|
49
|
+
dependency: o,
|
|
50
|
+
match: false,
|
|
51
|
+
safe: null
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
context.runtime.integrityOkDependencies.forEach(o => {
|
|
56
|
+
const i = context.output.dependencyStatus.findIndex(k => k.dependency.name === o.name && k.dependency.registry === o.registry);
|
|
57
|
+
if (i >= 0) {
|
|
58
|
+
context.output.dependencyStatus[i].safe = true;
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
context.output.dependencyStatus.push({
|
|
62
|
+
dependency: o,
|
|
63
|
+
match: null,
|
|
64
|
+
safe: true
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
context.runtime.integrityKoDependencies.forEach(o => {
|
|
69
|
+
const i = context.output.dependencyStatus.findIndex(k => k.dependency.name === o.name && k.dependency.registry === o.registry);
|
|
70
|
+
if (i >= 0) {
|
|
71
|
+
context.output.dependencyStatus[i].safe = false;
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
context.output.dependencyStatus.push({
|
|
75
|
+
dependency: o,
|
|
76
|
+
match: null,
|
|
77
|
+
safe: false
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
})
|
|
82
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { TrmPackage } from "../../trmPackage";
|
|
2
|
+
import { TrmManifestDependency } from "../../manifest";
|
|
3
|
+
import { LogTableStruct } from "../../commons";
|
|
4
|
+
export type CheckPackageDependencyActionInput = {
|
|
5
|
+
trmPackage: TrmPackage;
|
|
6
|
+
print: boolean;
|
|
7
|
+
systemPackages?: TrmPackage[];
|
|
8
|
+
};
|
|
9
|
+
type WorkflowParsedInput = {
|
|
10
|
+
print?: boolean;
|
|
11
|
+
packageName?: string;
|
|
12
|
+
dependencies?: TrmManifestDependency[];
|
|
13
|
+
systemPackages?: TrmPackage[];
|
|
14
|
+
};
|
|
15
|
+
type WorkflowRuntime = {
|
|
16
|
+
table?: LogTableStruct;
|
|
17
|
+
versionOkDependencies?: TrmManifestDependency[];
|
|
18
|
+
versionKoDependencies?: TrmManifestDependency[];
|
|
19
|
+
integrityOkDependencies?: TrmManifestDependency[];
|
|
20
|
+
integrityKoDependencies?: TrmManifestDependency[];
|
|
21
|
+
};
|
|
22
|
+
export type CheckPackageDependencyActionOutput = {
|
|
23
|
+
dependencies?: TrmManifestDependency[];
|
|
24
|
+
dependencyStatus?: {
|
|
25
|
+
dependency: TrmManifestDependency;
|
|
26
|
+
match: boolean;
|
|
27
|
+
safe: boolean;
|
|
28
|
+
}[];
|
|
29
|
+
};
|
|
30
|
+
export type CheckPackageDependencyWorkflowContext = {
|
|
31
|
+
rawInput: CheckPackageDependencyActionInput;
|
|
32
|
+
parsedInput: WorkflowParsedInput;
|
|
33
|
+
runtime: WorkflowRuntime;
|
|
34
|
+
output: CheckPackageDependencyActionOutput;
|
|
35
|
+
};
|
|
36
|
+
export declare function checkPackageDependencies(inputData: CheckPackageDependencyActionInput): Promise<CheckPackageDependencyActionOutput>;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
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.checkPackageDependencies = void 0;
|
|
16
|
+
const sammarksworkflow_1 = __importDefault(require("@simonegaffurini/sammarksworkflow"));
|
|
17
|
+
const logger_1 = require("../../logger");
|
|
18
|
+
const util_1 = require("util");
|
|
19
|
+
const init_1 = require("./init");
|
|
20
|
+
const setSystemPackages_1 = require("./setSystemPackages");
|
|
21
|
+
const analizeDependencies_1 = require("./analizeDependencies");
|
|
22
|
+
const buildOutput_1 = require("./buildOutput");
|
|
23
|
+
const WORKFLOW_NAME = 'check-package-dependencies';
|
|
24
|
+
function checkPackageDependencies(inputData) {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
const workflow = [
|
|
27
|
+
init_1.init,
|
|
28
|
+
setSystemPackages_1.setSystemPackages,
|
|
29
|
+
analizeDependencies_1.analizeDependencies,
|
|
30
|
+
buildOutput_1.buildOutput
|
|
31
|
+
];
|
|
32
|
+
logger_1.Logger.log(`Ready to execute workflow ${WORKFLOW_NAME}, input data: ${(0, util_1.inspect)(inputData, { breakLength: Infinity, compact: true })}`, true);
|
|
33
|
+
const result = yield (0, sammarksworkflow_1.default)(WORKFLOW_NAME, workflow, {
|
|
34
|
+
rawInput: inputData,
|
|
35
|
+
parsedInput: {},
|
|
36
|
+
runtime: {},
|
|
37
|
+
output: {}
|
|
38
|
+
});
|
|
39
|
+
logger_1.Logger.log(`Workflow ${WORKFLOW_NAME} result: ${(0, util_1.inspect)(result, { breakLength: Infinity, compact: true })}`, true);
|
|
40
|
+
const output = result.output;
|
|
41
|
+
return output;
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
exports.checkPackageDependencies = checkPackageDependencies;
|
|
@@ -0,0 +1,30 @@
|
|
|
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.init = void 0;
|
|
13
|
+
exports.init = {
|
|
14
|
+
name: 'init',
|
|
15
|
+
run: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
context.parsedInput.packageName = context.rawInput.trmPackage.packageName;
|
|
17
|
+
context.parsedInput.print = !(context.rawInput.print ? true : false);
|
|
18
|
+
context.parsedInput.systemPackages = context.rawInput.systemPackages || [];
|
|
19
|
+
if (context.rawInput.trmPackage.manifest) {
|
|
20
|
+
const manifest = context.rawInput.trmPackage.manifest.get();
|
|
21
|
+
context.parsedInput.dependencies = manifest.dependencies || [];
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
context.parsedInput.dependencies = [];
|
|
25
|
+
}
|
|
26
|
+
context.output = {
|
|
27
|
+
dependencies: context.parsedInput.dependencies
|
|
28
|
+
};
|
|
29
|
+
})
|
|
30
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
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.setSystemPackages = void 0;
|
|
13
|
+
const systemConnector_1 = require("../../systemConnector");
|
|
14
|
+
const logger_1 = require("../../logger");
|
|
15
|
+
exports.setSystemPackages = {
|
|
16
|
+
name: 'set-system-packages',
|
|
17
|
+
filter: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
+
return context.parsedInput.dependencies.length > 0;
|
|
19
|
+
}),
|
|
20
|
+
run: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
+
var systemPackages = context.parsedInput.systemPackages;
|
|
22
|
+
if (systemPackages.length === 0) {
|
|
23
|
+
logger_1.Logger.loading(`Reading system packages`, true);
|
|
24
|
+
systemPackages = yield systemConnector_1.SystemConnector.getInstalledPackages(true);
|
|
25
|
+
}
|
|
26
|
+
context.parsedInput.systemPackages = systemPackages;
|
|
27
|
+
})
|
|
28
|
+
};
|
|
@@ -0,0 +1,120 @@
|
|
|
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.analizeSapEntries = void 0;
|
|
13
|
+
const logger_1 = require("../../logger");
|
|
14
|
+
const systemConnector_1 = require("../../systemConnector");
|
|
15
|
+
exports.analizeSapEntries = {
|
|
16
|
+
name: 'analize-sap-entries',
|
|
17
|
+
filter: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
+
if (context.parsedInput.sapEntries && Object.keys(context.parsedInput.sapEntries).length > 0) {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
logger_1.Logger.info(`Package ${context.parsedInput.packageName} has no SAP entries`, context.parsedInput.print);
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
}),
|
|
26
|
+
run: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
27
|
+
const sapEntries = context.parsedInput.sapEntries;
|
|
28
|
+
context.runtime.okEntries = [];
|
|
29
|
+
context.runtime.koEntries = [];
|
|
30
|
+
context.runtime.tables = [];
|
|
31
|
+
var entriesCount = 0;
|
|
32
|
+
var tableFields = [];
|
|
33
|
+
Object.keys(sapEntries).forEach(tableName => {
|
|
34
|
+
var aFields = [];
|
|
35
|
+
sapEntries[tableName].forEach(o => {
|
|
36
|
+
entriesCount++;
|
|
37
|
+
Object.keys(o).forEach(field => {
|
|
38
|
+
if (!aFields.includes(field)) {
|
|
39
|
+
aFields.push(field);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
tableFields.push({
|
|
44
|
+
tableName,
|
|
45
|
+
fields: aFields
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
if (entriesCount === 0) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
logger_1.Logger.info(`Package ${context.parsedInput.packageName} has ${entriesCount} SAP entries`, context.parsedInput.print);
|
|
52
|
+
for (const table of Object.keys(sapEntries)) {
|
|
53
|
+
var tableExists;
|
|
54
|
+
try {
|
|
55
|
+
tableExists = yield systemConnector_1.SystemConnector.checkSapEntryExists('TADIR', {
|
|
56
|
+
pgmid: 'R3TR',
|
|
57
|
+
object: 'TABL',
|
|
58
|
+
obj_name: table
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
catch (e) {
|
|
62
|
+
tableExists = false;
|
|
63
|
+
}
|
|
64
|
+
if (!tableExists) {
|
|
65
|
+
context.output.unknownTables.push(table);
|
|
66
|
+
logger_1.Logger.error(`Required ${sapEntries[table].length} entries in ${table}, but table was not found`, context.parsedInput.print);
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
var printTableHead = ['Table name'];
|
|
70
|
+
var printTableData = [];
|
|
71
|
+
var tableData;
|
|
72
|
+
printTableHead = printTableHead.concat(tableFields.find(o => o.tableName === table).fields);
|
|
73
|
+
printTableHead.push('Status');
|
|
74
|
+
for (const tableEntry of sapEntries[table]) {
|
|
75
|
+
tableData = [table];
|
|
76
|
+
var entryStatus;
|
|
77
|
+
try {
|
|
78
|
+
const exists = yield systemConnector_1.SystemConnector.checkSapEntryExists(table, tableEntry);
|
|
79
|
+
if (exists) {
|
|
80
|
+
entryStatus = `OK`;
|
|
81
|
+
context.runtime.okEntries.push({
|
|
82
|
+
table,
|
|
83
|
+
tableEntry
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
entryStatus = `NOT FOUND`;
|
|
88
|
+
context.runtime.koEntries.push({
|
|
89
|
+
table,
|
|
90
|
+
tableEntry
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
catch (e) {
|
|
95
|
+
logger_1.Logger.error(e.toString(), true);
|
|
96
|
+
logger_1.Logger.error(`Error during check of SAP entry ${JSON.stringify(tableEntry)}`, true);
|
|
97
|
+
entryStatus = `Unknown`;
|
|
98
|
+
context.runtime.koEntries.push({
|
|
99
|
+
table,
|
|
100
|
+
tableEntry
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
Object.keys(tableEntry).forEach(field => {
|
|
104
|
+
const pushIndex = printTableHead.findIndex(headerName => headerName === field);
|
|
105
|
+
tableData.splice(pushIndex, 0, tableEntry[field]);
|
|
106
|
+
});
|
|
107
|
+
tableData.push(entryStatus);
|
|
108
|
+
printTableData.push(tableData);
|
|
109
|
+
}
|
|
110
|
+
context.runtime.tables.push({
|
|
111
|
+
head: printTableHead,
|
|
112
|
+
data: printTableData
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
context.runtime.tables.forEach(t => {
|
|
117
|
+
logger_1.Logger.table(t.head, t.data, context.parsedInput.print);
|
|
118
|
+
});
|
|
119
|
+
})
|
|
120
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.buildOutput = void 0;
|
|
13
|
+
exports.buildOutput = {
|
|
14
|
+
name: 'build-output',
|
|
15
|
+
filter: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
try {
|
|
17
|
+
const items = context.runtime.okEntries.length +
|
|
18
|
+
context.runtime.okEntries.length;
|
|
19
|
+
return items > 0;
|
|
20
|
+
}
|
|
21
|
+
catch (e) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
}),
|
|
25
|
+
run: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
26
|
+
context.output.sapEntriesStatus = {};
|
|
27
|
+
context.runtime.okEntries.forEach(o => {
|
|
28
|
+
if (!context.output.sapEntriesStatus[o.table]) {
|
|
29
|
+
context.output.sapEntriesStatus[o.table] = [];
|
|
30
|
+
}
|
|
31
|
+
context.output.sapEntriesStatus[o.table].push({
|
|
32
|
+
status: true,
|
|
33
|
+
entry: o.tableEntry
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
context.runtime.koEntries.forEach(o => {
|
|
37
|
+
if (!context.output.sapEntriesStatus[o.table]) {
|
|
38
|
+
context.output.sapEntriesStatus[o.table] = [];
|
|
39
|
+
}
|
|
40
|
+
context.output.sapEntriesStatus[o.table].push({
|
|
41
|
+
status: false,
|
|
42
|
+
entry: o.tableEntry
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
})
|
|
46
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { TrmPackage } from "../../trmPackage";
|
|
2
|
+
import { LogTableStruct } from "../../commons";
|
|
3
|
+
export type CheckSapEntriesActionInput = {
|
|
4
|
+
trmPackage: TrmPackage;
|
|
5
|
+
print: boolean;
|
|
6
|
+
};
|
|
7
|
+
type WorkflowParsedInput = {
|
|
8
|
+
packageName?: string;
|
|
9
|
+
sapEntries?: any;
|
|
10
|
+
print?: boolean;
|
|
11
|
+
};
|
|
12
|
+
type WorkflowRuntime = {
|
|
13
|
+
tables?: LogTableStruct[];
|
|
14
|
+
okEntries?: any;
|
|
15
|
+
koEntries?: any;
|
|
16
|
+
};
|
|
17
|
+
export type CheckSapEntriesActionOutput = {
|
|
18
|
+
sapEntries?: any;
|
|
19
|
+
sapEntriesStatus?: any;
|
|
20
|
+
unknownTables?: string[];
|
|
21
|
+
};
|
|
22
|
+
export type CheckSapEntriesWorkflowContext = {
|
|
23
|
+
rawInput: CheckSapEntriesActionInput;
|
|
24
|
+
parsedInput: WorkflowParsedInput;
|
|
25
|
+
runtime: WorkflowRuntime;
|
|
26
|
+
output: CheckSapEntriesActionOutput;
|
|
27
|
+
};
|
|
28
|
+
export declare function checkSapEntries(inputData: CheckSapEntriesActionInput): Promise<CheckSapEntriesActionOutput>;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
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.checkSapEntries = void 0;
|
|
16
|
+
const sammarksworkflow_1 = __importDefault(require("@simonegaffurini/sammarksworkflow"));
|
|
17
|
+
const logger_1 = require("../../logger");
|
|
18
|
+
const util_1 = require("util");
|
|
19
|
+
const init_1 = require("./init");
|
|
20
|
+
const analizeSapEntries_1 = require("./analizeSapEntries");
|
|
21
|
+
const buildOutput_1 = require("./buildOutput");
|
|
22
|
+
const WORKFLOW_NAME = 'check-sap-entries';
|
|
23
|
+
function checkSapEntries(inputData) {
|
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
const workflow = [
|
|
26
|
+
init_1.init,
|
|
27
|
+
analizeSapEntries_1.analizeSapEntries,
|
|
28
|
+
buildOutput_1.buildOutput
|
|
29
|
+
];
|
|
30
|
+
logger_1.Logger.log(`Ready to execute workflow ${WORKFLOW_NAME}, input data: ${(0, util_1.inspect)(inputData, { breakLength: Infinity, compact: true })}`, true);
|
|
31
|
+
const result = yield (0, sammarksworkflow_1.default)(WORKFLOW_NAME, workflow, {
|
|
32
|
+
rawInput: inputData,
|
|
33
|
+
parsedInput: {},
|
|
34
|
+
runtime: {},
|
|
35
|
+
output: {}
|
|
36
|
+
});
|
|
37
|
+
logger_1.Logger.log(`Workflow ${WORKFLOW_NAME} result: ${(0, util_1.inspect)(result, { breakLength: Infinity, compact: true })}`, true);
|
|
38
|
+
const output = result.output;
|
|
39
|
+
return output;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
exports.checkSapEntries = checkSapEntries;
|
|
@@ -0,0 +1,29 @@
|
|
|
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.init = void 0;
|
|
13
|
+
exports.init = {
|
|
14
|
+
name: 'init',
|
|
15
|
+
run: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
context.parsedInput.packageName = context.rawInput.trmPackage.packageName;
|
|
17
|
+
context.parsedInput.print = !(context.rawInput.print ? true : false);
|
|
18
|
+
if (context.rawInput.trmPackage.manifest) {
|
|
19
|
+
const manifest = context.rawInput.trmPackage.manifest.get();
|
|
20
|
+
context.parsedInput.sapEntries = manifest.sapEntries || {};
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
context.parsedInput.sapEntries = {};
|
|
24
|
+
}
|
|
25
|
+
context.output = {
|
|
26
|
+
sapEntries: context.parsedInput.sapEntries
|
|
27
|
+
};
|
|
28
|
+
})
|
|
29
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
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.acknowledgementSize = void 0;
|
|
13
|
+
const inquirer_1 = require("../../inquirer");
|
|
14
|
+
exports.acknowledgementSize = {
|
|
15
|
+
name: 'acknowledgement-size',
|
|
16
|
+
filter: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
if (context.parsedInput.tadir.length > 50) {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
}),
|
|
24
|
+
run: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
25
|
+
const size = context.parsedInput.tadir.length;
|
|
26
|
+
const inq1 = yield inquirer_1.Inquirer.prompt({
|
|
27
|
+
type: 'confirm',
|
|
28
|
+
name: 'continueDependency',
|
|
29
|
+
default: true,
|
|
30
|
+
message: `A total of ${size} objects will be analyzed in order to find dependencies, and it may take a long time. Continue?`
|
|
31
|
+
});
|
|
32
|
+
if (!inq1.continueDependency) {
|
|
33
|
+
throw new Error(`Process aborted by user.`);
|
|
34
|
+
}
|
|
35
|
+
})
|
|
36
|
+
};
|