var p=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var M=Object.prototype.hasOwnProperty;var P=(e,n)=>{for(var s in n)p(e,s,{get:n[s],enumerable:!0})},N=(e,n,s,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of I(n))!M.call(e,t)&&t!==s&&p(e,t,{get:()=>n[t],enumerable:!(a=O(n,t))||a.enumerable});return e};var _=e=>N(p({},"__esModule",{value:!0}),e);var T={};P(T,{default:()=>F});module.exports=_(T);var E=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};E.SENTRY_RELEASE={id:"1.1.30"};(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="862bb4bb-b436-49e2-840a-adf2fd8e3cd6",e._sentryDebugIdIdentifier="sentry-dbid-862bb4bb-b436-49e2-840a-adf2fd8e3cd6")}catch{}})();var f=require("worker_threads"),d=require("fs"),g=require("path");async function J(e,n=5e3){let s=`https://unpkg.com/${e}/package.json`;try{let a=new AbortController,t=setTimeout(()=>a.abort(),n),r=await fetch(s,{signal:a.signal});return clearTimeout(t),r.ok?(await r.json()).version:void 0}catch{return}}function w(e){return parseInt(e.split(".")[0],10)}function S(e,n){let s=e.split(".").map(Number),a=n.split(".").map(Number);for(let t=0;t<3;t++){if(s[t]>a[t])return!0;if(s[t]<a[t])return!1}return!1}f.parentPort.on("message",async({packageJsonPath:e,nodeModulesPath:n,configDir:s})=>{try{let a=await d.promises.readFile(e,"utf-8"),t=JSON.parse(a),r=[];if(t.dependencies)for(let[o,i]of Object.entries(t.dependencies))o.startsWith("@ampt/")&&!o.includes("cli")&&!i.startsWith("file:")&&r.push({name:o,isDevDep:!1});if(t.devDependencies)for(let[o,i]of Object.entries(t.devDependencies))o.startsWith("@ampt/")&&!i.startsWith("file:")&&r.push({name:o,isDevDep:!0});let l=[];for(let{name:o,isDevDep:i}of r)try{let m=(0,g.join)(n,o,"package.json"),D=await d.promises.readFile(m,"utf-8"),u=JSON.parse(D).version,c=await J(o);if(!c)continue;let v=w(u),h=w(c),j=h>v&&h>1;S(c,u)&&l.push({name:o,currentVersion:u,latestVersion:c,isDevDep:i,majorChange:j})}catch{continue}let k=(0,g.join)(s,"package-updates-available.json"),b={packages:l,checkedAt:Date.now()};await d.promises.writeFile(k,JSON.stringify(b,null,2),"utf-8"),f.parentPort.postMessage({res:b})}catch(a){f.parentPort.postMessage({err:a})}});var y={};var F=y;
//# sourceMappingURL=package-update.js.map
