Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ibm/telemetry-js

Package Overview
Dependencies
Maintainers
20
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ibm/telemetry-js - npm Package Compare versions

Comparing version 1.2.1 to 1.3.0

dist/spawn-background-process.js

21

dist/collect.js

@@ -8,21 +8,2 @@ #!/usr/bin/env node

*/
const require = (await import("node:module")).createRequire(import.meta.url);
const __filename = (await import("node:url")).fileURLToPath(import.meta.url);
const __dirname = (await import("node:path")).dirname(__filename);
var xt=Object.create;var fr=Object.defineProperty;var Gt=Object.getOwnPropertyDescriptor;var Pt=Object.getOwnPropertyNames;var Ft=Object.getPrototypeOf,$t=Object.prototype.hasOwnProperty;var b=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(r,t)=>(typeof require<"u"?require:r)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var O=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var Bt=(e,r,t,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Pt(r))!$t.call(e,n)&&n!==t&&fr(e,n,{get:()=>r[n],enumerable:!(i=Gt(r,n))||i.enumerable});return e};var Wt=(e,r,t)=>(t=e!=null?xt(Ft(e)):{},Bt(r||!e||!e.__esModule?fr(t,"default",{value:e,enumerable:!0}):t,e));var dr=O(ke=>{var X=b("path"),G=process.platform==="win32",x=b("fs"),Xt=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function Ut(){var e;if(Xt){var r=new Error;e=t}else e=i;return e;function t(n){n&&(r.message=n.message,n=r,i(n))}function i(n){if(n){if(process.throwDeprecation)throw n;if(!process.noDeprecation){var a="fs: missing callback "+(n.stack||n.message);process.traceDeprecation?console.trace(a):console.error(a)}}}}function Qt(e){return typeof e=="function"?e:Ut()}var pn=X.normalize;G?M=/(.*?)(?:[\/\\]+|$)/g:M=/(.*?)(?:[\/]+|$)/g;var M;G?te=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/:te=/^[\/]*/;var te;ke.realpathSync=function(r,t){if(r=X.resolve(r),t&&Object.prototype.hasOwnProperty.call(t,r))return t[r];var i=r,n={},a={},s,c,o,u;h();function h(){var g=te.exec(r);s=g[0].length,c=g[0],o=g[0],u="",G&&!a[o]&&(x.lstatSync(o),a[o]=!0)}for(;s<r.length;){M.lastIndex=s;var v=M.exec(r);if(u=c,c+=v[0],o=u+v[1],s=M.lastIndex,!(a[o]||t&&t[o]===o)){var l;if(t&&Object.prototype.hasOwnProperty.call(t,o))l=t[o];else{var f=x.lstatSync(o);if(!f.isSymbolicLink()){a[o]=!0,t&&(t[o]=o);continue}var d=null;if(!G){var m=f.dev.toString(32)+":"+f.ino.toString(32);n.hasOwnProperty(m)&&(d=n[m])}d===null&&(x.statSync(o),d=x.readlinkSync(o)),l=X.resolve(u,d),t&&(t[o]=l),G||(n[m]=d)}r=X.resolve(l,r.slice(s)),h()}}return t&&(t[i]=r),r};ke.realpath=function(r,t,i){if(typeof i!="function"&&(i=Qt(t),t=null),r=X.resolve(r),t&&Object.prototype.hasOwnProperty.call(t,r))return process.nextTick(i.bind(null,null,t[r]));var n=r,a={},s={},c,o,u,h;v();function v(){var g=te.exec(r);c=g[0].length,o=g[0],u=g[0],h="",G&&!s[u]?x.lstat(u,function(y){if(y)return i(y);s[u]=!0,l()}):process.nextTick(l)}function l(){if(c>=r.length)return t&&(t[n]=r),i(null,r);M.lastIndex=c;var g=M.exec(r);return h=o,o+=g[0],u=h+g[1],c=M.lastIndex,s[u]||t&&t[u]===u?process.nextTick(l):t&&Object.prototype.hasOwnProperty.call(t,u)?m(t[u]):x.lstat(u,f)}function f(g,y){if(g)return i(g);if(!y.isSymbolicLink())return s[u]=!0,t&&(t[u]=u),process.nextTick(l);if(!G){var _=y.dev.toString(32)+":"+y.ino.toString(32);if(a.hasOwnProperty(_))return d(null,a[_],u)}x.stat(u,function(N){if(N)return i(N);x.readlink(u,function(S,D){G||(a[_]=D),d(S,D)})})}function d(g,y,_){if(g)return i(g);var N=X.resolve(h,y);t&&(t[_]=N),m(N)}function m(g){r=X.resolve(g,r.slice(c)),v()}}});var Te=O((En,pr)=>{pr.exports=P;P.realpath=P;P.sync=je;P.realpathSync=je;P.monkeypatch=Yt;P.unmonkeypatch=Ht;var H=b("fs"),Ae=H.realpath,Ne=H.realpathSync,zt=process.version,vr=/^v[0-5]\./.test(zt),mr=dr();function gr(e){return e&&e.syscall==="realpath"&&(e.code==="ELOOP"||e.code==="ENOMEM"||e.code==="ENAMETOOLONG")}function P(e,r,t){if(vr)return Ae(e,r,t);typeof r=="function"&&(t=r,r=null),Ae(e,r,function(i,n){gr(i)?mr.realpath(e,r,t):t(i,n)})}function je(e,r){if(vr)return Ne(e,r);try{return Ne(e,r)}catch(t){if(gr(t))return mr.realpathSync(e,r);throw t}}function Yt(){H.realpath=P,H.realpathSync=je}function Ht(){H.realpath=Ae,H.realpathSync=Ne}});var Er=O((_n,yr)=>{yr.exports=function(e,r){for(var t=[],i=0;i<e.length;i++){var n=r(e[i],i);Zt(n)?t.push.apply(t,n):t.push(n)}return t};var Zt=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"}});var Or=O((bn,Sr)=>{"use strict";Sr.exports=br;function br(e,r,t){e instanceof RegExp&&(e=_r(e,t)),r instanceof RegExp&&(r=_r(r,t));var i=wr(e,r,t);return i&&{start:i[0],end:i[1],pre:t.slice(0,i[0]),body:t.slice(i[0]+e.length,i[1]),post:t.slice(i[1]+r.length)}}function _r(e,r){var t=r.match(e);return t?t[0]:null}br.range=wr;function wr(e,r,t){var i,n,a,s,c,o=t.indexOf(e),u=t.indexOf(r,o+1),h=o;if(o>=0&&u>0){if(e===r)return[o,u];for(i=[],a=t.length;h>=0&&!c;)h==o?(i.push(h),o=t.indexOf(e,h+1)):i.length==1?c=[i.pop(),u]:(n=i.pop(),n<a&&(a=n,s=u),u=t.indexOf(r,h+1)),h=o<u&&o>=0?o:u;i.length&&(c=[a,s])}return c}});var Dr=O((wn,Rr)=>{var Kt=Er(),kr=Or();Rr.exports=ei;var Ar="\0SLASH"+Math.random()+"\0",Nr="\0OPEN"+Math.random()+"\0",Re="\0CLOSE"+Math.random()+"\0",jr="\0COMMA"+Math.random()+"\0",Tr="\0PERIOD"+Math.random()+"\0";function Ie(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function Vt(e){return e.split("\\\\").join(Ar).split("\\{").join(Nr).split("\\}").join(Re).split("\\,").join(jr).split("\\.").join(Tr)}function Jt(e){return e.split(Ar).join("\\").split(Nr).join("{").split(Re).join("}").split(jr).join(",").split(Tr).join(".")}function Ir(e){if(!e)return[""];var r=[],t=kr("{","}",e);if(!t)return e.split(",");var i=t.pre,n=t.body,a=t.post,s=i.split(",");s[s.length-1]+="{"+n+"}";var c=Ir(a);return a.length&&(s[s.length-1]+=c.shift(),s.push.apply(s,c)),r.push.apply(r,s),r}function ei(e){return e?(e.substr(0,2)==="{}"&&(e="\\{\\}"+e.substr(2)),Z(Vt(e),!0).map(Jt)):[]}function ri(e){return"{"+e+"}"}function ti(e){return/^-?0\d/.test(e)}function ii(e,r){return e<=r}function ni(e,r){return e>=r}function Z(e,r){var t=[],i=kr("{","}",e);if(!i||/\$$/.test(i.pre))return[e];var n=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),a=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),s=n||a,c=i.body.indexOf(",")>=0;if(!s&&!c)return i.post.match(/,.*\}/)?(e=i.pre+"{"+i.body+Re+i.post,Z(e)):[e];var o;if(s)o=i.body.split(/\.\./);else if(o=Ir(i.body),o.length===1&&(o=Z(o[0],!1).map(ri),o.length===1)){var h=i.post.length?Z(i.post,!1):[""];return h.map(function(be){return i.pre+o[0]+be})}var u=i.pre,h=i.post.length?Z(i.post,!1):[""],v;if(s){var l=Ie(o[0]),f=Ie(o[1]),d=Math.max(o[0].length,o[1].length),m=o.length==3?Math.abs(Ie(o[2])):1,g=ii,y=f<l;y&&(m*=-1,g=ni);var _=o.some(ti);v=[];for(var N=l;g(N,f);N+=m){var S;if(a)S=String.fromCharCode(N),S==="\\"&&(S="");else if(S=String(N),_){var D=d-S.length;if(D>0){var ue=new Array(D+1).join("0");N<0?S="-"+ue+S.slice(1):S=ue+S}}v.push(S)}}else v=Kt(o,function(le){return Z(le,!1)});for(var Y=0;Y<v.length;Y++)for(var W=0;W<h.length;W++){var q=u+v[Y]+h[W];(!r||s||q)&&t.push(q)}return t}});var de=O((Sn,xr)=>{xr.exports=T;T.Minimatch=A;var ie=function(){try{return b("path")}catch{}}()||{sep:"/"};T.sep=ie.sep;var qe=T.GLOBSTAR=A.GLOBSTAR={},ai=Dr(),Cr={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},De="[^/]",Ce=De+"*?",si="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",oi="(?:(?!(?:\\/|^)\\.).)*?",qr=ci("().*{}+?[]^$\\!");function ci(e){return e.split("").reduce(function(r,t){return r[t]=!0,r},{})}var Mr=/\/+/;T.filter=ui;function ui(e,r){return r=r||{},function(t,i,n){return T(t,e,r)}}function F(e,r){r=r||{};var t={};return Object.keys(e).forEach(function(i){t[i]=e[i]}),Object.keys(r).forEach(function(i){t[i]=r[i]}),t}T.defaults=function(e){if(!e||typeof e!="object"||!Object.keys(e).length)return T;var r=T,t=function(n,a,s){return r(n,a,F(e,s))};return t.Minimatch=function(n,a){return new r.Minimatch(n,F(e,a))},t.Minimatch.defaults=function(n){return r.defaults(F(e,n)).Minimatch},t.filter=function(n,a){return r.filter(n,F(e,a))},t.defaults=function(n){return r.defaults(F(e,n))},t.makeRe=function(n,a){return r.makeRe(n,F(e,a))},t.braceExpand=function(n,a){return r.braceExpand(n,F(e,a))},t.match=function(i,n,a){return r.match(i,n,F(e,a))},t};A.defaults=function(e){return T.defaults(e).Minimatch};function T(e,r,t){return fe(r),t||(t={}),!t.nocomment&&r.charAt(0)==="#"?!1:new A(r,t).match(e)}function A(e,r){if(!(this instanceof A))return new A(e,r);fe(e),r||(r={}),e=e.trim(),!r.allowWindowsEscape&&ie.sep!=="/"&&(e=e.split(ie.sep).join("/")),this.options=r,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.make()}A.prototype.debug=function(){};A.prototype.make=li;function li(){var e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();var t=this.globSet=this.braceExpand();r.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,t),t=this.globParts=t.map(function(i){return i.split(Mr)}),this.debug(this.pattern,t),t=t.map(function(i,n,a){return i.map(this.parse,this)},this),this.debug(this.pattern,t),t=t.filter(function(i){return i.indexOf(!1)===-1}),this.debug(this.pattern,t),this.set=t}A.prototype.parseNegate=hi;function hi(){var e=this.pattern,r=!1,t=this.options,i=0;if(!t.nonegate){for(var n=0,a=e.length;n<a&&e.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=e.substr(i)),this.negate=r}}T.braceExpand=function(e,r){return Lr(e,r)};A.prototype.braceExpand=Lr;function Lr(e,r){return r||(this instanceof A?r=this.options:r={}),e=typeof e>"u"?this.pattern:e,fe(e),r.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:ai(e)}var fi=1024*64,fe=function(e){if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>fi)throw new TypeError("pattern is too long")};A.prototype.parse=di;var he={};function di(e,r){fe(e);var t=this.options;if(e==="**")if(t.noglobstar)e="*";else return qe;if(e==="")return"";var i="",n=!!t.nocase,a=!1,s=[],c=[],o,u=!1,h=-1,v=-1,l=e.charAt(0)==="."?"":t.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",f=this;function d(){if(o){switch(o){case"*":i+=Ce,n=!0;break;case"?":i+=De,n=!0;break;default:i+="\\"+o;break}f.debug("clearStateChar %j %j",o,i),o=!1}}for(var m=0,g=e.length,y;m<g&&(y=e.charAt(m));m++){if(this.debug("%s %s %s %j",e,m,i,y),a&&qr[y]){i+="\\"+y,a=!1;continue}switch(y){case"/":return!1;case"\\":d(),a=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",e,m,i,y),u){this.debug(" in class"),y==="!"&&m===v+1&&(y="^"),i+=y;continue}f.debug("call clearStateChar %j",o),d(),o=y,t.noext&&d();continue;case"(":if(u){i+="(";continue}if(!o){i+="\\(";continue}s.push({type:o,start:m-1,reStart:i.length,open:Cr[o].open,close:Cr[o].close}),i+=o==="!"?"(?:(?!(?:":"(?:",this.debug("plType %j %j",o,i),o=!1;continue;case")":if(u||!s.length){i+="\\)";continue}d(),n=!0;var _=s.pop();i+=_.close,_.type==="!"&&c.push(_),_.reEnd=i.length;continue;case"|":if(u||!s.length||a){i+="\\|",a=!1;continue}d(),i+="|";continue;case"[":if(d(),u){i+="\\"+y;continue}u=!0,v=m,h=i.length,i+=y;continue;case"]":if(m===v+1||!u){i+="\\"+y,a=!1;continue}var N=e.substring(v+1,m);try{RegExp("["+N+"]")}catch{var S=this.parse(N,he);i=i.substr(0,h)+"\\["+S[0]+"\\]",n=n||S[1],u=!1;continue}n=!0,u=!1,i+=y;continue;default:d(),a?a=!1:qr[y]&&!(y==="^"&&u)&&(i+="\\"),i+=y}}for(u&&(N=e.substr(v+1),S=this.parse(N,he),i=i.substr(0,h)+"\\["+S[0],n=n||S[1]),_=s.pop();_;_=s.pop()){var D=i.slice(_.reStart+_.open.length);this.debug("setting tail",i,_),D=D.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(lr,hr,Oe){return Oe||(Oe="\\"),hr+hr+Oe+"|"}),this.debug(`tail=%j
%s`,D,D,_,i);var ue=_.type==="*"?Ce:_.type==="?"?De:"\\"+_.type;n=!0,i=i.slice(0,_.reStart)+ue+"\\("+D}d(),a&&(i+="\\\\");var Y=!1;switch(i.charAt(0)){case"[":case".":case"(":Y=!0}for(var W=c.length-1;W>-1;W--){var q=c[W],le=i.slice(0,q.reStart),be=i.slice(q.reStart,q.reEnd-8),cr=i.slice(q.reEnd-8,q.reEnd),re=i.slice(q.reEnd);cr+=re;var qt=le.split("(").length-1,we=re;for(m=0;m<qt;m++)we=we.replace(/\)[+*?]?/,"");re=we;var ur="";re===""&&r!==he&&(ur="$");var Mt=le+be+re+ur+cr;i=Mt}if(i!==""&&n&&(i="(?=.)"+i),Y&&(i=l+i),r===he)return[i,n];if(!n)return mi(e);var Lt=t.nocase?"i":"";try{var Se=new RegExp("^"+i+"$",Lt)}catch{return new RegExp("$.")}return Se._glob=e,Se._src=i,Se}T.makeRe=function(e,r){return new A(e,r||{}).makeRe()};A.prototype.makeRe=vi;function vi(){if(this.regexp||this.regexp===!1)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var r=this.options,t=r.noglobstar?Ce:r.dot?si:oi,i=r.nocase?"i":"",n=e.map(function(a){return a.map(function(s){return s===qe?t:typeof s=="string"?gi(s):s._src}).join("\\/")}).join("|");n="^(?:"+n+")$",this.negate&&(n="^(?!"+n+").*$");try{this.regexp=new RegExp(n,i)}catch{this.regexp=!1}return this.regexp}T.match=function(e,r,t){t=t||{};var i=new A(r,t);return e=e.filter(function(n){return i.match(n)}),i.options.nonull&&!e.length&&e.push(r),e};A.prototype.match=function(r,t){if(typeof t>"u"&&(t=this.partial),this.debug("match",r,this.pattern),this.comment)return!1;if(this.empty)return r==="";if(r==="/"&&t)return!0;var i=this.options;ie.sep!=="/"&&(r=r.split(ie.sep).join("/")),r=r.split(Mr),this.debug(this.pattern,"split",r);var n=this.set;this.debug(this.pattern,"set",n);var a,s;for(s=r.length-1;s>=0&&(a=r[s],!a);s--);for(s=0;s<n.length;s++){var c=n[s],o=r;i.matchBase&&c.length===1&&(o=[a]);var u=this.matchOne(o,c,t);if(u)return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate};A.prototype.matchOne=function(e,r,t){var i=this.options;this.debug("matchOne",{this:this,file:e,pattern:r}),this.debug("matchOne",e.length,r.length);for(var n=0,a=0,s=e.length,c=r.length;n<s&&a<c;n++,a++){this.debug("matchOne loop");var o=r[a],u=e[n];if(this.debug(r,o,u),o===!1)return!1;if(o===qe){this.debug("GLOBSTAR",[r,o,u]);var h=n,v=a+1;if(v===c){for(this.debug("** at the end");n<s;n++)if(e[n]==="."||e[n]===".."||!i.dot&&e[n].charAt(0)===".")return!1;return!0}for(;h<s;){var l=e[h];if(this.debug(`
globstar while`,e,h,r,v,l),this.matchOne(e.slice(h),r.slice(v),t))return this.debug("globstar found match!",h,s,l),!0;if(l==="."||l===".."||!i.dot&&l.charAt(0)==="."){this.debug("dot detected!",e,h,r,v);break}this.debug("globstar swallow a segment, and continue"),h++}return!!(t&&(this.debug(`
>>> no match, partial?`,e,h,r,v),h===s))}var f;if(typeof o=="string"?(f=u===o,this.debug("string match",o,u,f)):(f=u.match(o),this.debug("pattern match",o,u,f)),!f)return!1}if(n===s&&a===c)return!0;if(n===s)return t;if(a===c)return n===s-1&&e[n]==="";throw new Error("wtf?")};function mi(e){return e.replace(/\\(.)/g,"$1")}function gi(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var Gr=O((On,Me)=>{typeof Object.create=="function"?Me.exports=function(r,t){t&&(r.super_=t,r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:Me.exports=function(r,t){if(t){r.super_=t;var i=function(){};i.prototype=t.prototype,r.prototype=new i,r.prototype.constructor=r}}});var Pr=O((kn,xe)=>{try{if(Le=b("util"),typeof Le.inherits!="function")throw"";xe.exports=Le.inherits}catch{xe.exports=Gr()}var Le});var me=O((An,ve)=>{"use strict";function Fr(e){return e.charAt(0)==="/"}function $r(e){var r=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,t=r.exec(e),i=t[1]||"",n=!!(i&&i.charAt(1)!==":");return!!(t[2]||n)}ve.exports=process.platform==="win32"?$r:Fr;ve.exports.posix=Fr;ve.exports.win32=$r});var Pe=O($=>{$.setopts=wi;$.ownProp=Br;$.makeAbs=ne;$.finish=Si;$.mark=Oi;$.isIgnored=Xr;$.childrenIgnored=ki;function Br(e,r){return Object.prototype.hasOwnProperty.call(e,r)}var pi=b("fs"),K=b("path"),yi=de(),Wr=me(),Ge=yi.Minimatch;function Ei(e,r){return e.localeCompare(r,"en")}function _i(e,r){e.ignore=r.ignore||[],Array.isArray(e.ignore)||(e.ignore=[e.ignore]),e.ignore.length&&(e.ignore=e.ignore.map(bi))}function bi(e){var r=null;if(e.slice(-3)==="/**"){var t=e.replace(/(\/\*\*)+$/,"");r=new Ge(t,{dot:!0})}return{matcher:new Ge(e,{dot:!0}),gmatcher:r}}function wi(e,r,t){if(t||(t={}),t.matchBase&&r.indexOf("/")===-1){if(t.noglobstar)throw new Error("base matching requires globstar");r="**/"+r}e.silent=!!t.silent,e.pattern=r,e.strict=t.strict!==!1,e.realpath=!!t.realpath,e.realpathCache=t.realpathCache||Object.create(null),e.follow=!!t.follow,e.dot=!!t.dot,e.mark=!!t.mark,e.nodir=!!t.nodir,e.nodir&&(e.mark=!0),e.sync=!!t.sync,e.nounique=!!t.nounique,e.nonull=!!t.nonull,e.nosort=!!t.nosort,e.nocase=!!t.nocase,e.stat=!!t.stat,e.noprocess=!!t.noprocess,e.absolute=!!t.absolute,e.fs=t.fs||pi,e.maxLength=t.maxLength||1/0,e.cache=t.cache||Object.create(null),e.statCache=t.statCache||Object.create(null),e.symlinks=t.symlinks||Object.create(null),_i(e,t),e.changedCwd=!1;var i=process.cwd();Br(t,"cwd")?(e.cwd=K.resolve(t.cwd),e.changedCwd=e.cwd!==i):e.cwd=i,e.root=t.root||K.resolve(e.cwd,"/"),e.root=K.resolve(e.root),process.platform==="win32"&&(e.root=e.root.replace(/\\/g,"/")),e.cwdAbs=Wr(e.cwd)?e.cwd:ne(e,e.cwd),process.platform==="win32"&&(e.cwdAbs=e.cwdAbs.replace(/\\/g,"/")),e.nomount=!!t.nomount,t.nonegate=!0,t.nocomment=!0,t.allowWindowsEscape=!1,e.minimatch=new Ge(r,t),e.options=e.minimatch.options}function Si(e){for(var r=e.nounique,t=r?[]:Object.create(null),i=0,n=e.matches.length;i<n;i++){var a=e.matches[i];if(!a||Object.keys(a).length===0){if(e.nonull){var s=e.minimatch.globSet[i];r?t.push(s):t[s]=!0}}else{var c=Object.keys(a);r?t.push.apply(t,c):c.forEach(function(o){t[o]=!0})}}if(r||(t=Object.keys(t)),e.nosort||(t=t.sort(Ei)),e.mark){for(var i=0;i<t.length;i++)t[i]=e._mark(t[i]);e.nodir&&(t=t.filter(function(o){var u=!/\/$/.test(o),h=e.cache[o]||e.cache[ne(e,o)];return u&&h&&(u=h!=="DIR"&&!Array.isArray(h)),u}))}e.ignore.length&&(t=t.filter(function(o){return!Xr(e,o)})),e.found=t}function Oi(e,r){var t=ne(e,r),i=e.cache[t],n=r;if(i){var a=i==="DIR"||Array.isArray(i),s=r.slice(-1)==="/";if(a&&!s?n+="/":!a&&s&&(n=n.slice(0,-1)),n!==r){var c=ne(e,n);e.statCache[c]=e.statCache[t],e.cache[c]=e.cache[t]}}return n}function ne(e,r){var t=r;return r.charAt(0)==="/"?t=K.join(e.root,r):Wr(r)||r===""?t=r:e.changedCwd?t=K.resolve(e.cwd,r):t=K.resolve(r),process.platform==="win32"&&(t=t.replace(/\\/g,"/")),t}function Xr(e,r){return e.ignore.length?e.ignore.some(function(t){return t.matcher.match(r)||!!(t.gmatcher&&t.gmatcher.match(r))}):!1}function ki(e,r){return e.ignore.length?e.ignore.some(function(t){return!!(t.gmatcher&&t.gmatcher.match(r))}):!1}});var Hr=O((Rn,Yr)=>{Yr.exports=zr;zr.GlobSync=w;var Ai=Te(),Ur=de(),jn=Ur.Minimatch,Tn=Be().Glob,In=b("util"),Fe=b("path"),Qr=b("assert"),ge=me(),U=Pe(),Ni=U.setopts,$e=U.ownProp,ji=U.childrenIgnored,Ti=U.isIgnored;function zr(e,r){if(typeof r=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
See: https://github.com/isaacs/node-glob/issues/167`);return new w(e,r).found}function w(e,r){if(!e)throw new Error("must provide pattern");if(typeof r=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof w))return new w(e,r);if(Ni(this,e,r),this.noprocess)return this;var t=this.minimatch.set.length;this.matches=new Array(t);for(var i=0;i<t;i++)this._process(this.minimatch.set[i],i,!1);this._finish()}w.prototype._finish=function(){if(Qr.ok(this instanceof w),this.realpath){var e=this;this.matches.forEach(function(r,t){var i=e.matches[t]=Object.create(null);for(var n in r)try{n=e._makeAbs(n);var a=Ai.realpathSync(n,e.realpathCache);i[a]=!0}catch(s){if(s.syscall==="stat")i[e._makeAbs(n)]=!0;else throw s}})}U.finish(this)};w.prototype._process=function(e,r,t){Qr.ok(this instanceof w);for(var i=0;typeof e[i]=="string";)i++;var n;switch(i){case e.length:this._processSimple(e.join("/"),r);return;case 0:n=null;break;default:n=e.slice(0,i).join("/");break}var a=e.slice(i),s;n===null?s=".":((ge(n)||ge(e.map(function(u){return typeof u=="string"?u:"[*]"}).join("/")))&&(!n||!ge(n))&&(n="/"+n),s=n);var c=this._makeAbs(s);if(!ji(this,s)){var o=a[0]===Ur.GLOBSTAR;o?this._processGlobStar(n,s,c,a,r,t):this._processReaddir(n,s,c,a,r,t)}};w.prototype._processReaddir=function(e,r,t,i,n,a){var s=this._readdir(t,a);if(s){for(var c=i[0],o=!!this.minimatch.negate,u=c._glob,h=this.dot||u.charAt(0)===".",v=[],l=0;l<s.length;l++){var f=s[l];if(f.charAt(0)!=="."||h){var d;o&&!e?d=!f.match(c):d=f.match(c),d&&v.push(f)}}var m=v.length;if(m!==0){if(i.length===1&&!this.mark&&!this.stat){this.matches[n]||(this.matches[n]=Object.create(null));for(var l=0;l<m;l++){var f=v[l];e&&(e.slice(-1)!=="/"?f=e+"/"+f:f=e+f),f.charAt(0)==="/"&&!this.nomount&&(f=Fe.join(this.root,f)),this._emitMatch(n,f)}return}i.shift();for(var l=0;l<m;l++){var f=v[l],g;e?g=[e,f]:g=[f],this._process(g.concat(i),n,a)}}}};w.prototype._emitMatch=function(e,r){if(!Ti(this,r)){var t=this._makeAbs(r);if(this.mark&&(r=this._mark(r)),this.absolute&&(r=t),!this.matches[e][r]){if(this.nodir){var i=this.cache[t];if(i==="DIR"||Array.isArray(i))return}this.matches[e][r]=!0,this.stat&&this._stat(r)}}};w.prototype._readdirInGlobStar=function(e){if(this.follow)return this._readdir(e,!1);var r,t,i;try{t=this.fs.lstatSync(e)}catch(a){if(a.code==="ENOENT")return null}var n=t&&t.isSymbolicLink();return this.symlinks[e]=n,!n&&t&&!t.isDirectory()?this.cache[e]="FILE":r=this._readdir(e,!1),r};w.prototype._readdir=function(e,r){var t;if(r&&!$e(this.symlinks,e))return this._readdirInGlobStar(e);if($e(this.cache,e)){var i=this.cache[e];if(!i||i==="FILE")return null;if(Array.isArray(i))return i}try{return this._readdirEntries(e,this.fs.readdirSync(e))}catch(n){return this._readdirError(e,n),null}};w.prototype._readdirEntries=function(e,r){if(!this.mark&&!this.stat)for(var t=0;t<r.length;t++){var i=r[t];e==="/"?i=e+i:i=e+"/"+i,this.cache[i]=!0}return this.cache[e]=r,r};w.prototype._readdirError=function(e,r){switch(r.code){case"ENOTSUP":case"ENOTDIR":var t=this._makeAbs(e);if(this.cache[t]="FILE",t===this.cwdAbs){var i=new Error(r.code+" invalid cwd "+this.cwd);throw i.path=this.cwd,i.code=r.code,i}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=!1;break;default:if(this.cache[this._makeAbs(e)]=!1,this.strict)throw r;this.silent||console.error("glob error",r);break}};w.prototype._processGlobStar=function(e,r,t,i,n,a){var s=this._readdir(t,a);if(s){var c=i.slice(1),o=e?[e]:[],u=o.concat(c);this._process(u,n,!1);var h=s.length,v=this.symlinks[t];if(!(v&&a))for(var l=0;l<h;l++){var f=s[l];if(!(f.charAt(0)==="."&&!this.dot)){var d=o.concat(s[l],c);this._process(d,n,!0);var m=o.concat(s[l],i);this._process(m,n,!0)}}}};w.prototype._processSimple=function(e,r){var t=this._stat(e);if(this.matches[r]||(this.matches[r]=Object.create(null)),!!t){if(e&&ge(e)&&!this.nomount){var i=/[\/\\]$/.test(e);e.charAt(0)==="/"?e=Fe.join(this.root,e):(e=Fe.resolve(this.root,e),i&&(e+="/"))}process.platform==="win32"&&(e=e.replace(/\\/g,"/")),this._emitMatch(r,e)}};w.prototype._stat=function(e){var r=this._makeAbs(e),t=e.slice(-1)==="/";if(e.length>this.maxLength)return!1;if(!this.stat&&$e(this.cache,r)){var s=this.cache[r];if(Array.isArray(s)&&(s="DIR"),!t||s==="DIR")return s;if(t&&s==="FILE")return!1}var i,n=this.statCache[r];if(!n){var a;try{a=this.fs.lstatSync(r)}catch(c){if(c&&(c.code==="ENOENT"||c.code==="ENOTDIR"))return this.statCache[r]=!1,!1}if(a&&a.isSymbolicLink())try{n=this.fs.statSync(r)}catch{n=a}else n=a}this.statCache[r]=n;var s=!0;return n&&(s=n.isDirectory()?"DIR":"FILE"),this.cache[r]=this.cache[r]||s,t&&s==="FILE"?!1:s};w.prototype._mark=function(e){return U.mark(this,e)};w.prototype._makeAbs=function(e){return U.makeAbs(this,e)}});var We=O((Dn,Kr)=>{Kr.exports=Zr;function Zr(e,r){if(e&&r)return Zr(e)(r);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(i){t[i]=e[i]}),t;function t(){for(var i=new Array(arguments.length),n=0;n<i.length;n++)i[n]=arguments[n];var a=e.apply(this,i),s=i[i.length-1];return typeof a=="function"&&a!==s&&Object.keys(s).forEach(function(c){a[c]=s[c]}),a}}});var Ue=O((Cn,Xe)=>{var Vr=We();Xe.exports=Vr(pe);Xe.exports.strict=Vr(Jr);pe.proto=pe(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return pe(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return Jr(this)},configurable:!0})});function pe(e){var r=function(){return r.called?r.value:(r.called=!0,r.value=e.apply(this,arguments))};return r.called=!1,r}function Jr(e){var r=function(){if(r.called)throw new Error(r.onceError);return r.called=!0,r.value=e.apply(this,arguments)},t=e.name||"Function wrapped with `once`";return r.onceError=t+" shouldn't be called more than once",r.called=!1,r}});var rt=O((qn,et)=>{var Ii=We(),ae=Object.create(null),Ri=Ue();et.exports=Ii(Di);function Di(e,r){return ae[e]?(ae[e].push(r),null):(ae[e]=[r],Ci(e))}function Ci(e){return Ri(function r(){var t=ae[e],i=t.length,n=qi(arguments);try{for(var a=0;a<i;a++)t[a].apply(null,n)}finally{t.length>i?(t.splice(0,i),process.nextTick(function(){r.apply(null,n)})):delete ae[e]}})}function qi(e){for(var r=e.length,t=[],i=0;i<r;i++)t[i]=e[i];return t}});var Be=O((xn,it)=>{it.exports=Q;var Mi=Te(),tt=de(),Mn=tt.Minimatch,Li=Pr(),xi=b("events").EventEmitter,Qe=b("path"),ze=b("assert"),se=me(),He=Hr(),z=Pe(),Gi=z.setopts,Ye=z.ownProp,Ze=rt(),Ln=b("util"),Pi=z.childrenIgnored,Fi=z.isIgnored,$i=Ue();function Q(e,r,t){if(typeof r=="function"&&(t=r,r={}),r||(r={}),r.sync){if(t)throw new TypeError("callback provided to sync glob");return He(e,r)}return new p(e,r,t)}Q.sync=He;var Bi=Q.GlobSync=He.GlobSync;Q.glob=Q;function Wi(e,r){if(r===null||typeof r!="object")return e;for(var t=Object.keys(r),i=t.length;i--;)e[t[i]]=r[t[i]];return e}Q.hasMagic=function(e,r){var t=Wi({},r);t.noprocess=!0;var i=new p(e,t),n=i.minimatch.set;if(!e)return!1;if(n.length>1)return!0;for(var a=0;a<n[0].length;a++)if(typeof n[0][a]!="string")return!0;return!1};Q.Glob=p;Li(p,xi);function p(e,r,t){if(typeof r=="function"&&(t=r,r=null),r&&r.sync){if(t)throw new TypeError("callback provided to sync glob");return new Bi(e,r)}if(!(this instanceof p))return new p(e,r,t);Gi(this,e,r),this._didRealPath=!1;var i=this.minimatch.set.length;this.matches=new Array(i),typeof t=="function"&&(t=$i(t),this.on("error",t),this.on("end",function(o){t(null,o)}));var n=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(i===0)return c();for(var a=!0,s=0;s<i;s++)this._process(this.minimatch.set[s],s,!1,c);a=!1;function c(){--n._processing,n._processing<=0&&(a?process.nextTick(function(){n._finish()}):n._finish())}}p.prototype._finish=function(){if(ze(this instanceof p),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();z.finish(this),this.emit("end",this.found)}};p.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=!0;var e=this.matches.length;if(e===0)return this._finish();for(var r=this,t=0;t<this.matches.length;t++)this._realpathSet(t,i);function i(){--e===0&&r._finish()}};p.prototype._realpathSet=function(e,r){var t=this.matches[e];if(!t)return r();var i=Object.keys(t),n=this,a=i.length;if(a===0)return r();var s=this.matches[e]=Object.create(null);i.forEach(function(c,o){c=n._makeAbs(c),Mi.realpath(c,n.realpathCache,function(u,h){u?u.syscall==="stat"?s[c]=!0:n.emit("error",u):s[h]=!0,--a===0&&(n.matches[e]=s,r())})})};p.prototype._mark=function(e){return z.mark(this,e)};p.prototype._makeAbs=function(e){return z.makeAbs(this,e)};p.prototype.abort=function(){this.aborted=!0,this.emit("abort")};p.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))};p.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var e=this._emitQueue.slice(0);this._emitQueue.length=0;for(var r=0;r<e.length;r++){var t=e[r];this._emitMatch(t[0],t[1])}}if(this._processQueue.length){var i=this._processQueue.slice(0);this._processQueue.length=0;for(var r=0;r<i.length;r++){var n=i[r];this._processing--,this._process(n[0],n[1],n[2],n[3])}}}};p.prototype._process=function(e,r,t,i){if(ze(this instanceof p),ze(typeof i=="function"),!this.aborted){if(this._processing++,this.paused){this._processQueue.push([e,r,t,i]);return}for(var n=0;typeof e[n]=="string";)n++;var a;switch(n){case e.length:this._processSimple(e.join("/"),r,i);return;case 0:a=null;break;default:a=e.slice(0,n).join("/");break}var s=e.slice(n),c;a===null?c=".":((se(a)||se(e.map(function(h){return typeof h=="string"?h:"[*]"}).join("/")))&&(!a||!se(a))&&(a="/"+a),c=a);var o=this._makeAbs(c);if(Pi(this,c))return i();var u=s[0]===tt.GLOBSTAR;u?this._processGlobStar(a,c,o,s,r,t,i):this._processReaddir(a,c,o,s,r,t,i)}};p.prototype._processReaddir=function(e,r,t,i,n,a,s){var c=this;this._readdir(t,a,function(o,u){return c._processReaddir2(e,r,t,i,n,a,u,s)})};p.prototype._processReaddir2=function(e,r,t,i,n,a,s,c){if(!s)return c();for(var o=i[0],u=!!this.minimatch.negate,h=o._glob,v=this.dot||h.charAt(0)===".",l=[],f=0;f<s.length;f++){var d=s[f];if(d.charAt(0)!=="."||v){var m;u&&!e?m=!d.match(o):m=d.match(o),m&&l.push(d)}}var g=l.length;if(g===0)return c();if(i.length===1&&!this.mark&&!this.stat){this.matches[n]||(this.matches[n]=Object.create(null));for(var f=0;f<g;f++){var d=l[f];e&&(e!=="/"?d=e+"/"+d:d=e+d),d.charAt(0)==="/"&&!this.nomount&&(d=Qe.join(this.root,d)),this._emitMatch(n,d)}return c()}i.shift();for(var f=0;f<g;f++){var d=l[f],y;e&&(e!=="/"?d=e+"/"+d:d=e+d),this._process([d].concat(i),n,a,c)}c()};p.prototype._emitMatch=function(e,r){if(!this.aborted&&!Fi(this,r)){if(this.paused){this._emitQueue.push([e,r]);return}var t=se(r)?r:this._makeAbs(r);if(this.mark&&(r=this._mark(r)),this.absolute&&(r=t),!this.matches[e][r]){if(this.nodir){var i=this.cache[t];if(i==="DIR"||Array.isArray(i))return}this.matches[e][r]=!0;var n=this.statCache[t];n&&this.emit("stat",r,n),this.emit("match",r)}}};p.prototype._readdirInGlobStar=function(e,r){if(this.aborted)return;if(this.follow)return this._readdir(e,!1,r);var t="lstat\0"+e,i=this,n=Ze(t,a);n&&i.fs.lstat(e,n);function a(s,c){if(s&&s.code==="ENOENT")return r();var o=c&&c.isSymbolicLink();i.symlinks[e]=o,!o&&c&&!c.isDirectory()?(i.cache[e]="FILE",r()):i._readdir(e,!1,r)}};p.prototype._readdir=function(e,r,t){if(!this.aborted&&(t=Ze("readdir\0"+e+"\0"+r,t),!!t)){if(r&&!Ye(this.symlinks,e))return this._readdirInGlobStar(e,t);if(Ye(this.cache,e)){var i=this.cache[e];if(!i||i==="FILE")return t();if(Array.isArray(i))return t(null,i)}var n=this;n.fs.readdir(e,Xi(this,e,t))}};function Xi(e,r,t){return function(i,n){i?e._readdirError(r,i,t):e._readdirEntries(r,n,t)}}p.prototype._readdirEntries=function(e,r,t){if(!this.aborted){if(!this.mark&&!this.stat)for(var i=0;i<r.length;i++){var n=r[i];e==="/"?n=e+n:n=e+"/"+n,this.cache[n]=!0}return this.cache[e]=r,t(null,r)}};p.prototype._readdirError=function(e,r,t){if(!this.aborted){switch(r.code){case"ENOTSUP":case"ENOTDIR":var i=this._makeAbs(e);if(this.cache[i]="FILE",i===this.cwdAbs){var n=new Error(r.code+" invalid cwd "+this.cwd);n.path=this.cwd,n.code=r.code,this.emit("error",n),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=!1;break;default:this.cache[this._makeAbs(e)]=!1,this.strict&&(this.emit("error",r),this.abort()),this.silent||console.error("glob error",r);break}return t()}};p.prototype._processGlobStar=function(e,r,t,i,n,a,s){var c=this;this._readdir(t,a,function(o,u){c._processGlobStar2(e,r,t,i,n,a,u,s)})};p.prototype._processGlobStar2=function(e,r,t,i,n,a,s,c){if(!s)return c();var o=i.slice(1),u=e?[e]:[],h=u.concat(o);this._process(h,n,!1,c);var v=this.symlinks[t],l=s.length;if(v&&a)return c();for(var f=0;f<l;f++){var d=s[f];if(!(d.charAt(0)==="."&&!this.dot)){var m=u.concat(s[f],o);this._process(m,n,!0,c);var g=u.concat(s[f],i);this._process(g,n,!0,c)}}c()};p.prototype._processSimple=function(e,r,t){var i=this;this._stat(e,function(n,a){i._processSimple2(e,r,n,a,t)})};p.prototype._processSimple2=function(e,r,t,i,n){if(this.matches[r]||(this.matches[r]=Object.create(null)),!i)return n();if(e&&se(e)&&!this.nomount){var a=/[\/\\]$/.test(e);e.charAt(0)==="/"?e=Qe.join(this.root,e):(e=Qe.resolve(this.root,e),a&&(e+="/"))}process.platform==="win32"&&(e=e.replace(/\\/g,"/")),this._emitMatch(r,e),n()};p.prototype._stat=function(e,r){var t=this._makeAbs(e),i=e.slice(-1)==="/";if(e.length>this.maxLength)return r();if(!this.stat&&Ye(this.cache,t)){var n=this.cache[t];if(Array.isArray(n)&&(n="DIR"),!i||n==="DIR")return r(null,n);if(i&&n==="FILE")return r()}var a,s=this.statCache[t];if(s!==void 0){if(s===!1)return r(null,s);var c=s.isDirectory()?"DIR":"FILE";return i&&c==="FILE"?r():r(null,c,s)}var o=this,u=Ze("stat\0"+t,h);u&&o.fs.lstat(t,u);function h(v,l){if(l&&l.isSymbolicLink())return o.fs.stat(t,function(f,d){f?o._stat2(e,t,null,l,r):o._stat2(e,t,f,d,r)});o._stat2(e,t,v,l,r)}};p.prototype._stat2=function(e,r,t,i,n){if(t&&(t.code==="ENOENT"||t.code==="ENOTDIR"))return this.statCache[r]=!1,n();var a=e.slice(-1)==="/";if(this.statCache[r]=i,r.slice(-1)==="/"&&i&&!i.isDirectory())return n(null,!1,i);var s=!0;return i&&(s=i.isDirectory()?"DIR":"FILE"),this.cache[r]=this.cache[r]||s,a&&s==="FILE"?n():n(null,s,i)}});var ht=O((Gn,lt)=>{var E=b("assert"),ot=b("path"),nt=b("fs"),V;try{V=Be()}catch{}var Ui={nosort:!0,silent:!0},Ke=0,oe=process.platform==="win32",ct=e=>{if(["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(t=>{e[t]=e[t]||nt[t],t=t+"Sync",e[t]=e[t]||nt[t]}),e.maxBusyTries=e.maxBusyTries||3,e.emfileWait=e.emfileWait||1e3,e.glob===!1&&(e.disableGlob=!0),e.disableGlob!==!0&&V===void 0)throw Error("glob dependency not found, set `options.disableGlob = true` if intentional");e.disableGlob=e.disableGlob||!1,e.glob=e.glob||Ui},Je=(e,r,t)=>{typeof r=="function"&&(t=r,r={}),E(e,"rimraf: missing path"),E.equal(typeof e,"string","rimraf: path should be a string"),E.equal(typeof t,"function","rimraf: callback function required"),E(r,"rimraf: invalid options argument provided"),E.equal(typeof r,"object","rimraf: options should be object"),ct(r);let i=0,n=null,a=0,s=o=>{n=n||o,--a===0&&t(n)},c=(o,u)=>{if(o)return t(o);if(a=u.length,a===0)return t();u.forEach(h=>{let v=l=>{if(l){if((l.code==="EBUSY"||l.code==="ENOTEMPTY"||l.code==="EPERM")&&i<r.maxBusyTries)return i++,setTimeout(()=>Ve(h,r,v),i*100);if(l.code==="EMFILE"&&Ke<r.emfileWait)return setTimeout(()=>Ve(h,r,v),Ke++);l.code==="ENOENT"&&(l=null)}Ke=0,s(l)};Ve(h,r,v)})};if(r.disableGlob||!V.hasMagic(e))return c(null,[e]);r.lstat(e,(o,u)=>{if(!o)return c(null,[e]);V(e,r.glob,c)})},Ve=(e,r,t)=>{E(e),E(r),E(typeof t=="function"),r.lstat(e,(i,n)=>{if(i&&i.code==="ENOENT")return t(null);if(i&&i.code==="EPERM"&&oe&&at(e,r,i,t),n&&n.isDirectory())return ye(e,r,i,t);r.unlink(e,a=>{if(a){if(a.code==="ENOENT")return t(null);if(a.code==="EPERM")return oe?at(e,r,a,t):ye(e,r,a,t);if(a.code==="EISDIR")return ye(e,r,a,t)}return t(a)})})},at=(e,r,t,i)=>{E(e),E(r),E(typeof i=="function"),r.chmod(e,438,n=>{n?i(n.code==="ENOENT"?null:t):r.stat(e,(a,s)=>{a?i(a.code==="ENOENT"?null:t):s.isDirectory()?ye(e,r,t,i):r.unlink(e,i)})})},st=(e,r,t)=>{E(e),E(r);try{r.chmodSync(e,438)}catch(n){if(n.code==="ENOENT")return;throw t}let i;try{i=r.statSync(e)}catch(n){if(n.code==="ENOENT")return;throw t}i.isDirectory()?Ee(e,r,t):r.unlinkSync(e)},ye=(e,r,t,i)=>{E(e),E(r),E(typeof i=="function"),r.rmdir(e,n=>{n&&(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")?Qi(e,r,i):n&&n.code==="ENOTDIR"?i(t):i(n)})},Qi=(e,r,t)=>{E(e),E(r),E(typeof t=="function"),r.readdir(e,(i,n)=>{if(i)return t(i);let a=n.length;if(a===0)return r.rmdir(e,t);let s;n.forEach(c=>{Je(ot.join(e,c),r,o=>{if(!s){if(o)return t(s=o);--a===0&&r.rmdir(e,t)}})})})},ut=(e,r)=>{r=r||{},ct(r),E(e,"rimraf: missing path"),E.equal(typeof e,"string","rimraf: path should be a string"),E(r,"rimraf: missing options"),E.equal(typeof r,"object","rimraf: options should be object");let t;if(r.disableGlob||!V.hasMagic(e))t=[e];else try{r.lstatSync(e),t=[e]}catch{t=V.sync(e,r.glob)}if(t.length)for(let i=0;i<t.length;i++){let n=t[i],a;try{a=r.lstatSync(n)}catch(s){if(s.code==="ENOENT")return;s.code==="EPERM"&&oe&&st(n,r,s)}try{a&&a.isDirectory()?Ee(n,r,null):r.unlinkSync(n)}catch(s){if(s.code==="ENOENT")return;if(s.code==="EPERM")return oe?st(n,r,s):Ee(n,r,s);if(s.code!=="EISDIR")throw s;Ee(n,r,s)}}},Ee=(e,r,t)=>{E(e),E(r);try{r.rmdirSync(e)}catch(i){if(i.code==="ENOENT")return;if(i.code==="ENOTDIR")throw t;(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")&&zi(e,r)}},zi=(e,r)=>{E(e),E(r),r.readdirSync(e).forEach(n=>ut(ot.join(e,n),r));let t=oe?100:1,i=0;do{let n=!0;try{let a=r.rmdirSync(e,r);return n=!1,a}finally{if(++i<t&&n)continue}}while(!0)};lt.exports=Je;Je.sync=ut});var Tt=O((Pn,L)=>{var k=b("fs"),nr=b("os"),I=b("path"),ft=b("crypto"),C={fs:k.constants,os:nr.constants},mt=ht(),dt="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",gt=/XXXXXX/,Yi=3,pt=(C.O_CREAT||C.fs.O_CREAT)|(C.O_EXCL||C.fs.O_EXCL)|(C.O_RDWR||C.fs.O_RDWR),Hi=nr.platform()==="win32",Zi=C.EBADF||C.os.errno.EBADF,Ki=C.ENOENT||C.os.errno.ENOENT,yt=448,Et=384,Vi="exit",J=[],_t=k.rmdirSync.bind(k),bt=mt.sync,wt=!1;function ar(e,r){let t=ee(e,r),i=t[0],n=t[1];try{At(i)}catch(s){return n(s)}let a=i.tries;(function s(){try{let c=kt(i);k.stat(c,function(o){if(!o)return a-- >0?s():n(new Error("Could not get a unique tmp filename, max tries reached "+c));n(null,c)})}catch(c){n(c)}})()}function sr(e){let r=ee(e),t=r[0];At(t);let i=t.tries;do{let n=kt(t);try{k.statSync(n)}catch{return n}}while(i-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function Ji(e,r){let t=ee(e,r),i=t[0],n=t[1];ar(i,function(s,c){if(s)return n(s);k.open(c,pt,i.mode||Et,function(u,h){if(u)return n(u);if(i.discardDescriptor)return k.close(h,function(l){return n(l,c,void 0,rr(c,-1,i,!1))});{let v=i.discardDescriptor||i.detachDescriptor;n(null,c,h,rr(c,v?-1:h,i,!1))}})})}function en(e){let r=ee(e),t=r[0],i=t.discardDescriptor||t.detachDescriptor,n=sr(t);var a=k.openSync(n,pt,t.mode||Et);return t.discardDescriptor&&(k.closeSync(a),a=void 0),{name:n,fd:a,removeCallback:rr(n,i?-1:a,t,!0)}}function rn(e,r){let t=ee(e,r),i=t[0],n=t[1];ar(i,function(s,c){if(s)return n(s);k.mkdir(c,i.mode||yt,function(u){if(u)return n(u);n(null,c,St(c,i,!1))})})}function tn(e){let r=ee(e),t=r[0],i=sr(t);return k.mkdirSync(i,t.mode||yt),{name:i,removeCallback:St(i,t,!0)}}function nn(e,r){let t=function(i){if(i&&!ir(i))return r(i);r()};0<=e[0]?k.close(e[0],function(){k.unlink(e[1],t)}):k.unlink(e[1],t)}function an(e){let r=null;try{0<=e[0]&&k.closeSync(e[0])}catch(t){if(!on(t)&&!ir(t))throw t}finally{try{k.unlinkSync(e[1])}catch(t){ir(t)||(r=t)}}if(r!==null)throw r}function rr(e,r,t,i){let n=_e(an,[r,e],i),a=_e(nn,[r,e],i,n);return t.keep||J.unshift(n),i?n:a}function St(e,r,t){let i=r.unsafeCleanup?mt:k.rmdir.bind(k),n=r.unsafeCleanup?bt:_t,a=_e(n,e,t),s=_e(i,e,t,a);return r.keep||J.unshift(a),t?a:s}function _e(e,r,t,i){let n=!1;return function a(s){if(!n){let c=i||a,o=J.indexOf(c);return o>=0&&J.splice(o,1),n=!0,t||e===_t||e===bt?e(r):e(r,s||function(){})}}}function sn(){if(wt)for(;J.length;)try{J[0]()}catch{}}function vt(e){let r=[],t=null;try{t=ft.randomBytes(e)}catch{t=ft.pseudoRandomBytes(e)}for(var i=0;i<e;i++)r.push(dt[t[i]%dt.length]);return r.join("")}function Ot(e){return e===null||j(e)||!e.trim()}function j(e){return typeof e>"u"}function ee(e,r){if(typeof e=="function")return[{},e];if(j(e))return[{},r];let t={};for(let i of Object.getOwnPropertyNames(e))t[i]=e[i];return[t,r]}function kt(e){let r=e.tmpdir;if(!j(e.name))return I.join(r,e.dir,e.name);if(!j(e.template))return I.join(r,e.dir,e.template).replace(gt,vt(6));let t=[e.prefix?e.prefix:"tmp","-",process.pid,"-",vt(12),e.postfix?"-"+e.postfix:""].join("");return I.join(r,e.dir,t)}function At(e){e.tmpdir=jt(e);let r=e.tmpdir;if(j(e.name)||er(e.name,"name",r),j(e.dir)||er(e.dir,"dir",r),!j(e.template)&&(er(e.template,"template",r),!e.template.match(gt)))throw new Error(`Invalid template, found "${e.template}".`);if(!j(e.tries)&&isNaN(e.tries)||e.tries<0)throw new Error(`Invalid tries, found "${e.tries}".`);e.tries=j(e.name)?e.tries||Yi:1,e.keep=!!e.keep,e.detachDescriptor=!!e.detachDescriptor,e.discardDescriptor=!!e.discardDescriptor,e.unsafeCleanup=!!e.unsafeCleanup,e.dir=j(e.dir)?"":I.relative(r,tr(e.dir,r)),e.template=j(e.template)?void 0:I.relative(r,tr(e.template,r)),e.template=Ot(e.template)?void 0:I.relative(e.dir,e.template),e.name=j(e.name)?void 0:or(e.name),e.prefix=j(e.prefix)?"":e.prefix,e.postfix=j(e.postfix)?"":e.postfix}function tr(e,r){let t=or(e);return t.startsWith(r)?I.resolve(t):I.resolve(I.join(r,t))}function or(e){return Ot(e)?e:e.replace(/["']/g,"")}function er(e,r,t){if(r==="name"){if(I.isAbsolute(e))throw new Error(`${r} option must not contain an absolute path, found "${e}".`);let i=I.basename(e);if(i===".."||i==="."||i!==e)throw new Error(`${r} option must not contain a path, found "${e}".`)}else{if(I.isAbsolute(e)&&!e.startsWith(t))throw new Error(`${r} option must be relative to "${t}", found "${e}".`);let i=tr(e,t);if(!i.startsWith(t))throw new Error(`${r} option must be relative to "${t}", found "${i}".`)}}function on(e){return Nt(e,-Zi,"EBADF")}function ir(e){return Nt(e,-Ki,"ENOENT")}function Nt(e,r,t){return Hi?e.code===t:e.code===t&&e.errno===r}function cn(){wt=!0}function jt(e){return I.resolve(or(e&&e.tmpdir||nr.tmpdir()))}process.addListener(Vi,sn);Object.defineProperty(L.exports,"tmpdir",{enumerable:!0,configurable:!1,get:function(){return jt()}});L.exports.dir=rn;L.exports.dirSync=tn;L.exports.file=Ji;L.exports.fileSync=en;L.exports.tmpName=ar;L.exports.tmpNameSync=sr;L.exports.setGracefulCleanup=cn});var It=O((Fn,R)=>{"use strict";var{promisify:ce}=b("util"),B=Tt();R.exports.fileSync=B.fileSync;var un=ce((e,r)=>B.file(e,(t,i,n,a)=>t?r(t):r(void 0,{path:i,fd:n,cleanup:ce(a)})));R.exports.file=async e=>un(e);R.exports.withFile=async function(r,t){let{path:i,fd:n,cleanup:a}=await R.exports.file(t);try{return await r({path:i,fd:n})}finally{await a()}};R.exports.dirSync=B.dirSync;var ln=ce((e,r)=>B.dir(e,(t,i,n)=>t?r(t):r(void 0,{path:i,cleanup:ce(n)})));R.exports.dir=async e=>ln(e);R.exports.withDir=async function(r,t){let{path:i,cleanup:n}=await R.exports.dir(t);try{return await r({path:i})}finally{await n()}};R.exports.tmpNameSync=B.tmpNameSync;R.exports.tmpName=ce(B.tmpName);R.exports.tmpdir=B.tmpdir;R.exports.setGracefulCleanup=B.setGracefulCleanup});import hn from"child_process";import fn,{dirname as dn}from"path";import{fileURLToPath as vn}from"url";var Rt=Wt(It(),1);function Dt(e){return(0,Rt.tmpNameSync)({template:`ibmtelemetry-${e.replace(/[:.-]/g,"")}-XXXXXX.log`})}var mn=new Date().toISOString(),Ct=Dt(mn);console.log("Log file:",Ct);hn.spawn(process.argv0,[fn.join(dn(vn(import.meta.url)),"background-process.js"),`--log=${Ct}`,...process.argv.slice(2)],{stdio:"ignore",detached:!0,shell:!0}).unref();
/*! Bundled license information:
tmp/lib/tmp.js:
(*!
* Tmp
*
* Copyright (c) 2011-2017 KARASZI Istvan <github@spam.raszi.hu>
*
* MIT Licensed
*)
*/
var d=function(t,u,i,e){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function f(n){try{r(e.next(n))}catch(s){c(s)}}function l(n){try{r(e.throw(n))}catch(s){c(s)}}function r(n){n.done?o(n.value):a(n.value).then(f,l)}r((e=e.apply(t,u||[])).next())})},p;const v=16,h=parseInt((p=process.versions.node.split(".")[0])!==null&&p!==void 0?p:"0");h<16&&(console.log("Telemetry collection not supported in this environment. Skipping"),process.exit(0));function _(){return d(this,void 0,void 0,function*(){const{spawnBackgroundProcess:t}=yield import("./spawn-background-process.js");t()})}_().catch(t=>{console.error(t)});
{
"name": "@ibm/telemetry-js",
"description": "JavaScript telemetry tooling for open/inner source projects",
"version": "1.2.1",
"version": "1.3.0",
"license": "Apache-2.0",

@@ -30,18 +30,17 @@ "author": "IBM",

},
"engines": {
"node": ">=16",
"npm": ">=8"
},
"files": [
"dist/background-process.js",
"dist/collect.js"
"dist/collect.js",
"dist/spawn-background-process.js"
],
"scripts": {
"build": "tsc",
"build:watch": "tsc --watch",
"build": "npm run clean && npm run compile && npm run compile:collect && npm run bundle",
"bundle": "node esbuild.js",
"clean": "rimraf dist .test-coverage",
"compile": "tsc",
"compile:collect": "tsc --project ./tsconfig.collect.json",
"compile:watch": "tsc --watch",
"lint": "scripts/lint",
"lint:fix": "scripts/lint_and_fix",
"prepare": "husky install",
"prepare": "husky",
"test": "vitest run --coverage",

@@ -51,45 +50,45 @@ "test:watch": "vitest --coverage"

"devDependencies": {
"@commitlint/cli": "^17.8.1",
"@commitlint/config-conventional": "^17.8.1",
"@ibm/telemetry-attributes-js": "^2.1.0",
"@commitlint/cli": "^19.0.3",
"@commitlint/config-conventional": "^19.0.3",
"@ibm/telemetry-attributes-js": "^3.0.0",
"@ibm/telemetry-config-schema": "^0.3.0",
"@opentelemetry/api": "^1.7.0",
"@opentelemetry/exporter-metrics-otlp-http": "^0.47.0",
"@opentelemetry/resources": "^1.20.0",
"@opentelemetry/sdk-metrics": "^1.20.0",
"@opentelemetry/semantic-conventions": "^1.20.0",
"@opentelemetry/api": "^1.8.0",
"@opentelemetry/exporter-metrics-otlp-http": "^0.49.1",
"@opentelemetry/otlp-exporter-base": "^0.49.1",
"@opentelemetry/resources": "^1.22.0",
"@opentelemetry/sdk-metrics": "^1.22.0",
"@opentelemetry/semantic-conventions": "^1.22.0",
"@types/js-yaml": "^4.0.9",
"@types/lodash": "^4.14.202",
"@types/node": "^20.11.5",
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
"@types/node": "^20.11.25",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"@vitest/coverage-v8": "^0.34.6",
"ajv": "^8.12.0",
"ci-info": "^4.0.0",
"commander": "^11.1.0",
"esbuild": "^0.19.11",
"eslint": "^8.56.0",
"commander": "^12.0.0",
"esbuild": "^0.20.1",
"eslint": "^8.57.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsdoc": "^46.10.1",
"eslint-plugin-jsdoc": "^48.2.1",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-notice": "^0.9.10",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-vitest": "^0.3.20",
"husky": "^8.0.3",
"eslint-plugin-simple-import-sort": "^12.0.0",
"eslint-plugin-vitest": "^0.3.24",
"husky": "^9.0.11",
"js-yaml": "^4.1.0",
"lint-staged": "^14.0.1",
"lint-staged": "^15.2.2",
"lodash": "^4.17.21",
"object-scan": "^19.0.5",
"prettier": "^3.2.4",
"prettier": "^3.2.5",
"reflect-metadata": "^0.2.1",
"rimraf": "^5.0.5",
"semver": "^7.5.4",
"tmp-promise": "^3.0.3",
"semver": "^7.6.0",
"ts-json-schema-generator": "^1.5.0",
"typescript": "^5.3.3",
"vite": "^5.0.11",
"typescript": "^5.4.2",
"vite": "^5.1.5",
"vitest": "^0.34.6"
}
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc