diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..d200023 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +.babelrc export-ignore +.eslintrc export-ignore +.nvmrc export-ignore +prettier.config.js export-ignore diff --git a/.github/workflows/build-assets.yml b/.github/workflows/build-assets.yml new file mode 100644 index 0000000..fcb82e9 --- /dev/null +++ b/.github/workflows/build-assets.yml @@ -0,0 +1,30 @@ +name: Build and commit assets + +on: [pull_request] + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.head.ref }} + + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Add & Commit + uses: EndBug/add-and-commit@v9.1.1 + with: + add: build + message: 'Build production assets (from GitHub Actions)' diff --git a/.gitignore b/.gitignore index c62a08b..7476b42 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,16 @@ -# built assets -/build - # local environment .env error.log -# caching and debuging +# Deps /node_modules -/vendor + +vendor/**/* +!vendor/autoload.php +!vendor/composer +!vendor/composer/* + +# caching and debuging npm-debug.log* yarn-debug.log* yarn-error.log* diff --git a/build/index.asset.php b/build/index.asset.php new file mode 100644 index 0000000..6839bba --- /dev/null +++ b/build/index.asset.php @@ -0,0 +1 @@ + array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-plugins', 'wp-rich-text'), 'version' => '42166e9cbebc9b002fd7'); diff --git a/build/index.css b/build/index.css new file mode 100644 index 0000000..e6b4480 --- /dev/null +++ b/build/index.css @@ -0,0 +1,4 @@ +:root{--ups-color-blue:#0075af;--ups-color-light-blue:#f3f5f6;--ups-color-gray:#555d66;--ups-color-white:#fff;--ups-color-black:#000;--ups-border-radius-sm:3px;--ups-font-size-base:13px;--ups-line-height:1.4;--ups-spacing-xs:4px;--ups-spacing-sm:8px;--ups-spacing-base:16px}.block-editor-block-inspector .block-editor-cover+.components-panel__body .components-toggle-control,.block-editor-block-inspector .block-editor-cover~.block-editor-panel-color-gradient-settings,.block-editor-block-inspector .block-editor-cover~.components-panel__body:nth-of-type(3),.block-editor-block-inspector .block-editor-gallery+.components-panel__body .components-range-control,.block-editor-block-inspector .block-editor-table~.block-editor-panel-color-gradient-settings{display:none}.wp-block:not([data-resized=true])[data-align=left] .is-block-content,.wp-block:not([data-resized=true])[data-align=right] .is-block-content{max-width:50%}.wp-block .wp-block-pullquote{text-align:left}.wp-block .wp-block-pullquote .wp-block-pullquote cite,.wp-block .wp-block-pullquote .wp-block-pullquote footer,.wp-block .wp-block-pullquote .wp-block-pullquote__citation{text-transform:none}.wp-block .wp-block-pullquote__citation:before,.wp-block .wp-block-quote__citation:before{content:"—";display:block;font-weight:500;left:0;position:absolute}.wp-block .wp-block-quote__citation{padding-left:20px}.wp-block .wp-block-pullquote__citation{padding-left:25px}.wp-block .wp-block-pullquote__citation:before{left:20px} +.maSOKrYHsPNjYS48Subg .bdZkY38M12yKa_e1qE26{left:50%;position:absolute;top:50%;transform:translate3d(-50%,-50%,0);z-index:20}.maSOKrYHsPNjYS48Subg .bdZkY38M12yKa_e1qE26.E8Cp0rkj2671OHfxXe8u{opacity:0}.maSOKrYHsPNjYS48Subg .bdZkY38M12yKa_e1qE26.E8Cp0rkj2671OHfxXe8u:focus-within{opacity:1}.maSOKrYHsPNjYS48Subg .bdZkY38M12yKa_e1qE26 .aGG4rEifuDBRA3tip1oz{background-color:var(--ups-color-white)}.maSOKrYHsPNjYS48Subg .bdZkY38M12yKa_e1qE26 .aGG4rEifuDBRA3tip1oz:not(:last-child){margin-right:var(--ups-spacing-sm)}.maSOKrYHsPNjYS48Subg .jH9dbPsKRMm111cnIk5Q{position:relative;width:100%}.maSOKrYHsPNjYS48Subg .jH9dbPsKRMm111cnIk5Q .Rar0slatbEEHoCGgrjU8{max-width:100%}.maSOKrYHsPNjYS48Subg .jH9dbPsKRMm111cnIk5Q .Rar0slatbEEHoCGgrjU8.gATY0FnbsweZ7sZIAVJk{width:100%}.maSOKrYHsPNjYS48Subg .jH9dbPsKRMm111cnIk5Q .ETRVRNdkXWlPy4w6oYiY{background-color:var(--ups-color-light-blue);border:1px solid var(--ups-color-blue);border-radius:var(--ups-border-radius-sm);padding-top:66.66666667%;width:100%}.maSOKrYHsPNjYS48Subg .jH9dbPsKRMm111cnIk5Q .ETRVRNdkXWlPy4w6oYiY .c3sb5EcghiPzJEysktBQ{left:50%;position:absolute;top:50%;transform:translate3d(-50%,-50%,0)}.maSOKrYHsPNjYS48Subg .jH9dbPsKRMm111cnIk5Q:hover .E8Cp0rkj2671OHfxXe8u{opacity:1}.maSOKrYHsPNjYS48Subg:not(.ha_Y5emLgLO3MU0VsSHo) .Rar0slatbEEHoCGgrjU8{border-radius:var(--ups-border-radius-sm);max-height:500px} +.article-topper-panel .row{margin-bottom:var(--ups-spacing-base)}.article-topper-panel .topper-type{display:flex}.article-topper-panel .topper-type .topper-type__control{flex:2}.article-topper-panel .topper-preview{display:flex;flex:1;margin-left:var(--ups-spacing-base);margin-top:calc(var(--ups-font-size-base)*var(--ups-line-height) + var(--ups-spacing-xs));width:100%}.article-topper-panel .topper-preview .topper-preview__window{display:block;width:100%} +.authors-panel .author-list,.authors-panel .author-suggestions{padding-left:0}.authors-panel .author-list button,.authors-panel .author-suggestions button{text-decoration:none}.authors-panel .author-suggestion__button{display:block;padding-left:0;padding-right:0}.authors-panel .author-list{margin-bottom:var(--ups-spacing-base)}.authors-panel .author-list__item{align-items:center;display:flex}.authors-panel .author-list__move-menu{align-items:center;display:flex;flex-direction:column;margin-right:var(--ups-spacing-sm)}.authors-panel .author-list__move-menu .button-down,.authors-panel .author-list__move-menu .button-up{height:18px}.authors-panel .author-list__move-menu .button-down svg,.authors-panel .author-list__move-menu .button-up svg{height:15px;width:15px}.authors-panel .author-list__move-menu .button-up{border-radius:3px 3px 0 0}.authors-panel .author-list__move-menu .button-down{border-radius:0 0 3px 3px} diff --git a/build/index.js b/build/index.js new file mode 100644 index 0000000..21397d2 --- /dev/null +++ b/build/index.js @@ -0,0 +1 @@ +(()=>{var t={703:(t,e,r)=>{"use strict";var n=r(414);function o(){}function i(){}i.resetWarningCache=o,t.exports=function(){function t(t,e,r,o,i,a){if(a!==n){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function e(){return t}t.isRequired=t;var r={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:o};return r.PropTypes=r,r}},697:(t,e,r)=>{t.exports=r(703)()},414:t=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";var t={};r.r(t),r.d(t,{enabled:()=>At,icon:()=>Tt,name:()=>Pt,render:()=>Nt});var e={};r.r(e),r.d(e,{enabled:()=>Qt,icon:()=>$t,name:()=>Vt,render:()=>zt});var n={};r.r(n),r.d(n,{hooks:()=>Zt,name:()=>Jt});var o={};r.r(o),r.d(o,{hooks:()=>Xt,name:()=>te});var i={};r.r(i),r.d(i,{hooks:()=>ee,name:()=>re});var a={};r.r(a),r.d(a,{hooks:()=>ne,name:()=>oe});var c={};r.r(c),r.d(c,{hooks:()=>ie,name:()=>ae});var l={};r.r(l),r.d(l,{hooks:()=>pe,name:()=>de});var u={};r.r(u),r.d(u,{hooks:()=>ye,name:()=>me});const s=window.wp.plugins,f=window.wp.blocks,h=window.wp.domReady;var p=r.n(h);const d=window.wp.hooks,y=window.wp.richText,m=window.wp.apiFetch;var v=r.n(m);const g=window.wp.data,b=window.wp.element,w=window.wp.editPost,E=window.wp.components;var x=r(697),S=r.n(x);const O=window.wp.blockEditor,k=function(){for(var t=arguments.length,e=new Array(t),r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=n.length)for(var o=r-n.length;1+o--;)n.push(void 0);var i=n.splice(e,1)[0];return n.splice(r,0,i),n};var P="image",T="video",N="large";const A="aGG4rEifuDBRA3tip1oz",C="Rar0slatbEEHoCGgrjU8",I="gATY0FnbsweZ7sZIAVJk";function F(){return F=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(c&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function U(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}function q(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,_x,i,a=[],_n=!0,c=!1;try{if(_x=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;_n=!1}else for(;!(_n=(n=_x.call(r)).done)&&(a.push(n.value),a.length!==e);_n=!0);}catch(t){c=!0,o=t}finally{try{if(!_n&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Y(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Y(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(c&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function z(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}function Q(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){z(i,n,o,a,c,"next",t)}function c(t){z(i,n,o,a,c,"throw",t)}a(void 0)}))}}function K(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,_x,i,a=[],_n=!0,c=!1;try{if(_x=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;_n=!1}else for(;!(_n=(n=_x.call(r)).done)&&(a.push(n.value),a.length!==e);_n=!0);}catch(t){c=!0,o=t}finally{try{if(!_n&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Z(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Z(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Z(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]?arguments[2]:N,n=(0,b.useState)(!!t),o=K(n,2),i=o[0],a=o[1],c=(0,b.useState)(null),l=K(c,2),u=l[0],s=l[1],f=(0,b.useMemo)((function(){return t?u||void 0:null}),[t,u]),h=function(){e&&e(null),s(null)},p=function(){var t=Q($().mark((function t(r){var n;return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r){t.next=16;break}return a(!0),t.prev=2,t.next=5,v()({path:"/wp/v2/media/".concat(r.id)});case 5:n=t.sent,e&&e(n),s(n),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(2),h();case 13:a(!1),t.next=17;break;case 16:h();case 17:case"end":return t.stop()}}),t,null,[[2,10]])})));return function(e){return t.apply(this,arguments)}}();(0,b.useEffect)((function(){f?a(!1):void 0===f&&p({id:t})}),[f]);var d=null;if(f){var y=f.source_url,m=null,g=f.media_details;g&&(m={width:g.width,height:g.height},g.sizes&&g.sizes[r]&&(y=g.sizes[r].source_url)),d={id:f.id,url:y,alt:f.alt_text,mime:f.mime_type,aspect:m}}return[d,i,p]},X=function(){var t=(0,g.useSelect)((function(t){return t("core/editor").getEditedPostAttribute("meta")})),e=(0,g.useDispatch)("core/editor");return[t,function(t){e.editPost({meta:t})}]};var tt="text_only",et="small_image",rt="site_width_image",nt="bg_image",ot=new Set([et,rt,nt]),it=[{value:tt,label:"Text only"},{value:et,label:"Small image"},{value:rt,label:"Site-width image"},{value:nt,label:"Background image"}];function at(t){return at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},at(t)}function ct(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==at(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==at(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===at(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var lt=function(){return React.createElement("svg",{viewBox:"0 0 288 189"},React.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},React.createElement("rect",{fill:"#ffffff",x:"0.5",y:"0.5",width:"287",height:"188"}),React.createElement("rect",{fill:"#DEDEDE",x:"73",y:"65",width:"143",height:"79"}),React.createElement("rect",{fill:"#DEDEDE",x:"73",y:"151",width:"143",height:"37"}),React.createElement("rect",{fill:"#000000",x:"73",y:"18",width:"143",height:"16"}),React.createElement("rect",{fill:"#000000",x:"73",y:"40",width:"98",height:"16"}),React.createElement("rect",{stroke:"#000000",x:"0.5",y:"0.5",width:"287",height:"188"})))},ut=function(){return React.createElement("svg",{viewBox:"0 0 288 189"},React.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},React.createElement("rect",{fill:"#ffffff",x:"0.5",y:"0.5",width:"287",height:"188"}),React.createElement("rect",{fill:"#CEE1EC",x:"73",y:"65",width:"143",height:"79"}),React.createElement("rect",{fill:"#DEDEDE",x:"73",y:"151",width:"143",height:"37"}),React.createElement("rect",{fill:"#000000",x:"73",y:"18",width:"143",height:"16"}),React.createElement("rect",{fill:"#000000",x:"73",y:"40",width:"98",height:"16"}),React.createElement("rect",{stroke:"#000000",x:"0.5",y:"0.5",width:"287",height:"188"})))},st=function(){return React.createElement("svg",{viewBox:"0 0 288 189"},React.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},React.createElement("rect",{fill:"#ffffff",x:"0.5",y:"0.5",width:"287",height:"188"}),React.createElement("rect",{fill:"#DEDEDE",x:"73",y:"175",width:"143",height:"14"}),React.createElement("rect",{fill:"#CEE1EC",x:"51",y:"65",width:"187",height:"101"}),React.createElement("rect",{fill:"#000000",x:"51",y:"18",width:"143",height:"16"}),React.createElement("rect",{fill:"#000000",x:"51",y:"40",width:"98",height:"16"}),React.createElement("rect",{stroke:"#000000",x:"0.5",y:"0.5",width:"287",height:"188"})))},ft=function(){return React.createElement("svg",{viewBox:"0 0 288 189"},React.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},React.createElement("rect",{fill:"#ffffff",x:"0.5",y:"0.5",width:"287",height:"188"}),React.createElement("rect",{fill:"#DEDEDE",x:"73",y:"148",width:"143",height:"40"}),React.createElement("rect",{fill:"#CEE1EC",x:"0",y:"0",width:"288",height:"134"}),React.createElement("rect",{fill:"#000000",x:"73",y:"80",width:"143",height:"16"}),React.createElement("rect",{fill:"#000000",x:"73",y:"102",width:"98",height:"16"}),React.createElement("rect",{stroke:"#000000",x:"0.5",y:"0.5",width:"287",height:"188"})))},ht=function(t){var e,r=t.value,n=(ct(e={},tt,lt),ct(e,et,ut),ct(e,rt,st),ct(e,nt,ft),e)[r||tt];return n?React.createElement("div",{className:"topper-preview"},React.createElement("span",{className:"topper-preview__window"},React.createElement(n,null))):null};ht.propTypes={value:S().string};const pt=ht;function dt(t){return dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dt(t)}var yt;function mt(){return mt=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(c&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function gt(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}function bt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==dt(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==dt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===dt(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function wt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,_x,i,a=[],_n=!0,c=!1;try{if(_x=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;_n=!1}else for(;!(_n=(n=_x.call(r)).done)&&(a.push(n.value),a.length!==e);_n=!0);}catch(t){c=!0,o=t}finally{try{if(!_n&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Et(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Et(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Et(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:"value",t[e]),H(n,"onChange",r(e)),n}}).getFieldProps,l=wt((0,b.useState)(!1),2),u=l[0],s=l[1],f=wt((0,b.useState)([]),2),h=f[0],p=f[1],d=wt((0,b.useState)([]),2),y=d[0],m=d[1],w=function(t){return function(e){var r=e?e.id:0;a(bt({},t,r))}},x=wt(J(i[jt],w(jt)),3),S=x[0],O=x[1],k=x[2],j=wt(J(i[Rt],w(Rt)),3),R=j[0],L=j[1],_=j[2],N=!i[Lt],A=function(){var t,e=(t=vt().mark((function t(){var e,r;return vt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=[],s(!0),n&&n.length){t.next=7;break}return a(bt({},kt,0)),p(e),s(!1),t.abrupt("return");case 7:if(!(r=n.length?n.join(","):[]).length){t.next=12;break}return t.next=11,v()({path:"/wp/v2/categories?include=".concat(r)});case 11:e=t.sent;case 12:p(e),s(!1);case 14:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){gt(i,n,o,a,c,"next",t)}function c(t){gt(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}();return(0,b.useEffect)((function(){A()}),[n]),(0,b.useEffect)((function(){var t=h.filter((function(t){return 1!==t.id})).map((function(t){return{value:t.id,label:(e=t.name,r={"&":"&","<":"<",">":">",""":'"',"'":"'"},e.replace(/&(?:amp|lt|gt|quot|#39);/g,(function(t){return r[t]})))};var e,r}));m(t),t.length&&!i[kt]&&a(bt({},kt,t[0].value))}),[h]),React.createElement(b.Fragment,null,React.createElement("div",{className:"row"},React.createElement(E.ToggleControl,mt({},c(St,"checked"),{label:i[St]?"Using light top navigation":"Using dark top navigation"}))),React.createElement("div",{className:"row topper-type"},React.createElement(E.SelectControl,mt({className:"topper-type__control"},c(Ot),{label:"Topper type",options:it})),React.createElement(pt,{value:i[Ot]})),React.createElement("div",{className:"row"},u?React.createElement(E.Spinner,null):y.length?React.createElement(E.SelectControl,mt({},c(kt),{label:"Overline",help:"The article’s primary category",options:y})):React.createElement(b.Fragment,null,React.createElement("label",{htmlFor:"overline"},"Overline"),React.createElement("p",{id:"overline",className:"overline-empty"},"Assign a"," ",React.createElement(E.ExternalLink,{href:"https://make.wordpress.org/support/user-manual/content/categories-and-tags/"},"category")," ","to this post to use it for the overline"))),React.createElement("div",{className:"row"},React.createElement(E.TextareaControl,mt({},c("topper_description"),{label:"Description"}))),ot.has(i[Ot])&&React.createElement("div",{className:"row"},React.createElement(G,{label:"Image/Video",loading:O,value:S,onChange:k}),React.createElement(E.ToggleControl,{checked:N,onChange:function(t){a(bt({},Lt,!t))},label:"".concat(N?"Visible in":"Hidden from"," modal gallery")}),React.createElement(E.TextControl,mt({},c("topper_caption"),{label:"Caption",help:"Optional caption override"})),S&&S.mime.startsWith(T)&&React.createElement(G,{label:"Video Poster",help:"The default image to show while the video loads",allowedTypes:[P],loading:L,value:R,onChange:_})))},Pt="article-topper-panel",Tt="format-image",Nt=function(){return"post"!==(0,g.useSelect)((function(t){return t("core/editor").getCurrentPostType()}))?null:React.createElement(w.PluginDocumentSettingPanel,{name:Pt,title:"Article Topper",className:"article-topper-panel"},React.createElement(_t,null))},At=null===(yt=window.ups_editorial)||void 0===yt?void 0:yt.article_topper_panel,Ct="down";function It(t){var e=t.suggestions,r=t.onSelect,n=function(t){return function(e){e.preventDefault(),r(t)}};return React.createElement("ul",{className:"author-suggestions"},e.map((function(t){return React.createElement("li",{key:t.id},React.createElement(E.Button,{isLink:!0,icon:"admin-users",onClick:n(t),className:"author-suggestion__button"},t.name))})))}function Ft(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(c&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Ut(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}function qt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,_x,i,a=[],_n=!0,c=!1;try{if(_x=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;_n=!1}else for(;!(_n=(n=_x.call(r)).done)&&(a.push(n.value),a.length!==e);_n=!0);}catch(t){c=!0,o=t}finally{try{if(!_n&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Yt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Yt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r-1})).forEach((function(t){t.hooks.forEach((function(t){var e=t.hookName,r=t.namespace,n=t.callback;(0,d.addFilter)(e,r,n)}))})),p()((function(){(0,f.unregisterBlockStyle)("core/quote","default"),(0,f.unregisterBlockStyle)("core/quote","plain"),(0,f.unregisterBlockStyle)("core/separator","default"),(0,f.unregisterBlockStyle)("core/separator","wide"),(0,f.unregisterBlockStyle)("core/separator","dots"),(0,f.unregisterBlockStyle)("core/table","regular"),(0,f.unregisterBlockStyle)("core/table","stripes");var t=(0,y.unregisterFormatType)("core/image");t.className="wp-rich-text-inline-image",(0,y.registerFormatType)("core/image",t),(0,f.getBlockVariations)("core/embed").forEach((function(t){(0,f.unregisterBlockVariation)("core/embed",t.name)}))}))})()})(); \ No newline at end of file diff --git a/composer.json b/composer.json index be03b88..141c36e 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "upstatement/ups-editorial-wp-plugin", "type": "wordpress-plugin", - "version": "2.0.0", + "license": "MIT", "authors": [ { "name": "Upstatement", diff --git a/composer.lock b/composer.lock index 64ab56a..21218a4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d83dfbe7961ff03b3205a284435ffdb6", + "content-hash": "87de825c15ecfda4b059bc79237123fd", "packages": [], "packages-dev": [ { diff --git a/vendor/autoload.php b/vendor/autoload.php new file mode 100644 index 0000000..0063779 --- /dev/null +++ b/vendor/autoload.php @@ -0,0 +1,7 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see https://www.php-fig.org/psr/psr-0/ + * @see https://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + /** @var ?string */ + private $vendorDir; + + // PSR-4 + /** + * @var array[] + * @psalm-var array> + */ + private $prefixLengthsPsr4 = array(); + /** + * @var array[] + * @psalm-var array> + */ + private $prefixDirsPsr4 = array(); + /** + * @var array[] + * @psalm-var array + */ + private $fallbackDirsPsr4 = array(); + + // PSR-0 + /** + * @var array[] + * @psalm-var array> + */ + private $prefixesPsr0 = array(); + /** + * @var array[] + * @psalm-var array + */ + private $fallbackDirsPsr0 = array(); + + /** @var bool */ + private $useIncludePath = false; + + /** + * @var string[] + * @psalm-var array + */ + private $classMap = array(); + + /** @var bool */ + private $classMapAuthoritative = false; + + /** + * @var bool[] + * @psalm-var array + */ + private $missingClasses = array(); + + /** @var ?string */ + private $apcuPrefix; + + /** + * @var self[] + */ + private static $registeredLoaders = array(); + + /** + * @param ?string $vendorDir + */ + public function __construct($vendorDir = null) + { + $this->vendorDir = $vendorDir; + } + + /** + * @return string[] + */ + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); + } + + return array(); + } + + /** + * @return array[] + * @psalm-return array> + */ + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + /** + * @return array[] + * @psalm-return array + */ + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + /** + * @return array[] + * @psalm-return array + */ + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + /** + * @return string[] Array of classname => path + * @psalm-return array + */ + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param string[] $classMap Class to filename map + * @psalm-param array $classMap + * + * @return void + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param string[]|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + * + * @return void + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param string[]|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + * + * @return void + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param string[]|string $paths The PSR-0 base directories + * + * @return void + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param string[]|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + * + * @return void + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + * + * @return void + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + * + * @return void + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + * + * @return void + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + * + * @return void + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + + if (null === $this->vendorDir) { + return; + } + + if ($prepend) { + self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; + } else { + unset(self::$registeredLoaders[$this->vendorDir]); + self::$registeredLoaders[$this->vendorDir] = $this; + } + } + + /** + * Unregisters this instance as an autoloader. + * + * @return void + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + + if (null !== $this->vendorDir) { + unset(self::$registeredLoaders[$this->vendorDir]); + } + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return true|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + + return null; + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + /** + * Returns the currently registered loaders indexed by their corresponding vendor directories. + * + * @return self[] + */ + public static function getRegisteredLoaders() + { + return self::$registeredLoaders; + } + + /** + * @param string $class + * @param string $ext + * @return string|false + */ + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath . '\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + * + * @param string $file + * @return void + * @private + */ +function includeFile($file) +{ + include $file; +} diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php new file mode 100644 index 0000000..d50e0c9 --- /dev/null +++ b/vendor/composer/InstalledVersions.php @@ -0,0 +1,350 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer; + +use Composer\Autoload\ClassLoader; +use Composer\Semver\VersionParser; + +/** + * This class is copied in every Composer installed project and available to all + * + * See also https://getcomposer.org/doc/07-runtime.md#installed-versions + * + * To require its presence, you can require `composer-runtime-api ^2.0` + */ +class InstalledVersions +{ + /** + * @var mixed[]|null + * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array}|array{}|null + */ + private static $installed; + + /** + * @var bool|null + */ + private static $canGetVendors; + + /** + * @var array[] + * @psalm-var array}> + */ + private static $installedByVendor = array(); + + /** + * Returns a list of all package names which are present, either by being installed, replaced or provided + * + * @return string[] + * @psalm-return list + */ + public static function getInstalledPackages() + { + $packages = array(); + foreach (self::getInstalled() as $installed) { + $packages[] = array_keys($installed['versions']); + } + + if (1 === \count($packages)) { + return $packages[0]; + } + + return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); + } + + /** + * Returns a list of all package names with a specific type e.g. 'library' + * + * @param string $type + * @return string[] + * @psalm-return list + */ + public static function getInstalledPackagesByType($type) + { + $packagesByType = array(); + + foreach (self::getInstalled() as $installed) { + foreach ($installed['versions'] as $name => $package) { + if (isset($package['type']) && $package['type'] === $type) { + $packagesByType[] = $name; + } + } + } + + return $packagesByType; + } + + /** + * Checks whether the given package is installed + * + * This also returns true if the package name is provided or replaced by another package + * + * @param string $packageName + * @param bool $includeDevRequirements + * @return bool + */ + public static function isInstalled($packageName, $includeDevRequirements = true) + { + foreach (self::getInstalled() as $installed) { + if (isset($installed['versions'][$packageName])) { + return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); + } + } + + return false; + } + + /** + * Checks whether the given package satisfies a version constraint + * + * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: + * + * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') + * + * @param VersionParser $parser Install composer/semver to have access to this class and functionality + * @param string $packageName + * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package + * @return bool + */ + public static function satisfies(VersionParser $parser, $packageName, $constraint) + { + $constraint = $parser->parseConstraints($constraint); + $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); + + return $provided->matches($constraint); + } + + /** + * Returns a version constraint representing all the range(s) which are installed for a given package + * + * It is easier to use this via isInstalled() with the $constraint argument if you need to check + * whether a given version of a package is installed, and not just whether it exists + * + * @param string $packageName + * @return string Version constraint usable with composer/semver + */ + public static function getVersionRanges($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + $ranges = array(); + if (isset($installed['versions'][$packageName]['pretty_version'])) { + $ranges[] = $installed['versions'][$packageName]['pretty_version']; + } + if (array_key_exists('aliases', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); + } + if (array_key_exists('replaced', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); + } + if (array_key_exists('provided', $installed['versions'][$packageName])) { + $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); + } + + return implode(' || ', $ranges); + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present + */ + public static function getVersion($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['version'])) { + return null; + } + + return $installed['versions'][$packageName]['version']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present + */ + public static function getPrettyVersion($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['pretty_version'])) { + return null; + } + + return $installed['versions'][$packageName]['pretty_version']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference + */ + public static function getReference($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + if (!isset($installed['versions'][$packageName]['reference'])) { + return null; + } + + return $installed['versions'][$packageName]['reference']; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @param string $packageName + * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. + */ + public static function getInstallPath($packageName) + { + foreach (self::getInstalled() as $installed) { + if (!isset($installed['versions'][$packageName])) { + continue; + } + + return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; + } + + throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); + } + + /** + * @return array + * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string} + */ + public static function getRootPackage() + { + $installed = self::getInstalled(); + + return $installed[0]['root']; + } + + /** + * Returns the raw installed.php data for custom implementations + * + * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. + * @return array[] + * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} + */ + public static function getRawData() + { + @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); + + if (null === self::$installed) { + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + self::$installed = include __DIR__ . '/installed.php'; + } else { + self::$installed = array(); + } + } + + return self::$installed; + } + + /** + * Returns the raw data of all installed.php which are currently loaded for custom implementations + * + * @return array[] + * @psalm-return list}> + */ + public static function getAllRawData() + { + return self::getInstalled(); + } + + /** + * Lets you reload the static array from another file + * + * This is only useful for complex integrations in which a project needs to use + * this class but then also needs to execute another project's autoloader in process, + * and wants to ensure both projects have access to their version of installed.php. + * + * A typical case would be PHPUnit, where it would need to make sure it reads all + * the data it needs from this class, then call reload() with + * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure + * the project in which it runs can then also use this class safely, without + * interference between PHPUnit's dependencies and the project's dependencies. + * + * @param array[] $data A vendor/composer/installed.php data set + * @return void + * + * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} $data + */ + public static function reload($data) + { + self::$installed = $data; + self::$installedByVendor = array(); + } + + /** + * @return array[] + * @psalm-return list}> + */ + private static function getInstalled() + { + if (null === self::$canGetVendors) { + self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); + } + + $installed = array(); + + if (self::$canGetVendors) { + foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { + if (isset(self::$installedByVendor[$vendorDir])) { + $installed[] = self::$installedByVendor[$vendorDir]; + } elseif (is_file($vendorDir.'/composer/installed.php')) { + $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; + if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { + self::$installed = $installed[count($installed) - 1]; + } + } + } + } + + if (null === self::$installed) { + // only require the installed.php file if this file is loaded from its dumped location, + // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 + if (substr(__DIR__, -8, 1) !== 'C') { + self::$installed = require __DIR__ . '/installed.php'; + } else { + self::$installed = array(); + } + } + $installed[] = self::$installed; + + return $installed; + } +} diff --git a/vendor/composer/LICENSE b/vendor/composer/LICENSE new file mode 100644 index 0000000..f27399a --- /dev/null +++ b/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php new file mode 100644 index 0000000..b26f1b1 --- /dev/null +++ b/vendor/composer/autoload_classmap.php @@ -0,0 +1,10 @@ + $vendorDir . '/composer/InstalledVersions.php', +); diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php new file mode 100644 index 0000000..b7fc012 --- /dev/null +++ b/vendor/composer/autoload_namespaces.php @@ -0,0 +1,9 @@ + array($baseDir . '/includes'), + 'Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' => array($vendorDir . '/dealerdirect/phpcodesniffer-composer-installer/src'), +); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php new file mode 100644 index 0000000..e575ede --- /dev/null +++ b/vendor/composer/autoload_real.php @@ -0,0 +1,55 @@ += 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInite77806528b56491efceb0d413e19fe77::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } + + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } + + $loader->register(true); + + return $loader; + } +} diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php new file mode 100644 index 0000000..c7cabae --- /dev/null +++ b/vendor/composer/autoload_static.php @@ -0,0 +1,44 @@ + + array ( + 'Upstatement\\Editorial\\' => 22, + ), + 'D' => + array ( + 'Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' => 55, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'Upstatement\\Editorial\\' => + array ( + 0 => __DIR__ . '/../..' . '/includes', + ), + 'Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' => + array ( + 0 => __DIR__ . '/..' . '/dealerdirect/phpcodesniffer-composer-installer/src', + ), + ); + + public static $classMap = array ( + 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInite77806528b56491efceb0d413e19fe77::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInite77806528b56491efceb0d413e19fe77::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInite77806528b56491efceb0d413e19fe77::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json new file mode 100644 index 0000000..35e705a --- /dev/null +++ b/vendor/composer/installed.json @@ -0,0 +1,387 @@ +{ + "packages": [ + { + "name": "dealerdirect/phpcodesniffer-composer-installer", + "version": "v0.7.2", + "version_normalized": "0.7.2.0", + "source": { + "type": "git", + "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", + "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", + "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" + }, + "require-dev": { + "composer/composer": "*", + "php-parallel-lint/php-parallel-lint": "^1.3.1", + "phpcompatibility/php-compatibility": "^9.0" + }, + "time": "2022-02-04T12:51:07+00:00", + "type": "composer-plugin", + "extra": { + "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Franck Nijhof", + "email": "franck.nijhof@dealerdirect.com", + "homepage": "http://www.frenck.nl", + "role": "Developer / IT Manager" + }, + { + "name": "Contributors", + "homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer Standards Composer Installer Plugin", + "homepage": "http://www.dealerdirect.com", + "keywords": [ + "PHPCodeSniffer", + "PHP_CodeSniffer", + "code quality", + "codesniffer", + "composer", + "installer", + "phpcbf", + "phpcs", + "plugin", + "qa", + "quality", + "standard", + "standards", + "style guide", + "stylecheck", + "tests" + ], + "support": { + "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", + "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + }, + "install-path": "../dealerdirect/phpcodesniffer-composer-installer" + }, + { + "name": "phpcompatibility/php-compatibility", + "version": "9.3.5", + "version_normalized": "9.3.5.0", + "source": { + "type": "git", + "url": "https://github.com/PHPCompatibility/PHPCompatibility.git", + "reference": "9fb324479acf6f39452e0655d2429cc0d3914243" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9fb324479acf6f39452e0655d2429cc0d3914243", + "reference": "9fb324479acf6f39452e0655d2429cc0d3914243", + "shasum": "" + }, + "require": { + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.3 || ^3.0.2" + }, + "conflict": { + "squizlabs/php_codesniffer": "2.6.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0" + }, + "suggest": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.", + "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." + }, + "time": "2019-12-27T09:44:58+00:00", + "type": "phpcodesniffer-standard", + "installation-source": "dist", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Wim Godden", + "homepage": "https://github.com/wimg", + "role": "lead" + }, + { + "name": "Juliette Reinders Folmer", + "homepage": "https://github.com/jrfnl", + "role": "lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors" + } + ], + "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.", + "homepage": "http://techblog.wimgodden.be/tag/codesniffer/", + "keywords": [ + "compatibility", + "phpcs", + "standards" + ], + "support": { + "issues": "https://github.com/PHPCompatibility/PHPCompatibility/issues", + "source": "https://github.com/PHPCompatibility/PHPCompatibility" + }, + "install-path": "../phpcompatibility/php-compatibility" + }, + { + "name": "phpcompatibility/phpcompatibility-paragonie", + "version": "1.3.2", + "version_normalized": "1.3.2.0", + "source": { + "type": "git", + "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git", + "reference": "bba5a9dfec7fcfbd679cfaf611d86b4d3759da26" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/bba5a9dfec7fcfbd679cfaf611d86b4d3759da26", + "reference": "bba5a9dfec7fcfbd679cfaf611d86b4d3759da26", + "shasum": "" + }, + "require": { + "phpcompatibility/php-compatibility": "^9.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7", + "paragonie/random_compat": "dev-master", + "paragonie/sodium_compat": "dev-master" + }, + "suggest": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", + "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." + }, + "time": "2022-10-25T01:46:02+00:00", + "type": "phpcodesniffer-standard", + "installation-source": "dist", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Wim Godden", + "role": "lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "lead" + } + ], + "description": "A set of rulesets for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by the Paragonie polyfill libraries.", + "homepage": "http://phpcompatibility.com/", + "keywords": [ + "compatibility", + "paragonie", + "phpcs", + "polyfill", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/issues", + "source": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie" + }, + "install-path": "../phpcompatibility/phpcompatibility-paragonie" + }, + { + "name": "phpcompatibility/phpcompatibility-wp", + "version": "2.1.4", + "version_normalized": "2.1.4.0", + "source": { + "type": "git", + "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git", + "reference": "b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5", + "reference": "b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5", + "shasum": "" + }, + "require": { + "phpcompatibility/php-compatibility": "^9.0", + "phpcompatibility/phpcompatibility-paragonie": "^1.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7" + }, + "suggest": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", + "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." + }, + "time": "2022-10-24T09:00:36+00:00", + "type": "phpcodesniffer-standard", + "installation-source": "dist", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Wim Godden", + "role": "lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "lead" + } + ], + "description": "A ruleset for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by WordPress.", + "homepage": "http://phpcompatibility.com/", + "keywords": [ + "compatibility", + "phpcs", + "standards", + "static analysis", + "wordpress" + ], + "support": { + "issues": "https://github.com/PHPCompatibility/PHPCompatibilityWP/issues", + "source": "https://github.com/PHPCompatibility/PHPCompatibilityWP" + }, + "install-path": "../phpcompatibility/phpcompatibility-wp" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.7.1", + "version_normalized": "3.7.1.0", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619", + "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "time": "2022-06-18T07:21:10+00:00", + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "installation-source": "dist", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards" + ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "install-path": "../squizlabs/php_codesniffer" + }, + { + "name": "wp-coding-standards/wpcs", + "version": "2.3.0", + "version_normalized": "2.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", + "reference": "7da1894633f168fe244afc6de00d141f27517b62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7da1894633f168fe244afc6de00d141f27517b62", + "reference": "7da1894633f168fe244afc6de00d141f27517b62", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "squizlabs/php_codesniffer": "^3.3.1" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || ^0.6", + "phpcompatibility/php-compatibility": "^9.0", + "phpcsstandards/phpcsdevtools": "^1.0", + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "suggest": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.6 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically." + }, + "time": "2020-05-13T23:57:56+00:00", + "type": "phpcodesniffer-standard", + "installation-source": "dist", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Contributors", + "homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions", + "keywords": [ + "phpcs", + "standards", + "wordpress" + ], + "support": { + "issues": "https://github.com/WordPress/WordPress-Coding-Standards/issues", + "source": "https://github.com/WordPress/WordPress-Coding-Standards", + "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki" + }, + "install-path": "../wp-coding-standards/wpcs" + } + ], + "dev": true, + "dev-package-names": [ + "dealerdirect/phpcodesniffer-composer-installer", + "phpcompatibility/php-compatibility", + "phpcompatibility/phpcompatibility-paragonie", + "phpcompatibility/phpcompatibility-wp", + "squizlabs/php_codesniffer", + "wp-coding-standards/wpcs" + ] +} diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php new file mode 100644 index 0000000..622c71a --- /dev/null +++ b/vendor/composer/installed.php @@ -0,0 +1,77 @@ + array( + 'pretty_version' => 'dev-main', + 'version' => 'dev-main', + 'type' => 'wordpress-plugin', + 'install_path' => __DIR__ . '/../../', + 'aliases' => array(), + 'reference' => 'a752fadeb68c8447de44d3f7423c243e63101a12', + 'name' => 'upstatement/ups-editorial-wp-plugin', + 'dev' => true, + ), + 'versions' => array( + 'dealerdirect/phpcodesniffer-composer-installer' => array( + 'pretty_version' => 'v0.7.2', + 'version' => '0.7.2.0', + 'type' => 'composer-plugin', + 'install_path' => __DIR__ . '/../dealerdirect/phpcodesniffer-composer-installer', + 'aliases' => array(), + 'reference' => '1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db', + 'dev_requirement' => true, + ), + 'phpcompatibility/php-compatibility' => array( + 'pretty_version' => '9.3.5', + 'version' => '9.3.5.0', + 'type' => 'phpcodesniffer-standard', + 'install_path' => __DIR__ . '/../phpcompatibility/php-compatibility', + 'aliases' => array(), + 'reference' => '9fb324479acf6f39452e0655d2429cc0d3914243', + 'dev_requirement' => true, + ), + 'phpcompatibility/phpcompatibility-paragonie' => array( + 'pretty_version' => '1.3.2', + 'version' => '1.3.2.0', + 'type' => 'phpcodesniffer-standard', + 'install_path' => __DIR__ . '/../phpcompatibility/phpcompatibility-paragonie', + 'aliases' => array(), + 'reference' => 'bba5a9dfec7fcfbd679cfaf611d86b4d3759da26', + 'dev_requirement' => true, + ), + 'phpcompatibility/phpcompatibility-wp' => array( + 'pretty_version' => '2.1.4', + 'version' => '2.1.4.0', + 'type' => 'phpcodesniffer-standard', + 'install_path' => __DIR__ . '/../phpcompatibility/phpcompatibility-wp', + 'aliases' => array(), + 'reference' => 'b6c1e3ee1c35de6c41a511d5eb9bd03e447480a5', + 'dev_requirement' => true, + ), + 'squizlabs/php_codesniffer' => array( + 'pretty_version' => '3.7.1', + 'version' => '3.7.1.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../squizlabs/php_codesniffer', + 'aliases' => array(), + 'reference' => '1359e176e9307e906dc3d890bcc9603ff6d90619', + 'dev_requirement' => true, + ), + 'upstatement/ups-editorial-wp-plugin' => array( + 'pretty_version' => 'dev-main', + 'version' => 'dev-main', + 'type' => 'wordpress-plugin', + 'install_path' => __DIR__ . '/../../', + 'aliases' => array(), + 'reference' => 'a752fadeb68c8447de44d3f7423c243e63101a12', + 'dev_requirement' => false, + ), + 'wp-coding-standards/wpcs' => array( + 'pretty_version' => '2.3.0', + 'version' => '2.3.0.0', + 'type' => 'phpcodesniffer-standard', + 'install_path' => __DIR__ . '/../wp-coding-standards/wpcs', + 'aliases' => array(), + 'reference' => '7da1894633f168fe244afc6de00d141f27517b62', + 'dev_requirement' => true, + ), + ), +);