chromatic 13.0.2--canary.1191.15905942413.0 → 13.0.2--canary.1191.15933176042.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin.js
CHANGED
|
@@ -7,7 +7,7 @@ var chunkTKGT252T_js = require('./chunk-TKGT252T.js');
|
|
|
7
7
|
|
|
8
8
|
var D=chunkTKGT252T_js.c((q,k)=>{k.exports={name:"dotenv",version:"16.4.5",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec","test:coverage":"tap --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3",decache:"^4.6.1",sinon:"^14.0.1",standard:"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0",tap:"^16.3.0",tar:"^6.1.11",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}};});var V=chunkTKGT252T_js.c((W,u)=>{var _=chunkTKGT252T_js.a("fs"),h=chunkTKGT252T_js.a("path"),j=chunkTKGT252T_js.a("os"),K=chunkTKGT252T_js.a("crypto"),Y=D(),N=Y.version,$=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function x(e){let n={},r=e.toString();r=r.replace(/\r\n?/mg,`
|
|
9
9
|
`);let o;for(;(o=$.exec(r))!=null;){let c=o[1],t=o[2]||"";t=t.trim();let s=t[0];t=t.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),s==='"'&&(t=t.replace(/\\n/g,`
|
|
10
|
-
`),t=t.replace(/\\r/g,"\r")),n[c]=t;}return n}function R(e){let n=y(e),r=i.configDotenv({path:n});if(!r.parsed){let s=new Error(`MISSING_DATA: Cannot parse ${n} for an unknown reason`);throw s.code="MISSING_DATA",s}let o=O(e).split(","),c=o.length,t;for(let s=0;s<c;s++)try{let a=o[s].trim(),l=L(r,a);t=i.decrypt(l.ciphertext,l.key);break}catch(a){if(s+1>=c)throw a}return i.parse(t)}function C(e){console.log(`[dotenv@${N}][INFO] ${e}`);}function F(e){console.log(`[dotenv@${N}][WARN] ${e}`);}function g(e){console.log(`[dotenv@${N}][DEBUG] ${e}`);}function O(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function L(e,n){let r;try{r=new URL(n);}catch(a){if(a.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw a}let o=r.password;if(!o){let a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}let c=r.searchParams.get("environment");if(!c){let a=new Error("INVALID_DOTENV_KEY: Missing environment part");throw a.code="INVALID_DOTENV_KEY",a}let t=`DOTENV_VAULT_${c.toUpperCase()}`,s=e.parsed[t];if(!s){let a=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${t} in your .env.vault file.`);throw a.code="NOT_FOUND_DOTENV_ENVIRONMENT",a}return {ciphertext:s,key:o}}function y(e){let n=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let r of e.path)_.existsSync(r)&&(n=r.endsWith(".vault")?r:`${r}.vault`);else n=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else n=h.resolve(process.cwd(),".env.vault");return _.existsSync(n)?n:null}function m(e){return e[0]==="~"?h.join(j.homedir(),e.slice(1)):e}function G(e){C("Loading env from encrypted .env.vault");let n=i._parseVault(e),r=process.env;return e&&e.processEnv!=null&&(r=e.processEnv),i.populate(r,n,e),{parsed:n}}function U(e){let n=h.resolve(process.cwd(),".env"),r="utf8",o=!!(e&&e.debug);e&&e.encoding?r=e.encoding:o&&g("No encoding is specified. UTF-8 is used by default");let c=[n];if(e&&e.path)if(!Array.isArray(e.path))c=[m(e.path)];else {c=[];for(let l of e.path)c.push(m(l));}let t,s={};for(let l of c)try{let p=i.parse(_.readFileSync(l,{encoding:r}));i.populate(s,p,e);}catch(p){o&&g(`Failed to load ${l} ${p.message}`),t=p;}let a=process.env;return e&&e.processEnv!=null&&(a=e.processEnv),i.populate(a,s,e),t?{parsed:s,error:t}:{parsed:s}}function P(e){if(O(e).length===0)return i.configDotenv(e);let n=y(e);return n?i._configVault(e):(F(`You set DOTENV_KEY but you are missing a .env.vault file at ${n}. Did you forget to build it?`),i.configDotenv(e))}function B(e,n){let r=Buffer.from(n.slice(-64),"hex"),o=Buffer.from(e,"base64"),c=o.subarray(0,12),t=o.subarray(-16);o=o.subarray(12,-16);try{let s=K.createDecipheriv("aes-256-gcm",r,c);return s.setAuthTag(t),`${s.update(o)}${s.final()}`}catch(s){let a=s instanceof RangeError,l=s.message==="Invalid key length",p=s.message==="Unsupported state or unable to authenticate data";if(a||l){let f=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw f.code="INVALID_DOTENV_KEY",f}else if(p){let f=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw f.code="DECRYPTION_FAILED",f}else throw s}}function S(e,n,r={}){let o=!!(r&&r.debug),c=!!(r&&r.override);if(typeof n!="object"){let t=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw t.code="OBJECT_REQUIRED",t}for(let t of Object.keys(n))Object.prototype.hasOwnProperty.call(e,t)?(c===!0&&(e[t]=n[t]),o&&g(c===!0?`"${t}" is already defined and WAS overwritten`:`"${t}" is already defined and was NOT overwritten`)):e[t]=n[t];}var i={configDotenv:U,_configVault:G,_parseVault:R,config:P,decrypt:B,parse:x,populate:S};u.exports.configDotenv=i.configDotenv;u.exports._configVault=i._configVault;u.exports._parseVault=i._parseVault;u.exports.config=i.config;u.exports.decrypt=i.decrypt;u.exports.parse=i.parse;u.exports.populate=i.populate;u.exports=i;});var I=chunkTKGT252T_js.c((H,T)=>{var d={};process.env.DOTENV_CONFIG_ENCODING!=null&&(d.encoding=process.env.DOTENV_CONFIG_ENCODING);process.env.DOTENV_CONFIG_PATH!=null&&(d.path=process.env.DOTENV_CONFIG_PATH);process.env.DOTENV_CONFIG_DEBUG!=null&&(d.debug=process.env.DOTENV_CONFIG_DEBUG);process.env.DOTENV_CONFIG_OVERRIDE!=null&&(d.override=process.env.DOTENV_CONFIG_OVERRIDE);process.env.DOTENV_CONFIG_DOTENV_KEY!=null&&(d.DOTENV_KEY=process.env.DOTENV_CONFIG_DOTENV_KEY);T.exports=d;});var w=chunkTKGT252T_js.c((J,b)=>{var M=/^dotenv_config_(encoding|path|debug|override|DOTENV_KEY)=(.+)$/;b.exports=function(n){return n.reduce(function(r,o){let c=o.match(M);return c&&(r[c[1]]=c[2]),r},{})};});(function(){V().config(Object.assign({},I(),w()(process.argv)));})();var A={init:()=>import('./init-DEMEYMHG.js').then(({main:e})=>e(process.argv.slice(3))),main:()=>import('./main-
|
|
10
|
+
`),t=t.replace(/\\r/g,"\r")),n[c]=t;}return n}function R(e){let n=y(e),r=i.configDotenv({path:n});if(!r.parsed){let s=new Error(`MISSING_DATA: Cannot parse ${n} for an unknown reason`);throw s.code="MISSING_DATA",s}let o=O(e).split(","),c=o.length,t;for(let s=0;s<c;s++)try{let a=o[s].trim(),l=L(r,a);t=i.decrypt(l.ciphertext,l.key);break}catch(a){if(s+1>=c)throw a}return i.parse(t)}function C(e){console.log(`[dotenv@${N}][INFO] ${e}`);}function F(e){console.log(`[dotenv@${N}][WARN] ${e}`);}function g(e){console.log(`[dotenv@${N}][DEBUG] ${e}`);}function O(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function L(e,n){let r;try{r=new URL(n);}catch(a){if(a.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw a}let o=r.password;if(!o){let a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}let c=r.searchParams.get("environment");if(!c){let a=new Error("INVALID_DOTENV_KEY: Missing environment part");throw a.code="INVALID_DOTENV_KEY",a}let t=`DOTENV_VAULT_${c.toUpperCase()}`,s=e.parsed[t];if(!s){let a=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${t} in your .env.vault file.`);throw a.code="NOT_FOUND_DOTENV_ENVIRONMENT",a}return {ciphertext:s,key:o}}function y(e){let n=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let r of e.path)_.existsSync(r)&&(n=r.endsWith(".vault")?r:`${r}.vault`);else n=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else n=h.resolve(process.cwd(),".env.vault");return _.existsSync(n)?n:null}function m(e){return e[0]==="~"?h.join(j.homedir(),e.slice(1)):e}function G(e){C("Loading env from encrypted .env.vault");let n=i._parseVault(e),r=process.env;return e&&e.processEnv!=null&&(r=e.processEnv),i.populate(r,n,e),{parsed:n}}function U(e){let n=h.resolve(process.cwd(),".env"),r="utf8",o=!!(e&&e.debug);e&&e.encoding?r=e.encoding:o&&g("No encoding is specified. UTF-8 is used by default");let c=[n];if(e&&e.path)if(!Array.isArray(e.path))c=[m(e.path)];else {c=[];for(let l of e.path)c.push(m(l));}let t,s={};for(let l of c)try{let p=i.parse(_.readFileSync(l,{encoding:r}));i.populate(s,p,e);}catch(p){o&&g(`Failed to load ${l} ${p.message}`),t=p;}let a=process.env;return e&&e.processEnv!=null&&(a=e.processEnv),i.populate(a,s,e),t?{parsed:s,error:t}:{parsed:s}}function P(e){if(O(e).length===0)return i.configDotenv(e);let n=y(e);return n?i._configVault(e):(F(`You set DOTENV_KEY but you are missing a .env.vault file at ${n}. Did you forget to build it?`),i.configDotenv(e))}function B(e,n){let r=Buffer.from(n.slice(-64),"hex"),o=Buffer.from(e,"base64"),c=o.subarray(0,12),t=o.subarray(-16);o=o.subarray(12,-16);try{let s=K.createDecipheriv("aes-256-gcm",r,c);return s.setAuthTag(t),`${s.update(o)}${s.final()}`}catch(s){let a=s instanceof RangeError,l=s.message==="Invalid key length",p=s.message==="Unsupported state or unable to authenticate data";if(a||l){let f=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw f.code="INVALID_DOTENV_KEY",f}else if(p){let f=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw f.code="DECRYPTION_FAILED",f}else throw s}}function S(e,n,r={}){let o=!!(r&&r.debug),c=!!(r&&r.override);if(typeof n!="object"){let t=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw t.code="OBJECT_REQUIRED",t}for(let t of Object.keys(n))Object.prototype.hasOwnProperty.call(e,t)?(c===!0&&(e[t]=n[t]),o&&g(c===!0?`"${t}" is already defined and WAS overwritten`:`"${t}" is already defined and was NOT overwritten`)):e[t]=n[t];}var i={configDotenv:U,_configVault:G,_parseVault:R,config:P,decrypt:B,parse:x,populate:S};u.exports.configDotenv=i.configDotenv;u.exports._configVault=i._configVault;u.exports._parseVault=i._parseVault;u.exports.config=i.config;u.exports.decrypt=i.decrypt;u.exports.parse=i.parse;u.exports.populate=i.populate;u.exports=i;});var I=chunkTKGT252T_js.c((H,T)=>{var d={};process.env.DOTENV_CONFIG_ENCODING!=null&&(d.encoding=process.env.DOTENV_CONFIG_ENCODING);process.env.DOTENV_CONFIG_PATH!=null&&(d.path=process.env.DOTENV_CONFIG_PATH);process.env.DOTENV_CONFIG_DEBUG!=null&&(d.debug=process.env.DOTENV_CONFIG_DEBUG);process.env.DOTENV_CONFIG_OVERRIDE!=null&&(d.override=process.env.DOTENV_CONFIG_OVERRIDE);process.env.DOTENV_CONFIG_DOTENV_KEY!=null&&(d.DOTENV_KEY=process.env.DOTENV_CONFIG_DOTENV_KEY);T.exports=d;});var w=chunkTKGT252T_js.c((J,b)=>{var M=/^dotenv_config_(encoding|path|debug|override|DOTENV_KEY)=(.+)$/;b.exports=function(n){return n.reduce(function(r,o){let c=o.match(M);return c&&(r[c[1]]=c[2]),r},{})};});(function(){V().config(Object.assign({},I(),w()(process.argv)));})();var A={init:()=>import('./init-DEMEYMHG.js').then(({main:e})=>e(process.argv.slice(3))),main:()=>import('./main-ZEEAI5YJ.js').then(({main:e})=>e(process.argv.slice(2))),trace:()=>import('./trace-GHL7YNXU.js').then(({main:e})=>e(process.argv.slice(3))),"trim-stats-file":()=>import('./trimStatsFile-B32JUOXW.js').then(({main:e})=>e(process.argv.slice(3)))};(A[process.argv[2]]||A.main)();
|
|
11
11
|
//# sourceMappingURL=out.js.map
|
|
12
12
|
//# sourceMappingURL=bin.js.map
|
|
13
13
|
//# debugId=b0728df1-9867-5a40-a7d7-a0fdae262e04
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ae54734c-3d43-5cd0-a5ef-826d96d2b2e0")}catch(e){}}();
|
|
4
4
|
|
|
5
5
|
var chunk2E7ZWKIX_js = require('./chunk-2E7ZWKIX.js');
|
|
6
6
|
var chunkO2POOKSN_js = require('./chunk-O2POOKSN.js');
|
|
@@ -346,7 +346,7 @@ Url: ${fP(e)}`),!0)}function rtt(e,t){return e.type||!t||!t.length?!1:att(e).som
|
|
|
346
346
|
`),d=f.shift();if(!d)return e.destroy(),r(new Error("No header received from proxy CONNECT response"));let m=d.split(" "),y=+(m[1]||0),g=m.slice(2).join(" "),v={};for(let T of f){if(!T)continue;let S=T.indexOf(":");if(S===-1)return e.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${T}"`));let x=T.slice(0,S).toLowerCase(),b=T.slice(S+1).trimStart(),A=v[x];typeof A=="string"?v[x]=[A,b]:Array.isArray(A)?A.push(b):v[x]=b;}PC("got proxy server response: %o %o",d,v),a(),t({connect:{statusCode:y,statusText:g,headers:v},buffered:p});}e.on("error",u),e.on("end",o),s();})}function R0(...e){ce.log("[https-proxy-agent]",...e);}var M0=class extends AC{static __initStatic(){this.protocols=["http","https"];}constructor(t,r){super(r),this.options={},this.proxy=typeof t=="string"?new URL(t):t,this.proxyHeaders=$i(Ye([r,"optionalAccess",s=>s.headers]),()=>({})),R0("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?sfe(r,"headers"):null,host:n,port:i};}async connect(t,r){let{proxy:n}=this;if(!r.host)throw new TypeError('No "host" provided');let i;if(n.protocol==="https:"){R0("Creating `tls.Socket`: %o",this.connectOpts);let h=this.connectOpts.servername||this.connectOpts.host;i=dF__namespace.connect({...this.connectOpts,servername:h&&tc__namespace.isIP(h)?void 0:h});}else R0("Creating `net.Socket`: %o",this.connectOpts),i=tc__namespace.connect(this.connectOpts);let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=tc__namespace.isIPv6(r.host)?`[${r.host}]`:r.host,o=`CONNECT ${a}:${r.port} HTTP/1.1\r
|
|
347
347
|
`;if(n.username||n.password){let h=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(h).toString("base64")}`;}s.Host=`${a}:${r.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let h of Object.keys(s))o+=`${h}: ${s[h]}\r
|
|
348
348
|
`;let u=ife(i);i.write(`${o}\r
|
|
349
|
-
`);let{connect:l,buffered:c}=await u;if(t.emit("proxyConnect",l),this.emit("proxyConnect",l,t),l.statusCode===200){if(t.once("socket",rot),r.secureEndpoint){R0("Upgrading socket connection to TLS");let h=r.servername||r.host;return dF__namespace.connect({...sfe(r,"host","path","port"),socket:i,servername:tc__namespace.isIP(h)?void 0:h})}return i}i.destroy();let p=new tc__namespace.Socket({writable:!1});return p.readable=!0,t.once("socket",h=>{R0("Replaying proxy buffer for failed request"),h.push(c),h.push(null);}),p}};M0.__initStatic();function rot(e){e.resume();}function sfe(e,...t){let r={},n;for(n in e)t.includes(n)||(r[n]=e[n]);return r}var oot=1024*32;function uot(e){return new vf.Readable({read(){this.push(e),this.push(null);}})}function afe(e){let t;try{t=new URL(e.url);}catch{return Gi(()=>{console.warn("[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.");}),r0(e,()=>Promise.resolve({}))}let r=t.protocol==="https:",n=lot(t,e.proxy||(r?process.env.https_proxy:void 0)||process.env.http_proxy),i=r?iot__namespace:_1__namespace,s=e.keepAlive===void 0?!1:e.keepAlive,a=n?new M0(n):new i.Agent({keepAlive:s,maxSockets:30,timeout:2e3}),o=cot(e,$i(e.httpModule,()=>i),a);return r0(e,o)}function lot(e,t){let{no_proxy:r}=process.env;if(!(r&&r.split(",").some(i=>e.host.endsWith(i)||e.hostname.endsWith(i))))return t}function cot(e,t,r){let{hostname:n,pathname:i,port:s,protocol:a,search:o}=new URL(e.url);return function(l){return new Promise((c,p)=>{_k(()=>{let h=uot(l.body),f={...e.headers};l.body.length>oot&&(f["content-encoding"]="gzip",h=h.pipe(Lg.createGzip()));let d=t.request({method:"POST",agent:r,headers:f,hostname:n,path:`${i}${o}`,port:s,protocol:a,ca:e.caCerts},m=>{m.on("data",()=>{}),m.on("end",()=>{}),m.setEncoding("utf8");let y=$i(m.headers["retry-after"],()=>null),g=$i(m.headers["x-sentry-rate-limits"],()=>null);c({statusCode:m.statusCode,headers:{"retry-after":y,"x-sentry-rate-limits":Array.isArray(g)?g[0]||null:g}});});d.on("error",p),h.pipe(d);});})}}var pot=new Set(["false","f","n","no","off","0"]),fot=new Set(["true","t","y","yes","on","1"]);function mF(e,t){let r=String(e).toLowerCase();return pot.has(r)?!1:fot.has(r)?!0:t&&t.strict?null:!!e}function ofe(e){return e.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}function ufe(e=process.argv[1]?fM(process.argv[1]):process.cwd(),t=LN.sep==="\\"){let r=t?ofe(e):e;return n=>{if(!n)return;let i=t?ofe(n):n,{dir:s,base:a,ext:o}=LN.posix.parse(i);(o===".js"||o===".mjs"||o===".cjs")&&(a=a.slice(0,o.length*-1)),s||(s=".");let u=s.lastIndexOf("/node_modules");if(u>-1)return `${s.slice(u+14).replace(/\//g,".")}:${a}`;if(s.startsWith(r)){let l=s.slice(r.length+1).replace(/\//g,".");return l&&(l+=":"),l+=a,l}return a}}function lfe(e){return "13.0.2--canary.1191.15905942413.0"}var cfe=$x(SM(ufe()));pt();var got=6e4,CC=class extends t0{constructor(t){let r={...t,platform:"node",runtime:{name:"node",version:global.process.version},serverName:t.serverName||global.process.env.SENTRY_NAME||Ci__namespace.hostname()};Dk(r,"node"),ce.log(`Initializing Sentry: process: ${process.pid}, thread: ${worker_threads.isMainThread?"main":`worker-${worker_threads.threadId}`}.`),super(r);}get tracer(){if(this._tracer)return this._tracer;let t="@sentry/node",r=ti,n=qt.getTracer(t,r);return this._tracer=n,n}async flush(t){let r=this.traceProvider,n=Ye([r,"optionalAccess",i=>i.activeSpanProcessor]);return n&&await n.forceFlush(),this.getOptions().sendClientReports&&this._flushOutcomes(),super.flush(t)}close(t){return this._clientReportInterval&&clearInterval(this._clientReportInterval),this._clientReportOnExitFlushListener&&process.off("beforeExit",this._clientReportOnExitFlushListener),super.close(t)}startClientReportTracking(){let t=this.getOptions();t.sendClientReports&&(this._clientReportOnExitFlushListener=()=>{this._flushOutcomes();},this._clientReportInterval=setInterval(()=>{oi&&ce.log("Flushing client reports based on interval."),this._flushOutcomes();},$i(t.clientReportFlushInterval,()=>got)).unref(),process.on("beforeExit",this._clientReportOnExitFlushListener));}};pt();qk();_P();dn();var ffe=chunkTKGT252T_js.e(rk(),1);function hfe(e){e.getOptions().debug&&bot();let t=Tot(e);e.traceProvider=t;}function Eot(e){if(Ye([e,"optionalAccess",t=>t.onlyIncludeInstrumentedModules])){let{addHookMessagePort:t}=(0, ffe.createAddHookMessageChannel)();return {data:{addHookMessagePort:t,include:e.include||[]},transferList:[t]}}return {data:e}}function dfe(e){let[t=0,r=0]=process.versions.node.split(".").map(Number);if(t>=22||t===20&&r>=6||t===18&&r>=19){let n=typeof (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('out.js', document.baseURI).href))<"u"?(typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('out.js', document.baseURI).href)):void 0;if(!Bt._sentryEsmLoaderHookRegistered&&n)try{Sot__default.default.register("import-in-the-middle/hook.mjs",n,Eot(e)),Bt._sentryEsmLoaderHookRegistered=!0;}catch(i){ce.warn("Failed to register ESM hook",i);}}else Gi(()=>{console.warn('[Sentry] You are using Node.js in ESM mode ("import syntax"). The Sentry Node.js SDK is not compatible with ESM in Node.js versions before 18.19.0 or before 20.6.0. Please either build your application with CommonJS ("require() syntax"), or use version 7.x of the Sentry Node.js SDK.');});}function Tot(e){let t=new Vk({sampler:new PP(e),resource:new wy({[_L]:"node",[bL]:"sentry",[xL]:ti}),forceFlushTimeoutMillis:500});return t.addSpanProcessor(new AP({timeout:e.getOptions().maxSpanWaitDuration})),t.register({propagator:new xP,contextManager:new rfe}),t}function bot(){let e=new Proxy(ce,{get(t,r,n){return Reflect.get(t,r==="verbose"?"debug":r,n)}});_t.disable(),_t.setLogger(e,ln.DEBUG);}function vot(){return BP()?[Moe()]:[]}function mfe(){return [hP(),pP(),dP(),mP(),moe(),toe(),foe(),Loe(),koe(),xoe(),Roe(),Soe(),...vot()]}function yfe(e){return [...mfe(),..._ot(e)?nfe():[]]}function _ot(e){return Qo(e)?e.enableTracing||e.tracesSampleRate!=null||"tracesSampler"in e:!1}function xot(e={}){return Aot(e,yfe)}function Aot(e={},t){let r=Pot(e,t);r.debug===!0&&(oi?ce.enable():Gi(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.");})),!BP()&&r.registerEsmLoaderHooks!==!1&&dfe(r.registerEsmLoaderHooks===!0?void 0:r.registerEsmLoaderHooks),Vae(),Zr().update(r.initialScope),r.spotlight&&!r.integrations.some(({name:s})=>s===aF)&&r.integrations.push(Hpe({sidecarUrl:typeof r.spotlight=="string"?r.spotlight:void 0}));let i=new CC(r);return Zr().setClient(i),i.init(),ce.log(`Running in ${BP()?"CommonJS":"ESM"} mode.`),r.autoSessionTracking&&Oot(),i.startClientReportTracking(),Iot(),r.skipOpenTelemetrySetup||(hfe(i),gfe()),Lae(i),qae(i),i}function gfe(){if(!oi)return;let e=Bae(),t=["SentryContextManager","SentryPropagator"];Qo()&&t.push("SentrySpanProcessor");for(let r of t)e.includes(r)||ce.error(`You have to set up the ${r}. Without this, the OpenTelemetry & Sentry integration will not work properly.`);e.includes("SentrySampler")||ce.warn("You have to set up the SentrySampler. Without this, the OpenTelemetry & Sentry integration may still work, but sample rates set for the Sentry SDK will not be respected. If you use a custom sampler, make sure to use `wrapSamplingDecision`.");}function Pot(e,t){let r=Cot(e.release),n=typeof r!="string"?!1:e.autoSessionTracking===void 0?!0:e.autoSessionTracking;if(e.spotlight==null){let l=mF(process.env.SENTRY_SPOTLIGHT,{strict:!0});l==null?e.spotlight=process.env.SENTRY_SPOTLIGHT:e.spotlight=l;}let i=wot(e.tracesSampleRate),s=Qt({transport:afe,dsn:process.env.SENTRY_DSN,environment:"production",sendClientReports:!0}),a=Qt({release:r,autoSessionTracking:n,tracesSampleRate:i}),o={...s,...e,...a};return e.defaultIntegrations===void 0&&(e.defaultIntegrations=t(o)),{...o,stackParser:iM(e.stackParser||cfe),integrations:wk({defaultIntegrations:e.defaultIntegrations,integrations:e.integrations})}}function Cot(e){if(e!==void 0)return e;let t=lfe();return t}function wot(e){if(e!==void 0)return e;let t=process.env.SENTRY_TRACES_SAMPLE_RATE;if(!t)return;let r=parseFloat(t);return isFinite(r)?r:void 0}function Iot(){if(mF(process.env.SENTRY_USE_ENVIRONMENT)!==!1){let e=process.env.SENTRY_TRACE,t=process.env.SENTRY_BAGGAGE,r=Km(e,t);Zr().setPropagationContext(r);}}function Oot(){let e=Rt();e&&e.getOptions().autoSessionTracking&&e.initSessionFlusher(),uP(),process.on("beforeExit",()=>{let t=Or().getSession();t&&t.status!=="ok"&&e0();});}var Sqe=chunkTKGT252T_js.e(Gge());chunkFAGUPA7O_js.c();var sEe=chunkTKGT252T_js.e(Ng());var iEe=chunkTKGT252T_js.e(Ng());function Ept(e){if(!/^data:/i.test(e))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');e=e.replace(/\r?\n/g,"");let t=e.indexOf(",");if(t===-1||t<=4)throw new TypeError("malformed data: URI");let r=e.substring(5,t).split(";"),n="",i=!1,s=r[0]||"text/plain",a=s;for(let c=1;c<r.length;c++)r[c]==="base64"?i=!0:r[c]&&(a+=`;${r[c]}`,r[c].indexOf("charset=")===0&&(n=r[c].substring(8)));!r[0]&&!n.length&&(a+=";charset=US-ASCII",n="US-ASCII");let o=i?"base64":"ascii",u=unescape(e.substring(t+1)),l=Buffer.from(u,o);return l.type=s,l.typeFull=a,l.charset=n,l}var Jge=Ept;var cc=class extends Error{constructor(t,r){super(t),Error.captureStackTrace(this,this.constructor),this.type=r;}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}};var fa=class extends cc{constructor(t,r,n){super(t,r),n&&(this.code=this.errno=n.code,this.erroredSysCall=n.syscall);}};var T1=Symbol.toStringTag,UB=e=>typeof e=="object"&&typeof e.append=="function"&&typeof e.delete=="function"&&typeof e.get=="function"&&typeof e.getAll=="function"&&typeof e.has=="function"&&typeof e.set=="function"&&typeof e.sort=="function"&&e[T1]==="URLSearchParams",K0=e=>e&&typeof e=="object"&&typeof e.arrayBuffer=="function"&&typeof e.type=="string"&&typeof e.stream=="function"&&typeof e.constructor=="function"&&/^(Blob|File)$/.test(e[T1]),Qge=e=>typeof e=="object"&&(e[T1]==="AbortSignal"||e[T1]==="EventTarget"),Zge=(e,t)=>{let r=new URL(t).hostname,n=new URL(e).hostname;return r===n||r.endsWith(`.${n}`)},eSe=(e,t)=>{let r=new URL(t).protocol,n=new URL(e).protocol;return r===n};var bpt=doe.promisify(vf__default.default.pipeline),ha=Symbol("Body internals"),Zu=class{constructor(t,{size:r=0}={}){let n=null;t===null?t=null:UB(t)?t=buffer.Buffer.from(t.toString()):K0(t)||buffer.Buffer.isBuffer(t)||(doe.types.isAnyArrayBuffer(t)?t=buffer.Buffer.from(t):ArrayBuffer.isView(t)?t=buffer.Buffer.from(t.buffer,t.byteOffset,t.byteLength):t instanceof vf__default.default||(t instanceof chunkO2POOKSN_js.c?(t=chunkO2POOKSN_js.d(t),n=t.type.split("=")[1]):t=buffer.Buffer.from(String(t))));let i=t;buffer.Buffer.isBuffer(t)?i=vf__default.default.Readable.from(t):K0(t)&&(i=vf__default.default.Readable.from(t.stream())),this[ha]={body:t,stream:i,boundary:n,disturbed:!1,error:null},this.size=r,t instanceof vf__default.default&&t.on("error",s=>{let a=s instanceof cc?s:new fa(`Invalid response body while trying to fetch ${this.url}: ${s.message}`,"system",s);this[ha].error=a;});}get body(){return this[ha].stream}get bodyUsed(){return this[ha].disturbed}async arrayBuffer(){let{buffer:t,byteOffset:r,byteLength:n}=await qB(this);return t.slice(r,r+n)}async formData(){let t=this.headers.get("content-type");if(t.startsWith("application/x-www-form-urlencoded")){let n=new chunkO2POOKSN_js.c,i=new URLSearchParams(await this.text());for(let[s,a]of i)n.append(s,a);return n}let{toFormData:r}=await import('./multipart-parser-6AKE4G7O.js');return r(this.body,t)}async blob(){let t=this.headers&&this.headers.get("content-type")||this[ha].body&&this[ha].body.type||"",r=await this.arrayBuffer();return new chunkO2POOKSN_js.a([r],{type:t})}async json(){let t=await this.text();return JSON.parse(t)}async text(){let t=await qB(this);return new TextDecoder().decode(t)}buffer(){return qB(this)}};Zu.prototype.buffer=doe.deprecate(Zu.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(Zu.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:doe.deprecate(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});async function qB(e){if(e[ha].disturbed)throw new TypeError(`body used already for: ${e.url}`);if(e[ha].disturbed=!0,e[ha].error)throw e[ha].error;let{body:t}=e;if(t===null)return buffer.Buffer.alloc(0);if(!(t instanceof vf__default.default))return buffer.Buffer.alloc(0);let r=[],n=0;try{for await(let i of t){if(e.size>0&&n+i.length>e.size){let s=new fa(`content size at ${e.url} over limit: ${e.size}`,"max-size");throw t.destroy(s),s}n+=i.length,r.push(i);}}catch(i){throw i instanceof cc?i:new fa(`Invalid response body while trying to fetch ${e.url}: ${i.message}`,"system",i)}if(t.readableEnded===!0||t._readableState.ended===!0)try{return r.every(i=>typeof i=="string")?buffer.Buffer.from(r.join("")):buffer.Buffer.concat(r,n)}catch(i){throw new fa(`Could not create Buffer from response body for ${e.url}: ${i.message}`,"system",i)}else throw new fa(`Premature close of server response while trying to fetch ${e.url}`)}var Rg=(e,t)=>{let r,n,{body:i}=e[ha];if(e.bodyUsed)throw new Error("cannot clone body after it is used");return i instanceof vf__default.default&&typeof i.getBoundary!="function"&&(r=new vf.PassThrough({highWaterMark:t}),n=new vf.PassThrough({highWaterMark:t}),i.pipe(r),i.pipe(n),e[ha].stream=r,i=n),i},vpt=doe.deprecate(e=>e.getBoundary(),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167"),b1=(e,t)=>e===null?null:typeof e=="string"?"text/plain;charset=UTF-8":UB(e)?"application/x-www-form-urlencoded;charset=UTF-8":K0(e)?e.type||null:buffer.Buffer.isBuffer(e)||doe.types.isAnyArrayBuffer(e)||ArrayBuffer.isView(e)?null:e instanceof chunkO2POOKSN_js.c?`multipart/form-data; boundary=${t[ha].boundary}`:e&&typeof e.getBoundary=="function"?`multipart/form-data;boundary=${vpt(e)}`:e instanceof vf__default.default?null:"text/plain;charset=UTF-8",nSe=e=>{let{body:t}=e[ha];return t===null?0:K0(t)?t.size:buffer.Buffer.isBuffer(t)?t.length:t&&typeof t.getLengthSync=="function"&&t.hasKnownLength&&t.hasKnownLength()?t.getLengthSync():null},iSe=async(e,{body:t})=>{t===null?e.end():await bpt(t,e);};var v1=typeof _1__namespace.default.validateHeaderName=="function"?_1__namespace.default.validateHeaderName:e=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(e)){let t=new TypeError(`Header name must be a valid HTTP token [${e}]`);throw Object.defineProperty(t,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),t}},HB=typeof _1__namespace.default.validateHeaderValue=="function"?_1__namespace.default.validateHeaderValue:(e,t)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(t)){let r=new TypeError(`Invalid character in header content ["${e}"]`);throw Object.defineProperty(r,"code",{value:"ERR_INVALID_CHAR"}),r}},mo=class e extends URLSearchParams{constructor(t){let r=[];if(t instanceof e){let n=t.raw();for(let[i,s]of Object.entries(n))r.push(...s.map(a=>[i,a]));}else if(t!=null)if(typeof t=="object"&&!doe.types.isBoxedPrimitive(t)){let n=t[Symbol.iterator];if(n==null)r.push(...Object.entries(t));else {if(typeof n!="function")throw new TypeError("Header pairs must be iterable");r=[...t].map(i=>{if(typeof i!="object"||doe.types.isBoxedPrimitive(i))throw new TypeError("Each header pair must be an iterable object");return [...i]}).map(i=>{if(i.length!==2)throw new TypeError("Each header pair must be a name/value tuple");return [...i]});}}else throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)");return r=r.length>0?r.map(([n,i])=>(v1(n),HB(n,String(i)),[String(n).toLowerCase(),String(i)])):void 0,super(r),new Proxy(this,{get(n,i,s){switch(i){case"append":case"set":return (a,o)=>(v1(a),HB(a,String(o)),URLSearchParams.prototype[i].call(n,String(a).toLowerCase(),String(o)));case"delete":case"has":case"getAll":return a=>(v1(a),URLSearchParams.prototype[i].call(n,String(a).toLowerCase()));case"keys":return ()=>(n.sort(),new Set(URLSearchParams.prototype.keys.call(n)).keys());default:return Reflect.get(n,i,s)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(t){let r=this.getAll(t);if(r.length===0)return null;let n=r.join(", ");return /^content-encoding$/i.test(t)&&(n=n.toLowerCase()),n}forEach(t,r=void 0){for(let n of this.keys())Reflect.apply(t,r,[this.get(n),n,this]);}*values(){for(let t of this.keys())yield this.get(t);}*entries(){for(let t of this.keys())yield [t,this.get(t)];}[Symbol.iterator](){return this.entries()}raw(){return [...this.keys()].reduce((t,r)=>(t[r]=this.getAll(r),t),{})}[Symbol.for("nodejs.util.inspect.custom")](){return [...this.keys()].reduce((t,r)=>{let n=this.getAll(r);return r==="host"?t[r]=n[0]:t[r]=n.length>1?n:n[0],t},{})}};Object.defineProperties(mo.prototype,["get","entries","forEach","values"].reduce((e,t)=>(e[t]={enumerable:!0},e),{}));function aSe(e=[]){return new mo(e.reduce((t,r,n,i)=>(n%2===0&&t.push(i.slice(n,n+2)),t),[]).filter(([t,r])=>{try{return v1(t),HB(t,String(r)),!0}catch{return !1}}))}var _pt=new Set([301,302,303,307,308]),x1=e=>_pt.has(e);var ou=Symbol("Response internals"),yo=class e extends Zu{constructor(t=null,r={}){super(t,r);let n=r.status!=null?r.status:200,i=new mo(r.headers);if(t!==null&&!i.has("Content-Type")){let s=b1(t,this);s&&i.append("Content-Type",s);}this[ou]={type:"default",url:r.url,status:n,statusText:r.statusText||"",headers:i,counter:r.counter,highWaterMark:r.highWaterMark};}get type(){return this[ou].type}get url(){return this[ou].url||""}get status(){return this[ou].status}get ok(){return this[ou].status>=200&&this[ou].status<300}get redirected(){return this[ou].counter>0}get statusText(){return this[ou].statusText}get headers(){return this[ou].headers}get highWaterMark(){return this[ou].highWaterMark}clone(){return new e(Rg(this,this.highWaterMark),{type:this.type,url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size,highWaterMark:this.highWaterMark})}static redirect(t,r=302){if(!x1(r))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new e(null,{headers:{location:new URL(t).toString()},status:r})}static error(){let t=new e(null,{status:0,statusText:""});return t[ou].type="error",t}get[Symbol.toStringTag](){return "Response"}};Object.defineProperties(yo.prototype,{type:{enumerable:!0},url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}});var oSe=e=>{if(e.search)return e.search;let t=e.href.length-1,r=e.hash||(e.href[t]==="#"?"#":"");return e.href[t-r.length]==="?"?"?":""};function uSe(e,t=!1){return e==null||(e=new URL(e),/^(about|blob|data):$/.test(e.protocol))?"no-referrer":(e.username="",e.password="",e.hash="",t&&(e.pathname="",e.search=""),e)}var lSe=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),cSe="strict-origin-when-cross-origin";function pSe(e){if(!lSe.has(e))throw new TypeError(`Invalid referrerPolicy: ${e}`);return e}function Apt(e){if(/^(http|ws)s:$/.test(e.protocol))return !0;let t=e.host.replace(/(^\[)|(]$)/g,""),r=tc.isIP(t);return r===4&&/^127\./.test(t)||r===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(t)?!0:e.host==="localhost"||e.host.endsWith(".localhost")?!1:e.protocol==="file:"}function Mg(e){return /^about:(blank|srcdoc)$/.test(e)||e.protocol==="data:"||/^(blob|filesystem):$/.test(e.protocol)?!0:Apt(e)}function fSe(e,{referrerURLCallback:t,referrerOriginCallback:r}={}){if(e.referrer==="no-referrer"||e.referrerPolicy==="")return null;let n=e.referrerPolicy;if(e.referrer==="about:client")return "no-referrer";let i=e.referrer,s=uSe(i),a=uSe(i,!0);s.toString().length>4096&&(s=a),t&&(s=t(s)),r&&(a=r(a));let o=new URL(e.url);switch(n){case"no-referrer":return "no-referrer";case"origin":return a;case"unsafe-url":return s;case"strict-origin":return Mg(s)&&!Mg(o)?"no-referrer":a.toString();case"strict-origin-when-cross-origin":return s.origin===o.origin?s:Mg(s)&&!Mg(o)?"no-referrer":a;case"same-origin":return s.origin===o.origin?s:"no-referrer";case"origin-when-cross-origin":return s.origin===o.origin?s:a;case"no-referrer-when-downgrade":return Mg(s)&&!Mg(o)?"no-referrer":s;default:throw new TypeError(`Invalid referrerPolicy: ${n}`)}}function hSe(e){let t=(e.get("referrer-policy")||"").split(/[,\s]+/),r="";for(let n of t)n&&lSe.has(n)&&(r=n);return r}var Li=Symbol("Request internals"),Y0=e=>typeof e=="object"&&typeof e[Li]=="object",wpt=doe.deprecate(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),ad=class e extends Zu{constructor(t,r={}){let n;if(Y0(t)?n=new URL(t.url):(n=new URL(t),t={}),n.username!==""||n.password!=="")throw new TypeError(`${n} is an url with embedded credentials.`);let i=r.method||t.method||"GET";if(/^(delete|get|head|options|post|put)$/i.test(i)&&(i=i.toUpperCase()),!Y0(r)&&"data"in r&&wpt(),(r.body!=null||Y0(t)&&t.body!==null)&&(i==="GET"||i==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body");let s=r.body?r.body:Y0(t)&&t.body!==null?Rg(t):null;super(s,{size:r.size||t.size||0});let a=new mo(r.headers||t.headers||{});if(s!==null&&!a.has("Content-Type")){let l=b1(s,this);l&&a.set("Content-Type",l);}let o=Y0(t)?t.signal:null;if("signal"in r&&(o=r.signal),o!=null&&!Qge(o))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let u=r.referrer==null?t.referrer:r.referrer;if(u==="")u="no-referrer";else if(u){let l=new URL(u);u=/^about:(\/\/)?client$/.test(l)?"client":l;}else u=void 0;this[Li]={method:i,redirect:r.redirect||t.redirect||"follow",headers:a,parsedURL:n,signal:o,referrer:u},this.follow=r.follow===void 0?t.follow===void 0?20:t.follow:r.follow,this.compress=r.compress===void 0?t.compress===void 0?!0:t.compress:r.compress,this.counter=r.counter||t.counter||0,this.agent=r.agent||t.agent,this.highWaterMark=r.highWaterMark||t.highWaterMark||16384,this.insecureHTTPParser=r.insecureHTTPParser||t.insecureHTTPParser||!1,this.referrerPolicy=r.referrerPolicy||t.referrerPolicy||"";}get method(){return this[Li].method}get url(){return url.format(this[Li].parsedURL)}get headers(){return this[Li].headers}get redirect(){return this[Li].redirect}get signal(){return this[Li].signal}get referrer(){if(this[Li].referrer==="no-referrer")return "";if(this[Li].referrer==="client")return "about:client";if(this[Li].referrer)return this[Li].referrer.toString()}get referrerPolicy(){return this[Li].referrerPolicy}set referrerPolicy(t){this[Li].referrerPolicy=pSe(t);}clone(){return new e(this)}get[Symbol.toStringTag](){return "Request"}};Object.defineProperties(ad.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0},referrer:{enumerable:!0},referrerPolicy:{enumerable:!0}});var dSe=e=>{let{parsedURL:t}=e[Li],r=new mo(e[Li].headers);r.has("Accept")||r.set("Accept","*/*");let n=null;if(e.body===null&&/^(post|put)$/i.test(e.method)&&(n="0"),e.body!==null){let o=nSe(e);typeof o=="number"&&!Number.isNaN(o)&&(n=String(o));}n&&r.set("Content-Length",n),e.referrerPolicy===""&&(e.referrerPolicy=cSe),e.referrer&&e.referrer!=="no-referrer"?e[Li].referrer=fSe(e):e[Li].referrer="no-referrer",e[Li].referrer instanceof URL&&r.set("Referer",e.referrer),r.has("User-Agent")||r.set("User-Agent","node-fetch"),e.compress&&!r.has("Accept-Encoding")&&r.set("Accept-Encoding","gzip, deflate, br");let{agent:i}=e;typeof i=="function"&&(i=i(t)),!r.has("Connection")&&!i&&r.set("Connection","close");let s=oSe(t),a={path:t.pathname+s,method:e.method,headers:r[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:e.insecureHTTPParser,agent:i};return {parsedURL:t,options:a}};var A1=class extends cc{constructor(t,r="aborted"){super(t,r);}};var Dpt=new Set(["data:","http:","https:"]);async function C1(e,t){return new Promise((r,n)=>{let i=new ad(e,t),{parsedURL:s,options:a}=dSe(i);if(!Dpt.has(s.protocol))throw new TypeError(`node-fetch cannot load ${e}. URL scheme "${s.protocol.replace(/:$/,"")}" is not supported.`);if(s.protocol==="data:"){let d=Jge(i.url),m=new yo(d,{headers:{"Content-Type":d.typeFull}});r(m);return}let o=(s.protocol==="https:"?iot__namespace.default:_1__namespace.default).request,{signal:u}=i,l=null,c=()=>{let d=new A1("The operation was aborted.");n(d),i.body&&i.body instanceof vf__default.default.Readable&&i.body.destroy(d),!(!l||!l.body)&&l.body.emit("error",d);};if(u&&u.aborted){c();return}let p=()=>{c(),f();},h=o(s.toString(),a);u&&u.addEventListener("abort",p);let f=()=>{h.abort(),u&&u.removeEventListener("abort",p);};h.on("error",d=>{n(new fa(`request to ${i.url} failed, reason: ${d.message}`,"system",d)),f();}),Npt(h,d=>{l&&l.body&&l.body.destroy(d);}),process.version<"v14"&&h.on("socket",d=>{let m;d.prependListener("end",()=>{m=d._eventsCount;}),d.prependListener("close",y=>{if(l&&m<d._eventsCount&&!y){let g=new Error("Premature close");g.code="ERR_STREAM_PREMATURE_CLOSE",l.body.emit("error",g);}});}),h.on("response",d=>{h.setTimeout(0);let m=aSe(d.rawHeaders);if(x1(d.statusCode)){let S=m.get("Location"),x=null;try{x=S===null?null:new URL(S,i.url);}catch{if(i.redirect!=="manual"){n(new fa(`uri requested responds with an invalid redirect URL: ${S}`,"invalid-redirect")),f();return}}switch(i.redirect){case"error":n(new fa(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`,"no-redirect")),f();return;case"manual":break;case"follow":{if(x===null)break;if(i.counter>=i.follow){n(new fa(`maximum redirect reached at: ${i.url}`,"max-redirect")),f();return}let b={headers:new mo(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:Rg(i),signal:i.signal,size:i.size,referrer:i.referrer,referrerPolicy:i.referrerPolicy};if(!Zge(i.url,x)||!eSe(i.url,x))for(let D of ["authorization","www-authenticate","cookie","cookie2"])b.headers.delete(D);if(d.statusCode!==303&&i.body&&t.body instanceof vf__default.default.Readable){n(new fa("Cannot follow redirect with body being a readable stream","unsupported-redirect")),f();return}(d.statusCode===303||(d.statusCode===301||d.statusCode===302)&&i.method==="POST")&&(b.method="GET",b.body=void 0,b.headers.delete("content-length"));let A=hSe(m);A&&(b.referrerPolicy=A),r(C1(new ad(x,b))),f();return}default:return n(new TypeError(`Redirect option '${i.redirect}' is not a valid value of RequestRedirect`))}}u&&d.once("end",()=>{u.removeEventListener("abort",p);});let y=vf.pipeline(d,new vf.PassThrough,S=>{S&&n(S);});process.version<"v12.10"&&d.on("aborted",p);let g={url:i.url,status:d.statusCode,statusText:d.statusMessage,headers:m,size:i.size,counter:i.counter,highWaterMark:i.highWaterMark},v=m.get("Content-Encoding");if(!i.compress||i.method==="HEAD"||v===null||d.statusCode===204||d.statusCode===304){l=new yo(y,g),r(l);return}let T={flush:Lg__default.default.Z_SYNC_FLUSH,finishFlush:Lg__default.default.Z_SYNC_FLUSH};if(v==="gzip"||v==="x-gzip"){y=vf.pipeline(y,Lg__default.default.createGunzip(T),S=>{S&&n(S);}),l=new yo(y,g),r(l);return}if(v==="deflate"||v==="x-deflate"){let S=vf.pipeline(d,new vf.PassThrough,x=>{x&&n(x);});S.once("data",x=>{(x[0]&15)===8?y=vf.pipeline(y,Lg__default.default.createInflate(),b=>{b&&n(b);}):y=vf.pipeline(y,Lg__default.default.createInflateRaw(),b=>{b&&n(b);}),l=new yo(y,g),r(l);}),S.once("end",()=>{l||(l=new yo(y,g),r(l));});return}if(v==="br"){y=vf.pipeline(y,Lg__default.default.createBrotliDecompress(),S=>{S&&n(S);}),l=new yo(y,g),r(l);return}l=new yo(y,g),r(l);}),iSe(h,i).catch(n);})}function Npt(e,t){let r=buffer.Buffer.from(`0\r
|
|
349
|
+
`);let{connect:l,buffered:c}=await u;if(t.emit("proxyConnect",l),this.emit("proxyConnect",l,t),l.statusCode===200){if(t.once("socket",rot),r.secureEndpoint){R0("Upgrading socket connection to TLS");let h=r.servername||r.host;return dF__namespace.connect({...sfe(r,"host","path","port"),socket:i,servername:tc__namespace.isIP(h)?void 0:h})}return i}i.destroy();let p=new tc__namespace.Socket({writable:!1});return p.readable=!0,t.once("socket",h=>{R0("Replaying proxy buffer for failed request"),h.push(c),h.push(null);}),p}};M0.__initStatic();function rot(e){e.resume();}function sfe(e,...t){let r={},n;for(n in e)t.includes(n)||(r[n]=e[n]);return r}var oot=1024*32;function uot(e){return new vf.Readable({read(){this.push(e),this.push(null);}})}function afe(e){let t;try{t=new URL(e.url);}catch{return Gi(()=>{console.warn("[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.");}),r0(e,()=>Promise.resolve({}))}let r=t.protocol==="https:",n=lot(t,e.proxy||(r?process.env.https_proxy:void 0)||process.env.http_proxy),i=r?iot__namespace:_1__namespace,s=e.keepAlive===void 0?!1:e.keepAlive,a=n?new M0(n):new i.Agent({keepAlive:s,maxSockets:30,timeout:2e3}),o=cot(e,$i(e.httpModule,()=>i),a);return r0(e,o)}function lot(e,t){let{no_proxy:r}=process.env;if(!(r&&r.split(",").some(i=>e.host.endsWith(i)||e.hostname.endsWith(i))))return t}function cot(e,t,r){let{hostname:n,pathname:i,port:s,protocol:a,search:o}=new URL(e.url);return function(l){return new Promise((c,p)=>{_k(()=>{let h=uot(l.body),f={...e.headers};l.body.length>oot&&(f["content-encoding"]="gzip",h=h.pipe(Lg.createGzip()));let d=t.request({method:"POST",agent:r,headers:f,hostname:n,path:`${i}${o}`,port:s,protocol:a,ca:e.caCerts},m=>{m.on("data",()=>{}),m.on("end",()=>{}),m.setEncoding("utf8");let y=$i(m.headers["retry-after"],()=>null),g=$i(m.headers["x-sentry-rate-limits"],()=>null);c({statusCode:m.statusCode,headers:{"retry-after":y,"x-sentry-rate-limits":Array.isArray(g)?g[0]||null:g}});});d.on("error",p),h.pipe(d);});})}}var pot=new Set(["false","f","n","no","off","0"]),fot=new Set(["true","t","y","yes","on","1"]);function mF(e,t){let r=String(e).toLowerCase();return pot.has(r)?!1:fot.has(r)?!0:t&&t.strict?null:!!e}function ofe(e){return e.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}function ufe(e=process.argv[1]?fM(process.argv[1]):process.cwd(),t=LN.sep==="\\"){let r=t?ofe(e):e;return n=>{if(!n)return;let i=t?ofe(n):n,{dir:s,base:a,ext:o}=LN.posix.parse(i);(o===".js"||o===".mjs"||o===".cjs")&&(a=a.slice(0,o.length*-1)),s||(s=".");let u=s.lastIndexOf("/node_modules");if(u>-1)return `${s.slice(u+14).replace(/\//g,".")}:${a}`;if(s.startsWith(r)){let l=s.slice(r.length+1).replace(/\//g,".");return l&&(l+=":"),l+=a,l}return a}}function lfe(e){return "13.0.2--canary.1191.15933176042.0"}var cfe=$x(SM(ufe()));pt();var got=6e4,CC=class extends t0{constructor(t){let r={...t,platform:"node",runtime:{name:"node",version:global.process.version},serverName:t.serverName||global.process.env.SENTRY_NAME||Ci__namespace.hostname()};Dk(r,"node"),ce.log(`Initializing Sentry: process: ${process.pid}, thread: ${worker_threads.isMainThread?"main":`worker-${worker_threads.threadId}`}.`),super(r);}get tracer(){if(this._tracer)return this._tracer;let t="@sentry/node",r=ti,n=qt.getTracer(t,r);return this._tracer=n,n}async flush(t){let r=this.traceProvider,n=Ye([r,"optionalAccess",i=>i.activeSpanProcessor]);return n&&await n.forceFlush(),this.getOptions().sendClientReports&&this._flushOutcomes(),super.flush(t)}close(t){return this._clientReportInterval&&clearInterval(this._clientReportInterval),this._clientReportOnExitFlushListener&&process.off("beforeExit",this._clientReportOnExitFlushListener),super.close(t)}startClientReportTracking(){let t=this.getOptions();t.sendClientReports&&(this._clientReportOnExitFlushListener=()=>{this._flushOutcomes();},this._clientReportInterval=setInterval(()=>{oi&&ce.log("Flushing client reports based on interval."),this._flushOutcomes();},$i(t.clientReportFlushInterval,()=>got)).unref(),process.on("beforeExit",this._clientReportOnExitFlushListener));}};pt();qk();_P();dn();var ffe=chunkTKGT252T_js.e(rk(),1);function hfe(e){e.getOptions().debug&&bot();let t=Tot(e);e.traceProvider=t;}function Eot(e){if(Ye([e,"optionalAccess",t=>t.onlyIncludeInstrumentedModules])){let{addHookMessagePort:t}=(0, ffe.createAddHookMessageChannel)();return {data:{addHookMessagePort:t,include:e.include||[]},transferList:[t]}}return {data:e}}function dfe(e){let[t=0,r=0]=process.versions.node.split(".").map(Number);if(t>=22||t===20&&r>=6||t===18&&r>=19){let n=typeof (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('out.js', document.baseURI).href))<"u"?(typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('out.js', document.baseURI).href)):void 0;if(!Bt._sentryEsmLoaderHookRegistered&&n)try{Sot__default.default.register("import-in-the-middle/hook.mjs",n,Eot(e)),Bt._sentryEsmLoaderHookRegistered=!0;}catch(i){ce.warn("Failed to register ESM hook",i);}}else Gi(()=>{console.warn('[Sentry] You are using Node.js in ESM mode ("import syntax"). The Sentry Node.js SDK is not compatible with ESM in Node.js versions before 18.19.0 or before 20.6.0. Please either build your application with CommonJS ("require() syntax"), or use version 7.x of the Sentry Node.js SDK.');});}function Tot(e){let t=new Vk({sampler:new PP(e),resource:new wy({[_L]:"node",[bL]:"sentry",[xL]:ti}),forceFlushTimeoutMillis:500});return t.addSpanProcessor(new AP({timeout:e.getOptions().maxSpanWaitDuration})),t.register({propagator:new xP,contextManager:new rfe}),t}function bot(){let e=new Proxy(ce,{get(t,r,n){return Reflect.get(t,r==="verbose"?"debug":r,n)}});_t.disable(),_t.setLogger(e,ln.DEBUG);}function vot(){return BP()?[Moe()]:[]}function mfe(){return [hP(),pP(),dP(),mP(),moe(),toe(),foe(),Loe(),koe(),xoe(),Roe(),Soe(),...vot()]}function yfe(e){return [...mfe(),..._ot(e)?nfe():[]]}function _ot(e){return Qo(e)?e.enableTracing||e.tracesSampleRate!=null||"tracesSampler"in e:!1}function xot(e={}){return Aot(e,yfe)}function Aot(e={},t){let r=Pot(e,t);r.debug===!0&&(oi?ce.enable():Gi(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.");})),!BP()&&r.registerEsmLoaderHooks!==!1&&dfe(r.registerEsmLoaderHooks===!0?void 0:r.registerEsmLoaderHooks),Vae(),Zr().update(r.initialScope),r.spotlight&&!r.integrations.some(({name:s})=>s===aF)&&r.integrations.push(Hpe({sidecarUrl:typeof r.spotlight=="string"?r.spotlight:void 0}));let i=new CC(r);return Zr().setClient(i),i.init(),ce.log(`Running in ${BP()?"CommonJS":"ESM"} mode.`),r.autoSessionTracking&&Oot(),i.startClientReportTracking(),Iot(),r.skipOpenTelemetrySetup||(hfe(i),gfe()),Lae(i),qae(i),i}function gfe(){if(!oi)return;let e=Bae(),t=["SentryContextManager","SentryPropagator"];Qo()&&t.push("SentrySpanProcessor");for(let r of t)e.includes(r)||ce.error(`You have to set up the ${r}. Without this, the OpenTelemetry & Sentry integration will not work properly.`);e.includes("SentrySampler")||ce.warn("You have to set up the SentrySampler. Without this, the OpenTelemetry & Sentry integration may still work, but sample rates set for the Sentry SDK will not be respected. If you use a custom sampler, make sure to use `wrapSamplingDecision`.");}function Pot(e,t){let r=Cot(e.release),n=typeof r!="string"?!1:e.autoSessionTracking===void 0?!0:e.autoSessionTracking;if(e.spotlight==null){let l=mF(process.env.SENTRY_SPOTLIGHT,{strict:!0});l==null?e.spotlight=process.env.SENTRY_SPOTLIGHT:e.spotlight=l;}let i=wot(e.tracesSampleRate),s=Qt({transport:afe,dsn:process.env.SENTRY_DSN,environment:"production",sendClientReports:!0}),a=Qt({release:r,autoSessionTracking:n,tracesSampleRate:i}),o={...s,...e,...a};return e.defaultIntegrations===void 0&&(e.defaultIntegrations=t(o)),{...o,stackParser:iM(e.stackParser||cfe),integrations:wk({defaultIntegrations:e.defaultIntegrations,integrations:e.integrations})}}function Cot(e){if(e!==void 0)return e;let t=lfe();return t}function wot(e){if(e!==void 0)return e;let t=process.env.SENTRY_TRACES_SAMPLE_RATE;if(!t)return;let r=parseFloat(t);return isFinite(r)?r:void 0}function Iot(){if(mF(process.env.SENTRY_USE_ENVIRONMENT)!==!1){let e=process.env.SENTRY_TRACE,t=process.env.SENTRY_BAGGAGE,r=Km(e,t);Zr().setPropagationContext(r);}}function Oot(){let e=Rt();e&&e.getOptions().autoSessionTracking&&e.initSessionFlusher(),uP(),process.on("beforeExit",()=>{let t=Or().getSession();t&&t.status!=="ok"&&e0();});}var Sqe=chunkTKGT252T_js.e(Gge());chunkFAGUPA7O_js.c();var sEe=chunkTKGT252T_js.e(Ng());var iEe=chunkTKGT252T_js.e(Ng());function Ept(e){if(!/^data:/i.test(e))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');e=e.replace(/\r?\n/g,"");let t=e.indexOf(",");if(t===-1||t<=4)throw new TypeError("malformed data: URI");let r=e.substring(5,t).split(";"),n="",i=!1,s=r[0]||"text/plain",a=s;for(let c=1;c<r.length;c++)r[c]==="base64"?i=!0:r[c]&&(a+=`;${r[c]}`,r[c].indexOf("charset=")===0&&(n=r[c].substring(8)));!r[0]&&!n.length&&(a+=";charset=US-ASCII",n="US-ASCII");let o=i?"base64":"ascii",u=unescape(e.substring(t+1)),l=Buffer.from(u,o);return l.type=s,l.typeFull=a,l.charset=n,l}var Jge=Ept;var cc=class extends Error{constructor(t,r){super(t),Error.captureStackTrace(this,this.constructor),this.type=r;}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}};var fa=class extends cc{constructor(t,r,n){super(t,r),n&&(this.code=this.errno=n.code,this.erroredSysCall=n.syscall);}};var T1=Symbol.toStringTag,UB=e=>typeof e=="object"&&typeof e.append=="function"&&typeof e.delete=="function"&&typeof e.get=="function"&&typeof e.getAll=="function"&&typeof e.has=="function"&&typeof e.set=="function"&&typeof e.sort=="function"&&e[T1]==="URLSearchParams",K0=e=>e&&typeof e=="object"&&typeof e.arrayBuffer=="function"&&typeof e.type=="string"&&typeof e.stream=="function"&&typeof e.constructor=="function"&&/^(Blob|File)$/.test(e[T1]),Qge=e=>typeof e=="object"&&(e[T1]==="AbortSignal"||e[T1]==="EventTarget"),Zge=(e,t)=>{let r=new URL(t).hostname,n=new URL(e).hostname;return r===n||r.endsWith(`.${n}`)},eSe=(e,t)=>{let r=new URL(t).protocol,n=new URL(e).protocol;return r===n};var bpt=doe.promisify(vf__default.default.pipeline),ha=Symbol("Body internals"),Zu=class{constructor(t,{size:r=0}={}){let n=null;t===null?t=null:UB(t)?t=buffer.Buffer.from(t.toString()):K0(t)||buffer.Buffer.isBuffer(t)||(doe.types.isAnyArrayBuffer(t)?t=buffer.Buffer.from(t):ArrayBuffer.isView(t)?t=buffer.Buffer.from(t.buffer,t.byteOffset,t.byteLength):t instanceof vf__default.default||(t instanceof chunkO2POOKSN_js.c?(t=chunkO2POOKSN_js.d(t),n=t.type.split("=")[1]):t=buffer.Buffer.from(String(t))));let i=t;buffer.Buffer.isBuffer(t)?i=vf__default.default.Readable.from(t):K0(t)&&(i=vf__default.default.Readable.from(t.stream())),this[ha]={body:t,stream:i,boundary:n,disturbed:!1,error:null},this.size=r,t instanceof vf__default.default&&t.on("error",s=>{let a=s instanceof cc?s:new fa(`Invalid response body while trying to fetch ${this.url}: ${s.message}`,"system",s);this[ha].error=a;});}get body(){return this[ha].stream}get bodyUsed(){return this[ha].disturbed}async arrayBuffer(){let{buffer:t,byteOffset:r,byteLength:n}=await qB(this);return t.slice(r,r+n)}async formData(){let t=this.headers.get("content-type");if(t.startsWith("application/x-www-form-urlencoded")){let n=new chunkO2POOKSN_js.c,i=new URLSearchParams(await this.text());for(let[s,a]of i)n.append(s,a);return n}let{toFormData:r}=await import('./multipart-parser-6AKE4G7O.js');return r(this.body,t)}async blob(){let t=this.headers&&this.headers.get("content-type")||this[ha].body&&this[ha].body.type||"",r=await this.arrayBuffer();return new chunkO2POOKSN_js.a([r],{type:t})}async json(){let t=await this.text();return JSON.parse(t)}async text(){let t=await qB(this);return new TextDecoder().decode(t)}buffer(){return qB(this)}};Zu.prototype.buffer=doe.deprecate(Zu.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(Zu.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:doe.deprecate(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});async function qB(e){if(e[ha].disturbed)throw new TypeError(`body used already for: ${e.url}`);if(e[ha].disturbed=!0,e[ha].error)throw e[ha].error;let{body:t}=e;if(t===null)return buffer.Buffer.alloc(0);if(!(t instanceof vf__default.default))return buffer.Buffer.alloc(0);let r=[],n=0;try{for await(let i of t){if(e.size>0&&n+i.length>e.size){let s=new fa(`content size at ${e.url} over limit: ${e.size}`,"max-size");throw t.destroy(s),s}n+=i.length,r.push(i);}}catch(i){throw i instanceof cc?i:new fa(`Invalid response body while trying to fetch ${e.url}: ${i.message}`,"system",i)}if(t.readableEnded===!0||t._readableState.ended===!0)try{return r.every(i=>typeof i=="string")?buffer.Buffer.from(r.join("")):buffer.Buffer.concat(r,n)}catch(i){throw new fa(`Could not create Buffer from response body for ${e.url}: ${i.message}`,"system",i)}else throw new fa(`Premature close of server response while trying to fetch ${e.url}`)}var Rg=(e,t)=>{let r,n,{body:i}=e[ha];if(e.bodyUsed)throw new Error("cannot clone body after it is used");return i instanceof vf__default.default&&typeof i.getBoundary!="function"&&(r=new vf.PassThrough({highWaterMark:t}),n=new vf.PassThrough({highWaterMark:t}),i.pipe(r),i.pipe(n),e[ha].stream=r,i=n),i},vpt=doe.deprecate(e=>e.getBoundary(),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167"),b1=(e,t)=>e===null?null:typeof e=="string"?"text/plain;charset=UTF-8":UB(e)?"application/x-www-form-urlencoded;charset=UTF-8":K0(e)?e.type||null:buffer.Buffer.isBuffer(e)||doe.types.isAnyArrayBuffer(e)||ArrayBuffer.isView(e)?null:e instanceof chunkO2POOKSN_js.c?`multipart/form-data; boundary=${t[ha].boundary}`:e&&typeof e.getBoundary=="function"?`multipart/form-data;boundary=${vpt(e)}`:e instanceof vf__default.default?null:"text/plain;charset=UTF-8",nSe=e=>{let{body:t}=e[ha];return t===null?0:K0(t)?t.size:buffer.Buffer.isBuffer(t)?t.length:t&&typeof t.getLengthSync=="function"&&t.hasKnownLength&&t.hasKnownLength()?t.getLengthSync():null},iSe=async(e,{body:t})=>{t===null?e.end():await bpt(t,e);};var v1=typeof _1__namespace.default.validateHeaderName=="function"?_1__namespace.default.validateHeaderName:e=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(e)){let t=new TypeError(`Header name must be a valid HTTP token [${e}]`);throw Object.defineProperty(t,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),t}},HB=typeof _1__namespace.default.validateHeaderValue=="function"?_1__namespace.default.validateHeaderValue:(e,t)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(t)){let r=new TypeError(`Invalid character in header content ["${e}"]`);throw Object.defineProperty(r,"code",{value:"ERR_INVALID_CHAR"}),r}},mo=class e extends URLSearchParams{constructor(t){let r=[];if(t instanceof e){let n=t.raw();for(let[i,s]of Object.entries(n))r.push(...s.map(a=>[i,a]));}else if(t!=null)if(typeof t=="object"&&!doe.types.isBoxedPrimitive(t)){let n=t[Symbol.iterator];if(n==null)r.push(...Object.entries(t));else {if(typeof n!="function")throw new TypeError("Header pairs must be iterable");r=[...t].map(i=>{if(typeof i!="object"||doe.types.isBoxedPrimitive(i))throw new TypeError("Each header pair must be an iterable object");return [...i]}).map(i=>{if(i.length!==2)throw new TypeError("Each header pair must be a name/value tuple");return [...i]});}}else throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)");return r=r.length>0?r.map(([n,i])=>(v1(n),HB(n,String(i)),[String(n).toLowerCase(),String(i)])):void 0,super(r),new Proxy(this,{get(n,i,s){switch(i){case"append":case"set":return (a,o)=>(v1(a),HB(a,String(o)),URLSearchParams.prototype[i].call(n,String(a).toLowerCase(),String(o)));case"delete":case"has":case"getAll":return a=>(v1(a),URLSearchParams.prototype[i].call(n,String(a).toLowerCase()));case"keys":return ()=>(n.sort(),new Set(URLSearchParams.prototype.keys.call(n)).keys());default:return Reflect.get(n,i,s)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(t){let r=this.getAll(t);if(r.length===0)return null;let n=r.join(", ");return /^content-encoding$/i.test(t)&&(n=n.toLowerCase()),n}forEach(t,r=void 0){for(let n of this.keys())Reflect.apply(t,r,[this.get(n),n,this]);}*values(){for(let t of this.keys())yield this.get(t);}*entries(){for(let t of this.keys())yield [t,this.get(t)];}[Symbol.iterator](){return this.entries()}raw(){return [...this.keys()].reduce((t,r)=>(t[r]=this.getAll(r),t),{})}[Symbol.for("nodejs.util.inspect.custom")](){return [...this.keys()].reduce((t,r)=>{let n=this.getAll(r);return r==="host"?t[r]=n[0]:t[r]=n.length>1?n:n[0],t},{})}};Object.defineProperties(mo.prototype,["get","entries","forEach","values"].reduce((e,t)=>(e[t]={enumerable:!0},e),{}));function aSe(e=[]){return new mo(e.reduce((t,r,n,i)=>(n%2===0&&t.push(i.slice(n,n+2)),t),[]).filter(([t,r])=>{try{return v1(t),HB(t,String(r)),!0}catch{return !1}}))}var _pt=new Set([301,302,303,307,308]),x1=e=>_pt.has(e);var ou=Symbol("Response internals"),yo=class e extends Zu{constructor(t=null,r={}){super(t,r);let n=r.status!=null?r.status:200,i=new mo(r.headers);if(t!==null&&!i.has("Content-Type")){let s=b1(t,this);s&&i.append("Content-Type",s);}this[ou]={type:"default",url:r.url,status:n,statusText:r.statusText||"",headers:i,counter:r.counter,highWaterMark:r.highWaterMark};}get type(){return this[ou].type}get url(){return this[ou].url||""}get status(){return this[ou].status}get ok(){return this[ou].status>=200&&this[ou].status<300}get redirected(){return this[ou].counter>0}get statusText(){return this[ou].statusText}get headers(){return this[ou].headers}get highWaterMark(){return this[ou].highWaterMark}clone(){return new e(Rg(this,this.highWaterMark),{type:this.type,url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size,highWaterMark:this.highWaterMark})}static redirect(t,r=302){if(!x1(r))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new e(null,{headers:{location:new URL(t).toString()},status:r})}static error(){let t=new e(null,{status:0,statusText:""});return t[ou].type="error",t}get[Symbol.toStringTag](){return "Response"}};Object.defineProperties(yo.prototype,{type:{enumerable:!0},url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}});var oSe=e=>{if(e.search)return e.search;let t=e.href.length-1,r=e.hash||(e.href[t]==="#"?"#":"");return e.href[t-r.length]==="?"?"?":""};function uSe(e,t=!1){return e==null||(e=new URL(e),/^(about|blob|data):$/.test(e.protocol))?"no-referrer":(e.username="",e.password="",e.hash="",t&&(e.pathname="",e.search=""),e)}var lSe=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),cSe="strict-origin-when-cross-origin";function pSe(e){if(!lSe.has(e))throw new TypeError(`Invalid referrerPolicy: ${e}`);return e}function Apt(e){if(/^(http|ws)s:$/.test(e.protocol))return !0;let t=e.host.replace(/(^\[)|(]$)/g,""),r=tc.isIP(t);return r===4&&/^127\./.test(t)||r===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(t)?!0:e.host==="localhost"||e.host.endsWith(".localhost")?!1:e.protocol==="file:"}function Mg(e){return /^about:(blank|srcdoc)$/.test(e)||e.protocol==="data:"||/^(blob|filesystem):$/.test(e.protocol)?!0:Apt(e)}function fSe(e,{referrerURLCallback:t,referrerOriginCallback:r}={}){if(e.referrer==="no-referrer"||e.referrerPolicy==="")return null;let n=e.referrerPolicy;if(e.referrer==="about:client")return "no-referrer";let i=e.referrer,s=uSe(i),a=uSe(i,!0);s.toString().length>4096&&(s=a),t&&(s=t(s)),r&&(a=r(a));let o=new URL(e.url);switch(n){case"no-referrer":return "no-referrer";case"origin":return a;case"unsafe-url":return s;case"strict-origin":return Mg(s)&&!Mg(o)?"no-referrer":a.toString();case"strict-origin-when-cross-origin":return s.origin===o.origin?s:Mg(s)&&!Mg(o)?"no-referrer":a;case"same-origin":return s.origin===o.origin?s:"no-referrer";case"origin-when-cross-origin":return s.origin===o.origin?s:a;case"no-referrer-when-downgrade":return Mg(s)&&!Mg(o)?"no-referrer":s;default:throw new TypeError(`Invalid referrerPolicy: ${n}`)}}function hSe(e){let t=(e.get("referrer-policy")||"").split(/[,\s]+/),r="";for(let n of t)n&&lSe.has(n)&&(r=n);return r}var Li=Symbol("Request internals"),Y0=e=>typeof e=="object"&&typeof e[Li]=="object",wpt=doe.deprecate(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),ad=class e extends Zu{constructor(t,r={}){let n;if(Y0(t)?n=new URL(t.url):(n=new URL(t),t={}),n.username!==""||n.password!=="")throw new TypeError(`${n} is an url with embedded credentials.`);let i=r.method||t.method||"GET";if(/^(delete|get|head|options|post|put)$/i.test(i)&&(i=i.toUpperCase()),!Y0(r)&&"data"in r&&wpt(),(r.body!=null||Y0(t)&&t.body!==null)&&(i==="GET"||i==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body");let s=r.body?r.body:Y0(t)&&t.body!==null?Rg(t):null;super(s,{size:r.size||t.size||0});let a=new mo(r.headers||t.headers||{});if(s!==null&&!a.has("Content-Type")){let l=b1(s,this);l&&a.set("Content-Type",l);}let o=Y0(t)?t.signal:null;if("signal"in r&&(o=r.signal),o!=null&&!Qge(o))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let u=r.referrer==null?t.referrer:r.referrer;if(u==="")u="no-referrer";else if(u){let l=new URL(u);u=/^about:(\/\/)?client$/.test(l)?"client":l;}else u=void 0;this[Li]={method:i,redirect:r.redirect||t.redirect||"follow",headers:a,parsedURL:n,signal:o,referrer:u},this.follow=r.follow===void 0?t.follow===void 0?20:t.follow:r.follow,this.compress=r.compress===void 0?t.compress===void 0?!0:t.compress:r.compress,this.counter=r.counter||t.counter||0,this.agent=r.agent||t.agent,this.highWaterMark=r.highWaterMark||t.highWaterMark||16384,this.insecureHTTPParser=r.insecureHTTPParser||t.insecureHTTPParser||!1,this.referrerPolicy=r.referrerPolicy||t.referrerPolicy||"";}get method(){return this[Li].method}get url(){return url.format(this[Li].parsedURL)}get headers(){return this[Li].headers}get redirect(){return this[Li].redirect}get signal(){return this[Li].signal}get referrer(){if(this[Li].referrer==="no-referrer")return "";if(this[Li].referrer==="client")return "about:client";if(this[Li].referrer)return this[Li].referrer.toString()}get referrerPolicy(){return this[Li].referrerPolicy}set referrerPolicy(t){this[Li].referrerPolicy=pSe(t);}clone(){return new e(this)}get[Symbol.toStringTag](){return "Request"}};Object.defineProperties(ad.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0},referrer:{enumerable:!0},referrerPolicy:{enumerable:!0}});var dSe=e=>{let{parsedURL:t}=e[Li],r=new mo(e[Li].headers);r.has("Accept")||r.set("Accept","*/*");let n=null;if(e.body===null&&/^(post|put)$/i.test(e.method)&&(n="0"),e.body!==null){let o=nSe(e);typeof o=="number"&&!Number.isNaN(o)&&(n=String(o));}n&&r.set("Content-Length",n),e.referrerPolicy===""&&(e.referrerPolicy=cSe),e.referrer&&e.referrer!=="no-referrer"?e[Li].referrer=fSe(e):e[Li].referrer="no-referrer",e[Li].referrer instanceof URL&&r.set("Referer",e.referrer),r.has("User-Agent")||r.set("User-Agent","node-fetch"),e.compress&&!r.has("Accept-Encoding")&&r.set("Accept-Encoding","gzip, deflate, br");let{agent:i}=e;typeof i=="function"&&(i=i(t)),!r.has("Connection")&&!i&&r.set("Connection","close");let s=oSe(t),a={path:t.pathname+s,method:e.method,headers:r[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:e.insecureHTTPParser,agent:i};return {parsedURL:t,options:a}};var A1=class extends cc{constructor(t,r="aborted"){super(t,r);}};var Dpt=new Set(["data:","http:","https:"]);async function C1(e,t){return new Promise((r,n)=>{let i=new ad(e,t),{parsedURL:s,options:a}=dSe(i);if(!Dpt.has(s.protocol))throw new TypeError(`node-fetch cannot load ${e}. URL scheme "${s.protocol.replace(/:$/,"")}" is not supported.`);if(s.protocol==="data:"){let d=Jge(i.url),m=new yo(d,{headers:{"Content-Type":d.typeFull}});r(m);return}let o=(s.protocol==="https:"?iot__namespace.default:_1__namespace.default).request,{signal:u}=i,l=null,c=()=>{let d=new A1("The operation was aborted.");n(d),i.body&&i.body instanceof vf__default.default.Readable&&i.body.destroy(d),!(!l||!l.body)&&l.body.emit("error",d);};if(u&&u.aborted){c();return}let p=()=>{c(),f();},h=o(s.toString(),a);u&&u.addEventListener("abort",p);let f=()=>{h.abort(),u&&u.removeEventListener("abort",p);};h.on("error",d=>{n(new fa(`request to ${i.url} failed, reason: ${d.message}`,"system",d)),f();}),Npt(h,d=>{l&&l.body&&l.body.destroy(d);}),process.version<"v14"&&h.on("socket",d=>{let m;d.prependListener("end",()=>{m=d._eventsCount;}),d.prependListener("close",y=>{if(l&&m<d._eventsCount&&!y){let g=new Error("Premature close");g.code="ERR_STREAM_PREMATURE_CLOSE",l.body.emit("error",g);}});}),h.on("response",d=>{h.setTimeout(0);let m=aSe(d.rawHeaders);if(x1(d.statusCode)){let S=m.get("Location"),x=null;try{x=S===null?null:new URL(S,i.url);}catch{if(i.redirect!=="manual"){n(new fa(`uri requested responds with an invalid redirect URL: ${S}`,"invalid-redirect")),f();return}}switch(i.redirect){case"error":n(new fa(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`,"no-redirect")),f();return;case"manual":break;case"follow":{if(x===null)break;if(i.counter>=i.follow){n(new fa(`maximum redirect reached at: ${i.url}`,"max-redirect")),f();return}let b={headers:new mo(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:Rg(i),signal:i.signal,size:i.size,referrer:i.referrer,referrerPolicy:i.referrerPolicy};if(!Zge(i.url,x)||!eSe(i.url,x))for(let D of ["authorization","www-authenticate","cookie","cookie2"])b.headers.delete(D);if(d.statusCode!==303&&i.body&&t.body instanceof vf__default.default.Readable){n(new fa("Cannot follow redirect with body being a readable stream","unsupported-redirect")),f();return}(d.statusCode===303||(d.statusCode===301||d.statusCode===302)&&i.method==="POST")&&(b.method="GET",b.body=void 0,b.headers.delete("content-length"));let A=hSe(m);A&&(b.referrerPolicy=A),r(C1(new ad(x,b))),f();return}default:return n(new TypeError(`Redirect option '${i.redirect}' is not a valid value of RequestRedirect`))}}u&&d.once("end",()=>{u.removeEventListener("abort",p);});let y=vf.pipeline(d,new vf.PassThrough,S=>{S&&n(S);});process.version<"v12.10"&&d.on("aborted",p);let g={url:i.url,status:d.statusCode,statusText:d.statusMessage,headers:m,size:i.size,counter:i.counter,highWaterMark:i.highWaterMark},v=m.get("Content-Encoding");if(!i.compress||i.method==="HEAD"||v===null||d.statusCode===204||d.statusCode===304){l=new yo(y,g),r(l);return}let T={flush:Lg__default.default.Z_SYNC_FLUSH,finishFlush:Lg__default.default.Z_SYNC_FLUSH};if(v==="gzip"||v==="x-gzip"){y=vf.pipeline(y,Lg__default.default.createGunzip(T),S=>{S&&n(S);}),l=new yo(y,g),r(l);return}if(v==="deflate"||v==="x-deflate"){let S=vf.pipeline(d,new vf.PassThrough,x=>{x&&n(x);});S.once("data",x=>{(x[0]&15)===8?y=vf.pipeline(y,Lg__default.default.createInflate(),b=>{b&&n(b);}):y=vf.pipeline(y,Lg__default.default.createInflateRaw(),b=>{b&&n(b);}),l=new yo(y,g),r(l);}),S.once("end",()=>{l||(l=new yo(y,g),r(l));});return}if(v==="br"){y=vf.pipeline(y,Lg__default.default.createBrotliDecompress(),S=>{S&&n(S);}),l=new yo(y,g),r(l);return}l=new yo(y,g),r(l);}),iSe(h,i).catch(n);})}function Npt(e,t){let r=buffer.Buffer.from(`0\r
|
|
350
350
|
\r
|
|
351
351
|
`),n=!1,i=!1,s;e.on("response",a=>{let{headers:o}=a;n=o["transfer-encoding"]==="chunked"&&!o["content-length"];}),e.on("socket",a=>{let o=()=>{if(n&&!i){let l=new Error("Premature close");l.code="ERR_STREAM_PREMATURE_CLOSE",t(l);}},u=l=>{i=buffer.Buffer.compare(l.slice(-5),r)===0,!i&&s&&(i=buffer.Buffer.compare(s.slice(-3),r.slice(0,3))===0&&buffer.Buffer.compare(l.slice(-2),r.slice(3))===0),s=l;};a.prependListener("close",o),a.on("data",u),e.on("close",()=>{a.removeListener("close",o),a.removeListener("data",u);});});}var GB=class extends iot.Agent{constructor(t={}){super({...t,lookup(r,n,i){nEe__default.default.resolve(r,(s,a)=>i(s,a==null?void 0:a[0],4));}});}},Lpt=()=>new GB,$B=Lpt;var eEe=chunkTKGT252T_js.e(ISe()),tEe=chunkTKGT252T_js.e(ZSe());var JB={},Tft=({env:e,log:t},r,n)=>{let i=e.HTTPS_PROXY||e.HTTP_PROXY;if(!i||(0, tEe.default)(r))return;t.debug({url:r,proxy:i,options:n},"Using proxy agent");let s=new url.URL(r).host;return JB[s]||(JB[s]=new eEe.HttpsProxyAgent(i,n)),JB[s]},rEe=Tft;var QB=class e extends Error{constructor(r,n,...i){super(...i);Error.captureStackTrace&&Error.captureStackTrace(this,e),this.response=r,this.message=n||`HTTPClient failed to fetch ${r.url}, got ${r.status}/${r.statusText}`;}},od=class{constructor({env:t,log:r},{headers:n={},retries:i=0}={}){if(!r)throw new Error("Missing required option in HTTPClient: log");this.env=t,this.log=r,this.headers=n,this.retries=i;}async fetch(t,r={},n={}){let i=r.agent||rEe({env:this.env,log:this.log},t,n.proxy);this.env.CHROMATIC_DNS_SERVERS.length>0&&(this.log.debug(`Using custom DNS servers: ${this.env.CHROMATIC_DNS_SERVERS.join(", ")}`),nEe__default.default.setServers(this.env.CHROMATIC_DNS_SERVERS),i=$B());let s=n.retries===void 0?this.retries:n.retries;return (0, iEe.default)(async()=>{let o={...this.headers,...r.headers},u=await C1(t,{...r,agent:i,headers:o});if(!u.ok){let l=new QB(u);if(!n.noLogErrorBody){let c=await u.text();this.log.debug(l.message),this.log.debug(c);}throw l}return u},{retries:s,onRetry:(o,u)=>{var l;this.log.debug({url:t,err:o},`Fetch failed; retrying ${u}/${s}`),(o.message.includes("ENOTFOUND")||[o.code,(l=o.cause)==null?void 0:l.code].includes("ENOTFOUND"))&&(i?this.env.CHROMATIC_DNS_FAILOVER_SERVERS.length>0&&(this.log.warn("Fetch failed due to DNS lookup; switching to failover DNS servers"),nEe__default.default.setServers(this.env.CHROMATIC_DNS_FAILOVER_SERVERS)):(this.log.warn("Fetch failed due to DNS lookup; switching to custom DNS resolver"),i=$B()));}})}async fetchBuffer(t,r){return (await this.fetch(t,r)).buffer()}};var bft="RETRYABLE_ERROR_CODE",z0=class{constructor(t,r,n){if(!r)throw new Error("Option `endpoint` required.");this.endpoint=r,this.client=new od(t,n),this.headers={"Content-Type":"application/json"};}setAuthorization(t){this.headers.Authorization=`Bearer ${t}`;}async runQuery(t,r,{endpoint:n=this.endpoint,headers:i={},retries:s=2}={}){return (0, sEe.default)(async a=>{let{data:o,errors:u}=await this.client.fetch(n,{body:JSON.stringify({query:t,variables:r}),headers:{...this.headers,...i},method:"post"},{retries:s}).then(l=>l.json()).catch(a);if(!u)return o;if(!Array.isArray(u))return a(u);this.client.log.debug({errors:u},"GraphQL errors");for(let l of u){if(l.extensions&&l.extensions.code===bft)throw l;l.name=l.name||"GraphQLError",l.at=`${l.path.join(".")} ${l.locations.map(c=>`${c.line}:${c.column}`).join(", ")}`;}return a(u.length===1?u[0]:u)},{retries:s})}};var rb=chunkTKGT252T_js.e(chunkFAGUPA7O_js.a()),DTe=chunkTKGT252T_js.e($1());var CTe=chunkTKGT252T_js.e(chunk6IZZOM5T_js.G()),wTe=chunkTKGT252T_js.e(chunk6IZZOM5T_js.H());var ITe=(e,t,r=!1)=>{let n=r?"yarn upgrade chromatic --latest":"npm install chromatic@latest --save-dev";return (0, wTe.dedent)(CTe.default`
|
|
352
352
|
${chunk6IZZOM5T_js.K} {bold Using outdated package}
|
|
@@ -451,7 +451,7 @@ ${r.map(i=>rw.default`- {bold ${i}}`).join(`
|
|
|
451
451
|
${chunk6IZZOM5T_js.K} {bold Using deprecated option: ${X0e(e)}}
|
|
452
452
|
This option is ${t?J3.default`superceded by {bold ${X0e(t)}}`:"deprecated"} and may be removed in a future release.
|
|
453
453
|
Refer to the changelog for more information: ${chunkFAGUPA7O_js.f(kmt)}
|
|
454
|
-
`);var Q3=e=>Array.isArray(e)?e.at(-1):e,nw=e=>e?Array.isArray(e)?e:[e]:[],Sc=e=>e===""?!0:e,Q0e=(e,t)=>e===""?t:e,Z0e=(e,t)=>["",!0,void 0].includes(e)?t:e,iw=e=>{let t=e.filter(Boolean);return t.length>0?t:void 0},ebe=e=>Object.fromEntries(Object.entries(e).filter(([t,r])=>r!==void 0)),hb=(e,t)=>{switch(typeof e){case"boolean":return e?t:void 0;case"string":return e||t;default:return}};function Z3(e){var ue,fe;let{argv:t,env:r,flags:n,extraOptions:i,configuration:s,log:a,packageJson:o,packagePath:u}=e,l={projectToken:r.CHROMATIC_PROJECT_TOKEN,fromCI:!!process.env.CI,inAction:!1,dryRun:!1,debug:!1,autoAcceptChanges:!1,exitZeroOnChanges:!1,exitOnceUploaded:!1,diagnosticsFile:void 0,fileHashing:!0,interactive:!1,isLocalBuild:!1,originalArgv:t,onlyChanged:void 0,onlyStoryFiles:void 0,onlyStoryNames:void 0,untraced:void 0,externals:void 0,traceChanged:void 0,list:void 0,logFile:void 0,skip:void 0,forceRebuild:void 0,junitReport:void 0,zip:void 0,skipUpdateCheck:void 0,ignoreLastBuildOnBranch:void 0,preserveMissingSpecs:void 0,buildScriptName:void 0,buildCommand:void 0,playwright:void 0,cypress:void 0,outputDir:void 0,storybookBuildDir:void 0,storybookBaseDir:void 0,storybookConfigDir:void 0,storybookLogFile:void 0,ownerName:void 0,repositorySlug:void 0,branchName:void 0,patchHeadRef:void 0,patchBaseRef:void 0,uploadMetadata:void 0},[c,p]=(n.patchBuild||"").split("...").filter(Boolean),[h,f]=(n.branchName||"").split(":").reverse(),[d,m,...y]=((ue=n.repositorySlug)==null?void 0:ue.split("/"))||[],g="chromatic.log",v="chromatic-build-{buildNumber}.xml",T="chromatic-diagnostics.json",S="build-storybook.log",x="build-archive.log",b=ebe({projectToken:Q3(n.projectToken),onlyChanged:Sc(n.onlyChanged),onlyStoryFiles:iw(nw(n.onlyStoryFiles)),onlyStoryNames:iw(nw(n.onlyStoryNames)),untraced:iw(nw(n.untraced)),externals:iw(nw(n.externals)),traceChanged:Sc(n.traceChanged),list:n.list,logFile:Q0e(n.logFile,g),fromCI:n.ci,skip:Sc(n.skip),dryRun:n.dryRun,fileHashing:n.fileHashing,forceRebuild:Sc(n.forceRebuild),debug:n.debug,diagnosticsFile:hb(n.diagnosticsFile,T),junitReport:Q0e(n.junitReport,v),zip:n.zip,skipUpdateCheck:n.skipUpdateCheck,autoAcceptChanges:Sc(n.autoAcceptChanges),exitZeroOnChanges:Sc(n.exitZeroOnChanges),exitOnceUploaded:Sc(n.exitOnceUploaded),ignoreLastBuildOnBranch:n.ignoreLastBuildOnBranch,preserveMissingSpecs:n.preserveMissing,buildScriptName:n.buildScriptName,buildCommand:n.buildCommand,playwright:Sc(n.playwright),cypress:Sc(n.cypress),outputDir:Q3(n.outputDir),storybookBuildDir:Q3(n.storybookBuildDir),storybookBaseDir:n.storybookBaseDir,storybookConfigDir:n.storybookConfigDir,storybookLogFile:n.playwright||n.cypress?Z0e(n.storybookLogFile,x):Z0e(n.storybookLogFile,S),ownerName:f||d,repositorySlug:n.repositorySlug,branchName:h,patchHeadRef:c,patchBaseRef:p,uploadMetadata:n.uploadMetadata}),{logFile:A,diagnosticsFile:D,junitReport:P,storybookLogFile:V,...W}=s||{},oe=ebe({...W,logFile:hb(A,g),diagnosticsFile:hb(D,T),junitReport:hb(P,v),storybookLogFile:hb(V,S)}),le={...l,...oe,...b,...i,interactive:!process.env.CI&&!n.ci&&!n.debug&&!!n.interactive&&!!process.stdout.isTTY&&process.env.NODE_ENV!=="test"};if(le.debug&&(a.setLevel("debug"),a.setInteractive(!1)),(le.debug||le.uploadMetadata)&&(le.logFile=le.logFile??g,le.diagnosticsFile=le.diagnosticsFile??T),!le.projectToken&&!(le.projectId&&le.userToken))throw new Error(W0e());if(d&&(!m||y.length>0))throw new Error(U0e());if(f&&d&&f!==d)throw new Error(w0e(f,d));if(n.patchBuild){if(!le.patchHeadRef||!le.patchBaseRef)throw new Error(M0e());if(le.patchHeadRef===le.patchBaseRef)throw new Error(b0e())}if((fe=le.onlyStoryNames)!=null&&fe.some(Se=>!/[\w*]\/[\w*]/.test(Se)))throw new Error(A0e());let{storybookBuildDir:Be}=le,{buildScriptName:be}=le,Te={storybookBuildDir:"--storybook-build-dir",playwright:"--playwright",cypress:"--cypress"},Ee=Object.keys(Te).filter(Se=>!!le[Se]);if(Ee.length>1)throw new Error(fb(Ee.map(Se=>Te[Se])));if(le.onlyChanged&&le.onlyStoryFiles)throw new Error(fb(["--only-changed","--only-story-files"]));if(le.onlyChanged&&le.onlyStoryNames)throw new Error(fb(["--only-changed","--only-story-names"]));if(le.onlyStoryNames&&le.onlyStoryFiles)throw new Error(fb(["--only-story-files","--only-story-names"]));if(le.untraced&&!le.onlyChanged)throw new Error(pb("--untraced","--only-changed"));if(le.externals&&!le.onlyChanged)throw new Error(pb("--externals","--only-changed"));if(le.traceChanged&&!le.onlyChanged)throw new Error(pb("--trace-changed","--only-changed"));if(le.junitReport&&le.exitOnceUploaded)throw new Error(z3(["--junit-report","--exit-once-uploaded"]));if(le.buildScriptName&&le.buildCommand)throw new Error(z3(["--build-script-name","--build-command"]));if(le.buildCommand&&!le.outputDir)throw new Error(pb("--build-command","--output-dir"));if(typeof le.junitReport=="string"&&LN__namespace.default.extname(le.junitReport)!==".xml")throw new Error(F0e());let Me=le;if(n.preserveMissing&&(a.info(""),a.info(J0e({flag:"preserveMissing"}))),Be||le.buildCommand||Tn(Me))return Me;(typeof o!="object"||typeof o.scripts!="object")&&(a.error(D0e(u)),process.exit(252));let{scripts:At}=o;if(typeof be!="string"&&(be="build-storybook",!At[be])){let[Se]=Object.entries(At).find(([,je])=>je.startsWith("build-storybook"))||[];Se&&(be=Se);}if(At&&be&&At[be])return {...Me,buildScriptName:be};throw new Error($0e(be))}var tbe=chunkTKGT252T_js.e(DB()),sS=class{constructor(t,r){this.tasks=t,this.options=r,this.updateRenderer=new tbe.default(t,r);}render(){this.updateRenderer.render();for(let t of this.tasks){let r;t.subscribe(n=>{n.type==="TITLE"&&this.options.log.file(`${t.title}`),n.type==="DATA"&&r!==n.data&&(r=n.data,this.options.log.file(` \u2192 ${n.data}`));});}}end(){this.updateRenderer.end();}};sS.nonTTY=!1;var aS=class{constructor(t,r){this.tasks=t,this.options=r;}render(){for(let t of this.tasks){let r;t.subscribe(n=>{n.type==="TITLE"&&this.options.log.info(`${t.title}`),n.type==="DATA"&&r!==n.data&&(r=n.data,this.options.log.info(` \u2192 ${n.data}`));});}}end(){}};aS.nonTTY=!0;var rbe=chunkTKGT252T_js.e(chunk6IZZOM5T_js.D());var ej={name:"chromatic",version:"13.0.2--canary.1191.15905942413.0",description:"Automate visual testing across browsers. Gather UI feedback. Versioned documentation.",keywords:["storybook-addon","storybook","addon","test","popular"],homepage:"https://www.chromatic.com",bugs:{url:"https://github.com/chromaui/chromatic-cli",email:"support@chromatic.com"},repository:{type:"git",url:"git+https://github.com/chromaui/chromatic-cli.git"},license:"MIT",author:{name:"Chromatic",email:"support@chromatic.com"},exports:{".":{types:"./isChromatic.d.ts",require:"./isChromatic.js",import:"./isChromatic.mjs"},"./node":{types:"./dist/node.d.ts",require:"./dist/node.js",node:"./dist/node.js"},"./isChromatic":{types:"./isChromatic.d.ts",require:"./isChromatic.js",import:"./isChromatic.mjs"},"./package.json":"./package.json"},main:"isChromatic.js",module:"isChromatic.mjs",typesVersions:{"*":{"*":["./isChromatic.d.ts"],isChromatic:["./isChromatic.d.ts"],node:["dist/node.d.ts"]}},bin:{chroma:"dist/bin.js",chromatic:"dist/bin.js","chromatic-cli":"dist/bin.js"},files:["dist/*.js","dist/node.d.ts","isChromatic.js","isChromatic.mjs","isChromatic.d.ts"],resolutions:{"any-observable":"^0.5.1"},devDependencies:{"@actions/core":"^1.10.0","@actions/github":"^5.0.0","@antfu/ni":"^0.21.5","@auto-it/slack":"^11.1.6","@discoveryjs/json-ext":"^0.5.7","@eslint-community/eslint-plugin-eslint-comments":"^4.3.0","@sentry/cli":"^2.37.0","@sentry/node":"^8.30.0","@snyk/dep-graph":"^2.9.0","@storybook/addon-essentials":"^8.1.5","@storybook/addon-webpack5-compiler-swc":"^1.0.3","@storybook/csf-tools":"^8.1.5","@storybook/linter-config":"^4.0.0","@storybook/react":"^8.1.5","@storybook/react-webpack5":"^8.1.5","@tsconfig/node16":"^16.1.1","@types/archiver":"^5.3.1","@types/async-retry":"^1.4.3","@types/cross-spawn":"^6.0.2","@types/fs-extra":"^9.0.13","@types/jsonfile":"^6.0.1","@types/listr":"^0.14.4","@types/node":"18.x","@types/picomatch":"^2.3.0","@types/progress-stream":"^2.0.2","@types/prompts":"^2.4.9","@types/semver":"^7.3.9","@types/webpack-env":"^1.18.5","@types/ws":"^8","@typescript-eslint/eslint-plugin":"^6.8.0","@typescript-eslint/parser":"^6.8.0","@vitest/coverage-v8":"^2.0.5","ansi-html":"0.0.9","any-observable":"^0.5.1",archiver:"^5.3.0","async-retry":"^1.3.3",auto:"^11.0.5",boxen:"^7.1.1",chalk:"^4.1.2","clean-package":"^2.2.0",cpy:"^8.1.2","cross-env":"^7.0.3","cross-spawn":"^7.0.2",debug:"^4.3.2",dotenv:"^16.4.5","env-ci":"^11.1.0",eslint:"^9.10.0","eslint-config-prettier":"^9.0.0","eslint-plugin-import":"^2.28.1","eslint-plugin-jsdoc":"^48.2.6","eslint-plugin-json":"^3.1.0","eslint-plugin-no-secrets":"^1.0.2","eslint-plugin-react":"^7.33.2","eslint-plugin-security":"^3.0.0","eslint-plugin-simple-import-sort":"^12.1.0","eslint-plugin-sort-class-members":"^1.20.0","eslint-plugin-unicorn":"^53.0.0",esm:"^3.2.25",execa:"^7.2.0","fake-tag":"^2.0.0",filesize:"^10.1.0","find-up":"^7.0.0","formdata-node":"^6.0.3","fs-extra":"^10.0.0",globals:"^15.3.0","https-proxy-agent":"^7.0.2",husky:"^7.0.0",json5:"^2.2.3",jsonfile:"^6.0.1","junit-report-builder":"3.1.0",listr:"0.14.3","listr-update-renderer":"^0.5.0",meow:"^9.0.0","mock-fs":"^5.1.2","no-proxy":"^1.0.3","node-ask":"^1.0.1","node-fetch":"3.2.10","npm-run-all":"^4.0.2",observable:"^2.1.4","os-browserify":"^0.3.0","p-limit":"3.1.0",picomatch:"2.2.2","pkg-up":"^3.1.0",pluralize:"^8.0.0",prettier:"^3.2.5","progress-stream":"^2.0.0",prompts:"^2.4.2","prop-types":"^15.7.2",react:"^17.0.2","react-dom":"^17.0.2","read-package-up":"^11.0.0",semver:"^7.3.5",slash:"^3.0.0","snyk-nodejs-lockfile-parser":"^1.58.18","snyk-nodejs-plugin":"^1.4.3","sort-package-json":"1.50.0",storybook:"^8.1.5","string-argv":"^0.3.1","strip-ansi":"^7.1.0","tmp-promise":"3.0.2","ts-dedent":"^1.0.0","ts-loader":"^9.2.5",tsup:"^7.2.0",typescript:"^5.2.2","typescript-eslint":"^7.11.0","util-deprecate":"^1.0.2",uuid:"^8.3.2",vite:"^4.4.9","vite-tsconfig-paths":"^5.1.4",vitest:"^2.0.5","why-is-node-running":"^2.1.2",ws:"^8.18.2","xxhash-wasm":"^1.0.2","yarn-or-npm":"^3.0.1","zen-observable":"^0.8.15",zod:"^3.22.2"},peerDependencies:{"@chromatic-com/cypress":"^0.*.* || ^1.0.0","@chromatic-com/playwright":"^0.*.* || ^1.0.0"},peerDependenciesMeta:{"@chromatic-com/cypress":{optional:!0},"@chromatic-com/playwright":{optional:!0}},publishConfig:{access:"public",registry:"https://registry.npmjs.org/"},docs:"https://www.chromatic.com/docs/cli",storybook:{icon:"https://user-images.githubusercontent.com/263385/101995175-2e087800-3c96-11eb-9a33-9860a1c3ce62.gif",displayName:"Chromatic"}};function tj(e){let{input:t,flags:r,help:n}=(0, rbe.default)(`
|
|
454
|
+
`);var Q3=e=>Array.isArray(e)?e.at(-1):e,nw=e=>e?Array.isArray(e)?e:[e]:[],Sc=e=>e===""?!0:e,Q0e=(e,t)=>e===""?t:e,Z0e=(e,t)=>["",!0,void 0].includes(e)?t:e,iw=e=>{let t=e.filter(Boolean);return t.length>0?t:void 0},ebe=e=>Object.fromEntries(Object.entries(e).filter(([t,r])=>r!==void 0)),hb=(e,t)=>{switch(typeof e){case"boolean":return e?t:void 0;case"string":return e||t;default:return}};function Z3(e){var ue,fe;let{argv:t,env:r,flags:n,extraOptions:i,configuration:s,log:a,packageJson:o,packagePath:u}=e,l={projectToken:r.CHROMATIC_PROJECT_TOKEN,fromCI:!!process.env.CI,inAction:!1,dryRun:!1,debug:!1,autoAcceptChanges:!1,exitZeroOnChanges:!1,exitOnceUploaded:!1,diagnosticsFile:void 0,fileHashing:!0,interactive:!1,isLocalBuild:!1,originalArgv:t,onlyChanged:void 0,onlyStoryFiles:void 0,onlyStoryNames:void 0,untraced:void 0,externals:void 0,traceChanged:void 0,list:void 0,logFile:void 0,skip:void 0,forceRebuild:void 0,junitReport:void 0,zip:void 0,skipUpdateCheck:void 0,ignoreLastBuildOnBranch:void 0,preserveMissingSpecs:void 0,buildScriptName:void 0,buildCommand:void 0,playwright:void 0,cypress:void 0,outputDir:void 0,storybookBuildDir:void 0,storybookBaseDir:void 0,storybookConfigDir:void 0,storybookLogFile:void 0,ownerName:void 0,repositorySlug:void 0,branchName:void 0,patchHeadRef:void 0,patchBaseRef:void 0,uploadMetadata:void 0},[c,p]=(n.patchBuild||"").split("...").filter(Boolean),[h,f]=(n.branchName||"").split(":").reverse(),[d,m,...y]=((ue=n.repositorySlug)==null?void 0:ue.split("/"))||[],g="chromatic.log",v="chromatic-build-{buildNumber}.xml",T="chromatic-diagnostics.json",S="build-storybook.log",x="build-archive.log",b=ebe({projectToken:Q3(n.projectToken),onlyChanged:Sc(n.onlyChanged),onlyStoryFiles:iw(nw(n.onlyStoryFiles)),onlyStoryNames:iw(nw(n.onlyStoryNames)),untraced:iw(nw(n.untraced)),externals:iw(nw(n.externals)),traceChanged:Sc(n.traceChanged),list:n.list,logFile:Q0e(n.logFile,g),fromCI:n.ci,skip:Sc(n.skip),dryRun:n.dryRun,fileHashing:n.fileHashing,forceRebuild:Sc(n.forceRebuild),debug:n.debug,diagnosticsFile:hb(n.diagnosticsFile,T),junitReport:Q0e(n.junitReport,v),zip:n.zip,skipUpdateCheck:n.skipUpdateCheck,autoAcceptChanges:Sc(n.autoAcceptChanges),exitZeroOnChanges:Sc(n.exitZeroOnChanges),exitOnceUploaded:Sc(n.exitOnceUploaded),ignoreLastBuildOnBranch:n.ignoreLastBuildOnBranch,preserveMissingSpecs:n.preserveMissing,buildScriptName:n.buildScriptName,buildCommand:n.buildCommand,playwright:Sc(n.playwright),cypress:Sc(n.cypress),outputDir:Q3(n.outputDir),storybookBuildDir:Q3(n.storybookBuildDir),storybookBaseDir:n.storybookBaseDir,storybookConfigDir:n.storybookConfigDir,storybookLogFile:n.playwright||n.cypress?Z0e(n.storybookLogFile,x):Z0e(n.storybookLogFile,S),ownerName:f||d,repositorySlug:n.repositorySlug,branchName:h,patchHeadRef:c,patchBaseRef:p,uploadMetadata:n.uploadMetadata}),{logFile:A,diagnosticsFile:D,junitReport:P,storybookLogFile:V,...W}=s||{},oe=ebe({...W,logFile:hb(A,g),diagnosticsFile:hb(D,T),junitReport:hb(P,v),storybookLogFile:hb(V,S)}),le={...l,...oe,...b,...i,interactive:!process.env.CI&&!n.ci&&!n.debug&&!!n.interactive&&!!process.stdout.isTTY&&process.env.NODE_ENV!=="test"};if(le.debug&&(a.setLevel("debug"),a.setInteractive(!1)),(le.debug||le.uploadMetadata)&&(le.logFile=le.logFile??g,le.diagnosticsFile=le.diagnosticsFile??T),!le.projectToken&&!(le.projectId&&le.userToken))throw new Error(W0e());if(d&&(!m||y.length>0))throw new Error(U0e());if(f&&d&&f!==d)throw new Error(w0e(f,d));if(n.patchBuild){if(!le.patchHeadRef||!le.patchBaseRef)throw new Error(M0e());if(le.patchHeadRef===le.patchBaseRef)throw new Error(b0e())}if((fe=le.onlyStoryNames)!=null&&fe.some(Se=>!/[\w*]\/[\w*]/.test(Se)))throw new Error(A0e());let{storybookBuildDir:Be}=le,{buildScriptName:be}=le,Te={storybookBuildDir:"--storybook-build-dir",playwright:"--playwright",cypress:"--cypress"},Ee=Object.keys(Te).filter(Se=>!!le[Se]);if(Ee.length>1)throw new Error(fb(Ee.map(Se=>Te[Se])));if(le.onlyChanged&&le.onlyStoryFiles)throw new Error(fb(["--only-changed","--only-story-files"]));if(le.onlyChanged&&le.onlyStoryNames)throw new Error(fb(["--only-changed","--only-story-names"]));if(le.onlyStoryNames&&le.onlyStoryFiles)throw new Error(fb(["--only-story-files","--only-story-names"]));if(le.untraced&&!le.onlyChanged)throw new Error(pb("--untraced","--only-changed"));if(le.externals&&!le.onlyChanged)throw new Error(pb("--externals","--only-changed"));if(le.traceChanged&&!le.onlyChanged)throw new Error(pb("--trace-changed","--only-changed"));if(le.junitReport&&le.exitOnceUploaded)throw new Error(z3(["--junit-report","--exit-once-uploaded"]));if(le.buildScriptName&&le.buildCommand)throw new Error(z3(["--build-script-name","--build-command"]));if(le.buildCommand&&!le.outputDir)throw new Error(pb("--build-command","--output-dir"));if(typeof le.junitReport=="string"&&LN__namespace.default.extname(le.junitReport)!==".xml")throw new Error(F0e());let Me=le;if(n.preserveMissing&&(a.info(""),a.info(J0e({flag:"preserveMissing"}))),Be||le.buildCommand||Tn(Me))return Me;(typeof o!="object"||typeof o.scripts!="object")&&(a.error(D0e(u)),process.exit(252));let{scripts:At}=o;if(typeof be!="string"&&(be="build-storybook",!At[be])){let[Se]=Object.entries(At).find(([,je])=>je.startsWith("build-storybook"))||[];Se&&(be=Se);}if(At&&be&&At[be])return {...Me,buildScriptName:be};throw new Error($0e(be))}var tbe=chunkTKGT252T_js.e(DB()),sS=class{constructor(t,r){this.tasks=t,this.options=r,this.updateRenderer=new tbe.default(t,r);}render(){this.updateRenderer.render();for(let t of this.tasks){let r;t.subscribe(n=>{n.type==="TITLE"&&this.options.log.file(`${t.title}`),n.type==="DATA"&&r!==n.data&&(r=n.data,this.options.log.file(` \u2192 ${n.data}`));});}}end(){this.updateRenderer.end();}};sS.nonTTY=!1;var aS=class{constructor(t,r){this.tasks=t,this.options=r;}render(){for(let t of this.tasks){let r;t.subscribe(n=>{n.type==="TITLE"&&this.options.log.info(`${t.title}`),n.type==="DATA"&&r!==n.data&&(r=n.data,this.options.log.info(` \u2192 ${n.data}`));});}}end(){}};aS.nonTTY=!0;var rbe=chunkTKGT252T_js.e(chunk6IZZOM5T_js.D());var ej={name:"chromatic",version:"13.0.2--canary.1191.15933176042.0",description:"Automate visual testing across browsers. Gather UI feedback. Versioned documentation.",keywords:["storybook-addon","storybook","addon","test","popular"],homepage:"https://www.chromatic.com",bugs:{url:"https://github.com/chromaui/chromatic-cli",email:"support@chromatic.com"},repository:{type:"git",url:"git+https://github.com/chromaui/chromatic-cli.git"},license:"MIT",author:{name:"Chromatic",email:"support@chromatic.com"},exports:{".":{types:"./isChromatic.d.ts",require:"./isChromatic.js",import:"./isChromatic.mjs"},"./node":{types:"./dist/node.d.ts",require:"./dist/node.js",node:"./dist/node.js"},"./isChromatic":{types:"./isChromatic.d.ts",require:"./isChromatic.js",import:"./isChromatic.mjs"},"./package.json":"./package.json"},main:"isChromatic.js",module:"isChromatic.mjs",typesVersions:{"*":{"*":["./isChromatic.d.ts"],isChromatic:["./isChromatic.d.ts"],node:["dist/node.d.ts"]}},bin:{chroma:"dist/bin.js",chromatic:"dist/bin.js","chromatic-cli":"dist/bin.js"},files:["dist/*.js","dist/node.d.ts","isChromatic.js","isChromatic.mjs","isChromatic.d.ts"],resolutions:{"any-observable":"^0.5.1"},devDependencies:{"@actions/core":"^1.10.0","@actions/github":"^5.0.0","@antfu/ni":"^0.21.5","@auto-it/slack":"^11.1.6","@discoveryjs/json-ext":"^0.5.7","@eslint-community/eslint-plugin-eslint-comments":"^4.3.0","@sentry/cli":"^2.37.0","@sentry/node":"^8.30.0","@snyk/dep-graph":"^2.9.0","@storybook/addon-essentials":"^8.1.5","@storybook/addon-webpack5-compiler-swc":"^1.0.3","@storybook/csf-tools":"^8.1.5","@storybook/linter-config":"^4.0.0","@storybook/react":"^8.1.5","@storybook/react-webpack5":"^8.1.5","@tsconfig/node16":"^16.1.1","@types/archiver":"^5.3.1","@types/async-retry":"^1.4.3","@types/cross-spawn":"^6.0.2","@types/fs-extra":"^9.0.13","@types/jsonfile":"^6.0.1","@types/listr":"^0.14.4","@types/node":"18.x","@types/picomatch":"^2.3.0","@types/progress-stream":"^2.0.2","@types/prompts":"^2.4.9","@types/semver":"^7.3.9","@types/webpack-env":"^1.18.5","@types/ws":"^8","@typescript-eslint/eslint-plugin":"^6.8.0","@typescript-eslint/parser":"^6.8.0","@vitest/coverage-v8":"^2.0.5","ansi-html":"0.0.9","any-observable":"^0.5.1",archiver:"^5.3.0","async-retry":"^1.3.3",auto:"^11.0.5",boxen:"^7.1.1",chalk:"^4.1.2","clean-package":"^2.2.0",cpy:"^8.1.2","cross-env":"^7.0.3","cross-spawn":"^7.0.2",debug:"^4.3.2",dotenv:"^16.4.5","env-ci":"^11.1.0",eslint:"^9.10.0","eslint-config-prettier":"^9.0.0","eslint-plugin-import":"^2.28.1","eslint-plugin-jsdoc":"^48.2.6","eslint-plugin-json":"^3.1.0","eslint-plugin-no-secrets":"^1.0.2","eslint-plugin-react":"^7.33.2","eslint-plugin-security":"^3.0.0","eslint-plugin-simple-import-sort":"^12.1.0","eslint-plugin-sort-class-members":"^1.20.0","eslint-plugin-unicorn":"^53.0.0",esm:"^3.2.25",execa:"^7.2.0","fake-tag":"^2.0.0",filesize:"^10.1.0","find-up":"^7.0.0","formdata-node":"^6.0.3","fs-extra":"^10.0.0",globals:"^15.3.0","https-proxy-agent":"^7.0.2",husky:"^7.0.0",json5:"^2.2.3",jsonfile:"^6.0.1","junit-report-builder":"3.1.0",listr:"0.14.3","listr-update-renderer":"^0.5.0",meow:"^9.0.0","mock-fs":"^5.1.2","no-proxy":"^1.0.3","node-ask":"^1.0.1","node-fetch":"3.2.10","npm-run-all":"^4.0.2",observable:"^2.1.4","os-browserify":"^0.3.0","p-limit":"3.1.0",picomatch:"2.2.2","pkg-up":"^3.1.0",pluralize:"^8.0.0",prettier:"^3.2.5","progress-stream":"^2.0.0",prompts:"^2.4.2","prop-types":"^15.7.2",react:"^17.0.2","react-dom":"^17.0.2","read-package-up":"^11.0.0",semver:"^7.3.5",slash:"^3.0.0","snyk-nodejs-lockfile-parser":"^1.58.18","snyk-nodejs-plugin":"^1.4.3","sort-package-json":"1.50.0",storybook:"^8.1.5","string-argv":"^0.3.1","strip-ansi":"^7.1.0","tmp-promise":"3.0.2","ts-dedent":"^1.0.0","ts-loader":"^9.2.5",tsup:"^7.2.0",typescript:"^5.2.2","typescript-eslint":"^7.11.0","util-deprecate":"^1.0.2",uuid:"^8.3.2",vite:"^4.4.9","vite-tsconfig-paths":"^5.1.4",vitest:"^2.0.5","why-is-node-running":"^2.1.2",ws:"^8.18.2","xxhash-wasm":"^1.0.2","yarn-or-npm":"^3.0.1","zen-observable":"^0.8.15",zod:"^3.22.2"},peerDependencies:{"@chromatic-com/cypress":"^0.*.* || ^1.0.0","@chromatic-com/playwright":"^0.*.* || ^1.0.0"},peerDependenciesMeta:{"@chromatic-com/cypress":{optional:!0},"@chromatic-com/playwright":{optional:!0}},publishConfig:{access:"public",registry:"https://registry.npmjs.org/"},docs:"https://www.chromatic.com/docs/cli",storybook:{icon:"https://user-images.githubusercontent.com/263385/101995175-2e087800-3c96-11eb-9a33-9860a1c3ce62.gif",displayName:"Chromatic"}};function tj(e){let{input:t,flags:r,help:n}=(0, rbe.default)(`
|
|
455
455
|
Chromatic CLI
|
|
456
456
|
https://www.chromatic.com/docs/cli
|
|
457
457
|
|
|
@@ -957,7 +957,7 @@ ${a.message}`)}}async function FDr(e,t){if(!(e.skip||!e.options.fileHashing)){St
|
|
|
957
957
|
}
|
|
958
958
|
}
|
|
959
959
|
}
|
|
960
|
-
`,HNr=async e=>{let{log:t}=e,{junitReport:r}=e.options,{number:n}=e.build,i=typeof r=="boolean"&&r?"chromatic-build-{buildNumber}.xml":r;if(!i){t.debug("junit report not configured, skipping");return}e.reportPath=LN__namespace.default.resolve(i.replaceAll("{buildNumber}",String(n)));let s=await GNr(e),a=(s.completedAt||Date.now())-s.createdAt,o=$$.default.testSuite().name(`Chromatic build ${s.number}`).time(Math.round(a/1e3)).timestamp(new Date(s.createdAt).toISOString()).property("buildNumber",s.number).property("buildStatus",s.status).property("buildUrl",s.webUrl).property("storybookUrl",s.storybookUrl);for(let u of s.tests)$Nr(o,u);$$.default.writeTo(e.reportPath),t.info(uN(e.reportPath,"JUnit XML"));},GNr=async e=>{let r=0,n=[];for(;;){let{app:{build:i}}=await e.client.runQuery(VNr,{buildNumber:e.build.number,skip:r,limit:1e3},{headers:{Authorization:`Bearer ${e.build.reportToken}`}});if(n.push(...i.tests),i.tests.length<1e3)return {...i,tests:n};r+=1e3;}},$Nr=(e,t)=>{let{status:r,result:n,spec:i,parameters:s,mode:a}=t,o=a.name||`[${s.viewport}px]`,u=s.viewportIsDefault?"":o,l=e.testCase().className(i.component.name.replaceAll(/[/|]/g,"."));switch(l.property("result",r).name(`${i.name} ${u}`),r){case"FAILED":l.error("Server error while taking snapshot, please try again",r);break;case"BROKEN":l.error("Snapshot is broken due to an error in your Storybook",r);break;case"DENIED":l.failure("Snapshot was denied by a user",r);break;case"PENDING":l.failure("Snapshot contains visual changes and must be reviewed",r);break;default:["SKIPPED","PRESERVED"].includes(n)&&l.skipped();}};function K$(e){return kn({name:"report",title:L6e.title,skip:t=>t.skip,steps:[St(k6e),HNr,St(F6e,!0)]})}chunkTKGT252T_js.e(N8e(),1);chunkTKGT252T_js.e(nK(),1);chunkTKGT252T_js.e(aK(),1);var V8e=chunkTKGT252T_js.e(dR(),1);chunkTKGT252T_js.e(q8e(),1);var H8e=V8e.default;var G8e=1e3,dMr=1006,$8e="Build complete",mMr=at.object({completedAt:at.number().positive().optional(),inProgressCount:at.number().min(0),status:at.string()}),dp=class extends Error{constructor(r,n,i,s){super(r);this.statusCode=n;this.reason=i;this.originalError=s;this.name="NotifyServiceError";}},GE=class extends dp{constructor(t,r,n,i){super(t,r,n,i),this.name="NotifyConnectionError";}},Sx=class extends dp{constructor(t,r,n,i){super(t,r,n,i),this.name="NotifyServiceMessageTimeoutError";}};async function dK({notifyServiceUrl:e,buildId:t,progressMessageCallback:r,log:n}){let
|
|
960
|
+
`,HNr=async e=>{let{log:t}=e,{junitReport:r}=e.options,{number:n}=e.build,i=typeof r=="boolean"&&r?"chromatic-build-{buildNumber}.xml":r;if(!i){t.debug("junit report not configured, skipping");return}e.reportPath=LN__namespace.default.resolve(i.replaceAll("{buildNumber}",String(n)));let s=await GNr(e),a=(s.completedAt||Date.now())-s.createdAt,o=$$.default.testSuite().name(`Chromatic build ${s.number}`).time(Math.round(a/1e3)).timestamp(new Date(s.createdAt).toISOString()).property("buildNumber",s.number).property("buildStatus",s.status).property("buildUrl",s.webUrl).property("storybookUrl",s.storybookUrl);for(let u of s.tests)$Nr(o,u);$$.default.writeTo(e.reportPath),t.info(uN(e.reportPath,"JUnit XML"));},GNr=async e=>{let r=0,n=[];for(;;){let{app:{build:i}}=await e.client.runQuery(VNr,{buildNumber:e.build.number,skip:r,limit:1e3},{headers:{Authorization:`Bearer ${e.build.reportToken}`}});if(n.push(...i.tests),i.tests.length<1e3)return {...i,tests:n};r+=1e3;}},$Nr=(e,t)=>{let{status:r,result:n,spec:i,parameters:s,mode:a}=t,o=a.name||`[${s.viewport}px]`,u=s.viewportIsDefault?"":o,l=e.testCase().className(i.component.name.replaceAll(/[/|]/g,"."));switch(l.property("result",r).name(`${i.name} ${u}`),r){case"FAILED":l.error("Server error while taking snapshot, please try again",r);break;case"BROKEN":l.error("Snapshot is broken due to an error in your Storybook",r);break;case"DENIED":l.failure("Snapshot was denied by a user",r);break;case"PENDING":l.failure("Snapshot contains visual changes and must be reviewed",r);break;default:["SKIPPED","PRESERVED"].includes(n)&&l.skipped();}};function K$(e){return kn({name:"report",title:L6e.title,skip:t=>t.skip,steps:[St(k6e),HNr,St(F6e,!0)]})}chunkTKGT252T_js.e(N8e(),1);chunkTKGT252T_js.e(nK(),1);chunkTKGT252T_js.e(aK(),1);var V8e=chunkTKGT252T_js.e(dR(),1);chunkTKGT252T_js.e(q8e(),1);var H8e=V8e.default;var G8e=1e3,dMr=1006,$8e="Build complete",mMr=at.object({completedAt:at.number().positive().optional(),inProgressCount:at.number().min(0),status:at.string()}),dp=class extends Error{constructor(r,n,i,s){super(r);this.statusCode=n;this.reason=i;this.originalError=s;this.name="NotifyServiceError";}},GE=class extends dp{constructor(t,r,n,i){super(t,r,n,i),this.name="NotifyConnectionError";}},Sx=class extends dp{constructor(t,r,n,i){super(t,r,n,i),this.name="NotifyServiceMessageTimeoutError";}};async function dK({notifyServiceUrl:e,buildId:t,progressMessageCallback:r,log:n,headers:i}){let s=`${e}/build/${t}`,a=new H8e(s,{handshakeTimeout:5e3,headers:i});return await new Promise((o,u)=>{a.on("open",()=>{n.debug(`notify service handshake successful at ${s}`);}),a.on("close",(l,c)=>{let p=c.toString();n.debug(`notify service connection closed with code ${l}: ${p}`),l===G8e&&p===$8e&&o(),c.toString().includes("408 Request Timeout")&&u(new Sx("Timed out waiting for message from notify service",408,c.toString())),l===dMr&&u(new GE("Failed to connect to notify service",l,p)),u(new dp("Notify service connection closed unexpectedly",l,p));}),a.on("error",l=>{let c=l.code;(c==="ECONNREFUSED"||c==="ENOTFOUND"||c==="ETIMEDOUT")&&u(new GE("Failed to connect to notify service",void 0,void 0,l)),u(new dp("Notify service error occurred",void 0,void 0,l));}),a.on("message",l=>{try{n.debug(`notify service message: ${l}`);let c=mMr.parse(JSON.parse(l.toString()));r&&r(c),c.completedAt&&(n.debug("notify service: build complete"),a.close(G8e,$8e),o());}catch(c){u(new dp("Unexpected error handling notify service message",void 0,void 0,c));}});})}var yR=chunkTKGT252T_js.e(chunk6IZZOM5T_js.G()),mK=chunkTKGT252T_js.e(chunkFAGUPA7O_js.H()),K8e=chunkTKGT252T_js.e(chunk6IZZOM5T_js.H());var Y8e=({build:e,exitCode:t,isOnboarding:r})=>{let n=r?e.app.setupUrl:e.webUrl,i=[];return e.changeCount>0&&i.push(yR.default`${chunk6IZZOM5T_js.L} {bold Found ${(0, mK.default)("visual changes",e.changeCount,!0)}}`),e.accessibilityChangeCount>0&&i.push(yR.default`${chunk6IZZOM5T_js.L} {bold Found ${(0, mK.default)("accessibility changes",e.accessibilityChangeCount,!0)}}`),(0, K8e.dedent)(yR.default`
|
|
961
961
|
${i.join(`
|
|
962
962
|
`)}
|
|
963
963
|
|
|
@@ -1001,7 +1001,7 @@ ${a.message}`)}}async function FDr(e,t){if(!(e.skip||!e.options.fileHashing)){St
|
|
|
1001
1001
|
}
|
|
1002
1002
|
}
|
|
1003
1003
|
}
|
|
1004
|
-
`,SMr=async(e,t)=>{var y,g,v,T,S;let{client:r,log:n,uploadedBytes:i}=e,{app:s,number:a,tests:o,testCount:u,actualTestCount:l,reportToken:c}=e.build;s.repository&&i&&!e.options.junitReport&&n.info(o9e(s.repository.provider));let p=e.options.interactive&&u===l&&(o==null?void 0:o.map(({spec:x,parameters:b,mode:A})=>{let D=A.name||`[${b.viewport}px]`,P=b.viewportIsDefault?"":D;return `${x.component.displayName} \u203A ${x.name} ${P}`})),h=chunkFAGUPA7O_js.W(({cursor:x,label:b})=>{var A,D;t.output=gK(e,{cursor:x,label:b}).output,(D=(A=e.options).experimental_onTaskProgress)==null||D.call(A,{...e},{progress:x,total:l,unit:"snapshots"});},e.options.interactive?e.env.CHROMATIC_POLL_INTERVAL:e.env.CHROMATIC_OUTPUT_INTERVAL),f=async()=>{let x={headers:{Authorization:`Bearer ${c}`}},b=await r.runQuery(gMr,{number:a},x);if(e.build={...e.build,...b.app.build},e.build.completedAt)return e.build;if(l>0){let{inProgressCount:A=0}=e.build,D=l-A+1,P=p&&p[D-1]||"";h({cursor:D,label:P});}return await chunkFAGUPA7O_js.V(e.env.CHROMATIC_POLL_INTERVAL),f()},d=x=>{if(l>0){let{inProgressCount:b=0}=x,A=l-b+1,D=p&&p[A-1]||"";h({cursor:A,label:D});}};try{await dK({notifyServiceUrl:e.env.CHROMATIC_NOTIFY_SERVICE_URL,buildId:e.build.id,progressMessageCallback:d,log:e.log});}catch(x){x instanceof GE?e.log.error("Failed to connect to notify service, falling back to polling"):x instanceof Sx?(e.log.error("Timed out waiting for message from notify service, falling back to polling"),ls(x)):x instanceof dp?e.log.error(`Error getting updates from notify service: ${x.message} code: ${x.statusCode}, reason: ${x.reason}, original error: ${(y=x.originalError)==null?void 0:y.message}`):e.log.error(`Unexpected error from notify service: ${x.message}`);}let m=await f();switch(m.status){case"PASSED":chunkFAGUPA7O_js.G(e,chunkFAGUPA7O_js.F.OK),e.log.info(SK(e)),St(Z8e,!0)(e,t);break;case"ACCEPTED":case"PENDING":case"DENIED":{m.autoAcceptChanges||((g=e.options)==null?void 0:g.exitZeroOnChanges)==="true"||(S=(T=e.git).matchesBranch)!=null&&S.call(T,((v=e.options)==null?void 0:v.exitZeroOnChanges)||!1)?(chunkFAGUPA7O_js.G(e,chunkFAGUPA7O_js.F.OK),e.log.info(SK(e))):(chunkFAGUPA7O_js.G(e,chunkFAGUPA7O_js.F.BUILD_HAS_CHANGES,!0),e.log.error(Y8e(e))),St(e9e,!0)(e,t);break}case"BROKEN":chunkFAGUPA7O_js.G(e,chunkFAGUPA7O_js.F.BUILD_HAS_ERRORS,!0),e.log.error(z8e(e)),St(t9e,!0)(e,t);break;case"FAILED":chunkFAGUPA7O_js.G(e,chunkFAGUPA7O_js.F.BUILD_FAILED,!1),St(r9e,!0)(e,t);break;case"CANCELLED":chunkFAGUPA7O_js.G(e,chunkFAGUPA7O_js.F.BUILD_WAS_CANCELED,!0),St(n9e,!0)(e,t);break;default:throw new Error(`Unexpected build status: ${m.status}`)}};function EK(e){return kn({name:"snapshot",title:J8e(e).title,skip:t=>t.skip?!0:t.skipSnapshots?i9e(t).output:t.options.dryRun?Q8e(t).output:!1,steps:[St(gK),SMr]})}function l9e(e){let{storybookBaseDir:t}=e.options||{};if(t)return t;let{rootPath:r}=e.git||{};return r?chunkFAGUPA7O_js.fa(LN__namespace.default.join(".",LN__namespace.default.relative(r,""))):"."}var f9e=chunkTKGT252T_js.e(chunkIM5VGDJQ_js.a());var c9e=chunkTKGT252T_js.e(chunkLTE3MQL2_js.d());var EMr=e=>{var s;let{builder:t,storybookPackages:r,storybookVersion:n}=e,i=typeof t=="string"?t:t==null?void 0:t.name;return i?{name:i,packageVersion:(s=r==null?void 0:r[T_[i]])==null?void 0:s.version}:{name:"webpack4",packageVersion:n}},p9e=async e=>{let t=await(0, c9e.readFile)(e),r=Object.keys(zc).find(s=>zc[s]===t.framework.name),n=EMr(t);return {version:t.storybookPackages&&r?t.storybookPackages[r].version:"",builder:n}};async function TK(e){try{if(e.options.storybookBuildDir){let t=LN__namespace.default.resolve(e.options.storybookBuildDir,"project.json");if((0,f9e.pathExistsSync)(t))return await p9e(t)}return await pLe(e)}catch(t){return e.log.debug(t),{}}}var h9e=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" "),bMr=e=>e.options.playwright?"Playwright for E2E":e.options.cypress?"Cypress for E2E":"E2E",vMr=e=>{if(Tn(e.options))return bMr(e);let{addons:t,version:r,viewLayer:n,builder:i}=e.storybook,s=r&&n?`Storybook ${r} for ${h9e(n)}`:"",a=i?`${s}; using the ${i.name} builder (${i.packageVersion})`:s,o=t==null?void 0:t.filter(u=>u==null?void 0:u.name);return o!=null&&o.length?`${a}; supported addons found: ${o.map(u=>h9e(u.name)).join(", ")}`:`${a}; no supported addons found`},d9e=e=>({status:"initial",title:`Collect ${lr(e)} metadata`}),m9e=e=>({status:"pending",title:`Collecting ${lr(e)} metadata`}),y9e=e=>({status:"success",title:`Collected ${lr(e)} metadata`,output:vMr(e)});var _Mr=async e=>{e.storybook={...await TK(e),baseDir:l9e(e)},e.storybook&&(e.storybook.version&&Hl("storybookVersion",e.storybook.version),e.storybook.viewLayer&&Hl("storybookViewLayer",e.storybook.viewLayer),Ay("storybook",e.storybook));};function bK(e){return kn({name:"storybookInfo",title:d9e(e).title,skip:t=>t.skip,steps:[St(m9e),_Mr,St(y9e,!0)]})}var g9e=chunkTKGT252T_js.e(Ng()),xMr="OK";async function S9e(e,{name:t,url:r}){let{experimental_abortSignal:n}=e.options;return e.log.debug(`Waiting for '${t}' sentinel file to appear at ${r}`),(0, g9e.default)(async i=>{if(n!=null&&n.aborted)return i(n.reason||new Error("Aborted"));try{let a=await(await e.http.fetch(r,{signal:n},{retries:0,noLogErrorBody:!0})).text();if(a!==xMr)return e.log.debug(`Sentinel file '${t}' not OK, got '${a}'.`),i(new Error(`Sentinel file '${t}' not OK.`));e.log.debug(`Sentinel file '${t}' OK.`);}catch(s){let{message:a,response:o={}}=s;if(o.status===403)return i(new Error("Provided signature expired."));if(o.status===404)throw new Error(`Sentinel file '${t}' not present.`);return e.log.getLevel()==="debug"&&e.log.debug(await o.text()),i(new Error(a))}},{retries:185,minTimeout:1e3,maxTimeout:1e3})}var E9e=chunkTKGT252T_js.e(chunk6IZZOM5T_js.G()),T9e=chunkTKGT252T_js.e(chunk6IZZOM5T_js.H());var b9e=()=>(0, T9e.dedent)(E9e.default`
|
|
1004
|
+
`,SMr=async(e,t)=>{var y,g,v,T,S;let{client:r,log:n,uploadedBytes:i}=e,{app:s,number:a,tests:o,testCount:u,actualTestCount:l,reportToken:c}=e.build;s.repository&&i&&!e.options.junitReport&&n.info(o9e(s.repository.provider));let p=e.options.interactive&&u===l&&(o==null?void 0:o.map(({spec:x,parameters:b,mode:A})=>{let D=A.name||`[${b.viewport}px]`,P=b.viewportIsDefault?"":D;return `${x.component.displayName} \u203A ${x.name} ${P}`})),h=chunkFAGUPA7O_js.W(({cursor:x,label:b})=>{var A,D;t.output=gK(e,{cursor:x,label:b}).output,(D=(A=e.options).experimental_onTaskProgress)==null||D.call(A,{...e},{progress:x,total:l,unit:"snapshots"});},e.options.interactive?e.env.CHROMATIC_POLL_INTERVAL:e.env.CHROMATIC_OUTPUT_INTERVAL),f=async()=>{let x={headers:{Authorization:`Bearer ${c}`}},b=await r.runQuery(gMr,{number:a},x);if(e.build={...e.build,...b.app.build},e.build.completedAt)return e.build;if(l>0){let{inProgressCount:A=0}=e.build,D=l-A+1,P=p&&p[D-1]||"";h({cursor:D,label:P});}return await chunkFAGUPA7O_js.V(e.env.CHROMATIC_POLL_INTERVAL),f()},d=x=>{if(l>0){let{inProgressCount:b=0}=x,A=l-b+1,D=p&&p[A-1]||"";h({cursor:A,label:D});}};try{await dK({notifyServiceUrl:e.env.CHROMATIC_NOTIFY_SERVICE_URL,buildId:e.build.id,progressMessageCallback:d,log:e.log,headers:{Authorization:`Bearer ${c}`}});}catch(x){x instanceof GE?e.log.error("Failed to connect to notify service, falling back to polling"):x instanceof Sx?(e.log.error("Timed out waiting for message from notify service, falling back to polling"),ls(x)):x instanceof dp?e.log.error(`Error getting updates from notify service: ${x.message} code: ${x.statusCode}, reason: ${x.reason}, original error: ${(y=x.originalError)==null?void 0:y.message}`):e.log.error(`Unexpected error from notify service: ${x.message}`);}let m=await f();switch(m.status){case"PASSED":chunkFAGUPA7O_js.G(e,chunkFAGUPA7O_js.F.OK),e.log.info(SK(e)),St(Z8e,!0)(e,t);break;case"ACCEPTED":case"PENDING":case"DENIED":{m.autoAcceptChanges||((g=e.options)==null?void 0:g.exitZeroOnChanges)==="true"||(S=(T=e.git).matchesBranch)!=null&&S.call(T,((v=e.options)==null?void 0:v.exitZeroOnChanges)||!1)?(chunkFAGUPA7O_js.G(e,chunkFAGUPA7O_js.F.OK),e.log.info(SK(e))):(chunkFAGUPA7O_js.G(e,chunkFAGUPA7O_js.F.BUILD_HAS_CHANGES,!0),e.log.error(Y8e(e))),St(e9e,!0)(e,t);break}case"BROKEN":chunkFAGUPA7O_js.G(e,chunkFAGUPA7O_js.F.BUILD_HAS_ERRORS,!0),e.log.error(z8e(e)),St(t9e,!0)(e,t);break;case"FAILED":chunkFAGUPA7O_js.G(e,chunkFAGUPA7O_js.F.BUILD_FAILED,!1),St(r9e,!0)(e,t);break;case"CANCELLED":chunkFAGUPA7O_js.G(e,chunkFAGUPA7O_js.F.BUILD_WAS_CANCELED,!0),St(n9e,!0)(e,t);break;default:throw new Error(`Unexpected build status: ${m.status}`)}};function EK(e){return kn({name:"snapshot",title:J8e(e).title,skip:t=>t.skip?!0:t.skipSnapshots?i9e(t).output:t.options.dryRun?Q8e(t).output:!1,steps:[St(gK),SMr]})}function l9e(e){let{storybookBaseDir:t}=e.options||{};if(t)return t;let{rootPath:r}=e.git||{};return r?chunkFAGUPA7O_js.fa(LN__namespace.default.join(".",LN__namespace.default.relative(r,""))):"."}var f9e=chunkTKGT252T_js.e(chunkIM5VGDJQ_js.a());var c9e=chunkTKGT252T_js.e(chunkLTE3MQL2_js.d());var EMr=e=>{var s;let{builder:t,storybookPackages:r,storybookVersion:n}=e,i=typeof t=="string"?t:t==null?void 0:t.name;return i?{name:i,packageVersion:(s=r==null?void 0:r[T_[i]])==null?void 0:s.version}:{name:"webpack4",packageVersion:n}},p9e=async e=>{let t=await(0, c9e.readFile)(e),r=Object.keys(zc).find(s=>zc[s]===t.framework.name),n=EMr(t);return {version:t.storybookPackages&&r?t.storybookPackages[r].version:"",builder:n}};async function TK(e){try{if(e.options.storybookBuildDir){let t=LN__namespace.default.resolve(e.options.storybookBuildDir,"project.json");if((0,f9e.pathExistsSync)(t))return await p9e(t)}return await pLe(e)}catch(t){return e.log.debug(t),{}}}var h9e=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" "),bMr=e=>e.options.playwright?"Playwright for E2E":e.options.cypress?"Cypress for E2E":"E2E",vMr=e=>{if(Tn(e.options))return bMr(e);let{addons:t,version:r,viewLayer:n,builder:i}=e.storybook,s=r&&n?`Storybook ${r} for ${h9e(n)}`:"",a=i?`${s}; using the ${i.name} builder (${i.packageVersion})`:s,o=t==null?void 0:t.filter(u=>u==null?void 0:u.name);return o!=null&&o.length?`${a}; supported addons found: ${o.map(u=>h9e(u.name)).join(", ")}`:`${a}; no supported addons found`},d9e=e=>({status:"initial",title:`Collect ${lr(e)} metadata`}),m9e=e=>({status:"pending",title:`Collecting ${lr(e)} metadata`}),y9e=e=>({status:"success",title:`Collected ${lr(e)} metadata`,output:vMr(e)});var _Mr=async e=>{e.storybook={...await TK(e),baseDir:l9e(e)},e.storybook&&(e.storybook.version&&Hl("storybookVersion",e.storybook.version),e.storybook.viewLayer&&Hl("storybookViewLayer",e.storybook.viewLayer),Ay("storybook",e.storybook));};function bK(e){return kn({name:"storybookInfo",title:d9e(e).title,skip:t=>t.skip,steps:[St(m9e),_Mr,St(y9e,!0)]})}var g9e=chunkTKGT252T_js.e(Ng()),xMr="OK";async function S9e(e,{name:t,url:r}){let{experimental_abortSignal:n}=e.options;return e.log.debug(`Waiting for '${t}' sentinel file to appear at ${r}`),(0, g9e.default)(async i=>{if(n!=null&&n.aborted)return i(n.reason||new Error("Aborted"));try{let a=await(await e.http.fetch(r,{signal:n},{retries:0,noLogErrorBody:!0})).text();if(a!==xMr)return e.log.debug(`Sentinel file '${t}' not OK, got '${a}'.`),i(new Error(`Sentinel file '${t}' not OK.`));e.log.debug(`Sentinel file '${t}' OK.`);}catch(s){let{message:a,response:o={}}=s;if(o.status===403)return i(new Error("Provided signature expired."));if(o.status===404)throw new Error(`Sentinel file '${t}' not present.`);return e.log.getLevel()==="debug"&&e.log.debug(await o.text()),i(new Error(a))}},{retries:185,minTimeout:1e3,maxTimeout:1e3})}var E9e=chunkTKGT252T_js.e(chunk6IZZOM5T_js.G()),T9e=chunkTKGT252T_js.e(chunk6IZZOM5T_js.H());var b9e=()=>(0, T9e.dedent)(E9e.default`
|
|
1005
1005
|
${chunk6IZZOM5T_js.L} Failed to finalize upload. Please check ${chunkFAGUPA7O_js.f("https://status.chromatic.com/")} or contact support.
|
|
1006
1006
|
`);var vK=chunkTKGT252T_js.e(chunkFAGUPA7O_js.H());var v9e=e=>({status:"initial",title:`Publish your built ${lr(e)}`}),_9e=e=>({status:"skipped",title:`Publish your built ${lr(e)}`,output:"Skipped due to --dry-run"}),x9e=(e,t)=>{let r=`Invalid ${lr(e)} build at ${e.sourceDir}`;return e.buildLogFile&&(r+=" (check the build log)"),t&&(r+=`: ${t.message}`),{status:"error",title:`Publishing your built ${lr(e)}`,output:r}},A9e=e=>({status:"pending",title:`Publishing your built ${lr(e)}`,output:"Starting publish"}),P9e=(e,{percentage:t})=>({status:"pending",title:`Publishing your built ${lr(e)}`,output:`${chunkFAGUPA7O_js.X(t)} ${t}%`}),C9e=e=>({status:"pending",title:`Publishing your built ${lr(e)}`,output:"Finalizing upload"}),w9e=e=>{var i;let t=(0, vK.default)("file",e.uploadedFiles,!0),r=bo(e.uploadedBytes||0),n=(i=e.fileInfo)!=null&&i.paths.length&&e.uploadedFiles&&e.fileInfo.paths.length>e.uploadedFiles?`, skipped ${(0, vK.default)("file",e.fileInfo.paths.length-e.uploadedFiles,!0)}`:"";return {status:"success",title:e.uploadedBytes?`Publish complete in ${wl(e)}`:"Publish complete",output:e.uploadedBytes?`Uploaded ${t} (${r})${n}`:"No new files to upload"}},I9e=(e,{path:t})=>({status:"error",title:`Publishing your built ${lr(e)}`,output:`Failed to upload ${t}`});var PMr=async(e,t)=>{var n;if(e.skip)return;let r=(n=e.fileInfo)==null?void 0:n.paths.map(i=>{var s,a,o;return {...((s=e.fileInfo)==null?void 0:s.hashes)&&{contentHash:e.fileInfo.hashes[i]},contentLength:((o=(a=e.fileInfo)==null?void 0:a.lengths.find(({knownAs:u})=>u===i))==null?void 0:o.contentLength)??-1,localPath:LN__namespace.default.join(e.sourceDir,i),targetPath:i}});if(!r)throw new Error(x9e(e).output);await e3e(e,r,{onProgress:chunkFAGUPA7O_js.W((i,s)=>{var o,u;let a=Math.round(i/s*100);t.output=P9e(e,{percentage:a}).output,(u=(o=e.options).experimental_onTaskProgress)==null||u.call(o,{...e},{progress:i,total:s,unit:"bytes"});},e.options.interactive?100:e.env.CHROMATIC_OUTPUT_INTERVAL),onError:(i,s)=>{throw s===i.message?new Error(I9e(e,{path:s}).output):i}});},CMr=async(e,t)=>{var n;if(e.skip||!((n=e.sentinelUrls)!=null&&n.length))return;St(C9e)(e,t);let r=Object.fromEntries(e.sentinelUrls.map(i=>{let{host:s,pathname:a}=new URL(i);return [s+a,{name:a.split("/").at(-1)||"",url:i}]}));try{await Promise.all(Object.values(r).map(i=>S9e(e,i)));}catch(i){throw e.log.error(b9e()),i}};function _K(e){return kn({name:"upload",title:v9e(e).title,skip:t=>t.skip?!0:t.options.dryRun?_9e(t).output:!1,steps:[St(A9e),PMr,CMr,St(w9e,!0)]})}var O9e=chunkTKGT252T_js.e(chunk6IZZOM5T_js.G()),D9e=chunkTKGT252T_js.e(chunk6IZZOM5T_js.H());var N9e=({failureReason:e,storybookUrl:t})=>`${(0, D9e.dedent)(O9e.default`
|
|
1007
1007
|
${chunk6IZZOM5T_js.L} {bold Failed to extract stories from your Storybook}
|
|
@@ -1295,5 +1295,5 @@ exports.e = gCn;
|
|
|
1295
1295
|
exports.f = BMr;
|
|
1296
1296
|
exports.g = SCn;
|
|
1297
1297
|
//# sourceMappingURL=out.js.map
|
|
1298
|
-
//# sourceMappingURL=chunk-
|
|
1299
|
-
//# debugId=
|
|
1298
|
+
//# sourceMappingURL=chunk-PVHHVTXW.js.map
|
|
1299
|
+
//# debugId=ae54734c-3d43-5cd0-a5ef-826d96d2b2e0
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f56fa8ed-7262-573b-a824-3b422f9b774e")}catch(e){}}();
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var chunkPVHHVTXW_js = require('./chunk-PVHHVTXW.js');
|
|
6
6
|
require('./chunk-2E7ZWKIX.js');
|
|
7
7
|
require('./chunk-O2POOKSN.js');
|
|
8
8
|
require('./chunk-IM5VGDJQ.js');
|
|
@@ -12,9 +12,9 @@ var chunk6IZZOM5T_js = require('./chunk-6IZZOM5T.js');
|
|
|
12
12
|
require('./chunk-LZXDNZPW.js');
|
|
13
13
|
require('./chunk-TKGT252T.js');
|
|
14
14
|
|
|
15
|
-
function f(e){var s;if(e.message&&(e.message=chunk6IZZOM5T_js.a(e.message)),(s=e.exception)!=null&&s.values)for(let[p,n]of e.exception.values.entries())n.value&&(e.exception.values[p].value=chunk6IZZOM5T_js.a(n.value));return e}function l(e){if(e.category==="console"){if(e.message==="")return null;e.message&&(e.message=chunk6IZZOM5T_js.a(e.message));}return e}
|
|
15
|
+
function f(e){var s;if(e.message&&(e.message=chunk6IZZOM5T_js.a(e.message)),(s=e.exception)!=null&&s.values)for(let[p,n]of e.exception.values.entries())n.value&&(e.exception.values[p].value=chunk6IZZOM5T_js.a(n.value));return e}function l(e){if(e.category==="console"){if(e.message==="")return null;e.message&&(e.message=chunk6IZZOM5T_js.a(e.message));}return e}chunkPVHHVTXW_js.c({dsn:"https://4fa173db2ef3fb073b8ea153a5466d28@o4504181686599680.ingest.us.sentry.io/4507930289373184",release:"13.0.2--canary.1191.15933176042.0",dist:"cli",sampleRate:1,environment:"production",enabled:process.env.DISABLE_ERROR_MONITORING!=="true"&&!0,enableTracing:!1,integrations:[],initialScope:{tags:{version:process.env.npm_package_version,index_url:process.env.CHROMATIC_INDEX_URL}},beforeSend:f,beforeBreadcrumb:l});async function g(e){try{let{code:s}=await chunkPVHHVTXW_js.e({argv:e});process.exitCode=s;}catch(s){chunkPVHHVTXW_js.a(s);}finally{await chunkPVHHVTXW_js.b(2500),process.exit();}}
|
|
16
16
|
|
|
17
17
|
exports.main = g;
|
|
18
18
|
//# sourceMappingURL=out.js.map
|
|
19
|
-
//# sourceMappingURL=main-
|
|
19
|
+
//# sourceMappingURL=main-ZEEAI5YJ.js.map
|
|
20
20
|
//# debugId=f56fa8ed-7262-573b-a824-3b422f9b774e
|
package/dist/node.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0cf6a3a5-e29f-509e-b640-db78f38007ea")}catch(e){}}();
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var chunkPVHHVTXW_js = require('./chunk-PVHHVTXW.js');
|
|
6
6
|
require('./chunk-2E7ZWKIX.js');
|
|
7
7
|
require('./chunk-O2POOKSN.js');
|
|
8
8
|
require('./chunk-IM5VGDJQ.js');
|
|
@@ -16,19 +16,19 @@ require('./chunk-TKGT252T.js');
|
|
|
16
16
|
|
|
17
17
|
Object.defineProperty(exports, 'getConfiguration', {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkPVHHVTXW_js.d; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, 'getGitInfo', {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkPVHHVTXW_js.g; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, 'run', {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkPVHHVTXW_js.e; }
|
|
28
28
|
});
|
|
29
29
|
Object.defineProperty(exports, 'runAll', {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkPVHHVTXW_js.f; }
|
|
32
32
|
});
|
|
33
33
|
Object.defineProperty(exports, 'createLogger', {
|
|
34
34
|
enumerable: true,
|
package/package.json
CHANGED