@sap_oss/wdio-qmate-service 3.8.0 → 3.10.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/.eslintrc.yml +4 -4
- package/.prettierrc.json +7 -7
- package/CLAUDE.md +10 -10
- package/CONTRIBUTING.md +1 -1
- package/README.md +6 -2
- package/lib/reuse/authenticator/authConfig.js +3 -3
- package/lib/reuse/authenticator/authConfig.js.map +1 -1
- package/lib/reuse/authenticator/authHandler.js +0 -2
- package/lib/reuse/authenticator/authHandler.js.map +1 -1
- package/lib/reuse/authenticator/basicUrlAuthenticator.js.map +1 -1
- package/lib/reuse/authenticator/customAuthenticator.js +1 -3
- package/lib/reuse/authenticator/customAuthenticator.js.map +1 -1
- package/lib/reuse/authenticator/formAuthenticator.js +1 -3
- package/lib/reuse/authenticator/formAuthenticator.js.map +1 -1
- package/lib/reuse/helper/clientsideUI5scripts.js +15 -19
- package/lib/reuse/helper/clientsideUI5scripts.js.map +1 -1
- package/lib/reuse/helper/dateTimeFormatParser.js +8 -2
- package/lib/reuse/helper/dateTimeFormatParser.js.map +1 -1
- package/lib/reuse/helper/elementHighlight.js +2 -6
- package/lib/reuse/helper/elementHighlight.js.map +1 -1
- package/lib/reuse/helper/errorHandler.js +2 -9
- package/lib/reuse/helper/errorHandler.js.map +1 -1
- package/lib/reuse/helper/jsDocGen.js +1 -1
- package/lib/reuse/helper/jsDocGen.js.map +1 -1
- package/lib/reuse/helper/tableHelper.js +3 -0
- package/lib/reuse/helper/tableHelper.js.map +1 -1
- package/lib/reuse/helper/timeHelper.js +3 -7
- package/lib/reuse/helper/timeHelper.js.map +1 -1
- package/lib/reuse/helper/verboseLogger.js.map +1 -1
- package/lib/reuse/index.js +0 -17
- package/lib/reuse/index.js.map +1 -1
- package/lib/reuse/modules/common/constants/date.constants.js +0 -2
- package/lib/reuse/modules/common/constants/date.constants.js.map +1 -1
- package/lib/reuse/modules/common/navigation.js.map +1 -1
- package/lib/reuse/modules/flp/userSettings.d.ts +2 -0
- package/lib/reuse/modules/flp/userSettings.js +6 -1
- package/lib/reuse/modules/flp/userSettings.js.map +1 -1
- package/lib/reuse/modules/nonUi5/NonUi5.js.map +1 -1
- package/lib/reuse/modules/nonUi5/session.js.map +1 -1
- package/lib/reuse/modules/nonUi5/userInteraction.js.map +1 -1
- package/lib/reuse/modules/ui5/assertion.d.ts +1 -0
- package/lib/reuse/modules/ui5/assertion.js +11 -4
- package/lib/reuse/modules/ui5/assertion.js.map +1 -1
- package/lib/reuse/modules/ui5/control.js.map +1 -1
- package/lib/reuse/modules/ui5/date.js +15 -15
- package/lib/reuse/modules/ui5/date.js.map +1 -1
- package/lib/reuse/modules/ui5/element.d.ts +2 -2
- package/lib/reuse/modules/ui5/element.js +7 -4
- package/lib/reuse/modules/ui5/element.js.map +1 -1
- package/lib/reuse/modules/ui5/session.d.ts +4 -2
- package/lib/reuse/modules/ui5/session.js +32 -4
- package/lib/reuse/modules/ui5/session.js.map +1 -1
- package/lib/reuse/modules/ui5/table.js +25 -9
- package/lib/reuse/modules/ui5/table.js.map +1 -1
- package/lib/reuse/modules/ui5/userInteraction.d.ts +1 -1
- package/lib/reuse/modules/ui5/userInteraction.js +46 -59
- package/lib/reuse/modules/ui5/userInteraction.js.map +1 -1
- package/lib/reuse/modules/util/constants/formatter.constants.js +0 -2
- package/lib/reuse/modules/util/constants/formatter.constants.js.map +1 -1
- package/lib/reuse/modules/util/file.d.ts +7 -4
- package/lib/reuse/modules/util/file.js +34 -7
- package/lib/reuse/modules/util/file.js.map +1 -1
- package/lib/reuse/modules/util/formatter.js +7 -3
- package/lib/reuse/modules/util/formatter.js.map +1 -1
- package/lib/reuse/modules/util/function.js +1 -5
- package/lib/reuse/modules/util/function.js.map +1 -1
- package/lib/scripts/clientsideUI5scripts.js +22 -29
- package/lib/scripts/clientsideUI5scripts.js.map +1 -1
- package/lib/scripts/dataExchange/dataExchange.js.map +1 -1
- package/lib/scripts/dataExchange/dataExchangeUtil.js +3 -13
- package/lib/scripts/dataExchange/dataExchangeUtil.js.map +1 -1
- package/lib/scripts/hooks/before.js +0 -1
- package/lib/scripts/hooks/before.js.map +1 -1
- package/lib/scripts/hooks/onComplete.js +2 -3
- package/lib/scripts/hooks/onComplete.js.map +1 -1
- package/lib/scripts/hooks/utils/addLocatorCommands.js.map +1 -1
- package/lib/scripts/hooks/utils/browserLog.js.map +1 -1
- package/lib/scripts/hooks/utils/cycle.js +3 -9
- package/lib/scripts/hooks/utils/cycle.js.map +1 -1
- package/lib/scripts/hooks/utils/dataExchangeCommands.js +1 -2
- package/lib/scripts/hooks/utils/dataExchangeCommands.js.map +1 -1
- package/lib/scripts/hooks/utils/isBrowserDefined.js.map +1 -1
- package/lib/scripts/locators/qmateLocator.js +30 -53
- package/lib/scripts/locators/qmateLocator.js.map +1 -1
- package/lib/scripts/locators/qmateLocatorSrc/comparators/DomPropertiesComparator.js +2 -2
- package/lib/scripts/locators/qmateLocatorSrc/comparators/DomPropertiesComparator.js.map +1 -1
- package/lib/scripts/locators/qmateLocatorSrc/constants/IgnoredMetadataList.d.ts +1 -0
- package/lib/scripts/locators/qmateLocatorSrc/constants/IgnoredMetadataList.js +10 -0
- package/lib/scripts/locators/qmateLocatorSrc/constants/IgnoredMetadataList.js.map +1 -0
- package/lib/scripts/locators/qmateLocatorSrc/filters/ElementFilter.d.ts +2 -3
- package/lib/scripts/locators/qmateLocatorSrc/filters/ElementFilter.js +18 -22
- package/lib/scripts/locators/qmateLocatorSrc/filters/ElementFilter.js.map +1 -1
- package/lib/scripts/locators/qmateLocatorSrc/utils/UI5ControlHandler.js +3 -2
- package/lib/scripts/locators/qmateLocatorSrc/utils/UI5ControlHandler.js.map +1 -1
- package/lib/scripts/locators/uiveri5Locator.js +1 -1
- package/lib/scripts/locators/uiveri5Locator.js.map +1 -1
- package/lib/scripts/stats/createUsage.js +1 -1
- package/lib/scripts/stats/createUsage.js.map +1 -1
- package/lib/scripts/stats/getOperatingSystem.js.map +1 -1
- package/lib/scripts/stats/getUserId.js +1 -1
- package/lib/scripts/stats/stats.js +9 -9
- package/lib/scripts/stats/stats.js.map +1 -1
- package/lib/scripts/stats/updateUsage.js +1 -1
- package/mkdocs.yml +18 -18
- package/package.json +18 -26
- package/packages/qcrypt/dist/classes/Decrypter.d.ts +38 -38
- package/packages/qcrypt/dist/classes/Decrypter.js +150 -153
- package/packages/qcrypt/dist/classes/Encrypter.d.ts +46 -46
- package/packages/qcrypt/dist/classes/Encrypter.js +144 -144
- package/packages/qcrypt/dist/classes/KeyGenerator.d.ts +16 -16
- package/packages/qcrypt/dist/classes/KeyGenerator.js +45 -43
- package/packages/qcrypt/dist/classes/helper/ErrorHandler.d.ts +8 -8
- package/packages/qcrypt/dist/classes/helper/ErrorHandler.js +48 -50
- package/packages/qcrypt/dist/classes/helper/Util.d.ts +67 -67
- package/packages/qcrypt/dist/classes/helper/Util.js +113 -114
- package/packages/qcrypt/dist/index.js +5 -3
- package/packages/qcrypt/dist/types/common.d.ts +13 -13
- package/reuseApi.json +8 -468
- package/test/.eslintrc.yml +1 -1
- package/test/authenticator/staticLogin/configCustom.js +1 -3
- package/test/authenticator/staticLogin/configCustomViaConfig.js +1 -3
- package/test/authenticator/staticLogin/configFiori.js +1 -3
- package/test/authenticator/staticLogin/configPlain.js +1 -4
- package/test/authenticator/staticLogin/configSapCloud.js +1 -3
- package/test/authenticator/staticLogin/html/custom.html +4 -4
- package/test/authenticator/staticLogin/html/fiori.html +4 -4
- package/test/authenticator/staticLogin/html/home.html +2 -2
- package/test/authenticator/staticLogin/html/sapCloud.html +4 -4
- package/test/authenticator/staticLogin/specs/custom.spec.js +1 -5
- package/test/authenticator/staticLogin/specs/plain.spec.js +0 -5
- package/test/authenticator/staticLogin/staticServerConfig.js +13 -10
- package/test/authenticator/systemLogin/configCustom.js +3 -5
- package/test/authenticator/systemLogin/configFiori.js +2 -5
- package/test/authenticator/systemLogin/configPlain.js +3 -5
- package/test/authenticator/systemLogin/configSapCloud.js +3 -5
- package/test/authenticator/systemLogin/specs/custom.spec.js +3 -5
- package/test/authenticator/systemLogin/specs/fiori.spec.js +3 -4
- package/test/authenticator/systemLogin/specs/plain.spec.js +3 -5
- package/test/authenticator/systemLogin/specs/sapCloud.spec.js +3 -5
- package/test/core/dataExchange/config.export.js +11 -18
- package/test/core/dataExchange/config.import.js +7 -12
- package/test/core/dataExchange/config.js +9 -11
- package/test/core/dataExchange/config.parallel.group.js +53 -61
- package/test/core/dataExchange/config.parallel.js +53 -58
- package/test/core/dataExchange/data/another/folder/data/anotherFolder/purchase-orders/Limit-Purchase-Order.json +1 -1
- package/test/core/dataExchange/data/another/folder/data/anotherFolder/purchase-orders/ServicePurchaseOrder.2Items.json +1 -1
- package/test/core/dataExchange/data/another/folder/data/anotherFolder/purchaseRequisition_HI.json +1 -1
- package/test/core/dataExchange/data/another/folder/data/anotherFolder/subfolder/LimitPurchaseOrder.json +1 -1
- package/test/core/dataExchange/data/another/folder/data/anotherFolder/subfolder/PurchaseOrderItems.json +1 -1
- package/test/core/dataExchange/data/another/folder/data/anotherFolder/subfolder/PurchaseOrderWithScheduline.json +1 -1
- package/test/core/dataExchange/data/another/folder/data/anotherFolder/subfolder/ServiceAndMaterialPurchaseOrder.json +1 -1
- package/test/core/dataExchange/data/another/folder/data/anotherFolder/subfolder/ServicePurchaseOrder.json +1 -1
- package/test/core/dataExchange/data/another/folder/data/anotherFolder/subfolder/ServicePurchaseOrder2Items.json +1 -1
- package/test/core/dataExchange/data/my/folder/data/qs9/data.json +1 -1
- package/test/core/dataExchange/data/my/folder/data/qs9/purchaseRequisition.json +1 -1
- package/test/core/dataExchange/data/my/folder/data/qs9/supplierInvoice.json +1 -1
- package/test/core/dataExchange/data/my/folder/data/qs9/webUser.json +1 -1
- package/test/core/dataExchange/data/ui/moreDataFolder/anotherUser.json +1 -1
- package/test/core/dataExchange/data/ui/user.json +1 -1
- package/test/core/dataExchange/data/ui/webUser.json +1 -1
- package/test/core/dataExchange/specs/export.fast.spec.js +11 -16
- package/test/core/dataExchange/specs/export.slow.spec.js +13 -18
- package/test/core/dataExchange/specs/export.spec.js +13 -23
- package/test/core/dataExchange/specs/import.spec.js +6 -23
- package/test/core/dataExchange/specs/importExport.spec.js +47 -62
- package/test/core/dataExchange/utils.js +11 -15
- package/test/core/functional/README.md +8 -5
- package/test/core/functional/chaining/chaining.test.js +46 -49
- package/test/core/functional/chaining/test.conf.js +1 -4
- package/test/core/functional/locators/ancestorProperties.test.js +49 -59
- package/test/core/functional/locators/childProperties.test.js +30 -36
- package/test/core/functional/locators/descendantProperties.test.js +50 -57
- package/test/core/functional/locators/domProperties.test.js +25 -29
- package/test/core/functional/locators/elementProperties.test.js +30 -29
- package/test/core/functional/locators/mixedProperties.test.js +317 -108
- package/test/core/functional/locators/parentProperties.test.js +18 -22
- package/test/core/functional/locators/siblingProperties.test.js +66 -75
- package/test/core/functional/locators/utils.js +1 -1
- package/test/core/functional/nativeBrowser/runInBrowser.test.js +84 -58
- package/test/core/functional/nativeBrowser/test.conf.js +1 -3
- package/test/core/functional/nonUi5/basic.test.js +3 -3
- package/test/core/functional/nonUi5/getWithDomElement.test.js +0 -2
- package/test/core/functional/nonUi5/getWithDomElements.test.js +2 -3
- package/test/core/functional/nonUi5/test.conf.js +1 -4
- package/test/core/functional/ui5Properties/countries.json +1 -1
- package/test/core/functional/ui5Properties/getAggregations.test.js +19 -27
- package/test/core/functional/ui5Properties/getAssociations.test.js +3 -3
- package/test/core/functional/ui5Properties/getBindingInfos.test.js +17 -17
- package/test/core/functional/ui5Properties/getProperties.test.js +25 -33
- package/test/core/functional/ui5Properties/test.conf.js +1 -6
- package/test/core/functional/uiveri5/sample.test.js +1 -2
- package/test/core/functional/uiveri5/test.conf.js +1 -3
- package/test/core/testIntegration/config.js +1 -1
- package/test/core/testIntegration/configMultiCombo.js +1 -1
- package/test/core/testIntegration/configTable.js +1 -1
- package/test/core/testIntegration/filters1.spec.js +908 -870
- package/test/core/testIntegration/multicombobox.spec.js +64 -60
- package/test/core/testIntegration/table.spec.js +35 -33
- package/test/helper/configurations/base.conf.js +6 -3
- package/test/helper/configurations/chrome.headless.conf.js +1 -1
- package/test/helper/sleeper.js +1 -1
- package/test/reuse/common/assertion/expectDefined.spec.js +1 -2
- package/test/reuse/common/assertion/expectEqual.spec.js +36 -26
- package/test/reuse/common/assertion/expectFalse.spec.js +1 -1
- package/test/reuse/common/assertion/expectTrue.spec.js +1 -1
- package/test/reuse/common/assertion/expectUndefined.spec.js +1 -2
- package/test/reuse/common/assertion/expectUnequal.spec.js +24 -13
- package/test/reuse/common/assertion/expectUrlToBe.spec.js +3 -6
- package/test/reuse/common/assertion/test.assertion.conf.js +39 -35
- package/test/reuse/common/date/calculate.spec.js +36 -36
- package/test/reuse/common/date/calculateWithTime.spec.js +88 -88
- package/test/reuse/common/date/getNextMonth.spec.js +3 -3
- package/test/reuse/common/date/getNextYear.spec.js +2 -2
- package/test/reuse/common/date/getPreviousMonth.spec.js +2 -2
- package/test/reuse/common/date/getPreviousYear.spec.js +2 -2
- package/test/reuse/common/date/getSpecific.spec.js +2 -2
- package/test/reuse/common/date/getToday.spec.js +2 -2
- package/test/reuse/common/date/getTomorrow.spec.js +2 -2
- package/test/reuse/common/date/test.date.conf.js +1 -1
- package/test/reuse/common/navigation/navigateToUrlAndRetry.spec.js +2 -6
- package/test/reuse/common/navigation/test.navigation.conf.js +14 -12
- package/test/reuse/common/userInteraction/clearAndFillActive.spec.js +1 -3
- package/test/reuse/common/userInteraction/clearAndFillActiveAndRetry.spec.js +2 -6
- package/test/reuse/common/userInteraction/fillActive.spec.js +2 -6
- package/test/reuse/common/userInteraction/fillActiveAndRetry.spec.js +2 -6
- package/test/reuse/common/userInteraction/pressKey.spec.js +6 -30
- package/test/reuse/common/userInteraction/test.userInteraction.conf.js +36 -38
- package/test/reuse/flp/userLocks/data/data.json +1 -1
- package/test/reuse/flp/userLocks/deleteExistingLockEntries.spec.js +0 -3
- package/test/reuse/flp/userLocks/getNumberOfLockEntries.spec.js +0 -2
- package/test/reuse/flp/userLocks/test.userLocks.conf.js +1 -4
- package/test/reuse/flp/userSettings/data/data.json +1 -1
- package/test/reuse/flp/userSettings/getDateFormatFromUserSettings.spec.js +0 -2
- package/test/reuse/flp/userSettings/getLanguageFromUserSettings.spec.js +0 -1
- package/test/reuse/flp/userSettings/getTimeFormatFromUserSettings.spec.js +0 -3
- package/test/reuse/flp/userSettings/getTimeZoneFromUserSettings.spec.js +0 -2
- package/test/reuse/flp/userSettings/setDateFormatFromUserSettings.spec.js +0 -2
- package/test/reuse/flp/userSettings/setLanguageFromUserSettings.spec.js +0 -2
- package/test/reuse/flp/userSettings/setNumberFormatFromUserSettings.spec.js +1 -3
- package/test/reuse/flp/userSettings/setS4UserSettings.spec.js +0 -2
- package/test/reuse/flp/userSettings/setTimeFormatFromUserSettings.spec.js +0 -3
- package/test/reuse/flp/userSettings/setTimeZoneFromUserSettings.spec.js +0 -2
- package/test/reuse/flp/userSettings/test.userSettings.apply.conf.js +1 -3
- package/test/reuse/helper/elementHighlight/test.elementHighlight.conf.js +2 -4
- package/test/reuse/nonUi5/assertion/expectAttributeToBe.spec.js +4 -11
- package/test/reuse/nonUi5/assertion/expectAttributeToContain.spec.js +3 -10
- package/test/reuse/nonUi5/assertion/expectCssPropertyValueToBe.spec.js +2 -4
- package/test/reuse/nonUi5/assertion/expectToBeNotVisible.spec.js +3 -5
- package/test/reuse/nonUi5/assertion/expectToBeVisible.spec.js +2 -2
- package/test/reuse/nonUi5/assertion/test.assertion.conf.js +39 -35
- package/test/reuse/nonUi5/assertion/test.assertion.sauceLabs.conf.js +40 -42
- package/test/reuse/nonUi5/element/getAttributeValue.spec.js +3 -9
- package/test/reuse/nonUi5/element/getByChild.spec.js +4 -8
- package/test/reuse/nonUi5/element/getByClass.spec.js +2 -7
- package/test/reuse/nonUi5/element/getByCss.spec.js +6 -11
- package/test/reuse/nonUi5/element/getByCssContainingText.spec.js +2 -6
- package/test/reuse/nonUi5/element/getById.spec.js +3 -10
- package/test/reuse/nonUi5/element/getByName.spec.js +2 -5
- package/test/reuse/nonUi5/element/getByParent.spec.js +5 -15
- package/test/reuse/nonUi5/element/getByXPath.spec.js +2 -5
- package/test/reuse/nonUi5/element/getCssPropertyValue.spec.js +1 -4
- package/test/reuse/nonUi5/element/getValue.spec.js +3 -6
- package/test/reuse/nonUi5/element/highlight.spec.js +0 -2
- package/test/reuse/nonUi5/element/isPresent.spec.js +1 -3
- package/test/reuse/nonUi5/element/isPresentByCss.spec.js +1 -1
- package/test/reuse/nonUi5/element/isPresentByXPath.spec.js +0 -1
- package/test/reuse/nonUi5/element/setInnerHTML.spec.js +2 -5
- package/test/reuse/nonUi5/element/test.element.conf.js +18 -15
- package/test/reuse/nonUi5/element/waitForAll.spec.js +2 -5
- package/test/reuse/nonUi5/element/waitToBeClickable.spec.js +2 -5
- package/test/reuse/nonUi5/element/waitToBePresent.spec.js +2 -3
- package/test/reuse/nonUi5/element/waitToBeVisible.spec.js +3 -8
- package/test/reuse/nonUi5/navigation/test.navigation.conf.js +1 -3
- package/test/reuse/nonUi5/userInteraction/checkAttributeAndValue.spec.js +13 -17
- package/test/reuse/nonUi5/userInteraction/clear.spec.js +3 -5
- package/test/reuse/nonUi5/userInteraction/clearAndFill.spec.js +1 -1
- package/test/reuse/nonUi5/userInteraction/clearAndFillAndRetry.spec.js +1 -3
- package/test/reuse/nonUi5/userInteraction/clearAndRetry.spec.js +1 -3
- package/test/reuse/nonUi5/userInteraction/click.spec.js +1 -3
- package/test/reuse/nonUi5/userInteraction/clickAndRetry.spec.js +2 -6
- package/test/reuse/nonUi5/userInteraction/clickElementInSvg.spec.js +1 -3
- package/test/reuse/nonUi5/userInteraction/doubleClick.spec.js +1 -1
- package/test/reuse/nonUi5/userInteraction/dragAndDrop.spec.js +2 -2
- package/test/reuse/nonUi5/userInteraction/fillAndRetry.spec.js +1 -3
- package/test/reuse/nonUi5/userInteraction/selectAll.spec.js +2 -2
- package/test/reuse/nonUi5/userInteraction/test.userInteraction.conf.js +1 -1
- package/test/reuse/nonUi5/userInteraction/test.userInteraction.sauceLabs.conf.js +43 -39
- package/test/reuse/service/odata/test.odata.conf.js +4 -7
- package/test/reuse/service/rest/db.json +1 -1
- package/test/reuse/service/rest/delete.spec.js +3 -10
- package/test/reuse/service/rest/get.spec.js +2 -9
- package/test/reuse/service/rest/init.spec.js +0 -2
- package/test/reuse/service/rest/patch.spec.js +5 -12
- package/test/reuse/service/rest/post.spec.js +6 -17
- package/test/reuse/service/rest/put.spec.js +10 -17
- package/test/reuse/service/rest/rest-server.js +5 -5
- package/test/reuse/service/rest/test.rest.conf.js +4 -11
- package/test/reuse/ui5/assertion/expectAttributeToBe.spec.js +77 -42
- package/test/reuse/ui5/assertion/expectAttributeToContain.spec.js +48 -18
- package/test/reuse/ui5/assertion/expectBindingContextPathToBe.spec.js +41 -42
- package/test/reuse/ui5/assertion/expectBindingPathToBe.spec.js +58 -64
- package/test/reuse/ui5/assertion/expectCssPropertyValueToBe.spec.js +1 -2
- package/test/reuse/ui5/assertion/expectMessageToastTextToBe.spec.js +7 -11
- package/test/reuse/ui5/assertion/expectTextToBe.spec.js +13 -13
- package/test/reuse/ui5/assertion/expectToBeEnabled.spec.js +2 -6
- package/test/reuse/ui5/assertion/expectToBeNotEnabled.spec.js +17 -20
- package/test/reuse/ui5/assertion/expectToBeNotVisible.spec.js +13 -14
- package/test/reuse/ui5/assertion/expectToBeVisible.spec.js +15 -20
- package/test/reuse/ui5/assertion/expectToBeVisibleInViewport.spec.js +11 -15
- package/test/reuse/ui5/assertion/expectValidationError.spec.js +14 -16
- package/test/reuse/ui5/assertion/expectValidationSuccess.spec.js +14 -16
- package/test/reuse/ui5/assertion/expectValueToBe.spec.js +14 -17
- package/test/reuse/ui5/assertion/expectValueToBeDefined.spec.js +6 -9
- package/test/reuse/ui5/assertion/test.assertion.sauceLab.conf.js +3 -3
- package/test/reuse/ui5/confirmationDialog/clickButton.spec.js +24 -28
- package/test/reuse/ui5/confirmationDialog/clickCancel.spec.js +24 -25
- package/test/reuse/ui5/confirmationDialog/clickCreate.spec.js +1 -1
- package/test/reuse/ui5/confirmationDialog/clickDelete.spec.js +25 -28
- package/test/reuse/ui5/confirmationDialog/clickNo.spec.js +21 -29
- package/test/reuse/ui5/confirmationDialog/clickOk.spec.js +19 -22
- package/test/reuse/ui5/confirmationDialog/clickRevokeApproval.spec.js +1 -1
- package/test/reuse/ui5/confirmationDialog/clickYes.spec.js +17 -25
- package/test/reuse/ui5/confirmationDialog/test.confirmationDialog.conf.js +1 -1
- package/test/reuse/ui5/confirmationDialog/test.confirmationDialog.sauceLab.conf.js +4 -4
- package/test/reuse/ui5/control/execute.spec.js +37 -25
- package/test/reuse/ui5/control/focus.spec.js +29 -29
- package/test/reuse/ui5/control/getAggregationProperty.spec.js +25 -21
- package/test/reuse/ui5/control/getAssociationProperty.spec.js +13 -15
- package/test/reuse/ui5/control/getBindingContextPathProperty.spec.js +12 -10
- package/test/reuse/ui5/control/getProperty.spec.js +12 -10
- package/test/reuse/ui5/control/getPropertyBinding.spec.js +12 -10
- package/test/reuse/ui5/control/test.control.sauceLab.conf.js +3 -4
- package/test/reuse/ui5/date/fillRange.spec.js +7 -10
- package/test/reuse/ui5/date/pick.spec.js +31 -34
- package/test/reuse/ui5/date/pickRange.spec.js +31 -25
- package/test/reuse/ui5/date/pickWithTime.spec.js +8 -10
- package/test/reuse/ui5/date/test.date.conf.js +3 -8
- package/test/reuse/ui5/date/test.date.sauceLab.conf.js +4 -9
- package/test/reuse/ui5/element/getBindingValue.spec.js +17 -23
- package/test/reuse/ui5/element/getByChild.spec.js +52 -52
- package/test/reuse/ui5/element/getByParent.spec.js +65 -61
- package/test/reuse/ui5/element/getByText.spec.js +10 -14
- package/test/reuse/ui5/element/getCssPropertyValue.spec.js +1 -1
- package/test/reuse/ui5/element/getDisplayed.spec.js +23 -26
- package/test/reuse/ui5/element/getId.spec.js +15 -18
- package/test/reuse/ui5/element/getPropertyValue.spec.js +19 -23
- package/test/reuse/ui5/element/highlight.spec.js +9 -12
- package/test/reuse/ui5/element/isVisible.spec.js +12 -12
- package/test/reuse/ui5/element/test.element.sauceLab.conf.js +3 -5
- package/test/reuse/ui5/element/waitForAll.spec.js +10 -15
- package/test/reuse/ui5/errorDialog/clickClose.spec.js +6 -9
- package/test/reuse/ui5/errorDialog/expectToBeVisible.spec.js +7 -11
- package/test/reuse/ui5/errorDialog/test.errorDialog.conf.js +2 -5
- package/test/reuse/ui5/errorDialog/test.errorDialog.sauceLab.conf.js +4 -9
- package/test/reuse/ui5/mockserver_qunit/Component.js +3 -8
- package/test/reuse/ui5/mockserver_qunit/controller/App.controller.js +12 -18
- package/test/reuse/ui5/mockserver_qunit/controller/BaseController.js +3 -10
- package/test/reuse/ui5/mockserver_qunit/controller/Home.controller.js +6 -11
- package/test/reuse/ui5/mockserver_qunit/controller/NotFound.controller.js +6 -11
- package/test/reuse/ui5/mockserver_qunit/controller/employee/Employee.controller.js +10 -16
- package/test/reuse/ui5/mockserver_qunit/controller/employee/EmployeeList.controller.js +4 -9
- package/test/reuse/ui5/mockserver_qunit/controller/employee/Resume.controller.js +39 -36
- package/test/reuse/ui5/mockserver_qunit/controller/employee/overview/EmployeeOverview.controller.js +2 -7
- package/test/reuse/ui5/mockserver_qunit/controller/employee/overview/EmployeeOverviewContent.controller.js +66 -79
- package/test/reuse/ui5/mockserver_qunit/index.html +19 -18
- package/test/reuse/ui5/mockserver_qunit/initMockServer.js +13 -13
- package/test/reuse/ui5/mockserver_qunit/localService/mockdata/Employees.json +153 -153
- package/test/reuse/ui5/mockserver_qunit/localService/mockdata/Resumes.json +63 -63
- package/test/reuse/ui5/mockserver_qunit/localService/mockserver.js +124 -128
- package/test/reuse/ui5/mockserver_qunit/localService/mockserverLoadAllData.js +7 -13
- package/test/reuse/ui5/mockserver_qunit/manifest.json +169 -167
- package/test/reuse/ui5/mockserver_qunit/test/flpSandboxMockServer.html +58 -56
- package/test/reuse/ui5/mockserver_qunit/test/flpSandboxMockServerAllData.html +65 -61
- package/test/reuse/ui5/mockserver_qunit/test/qmate/ui/config.js +60 -66
- package/test/reuse/ui5/mockserver_qunit/test/qmate/ui/qunitExecution/specs/runQUnitTests.spec.js +3 -4
- package/test/reuse/ui5/mockserver_qunit/test/qmate/ui/testDisplayNotFound/data/setup.json +8 -10
- package/test/reuse/ui5/mockserver_qunit/test/qmate/ui/testDisplayNotFound/specs/testDisplayNotFound.spec.js +16 -18
- package/test/reuse/ui5/mockserver_qunit/test/qmate/ui/testShowEmployeeList/data/mock/Employees.json +203 -203
- package/test/reuse/ui5/mockserver_qunit/test/qmate/ui/testShowEmployeeList/data/mock/Resumes.json +113 -113
- package/test/reuse/ui5/mockserver_qunit/test/qmate/ui/testShowEmployeeList/data/setup.json +8 -10
- package/test/reuse/ui5/mockserver_qunit/test/qmate/ui/testShowEmployeeList/data/testShowEmployeeList.json +1 -1
- package/test/reuse/ui5/mockserver_qunit/test/qmate/ui/testShowEmployeeList/specs/testShowEmployeeList.spec.js +24 -26
- package/test/reuse/ui5/mockserver_qunit/test/qmate/ui/utils/constants.js +2 -2
- package/test/reuse/ui5/mockserver_qunit/test/qmate/ui/utils/mockDataMapper.js +5 -6
- package/test/reuse/ui5/mockserver_qunit/test/qmate/ui/utils/mockHelper.js +37 -52
- package/test/reuse/ui5/mockserver_qunit/test/unit/allTests.js +2 -4
- package/test/reuse/ui5/mockserver_qunit/test/unit/unitTests.qunit.html +28 -31
- package/test/reuse/ui5/mockserver_qunit/test/unit/utils/Conversions.js +13 -10
- package/test/reuse/ui5/navigation/expectUnsupportedNavigationPopup.spec.js +12 -13
- package/test/reuse/ui5/navigation/navigateToApplicationWithQueryParams.spec.js +1 -1
- package/test/reuse/ui5/navigation/navigateToApplicationWithQueryParamsAndRetry.spec.js +1 -1
- package/test/reuse/ui5/navigation/navigateToSystemAndApplication.spec.js +1 -2
- package/test/reuse/ui5/navigation/navigateToSystemAndApplicationAndRetry.spec.js +2 -4
- package/test/reuse/ui5/navigation/test.navigation.conf.js +2 -7
- package/test/reuse/ui5/navigation/test.navigation.sauceLab.conf.js +4 -4
- package/test/reuse/ui5/navigation/test.navigation.static.sauceLab.conf.js +4 -4
- package/test/reuse/ui5/navigationBar/clickUserIcon.spec.js +5 -10
- package/test/reuse/ui5/navigationBar/expectPageTitle.spec.js +2 -3
- package/test/reuse/ui5/navigationBar/expectShellHeader.spec.js +2 -3
- package/test/reuse/ui5/navigationBar/test.navigationBar.conf.js +2 -8
- package/test/reuse/ui5/navigationBar/test.navigationBar.sauceLab.conf.js +4 -10
- package/test/reuse/ui5/session/login.spec.js +9 -11
- package/test/reuse/ui5/session/loginFiori.spec.js +5 -7
- package/test/reuse/ui5/session/loginSapCloud.spec.js +6 -8
- package/test/reuse/ui5/session/logout.spec.js +2 -3
- package/test/reuse/ui5/session/switchUser.spec.js +1 -1
- package/test/reuse/ui5/session/test.session.conf.js +1 -7
- package/test/reuse/ui5/session/test.session.sauceLab.conf.js +4 -12
- package/test/reuse/ui5/table/clickSettingsButton.spec.js +12 -18
- package/test/reuse/ui5/table/getAllColumnValuesByName.spec.js +1 -4
- package/test/reuse/ui5/table/getSelectorForRowByIndex.spec.js +11 -14
- package/test/reuse/ui5/table/getSelectorsForRowsByValues.spec.js +6 -9
- package/test/reuse/ui5/table/getTotalNumberOfRowsByValues.spec.js +1 -3
- package/test/reuse/ui5/table/openItemByIndex.spec.js +23 -29
- package/test/reuse/ui5/table/openItemByValues.spec.js +27 -38
- package/test/reuse/ui5/table/selectRowByValues.spec.js +7 -7
- package/test/reuse/ui5/table/sortColumnAscending.spec.js +17 -25
- package/test/reuse/ui5/table/sortColumnDescending.spec.js +13 -19
- package/test/reuse/ui5/table/test.table.sauceLab.conf.js +4 -8
- package/test/reuse/ui5/table/test.table.sauceLab.tunnel.conf.js +4 -8
- package/test/reuse/ui5/userInteraction/clear.spec.js +14 -18
- package/test/reuse/ui5/userInteraction/clearAndFill.spec.js +28 -29
- package/test/reuse/ui5/userInteraction/clearAndFillAndRetry.spec.js +4 -12
- package/test/reuse/ui5/userInteraction/clearAndFillSmartFieldInput.spec.js +20 -19
- package/test/reuse/ui5/userInteraction/clearAndFillSmartFieldInputAndRetry.spec.js +5 -7
- package/test/reuse/ui5/userInteraction/clearAndRetry.spec.js +11 -16
- package/test/reuse/ui5/userInteraction/click.spec.js +90 -29
- package/test/reuse/ui5/userInteraction/clickAndRetry.spec.js +1 -3
- package/test/reuse/ui5/userInteraction/clickSelectArrow.spec.js +29 -30
- package/test/reuse/ui5/userInteraction/clickSelectArrowAndRetry.spec.js +1 -3
- package/test/reuse/ui5/userInteraction/doubleClick.spec.js +18 -22
- package/test/reuse/ui5/userInteraction/dragAndDrop.spec.js +8 -10
- package/test/reuse/ui5/userInteraction/fill.spec.js +20 -22
- package/test/reuse/ui5/userInteraction/fillAndRetry.spec.js +2 -6
- package/test/reuse/ui5/userInteraction/mouseOverElement.spec.js +2 -5
- package/test/reuse/ui5/userInteraction/openF4Help.spec.js +8 -12
- package/test/reuse/ui5/userInteraction/openValueHelp.spec.js +11 -12
- package/test/reuse/ui5/userInteraction/rightClick.spec.js +17 -20
- package/test/reuse/ui5/userInteraction/scrollToElement.spec.js +38 -38
- package/test/reuse/ui5/userInteraction/searchFor.spec.js +3 -12
- package/test/reuse/ui5/userInteraction/selectBox.spec.js +36 -36
- package/test/reuse/ui5/userInteraction/selectCombobox.spec.js +16 -24
- package/test/reuse/ui5/userInteraction/selectMultiComboBox.spec.js +22 -31
- package/test/reuse/util/browser/back.spec.js +10 -11
- package/test/reuse/util/browser/clearBrowser.spec.js +1 -1
- package/test/reuse/util/browser/executeScript.spec.js +14 -16
- package/test/reuse/util/browser/getBaseUrl.spec.js +1 -1
- package/test/reuse/util/browser/getBrowserName.spec.js +1 -3
- package/test/reuse/util/browser/getCurrentUrl.spec.js +9 -9
- package/test/reuse/util/browser/getCurrentWindow.spec.js +1 -1
- package/test/reuse/util/browser/getUI5Version.spec.js +8 -8
- package/test/reuse/util/browser/log.spec.js +1 -3
- package/test/reuse/util/browser/logCurrentUrl.spec.js +1 -1
- package/test/reuse/util/browser/refresh.spec.js +14 -16
- package/test/reuse/util/browser/reloadSession.spec.js +1 -1
- package/test/reuse/util/browser/setBaseUrl.spec.js +2 -2
- package/test/reuse/util/browser/switchToDefaultContent.spec.js +28 -29
- package/test/reuse/util/browser/switchToWindow.spec.js +2 -3
- package/test/reuse/util/browser/test.browserCmndLineArgs.conf.js +1 -3
- package/test/reuse/util/browser/waitUntil.spec.js +8 -16
- package/test/reuse/util/component/loadEntryPoint.spec.js +2 -3
- package/test/reuse/util/component/storeEntryPoint.spec.js +6 -10
- package/test/reuse/util/component/test.component.conf.js +1 -4
- package/test/reuse/util/console/console.spec.js +1 -3
- package/test/reuse/util/console/test.console.conf.js +2 -4
- package/test/reuse/util/data/customSourceData/getSecureData.secure.json +1 -1
- package/test/reuse/util/data/customSourceData/test.json +1 -1
- package/test/reuse/util/data/data/test.json +1 -1
- package/test/reuse/util/data/getData.spec.js +3 -7
- package/test/reuse/util/data/test.data.conf.js +1 -5
- package/test/reuse/util/data/test.data.privacy.conf.js +1 -7
- package/test/reuse/util/file/getAttributeValuesFromJson.spec.js +1 -1
- package/test/reuse/util/file/getFileNamesByExtensions.spec.js +0 -1
- package/test/reuse/util/file/pdfParser.spec.js +76 -80
- package/test/reuse/util/file/test.file.conf.js +2 -1
- package/test/reuse/util/file/testFiles/test1.json +26 -77
- package/test/reuse/util/file/upload.spec.js +24 -29
- package/test/reuse/util/formatter/addRemoveLeadingZeros.spec.js +1 -2
- package/test/reuse/util/formatter/formatDate.spec.js +2 -2
- package/test/reuse/util/formatter/formatDateWithTime.spec.js +6 -2
- package/test/reuse/util/formatter/sliceStringAfter.spec.js +1 -1
- package/test/reuse/util/formatter/sliceStringAt.spec.js +1 -1
- package/test/reuse/util/formatter/stringifyJSON.spec.js +4 -4
- package/test/reuse/util/formatter/test.formatter.conf.js +2 -2
- package/test/reuse/util/system/system.spec.js +1 -3
- package/test/reuse/util/system/test.system.conf.js +3 -5
- package/test/reuse/util/userSettings/data/data.json +1 -1
- package/test/reuse/util/userSettings/getDateFormatFromUserSettings.spec.js +0 -2
- package/test/reuse/util/userSettings/getLanguageFromUserSettings.spec.js +0 -1
- package/test/reuse/util/userSettings/getTimeFormatFromUserSettings.spec.js +0 -3
- package/test/reuse/util/userSettings/getTimeZoneFromUserSettings.spec.js +0 -2
- package/test/reuse/util/userSettings/setDateFormatFromUserSettings.spec.js +0 -2
- package/test/reuse/util/userSettings/setLanguageFromUserSettings.spec.js +0 -2
- package/test/reuse/util/userSettings/setNumberFormatFromUserSettings.spec.js +1 -3
- package/test/reuse/util/userSettings/setS4UserSettings.spec.js +0 -2
- package/test/reuse/util/userSettings/setTimeFormatFromUserSettings.spec.js +0 -3
- package/test/reuse/util/userSettings/setTimeZoneFromUserSettings.spec.js +0 -2
- package/test/reuse/util/userSettings/test.userSettings.apply.conf.js +1 -3
- package/test/unit/stats/getUserId.error.spec.ts +3 -1
- package/test/unit/stats/getUserId.spec.ts +10 -10
- package/test/unit/vitest.config.ts +2 -2
- package/test/watchMode/config.js +1 -3
- package/test/watchMode/navigateToUrlAndClick.spec.js +7 -7
- package/tsconfig.json +1 -4
- package/lib/reuse/modules/mobile/Mobile.d.ts +0 -16
- package/lib/reuse/modules/mobile/Mobile.js +0 -23
- package/lib/reuse/modules/mobile/Mobile.js.map +0 -1
- package/lib/reuse/modules/mobile/android.d.ts +0 -32
- package/lib/reuse/modules/mobile/android.js +0 -85
- package/lib/reuse/modules/mobile/android.js.map +0 -1
- package/lib/reuse/modules/mobile/device.d.ts +0 -173
- package/lib/reuse/modules/mobile/device.js +0 -403
- package/lib/reuse/modules/mobile/device.js.map +0 -1
- package/lib/reuse/modules/mobile/element.d.ts +0 -95
- package/lib/reuse/modules/mobile/element.js +0 -185
- package/lib/reuse/modules/mobile/element.js.map +0 -1
- package/lib/reuse/modules/mobile/gestures.d.ts +0 -42
- package/lib/reuse/modules/mobile/gestures.js +0 -86
- package/lib/reuse/modules/mobile/gestures.js.map +0 -1
- package/lib/reuse/modules/mobile/ios.d.ts +0 -10
- package/lib/reuse/modules/mobile/ios.js +0 -19
- package/lib/reuse/modules/mobile/ios.js.map +0 -1
- package/lib/reuse/modules/mobile/userInteraction.d.ts +0 -94
- package/lib/reuse/modules/mobile/userInteraction.js +0 -210
- package/lib/reuse/modules/mobile/userInteraction.js.map +0 -1
- package/test/helper/configurations/mobile.conf.js +0 -16
|
@@ -1,61 +1,59 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
class ErrorHandler {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
// ========================== Public functions ==========================
|
|
5
|
+
// Common error handlers
|
|
6
|
+
static handleAndThrowError(error, customMessage) {
|
|
7
|
+
if (error instanceof Error) {
|
|
8
|
+
if (customMessage) {
|
|
9
|
+
throw new Error(`${customMessage}: ${error.message}`);
|
|
10
|
+
} else {
|
|
11
|
+
throw new Error(error.message);
|
|
12
|
+
}
|
|
13
|
+
} else {
|
|
14
|
+
throw new Error(ErrorHandler.UNKNOWN_ERROR_MESSAGE);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
// Decryption error handlers
|
|
18
|
+
static handleDecryptDataWithPasswordError(error, options) {
|
|
19
|
+
let errorMessage = error.message;
|
|
20
|
+
switch (error.message) {
|
|
21
|
+
case "error:1C800064:Provider routines::bad decrypt":
|
|
22
|
+
errorMessage = "The data is not encrypted with the correct key.";
|
|
23
|
+
if (options.includeRepoUrl) {
|
|
24
|
+
errorMessage += " Make sure the data is encrypted from the correct repository.";
|
|
14
25
|
}
|
|
15
|
-
|
|
16
|
-
|
|
26
|
+
break;
|
|
27
|
+
case "error:1C80006B:Provider routines::wrong final block length":
|
|
28
|
+
errorMessage = "The data is not encrypted with the correct key or the data is corrupted.";
|
|
29
|
+
if (options.useBase64Input) {
|
|
30
|
+
errorMessage += " Make sure the input data is valid base64 format.";
|
|
17
31
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
static handleDecryptDataWithPasswordError(error, options) {
|
|
21
|
-
let errorMessage = error.message;
|
|
22
|
-
switch (error.message) {
|
|
23
|
-
case "error:1C800064:Provider routines::bad decrypt":
|
|
24
|
-
errorMessage = "The data is not encrypted with the correct key.";
|
|
25
|
-
if (options.includeRepoUrl) {
|
|
26
|
-
errorMessage += " Make sure the data is encrypted from the correct repository.";
|
|
27
|
-
}
|
|
28
|
-
break;
|
|
29
|
-
case "error:1C80006B:Provider routines::wrong final block length":
|
|
30
|
-
errorMessage = "The data is not encrypted with the correct key or the data is corrupted.";
|
|
31
|
-
if (options.useBase64Input) {
|
|
32
|
-
errorMessage += " Make sure the input data is valid base64 format.";
|
|
33
|
-
}
|
|
34
|
-
if (options.includeRepoUrl) {
|
|
35
|
-
errorMessage += " Make sure the data is encrypted from the correct repository.";
|
|
36
|
-
}
|
|
37
|
-
break;
|
|
38
|
-
default:
|
|
39
|
-
errorMessage = `${this.UNKNOWN_ERROR_MESSAGE}: ${error.message}`;
|
|
40
|
-
break;
|
|
32
|
+
if (options.includeRepoUrl) {
|
|
33
|
+
errorMessage += " Make sure the data is encrypted from the correct repository.";
|
|
41
34
|
}
|
|
42
|
-
|
|
35
|
+
break;
|
|
36
|
+
default:
|
|
37
|
+
errorMessage = `${this.UNKNOWN_ERROR_MESSAGE}: ${error.message}`;
|
|
38
|
+
break;
|
|
43
39
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
40
|
+
return errorMessage;
|
|
41
|
+
}
|
|
42
|
+
static handleDecryptDataWithPrivateKeyError(error) {
|
|
43
|
+
let errorMessage = error.message;
|
|
44
|
+
switch (error.message) {
|
|
45
|
+
case "error:1E08010C:DECODER routines::unsupported":
|
|
46
|
+
errorMessage = `${this.INVALID_PRIVATE_KEY_ERROR_MESSAGE}.`;
|
|
47
|
+
break;
|
|
48
|
+
case "Invalid base64 format. Please provide a valid base64 encoded string.":
|
|
49
|
+
errorMessage = `${this.INVALID_PRIVATE_KEY_ERROR_MESSAGE}.`;
|
|
50
|
+
break;
|
|
51
|
+
default:
|
|
52
|
+
errorMessage = `${this.UNKNOWN_ERROR_MESSAGE}: ${error.message}`;
|
|
53
|
+
break;
|
|
58
54
|
}
|
|
55
|
+
return errorMessage;
|
|
56
|
+
}
|
|
59
57
|
}
|
|
60
58
|
// ========================== Constants =================================
|
|
61
59
|
// Common error messages
|
|
@@ -1,69 +1,69 @@
|
|
|
1
1
|
export default abstract class Util {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
2
|
+
/**
|
|
3
|
+
* @description Converts the given string to base64.
|
|
4
|
+
* @param string The string to be converted.
|
|
5
|
+
* @returns The base64 encoded string.
|
|
6
|
+
*/
|
|
7
|
+
static base64ToUtf8(string: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* @description Converts the given string to base64.
|
|
10
|
+
* @param string The string to be converted.
|
|
11
|
+
* @returns The base64 encoded string.
|
|
12
|
+
*/
|
|
13
|
+
static utf8ToBase64(string: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* @description Checks if the given string is base64 encoded.
|
|
16
|
+
* @param string The string to be checked.
|
|
17
|
+
* @returns True if the string is base64 encoded, false otherwise.
|
|
18
|
+
*/
|
|
19
|
+
static isBase64(string: string): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @description Parses the key by encoding.
|
|
22
|
+
* @param key The key to be parsed.
|
|
23
|
+
* @returns The parsed key.
|
|
24
|
+
*/
|
|
25
|
+
static parseKeyByEncoding(key: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* @description Normalizes the key by removing spaces and new lines.
|
|
28
|
+
* @param key The key to be normalized.
|
|
29
|
+
* @returns The normalized key.
|
|
30
|
+
*/
|
|
31
|
+
static normalizeKey(key: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* @description Retrieves the repository URL from the git configuration.
|
|
34
|
+
* @returns The repository URL.
|
|
35
|
+
*/
|
|
36
|
+
static getRepoUrl(): string;
|
|
37
|
+
/**
|
|
38
|
+
* @description Unifies the repository URL into a consistent hash format.
|
|
39
|
+
* @param url The repository URL.
|
|
40
|
+
* @returns The hashed URL.
|
|
41
|
+
*/
|
|
42
|
+
static unifyRepoUrl(url: string): string;
|
|
43
|
+
/**
|
|
44
|
+
* @description Unifies the HTTP repository URL into a consistent hash format.
|
|
45
|
+
* @param url The repository URL.
|
|
46
|
+
* @returns The hashed URL.
|
|
47
|
+
*/
|
|
48
|
+
static unifyHTTPUrl(url: string): string;
|
|
49
|
+
/**
|
|
50
|
+
* @description Unifies the SSH repository URL into a consistent hash format.
|
|
51
|
+
* @param url The repository URL.
|
|
52
|
+
* @returns The hashed URL.
|
|
53
|
+
*/
|
|
54
|
+
static unifySSHUrl(url: string): string;
|
|
55
|
+
/**
|
|
56
|
+
* @description Hashes the host, account, and repository into a consistent format.
|
|
57
|
+
* @param host The repository host.
|
|
58
|
+
* @param account The repository account.
|
|
59
|
+
* @param repo The repository name.
|
|
60
|
+
* @returns The hashed host, account, and repository.
|
|
61
|
+
*/
|
|
62
|
+
static hashHostAccountAndRepo(host: string, account: string, repo: string): string;
|
|
63
|
+
/**
|
|
64
|
+
* @description Converts the given string to an array of strings if not yet an array.
|
|
65
|
+
* @param data The string or array of strings.
|
|
66
|
+
* @returns The array of strings.
|
|
67
|
+
*/
|
|
68
|
+
static convertStringToArray(data: string | Array<string>): Array<string>;
|
|
69
69
|
}
|
|
@@ -1,126 +1,125 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault =
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
var __importDefault =
|
|
3
|
+
(this && this.__importDefault) ||
|
|
4
|
+
function (mod) {
|
|
5
|
+
return mod && mod.__esModule ? mod : { default: mod };
|
|
6
|
+
};
|
|
5
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
8
|
// Imports
|
|
7
9
|
const child_process_1 = __importDefault(require("child_process"));
|
|
8
10
|
const crypto_1 = __importDefault(require("crypto"));
|
|
9
11
|
class Util {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
return Buffer.from(string, "base64").toString("utf-8");
|
|
12
|
+
/**
|
|
13
|
+
* @description Converts the given string to base64.
|
|
14
|
+
* @param string The string to be converted.
|
|
15
|
+
* @returns The base64 encoded string.
|
|
16
|
+
*/
|
|
17
|
+
static base64ToUtf8(string) {
|
|
18
|
+
if (!this.isBase64(string)) {
|
|
19
|
+
throw new Error("Invalid base64 format. Please provide a valid base64 encoded string.");
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
return Buffer.from(string, "base64").toString("utf-8");
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @description Converts the given string to base64.
|
|
25
|
+
* @param string The string to be converted.
|
|
26
|
+
* @returns The base64 encoded string.
|
|
27
|
+
*/
|
|
28
|
+
static utf8ToBase64(string) {
|
|
29
|
+
return Buffer.from(string, "utf-8").toString("base64");
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @description Checks if the given string is base64 encoded.
|
|
33
|
+
* @param string The string to be checked.
|
|
34
|
+
* @returns True if the string is base64 encoded, false otherwise.
|
|
35
|
+
*/
|
|
36
|
+
static isBase64(string) {
|
|
37
|
+
const base64Regex = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;
|
|
38
|
+
return base64Regex.test(string);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* @description Parses the key by encoding.
|
|
42
|
+
* @param key The key to be parsed.
|
|
43
|
+
* @returns The parsed key.
|
|
44
|
+
*/
|
|
45
|
+
static parseKeyByEncoding(key) {
|
|
46
|
+
const utf8Regex = /-*(BEGIN|END)\s\w*\s(PUBLIC|PRIVATE)\sKEY-*/;
|
|
47
|
+
return utf8Regex.test(key) ? key : this.base64ToUtf8(key);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @description Normalizes the key by removing spaces and new lines.
|
|
51
|
+
* @param key The key to be normalized.
|
|
52
|
+
* @returns The normalized key.
|
|
53
|
+
*/
|
|
54
|
+
static normalizeKey(key) {
|
|
55
|
+
return key.replace(/\\n/gm, "\n").replace(/\\s/gm, " ");
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @description Retrieves the repository URL from the git configuration.
|
|
59
|
+
* @returns The repository URL.
|
|
60
|
+
*/
|
|
61
|
+
static getRepoUrl() {
|
|
62
|
+
try {
|
|
63
|
+
return child_process_1.default.execSync("git config --get remote.origin.url").toString().trim();
|
|
64
|
+
} catch (_a) {
|
|
65
|
+
throw new Error("Please execute from a valid git repository.");
|
|
28
66
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* @description Unifies the repository URL into a consistent hash format.
|
|
70
|
+
* @param url The repository URL.
|
|
71
|
+
* @returns The hashed URL.
|
|
72
|
+
*/
|
|
73
|
+
static unifyRepoUrl(url) {
|
|
74
|
+
const httpsRegex = /https?:\/\/.+/;
|
|
75
|
+
const sshRegex = /git@.*:.+/;
|
|
76
|
+
if (httpsRegex.test(url)) {
|
|
77
|
+
return this.unifyHTTPUrl(url);
|
|
78
|
+
} else if (sshRegex.test(url)) {
|
|
79
|
+
return this.unifySSHUrl(url);
|
|
80
|
+
} else {
|
|
81
|
+
throw new Error("Repo URL is not valid.");
|
|
37
82
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return this.unifyHTTPUrl(url);
|
|
77
|
-
}
|
|
78
|
-
else if (sshRegex.test(url)) {
|
|
79
|
-
return this.unifySSHUrl(url);
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
throw new Error("Repo URL is not valid.");
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* @description Unifies the HTTP repository URL into a consistent hash format.
|
|
87
|
-
* @param url The repository URL.
|
|
88
|
-
* @returns The hashed URL.
|
|
89
|
-
*/
|
|
90
|
-
static unifyHTTPUrl(url) {
|
|
91
|
-
const [host, account, repo] = url.replace(/https?:\/\//, "").split("/");
|
|
92
|
-
return this.hashHostAccountAndRepo(host, account, repo.replace(/\.git$/, ""));
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* @description Unifies the SSH repository URL into a consistent hash format.
|
|
96
|
-
* @param url The repository URL.
|
|
97
|
-
* @returns The hashed URL.
|
|
98
|
-
*/
|
|
99
|
-
static unifySSHUrl(url) {
|
|
100
|
-
const [hostAccount, repo] = url.replace("git@", "").split(":");
|
|
101
|
-
const [host, account] = hostAccount.split("/");
|
|
102
|
-
return this.hashHostAccountAndRepo(host, account, repo.replace(/\.git$/, ""));
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* @description Hashes the host, account, and repository into a consistent format.
|
|
106
|
-
* @param host The repository host.
|
|
107
|
-
* @param account The repository account.
|
|
108
|
-
* @param repo The repository name.
|
|
109
|
-
* @returns The hashed host, account, and repository.
|
|
110
|
-
*/
|
|
111
|
-
static hashHostAccountAndRepo(host, account, repo) {
|
|
112
|
-
return crypto_1.default.createHash("sha256").update(`${host}${account}${repo}`).digest("hex");
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* @description Converts the given string to an array of strings if not yet an array.
|
|
116
|
-
* @param data The string or array of strings.
|
|
117
|
-
* @returns The array of strings.
|
|
118
|
-
*/
|
|
119
|
-
static convertStringToArray(data) {
|
|
120
|
-
if (typeof data === "string") {
|
|
121
|
-
data = [data];
|
|
122
|
-
}
|
|
123
|
-
return data;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* @description Unifies the HTTP repository URL into a consistent hash format.
|
|
86
|
+
* @param url The repository URL.
|
|
87
|
+
* @returns The hashed URL.
|
|
88
|
+
*/
|
|
89
|
+
static unifyHTTPUrl(url) {
|
|
90
|
+
const [host, account, repo] = url.replace(/https?:\/\//, "").split("/");
|
|
91
|
+
return this.hashHostAccountAndRepo(host, account, repo.replace(/\.git$/, ""));
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* @description Unifies the SSH repository URL into a consistent hash format.
|
|
95
|
+
* @param url The repository URL.
|
|
96
|
+
* @returns The hashed URL.
|
|
97
|
+
*/
|
|
98
|
+
static unifySSHUrl(url) {
|
|
99
|
+
const [hostAccount, repo] = url.replace("git@", "").split(":");
|
|
100
|
+
const [host, account] = hostAccount.split("/");
|
|
101
|
+
return this.hashHostAccountAndRepo(host, account, repo.replace(/\.git$/, ""));
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* @description Hashes the host, account, and repository into a consistent format.
|
|
105
|
+
* @param host The repository host.
|
|
106
|
+
* @param account The repository account.
|
|
107
|
+
* @param repo The repository name.
|
|
108
|
+
* @returns The hashed host, account, and repository.
|
|
109
|
+
*/
|
|
110
|
+
static hashHostAccountAndRepo(host, account, repo) {
|
|
111
|
+
return crypto_1.default.createHash("sha256").update(`${host}${account}${repo}`).digest("hex");
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* @description Converts the given string to an array of strings if not yet an array.
|
|
115
|
+
* @param data The string or array of strings.
|
|
116
|
+
* @returns The array of strings.
|
|
117
|
+
*/
|
|
118
|
+
static convertStringToArray(data) {
|
|
119
|
+
if (typeof data === "string") {
|
|
120
|
+
data = [data];
|
|
124
121
|
}
|
|
122
|
+
return data;
|
|
123
|
+
}
|
|
125
124
|
}
|
|
126
125
|
exports.default = Util;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault =
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
var __importDefault =
|
|
3
|
+
(this && this.__importDefault) ||
|
|
4
|
+
function (mod) {
|
|
5
|
+
return mod && mod.__esModule ? mod : { default: mod };
|
|
6
|
+
};
|
|
5
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
8
|
exports.KeyGenerator = exports.Encrypter = exports.Decrypter = void 0;
|
|
7
9
|
const Encrypter_1 = __importDefault(require("./classes/Encrypter"));
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
export interface EncryptionOptions {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
includeRepoUrl: boolean;
|
|
3
|
+
useBase64Output: boolean;
|
|
4
|
+
useBase64Input: boolean;
|
|
5
5
|
}
|
|
6
6
|
export interface DecryptionOptions {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
includeRepoUrl: boolean;
|
|
8
|
+
useBase64Output: boolean;
|
|
9
|
+
useBase64Input: boolean;
|
|
10
10
|
}
|
|
11
11
|
export interface KeyGenerationOptions {
|
|
12
|
-
|
|
12
|
+
useBase64Encoding: boolean;
|
|
13
13
|
}
|
|
14
14
|
export interface PrintOptions {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
printInput: boolean;
|
|
16
|
+
printOutput: boolean;
|
|
17
17
|
}
|
|
18
18
|
export interface PublicKey {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
root: KeyRoot;
|
|
20
|
+
key: string;
|
|
21
21
|
}
|
|
22
22
|
export interface EncodedData {
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
root: KeyRoot;
|
|
24
|
+
encodedData: string;
|
|
25
25
|
}
|
|
26
26
|
export type KeyRoot = "cwd" | "qmate";
|
|
27
27
|
export type SecureData = string | Array<string>;
|