diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2941e5b1..74b66b43 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "5.0.4" + ".": "5.0.5" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a56ac35..5837499f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [5.0.5](https://github.com/cloudquery/setup-cloudquery/compare/v5.0.4...v5.0.5) (2026-11-02) + + +### Bug Fixes + +* **deps:** Update commitlint monorepo to v21.2.4 ([#1050](https://github.com/cloudquery/setup-cloudquery/issues/1050)) ([8256990](https://github.com/cloudquery/setup-cloudquery/commit/8256990f0257b122b4314ea1870275c9228b113a)) +* **deps:** Update dependency @types/node to v24.19.2 ([#1053](https://github.com/cloudquery/setup-cloudquery/issues/1053)) ([b05fafc](https://github.com/cloudquery/setup-cloudquery/commit/b05fafc4f82fb8d3a2a93e55f3b93eab9eee67be)) +* **deps:** Update dependency @types/node to v26 ([#1056](https://github.com/cloudquery/setup-cloudquery/issues/1056)) ([0016331](https://github.com/cloudquery/setup-cloudquery/commit/001633142e6d77aaf99b2e00a9fb9550fc080592)) +* **deps:** Update dependency chalk to v6.0.1 ([#1051](https://github.com/cloudquery/setup-cloudquery/issues/1051)) ([98585f7](https://github.com/cloudquery/setup-cloudquery/commit/98585f7c0ca73d667cabcddb56a39149b1cda7bf)) +* **deps:** Update dependency p-wait-for to v7 ([#1057](https://github.com/cloudquery/setup-cloudquery/issues/1057)) ([9e4c1b2](https://github.com/cloudquery/setup-cloudquery/commit/9e4c1b2a066687223af2dde21a2d18245d191afa)) +* **deps:** Update dependency prettier to v3.9.10 ([#1052](https://github.com/cloudquery/setup-cloudquery/issues/1052)) ([db85bd7](https://github.com/cloudquery/setup-cloudquery/commit/db85bd79f557fdb2421943d3476ead15bb0c331d)) +* **deps:** Update eslint packages ([#1054](https://github.com/cloudquery/setup-cloudquery/issues/1054)) ([f858c3b](https://github.com/cloudquery/setup-cloudquery/commit/f858c3bb5bda66adbd88cb85c60136695b2af5f8)) +* **deps:** Update pnpm to v12.15.0 ([#1055](https://github.com/cloudquery/setup-cloudquery/issues/1055)) ([e71fccd](https://github.com/cloudquery/setup-cloudquery/commit/e71fccd77053f39b64a7aeb60e7c68431ae4ff2d)) + ## [5.0.4](https://github.com/cloudquery/setup-cloudquery/compare/v5.0.3...v5.0.4) (2026-10-21) diff --git a/README.md b/README.md index b4846b99..69a96740 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ jobs: role-to-assume: aws-region: - - uses: cloudquery/setup-cloudquery@77d0ae10d00d0eaf349d7babde43bf5978250142 # v5.0.4 # x-release-please-version + - uses: cloudquery/setup-cloudquery@77d0ae10d00d0eaf349d7babde43bf5978250142 # v5.0.5 # x-release-please-version name: Setup CloudQuery with: # Required. Must be a valid SemVer version diff --git a/dist/index.js b/dist/index.js index 9ae92438..8e6374d5 100644 --- a/dist/index.js +++ b/dist/index.js @@ -61,7 +61,7 @@ Content-Type: ${s.type||"application/octet-stream"}\r `),n=!1,A=!1,s;e.on("response",i=>{let{headers:c}=i;n=c["transfer-encoding"]==="chunked"&&!c["content-length"]}),e.on("socket",i=>{let c=o(()=>{if(n&&!A){let f=new Error("Premature close");f.code="ERR_STREAM_PREMATURE_CLOSE",t(f)}},"onSocketClose"),u=o(f=>{A=Jl.compare(f.slice(-5),r)===0,!A&&s&&(A=Jl.compare(s.slice(-3),r.slice(0,3))===0&&Jl.compare(f.slice(-2),r.slice(3))===0),s=f},"onData");i.prependListener("close",c),i.on("data",u),e.on("close",()=>{i.removeListener("close",c),i.removeListener("data",u)})})}o(z5,"fixResponseChunkedTransferBadEnding");function tF(e,t,r){let n=e.indexOf(t);if(n===-1)return e;let A=t.length,s=0,i="";do i+=e.slice(s,n)+t+r,s=n+A,n=e.indexOf(t,s);while(n!==-1);return i+=e.slice(s),i}o(tF,"stringReplaceAll");function rF(e,t,r,n){let A=0,s="";do{let i=e[n-1]==="\r";s+=e.slice(A,i?n-1:n)+t+(i?`\r `:` `)+r,A=n+1,n=e.indexOf(` -`,A)}while(n!==-1);return s+=e.slice(A),s}o(rF,"stringEncaseCRLFWithFirstIndex");var nF=o((e=0)=>t=>`\x1B[${t+e}m`,"wrapAnsi16"),zE=o((e=0)=>t=>`\x1B[${38+e};5;${t}m`,"wrapAnsi256"),$E=o((e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,"wrapAnsi16m"),$5=o(e=>`\x1B[58;5;${e<90?e-30:e-90+8}m`,"wrapUnderlineAnsi"),le={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],underlineDouble:["4:2",24],underlineCurly:["4:3",24],underlineDotted:["4:4",24],underlineDashed:["4:5",24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]},underlineColor:{underlineBlack:["58;5;0",59],underlineRed:["58;5;1",59],underlineGreen:["58;5;2",59],underlineYellow:["58;5;3",59],underlineBlue:["58;5;4",59],underlineMagenta:["58;5;5",59],underlineCyan:["58;5;6",59],underlineWhite:["58;5;7",59],underlineBlackBright:["58;5;8",59],underlineGray:["58;5;8",59],underlineGrey:["58;5;8",59],underlineRedBright:["58;5;9",59],underlineGreenBright:["58;5;10",59],underlineYellowBright:["58;5;11",59],underlineBlueBright:["58;5;12",59],underlineMagentaBright:["58;5;13",59],underlineCyanBright:["58;5;14",59],underlineWhiteBright:["58;5;15",59]}},Mae=Object.keys(le.modifier),j5=Object.keys(le.color),Z5=Object.keys(le.bgColor),Uae=Object.keys(le.underlineColor),Lae=[...j5,...Z5];function K5(){let e=new Map;for(let[t,r]of Object.entries(le)){for(let[n,A]of Object.entries(r))le[n]={open:`\x1B[${A[0]}m`,close:`\x1B[${A[1]}m`},r[n]=le[n],e.set(Number.parseInt(A[0],10),A[1]);Object.defineProperty(le,t,{value:r,enumerable:!1})}return Object.defineProperty(le,"codes",{value:e,enumerable:!1}),le.color.close="\x1B[39m",le.bgColor.close="\x1B[49m",le.underlineColor.close="\x1B[59m",le.color.ansi=nF(),le.color.ansi256=zE(),le.color.ansi16m=$E(),le.bgColor.ansi=nF(10),le.bgColor.ansi256=zE(10),le.bgColor.ansi16m=$E(10),le.underlineColor.ansi=$5,le.underlineColor.ansi256=zE(20),le.underlineColor.ansi16m=$E(20),Object.defineProperties(le,{rgbToAnsi256:{value(t,r,n){return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[\da-f]{6}|[\da-f]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(s=>s+s).join(""));let A=Number.parseInt(n,16);return[A>>16&255,A>>8&255,A&255]},enumerable:!1},hexToAnsi256:{value:o(t=>le.rgbToAnsi256(...le.hexToRgb(t)),"value"),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,n,A;if(t>=232)r=((t-232)*10+8)/255,n=r,A=r;else{t-=16;let c=t%36;r=Math.floor(t/36)/5,n=Math.floor(c/6)/5,A=c%6/5}let s=Math.max(r,n,A)*2;if(s===0)return 30;let i=30+(Math.round(A)<<2|Math.round(n)<<1|Math.round(r));return s===2&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:o((t,r,n)=>le.ansi256ToAnsi(le.rgbToAnsi256(t,r,n)),"value"),enumerable:!1},hexToAnsi:{value:o(t=>le.ansi256ToAnsi(le.hexToAnsi256(t)),"value"),enumerable:!1}}),le}o(K5,"assembleStyles");var X5=K5(),Ir=X5;import jE from"node:process";import e3 from"node:os";import AF from"node:tty";function Mt(e,t=globalThis.Deno?globalThis.Deno.args:jE.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),A=t.indexOf("--");return n!==-1&&(A===-1||n=2,has16m:e>=3}}o(r3,"translateLevel");function n3(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=t3();n!==void 0&&(ql=n);let A=r?ql:n;if(A===0)return 0;if(r){if(Mt("color=16m")||Mt("color=full")||Mt("color=truecolor"))return 3;if(Mt("color=256"))return 2}if(A!==void 0&&sF())return A;if("TF_BUILD"in Ce&&"AGENT_NAME"in Ce)return 1;if(e&&!t&&A===void 0)return 0;let s=A||0;if(Ce.TERM==="dumb")return s;if(jE.platform==="win32"){let i=e3.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in Ce)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(i=>i in Ce)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(i=>i in Ce)||Ce.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in Ce)return/^(?:9\.0*[1-9]\d*\.|\d{2,}\.)/.test(Ce.TEAMCITY_VERSION)?1:0;if(Ce.COLORTERM==="truecolor"||Ce.TERM==="xterm-kitty"||Ce.TERM==="xterm-ghostty"||Ce.TERM==="wezterm")return 3;if("TERM_PROGRAM"in Ce){let i=Number.parseInt((Ce.TERM_PROGRAM_VERSION||"").split(".",1)[0],10);switch(Ce.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(?:color)?$/i.test(Ce.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ce.TERM)||"COLORTERM"in Ce?1:s}o(n3,"_supportsColor");function oF(e,t={}){let r=n3(e,{streamIsTTY:e&&e.isTTY,...t});return r3(r)}o(oF,"createSupportsColor");var A3={stdout:oF({isTTY:AF.isatty(1)}),stderr:oF({isTTY:AF.isatty(2)})},iF=A3;var{stdout:aF,stderr:cF}=iF,Di=Symbol("GENERATOR"),Fi=Symbol("STYLER"),Wl=Symbol("IS_EMPTY"),Vl=Symbol("LEVEL"),ki=Object.create(null),lF=o(e=>{if(!Number.isSafeInteger(e)||e<0||e>3)throw new Error("The `level` should be an integer from 0 to 3")},"assertValidLevel"),o3={enumerable:!0,get(){return this[Vl]},set(e){lF(e),this[Vl]=e}},s3=o((e,t={})=>{t.level!==void 0&&lF(t.level);let r=aF?aF.level:0;e[Vl]=t.level===void 0?r:t.level},"applyOptions");var i3=o(e=>{let t=o((...r)=>r.join(" "),"chalk");return s3(t,e),Object.setPrototypeOf(t,Ni.prototype),t},"chalkFactory");function Ni(e){return i3(e)}o(Ni,"createChalk");Object.setPrototypeOf(Ni.prototype,Function.prototype);for(let[e,t]of Object.entries(Ir))ki[e]={get(){let r=KE(this,uF(t.open,t.close,this[Fi]),this[Wl]);return Object.defineProperty(this,e,{value:r}),r}};ki.visible={get(){let e=KE(this,this[Fi],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var a3=o((e,t)=>{let r=Ir[t];if(e==="rgb"){let A=o((i,c,u)=>r.ansi(Ir.rgbToAnsi(i,c,u)),"ansi");return[A,A,o((i,c,u)=>r.ansi256(Ir.rgbToAnsi256(i,c,u)),"ansi256"),r.ansi16m]}if(e==="hex"){let A=o(i=>r.ansi(Ir.hexToAnsi(i)),"ansi");return[A,A,o(i=>r.ansi256(Ir.hexToAnsi256(i)),"ansi256"),i=>r.ansi16m(...Ir.hexToRgb(i))]}let n=o(A=>r.ansi(Ir.ansi256ToAnsi(A)),"ansi");return[n,n,r.ansi256,r.ansi256]},"createModelConverters"),c3=["rgb","hex","ansi256"];for(let e of c3){let t=e[0].toUpperCase()+e.slice(1);for(let[r,n]of[[e,"color"],["bg"+t,"bgColor"],["underline"+t,"underlineColor"]]){let{close:A}=Ir[n],s=a3(e,n);ki[r]={get(){let i=o(function(c,u,f){let h=s[this.level](c,u,f);return KE(this,uF(h,A,this[Fi]),this[Wl])},"styleFunction");return Object.defineProperty(this,r,{value:i}),i}}}}var l3=Object.defineProperties(()=>{},{...ki,level:{enumerable:!0,get(){return this[Di].level},set(e){this[Di].level=e}}}),uF=o((e,t,r)=>{let n,A;return r===void 0?(n=e,A=t):(n=r.openAll+e,A=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:A,parent:r}},"createStyler"),KE=o((e,t,r)=>{let n=o((...A)=>A.length===1?ZE(n,""+A[0]):A.length===2?ZE(n,A[0]+" "+A[1]):ZE(n,A.join(" ")),"builder");return Object.setPrototypeOf(n,l3),n[Di]=e[Di]??e,n[Fi]=t,n[Wl]=r,n},"createBuilder"),ZE=o((e,t)=>{if(e[Di][Vl]<=0||!t)return e[Wl]?"":t;let r=e[Fi];if(r===void 0)return t;let{openAll:n,closeAll:A}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=tF(t,r.close,r.open),r=r.parent;let s=t.indexOf(` +`,A)}while(n!==-1);return s+=e.slice(A),s}o(rF,"stringEncaseCRLFWithFirstIndex");var nF=o((e=0)=>t=>`\x1B[${t+e}m`,"wrapAnsi16"),zE=o((e=0)=>t=>`\x1B[${38+e};5;${t}m`,"wrapAnsi256"),$E=o((e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,"wrapAnsi16m"),$5=o(e=>`\x1B[58;5;${e<90?e-30:e-90+8}m`,"wrapUnderlineAnsi"),le={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],underlineDouble:["4:2",24],underlineCurly:["4:3",24],underlineDotted:["4:4",24],underlineDashed:["4:5",24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]},underlineColor:{underlineBlack:["58;5;0",59],underlineRed:["58;5;1",59],underlineGreen:["58;5;2",59],underlineYellow:["58;5;3",59],underlineBlue:["58;5;4",59],underlineMagenta:["58;5;5",59],underlineCyan:["58;5;6",59],underlineWhite:["58;5;7",59],underlineBlackBright:["58;5;8",59],underlineGray:["58;5;8",59],underlineGrey:["58;5;8",59],underlineRedBright:["58;5;9",59],underlineGreenBright:["58;5;10",59],underlineYellowBright:["58;5;11",59],underlineBlueBright:["58;5;12",59],underlineMagentaBright:["58;5;13",59],underlineCyanBright:["58;5;14",59],underlineWhiteBright:["58;5;15",59]}},Mae=Object.keys(le.modifier),j5=Object.keys(le.color),Z5=Object.keys(le.bgColor),Uae=Object.keys(le.underlineColor),Lae=[...j5,...Z5];function K5(){let e=new Map;for(let[t,r]of Object.entries(le)){for(let[n,A]of Object.entries(r))le[n]={open:`\x1B[${A[0]}m`,close:`\x1B[${A[1]}m`},r[n]=le[n],e.set(Number.parseInt(A[0],10),A[1]);Object.defineProperty(le,t,{value:r,enumerable:!1})}return Object.defineProperty(le,"codes",{value:e,enumerable:!1}),le.color.close="\x1B[39m",le.bgColor.close="\x1B[49m",le.underlineColor.close="\x1B[59m",le.color.ansi=nF(),le.color.ansi256=zE(),le.color.ansi16m=$E(),le.bgColor.ansi=nF(10),le.bgColor.ansi256=zE(10),le.bgColor.ansi16m=$E(10),le.underlineColor.ansi=$5,le.underlineColor.ansi256=zE(20),le.underlineColor.ansi16m=$E(20),Object.defineProperties(le,{rgbToAnsi256:{value(t,r,n){return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[\da-f]{6}|[\da-f]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(s=>s+s).join(""));let A=Number.parseInt(n,16);return[A>>16&255,A>>8&255,A&255]},enumerable:!1},hexToAnsi256:{value:o(t=>le.rgbToAnsi256(...le.hexToRgb(t)),"value"),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,n,A;if(t>=232)r=((t-232)*10+8)/255,n=r,A=r;else{t-=16;let c=t%36;r=Math.floor(t/36)/5,n=Math.floor(c/6)/5,A=c%6/5}let s=Math.max(r,n,A)*2;if(s===0)return 30;let i=30+(Math.round(A)<<2|Math.round(n)<<1|Math.round(r));return s===2&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:o((t,r,n)=>le.ansi256ToAnsi(le.rgbToAnsi256(t,r,n)),"value"),enumerable:!1},hexToAnsi:{value:o(t=>le.ansi256ToAnsi(le.hexToAnsi256(t)),"value"),enumerable:!1}}),le}o(K5,"assembleStyles");var X5=K5(),Ir=X5;import jE from"node:process";import e3 from"node:os";import AF from"node:tty";function Mt(e,t=globalThis.Deno?globalThis.Deno.args:jE.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),A=t.indexOf("--");return n!==-1&&(A===-1||n=2,has16m:e>=3}}o(r3,"translateLevel");function n3(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=t3();n!==void 0&&(ql=n);let A=r?ql:n;if(A===0)return 0;if(r){if(Mt("color=16m")||Mt("color=full")||Mt("color=truecolor"))return 3;if(Mt("color=256"))return 2}if(A!==void 0&&sF())return A;if("TF_BUILD"in Ce&&"AGENT_NAME"in Ce)return 1;if(e&&!t&&A===void 0)return 0;let s=A||0;if(Ce.TERM==="dumb")return s;if(jE.platform==="win32"){let i=e3.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in Ce)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(i=>i in Ce)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(i=>i in Ce)||Ce.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in Ce)return/^(?:9\.0*[1-9]\d*\.|\d{2,}\.)/.test(Ce.TEAMCITY_VERSION)?1:0;if(Ce.COLORTERM==="truecolor"||Ce.TERM==="xterm-kitty"||Ce.TERM==="xterm-ghostty"||Ce.TERM==="wezterm")return 3;if("TERM_PROGRAM"in Ce){let i=Number.parseInt((Ce.TERM_PROGRAM_VERSION||"").split(".",1)[0],10);switch(Ce.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(?:color)?$/i.test(Ce.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ce.TERM)||"COLORTERM"in Ce?1:s}o(n3,"_supportsColor");function oF(e,t={}){let r=n3(e,{streamIsTTY:e&&e.isTTY,...t});return r3(r)}o(oF,"createSupportsColor");var A3={stdout:oF({isTTY:AF.isatty(1)}),stderr:oF({isTTY:AF.isatty(2)})},iF=A3;var{stdout:aF,stderr:cF}=iF,Di=Symbol("GENERATOR"),Fi=Symbol("STYLER"),Wl=Symbol("IS_EMPTY"),Vl=Symbol("LEVEL"),ki=Object.create(null),lF=o(e=>{if(!Number.isSafeInteger(e)||e<0||e>3)throw new Error("The `level` should be an integer from 0 to 3")},"assertValidLevel"),o3={enumerable:!0,get(){return this[Vl]},set(e){lF(e),this[Vl]=e}},s3=o((e,t={})=>{t.level!==void 0&&lF(t.level);let r=aF?aF.level:0;e[Vl]=t.level===void 0?r:t.level},"applyOptions");var i3=o(e=>{let t=o((...r)=>r.join(" "),"chalk");return s3(t,e),Object.setPrototypeOf(t,Ni.prototype),t},"chalkFactory");function Ni(e){return i3(e)}o(Ni,"createChalk");Object.setPrototypeOf(Ni.prototype,Function.prototype);for(let[e,t]of Object.entries(Ir))ki[e]={get(){let r=KE(this,uF(t.open,t.close,this[Fi]),this[Wl]);return Object.defineProperty(this,e,{value:r}),r}};ki.visible={get(){let e=KE(this,this[Fi],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var a3=o((e,t)=>{let r=Ir[t];if(e==="rgb"){let A=o((i,c,u)=>r.ansi(Ir.rgbToAnsi(i,c,u)),"ansi");return[A,A,o((i,c,u)=>r.ansi256(Ir.rgbToAnsi256(i,c,u)),"ansi256"),r.ansi16m]}if(e==="hex"){let A=o(i=>r.ansi(Ir.hexToAnsi(i)),"ansi");return[A,A,o(i=>r.ansi256(Ir.hexToAnsi256(i)),"ansi256"),i=>r.ansi16m(...Ir.hexToRgb(i))]}let n=o(A=>r.ansi(Ir.ansi256ToAnsi(A)),"ansi");return[n,n,r.ansi256,r.ansi256]},"createModelConverters"),c3=["rgb","hex","ansi256"];for(let e of c3){let t=e[0].toUpperCase()+e.slice(1);for(let[r,n]of[[e,"color"],["bg"+t,"bgColor"],["underline"+t,"underlineColor"]]){let{close:A}=Ir[n],s=a3(e,n);ki[r]={get(){let i=o(function(c,u,f){let h=s[this.level](c,u,f);return KE(this,uF(h,A,this[Fi]),this[Wl])},"styleFunction");return Object.defineProperty(this,r,{value:i}),i}}}}var l3=Object.defineProperties(()=>{},{...ki,level:{enumerable:!0,get(){return this[Di].level},set(e){this[Di].level=e}}}),uF=o((e,t,r)=>{let n,A;return r===void 0?(n=e,A=t):(n=r.openAll+e,A=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:A,parent:r}},"createStyler"),KE=o((e,t,r)=>{let n=o((...A)=>A.length===1?ZE(n,""+A[0]):A.length===2?ZE(n,`${A[0]??""} ${A[1]??""}`):ZE(n,A.join(" ")),"builder");return Object.setPrototypeOf(n,l3),n[Di]=e[Di]??e,n[Fi]=t,n[Wl]=r,n},"createBuilder"),ZE=o((e,t)=>{if(e[Di][Vl]<=0||!t)return e[Wl]?"":t;let r=e[Fi];if(r===void 0)return t;let{openAll:n,closeAll:A}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=tF(t,r.close,r.open),r=r.parent;let s=t.indexOf(` `);return s!==-1&&(t=rF(t,A,n,s)),n+t+A},"applyStyle");Object.defineProperties(Ni.prototype,{...ki,level:o3});var u3=Ni(),Vae=Ni({level:cF?cF.level:0});var fF=u3;import{platform as $te,arch as jte}from"os";function ke(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}o(ke,"isPlainObject");import{fileURLToPath as f3}from"node:url";var Wo=o((e,t)=>{let r=eB(g3(e));if(typeof r!="string")throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},"safeNormalizeFileUrl"),g3=o(e=>XE(e)?e.toString():e,"normalizeDenoExecPath"),XE=o(e=>typeof e!="string"&&e&&Object.getPrototypeOf(e)===String.prototype,"isDenoExecPath"),eB=o(e=>e instanceof URL?f3(e):e,"normalizeFileUrl");var zl=o((e,t=[],r={})=>{let n=Wo(e,"First argument"),[A,s]=ke(t)?[[],t]:[t,r];if(!Array.isArray(A))throw new TypeError(`Second argument must be either an array of arguments or an options object: ${A}`);if(A.some(u=>typeof u=="object"&&u!==null))throw new TypeError(`Second argument must be an array of strings: ${A}`);let i=A.map(String),c=i.find(u=>u.includes("\0"));if(c!==void 0)throw new TypeError(`Arguments cannot contain null bytes ("\\0"): ${c}`);if(!ke(s))throw new TypeError(`Last argument must be an options object: ${s}`);return[n,i,s]},"normalizeParameters");import{ChildProcess as I3}from"node:child_process";import{StringDecoder as h3}from"node:string_decoder";var{toString:gF}=Object.prototype,hF=o(e=>gF.call(e)==="[object ArrayBuffer]","isArrayBuffer"),Ue=o(e=>gF.call(e)==="[object Uint8Array]","isUint8Array"),jr=o(e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),"bufferToUint8Array"),d3=new TextEncoder,dF=o(e=>d3.encode(e),"stringToUint8Array"),E3=new TextDecoder,$l=o(e=>E3.decode(e),"uint8ArrayToString"),EF=o((e,t)=>B3(e,t).join(""),"joinToString"),B3=o((e,t)=>{if(t==="utf8"&&e.every(s=>typeof s=="string"))return e;let r=new h3(t),n=e.map(s=>typeof s=="string"?dF(s):s).map(s=>r.write(s)),A=r.end();return A===""?n:[...n,A]},"uint8ArraysToStrings"),Ti=o(e=>e.length===1&&Ue(e[0])?e[0]:tB(C3(e)),"joinToUint8Array"),C3=o(e=>e.map(t=>typeof t=="string"?dF(t):t),"stringsToUint8Arrays"),tB=o(e=>{let t=new Uint8Array(Q3(e)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t},"concatUint8Arrays"),Q3=o(e=>{let t=0;for(let r of e)t+=r.length;return t},"getJoinLength");var IF=o(e=>Array.isArray(e)&&Array.isArray(e.raw),"isTemplateString"),pF=o((e,t)=>{let r=[];for(let[s,i]of e.entries())r=p3({templates:e,expressions:t,tokens:r,index:s,template:i});if(r.length===0)throw new TypeError("Template script must not be empty");let[n,...A]=r;return[n,A,{}]},"parseTemplates"),p3=o(({templates:e,expressions:t,tokens:r,index:n,template:A})=>{if(A===void 0)throw new TypeError(`Invalid backslash sequence: ${e.raw[n]}`);let{nextTokens:s,leadingWhitespaces:i,trailingWhitespaces:c}=m3(A,e.raw[n]),u=CF(r,s,i);if(n===t.length)return u;let f=t[n],h=Array.isArray(f)?f.map(d=>QF(d)):[QF(f)];return CF(u,h,c)},"parseTemplate"),m3=o((e,t)=>{if(t.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let r=[],n=0,A=BF.has(t[0]);for(let i=0,c=0;ir||e.length===0||t.length===0?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],"concatTokens"),QF=o(e=>{let t=typeof e;if(t==="string")return e;if(t==="number")return String(e);if(ke(e)&&("stdout"in e||"isMaxBuffer"in e))return w3(e);throw e instanceof I3||Object.prototype.toString.call(e)==="[object Promise]"?new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}."):new TypeError(`Unexpected "${t}" in template expression`)},"parseExpression"),w3=o(({stdout:e})=>{if(typeof e=="string")return e;if(Ue(e))return $l(e);throw e===void 0?new TypeError(`Missing result.stdout in template expression. This is probably due to the previous subprocess' "stdout" option.`):new TypeError(`Unexpected "${typeof e}" stdout in template expression`)},"getSubprocessResult");import{spawnSync as DZ}from"node:child_process";import{debuglog as b3}from"node:util";import rB from"node:process";var Xt=o(e=>jl.includes(e),"isStandardStream"),jl=[rB.stdin,rB.stdout,rB.stderr],Ut=["stdin","stdout","stderr"],Zl=o(e=>Ut[e]??`stdio[${e}]`,"getStreamName");var yF=o(e=>{let t={...e};for(let r of oB)t[r]=nB(e,r);return t},"normalizeFdSpecificOptions"),nB=o((e,t)=>{let r=Array.from({length:S3(e)+1}),n=R3(e[t],r,t);return T3(n,t)},"normalizeFdSpecificOption"),S3=o(({stdio:e})=>Array.isArray(e)?Math.max(e.length,Ut.length):Ut.length,"getStdioLength"),R3=o((e,t,r)=>ke(e)?D3(e,t,r):t.fill(e),"normalizeFdSpecificValue"),D3=o((e,t,r)=>{for(let n of Object.keys(e).sort(F3))for(let A of k3(n,r,t))t[A]=e[n];return t},"normalizeOptionObject"),F3=o((e,t)=>mF(e)e==="stdout"||e==="stderr"?0:e==="all"?2:1,"getFdNameOrder"),k3=o((e,t,r)=>{if(e==="ipc")return[r.length-1];let n=AB(e);if(n===void 0||n===0)throw new TypeError(`"${t}.${e}" is invalid. @@ -115,7 +115,7 @@ ${t}`,"wrappedToString"),r6=Object.getOwnPropertyDescriptor(Function.prototype," `),f=i-1;n=[...u.slice(0,f),"... (content truncated to fit terminal)"].join(` `)}this.#u(()=>this.#o.write(n))===!1&&this.#o.isTTY&&(this.#a=()=>{this.#a=void 0,this.#d()},this.#o.once("drain",this.#a)),this.#e=this.#h(n,A)}finally{r&&this.#u(()=>this.#o.write(v6))}return this}start(t){if(t!==void 0&&(this.text=t),this.isSilent)return this;if(!this.isEnabled){let r=this.text?"-":"",n=" ".repeat(this.#t.indent)+this.#B(r,this.text,this.#t.prefixText,this.#t.suffixText);return n.trim()!==""&&this.#u(()=>this.#o.write(n+` `)),this}return this.isSpinning?this:(this.#t.hideCursor&&xC.hide(this.#o),this.#t.discardStdin&&Ki.stdin.isTTY&&(VC.start(),this.#g=!0),this.#b(),this.render(),this.#s=setInterval(this.render.bind(this),this.interval),this)}stop(){return clearInterval(this.#s),this.#s=void 0,this.#r=-1,this.#n=0,this.#E(),this.#S(),this.#a&&(this.#o.removeListener("drain",this.#a),this.#a=void 0),this.isEnabled&&(this.clear(),this.#t.hideCursor&&xC.show(this.#o)),this.#g&&(this.#g=!1,VC.stop()),this}succeed(t){return this.stopAndPersist({symbol:FA.success,text:t})}fail(t){return this.stopAndPersist({symbol:FA.error,text:t})}warn(t){return this.stopAndPersist({symbol:FA.warning,text:t})}info(t){return this.stopAndPersist({symbol:FA.info,text:t})}stopAndPersist(t={}){if(this.isSilent)return this;let r=t.symbol??" ",n=t.text??this.text,A=t.prefixText??this.#t.prefixText,s=t.suffixText??this.#t.suffixText,i=this.#B(r,n,A,s)+` -`;return this.stop(),this.#u(()=>this.#o.write(i)),this}};function zC(e){return new WC(e)}o(zC,"ora");var Mx=PA(kx(),1);import Zte from"path";var dQ=Symbol("resolveValue"),Nx=o((e,t)=>new Promise((r,n)=>{if(t?.aborted){n(t.reason);return}let A=setTimeout(r,e);t&&t.addEventListener("abort",()=>{clearTimeout(A),n(t.reason)},{once:!0})}),"sleep"),Vte=o((e,t)=>{if(typeof e!="number"||!Number.isFinite(e)||e<0)throw new TypeError("Expected interval to be a finite non-negative number");if(typeof t=="object"&&t!==null){if(typeof t.milliseconds!="number"||Number.isNaN(t.milliseconds)||t.milliseconds<0)throw new TypeError("Expected timeout.milliseconds to be a finite non-negative number")}else if(typeof t=="number"&&(Number.isNaN(t)||t<0))throw new TypeError("Expected timeout to be a finite non-negative number")},"validateOptions"),Wte=o(e=>{if(e.message instanceof Error)return e.message;let t=e.message??`Promise timed out after ${e.milliseconds} milliseconds`;return new Df(t)},"createTimeoutError"),zte=o(e=>{if(e.fallback)return e.fallback();throw Wte(e)},"handleFallback"),Tx=o((e,t,r)=>{if(e?.aborted){if(typeof t=="object")return zte(t);throw new Df}throw r.reason},"handleAbortError");async function Ff(e,t={}){let{interval:r=20,timeout:n=Number.POSITIVE_INFINITY,before:A=!0,signal:s}=t;Vte(r,n);let i=typeof n=="number"?n:n?.milliseconds??Number.POSITIVE_INFINITY,c=i===Number.POSITIVE_INFINITY?void 0:AbortSignal.timeout(i),u=c&&s?AbortSignal.any([c,s]):c??s;if(A||await Nx(r,u),u?.aborted)return Tx(c,n,s);for(;;)try{let f=await e();if(typeof f=="object"&&f!==null&&dQ in f)return f[dQ];if(f===!0)return;if(f===!1){await Nx(r,u);continue}throw new TypeError("Expected condition to return a boolean")}catch(f){if(f===u?.reason)return Tx(c,n,s);throw f}}o(Ff,"pWaitFor");Ff.resolveWith=e=>({[dQ]:e});var Df=class extends Error{static{o(this,"TimeoutError")}constructor(t="Promise timed out"){super(t),this.name="TimeoutError"}};var Kte={darwin_arm64:"cloudquery_darwin_arm64",darwin_x64:"cloudquery_darwin_amd64",linux_arm64:"cloudquery_linux_arm64",linux_x64:"cloudquery_linux_amd64"},Xte=o(async(e,t)=>`https://github.com/cloudquery/cloudquery/releases/download/${e.startsWith("v")?`cli-${e}`:`cli-v${e}`}/${t}`,"resolveDownloadUrl"),ere=o(async e=>{try{Oo(`Checking if ${e} exists`);let t=await Hl(e,{redirect:"follow"});Oo(`Response status: ${t.status}`),Oo(`Response statusText: ${t.statusText}`),Oo(`Response ok: ${t.ok}`);let r=t.ok;return r||pD(`${e} does not exist, retrying...`),r}catch(t){return Tl(t),!1}},"assetExists"),tre=o(async e=>{let t=$te()+"_"+jte(),r=Kte[t];if(!r)throw new Error(`Unsupported platform: ${t}`);let n=`version '${fF.green(e)}'`,A=zC(`Downloading ${n} of CloudQuery`).start(),s=await Xte(e,r);await Ff(()=>ere(s),{interval:5e3,timeout:6e4}),await kC("curl",["-L",s,"-o","cloudquery"],{stdout:"inherit"}),await kC("chmod",["+x","cloudquery"]),CD(Zte.resolve("./")),A.succeed(`Finished downloading ${n} of CloudQuery`)},"installBinary");async function rre(){try{let e=QD("version",{required:!1});if(!Mx.default.valid(e))throw new Error(`Invalid version: ${e}`);await tre(e)}catch(e){let t=e;Tl(t),ID(t.message)}}o(rre,"main");rre();export{tre as installBinary}; +`;return this.stop(),this.#u(()=>this.#o.write(i)),this}};function zC(e){return new WC(e)}o(zC,"ora");var Mx=PA(kx(),1);import Zte from"path";var dQ=Symbol("resolveValue"),Nx=o((e,t)=>new Promise((r,n)=>{if(t?.aborted){n(t.reason);return}let A=o(()=>{clearTimeout(s),n(t.reason)},"onAbort"),s=setTimeout(()=>{t?.removeEventListener("abort",A),r()},e);t&&t.addEventListener("abort",A,{once:!0})}),"sleep"),Vte=o((e,t)=>{if(typeof e!="number"||!Number.isFinite(e)||e<0)throw new TypeError("Expected interval to be a finite non-negative number");if(typeof t=="object"&&t!==null){if(typeof t.milliseconds!="number"||Number.isNaN(t.milliseconds)||t.milliseconds<0)throw new TypeError("Expected timeout.milliseconds to be a non-negative number")}else if(typeof t=="number"&&(Number.isNaN(t)||t<0))throw new TypeError("Expected timeout to be a non-negative number")},"validateOptions"),Wte=o(e=>{if(e.message instanceof Error)return e.message;let t=e.message??`Promise timed out after ${e.milliseconds} milliseconds`;return new Df(t)},"createTimeoutError"),zte=o(e=>{if(e.fallback)return e.fallback();throw Wte(e)},"handleFallback"),Tx=o((e,t,r)=>{if(e?.aborted){if(typeof t=="object")return zte(t);throw new Df}throw r.reason},"handleAbortError");async function Ff(e,t={}){let{interval:r=20,timeout:n=1/0,before:A=!0,signal:s}=t;Vte(r,n);let i=typeof n=="number"?n:n?.milliseconds??1/0,c=i===1/0?void 0:AbortSignal.timeout(i),u=c&&s?AbortSignal.any([c,s]):c??s,f=o(async()=>{for(A||await Nx(r,u);;){let C=await e();if(typeof C=="object"&&C!==null&&Object.hasOwn(C,dQ))return C[dQ];if(C===!0)return;if(C===!1){await Nx(r,u);continue}throw new TypeError("Expected condition to return a boolean")}},"poll");if(!u)return f();if(u.aborted)return Tx(c,n,s);let{promise:h,reject:d}=Promise.withResolvers(),E=o(()=>{d(u.reason)},"onAbort");u.addEventListener("abort",E,{once:!0});try{return await Promise.race([f(),h])}catch(C){if(u.aborted&&C===u.reason)return Tx(c,n,s);throw C}finally{u.removeEventListener("abort",E)}}o(Ff,"pWaitFor");Ff.resolveWith=e=>({[dQ]:e});var Df=class extends Error{static{o(this,"TimeoutError")}constructor(t="Promise timed out"){super(t),this.name="TimeoutError"}};var Kte={darwin_arm64:"cloudquery_darwin_arm64",darwin_x64:"cloudquery_darwin_amd64",linux_arm64:"cloudquery_linux_arm64",linux_x64:"cloudquery_linux_amd64"},Xte=o(async(e,t)=>`https://github.com/cloudquery/cloudquery/releases/download/${e.startsWith("v")?`cli-${e}`:`cli-v${e}`}/${t}`,"resolveDownloadUrl"),ere=o(async e=>{try{Oo(`Checking if ${e} exists`);let t=await Hl(e,{redirect:"follow"});Oo(`Response status: ${t.status}`),Oo(`Response statusText: ${t.statusText}`),Oo(`Response ok: ${t.ok}`);let r=t.ok;return r||pD(`${e} does not exist, retrying...`),r}catch(t){return Tl(t),!1}},"assetExists"),tre=o(async e=>{let t=$te()+"_"+jte(),r=Kte[t];if(!r)throw new Error(`Unsupported platform: ${t}`);let n=`version '${fF.green(e)}'`,A=zC(`Downloading ${n} of CloudQuery`).start(),s=await Xte(e,r);await Ff(()=>ere(s),{interval:5e3,timeout:6e4}),await kC("curl",["-L",s,"-o","cloudquery"],{stdout:"inherit"}),await kC("chmod",["+x","cloudquery"]),CD(Zte.resolve("./")),A.succeed(`Finished downloading ${n} of CloudQuery`)},"installBinary");async function rre(){try{let e=QD("version",{required:!1});if(!Mx.default.valid(e))throw new Error(`Invalid version: ${e}`);await tre(e)}catch(e){let t=e;Tl(t),ID(t.message)}}o(rre,"main");rre();export{tre as installBinary}; /*! Bundled license information: undici/lib/web/fetch/body.js: diff --git a/package.json b/package.json index 3e758424..b1d2fd8c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cloudquery/setup-cloudquery", - "version": "5.0.4", + "version": "5.0.5", "description": "Setup CloudQuery CLI in a GitHub action environment", "main": "dist/index.js", "type": "module",