@mablhq/mabl-cli 2.57.1 → 2.57.4
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/browserEngines/chromiumBrowserEngine.js +2 -3
- package/browserLauncher/index.js +1 -1
- package/execution/index.js +1 -1
- package/package.json +3 -3
- package/popupDismissal/index.js +4 -3
- package/providers/cliConfigProvider.js +2 -1
- package/resources/popupDismissal.js +1 -1
- package/util/CloudStorageWriter.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mablhq/mabl-cli",
|
|
3
|
-
"version": "2.57.
|
|
3
|
+
"version": "2.57.4",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "The official mabl command line interface tool",
|
|
6
6
|
"main": "index.js",
|
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
"open": "6.4.0",
|
|
78
78
|
"ora": "4.0.4",
|
|
79
79
|
"pixelmatch": "5.3.0",
|
|
80
|
-
"playwright": "1.51.
|
|
81
|
-
"playwright-core": "1.51.
|
|
80
|
+
"playwright": "1.51.1",
|
|
81
|
+
"playwright-core": "1.51.1",
|
|
82
82
|
"pluralize": "8.0.0",
|
|
83
83
|
"pngjs": "6.0.0",
|
|
84
84
|
"portfinder": "1.0.28",
|
package/popupDismissal/index.js
CHANGED
|
@@ -92,9 +92,10 @@ function developCloseCandidates(candidates) {
|
|
|
92
92
|
const domCovering = [];
|
|
93
93
|
const actionableElements = [];
|
|
94
94
|
candidate.elements.forEach((element) => {
|
|
95
|
-
var _a;
|
|
96
|
-
if (element === null || element === void 0 ? void 0 : element.offsetParent)
|
|
97
|
-
|
|
95
|
+
var _a, _b;
|
|
96
|
+
if ((element === null || element === void 0 ? void 0 : element.offsetParent) ||
|
|
97
|
+
((_a = element.tagName) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === 'SVG') {
|
|
98
|
+
if (['BUTTON', 'A', 'DIV', 'SVG'].includes((_b = element.tagName) === null || _b === void 0 ? void 0 : _b.toUpperCase()) &&
|
|
98
99
|
checkElementAttributes(element) &&
|
|
99
100
|
!actionableElements.includes(element)) {
|
|
100
101
|
actionableElements.push(element);
|
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.__resetIsKeytarAvailable = exports.CliConfigProvider = exports.getAuthConfigFile = exports.getEncryptionKey = exports.AUTH_KEY_NAMES = exports.IS_CONFIG_ENCRYPTED_KEY_NAME = void 0;
|
|
29
|
+
exports.__resetIsKeytarAvailable = exports.CliConfigProvider = exports.getAuthConfigFile = exports.getEncryptionKey = exports.AUTH_KEY_NAMES = exports.BROWSER_CONFIG_KEY = exports.IS_CONFIG_ENCRYPTED_KEY_NAME = void 0;
|
|
30
30
|
const env_1 = require("../env/env");
|
|
31
31
|
const conf_1 = __importDefault(require("conf"));
|
|
32
32
|
const types_1 = require("./types");
|
|
@@ -47,6 +47,7 @@ const REFRESH_TOKEN_NAME = 'refreshToken';
|
|
|
47
47
|
const ACCESS_TOKEN_EXPIRATION_MILLISECONDS_NAME = 'accessTokenExpirationTimeMilliseconds';
|
|
48
48
|
const REFRESH_TOKEN_EXPIRATION_MILLISECONDS_NAME = `${REFRESH_TOKEN_NAME}ExpirationTimeMilliseconds`;
|
|
49
49
|
exports.IS_CONFIG_ENCRYPTED_KEY_NAME = '_isConfigEncrypted';
|
|
50
|
+
exports.BROWSER_CONFIG_KEY = 'browser.path';
|
|
50
51
|
exports.AUTH_KEY_NAMES = [
|
|
51
52
|
AUTH_PROVIDER,
|
|
52
53
|
AUTH_TYPE,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{detectAndDismissPopupCandidates:()=>
|
|
1
|
+
(()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{detectAndDismissPopupCandidates:()=>y,elementsByHigherZIndex:()=>a,elementsInFrontCount:()=>I,fireClickEvent:()=>h,fireDoubleClickEvent:()=>f,fireRightClickEvent:()=>g,getAllElementsAbove:()=>v,getOverlappingElements:()=>p});const n=750,o="auto",i=.95,r=["close","dismiss","exit","not at this time","no thanks","no, thanks","i, agree","i agree"],s=[{attributeName:"className",matchFunction:c},{attributeName:"name",matchFunction:c},{attributeName:"id",matchFunction:c},{attributeName:"href",matchFunction:c},{attributeName:"innerText",matchFunction:function(e,t){const n=new RegExp(`\\b${t}\\b`);return!!e.toLowerCase().match(n)}}];function a(e){return Array.from(document.querySelectorAll("body *")).reduce(((t,n)=>{const o=parseFloat(globalThis.getComputedStyle(n).zIndex),i="number"==typeof e?e:parseFloat(e);return!Number.isNaN(o)&&o>=i&&(t.has(o)?t.get(o).push(n):t.set(o,[n])),t}),new Map)}function l(e){const t=e=>void 0===e||"html"===e.tagName.toLowerCase();let n=e;for(;!t(n);){const e=globalThis.getComputedStyle(n).zIndex;if(e&&e!==o)return parseInt(e,10);n=(null==n?void 0:n.parentElement)?n.parentElement:void 0}return 0}function u(e){let t=[e];return Array.from(e.children).forEach((e=>{t=t.concat(u(e))})),t}function c(e,t){return e.toLowerCase().includes(t)}function d(e){const t=[];return e.forEach((e=>{const n=[],o=[];e.elements.forEach((e=>{var t,a;((null==e?void 0:e.offsetParent)||"SVG"===(null===(t=e.tagName)||void 0===t?void 0:t.toUpperCase()))&&(["BUTTON","A","DIV","SVG"].includes(null===(a=e.tagName)||void 0===a?void 0:a.toUpperCase())&&function(e){let t=0;return s.forEach((n=>{r.forEach((o=>{e.getAttribute(n.attributeName)&&n.matchFunction(e.getAttribute(n.attributeName),o)&&(t+=1)}))})),t}(e)&&!o.includes(e)?o.push(e):function(e){if(e.getBoundingClientRect){const t=e.getBoundingClientRect(),n=t.width/globalThis.innerWidth,o=t.height/globalThis.innerHeight;return n>i&&o>i}return!1}(e)&&n.push(e))})),t.push({zIndex:e.zIndex,actionableElements:o,domCovering:n,dismissedStatus:!1,elementsInFront:0})})),t}function m(e,t,n=!1){const o=e.getBoundingClientRect(),i=o.height/2,r=n?1:o.width/2,s="contextmenu"===t?2:0,a=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:o.left+r,screenY:o.top+i,clientX:e.clientLeft+r,clientY:e.clientTop+i,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:s,relatedTarget:void 0});e.dispatchEvent(a)}function f(e){h(e,!1),h(e,!1),m(e,"dblclick")}function h(e,t=!1){m(e,"click",t)}function g(e,t=!1){m(e,"contextmenu",t)}function p(e){const{x:t,y:n}={x:(o=e.getBoundingClientRect()).left+o.width/2,y:o.top+o.height/2};var o;const i=document.elementsFromPoint(t,n),r=i.findIndex((t=>t===e));return r?i.slice(0,r):[]}function b(e){return new Promise((t=>setTimeout(t,e)))}function v(e,t){if(0===t.length)return[];const n=l(e),o=Math.min(...null==t?void 0:t.map((e=>l(e))));if(o<=n)return[];const i=a(o),r=Array.from(i).map((([e,t])=>({zIndex:e,elements:t.flatMap(u).reverse()})));return r.sort(((e,t)=>t.zIndex-e.zIndex)),r}async function y(e){try{let t=p(e);const o=t.length;if(0===o)return{elementsInFront:0,dismissedStatus:!1};const i=async function(t,i){for(const r of t)if(h(r,i),await b(n),p(e).length<o)return!0;return!1};let r=v(e,t);const s=d(r);for(const e of s){let t=await i(e.domCovering,!0);if(t||(t=await i(e.actionableElements,!1)),t)return{dismissedStatus:!0,elementsInFront:0}}t=p(e),r=v(e,t);const a=d(r),l=a.length?a[0]:{zIndex:0,elementsInFront:0,dismissedStatus:!1,domCovering:[],actionableElements:[]};return l.elementsInFront=t.length,l.dismissedStatus=!1,{dismissedStatus:l.dismissedStatus,elementsInFront:l.elementsInFront}}catch(e){return{elementsInFront:0,dismissedStatus:!1,error:e.toString()}}}function I(e){return p(e).length}window.popupDismissal=t})();
|
|
@@ -33,7 +33,7 @@ class CloudStorageWriter {
|
|
|
33
33
|
return this.bucket.file(path).save(data, {
|
|
34
34
|
contentType,
|
|
35
35
|
metadata: {
|
|
36
|
-
'
|
|
36
|
+
'Custom-Time': getNowIsoTimestamp(),
|
|
37
37
|
},
|
|
38
38
|
gzip: AUTO_COMPRESS_MIME_TYPES.has(contentType.toLowerCase()),
|
|
39
39
|
});
|