@gadgetinc/ggt 1.4.1 → 1.4.2
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/{add-HUMZSYPA.js → add-Q2YM34TO.js} +2 -2
- package/dist/{chunk-DAFEHCX5.js → chunk-BWIVLBZY.js} +2 -2
- package/dist/{chunk-U43YGCFP.js → chunk-GKAC6HNS.js} +2 -2
- package/dist/{chunk-C4CHGCKD.js → chunk-HVJWUXJL.js} +28 -28
- package/dist/{chunk-C4CHGCKD.js.map → chunk-HVJWUXJL.js.map} +4 -4
- package/dist/{chunk-DNS7DZ7M.js → chunk-JOWMHVPF.js} +2 -2
- package/dist/chunk-JOWMHVPF.js.map +7 -0
- package/dist/{chunk-F3F5GSUN.js → chunk-KP35JQJ7.js} +2 -2
- package/dist/{chunk-WGSJ2P6E.js → chunk-L4OG4HIV.js} +2 -2
- package/dist/{chunk-XGAPULF7.js → chunk-M5HB5SEG.js} +2 -2
- package/dist/{chunk-YLVZEUX7.js → chunk-OTYPO33S.js} +2 -2
- package/dist/chunk-P7E7PAMQ.js +2 -0
- package/dist/{chunk-GPJRJAHB.js.map → chunk-P7E7PAMQ.js.map} +4 -4
- package/dist/{chunk-E3RC22HP.js → chunk-PRAA2FG3.js} +2 -2
- package/dist/chunk-YINVPQ2V.js +6 -0
- package/dist/chunk-YINVPQ2V.js.map +7 -0
- package/dist/chunk-ZN6HRN6U.js +50 -0
- package/dist/chunk-ZN6HRN6U.js.map +7 -0
- package/dist/{deploy-HTVGCFPH.js → deploy-T5ZUHHLZ.js} +2 -2
- package/dist/{dev-MTMQ4VKF.js → dev-5CVDVGE3.js} +2 -2
- package/dist/{esm-OUX6XF3H.js → esm-BEXWGPJL.js} +3 -3
- package/dist/{esm-OUX6XF3H.js.map → esm-BEXWGPJL.js.map} +1 -1
- package/dist/list-BV7QOWA2.js +11 -0
- package/dist/list-BV7QOWA2.js.map +7 -0
- package/dist/login-M6YPWB3H.js +2 -0
- package/dist/{logout-2U2LIOQ5.js → logout-QLW45MMK.js} +2 -2
- package/dist/main.js +6 -6
- package/dist/main.js.map +3 -3
- package/dist/{open-L5IB23E5.js → open-TKGHV5HA.js} +2 -2
- package/dist/{pull-K5U5GMEP.js → pull-RRR7ISUG.js} +2 -2
- package/dist/push-KUORLNK6.js +2 -0
- package/dist/{status-HSABHX5Y.js → status-BKCHGWJO.js} +2 -2
- package/dist/{version-E5ZPB4IG.js → version-LUMBTKD4.js} +2 -2
- package/dist/{whoami-UFOCKGBK.js → whoami-ONJCZDTX.js} +2 -2
- package/package.json +17 -15
- package/dist/chunk-2V7EFUWO.js +0 -6
- package/dist/chunk-2V7EFUWO.js.map +0 -7
- package/dist/chunk-DNS7DZ7M.js.map +0 -7
- package/dist/chunk-GPJRJAHB.js +0 -2
- package/dist/chunk-Q5CNYV3H.js +0 -50
- package/dist/chunk-Q5CNYV3H.js.map +0 -7
- package/dist/list-Q3ZPCSNL.js +0 -11
- package/dist/list-Q3ZPCSNL.js.map +0 -7
- package/dist/login-5G4ANYDD.js +0 -2
- package/dist/push-ADPB3Y24.js +0 -2
- /package/dist/{add-HUMZSYPA.js.map → add-Q2YM34TO.js.map} +0 -0
- /package/dist/{chunk-DAFEHCX5.js.map → chunk-BWIVLBZY.js.map} +0 -0
- /package/dist/{chunk-U43YGCFP.js.map → chunk-GKAC6HNS.js.map} +0 -0
- /package/dist/{chunk-F3F5GSUN.js.map → chunk-KP35JQJ7.js.map} +0 -0
- /package/dist/{chunk-WGSJ2P6E.js.map → chunk-L4OG4HIV.js.map} +0 -0
- /package/dist/{chunk-XGAPULF7.js.map → chunk-M5HB5SEG.js.map} +0 -0
- /package/dist/{chunk-YLVZEUX7.js.map → chunk-OTYPO33S.js.map} +0 -0
- /package/dist/{chunk-E3RC22HP.js.map → chunk-PRAA2FG3.js.map} +0 -0
- /package/dist/{deploy-HTVGCFPH.js.map → deploy-T5ZUHHLZ.js.map} +0 -0
- /package/dist/{dev-MTMQ4VKF.js.map → dev-5CVDVGE3.js.map} +0 -0
- /package/dist/{login-5G4ANYDD.js.map → login-M6YPWB3H.js.map} +0 -0
- /package/dist/{logout-2U2LIOQ5.js.map → logout-QLW45MMK.js.map} +0 -0
- /package/dist/{open-L5IB23E5.js.map → open-TKGHV5HA.js.map} +0 -0
- /package/dist/{pull-K5U5GMEP.js.map → pull-RRR7ISUG.js.map} +0 -0
- /package/dist/{push-ADPB3Y24.js.map → push-KUORLNK6.js.map} +0 -0
- /package/dist/{status-HSABHX5Y.js.map → status-BKCHGWJO.js.map} +0 -0
- /package/dist/{version-E5ZPB4IG.js.map → version-LUMBTKD4.js.map} +0 -0
- /package/dist/{whoami-UFOCKGBK.js.map → whoami-ONJCZDTX.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{f as L,g as S,h as O,i as j,j as M,o as J}from"./chunk-
|
|
1
|
+
import{f as L,g as S,h as O,i as j,j as M,o as J}from"./chunk-GKAC6HNS.js";import{g as C,l as R,m as N,n as k,o as P}from"./chunk-JOWMHVPF.js";import"./chunk-L4OG4HIV.js";import"./chunk-KP35JQJ7.js";import{c as h}from"./chunk-OTYPO33S.js";import"./chunk-YINVPQ2V.js";import"./chunk-BWIVLBZY.js";import{a as _,f as E,g as $,j as u,n as F,p as w,x as B,y as U}from"./chunk-ZN6HRN6U.js";import"./chunk-PRAA2FG3.js";import{$ as f,Z as r,b as m,m as v}from"./chunk-HVJWUXJL.js";import"./chunk-P7E7PAMQ.js";import{a as g,h as b}from"./chunk-56W5U2JG.js";b();var y=class extends ${static{g(this,"AddClientError")}isBug=E.NO;constructor(t){let n="";if(v(t.cause)){let a=F(t.cause.map(e=>e.message));n=r` • ${a.map(e=>e.split(`
|
|
2
2
|
`).join(`
|
|
3
3
|
\u200E \u2022 `)).join(`
|
|
4
4
|
`)}`}else n=r`${t.cause}`;super(n)}render(){return`${m.redBright(u.cross)} Failed to add:
|
|
@@ -75,4 +75,4 @@ import{f as L,g as S,h as O,i as j,j as M,o as J}from"./chunk-U43YGCFP.js";impor
|
|
|
75
75
|
|
|
76
76
|
{gray Usage}
|
|
77
77
|
{cyanBright ggt add field ${e[0]}/<field_name>:<field_type>}`);try{let i=(await a.edit.mutate({mutation:j,variables:{path:e[0],fields:s.map(d=>({name:d.name,fieldType:d.fieldType}))}})).createModelFields;await n.writeToLocalFilesystem(o,{filesVersion:i.remoteFilesVersion,files:i.changed,delete:[]})}catch(i){throw i instanceof w?new y(i):i}f({ensureEmptyLineAbove:!0,content:`Field ${m.cyanBright(s[0]?.name)} added successfully.`})},"fieldSubCommand");export{y as AddClientError,me as args,ge as run,V as usage};
|
|
78
|
-
//# sourceMappingURL=add-
|
|
78
|
+
//# sourceMappingURL=add-Q2YM34TO.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{E as ae,b as ne,r as ie,s as se}from"./chunk-
|
|
1
|
+
import{E as ae,b as ne,r as ie,s as se}from"./chunk-ZN6HRN6U.js";import{e as _}from"./chunk-PRAA2FG3.js";import{$ as f,D as H,F as oe,G as T,P as x,U as b,Z as L,_ as G,b as E,e as g}from"./chunk-HVJWUXJL.js";import{a as n,e as Ee,h as a}from"./chunk-56W5U2JG.js";a();a();import Te from"node:net";import Le from"node:os";var N=class extends Error{static{n(this,"Locked")}constructor(r){super(`${r} is locked`)}},y={old:new Set,young:new Set},$e=1e3*15;var $,Be=n(()=>{let e=Le.networkInterfaces(),r=new Set([void 0,"0.0.0.0"]);for(let t of Object.values(e))for(let o of t)r.add(o.address);return r},"getLocalHosts"),ce=n(e=>new Promise((r,t)=>{let o=Te.createServer();o.unref(),o.on("error",t),o.listen(e,()=>{let{port:i}=o.address();o.close(()=>{r(i)})})}),"checkAvailablePort"),le=n(async(e,r)=>{if(e.host||e.port===0)return ce(e);for(let t of r)try{await ce({port:e.port,host:t})}catch(o){if(!["EADDRNOTAVAIL","EINVAL"].includes(o.code))throw o}return e.port},"getAvailablePort"),Ce=n(function*(e){e&&(yield*e),yield 0},"portCheckSequence");async function j(e){let r,t=new Set;if(e&&(e.port&&(r=typeof e.port=="number"?[e.port]:e.port),e.exclude)){let i=e.exclude;if(typeof i[Symbol.iterator]!="function")throw new TypeError("The `exclude` option must be an iterable.");for(let c of i){if(typeof c!="number")throw new TypeError("Each item in the `exclude` option must be a number corresponding to the port you want excluded.");if(!Number.isSafeInteger(c))throw new TypeError(`Number ${c} in the exclude option is not a safe integer and can't be used`)}t=new Set(i)}$===void 0&&($=setTimeout(()=>{$=void 0,y.old=y.young,y.young=new Set},$e),$.unref&&$.unref());let o=Be();for(let i of Ce(r))try{if(t.has(i))continue;let c=await le({...e,port:i},o);for(;y.old.has(c)||y.young.has(c);){if(i!==0)throw new N(i);c=await le({...e,port:i},o)}return y.young.add(c),c}catch(c){if(!["EADDRINUSE","EACCES"].includes(c.code)&&!(c instanceof N))throw c}throw new Error("No available ports found")}n(j,"getPorts");import te from"node:assert";import Ir from"node:http";a();import k from"node:process";import{Buffer as Ye}from"node:buffer";import he from"node:path";import{fileURLToPath as Xe}from"node:url";import qe from"node:child_process";import J,{constants as ge}from"node:fs/promises";a();function w(e,r,t){let o=n(i=>Object.defineProperty(e,r,{value:i,enumerable:!0,writable:!0}),"define");return Object.defineProperty(e,r,{configurable:!0,enumerable:!0,get(){let i=t();return o(i),i},set(i){o(i)}}),e}n(w,"defineLazyProperty");a();import{promisify as _e}from"node:util";import X from"node:process";import{execFile as je}from"node:child_process";a();import{promisify as We}from"node:util";import Ie from"node:process";import{execFile as Ne}from"node:child_process";var Re=We(Ne);async function z(){if(Ie.platform!=="darwin")throw new Error("macOS only");let{stdout:e}=await Re("defaults",["read","com.apple.LaunchServices/com.apple.launchservices.secure","LSHandlers"]);return/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(e)?.groups.id??"com.apple.Safari"}n(z,"defaultBrowserId");a();a();import ke from"node:process";import{promisify as Fe}from"node:util";import{execFile as Oe,execFileSync as Vr}from"node:child_process";var Ue=Fe(Oe);async function ue(e,{humanReadableOutput:r=!0}={}){if(ke.platform!=="darwin")throw new Error("macOS only");let t=r?[]:["-ss"],{stdout:o}=await Ue("osascript",["-e",e,t]);return o.trim()}n(ue,"runAppleScript");async function K(e){return ue(`tell application "Finder" to set app_path to application file id "${e}" as string
|
|
2
2
|
tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}n(K,"bundleName");a();import{promisify as Me}from"node:util";import{execFile as De}from"node:child_process";var He=Me(De),Ge={AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:"Edge",id:"com.microsoft.edge.old"},MSEdgeDHTML:{name:"Edge",id:"com.microsoft.edge"},MSEdgeHTM:{name:"Edge",id:"com.microsoft.edge"},"IE.HTTP":{name:"Internet Explorer",id:"com.microsoft.ie"},FirefoxURL:{name:"Firefox",id:"org.mozilla.firefox"},ChromeHTML:{name:"Chrome",id:"com.google.chrome"},BraveHTML:{name:"Brave",id:"com.brave.Browser"},BraveBHTML:{name:"Brave Beta",id:"com.brave.Browser.beta"},BraveSSHTM:{name:"Brave Nightly",id:"com.brave.Browser.nightly"}},R=class extends Error{static{n(this,"UnknownBrowserError")}};async function Y(e=He){let{stdout:r}=await e("reg",["QUERY"," HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice","/v","ProgId"]),t=/ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(r);if(!t)throw new R(`Cannot find Windows browser in stdout: ${JSON.stringify(r)}`);let{id:o}=t.groups,i=Ge[o];if(!i)throw new R(`Unknown browser ID: ${o}`);return i}n(Y,"defaultBrowser");var ze=_e(je),Ke=n(e=>e.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,r=>r.toUpperCase()),"titleize");async function q(){if(X.platform==="darwin"){let e=await z();return{name:await K(e),id:e}}if(X.platform==="linux"){let{stdout:e}=await ze("xdg-mime",["query","default","x-scheme-handler/http"]),r=e.trim();return{name:Ke(r.replace(/.desktop$/,"").replace("-"," ")),id:r}}if(X.platform==="win32")return Y();throw new Error("Only macOS, Linux, and Windows are supported")}n(q,"defaultBrowser");var V=he.dirname(Xe(import.meta.url)),de=he.join(V,"xdg-open"),{platform:v,arch:pe}=k,Je=(()=>{let e="/mnt/",r;return async function(){if(r)return r;let t="/etc/wsl.conf",o=!1;try{await J.access(t,ge.F_OK),o=!0}catch{}if(!o)return e;let i=await J.readFile(t,{encoding:"utf8"}),c=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(i);return c?(r=c.groups.mountPoint.trim(),r=r.endsWith("/")?r:`${r}/`,r):e}})(),fe=n(async(e,r)=>{let t;for(let o of e)try{return await r(o)}catch(i){t=i}throw t},"pTryEach"),F=n(async e=>{if(e={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...e},Array.isArray(e.app))return fe(e.app,u=>F({...e,app:u}));let{name:r,arguments:t=[]}=e.app??{};if(t=[...t],Array.isArray(r))return fe(r,u=>F({...e,app:{name:u,arguments:t}}));if(r==="browser"||r==="browserPrivate"){let u={"com.google.chrome":"chrome","google-chrome.desktop":"chrome","org.mozilla.firefox":"firefox","firefox.desktop":"firefox","com.microsoft.msedge":"edge","com.microsoft.edge":"edge","microsoft-edge.desktop":"edge"},l={chrome:"--incognito",firefox:"--private-window",edge:"--inPrivate"},d=await q();if(d.id in u){let h=u[d.id];return r==="browserPrivate"&&t.push(l[h]),F({...e,app:{name:S[h],arguments:t}})}throw new Error(`${d.name} is not supported as a default browser`)}let o,i=[],c={};if(v==="darwin")o="open",e.wait&&i.push("--wait-apps"),e.background&&i.push("--background"),e.newInstance&&i.push("--new"),r&&i.push("-a",r);else if(v==="win32"||T&&!oe()&&!r){let u=await Je();o=T?`${u}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${k.env.SYSTEMROOT||k.env.windir||"C:\\Windows"}\\System32\\WindowsPowerShell\\v1.0\\powershell`,i.push("-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand"),T||(c.windowsVerbatimArguments=!0);let l=["Start"];e.wait&&l.push("-Wait"),r?(l.push(`"\`"${r}\`""`),e.target&&t.push(e.target)):e.target&&l.push(`"${e.target}"`),t.length>0&&(t=t.map(d=>`"\`"${d}\`""`),l.push("-ArgumentList",t.join(","))),e.target=Ye.from(l.join(" "),"utf16le").toString("base64")}else{if(r)o=r;else{let u=!V||V==="/",l=!1;try{await J.access(de,ge.X_OK),l=!0}catch{}o=k.versions.electron??(v==="android"||u||!l)?"xdg-open":de}t.length>0&&i.push(...t),e.wait||(c.stdio="ignore",c.detached=!0)}v==="darwin"&&t.length>0&&i.push("--args",...t),e.target&&i.push(e.target);let p=qe.spawn(o,i,c);return e.wait?new Promise((u,l)=>{p.once("error",l),p.once("close",d=>{if(!e.allowNonzeroExitCode&&d>0){l(new Error(`Exited with code ${d}`));return}u(p)})}):(p.unref(),p)},"baseOpen"),Ve=n((e,r)=>{if(typeof e!="string")throw new TypeError("Expected a `target`");return F({...r,target:e})},"open");function me(e){if(typeof e=="string"||Array.isArray(e))return e;let{[pe]:r}=e;if(!r)throw new Error(`${pe} is not supported`);return r}n(me,"detectArchBinary");function Q({[v]:e},{wsl:r}){if(r&&T)return me(r);if(!e)throw new Error(`${v} is not supported`);return me(e)}n(Q,"detectPlatformBinary");var S={};w(S,"chrome",()=>Q({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));w(S,"firefox",()=>Q({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));w(S,"edge",()=>Q({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));w(S,"browser",()=>"browser");w(S,"browserPrivate",()=>"browserPrivate");var we=Ve;a();import Cr from"node:assert";a();import I from"node:process";a();a();var U={};Ee(U,{beep:()=>Pr,clearScreen:()=>br,clearTerminal:()=>yr,cursorBackward:()=>nr,cursorDown:()=>tr,cursorForward:()=>or,cursorGetPosition:()=>ar,cursorHide:()=>ur,cursorLeft:()=>ye,cursorMove:()=>rr,cursorNextLine:()=>cr,cursorPrevLine:()=>lr,cursorRestorePosition:()=>sr,cursorSavePosition:()=>ir,cursorShow:()=>dr,cursorTo:()=>er,cursorUp:()=>be,enterAlternativeScreen:()=>vr,eraseDown:()=>hr,eraseEndLine:()=>fr,eraseLine:()=>ve,eraseLines:()=>pr,eraseScreen:()=>Z,eraseStartLine:()=>mr,eraseUp:()=>gr,exitAlternativeScreen:()=>Sr,iTerm:()=>Tr,image:()=>Er,link:()=>Ar,scrollDown:()=>xr,scrollUp:()=>wr});a();import ee from"node:process";a();var O=globalThis.window?.document!==void 0,It=globalThis.process?.versions?.node!==void 0,Nt=globalThis.process?.versions?.bun!==void 0,Rt=globalThis.Deno?.version?.deno!==void 0,kt=globalThis.process?.versions?.electron!==void 0,Ft=globalThis.navigator?.userAgent?.includes("jsdom")===!0,Ot=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,Ut=typeof DedicatedWorkerGlobalScope<"u"&&globalThis instanceof DedicatedWorkerGlobalScope,Mt=typeof SharedWorkerGlobalScope<"u"&&globalThis instanceof SharedWorkerGlobalScope,Dt=typeof ServiceWorkerGlobalScope<"u"&&globalThis instanceof ServiceWorkerGlobalScope,B=globalThis.navigator?.userAgentData?.platform,Ht=B==="macOS"||globalThis.navigator?.platform==="MacIntel"||globalThis.navigator?.userAgent?.includes(" Mac ")===!0||globalThis.process?.platform==="darwin",Gt=B==="Windows"||globalThis.navigator?.platform==="Win32"||globalThis.process?.platform==="win32",_t=B==="Linux"||globalThis.navigator?.platform?.startsWith("Linux")===!0||globalThis.navigator?.userAgent?.includes(" Linux ")===!0||globalThis.process?.platform==="linux",jt=B==="iOS"||globalThis.navigator?.platform==="MacIntel"&&globalThis.navigator?.maxTouchPoints>1||/iPad|iPhone|iPod/.test(globalThis.navigator?.platform),zt=B==="Android"||globalThis.navigator?.platform==="Android"||globalThis.navigator?.userAgent?.includes(" Android ")===!0||globalThis.process?.platform==="android";var s="\x1B[",W="\x1B]",P="\x07",C=";",xe=!O&&ee.env.TERM_PROGRAM==="Apple_Terminal",Qe=!O&&ee.platform==="win32",Ze=O?()=>{throw new Error("`process.cwd()` only works in Node.js, not the browser.")}:ee.cwd,er=n((e,r)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof r!="number"?s+(e+1)+"G":s+(r+1)+C+(e+1)+"H"},"cursorTo"),rr=n((e,r)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let t="";return e<0?t+=s+-e+"D":e>0&&(t+=s+e+"C"),r<0?t+=s+-r+"A":r>0&&(t+=s+r+"B"),t},"cursorMove"),be=n((e=1)=>s+e+"A","cursorUp"),tr=n((e=1)=>s+e+"B","cursorDown"),or=n((e=1)=>s+e+"C","cursorForward"),nr=n((e=1)=>s+e+"D","cursorBackward"),ye=s+"G",ir=xe?"\x1B7":s+"s",sr=xe?"\x1B8":s+"u",ar=s+"6n",cr=s+"E",lr=s+"F",ur=s+"?25l",dr=s+"?25h",pr=n(e=>{let r="";for(let t=0;t<e;t++)r+=ve+(t<e-1?be():"");return e&&(r+=ye),r},"eraseLines"),fr=s+"K",mr=s+"1K",ve=s+"2K",hr=s+"J",gr=s+"1J",Z=s+"2J",wr=s+"S",xr=s+"T",br="\x1Bc",yr=Qe?`${Z}${s}0f`:`${Z}${s}3J${s}H`,vr=s+"?1049h",Sr=s+"?1049l",Pr=P,Ar=n((e,r)=>[W,"8",C,C,r,P,e,W,"8",C,C,P].join(""),"link"),Er=n((e,r={})=>{let t=`${W}1337;File=inline=1`;return r.width&&(t+=`;width=${r.width}`),r.height&&(t+=`;height=${r.height}`),r.preserveAspectRatio===!1&&(t+=";preserveAspectRatio=0"),t+":"+Buffer.from(e).toString("base64")+P},"image"),Tr={setCwd:n((e=Ze())=>`${W}50;CurrentDir=${e}${P}`,"setCwd"),annotation(e,r={}){let t=`${W}1337;`,o=r.x!==void 0,i=r.y!==void 0;if((o||i)&&!(o&&i&&r.length!==void 0))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replaceAll("|",""),t+=r.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",r.length>0?t+=(o?[e,r.length,r.x,r.y]:[r.length,e]).join("|"):t+=e,t+P}};import Lr from"node:assert";import $r from"node:events";import m from"node:process";import Se from"node:readline";var M=class e extends $r{static{n(this,"Prompt")}static active=!1;value=void 0;firstRender=!0;done=!1;closed=!1;aborted=!1;exited=!1;close;constructor(){super(),Lr(!e.active,"only one prompt can be active at a time"),e.active=!0;let r=Se.createInterface({input:m.stdin,escapeCodeTimeout:50});Se.emitKeypressEvents(m.stdin,r),m.stdin.isTTY&&m.stdin.setRawMode(!0);let t=["SelectPrompt"].includes(this.constructor.name),o=n((i,c)=>{let p=Br(c,t);p===!1?this._(i,c):p&&typeof this[p]=="function"?this[p](c):this.bell()},"keypress");this.close=()=>{m.stdin.removeListener("keypress",o),m.stdin.isTTY&&m.stdin.setRawMode(!1),r.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0,e.active=!1},m.stdin.on("keypress",o)}_(r,t){}onRender(){}fire(){this.emit("state",{value:this.value,aborted:this.aborted,exited:this.exited})}bell(){b.writeStdout(U.beep)}render(){this.onRender(),this.firstRender&&(this.firstRender=!1)}},Br=n((e,r)=>{if(!(e.meta&&e.name!=="escape")){if(e.ctrl)switch(e.name){case"a":return"first";case"c":case"d":return"abort";case"e":return"last";case"g":return"reset"}if(r){if(e.name==="j")return"down";if(e.name==="k")return"up"}switch(e.name){case"return":case"enter":return"submit";case"backspace":return"delete";case"delete":return"deleteForward";case"abort":return"abort";case"escape":return"exit";case"tab":return"next";case"pagedown":return"nextPage";case"pageup":return"prevPage";case"home":return"home";case"end":return"end";case"up":return"up";case"down":return"down";case"right":return"right";case"left":return"left";default:return!1}}},"getPromptAction"),ao=n((e,r,t)=>{t=t||r;let o=Math.min(r-t,e-Math.floor(t/2));o<0&&(o=0);let i=Math.min(o+t,r);return{startIndex:o,endIndex:i}},"entriesToDisplay");var Pe=n(e=>{let r;if(typeof e=="string"?r={content:e}:r=e,r=H(r,{ensureEmptyLineAbove:!0,ensureNewLine:!0,exitWhenNo:!0}),!b.isInteractive){let t=r.whenNotInteractive??(()=>{f(r),f({ensureEmptyLineAbove:!0,content:"Aborting because ggt is not running in an interactive terminal."}),I.exit(1)});return Promise.resolve(t())}return new Promise(t=>{let o=new re(r);o.on("submit",t),o.on("exit",()=>I.exit(0)),o.on("abort",()=>I.exit(1))})},"confirm"),re=class extends M{static{n(this,"Confirm")}value=void 0;defaultValue=!1;options;constructor(r){super(),this.options=H(r,{exitWhenNo:!0,ensureEmptyLineAbove:!0}),this.render()}reset(){this.value=this.defaultValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=!1,this.done=this.aborted=!0,this.fire(),this.render(!1),this.close(),this.options.exitWhenNo&&I.exit(0)}submit(){this.value=this.value??!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.close(),this.options.exitWhenNo&&!this.value&&I.exit(0)}_(r,t){if(r.toLowerCase()==="y"){this.value=!0,this.submit();return}if(r.toLowerCase()==="n"){this.value=!1,this.submit();return}this.bell()}render(r=this.value){if(super.render(),this.done){b.persistPrompt(G({...this.options,content:`${this.options.content} ${r?E.bold.greenBright("Yes."):E.bold.redBright("No.")}`}));return}b.updatePrompt(G({...this.options,content:`${this.options.content} ${this.defaultValue?E.blueBright("[Y/n] "):E.blueBright("[y/N] ")}`}))}};var Wr=g.object({id:g.union([g.string(),g.number()]).transform(Number),name:g.string().nullish(),email:g.string()}),D=n(async e=>{let r=ie(e);if(r)try{let t=await ae({context:{ctx:e},url:`https://${x.domains.services}/auth/api/current-user`,headers:r,responseType:"json",resolveBodyOnly:!0}),o=Wr.parse(t);return e.log.info("loaded user",{user:{id:o.id}},{user:o}),ne(o),o}catch(t){se(e,t);return}},"getUser"),Wo=n(async(e,r)=>{let t=await D(e);return t||(e.log.info("prompting user to log in"),f({ensureEmptyLineAbove:!0,content:`You must be logged in to use "ggt ${r}".`}),await Pe({ensureEmptyLineAbove:!0,content:"Would you like to log in?"}),await Ae(e,{_:[]}),t=await D(e),Cr(t,"missing user after successful login"),t)},"getUserOrLogin");var jo=n(()=>L`
|
|
3
3
|
Log in to your account.
|
|
4
4
|
|
|
@@ -15,4 +15,4 @@ tell application "System Events" to get value of property list item "CFBundleNam
|
|
|
15
15
|
|
|
16
16
|
Once logged in, return to this terminal.
|
|
17
17
|
`})}await o}finally{r?.close()}},"run"),Ae=Nr;export{M as a,ao as b,Pe as c,we as d,jo as e,Nr as f,Ae as g,D as h,Wo as i};
|
|
18
|
-
//# sourceMappingURL=chunk-
|
|
18
|
+
//# sourceMappingURL=chunk-BWIVLBZY.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as bt,e as Et,h as xt,j as Ie,k as ne,l as Ct}from"./chunk-DNS7DZ7M.js";import{a as ft,b as ht}from"./chunk-WGSJ2P6E.js";import{b as W}from"./chunk-F3F5GSUN.js";import{c as mt}from"./chunk-YLVZEUX7.js";import{c as Ae}from"./chunk-DAFEHCX5.js";import{B as _t,i as Me,j as B,k as vr,l as gt,q as Mt}from"./chunk-Q5CNYV3H.js";import{b as It,c as At}from"./chunk-E3RC22HP.js";import{$ as O,E as ct,H as dt,I as G,L as xe,M as te,P as yt,S as St,Z as g,_ as V,b as E,d as ot,g as st,n as it,p as Ee,q as lt,r as ut,s as pt,z as Tr}from"./chunk-C4CHGCKD.js";import{a as Cr}from"./chunk-GPJRJAHB.js";import{a,b as F,d as x,f as w,h as p}from"./chunk-56W5U2JG.js";var $t=x((Cs,Ut)=>{p();Ut.exports=Ht;Ht.sync=Nr;var Gt=F("fs");function Br(e,t){var n=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!n||(n=n.split(";"),n.indexOf("")!==-1))return!0;for(var r=0;r<n.length;r++){var o=n[r].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}a(Br,"checkPathExt");function Vt(e,t,n){return!e.isSymbolicLink()&&!e.isFile()?!1:Br(t,n)}a(Vt,"checkStat");function Ht(e,t,n){Gt.stat(e,function(r,o){n(r,r?!1:Vt(o,e,t))})}a(Ht,"isexe");function Nr(e,t){return Vt(Gt.statSync(e),e,t)}a(Nr,"sync")});var qt=x((Fs,Wt)=>{p();Wt.exports=jt;jt.sync=kr;var Qt=F("fs");function jt(e,t,n){Qt.stat(e,function(r,o){n(r,r?!1:Jt(o,t))})}a(jt,"isexe");function kr(e,t){return Jt(Qt.statSync(e),t)}a(kr,"sync");function Jt(e,t){return e.isFile()&&Lr(e,t)}a(Jt,"checkStat");function Lr(e,t){var n=e.mode,r=e.uid,o=e.gid,s=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),i=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),l=parseInt("100",8),u=parseInt("010",8),c=parseInt("001",8),d=l|u,y=n&c||n&u&&o===i||n&l&&r===s||n&d&&s===0;return y}a(Lr,"checkMode")});var zt=x((Os,Yt)=>{p();var Ps=F("fs"),oe;process.platform==="win32"||global.TESTING_WINDOWS?oe=$t():oe=qt();Yt.exports=Te;Te.sync=Dr;function Te(e,t,n){if(typeof t=="function"&&(n=t,t={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(r,o){Te(e,t||{},function(s,i){s?o(s):r(i)})})}oe(e,t||{},function(r,o){r&&(r.code==="EACCES"||t&&t.ignoreErrors)&&(r=null,o=!1),n(r,o)})}a(Te,"isexe");function Dr(e,t){try{return oe.sync(e,t||{})}catch(n){if(t&&t.ignoreErrors||n.code==="EACCES")return!1;throw n}}a(Dr,"sync")});var rn=x((ks,nn)=>{p();var $=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Kt=F("path"),Gr=$?";":":",Xt=zt(),Zt=a(e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),"getNotFoundError"),en=a((e,t)=>{let n=t.colon||Gr,r=e.match(/\//)||$&&e.match(/\\/)?[""]:[...$?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(n)],o=$?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=$?o.split(n):[""];return $&&e.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:r,pathExt:s,pathExtExe:o}},"getPathInfo"),tn=a((e,t,n)=>{typeof t=="function"&&(n=t,t={}),t||(t={});let{pathEnv:r,pathExt:o,pathExtExe:s}=en(e,t),i=[],l=a(c=>new Promise((d,y)=>{if(c===r.length)return t.all&&i.length?d(i):y(Zt(e));let S=r[c],m=/^".*"$/.test(S)?S.slice(1,-1):S,f=Kt.join(m,e),h=!m&&/^\.[\\\/]/.test(e)?e.slice(0,2)+f:f;d(u(h,c,0))}),"step"),u=a((c,d,y)=>new Promise((S,m)=>{if(y===o.length)return S(l(d+1));let f=o[y];Xt(c+f,{pathExt:s},(h,b)=>{if(!h&&b)if(t.all)i.push(c+f);else return S(c+f);return S(u(c,d,y+1))})}),"subStep");return n?l(0).then(c=>n(null,c),n):l(0)},"which"),Vr=a((e,t)=>{t=t||{};let{pathEnv:n,pathExt:r,pathExtExe:o}=en(e,t),s=[];for(let i=0;i<n.length;i++){let l=n[i],u=/^".*"$/.test(l)?l.slice(1,-1):l,c=Kt.join(u,e),d=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+c:c;for(let y=0;y<r.length;y++){let S=d+r[y];try{if(Xt.sync(S,{pathExt:o}))if(t.all)s.push(S);else return S}catch{}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw Zt(e)},"whichSync");nn.exports=tn;tn.sync=Vr});var on=x((Gs,ve)=>{"use strict";p();var an=a((e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"},"pathKey");ve.exports=an;ve.exports.default=an});var pn=x((Us,un)=>{"use strict";p();var sn=F("path"),Hr=rn(),Ur=on();function ln(e,t){let n=e.options.env||process.env,r=process.cwd(),o=e.options.cwd!=null,s=o&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(e.options.cwd)}catch{}let i;try{i=Hr.sync(e.command,{path:n[Ur({env:n})],pathExt:t?sn.delimiter:void 0})}catch{}finally{s&&process.chdir(r)}return i&&(i=sn.resolve(o?e.options.cwd:"",i)),i}a(ln,"resolveCommandAttempt");function $r(e){return ln(e)||ln(e,!0)}a($r,"resolveCommand");un.exports=$r});var cn=x((js,Re)=>{"use strict";p();var Fe=/([()\][%!^"`<>&|;, *?])/g;function Qr(e){return e=e.replace(Fe,"^$1"),e}a(Qr,"escapeCommand");function jr(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(Fe,"^$1"),t&&(e=e.replace(Fe,"^$1")),e}a(jr,"escapeArgument");Re.exports.command=Qr;Re.exports.argument=jr});var yn=x((qs,dn)=>{"use strict";p();dn.exports=/^#!(.*)/});var mn=x((zs,Sn)=>{"use strict";p();var Jr=yn();Sn.exports=(e="")=>{let t=e.match(Jr);if(!t)return null;let[n,r]=t[0].replace(/#! ?/,"").split(" "),o=n.split("/").pop();return o==="env"?r:r?`${o} ${r}`:o}});var fn=x((Xs,gn)=>{"use strict";p();var we=F("fs"),Wr=mn();function qr(e){let n=Buffer.alloc(150),r;try{r=we.openSync(e,"r"),we.readSync(r,n,0,150,0),we.closeSync(r)}catch{}return Wr(n.toString())}a(qr,"readShebang");gn.exports=qr});var xn=x((ti,En)=>{"use strict";p();var Yr=F("path"),hn=pn(),bn=cn(),zr=fn(),Kr=process.platform==="win32",Xr=/\.(?:com|exe)$/i,Zr=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function ea(e){e.file=hn(e);let t=e.file&&zr(e.file);return t?(e.args.unshift(e.file),e.command=t,hn(e)):e.file}a(ea,"detectShebang");function ta(e){if(!Kr)return e;let t=ea(e),n=!Xr.test(t);if(e.options.forceShell||n){let r=Zr.test(t);e.command=Yr.normalize(e.command),e.command=bn.command(e.command),e.args=e.args.map(s=>bn.argument(s,r));let o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}a(ta,"parseNonShell");function na(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null),t=t?t.slice(0):[],n=Object.assign({},n);let r={command:e,args:t,options:n,file:void 0,original:{command:e,args:t}};return n.shell?r:ta(r)}a(na,"parse");En.exports=na});var An=x((ai,In)=>{"use strict";p();var Pe=process.platform==="win32";function Oe(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}a(Oe,"notFoundError");function ra(e,t){if(!Pe)return;let n=e.emit;e.emit=function(r,o){if(r==="exit"){let s=Mn(o,t,"spawn");if(s)return n.call(e,"error",s)}return n.apply(e,arguments)}}a(ra,"hookChildProcess");function Mn(e,t){return Pe&&e===1&&!t.file?Oe(t.original,"spawn"):null}a(Mn,"verifyENOENT");function aa(e,t){return Pe&&e===1&&!t.file?Oe(t.original,"spawnSync"):null}a(aa,"verifyENOENTSync");In.exports={hookChildProcess:ra,verifyENOENT:Mn,verifyENOENTSync:aa,notFoundError:Oe}});var Tn=x((ii,Q)=>{"use strict";p();var _n=F("child_process"),Be=xn(),Ne=An();function Cn(e,t,n){let r=Be(e,t,n),o=_n.spawn(r.command,r.args,r.options);return Ne.hookChildProcess(o,r),o}a(Cn,"spawn");function oa(e,t,n){let r=Be(e,t,n),o=_n.spawnSync(r.command,r.args,r.options);return o.error=o.error||Ne.verifyENOENTSync(o.status,r),o}a(oa,"spawnSync");Q.exports=Cn;Q.exports.spawn=Cn;Q.exports.sync=oa;Q.exports._parse=Be;Q.exports._enoent=Ne});var Zn=x((Yl,Xn)=>{"use strict";p();var{PassThrough:to}=F("stream");Xn.exports=function(){var e=[],t=new to({objectMode:!0});return t.setMaxListeners(0),t.add=n,t.isEmpty=r,t.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),t;function n(s){return Array.isArray(s)?(s.forEach(n),this):(e.push(s),s.once("end",o.bind(null,s)),s.once("error",t.emit.bind(t,"error")),s.pipe(t,{end:!1}),this)}a(n,"add");function r(){return e.length==0}a(r,"isEmpty");function o(s){e=e.filter(function(i){return i!==s}),!e.length&&t.readable&&t.end()}a(o,"remove")}});var fr=x((Uu,gr)=>{p();function A(e,t){typeof t=="boolean"&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}a(A,"RetryOperation");gr.exports=A;A.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};A.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};A.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=new Date().getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var n=this._timeouts.shift();if(n===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),n=this._cachedTimeouts.slice(-1);else return!1;var r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},n),this._options.unref&&this._timer.unref(),!0};A.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){n._operationTimeoutCb()},n._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};A.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};A.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};A.prototype.start=A.prototype.try;A.prototype.errors=function(){return this._errors};A.prototype.attempts=function(){return this._attempts};A.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},t=null,n=0,r=0;r<this._errors.length;r++){var o=this._errors[r],s=o.message,i=(e[s]||0)+1;e[s]=i,i>=n&&(t=o,n=i)}return t}});var hr=x(L=>{p();var Co=fr();L.operation=function(e){var t=L.timeouts(e);return new Co(t,{forever:e&&(e.forever||e.retries===1/0),unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})};L.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var n in e)t[n]=e[n];if(t.minTimeout>t.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],o=0;o<t.retries;o++)r.push(this.createTimeout(o,t));return e&&e.forever&&!r.length&&r.push(this.createTimeout(o,t)),r.sort(function(s,i){return s-i}),r};L.createTimeout=function(e,t){var n=t.randomize?Math.random()+1:1,r=Math.round(n*Math.max(t.minTimeout,1)*Math.pow(t.factor,e));return r=Math.min(r,t.maxTimeout),r};L.wrap=function(e,t,n){if(t instanceof Array&&(n=t,t=null),!n){n=[];for(var r in e)typeof e[r]=="function"&&n.push(r)}for(var o=0;o<n.length;o++){var s=n[o],i=e[s];e[s]=a(function(u){var c=L.operation(t),d=Array.prototype.slice.call(arguments,1),y=d.pop();d.push(function(S){c.retry(S)||(S&&(arguments[0]=c.mainError()),y.apply(this,arguments))}),c.attempt(function(){u.apply(e,d)})},"retryWrapper").bind(e,i),e[s].options=t}}});var Er=x((qu,br)=>{p();br.exports=hr()});p();var q=w(gt(),1);var re=class extends Map{static{a(this,"Changes")}created=G(()=>Array.from(this.entries()).filter(([,t])=>t.type==="create").map(([t])=>t));updated=G(()=>Array.from(this.entries()).filter(([,t])=>t.type==="update").map(([t])=>t));deleted=G(()=>Array.from(this.entries()).filter(([,t])=>t.type==="delete").map(([t])=>t))},Fr=E.greenBright("+"),Rr=E.blueBright("\xB1"),wr=E.redBright("-"),Tt=E.yellowBright("\u2192"),Y=a((e,{changes:t,tense:n,limit:r=1/0,...o})=>{yt.logLevel<=te.TRACE&&(r=1/0);let s=Array.from(t.entries()).filter(([S])=>!S.startsWith(".gadget/"));if(s.length===0)return"";let i=E.yellowBright(n==="past"?"renamed":"rename"),l=E.greenBright(n==="past"?"created":"create"),u=E.blueBright(n==="past"?"updated":"update"),c=E.redBright(n==="past"?"deleted":"delete"),d=s.sort((S,m)=>S[0].localeCompare(m[0])).slice(0,r).map(([S,m])=>{switch(!0){case(m.type==="create"&&st(m.oldPath)):return[Tt,E.yellowBright(m.oldPath),i,Tt,E.yellowBright(S)];case m.type==="create":return[Fr,E.greenBright(S),l];case m.type==="update":return[Rr,E.blueBright(S),u];case m.type==="delete":return[wr,E.redBright(S),c];default:return it(m)}});s.length>r&&d.push([E.gray(B.ellipsis),g`{gray ${s.length-r} more}`,""]);let y;if(s.length>=5){let S=[],m=s.filter(([,b])=>b.type==="create").length;if(m>0){let b=n==="past"?`${m} created`:(0,q.default)("create",m,!0);S.push(g`{greenBright ${b}}`)}let f=s.filter(([,b])=>b.type==="update").length;if(f>0){let b=n==="past"?`${f} updated`:(0,q.default)("update",f,!0);S.push(g`{blueBright ${b}}`)}let h=s.filter(([,b])=>b.type==="delete").length;if(h>0){let b=n==="past"?`${h} deleted`:(0,q.default)("delete",h,!0);S.push(g`{redBright ${b}}`)}y=V`
|
|
1
|
+
import{b as bt,e as Et,h as xt,j as Ie,k as ne,l as Ct}from"./chunk-JOWMHVPF.js";import{a as ft,b as ht}from"./chunk-L4OG4HIV.js";import{b as W}from"./chunk-KP35JQJ7.js";import{c as mt}from"./chunk-OTYPO33S.js";import{c as Ae}from"./chunk-BWIVLBZY.js";import{B as _t,i as Me,j as B,k as vr,l as gt,q as Mt}from"./chunk-ZN6HRN6U.js";import{b as It,c as At}from"./chunk-PRAA2FG3.js";import{$ as O,E as ct,H as dt,I as G,L as xe,M as te,P as yt,S as St,Z as g,_ as V,b as E,d as ot,g as st,n as it,p as Ee,q as lt,r as ut,s as pt,z as Tr}from"./chunk-HVJWUXJL.js";import{a as Cr}from"./chunk-P7E7PAMQ.js";import{a,b as F,d as x,f as w,h as p}from"./chunk-56W5U2JG.js";var $t=x((Cs,Ut)=>{p();Ut.exports=Ht;Ht.sync=Nr;var Gt=F("fs");function Br(e,t){var n=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!n||(n=n.split(";"),n.indexOf("")!==-1))return!0;for(var r=0;r<n.length;r++){var o=n[r].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}a(Br,"checkPathExt");function Vt(e,t,n){return!e.isSymbolicLink()&&!e.isFile()?!1:Br(t,n)}a(Vt,"checkStat");function Ht(e,t,n){Gt.stat(e,function(r,o){n(r,r?!1:Vt(o,e,t))})}a(Ht,"isexe");function Nr(e,t){return Vt(Gt.statSync(e),e,t)}a(Nr,"sync")});var qt=x((Fs,Wt)=>{p();Wt.exports=jt;jt.sync=kr;var Qt=F("fs");function jt(e,t,n){Qt.stat(e,function(r,o){n(r,r?!1:Jt(o,t))})}a(jt,"isexe");function kr(e,t){return Jt(Qt.statSync(e),t)}a(kr,"sync");function Jt(e,t){return e.isFile()&&Lr(e,t)}a(Jt,"checkStat");function Lr(e,t){var n=e.mode,r=e.uid,o=e.gid,s=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),i=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),l=parseInt("100",8),u=parseInt("010",8),c=parseInt("001",8),d=l|u,y=n&c||n&u&&o===i||n&l&&r===s||n&d&&s===0;return y}a(Lr,"checkMode")});var zt=x((Os,Yt)=>{p();var Ps=F("fs"),oe;process.platform==="win32"||global.TESTING_WINDOWS?oe=$t():oe=qt();Yt.exports=Te;Te.sync=Dr;function Te(e,t,n){if(typeof t=="function"&&(n=t,t={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(r,o){Te(e,t||{},function(s,i){s?o(s):r(i)})})}oe(e,t||{},function(r,o){r&&(r.code==="EACCES"||t&&t.ignoreErrors)&&(r=null,o=!1),n(r,o)})}a(Te,"isexe");function Dr(e,t){try{return oe.sync(e,t||{})}catch(n){if(t&&t.ignoreErrors||n.code==="EACCES")return!1;throw n}}a(Dr,"sync")});var rn=x((ks,nn)=>{p();var $=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Kt=F("path"),Gr=$?";":":",Xt=zt(),Zt=a(e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),"getNotFoundError"),en=a((e,t)=>{let n=t.colon||Gr,r=e.match(/\//)||$&&e.match(/\\/)?[""]:[...$?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(n)],o=$?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=$?o.split(n):[""];return $&&e.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:r,pathExt:s,pathExtExe:o}},"getPathInfo"),tn=a((e,t,n)=>{typeof t=="function"&&(n=t,t={}),t||(t={});let{pathEnv:r,pathExt:o,pathExtExe:s}=en(e,t),i=[],l=a(c=>new Promise((d,y)=>{if(c===r.length)return t.all&&i.length?d(i):y(Zt(e));let S=r[c],m=/^".*"$/.test(S)?S.slice(1,-1):S,f=Kt.join(m,e),h=!m&&/^\.[\\\/]/.test(e)?e.slice(0,2)+f:f;d(u(h,c,0))}),"step"),u=a((c,d,y)=>new Promise((S,m)=>{if(y===o.length)return S(l(d+1));let f=o[y];Xt(c+f,{pathExt:s},(h,b)=>{if(!h&&b)if(t.all)i.push(c+f);else return S(c+f);return S(u(c,d,y+1))})}),"subStep");return n?l(0).then(c=>n(null,c),n):l(0)},"which"),Vr=a((e,t)=>{t=t||{};let{pathEnv:n,pathExt:r,pathExtExe:o}=en(e,t),s=[];for(let i=0;i<n.length;i++){let l=n[i],u=/^".*"$/.test(l)?l.slice(1,-1):l,c=Kt.join(u,e),d=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+c:c;for(let y=0;y<r.length;y++){let S=d+r[y];try{if(Xt.sync(S,{pathExt:o}))if(t.all)s.push(S);else return S}catch{}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw Zt(e)},"whichSync");nn.exports=tn;tn.sync=Vr});var on=x((Gs,ve)=>{"use strict";p();var an=a((e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"},"pathKey");ve.exports=an;ve.exports.default=an});var pn=x((Us,un)=>{"use strict";p();var sn=F("path"),Hr=rn(),Ur=on();function ln(e,t){let n=e.options.env||process.env,r=process.cwd(),o=e.options.cwd!=null,s=o&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(e.options.cwd)}catch{}let i;try{i=Hr.sync(e.command,{path:n[Ur({env:n})],pathExt:t?sn.delimiter:void 0})}catch{}finally{s&&process.chdir(r)}return i&&(i=sn.resolve(o?e.options.cwd:"",i)),i}a(ln,"resolveCommandAttempt");function $r(e){return ln(e)||ln(e,!0)}a($r,"resolveCommand");un.exports=$r});var cn=x((js,Re)=>{"use strict";p();var Fe=/([()\][%!^"`<>&|;, *?])/g;function Qr(e){return e=e.replace(Fe,"^$1"),e}a(Qr,"escapeCommand");function jr(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(Fe,"^$1"),t&&(e=e.replace(Fe,"^$1")),e}a(jr,"escapeArgument");Re.exports.command=Qr;Re.exports.argument=jr});var yn=x((qs,dn)=>{"use strict";p();dn.exports=/^#!(.*)/});var mn=x((zs,Sn)=>{"use strict";p();var Jr=yn();Sn.exports=(e="")=>{let t=e.match(Jr);if(!t)return null;let[n,r]=t[0].replace(/#! ?/,"").split(" "),o=n.split("/").pop();return o==="env"?r:r?`${o} ${r}`:o}});var fn=x((Xs,gn)=>{"use strict";p();var we=F("fs"),Wr=mn();function qr(e){let n=Buffer.alloc(150),r;try{r=we.openSync(e,"r"),we.readSync(r,n,0,150,0),we.closeSync(r)}catch{}return Wr(n.toString())}a(qr,"readShebang");gn.exports=qr});var xn=x((ti,En)=>{"use strict";p();var Yr=F("path"),hn=pn(),bn=cn(),zr=fn(),Kr=process.platform==="win32",Xr=/\.(?:com|exe)$/i,Zr=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function ea(e){e.file=hn(e);let t=e.file&&zr(e.file);return t?(e.args.unshift(e.file),e.command=t,hn(e)):e.file}a(ea,"detectShebang");function ta(e){if(!Kr)return e;let t=ea(e),n=!Xr.test(t);if(e.options.forceShell||n){let r=Zr.test(t);e.command=Yr.normalize(e.command),e.command=bn.command(e.command),e.args=e.args.map(s=>bn.argument(s,r));let o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}a(ta,"parseNonShell");function na(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null),t=t?t.slice(0):[],n=Object.assign({},n);let r={command:e,args:t,options:n,file:void 0,original:{command:e,args:t}};return n.shell?r:ta(r)}a(na,"parse");En.exports=na});var An=x((ai,In)=>{"use strict";p();var Pe=process.platform==="win32";function Oe(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}a(Oe,"notFoundError");function ra(e,t){if(!Pe)return;let n=e.emit;e.emit=function(r,o){if(r==="exit"){let s=Mn(o,t,"spawn");if(s)return n.call(e,"error",s)}return n.apply(e,arguments)}}a(ra,"hookChildProcess");function Mn(e,t){return Pe&&e===1&&!t.file?Oe(t.original,"spawn"):null}a(Mn,"verifyENOENT");function aa(e,t){return Pe&&e===1&&!t.file?Oe(t.original,"spawnSync"):null}a(aa,"verifyENOENTSync");In.exports={hookChildProcess:ra,verifyENOENT:Mn,verifyENOENTSync:aa,notFoundError:Oe}});var Tn=x((ii,Q)=>{"use strict";p();var _n=F("child_process"),Be=xn(),Ne=An();function Cn(e,t,n){let r=Be(e,t,n),o=_n.spawn(r.command,r.args,r.options);return Ne.hookChildProcess(o,r),o}a(Cn,"spawn");function oa(e,t,n){let r=Be(e,t,n),o=_n.spawnSync(r.command,r.args,r.options);return o.error=o.error||Ne.verifyENOENTSync(o.status,r),o}a(oa,"spawnSync");Q.exports=Cn;Q.exports.spawn=Cn;Q.exports.sync=oa;Q.exports._parse=Be;Q.exports._enoent=Ne});var Zn=x((Yl,Xn)=>{"use strict";p();var{PassThrough:to}=F("stream");Xn.exports=function(){var e=[],t=new to({objectMode:!0});return t.setMaxListeners(0),t.add=n,t.isEmpty=r,t.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),t;function n(s){return Array.isArray(s)?(s.forEach(n),this):(e.push(s),s.once("end",o.bind(null,s)),s.once("error",t.emit.bind(t,"error")),s.pipe(t,{end:!1}),this)}a(n,"add");function r(){return e.length==0}a(r,"isEmpty");function o(s){e=e.filter(function(i){return i!==s}),!e.length&&t.readable&&t.end()}a(o,"remove")}});var fr=x((Uu,gr)=>{p();function A(e,t){typeof t=="boolean"&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}a(A,"RetryOperation");gr.exports=A;A.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};A.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};A.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=new Date().getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var n=this._timeouts.shift();if(n===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),n=this._cachedTimeouts.slice(-1);else return!1;var r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},n),this._options.unref&&this._timer.unref(),!0};A.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){n._operationTimeoutCb()},n._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};A.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};A.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};A.prototype.start=A.prototype.try;A.prototype.errors=function(){return this._errors};A.prototype.attempts=function(){return this._attempts};A.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},t=null,n=0,r=0;r<this._errors.length;r++){var o=this._errors[r],s=o.message,i=(e[s]||0)+1;e[s]=i,i>=n&&(t=o,n=i)}return t}});var hr=x(L=>{p();var Co=fr();L.operation=function(e){var t=L.timeouts(e);return new Co(t,{forever:e&&(e.forever||e.retries===1/0),unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})};L.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var n in e)t[n]=e[n];if(t.minTimeout>t.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],o=0;o<t.retries;o++)r.push(this.createTimeout(o,t));return e&&e.forever&&!r.length&&r.push(this.createTimeout(o,t)),r.sort(function(s,i){return s-i}),r};L.createTimeout=function(e,t){var n=t.randomize?Math.random()+1:1,r=Math.round(n*Math.max(t.minTimeout,1)*Math.pow(t.factor,e));return r=Math.min(r,t.maxTimeout),r};L.wrap=function(e,t,n){if(t instanceof Array&&(n=t,t=null),!n){n=[];for(var r in e)typeof e[r]=="function"&&n.push(r)}for(var o=0;o<n.length;o++){var s=n[o],i=e[s];e[s]=a(function(u){var c=L.operation(t),d=Array.prototype.slice.call(arguments,1),y=d.pop();d.push(function(S){c.retry(S)||(S&&(arguments[0]=c.mainError()),y.apply(this,arguments))}),c.attempt(function(){u.apply(e,d)})},"retryWrapper").bind(e,i),e[s].options=t}}});var Er=x((qu,br)=>{p();br.exports=hr()});p();var q=w(gt(),1);var re=class extends Map{static{a(this,"Changes")}created=G(()=>Array.from(this.entries()).filter(([,t])=>t.type==="create").map(([t])=>t));updated=G(()=>Array.from(this.entries()).filter(([,t])=>t.type==="update").map(([t])=>t));deleted=G(()=>Array.from(this.entries()).filter(([,t])=>t.type==="delete").map(([t])=>t))},Fr=E.greenBright("+"),Rr=E.blueBright("\xB1"),wr=E.redBright("-"),Tt=E.yellowBright("\u2192"),Y=a((e,{changes:t,tense:n,limit:r=1/0,...o})=>{yt.logLevel<=te.TRACE&&(r=1/0);let s=Array.from(t.entries()).filter(([S])=>!S.startsWith(".gadget/"));if(s.length===0)return"";let i=E.yellowBright(n==="past"?"renamed":"rename"),l=E.greenBright(n==="past"?"created":"create"),u=E.blueBright(n==="past"?"updated":"update"),c=E.redBright(n==="past"?"deleted":"delete"),d=s.sort((S,m)=>S[0].localeCompare(m[0])).slice(0,r).map(([S,m])=>{switch(!0){case(m.type==="create"&&st(m.oldPath)):return[Tt,E.yellowBright(m.oldPath),i,Tt,E.yellowBright(S)];case m.type==="create":return[Fr,E.greenBright(S),l];case m.type==="update":return[Rr,E.blueBright(S),u];case m.type==="delete":return[wr,E.redBright(S),c];default:return it(m)}});s.length>r&&d.push([E.gray(B.ellipsis),g`{gray ${s.length-r} more}`,""]);let y;if(s.length>=5){let S=[],m=s.filter(([,b])=>b.type==="create").length;if(m>0){let b=n==="past"?`${m} created`:(0,q.default)("create",m,!0);S.push(g`{greenBright ${b}}`)}let f=s.filter(([,b])=>b.type==="update").length;if(f>0){let b=n==="past"?`${f} updated`:(0,q.default)("update",f,!0);S.push(g`{blueBright ${b}}`)}let h=s.filter(([,b])=>b.type==="delete").length;if(h>0){let b=n==="past"?`${h} deleted`:(0,q.default)("delete",h,!0);S.push(g`{redBright ${b}}`)}y=V`
|
|
2
2
|
${(0,q.default)("change",s.length,!0)} in total. ${S.join(", ")}.
|
|
3
3
|
`}return ft({rows:d,footer:y,ensureEmptyLineAbove:!0,ensureEmptyLineAboveBody:!1,ensureEmptyLineAboveFooter:!0,indent:0,...o})},"sprintChanges"),ae=a((e,t)=>{let n=Y(e,t);n&&O(n)},"printChanges");p();var vt=g(`
|
|
4
4
|
subscription EnvironmentLogs($query: String!, $start: DateTime, $limit: Int) {
|
|
@@ -184,4 +184,4 @@ ${r.message}`:b,T=[M,t,e].filter(Boolean).join(`
|
|
|
184
184
|
|
|
185
185
|
{red Your app will not be operational until all fatal errors are fixed.}
|
|
186
186
|
`})}catch(c){throw Ie(c)?u.clear():u.fail(),c}}};export{re as a,Rr as b,wr as c,rn as d,Jo as e,Wo as f,qo as g,Yo as h,zo as i,N as j,Lt as k,Dt as l,xs as m,Ms as n,Ir as o};
|
|
187
|
-
//# sourceMappingURL=chunk-
|
|
187
|
+
//# sourceMappingURL=chunk-GKAC6HNS.js.map
|