trm-core 2.2.3 → 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 +22 -5
- 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/checkDependencies.js.map +0 -1
- package/dist/actions/checkSapEntries.d.ts +0 -8
- package/dist/actions/checkSapEntries.js +0 -37
- package/dist/actions/checkSapEntries.js.map +0 -1
- package/dist/actions/findTadirDependencies.d.ts +0 -15
- package/dist/actions/findTadirDependencies.js +0 -97
- package/dist/actions/findTadirDependencies.js.map +0 -1
- package/dist/actions/index.js.map +0 -1
- package/dist/actions/install.d.ts +0 -24
- package/dist/actions/install.js +0 -477
- package/dist/actions/install.js.map +0 -1
- package/dist/actions/installDependency.d.ts +0 -12
- package/dist/actions/installDependency.js +0 -108
- package/dist/actions/installDependency.js.map +0 -1
- package/dist/actions/publish.d.ts +0 -22
- package/dist/actions/publish.js +0 -557
- package/dist/actions/publish.js.map +0 -1
- package/dist/commons/CoreEnv.d.ts +0 -5
- package/dist/commons/CoreEnv.js +0 -9
- package/dist/commons/CoreEnv.js.map +0 -1
- package/dist/commons/LogTableStruct.js.map +0 -1
- package/dist/commons/PackageHierarchy.js.map +0 -1
- package/dist/commons/PackageName.js.map +0 -1
- package/dist/commons/fromAbapToDate.js.map +0 -1
- package/dist/commons/getFileSysSeparator.js.map +0 -1
- package/dist/commons/getPackageHierarchy.js.map +0 -1
- package/dist/commons/getPackageNamespace.js.map +0 -1
- package/dist/commons/getParentFromHierarchy.js.map +0 -1
- package/dist/commons/index.js.map +0 -1
- package/dist/commons/normalize.js.map +0 -1
- package/dist/commons/parsePackageName.js.map +0 -1
- package/dist/commons/validateOrganizationName.js.map +0 -1
- package/dist/dependency/IParser.js.map +0 -1
- package/dist/dependency/SenviParser.js.map +0 -1
- package/dist/dependency/index.js.map +0 -1
- package/dist/dependency/objects/ClasSenviParser.js.map +0 -1
- package/dist/dependency/objects/DtelSenviParser.js.map +0 -1
- package/dist/dependency/objects/FugrSenviParser.js.map +0 -1
- package/dist/dependency/objects/OmSenviParser.js.map +0 -1
- package/dist/dependency/objects/ProgSenviParser.js.map +0 -1
- package/dist/dependency/objects/TablSenviParser.js.map +0 -1
- package/dist/dependency/objects/ViewSenviParser.js.map +0 -1
- package/dist/dependency/objects/index.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/inquirer/Inquirer.js.map +0 -1
- package/dist/inquirer/Question.js.map +0 -1
- package/dist/inquirer/index.js.map +0 -1
- package/dist/inquirer/validators/index.js.map +0 -1
- package/dist/inquirer/validators/validateDevclass.js.map +0 -1
- package/dist/inquirer/validators/validateTransportTarget.js.map +0 -1
- package/dist/logger/JSONLog.js.map +0 -1
- package/dist/logger/Logger.js.map +0 -1
- package/dist/logger/TraceLevel.d.ts +0 -3
- package/dist/logger/TraceLevel.js +0 -7
- package/dist/logger/TraceLevel.js.map +0 -1
- package/dist/logger/index.js.map +0 -1
- package/dist/manifest/Manifest.js.map +0 -1
- package/dist/manifest/TrmManifest.js.map +0 -1
- package/dist/manifest/TrmManifestAuthor.js.map +0 -1
- package/dist/manifest/TrmManifestDependency.js.map +0 -1
- package/dist/manifest/index.js.map +0 -1
- package/dist/protocol/CallbackType.js.map +0 -1
- package/dist/protocol/Protocol.js.map +0 -1
- package/dist/protocol/callback.js.map +0 -1
- package/dist/protocol/index.js.map +0 -1
- package/dist/registry/Registry.js.map +0 -1
- package/dist/registry/RegistryType.js.map +0 -1
- package/dist/registry/index.js.map +0 -1
- package/dist/rfc/client/RFCClient.js.map +0 -1
- package/dist/rfc/client/index.d.ts +0 -1
- package/dist/rfc/client/index.js +0 -17
- package/dist/rfc/client/index.js.map +0 -1
- package/dist/rfc/components/ARBGB.js.map +0 -1
- package/dist/rfc/components/AS4DATE.js.map +0 -1
- package/dist/rfc/components/AS4TEXT.js.map +0 -1
- package/dist/rfc/components/AS4TIME.js.map +0 -1
- package/dist/rfc/components/DDOPTION.js.map +0 -1
- package/dist/rfc/components/DDPOSITION.js.map +0 -1
- package/dist/rfc/components/DDSIGN.js.map +0 -1
- package/dist/rfc/components/DDTEXT.js.map +0 -1
- package/dist/rfc/components/DEVCLASS.js.map +0 -1
- package/dist/rfc/components/DEVLAYER.js.map +0 -1
- package/dist/rfc/components/DLVUNIT.js.map +0 -1
- package/dist/rfc/components/FIELDNAME.js.map +0 -1
- package/dist/rfc/components/FILESYS_D.js.map +0 -1
- package/dist/rfc/components/MSGNR.js.map +0 -1
- package/dist/rfc/components/NATXT.js.map +0 -1
- package/dist/rfc/components/PACKAUTHOR.js.map +0 -1
- package/dist/rfc/components/PARENTCL.js.map +0 -1
- package/dist/rfc/components/PFEVALUE.js.map +0 -1
- package/dist/rfc/components/PGMID.js.map +0 -1
- package/dist/rfc/components/RESPONSIBL.js.map +0 -1
- package/dist/rfc/components/SEU_OBJ.js.map +0 -1
- package/dist/rfc/components/SEU_OBJKEY.js.map +0 -1
- package/dist/rfc/components/SOBJ_NAME.js.map +0 -1
- package/dist/rfc/components/SO_TEXT.js.map +0 -1
- package/dist/rfc/components/SPRAS.js.map +0 -1
- package/dist/rfc/components/SRCSYSTEM.js.map +0 -1
- package/dist/rfc/components/SYCHAR512.js.map +0 -1
- package/dist/rfc/components/TABNAME.js.map +0 -1
- package/dist/rfc/components/TDFORMAT.js.map +0 -1
- package/dist/rfc/components/TDLINE.js.map +0 -1
- package/dist/rfc/components/TMSSYSNAM.js.map +0 -1
- package/dist/rfc/components/TRKORR.js.map +0 -1
- package/dist/rfc/components/TROBJTYPE.js.map +0 -1
- package/dist/rfc/components/TROBJ_NAME.js.map +0 -1
- package/dist/rfc/components/TRPARFLAG.js.map +0 -1
- package/dist/rfc/components/TR_TARGET.js.map +0 -1
- package/dist/rfc/components/ZTRM_PACKAGE_INTEGRITY.js.map +0 -1
- package/dist/rfc/components/ZTRM_PACKAGE_NAME.js.map +0 -1
- package/dist/rfc/components/ZTRM_PACKAGE_REGISTRY.js.map +0 -1
- package/dist/rfc/components/index.js.map +0 -1
- package/dist/rfc/index.js.map +0 -1
- package/dist/rfc/struct/E070.js.map +0 -1
- package/dist/rfc/struct/E071.js.map +0 -1
- package/dist/rfc/struct/FILESYS.js.map +0 -1
- package/dist/rfc/struct/KO100.js.map +0 -1
- package/dist/rfc/struct/LXE_TT_PACKG_LINE.js.map +0 -1
- package/dist/rfc/struct/RFC_DB_FLD.js.map +0 -1
- package/dist/rfc/struct/RFC_DB_OPT.js.map +0 -1
- package/dist/rfc/struct/SCOMPKDTLN.js.map +0 -1
- package/dist/rfc/struct/SENVI.js.map +0 -1
- package/dist/rfc/struct/STMSIQREQ.js.map +0 -1
- package/dist/rfc/struct/T100.js.map +0 -1
- package/dist/rfc/struct/TAB512.js.map +0 -1
- package/dist/rfc/struct/TADIR.js.map +0 -1
- package/dist/rfc/struct/TDEVC.js.map +0 -1
- package/dist/rfc/struct/TDEVCT.js.map +0 -1
- package/dist/rfc/struct/TLINE.js.map +0 -1
- package/dist/rfc/struct/TMSCSYS.js.map +0 -1
- package/dist/rfc/struct/ZTRM_INSTALLDEVC.js.map +0 -1
- package/dist/rfc/struct/ZTRM_INTEGRITY.js.map +0 -1
- package/dist/rfc/struct/index.js.map +0 -1
- package/dist/systemConnector/Connection.js.map +0 -1
- package/dist/systemConnector/Login.js.map +0 -1
- package/dist/systemConnector/SystemConnector.js.map +0 -1
- package/dist/systemConnector/index.js.map +0 -1
- package/dist/transport/BinaryTransport.js.map +0 -1
- package/dist/transport/Documentation.js.map +0 -1
- package/dist/transport/FileNames.js.map +0 -1
- package/dist/transport/FilePaths.js.map +0 -1
- package/dist/transport/Transport.js.map +0 -1
- package/dist/transport/TransportContent.js.map +0 -1
- package/dist/transport/TrmTransportIdentifier.js.map +0 -1
- package/dist/transport/index.js.map +0 -1
- package/dist/trmPackage/TrmArtifact.js.map +0 -1
- package/dist/trmPackage/TrmPackage.js.map +0 -1
- package/dist/trmPackage/index.js.map +0 -1
- /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
|
@@ -10,16 +10,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.validateDevclass = void 0;
|
|
13
|
-
|
|
13
|
+
const systemConnector_1 = require("../../systemConnector");
|
|
14
|
+
function validateDevclass(devclass, allowTemporaryPackages) {
|
|
14
15
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15
16
|
if (devclass) {
|
|
16
17
|
devclass = devclass.trim().toUpperCase();
|
|
17
18
|
const c = devclass.charAt(0);
|
|
18
|
-
if (c === '$') {
|
|
19
|
+
if (c === '$' && !allowTemporaryPackages) {
|
|
19
20
|
return 'Temporary packages cannot be released. Move content to a transportable package.';
|
|
20
21
|
}
|
|
21
22
|
else {
|
|
22
|
-
const tdevc = yield
|
|
23
|
+
const tdevc = yield systemConnector_1.SystemConnector.getDevclass(devclass);
|
|
23
24
|
if (!tdevc) {
|
|
24
25
|
return `Package ${devclass} does not exist.`;
|
|
25
26
|
}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { TR_TARGET } from "../../
|
|
2
|
-
import { TMSCSYS } from "../../rfc/struct";
|
|
1
|
+
import { TR_TARGET, TMSCSYS } from "../../client";
|
|
3
2
|
export declare function validateTransportTarget(target: TR_TARGET, systemTmscsys: TMSCSYS[]): Promise<string | true | void>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ResponseMessage } from "trm-registry-types";
|
|
2
|
+
import { CliLogger } from "./CliLogger";
|
|
3
|
+
import { TreeLog } from "./TreeLog";
|
|
4
|
+
export declare class CliLogFileLogger extends CliLogger {
|
|
5
|
+
private _dir;
|
|
6
|
+
private _filePath;
|
|
7
|
+
private _sessionId;
|
|
8
|
+
constructor(_dir: string, debug?: boolean);
|
|
9
|
+
getSessionId(): string;
|
|
10
|
+
private _getStackTrace;
|
|
11
|
+
private _getDebugString;
|
|
12
|
+
private _append;
|
|
13
|
+
endLog(): void;
|
|
14
|
+
getFilePath(): string;
|
|
15
|
+
loading(text: string, debug?: boolean): void;
|
|
16
|
+
success(text: string, debug?: boolean): void;
|
|
17
|
+
error(text: string, debug?: boolean): void;
|
|
18
|
+
warning(text: string, debug?: boolean): void;
|
|
19
|
+
info(text: string, debug?: boolean): void;
|
|
20
|
+
log(text: string, debug?: boolean): void;
|
|
21
|
+
table(header: any, data: any, debug?: boolean): void;
|
|
22
|
+
registryResponse(response: ResponseMessage, debug?: boolean): void;
|
|
23
|
+
tree(data: TreeLog, debug?: boolean): void;
|
|
24
|
+
forceStop(): void;
|
|
25
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CliLogFileLogger = void 0;
|
|
4
|
+
const CliLogger_1 = require("./CliLogger");
|
|
5
|
+
const fs_1 = require("fs");
|
|
6
|
+
const uuid_1 = require("uuid");
|
|
7
|
+
const path_1 = require("path");
|
|
8
|
+
const get_stack_trace_1 = require("get-stack-trace");
|
|
9
|
+
class CliLogFileLogger extends CliLogger_1.CliLogger {
|
|
10
|
+
constructor(_dir, debug) {
|
|
11
|
+
super(debug);
|
|
12
|
+
this._dir = _dir;
|
|
13
|
+
if (!(0, fs_1.existsSync)(this._dir)) {
|
|
14
|
+
(0, fs_1.mkdirSync)(this._dir, {
|
|
15
|
+
recursive: true
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
this._sessionId = (0, uuid_1.v4)();
|
|
19
|
+
this._filePath = (0, path_1.join)(this._dir, `${this._sessionId}.txt`);
|
|
20
|
+
(0, fs_1.writeFileSync)(this.getFilePath(), `*** STARTING LOG SESSION ID ${this._sessionId}, ${new Date().toISOString()} ***`);
|
|
21
|
+
}
|
|
22
|
+
getSessionId() {
|
|
23
|
+
return this._sessionId;
|
|
24
|
+
}
|
|
25
|
+
_getStackTrace() {
|
|
26
|
+
var sStackTrace;
|
|
27
|
+
try {
|
|
28
|
+
const aStackTrace = (0, get_stack_trace_1.getStackTrace)();
|
|
29
|
+
const oStackTrace = aStackTrace[5];
|
|
30
|
+
const moduleName = /(trm-[^\\\/]*)(?:\\{1,2}|\/{1,2})dist/gmi.exec(oStackTrace.fileName)[1];
|
|
31
|
+
sStackTrace = `[${moduleName}] ${oStackTrace.functionName} ${oStackTrace.lineNumber},${oStackTrace.columnNumber}`;
|
|
32
|
+
}
|
|
33
|
+
catch (e) {
|
|
34
|
+
sStackTrace = ``;
|
|
35
|
+
}
|
|
36
|
+
return sStackTrace;
|
|
37
|
+
}
|
|
38
|
+
_getDebugString(text, type) {
|
|
39
|
+
const sStackTrace = this._getStackTrace();
|
|
40
|
+
return `${type} ${new Date().toISOString()} ${sStackTrace} ${text}`;
|
|
41
|
+
}
|
|
42
|
+
_append(text, type) {
|
|
43
|
+
(0, fs_1.appendFileSync)(this.getFilePath(), `\n${this._getDebugString(text, type)}`);
|
|
44
|
+
}
|
|
45
|
+
endLog() {
|
|
46
|
+
(0, fs_1.appendFileSync)(this.getFilePath(), `\n*** ENDING LOG SESSION ID ${this._sessionId}, ${new Date().toISOString()} ***`);
|
|
47
|
+
}
|
|
48
|
+
getFilePath() {
|
|
49
|
+
return this._filePath;
|
|
50
|
+
}
|
|
51
|
+
loading(text, debug) {
|
|
52
|
+
this._append(text, 'WAIT');
|
|
53
|
+
super.loading(text, debug);
|
|
54
|
+
}
|
|
55
|
+
success(text, debug) {
|
|
56
|
+
this._append(text, 'OK ');
|
|
57
|
+
super.success(text, debug);
|
|
58
|
+
}
|
|
59
|
+
error(text, debug) {
|
|
60
|
+
this._append(text, 'ERR ');
|
|
61
|
+
super.error(text, debug);
|
|
62
|
+
}
|
|
63
|
+
warning(text, debug) {
|
|
64
|
+
this._append(text, 'WARN');
|
|
65
|
+
super.warning(text, debug);
|
|
66
|
+
}
|
|
67
|
+
info(text, debug) {
|
|
68
|
+
this._append(text, 'INFO');
|
|
69
|
+
super.info(text, debug);
|
|
70
|
+
}
|
|
71
|
+
log(text, debug) {
|
|
72
|
+
this._append(text, 'LOG ');
|
|
73
|
+
super.log(text, debug);
|
|
74
|
+
}
|
|
75
|
+
table(header, data, debug) {
|
|
76
|
+
this._append(`${JSON.stringify(header)}${JSON.stringify(data)}`, 'TABL');
|
|
77
|
+
super.table(header, data, debug);
|
|
78
|
+
}
|
|
79
|
+
registryResponse(response, debug) {
|
|
80
|
+
this._append(`${JSON.stringify(response)}`, 'REG ');
|
|
81
|
+
super.registryResponse(response, debug);
|
|
82
|
+
}
|
|
83
|
+
tree(data, debug) {
|
|
84
|
+
this._append(`${JSON.stringify(data)}`, 'TREE');
|
|
85
|
+
super.tree(data, debug);
|
|
86
|
+
}
|
|
87
|
+
forceStop() {
|
|
88
|
+
this.log(`Forcing loader stop.`, true);
|
|
89
|
+
super.forceStop();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.CliLogFileLogger = CliLogFileLogger;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ResponseMessage } from "trm-registry-types";
|
|
2
|
+
import { ILogger } from "./ILogger";
|
|
3
|
+
import { TreeLog } from "./TreeLog";
|
|
4
|
+
export declare class CliLogger implements ILogger {
|
|
5
|
+
private _cliObj;
|
|
6
|
+
private _loader;
|
|
7
|
+
debug: boolean;
|
|
8
|
+
constructor(debug: boolean);
|
|
9
|
+
loading(text: string, debug?: boolean): void;
|
|
10
|
+
success(text: string, debug?: boolean): void;
|
|
11
|
+
error(text: string, debug?: boolean): void;
|
|
12
|
+
warning(text: string, debug?: boolean): void;
|
|
13
|
+
info(text: string, debug?: boolean): void;
|
|
14
|
+
log(text: string, debug?: boolean): void;
|
|
15
|
+
table(header: any, data: any, debug?: boolean): void;
|
|
16
|
+
registryResponse(response: ResponseMessage, debug?: boolean): void;
|
|
17
|
+
tree(data: TreeLog, debug?: boolean): void;
|
|
18
|
+
forceStop(): void;
|
|
19
|
+
private _clearLoader;
|
|
20
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.CliLogger = void 0;
|
|
30
|
+
const loading_cli_1 = __importDefault(require("loading-cli"));
|
|
31
|
+
const cli_table3_1 = __importDefault(require("cli-table3"));
|
|
32
|
+
const trm_registry_types_1 = require("trm-registry-types");
|
|
33
|
+
const printTree = __importStar(require("print-tree"));
|
|
34
|
+
class CliLogger {
|
|
35
|
+
constructor(debug) {
|
|
36
|
+
this._cliObj = (0, loading_cli_1.default)({
|
|
37
|
+
frames: ["⊶", "⊷"],
|
|
38
|
+
interval: 1000
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
loading(text, debug) {
|
|
42
|
+
if (debug && !this.debug) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
this._loader = this._cliObj.render().start(text);
|
|
46
|
+
}
|
|
47
|
+
success(text, debug) {
|
|
48
|
+
if (debug && !this.debug) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const aText = text.split('\n');
|
|
52
|
+
aText.forEach(s => {
|
|
53
|
+
if (this._loader) {
|
|
54
|
+
this._loader.succeed(s);
|
|
55
|
+
this._clearLoader();
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
this._cliObj.succeed(s);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
error(text, debug) {
|
|
63
|
+
if (debug && !this.debug) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const aText = text.split('\n');
|
|
67
|
+
aText.forEach(s => {
|
|
68
|
+
if (this._loader) {
|
|
69
|
+
this._loader.fail(s);
|
|
70
|
+
this._clearLoader();
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
this._cliObj.fail(s);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
warning(text, debug) {
|
|
78
|
+
if (debug && !this.debug) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
const aText = text.split('\n');
|
|
82
|
+
aText.forEach(s => {
|
|
83
|
+
if (this._loader) {
|
|
84
|
+
this._loader.warn(s);
|
|
85
|
+
this._clearLoader();
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
this._cliObj.warn(s);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
info(text, debug) {
|
|
93
|
+
if (debug && !this.debug) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const aText = text.split('\n');
|
|
97
|
+
aText.forEach(s => {
|
|
98
|
+
if (this._loader) {
|
|
99
|
+
this._loader.info(s);
|
|
100
|
+
this._clearLoader();
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
this._cliObj.info(s);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
log(text, debug) {
|
|
108
|
+
if (debug && !this.debug) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
const aText = text.split('\n');
|
|
112
|
+
aText.forEach(s => {
|
|
113
|
+
if (this._loader) {
|
|
114
|
+
this.forceStop();
|
|
115
|
+
}
|
|
116
|
+
console.log(s);
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
table(header, data, debug) {
|
|
120
|
+
if (debug && !this.debug) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
var table = new cli_table3_1.default({
|
|
124
|
+
head: header,
|
|
125
|
+
});
|
|
126
|
+
data.forEach(arr => {
|
|
127
|
+
table.push(arr);
|
|
128
|
+
});
|
|
129
|
+
console.log(table.toString());
|
|
130
|
+
}
|
|
131
|
+
registryResponse(response, debug) {
|
|
132
|
+
if (debug && !this.debug) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
if (response.type === trm_registry_types_1.MessageType.ERROR) {
|
|
136
|
+
this.error(response.text, debug);
|
|
137
|
+
}
|
|
138
|
+
if (response.type === trm_registry_types_1.MessageType.INFO) {
|
|
139
|
+
this.info(response.text, debug);
|
|
140
|
+
}
|
|
141
|
+
if (response.type === trm_registry_types_1.MessageType.WARNING) {
|
|
142
|
+
this.warning(response.text, debug);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
tree(data, debug) {
|
|
146
|
+
if (debug && !this.debug) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
const _parseBranch = (o) => {
|
|
150
|
+
var children = [];
|
|
151
|
+
o.children.forEach(k => {
|
|
152
|
+
children.push(_parseBranch(k));
|
|
153
|
+
});
|
|
154
|
+
return {
|
|
155
|
+
name: o.text,
|
|
156
|
+
children
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
const treeData = _parseBranch(data);
|
|
160
|
+
this.forceStop();
|
|
161
|
+
printTree.default(treeData, (node) => {
|
|
162
|
+
return node.name;
|
|
163
|
+
}, (node) => {
|
|
164
|
+
return node.children;
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
forceStop() {
|
|
168
|
+
try {
|
|
169
|
+
this._loader.stop();
|
|
170
|
+
this._clearLoader();
|
|
171
|
+
}
|
|
172
|
+
catch (e) { }
|
|
173
|
+
}
|
|
174
|
+
_clearLoader() {
|
|
175
|
+
delete this._loader;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
exports.CliLogger = CliLogger;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ResponseMessage } from "trm-registry-types";
|
|
2
|
+
import { ILogger } from "./ILogger";
|
|
3
|
+
import { TreeLog } from "./TreeLog";
|
|
4
|
+
export declare class ConsoleLogger implements ILogger {
|
|
5
|
+
debug: boolean;
|
|
6
|
+
constructor(debug: boolean);
|
|
7
|
+
loading(text: string, debug?: boolean): void;
|
|
8
|
+
success(text: string, debug?: boolean): void;
|
|
9
|
+
error(text: string, debug?: boolean): void;
|
|
10
|
+
warning(text: string, debug?: boolean): void;
|
|
11
|
+
info(text: string, debug?: boolean): void;
|
|
12
|
+
log(text: string, debug?: boolean): void;
|
|
13
|
+
table(header: any, data: any, debug?: boolean): void;
|
|
14
|
+
registryResponse(response: ResponseMessage, debug?: boolean): void;
|
|
15
|
+
tree(data: TreeLog, debug?: boolean): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConsoleLogger = void 0;
|
|
4
|
+
const trm_registry_types_1 = require("trm-registry-types");
|
|
5
|
+
class ConsoleLogger {
|
|
6
|
+
constructor(debug) { }
|
|
7
|
+
loading(text, debug) {
|
|
8
|
+
if (debug && !this.debug) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
console.log(text);
|
|
12
|
+
}
|
|
13
|
+
success(text, debug) {
|
|
14
|
+
if (debug && !this.debug) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
console.log(text);
|
|
18
|
+
}
|
|
19
|
+
error(text, debug) {
|
|
20
|
+
if (debug && !this.debug) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
console.error(text);
|
|
24
|
+
}
|
|
25
|
+
warning(text, debug) {
|
|
26
|
+
if (debug && !this.debug) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
console.warn(text);
|
|
30
|
+
}
|
|
31
|
+
info(text, debug) {
|
|
32
|
+
if (debug && !this.debug) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
console.info(text);
|
|
36
|
+
}
|
|
37
|
+
log(text, debug) {
|
|
38
|
+
if (debug && !this.debug) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
console.log(text);
|
|
42
|
+
}
|
|
43
|
+
table(header, data, debug) {
|
|
44
|
+
if (debug && !this.debug) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const table = {
|
|
48
|
+
header,
|
|
49
|
+
data
|
|
50
|
+
};
|
|
51
|
+
console.log(JSON.stringify(table));
|
|
52
|
+
}
|
|
53
|
+
registryResponse(response, debug) {
|
|
54
|
+
if (debug && !this.debug) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (response.type === trm_registry_types_1.MessageType.ERROR) {
|
|
58
|
+
this.error(response.text, debug);
|
|
59
|
+
}
|
|
60
|
+
if (response.type === trm_registry_types_1.MessageType.INFO) {
|
|
61
|
+
this.info(response.text, debug);
|
|
62
|
+
}
|
|
63
|
+
if (response.type === trm_registry_types_1.MessageType.WARNING) {
|
|
64
|
+
this.warning(response.text, debug);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
tree(data, debug) {
|
|
68
|
+
if (debug && !this.debug) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
console.log(JSON.stringify(data));
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
exports.ConsoleLogger = ConsoleLogger;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ResponseMessage } from "trm-registry-types";
|
|
2
|
+
import { ILogger } from "./ILogger";
|
|
3
|
+
import { TreeLog } from "./TreeLog";
|
|
4
|
+
export declare class DummyLogger implements ILogger {
|
|
5
|
+
debug: boolean;
|
|
6
|
+
constructor();
|
|
7
|
+
loading(text: string, debug?: boolean): void;
|
|
8
|
+
success(text: string, debug?: boolean): void;
|
|
9
|
+
error(text: string, debug?: boolean): void;
|
|
10
|
+
warning(text: string, debug?: boolean): void;
|
|
11
|
+
info(text: string, debug?: boolean): void;
|
|
12
|
+
log(text: string, debug?: boolean): void;
|
|
13
|
+
table(header: any, data: any, debug?: boolean): void;
|
|
14
|
+
registryResponse(response: ResponseMessage, debug?: boolean): void;
|
|
15
|
+
tree(data: TreeLog, debug?: boolean): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DummyLogger = void 0;
|
|
4
|
+
class DummyLogger {
|
|
5
|
+
constructor() { }
|
|
6
|
+
loading(text, debug) { }
|
|
7
|
+
success(text, debug) { }
|
|
8
|
+
error(text, debug) { }
|
|
9
|
+
warning(text, debug) { }
|
|
10
|
+
info(text, debug) { }
|
|
11
|
+
log(text, debug) { }
|
|
12
|
+
table(header, data, debug) { }
|
|
13
|
+
registryResponse(response, debug) { }
|
|
14
|
+
tree(data, debug) { }
|
|
15
|
+
}
|
|
16
|
+
exports.DummyLogger = DummyLogger;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ResponseMessage } from "trm-registry-types";
|
|
2
|
+
import { TreeLog } from "./TreeLog";
|
|
3
|
+
export interface ILogger {
|
|
4
|
+
debug: boolean;
|
|
5
|
+
loading: (text: string, debug?: boolean) => void;
|
|
6
|
+
success: (text: string, debug?: boolean) => void;
|
|
7
|
+
error: (text: string, debug?: boolean) => void;
|
|
8
|
+
warning: (text: string, debug?: boolean) => void;
|
|
9
|
+
info: (text: string, debug?: boolean) => void;
|
|
10
|
+
log: (text: string, debug?: boolean) => void;
|
|
11
|
+
table: (header: any, data: any, debug?: boolean) => void;
|
|
12
|
+
registryResponse: (response: ResponseMessage, debug?: boolean) => void;
|
|
13
|
+
tree: (data: TreeLog, debug?: boolean) => void;
|
|
14
|
+
}
|
package/dist/logger/Logger.d.ts
CHANGED
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
import { CoreEnv } from "../commons";
|
|
2
|
-
import { TraceLevel } from "./TraceLevel";
|
|
3
1
|
import { ResponseMessage } from "trm-registry-types";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
registryResponse(response: ResponseMessage): void;
|
|
18
|
-
forceStop(): void;
|
|
19
|
-
static getDummy(): Logger;
|
|
2
|
+
import { ILogger } from "./ILogger";
|
|
3
|
+
import { TreeLog } from "./TreeLog";
|
|
4
|
+
export declare namespace Logger {
|
|
5
|
+
var logger: ILogger;
|
|
6
|
+
function loading(text: string, debug?: boolean): void;
|
|
7
|
+
function success(text: string, debug?: boolean): void;
|
|
8
|
+
function error(text: string, debug?: boolean): void;
|
|
9
|
+
function warning(text: string, debug?: boolean): void;
|
|
10
|
+
function info(text: string, debug?: boolean): void;
|
|
11
|
+
function log(text: string, debug?: boolean): void;
|
|
12
|
+
function table(header: any, data: any, debug?: boolean): void;
|
|
13
|
+
function registryResponse(response: ResponseMessage, debug?: boolean): void;
|
|
14
|
+
function tree(data: TreeLog, debug?: boolean): void;
|
|
20
15
|
}
|