setup-cpp/dist/node16/setup-cpp.js

9 lines
445 KiB
JavaScript
Raw Normal View History

#!/usr/bin/env node
<<<<<<< HEAD
2023-04-22 03:04:07 +08:00
function e(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function t(e){return e&&e.__esModule?e.default:e}function r(e){return null==e?[]:Array.isArray(e)?e:[e]}function n(e,t,r,n){var o,i=e[t],s=~n.string.indexOf(t)?null==r||!0===r?"":r+"":"boolean"==typeof r?r:~n.boolean.indexOf(t)?"false"!==r&&("true"===r||(e._.push(0*(o=+r)==0?o:r),!!r)):0*(o=+r)==0?o:r;e[t]=null==i?s:Array.isArray(i)?i.concat(s):[i,s]}function o(e){return e&&e.__esModule?e.default:e}function i(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function s(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(((r,n)=>{s(e,t||{},((e,t)=>{e?n(e):r(t)}))}))}Jt(e,t||{},((e,n)=>{e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,n=!1),r(e,n)}))}function a(e,t){const r=e.options.env||process.env,n=process.cwd(),o=null!=e.options.cwd,i=o&&void 0!==process.chdir&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch(e){}let s;try{s=Wt.sync(e.command,{path:r[sr({env:r})],pathExt:t?pt.delimiter:void 0})}catch(e){}finally{i&&process.chdir(n)}return s&&(s=(0,pt.resolve)(o?e.options.cwd:"",s)),s}function c(e,t){return Object.assign(Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function l(e,t){return yr&&1===e&&!t.file?c(t.original,"spawn"):null}function u(e,t,r){const n=ir(e,t,r),o=(0,bt.spawn)(n.command,n.args,n.options);return vr.hookChildProcess(o,n),o}async function d(e,t){if(!e)throw Error("Expected a stream");t={maxBuffer:1/0,...t};const{maxBuffer:r}=t,n=mn(t);return await new Promise(((t,o)=>{const i=e=>{e&&n.getBufferedLength()<=vn.MAX_LENGTH&&(e.bufferedData=n.getBufferedValue()),o(e)};(async()=>{try{await wn(e,n),t()}catch(e){i(e)}})(),n.on("data",(()=>{n.getBufferedLength()>r&&i(new xn)}))})),n.getBufferedValue()}function p(){return null!==o(Wt).sync("sudo",{nothrow:!0})}function h(){return 0===process.getuid?.()||!!process.env.CI}function f(){return h()&&p()}function m(e){return f()?"sudo "+e:e}function g(e,t=[],r={stdio:"inherit",shell:!0}){return f()?o(nr).commandSync("sudo "+[e,...t].map((e=>`'${e}'`)).join(" "),r):o(nr).sync(e,t,r)}function v(e,t=[],r={stdio:"inherit",shell:!0}){return f()?o(nr).command("sudo "+[e,...t].map((e=>`'${e}'`)).join(" "),r):o(nr)(e,t,r)}function y(){return"win32"===process.platform?Vn():h()}function w(e){return f()&&"string"==typeof process.env.SUDO_USER?"darwin"===process.platform?(0,pt.join)("/Users/",process.env.SUDO_USER,e):(0,pt.join)("/home/",process.env.SUDO_USER,e):t(Gt)("~/"+e)}function x(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(((r,n)=>{x(e,t||{},((e,t)=>{e?n(e):r(t)}))}))}Jn(e,t||{},((e,n)=>{e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,n=!1),r(e,n)}))}function b(e,t){const r=e.options.env||process.env,n=process.cwd(),o=null!=e.options.cwd,i=o&&void 0!==process.chdir&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch(e){}let s;try{s=Wn.sync(e.command,{path:r[so({env:r})],pathExt:t?pt.delimiter:void 0})}catch(e){}finally{i&&process.chdir(n)}return s&&(s=pt.resolve(o?e.options.cwd:"",s)),s}function E(e,t){return Object.assign(Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function S(e,t){return wo&&1===e&&!t.file?E(t.original,"spawn"):null}function T(e,t,r){const n=io(e,t,r),o=bt.spawn(n.command,n.args,n.options);return yo.hookChildProcess(o,n),o}async function O(e,t){if(!e)throw Error("Expected a stream");t={maxBuffer:1/0,...t};const{maxBuffer:r}=t,n=gi(t);return await new Promise(((t,o)=>{const i=e=>{e&&n.getBufferedLength()<=yi.MAX_LENGTH&&(e.bufferedData=n.getBufferedValue()),o(e)};(async()=>{try{await xi(e,n),t()}catch(e){i(e)}})(),n.on("data",(()=>{n.getBufferedLength()>r&&i(new bi)}))})),n.getBufferedValue()}function _(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,
//# sourceMappingURL=setup-cpp.js.map
=======
2023-04-23 16:09:38 +08:00
function e(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0});}function t(e){return e&&e.__esModule?e.default:e;}function r(e){return null==e?[]:Array.isArray(e)?e:[e];}function n(e,t,r,n){var o,i=e[t],s=~n.string.indexOf(t)?null==r||!0===r?"":r+"":"boolean"==typeof r?r:~n.boolean.indexOf(t)?"false"!==r&&("true"===r||(e._.push(0*(o=+r)==0?o:r),!!r)):0*(o=+r)==0?o:r;e[t]=null==i?s:Array.isArray(i)?i.concat(s):[i,s];}function o(e){return e&&e.__esModule?e.default:e;}function i(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0});}function s(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((r,n)=>{s(e,t||{},(e,t)=>{e?n(e):r(t);});});}ar(e,t||{},(e,n)=>{e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,n=!1),r(e,n);});}function a(e,t){const r=e.options.env||process.env,n=process.cwd(),o=null!=e.options.cwd,i=o&&void 0!==process.chdir&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd);}catch(e){}let s;try{s=or.sync(e.command,{path:r[gr({env:r})],pathExt:t?mt.delimiter:void 0});}catch(e){}finally{i&&process.chdir(n);}return s&&(s=(0,mt.resolve)(o?e.options.cwd:"",s)),s;}function c(e,t){return Object.assign(Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args});}function l(e,t){return Cr&&1===e&&!t.file?c(t.original,"spawn"):null;}function u(e,t,r){const n=hr(e,t,r),o=(0,It.spawn)(n.command,n.args,n.options);return Rr.hookChildProcess(o,n),o;}async function d(e,t){if(!e)throw Error("Expected a stream");t={maxBuffer:1/0,...t};const{maxBuffer:r}=t,n=On(t);return await new Promise((t,o)=>{const i=e=>{e&&n.getBufferedLength()<=Rn.MAX_LENGTH&&(e.bufferedData=n.getBufferedValue()),o(e);};(async()=>{try{await _n(e,n),t();}catch(e){i(e);}})(),n.on("data",()=>{n.getBufferedLength()>r&&i(new Pn());});}),n.getBufferedValue();}function p(){return null!==o(or).sync("sudo",{nothrow:!0});}function f(){return 0===process.getuid?.()||!!process.env.CI;}function m(){return f()&&p();}function h(e){return m()?"sudo "+e:e;}function g(e,t=[],r={stdio:"inherit",shell:!0}){return m()?o(fr).commandSync("sudo "+[e,...t].map(e=>`'${e}'`).join(" "),r):o(fr).sync(e,t,r);}function v(e,t=[],r={stdio:"inherit",shell:!0}){return m()?o(fr).command("sudo "+[e,...t].map(e=>`'${e}'`).join(" "),r):o(fr)(e,t,r);}function E(){return"win32"===process.platform?ro():f();}function y(e){return m()&&"string"==typeof process.env.SUDO_USER?"darwin"===process.platform?(0,mt.join)("/Users/",process.env.SUDO_USER,e):(0,mt.join)("/home/",process.env.SUDO_USER,e):t(Zt)("~/"+e);}function w(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((r,n)=>{w(e,t||{},(e,t)=>{e?n(e):r(t);});});}ao(e,t||{},(e,n)=>{e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,n=!1),r(e,n);});}function x(e,t){const r=e.options.env||process.env,n=process.cwd(),o=null!=e.options.cwd,i=o&&void 0!==process.chdir&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd);}catch(e){}let s;try{s=oo.sync(e.command,{path:r[vo({env:r})],pathExt:t?mt.delimiter:void 0});}catch(e){}finally{i&&process.chdir(n);}return s&&(s=mt.resolve(o?e.options.cwd:"",s)),s;}function b(e,t){return Object.assign(Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args});}function S(e,t){return _o&&1===e&&!t.file?b(t.original,"spawn"):null;}function I(e,t,r){const n=go(e,t,r),o=It.spawn(n.command,n.args,n.options);return Co.hookChildProcess(o,n),o;}async function O(e,t){if(!e)throw Error("Expected a stream");t={maxBuffer:1/0,...t};const{maxBuffer:r}=t,n=Ti(t);return await new Promise((t,o)=>{const i=e=>{e&&n.getBufferedLength()<=Ci.MAX_LENGTH&&(e.bufferedData=n.getBufferedValue()),o(e);};(async()=>{try{await Pi(e,n),t();}catch(e){i(e);}})(),n.on("data",()=>{n.getBufferedLength()>r&&i(new Ai());});}),n.getBufferedValue();}function T(e,t,r,n){Object.de
//# sourceMappingURL=setup-cpp.js.map
>>>>>>> master