woocommerce/tools/monorepo-utils/dist/index.js

2 lines
1.9 MiB
JavaScript
Raw Normal View History

/*! For license information please see index.js.LICENSE.txt */
(()=>{var __webpack_modules__={4797:function(e,t,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,i,s){void 0===s&&(s=i),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,s){void 0===s&&(s=i),e[s]=t[i]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.hasOwnProperty.call(e,i)&&s(t,e,i);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.issue=t.issueCommand=void 0;const o=n(i(22037)),a=i(54106);function c(e,t,i){const s=new l(e,t,i);process.stdout.write(s.toString()+o.EOL)}t.issueCommand=c,t.issue=function(e,t=""){c(e,{},t)};class l{constructor(e,t,i){e||(e="missing.command"),this.command=e,this.properties=t,this.message=i}toString(){let e="::"+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let i=!0;for(const s in this.properties)if(this.properties.hasOwnProperty(s)){const r=this.properties[s];r&&(i?i=!1:e+=",",e+=`${s}=${t=r,a.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}`)}}var t;return e+=`::${function(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}(this.message)}`,e}}},57995:function(e,t,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,i,s){void 0===s&&(s=i),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,s){void 0===s&&(s=i),e[s]=t[i]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.hasOwnProperty.call(e,i)&&s(t,e,i);return r(t,e),t},o=this&&this.__awaiter||function(e,t,i,s){return new(i||(i=Promise))((function(r,n){function o(e){try{c(s.next(e))}catch(e){n(e)}}function a(e){try{c(s.throw(e))}catch(e){n(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}c((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.getIDToken=t.getState=t.saveState=t.group=t.endGroup=t.startGroup=t.info=t.notice=t.warning=t.error=t.debug=t.isDebug=t.setFailed=t.setCommandEcho=t.setOutput=t.getBooleanInput=t.getMultilineInput=t.getInput=t.addPath=t.setSecret=t.exportVariable=t.ExitCode=void 0;const a=i(4797),c=i(8096),l=i(54106),p=n(i(22037)),A=n(i(71017)),u=i(271);var d;function h(e,t){const i=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!i)throw new Error(`Input required and not supplied: ${e}`);return t&&!1===t.trimWhitespace?i:i.trim()}function m(e,t={}){a.issueCommand("error",l.toCommandProperties(t),e instanceof Error?e.toString():e)}function g(e){a.issue("group",e)}function f(){a.issue("endgroup")}!function(e){e[e.Success=0]="Success",e[e.Failure=1]="Failure"}(d=t.ExitCode||(t.ExitCode={})),t.exportVariable=function(e,t){const i=l.toCommandValue(t);if(process.env[e]=i,process.env.GITHUB_ENV)return c.issueFileCommand("ENV",c.prepareKeyValueMessage(e,t));a.issueCommand("set-env",{name:e},i)},t.setSecret=function(e){a.issueCommand("add-mask",{},e)},t.addPath=function(e){process.env.GITHUB_PATH?c.issueFileCommand("PATH",e):a.issueCommand("add-path",{},e),process.env.PATH=`${e}${A.delimiter}${process.env.PATH}`},t.getInput=h,t.getMultilineInput=function(e,t){const i=h(e,t).split("\n").filter((e=>""!==e));return t&&!1===t.trimWhitespace?i:i.map((e=>e.trim()))},t.getBooleanInput=function(e,t){const i=h(e,t);if(["true","True","TRUE"].includes(i))return!0;if(["false","False","FALSE"].includes(i))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\nSupport boolean input list: \`true | True | TRUE | false | False | FALSE\``)},t.setOutput=funct