Comparing version 0.9.0 to 0.9.2
@@ -1,1 +0,1 @@ | ||
{"version":"0.9.0","commands":{"exec":{"id":"exec","description":"Start and stop Percy around a supplied command.","pluginName":"percy","pluginType":"core","hidden":false,"aliases":[],"examples":["$ percy exec -- echo \"percy is running around this echo command\"","$ percy exec -- bash -c \"echo foo && echo bar\""],"flags":{"network-idle-timeout":{"name":"network-idle-timeout","type":"option","char":"t","description":"asset discovery network idle timeout (in milliseconds)","default":50},"port":{"name":"port","type":"option","char":"p","description":"port","default":5338}},"args":[]},"finalize":{"id":"finalize","description":"Finalize a build. Commonly used for parallelized builds, especially when the number of parallelized processes is unknown.","pluginName":"percy","pluginType":"core","hidden":false,"aliases":[],"examples":["$ percy finalize --all\n[percy] Finalized parallel build."],"flags":{"all":{"name":"all","type":"boolean","char":"a","required":true,"allowNo":false}},"args":[]},"health-check":{"id":"health-check","description":"Determines if the Percy Agent process is currently running","pluginName":"percy","pluginType":"core","hidden":true,"aliases":[],"examples":["$ percy healthcheck","$ percy healthcheck --port 6884"],"flags":{"port":{"name":"port","type":"option","char":"p","description":"port","default":5338}},"args":[]},"percy-command":{"id":"percy-command","pluginName":"percy","pluginType":"core","hidden":true,"aliases":[],"flags":{},"args":[]},"snapshot":{"id":"snapshot","description":"Snapshot a directory containing a pre-built static website.","pluginName":"percy","pluginType":"core","hidden":false,"aliases":[],"examples":["$ percy snapshot _site/","$ percy snapshot _site/ --base-url \"/blog/\"","$ percy snapshot _site/ --ignore-files \"/blog/drafts/**\""],"flags":{"snapshot-files":{"name":"snapshot-files","type":"option","char":"s","description":"Glob or comma-seperated string of globs for matching the files and directories to snapshot.","default":"**/*.html,**/*.htm"},"ignore-files":{"name":"ignore-files","type":"option","char":"i","description":"Glob or comma-seperated string of globs for matching the files and directories to ignore.","default":""},"base-url":{"name":"base-url","type":"option","char":"b","description":"If your static files will be hosted in a subdirectory, instead \nof the webserver's root path, set that subdirectory with this flag.","default":"/"},"network-idle-timeout":{"name":"network-idle-timeout","type":"option","char":"t","description":"Asset discovery network idle timeout (in milliseconds)","default":50},"port":{"name":"port","type":"option","char":"p","description":"Port","default":5338}},"args":[{"name":"snapshotDirectory","description":"A path to the directory you would like to snapshot","required":true}]},"start":{"id":"start","description":"Starts the percy process.","pluginName":"percy","pluginType":"core","hidden":true,"aliases":[],"examples":["$ percy start\ninfo: percy has started on port 5338."],"flags":{"detached":{"name":"detached","type":"boolean","char":"d","description":"start as a detached process","allowNo":false},"network-idle-timeout":{"name":"network-idle-timeout","type":"option","char":"t","description":"asset discovery network idle timeout (in milliseconds)","default":50},"port":{"name":"port","type":"option","char":"p","description":"port","default":5338}},"args":[]},"stop":{"id":"stop","description":"Stops the percy process.","pluginName":"percy","pluginType":"core","hidden":true,"aliases":[],"examples":["$ percy stop\ninfo: percy has stopped."],"flags":{"port":{"name":"port","type":"option","char":"p","description":"port","default":5338}},"args":[]}}} | ||
{"version":"0.9.2","commands":{"exec":{"id":"exec","description":"Start and stop Percy around a supplied command.","pluginName":"percy","pluginType":"core","hidden":false,"aliases":[],"examples":["$ percy exec -- echo \"percy is running around this echo command\"","$ percy exec -- bash -c \"echo foo && echo bar\""],"flags":{"network-idle-timeout":{"name":"network-idle-timeout","type":"option","char":"t","description":"asset discovery network idle timeout (in milliseconds)","default":50},"port":{"name":"port","type":"option","char":"p","description":"port","default":5338}},"args":[]},"finalize":{"id":"finalize","description":"Finalize a build. Commonly used for parallelized builds, especially when the number of parallelized processes is unknown.","pluginName":"percy","pluginType":"core","hidden":false,"aliases":[],"examples":["$ percy finalize --all\n[percy] Finalized parallel build."],"flags":{"all":{"name":"all","type":"boolean","char":"a","required":true,"allowNo":false}},"args":[]},"health-check":{"id":"health-check","description":"Determines if the Percy Agent process is currently running","pluginName":"percy","pluginType":"core","hidden":true,"aliases":[],"examples":["$ percy healthcheck","$ percy healthcheck --port 6884"],"flags":{"port":{"name":"port","type":"option","char":"p","description":"port","default":5338}},"args":[]},"percy-command":{"id":"percy-command","pluginName":"percy","pluginType":"core","hidden":true,"aliases":[],"flags":{},"args":[]},"snapshot":{"id":"snapshot","description":"Snapshot a directory containing a pre-built static website.","pluginName":"percy","pluginType":"core","hidden":false,"aliases":[],"examples":["$ percy snapshot _site/","$ percy snapshot _site/ --base-url \"/blog/\"","$ percy snapshot _site/ --ignore-files \"/blog/drafts/**\""],"flags":{"snapshot-files":{"name":"snapshot-files","type":"option","char":"s","description":"Glob or comma-seperated string of globs for matching the files and directories to snapshot.","default":"**/*.html,**/*.htm"},"ignore-files":{"name":"ignore-files","type":"option","char":"i","description":"Glob or comma-seperated string of globs for matching the files and directories to ignore.","default":""},"base-url":{"name":"base-url","type":"option","char":"b","description":"If your static files will be hosted in a subdirectory, instead \nof the webserver's root path, set that subdirectory with this flag.","default":"/"},"network-idle-timeout":{"name":"network-idle-timeout","type":"option","char":"t","description":"Asset discovery network idle timeout (in milliseconds)","default":50},"port":{"name":"port","type":"option","char":"p","description":"Port","default":5338}},"args":[{"name":"snapshotDirectory","description":"A path to the directory you would like to snapshot","required":true}]},"start":{"id":"start","description":"Starts the percy process.","pluginName":"percy","pluginType":"core","hidden":true,"aliases":[],"examples":["$ percy start\ninfo: percy has started on port 5338."],"flags":{"detached":{"name":"detached","type":"boolean","char":"d","description":"start as a detached process","allowNo":false},"network-idle-timeout":{"name":"network-idle-timeout","type":"option","char":"t","description":"asset discovery network idle timeout (in milliseconds)","default":50},"port":{"name":"port","type":"option","char":"p","description":"port","default":5338}},"args":[]},"stop":{"id":"stop","description":"Stops the percy process.","pluginName":"percy","pluginType":"core","hidden":true,"aliases":[],"examples":["$ percy stop\ninfo: percy has stopped."],"flags":{"port":{"name":"port","type":"option","char":"p","description":"port","default":5338}},"args":[]}}} |
@@ -0,1 +1,16 @@ | ||
## [0.9.2](https://github.com/percy/percy-agent/compare/v0.9.1...v0.9.2) (2019-08-06) | ||
### Bug Fixes | ||
* Pin `@oclif/command` to `1.5.16` ([#319](https://github.com/percy/percy-agent/issues/319)) ([2ba2698](https://github.com/percy/percy-agent/commit/2ba2698)), closes [/github.com/oclif/command/compare/v1.5.16...v1.5.17#diff-53649f4ba3d51e10eff913927cc17e0](https://github.com//github.com/oclif/command/compare/v1.5.16...v1.5.17/issues/diff-53649f4ba3d51e10eff913927cc17e0) | ||
## [0.9.1](https://github.com/percy/percy-agent/compare/v0.9.0...v0.9.1) (2019-08-06) | ||
### Bug Fixes | ||
* Log error if there is one from the config service ([#318](https://github.com/percy/percy-agent/issues/318)) ([6432b63](https://github.com/percy/percy-agent/commit/6432b63)) | ||
* Use `innerHTML` rather than `innerText` for textareas ([#317](https://github.com/percy/percy-agent/issues/317)) ([b700fbb](https://github.com/percy/percy-agent/commit/b700fbb)) | ||
# [0.9.0](https://github.com/percy/percy-agent/compare/v0.8.3...v0.9.0) (2019-07-22) | ||
@@ -2,0 +17,0 @@ |
@@ -123,4 +123,4 @@ "use strict"; | ||
case 'textarea': | ||
// setting text or value does not work but innerText does | ||
cloneEl.innerText = elem.value; | ||
// setting text or value does not work but innerHTML does | ||
cloneEl.innerHTML = elem.value; | ||
break; | ||
@@ -127,0 +127,0 @@ default: |
@@ -1,1 +0,1 @@ | ||
window.PercyAgent=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);var r=5338;function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,"originalDOM",void 0),i(this,"clonedDOM",void 0),i(this,"options",void 0),i(this,"defaultDoctype","<!DOCTYPE html>"),this.originalDOM=t,this.options=n||{},this.clonedDOM=this.cloneDOM()}var t,n,r;return t=e,(n=[{key:"snapshotString",value:function(){var e=this.clonedDOM,t=this.getDoctype();if(this.options.domTransformation)try{e=this.options.domTransformation(e)}catch(e){console.error("Could not transform the dom: ",e)}return t+e.outerHTML}},{key:"getDoctype",value:function(){return this.clonedDOM.doctype?this.doctypeToString(this.clonedDOM.doctype):this.defaultDoctype}},{key:"doctypeToString",value:function(e){var t=e.publicId?' PUBLIC "'.concat(e.publicId,'" '):"",n=e.systemId?' SYSTEM "'.concat(e.systemId,'" '):"";return"<!DOCTYPE ".concat(e.name)+t+n+">"}},{key:"cloneDOM",value:function(){this.mutateOriginalDOM();var e=this.originalDOM.cloneNode(!0);return e=this.stabilizeDOM(e)}},{key:"stabilizeDOM",value:function(e){return this.serializeInputElements(e),this.options.enableJavaScript||this.serializeCSSOM(e),e.documentElement}},{key:"serializeInputElements",value:function(e){var t=this.originalDOM.querySelectorAll("input, textarea, select");Array.from(t).forEach(function(t){var n=t.getAttribute("data-percy-element-id"),r='[data-percy-element-id="'.concat(n,'"]'),o=e.querySelector(r);switch(t.type){case"checkbox":case"radio":t.checked&&o.setAttribute("checked","");break;case"select-one":-1!==t.selectedIndex&&o.options[t.selectedIndex].setAttribute("selected","true");break;case"select-multiple":var i=Array.from(t.selectedOptions),a=Array.from(o.options);i.length&&i.forEach(function(e){a.find(function(t){return e.text===t.text}).setAttribute("selected","true")});break;case"textarea":o.innerText=t.value;break;default:o.setAttribute("value",t.value)}})}},{key:"serializeCSSOM",value:function(e){Array.from(this.originalDOM.styleSheets).forEach(function(t){if(o=t.href,i=t.ownerNode,a=i.innerText&&i.innerText.length>0,!o&&!a&&t.cssRules){var n=e.createElement("style"),r=Array.from(t.cssRules).reduce(function(e,t){return e+t.cssText},"");n.type="text/css",n.setAttribute("data-percy-cssom-serialized","true"),n.innerHTML=r,e.head.appendChild(n)}var o,i,a})}},{key:"mutateOriginalDOM",value:function(){var e=this.originalDOM.querySelectorAll("input, textarea, select");Array.from(e).forEach(function(e){var t,n;e.getAttribute("data-percy-element-id")||(t=e,n="_"+Math.random().toString(36).substr(2,9),t.setAttribute("data-percy-element-id",n))})}}])&&o(t.prototype,n),r&&o(t,r),e}();function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),s(this,"xhr",void 0),s(this,"agentHost",void 0),s(this,"agentConnected",!1),this.agentHost=t,this.xhr=new n||new XMLHttpRequest,this.healthCheck()}var t,n,r;return t=e,(n=[{key:"post",value:function(e,t){this.agentConnected?(this.xhr.open("post","".concat(this.agentHost).concat(e),!1),this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(JSON.stringify(t))):console.warn("percy agent not started.")}},{key:"healthCheck",value:function(){var e=this;try{this.xhr.open("get","".concat(this.agentHost).concat("/percy/healthcheck"),!1),this.xhr.onload=function(){200===e.xhr.status&&(e.agentConnected=!0)},this.xhr.send()}catch(e){this.agentConnected=!1}}}])&&c(t.prototype,n),r&&c(t,r),e}();function u(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(n,!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),d(this,"clientInfo",void 0),d(this,"environmentInfo",void 0),d(this,"xhr",void 0),d(this,"handleAgentCommunication",void 0),d(this,"port",void 0),d(this,"domTransformation",void 0),d(this,"client",null),this.clientInfo=t.clientInfo||null,this.environmentInfo=t.environmentInfo||null,this.handleAgentCommunication=!1!==t.handleAgentCommunication,this.domTransformation=t.domTransformation||null,this.port=t.port||r,this.handleAgentCommunication&&(this.xhr=t.xhr||XMLHttpRequest,this.client=new l("http://localhost:".concat(this.port),this.xhr))}var t,n,o;return t=e,(n=[{key:"snapshot",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.document||document,r=this.domSnapshot(n,t);return this.handleAgentCommunication&&this.client&&this.client.post("/percy/snapshot",{name:e,url:n.URL,enableJavaScript:t.enableJavaScript||t.enableJavascript,widths:t.widths,minHeight:t.minHeight||t.minimumHeight,clientInfo:this.clientInfo,environmentInfo:this.environmentInfo,domSnapshot:r}),r}},{key:"domSnapshot",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new a(e,h({},t,{domTransformation:this.domTransformation}));return n.snapshotString()}}])&&f(t.prototype,n),o&&f(t,o),e}();t.default=p}]).default; | ||
window.PercyAgent=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);var r=5338;function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,"originalDOM",void 0),i(this,"clonedDOM",void 0),i(this,"options",void 0),i(this,"defaultDoctype","<!DOCTYPE html>"),this.originalDOM=t,this.options=n||{},this.clonedDOM=this.cloneDOM()}var t,n,r;return t=e,(n=[{key:"snapshotString",value:function(){var e=this.clonedDOM,t=this.getDoctype();if(this.options.domTransformation)try{e=this.options.domTransformation(e)}catch(e){console.error("Could not transform the dom: ",e)}return t+e.outerHTML}},{key:"getDoctype",value:function(){return this.clonedDOM.doctype?this.doctypeToString(this.clonedDOM.doctype):this.defaultDoctype}},{key:"doctypeToString",value:function(e){var t=e.publicId?' PUBLIC "'.concat(e.publicId,'" '):"",n=e.systemId?' SYSTEM "'.concat(e.systemId,'" '):"";return"<!DOCTYPE ".concat(e.name)+t+n+">"}},{key:"cloneDOM",value:function(){this.mutateOriginalDOM();var e=this.originalDOM.cloneNode(!0);return e=this.stabilizeDOM(e)}},{key:"stabilizeDOM",value:function(e){return this.serializeInputElements(e),this.options.enableJavaScript||this.serializeCSSOM(e),e.documentElement}},{key:"serializeInputElements",value:function(e){var t=this.originalDOM.querySelectorAll("input, textarea, select");Array.from(t).forEach(function(t){var n=t.getAttribute("data-percy-element-id"),r='[data-percy-element-id="'.concat(n,'"]'),o=e.querySelector(r);switch(t.type){case"checkbox":case"radio":t.checked&&o.setAttribute("checked","");break;case"select-one":-1!==t.selectedIndex&&o.options[t.selectedIndex].setAttribute("selected","true");break;case"select-multiple":var i=Array.from(t.selectedOptions),a=Array.from(o.options);i.length&&i.forEach(function(e){a.find(function(t){return e.text===t.text}).setAttribute("selected","true")});break;case"textarea":o.innerHTML=t.value;break;default:o.setAttribute("value",t.value)}})}},{key:"serializeCSSOM",value:function(e){Array.from(this.originalDOM.styleSheets).forEach(function(t){if(o=t.href,i=t.ownerNode,a=i.innerText&&i.innerText.length>0,!o&&!a&&t.cssRules){var n=e.createElement("style"),r=Array.from(t.cssRules).reduce(function(e,t){return e+t.cssText},"");n.type="text/css",n.setAttribute("data-percy-cssom-serialized","true"),n.innerHTML=r,e.head.appendChild(n)}var o,i,a})}},{key:"mutateOriginalDOM",value:function(){var e=this.originalDOM.querySelectorAll("input, textarea, select");Array.from(e).forEach(function(e){var t,n;e.getAttribute("data-percy-element-id")||(t=e,n="_"+Math.random().toString(36).substr(2,9),t.setAttribute("data-percy-element-id",n))})}}])&&o(t.prototype,n),r&&o(t,r),e}();function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),s(this,"xhr",void 0),s(this,"agentHost",void 0),s(this,"agentConnected",!1),this.agentHost=t,this.xhr=new n||new XMLHttpRequest,this.healthCheck()}var t,n,r;return t=e,(n=[{key:"post",value:function(e,t){this.agentConnected?(this.xhr.open("post","".concat(this.agentHost).concat(e),!1),this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(JSON.stringify(t))):console.warn("percy agent not started.")}},{key:"healthCheck",value:function(){var e=this;try{this.xhr.open("get","".concat(this.agentHost).concat("/percy/healthcheck"),!1),this.xhr.onload=function(){200===e.xhr.status&&(e.agentConnected=!0)},this.xhr.send()}catch(e){this.agentConnected=!1}}}])&&c(t.prototype,n),r&&c(t,r),e}();function u(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(n,!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),d(this,"clientInfo",void 0),d(this,"environmentInfo",void 0),d(this,"xhr",void 0),d(this,"handleAgentCommunication",void 0),d(this,"port",void 0),d(this,"domTransformation",void 0),d(this,"client",null),this.clientInfo=t.clientInfo||null,this.environmentInfo=t.environmentInfo||null,this.handleAgentCommunication=!1!==t.handleAgentCommunication,this.domTransformation=t.domTransformation||null,this.port=t.port||r,this.handleAgentCommunication&&(this.xhr=t.xhr||XMLHttpRequest,this.client=new l("http://localhost:".concat(this.port),this.xhr))}var t,n,o;return t=e,(n=[{key:"snapshot",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.document||document,r=this.domSnapshot(n,t);return this.handleAgentCommunication&&this.client&&this.client.post("/percy/snapshot",{name:e,url:n.URL,enableJavaScript:t.enableJavaScript||t.enableJavascript,widths:t.widths,minHeight:t.minHeight||t.minimumHeight,clientInfo:this.clientInfo,environmentInfo:this.environmentInfo,domSnapshot:r}),r}},{key:"domSnapshot",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new a(e,h({},t,{domTransformation:this.domTransformation}));return n.snapshotString()}}])&&f(t.prototype,n),o&&f(t,o),e}();t.default=p}]).default; |
@@ -20,2 +20,3 @@ "use strict"; | ||
const userConf = yaml.safeLoad(fs.readFileSync(userConfigFilePath, 'utf8')); | ||
logger_1.default.debug(`Current config file path: ${userConfigFilePath}`); | ||
// apply a deep overwrite merge to userConf and this.configuration | ||
@@ -25,4 +26,4 @@ const overwriteMerge = (destinationArray, sourceArray, options) => sourceArray; | ||
} | ||
catch (_a) { | ||
logger_1.default.debug('.percy.yml configuration file not supplied or failed to be loaded and parsed.'); | ||
catch (error) { | ||
logger_1.default.debug(`.percy.yml configuration file not supplied or failed to be loaded and parsed: ${error}`); | ||
} | ||
@@ -29,0 +30,0 @@ return this.configuration; |
{ | ||
"name": "percy", | ||
"description": "An agent process for integrating with Percy.", | ||
"version": "0.9.0", | ||
"version": "0.9.2", | ||
"author": "Perceptual Inc", | ||
@@ -6,0 +6,0 @@ "bin": { |
@@ -22,3 +22,3 @@ @percy/agent | ||
$ percy (-v|--version|version) | ||
percy/0.9.0 linux-x64 node-v10.16.0 | ||
percy/0.9.2 linux-x64 node-v10.16.1 | ||
$ percy --help [COMMAND] | ||
@@ -54,3 +54,3 @@ USAGE | ||
_See code: [dist/commands/exec.ts](https://github.com/percy/percy-agent/blob/v0.9.0/dist/commands/exec.ts)_ | ||
_See code: [dist/commands/exec.ts](https://github.com/percy/percy-agent/blob/v0.9.2/dist/commands/exec.ts)_ | ||
@@ -73,3 +73,3 @@ ## `percy finalize` | ||
_See code: [dist/commands/finalize.ts](https://github.com/percy/percy-agent/blob/v0.9.0/dist/commands/finalize.ts)_ | ||
_See code: [dist/commands/finalize.ts](https://github.com/percy/percy-agent/blob/v0.9.2/dist/commands/finalize.ts)_ | ||
@@ -125,3 +125,3 @@ ## `percy help [COMMAND]` | ||
_See code: [dist/commands/snapshot.ts](https://github.com/percy/percy-agent/blob/v0.9.0/dist/commands/snapshot.ts)_ | ||
_See code: [dist/commands/snapshot.ts](https://github.com/percy/percy-agent/blob/v0.9.2/dist/commands/snapshot.ts)_ | ||
<!-- commandsstop --> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
108833
1959