@gadgetinc/ggt 1.6.1 → 1.7.1

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.
Files changed (45) hide show
  1. package/README.md +26 -0
  2. package/dist/{add-ERWYPHIS.js → add-M2YVCVDJ.js} +2 -2
  3. package/dist/{add-ERWYPHIS.js.map → add-M2YVCVDJ.js.map} +1 -1
  4. package/dist/{chunk-OGQ5LIYM.js → chunk-2WKENYA3.js} +2 -2
  5. package/dist/{chunk-OGQ5LIYM.js.map → chunk-2WKENYA3.js.map} +1 -1
  6. package/dist/{chunk-UCJDY73U.js → chunk-DP2MEKPK.js} +2 -2
  7. package/dist/chunk-GC4CQ6BI.js +2 -0
  8. package/dist/{chunk-WZ3Q7TTB.js.map → chunk-GC4CQ6BI.js.map} +2 -2
  9. package/dist/chunk-TPWSJOGX.js +66 -0
  10. package/dist/chunk-TPWSJOGX.js.map +7 -0
  11. package/dist/{chunk-KS2O3TJA.js → chunk-UAZBF6WU.js} +19 -19
  12. package/dist/{chunk-KS2O3TJA.js.map → chunk-UAZBF6WU.js.map} +3 -3
  13. package/dist/{deploy-7Q7RRIXS.js → deploy-QX2ELPOA.js} +2 -2
  14. package/dist/{deploy-7Q7RRIXS.js.map → deploy-QX2ELPOA.js.map} +1 -1
  15. package/dist/{dev-MQ76B6CR.js → dev-ODLZZUI4.js} +2 -2
  16. package/dist/{dev-MQ76B6CR.js.map → dev-ODLZZUI4.js.map} +1 -1
  17. package/dist/list-E3DN5VVW.js +11 -0
  18. package/dist/{list-YXCTVLRH.js.map → list-E3DN5VVW.js.map} +1 -1
  19. package/dist/login-LXGUUTW3.js +2 -0
  20. package/dist/logs-VGDAULNT.js +28 -0
  21. package/dist/logs-VGDAULNT.js.map +7 -0
  22. package/dist/main.js +3 -2
  23. package/dist/main.js.map +2 -2
  24. package/dist/{open-5CYXKN42.js → open-LBVP7DXX.js} +2 -2
  25. package/dist/{open-5CYXKN42.js.map → open-LBVP7DXX.js.map} +1 -1
  26. package/dist/{pull-STASHXEL.js → pull-I3WM4RL3.js} +2 -2
  27. package/dist/{pull-STASHXEL.js.map → pull-I3WM4RL3.js.map} +1 -1
  28. package/dist/push-GE55G6KR.js +2 -0
  29. package/dist/{status-SB22V3DI.js → status-2PKSATWL.js} +2 -2
  30. package/dist/{status-SB22V3DI.js.map → status-2PKSATWL.js.map} +1 -1
  31. package/dist/whoami-LEZVATND.js +7 -0
  32. package/dist/{whoami-AA3ISE77.js.map → whoami-LEZVATND.js.map} +1 -1
  33. package/package.json +3 -1
  34. package/dist/chunk-FILWLZUN.js +0 -18
  35. package/dist/chunk-FILWLZUN.js.map +0 -7
  36. package/dist/chunk-GCO2TOVZ.js +0 -50
  37. package/dist/chunk-GCO2TOVZ.js.map +0 -7
  38. package/dist/chunk-WZ3Q7TTB.js +0 -2
  39. package/dist/list-YXCTVLRH.js +0 -11
  40. package/dist/login-XIEASAMY.js +0 -2
  41. package/dist/push-6WUPKY5W.js +0 -2
  42. package/dist/whoami-AA3ISE77.js +0 -7
  43. /package/dist/{chunk-UCJDY73U.js.map → chunk-DP2MEKPK.js.map} +0 -0
  44. /package/dist/{login-XIEASAMY.js.map → login-LXGUUTW3.js.map} +0 -0
  45. /package/dist/{push-6WUPKY5W.js.map → push-GE55G6KR.js.map} +0 -0
@@ -1,2 +0,0 @@
1
- import{f as C,g as b,h as E}from"./chunk-GCO2TOVZ.js";import{b as D}from"./chunk-XGQQOMPO.js";import{b as N,f as G}from"./chunk-24OT7GHO.js";import{a as m,d as $,f as P,h as y}from"./chunk-7DYQUG5M.js";var S=$((F,I)=>{y();var _=Symbol("arg flag"),a=class n extends Error{static{m(this,"ArgError")}constructor(t,p){super(t),this.name="ArgError",this.code=p,Object.setPrototypeOf(this,n.prototype)}};function A(n,{argv:t=process.argv.slice(2),permissive:p=!1,stopAtPositional:w=!1}={}){if(!n)throw new a("argument specification object is required","ARG_CONFIG_NO_SPEC");let e={_:[]},s={},c={};for(let r of Object.keys(n)){if(!r)throw new a("argument key cannot be an empty string","ARG_CONFIG_EMPTY_KEY");if(r[0]!=="-")throw new a(`argument key must start with '-' but found: '${r}'`,"ARG_CONFIG_NONOPT_KEY");if(r.length===1)throw new a(`argument key must have a name; singular '-' keys are not allowed: ${r}`,"ARG_CONFIG_NONAME_KEY");if(typeof n[r]=="string"){s[r]=n[r];continue}let l=n[r],i=!1;if(Array.isArray(l)&&l.length===1&&typeof l[0]=="function"){let[u]=l;l=m((f,d,g=[])=>(g.push(u(f,d,g[g.length-1])),g),"type"),i=u===Boolean||u[_]===!0}else if(typeof l=="function")i=l===Boolean||l[_]===!0;else throw new a(`type missing or not a function or valid array type: ${r}`,"ARG_CONFIG_VAD_TYPE");if(r[1]!=="-"&&r.length>2)throw new a(`short argument keys (with a single hyphen) must have only one character: ${r}`,"ARG_CONFIG_SHORTOPT_TOOLONG");c[r]=[l,i]}for(let r=0,l=t.length;r<l;r++){let i=t[r];if(w&&e._.length>0){e._=e._.concat(t.slice(r));break}if(i==="--"){e._=e._.concat(t.slice(r+1));break}if(i.length>1&&i[0]==="-"){let u=i[1]==="-"||i.length===2?[i]:i.slice(1).split("").map(f=>`-${f}`);for(let f=0;f<u.length;f++){let d=u[f],[g,k]=d[1]==="-"?d.split(/=(.*)/,2):[d,void 0],o=g;for(;o in s;)o=s[o];if(!(o in c))if(p){e._.push(d);continue}else throw new a(`unknown or unexpected option: ${g}`,"ARG_UNKNOWN_OPTION");let[h,R]=c[o];if(!R&&f+1<u.length)throw new a(`option requires argument (but was followed by another short argument): ${g}`,"ARG_MISSING_REQUIRED_SHORTARG");if(R)e[o]=h(!0,o,e[o]);else if(k===void 0){if(t.length<r+2||t[r+1].length>1&&t[r+1][0]==="-"&&!(t[r+1].match(/^-?\d*(\.(?=\d))?\d*$/)&&(h===Number||typeof BigInt<"u"&&h===BigInt))){let T=g===o?"":` (alias for ${o})`;throw new a(`option requires argument: ${g}${T}`,"ARG_MISSING_REQUIRED_LONGARG")}e[o]=h(t[r+1],o,e[o]),++r}else e[o]=h(k,o,e[o])}}else e._.push(i)}return e}m(A,"arg");A.flag=n=>(n[_]=!0,n);A.COUNT=A.flag((n,t,p)=>(p||0)+1);A.ArgError=a;I.exports=A});y();var x=P(S(),1);var L=m((n,t)=>{let p={},w={};for(let[e,s]of Object.entries(n)){if(!("type"in s)){p[e]=s;continue}if(p[e]=s.type,w[e]=s.default,s.alias)for(let c of Array.isArray(s.alias)?s.alias:[s.alias])p[c]=e}try{let e=(0,x.default)(p,t);for(let[s,c]of Object.entries(w))G(e[s])&&(e[s]=c);return e}catch(e){throw e instanceof x.default.ArgError&&(e=new O(e.message)),e instanceof b?e:new E(e)}},"parseArgs"),O=class extends b{static{m(this,"ArgError")}isBug=C.NO;render(){return`${N.redBright(D.cross)} `+this.message}};y();import j from"node:assert";var H=["dev","deploy","status","push","pull","add","open","list","login","logout","whoami","configure","version"],K=m(n=>H.includes(n),"isCommand"),J=m(async n=>{j(K(n),`invalid command: ${n}`);let t;switch(n){case"dev":t=await import("./dev-MQ76B6CR.js");break;case"deploy":t=await import("./deploy-7Q7RRIXS.js");break;case"status":t=await import("./status-SB22V3DI.js");break;case"push":t=await import("./push-6WUPKY5W.js");break;case"pull":t=await import("./pull-STASHXEL.js");break;case"add":t=await import("./add-ERWYPHIS.js");break;case"open":t=await import("./open-5CYXKN42.js");break;case"list":t=await import("./list-YXCTVLRH.js");break;case"login":t=await import("./login-XIEASAMY.js");break;case"logout":t=await import("./logout-ACRXIJEF.js");break;case"whoami":t=await import("./whoami-AA3ISE77.js");break;case"configure":t=await import("./configure-LD5XC2MR.js");break;case"version":t=await import("./version-NZHW3VLV.js");break}return t},"importCommand");export{S as a,L as b,O as c,H as d,K as e,J as f};
2
- //# sourceMappingURL=chunk-WZ3Q7TTB.js.map
@@ -1,11 +0,0 @@
1
- import{b as g}from"./chunk-JSGXXXFU.js";import{g as f}from"./chunk-FILWLZUN.js";import{v as u,w as c}from"./chunk-GCO2TOVZ.js";import"./chunk-DYAWQS24.js";import"./chunk-XGQQOMPO.js";import"./chunk-KMNQ3LJT.js";import{ca as m,ha as i,ia as l,ja as o}from"./chunk-24OT7GHO.js";import"./chunk-GFQYFEEH.js";import{a,h as p}from"./chunk-7DYQUG5M.js";p();var U=a(()=>i`
2
- List the apps available to the currently logged-in user.
3
-
4
- {bold Usage}
5
- ggt list
6
- `,"usage"),j=a(async s=>{await f(s,"list");let e=await u(s);if(e.length===0){o`
7
- It doesn't look like you have any applications.
8
-
9
- Visit https://gadget.new to create one!
10
- `;return}if(m.isInteractive)for(let[r,t]of c(e))o(i`{grey ${r}}`),g({json:t,headers:["Name","Domain"],rows:t.map(n=>[n.slug,n.primaryDomain])}),o("");else{let r="";for(let t of e)r+=l`${t.slug}\t${t.primaryDomain}`;o({json:e,content:r})}},"run");export{j as run,U as usage};
11
- //# sourceMappingURL=list-YXCTVLRH.js.map
@@ -1,2 +0,0 @@
1
- import{c as a,d as b,e as c}from"./chunk-FILWLZUN.js";import"./chunk-GCO2TOVZ.js";import"./chunk-DYAWQS24.js";import"./chunk-XGQQOMPO.js";import"./chunk-KMNQ3LJT.js";import"./chunk-24OT7GHO.js";import"./chunk-GFQYFEEH.js";import"./chunk-7DYQUG5M.js";export{c as login,b as run,a as usage};
2
- //# sourceMappingURL=login-XIEASAMY.js.map
@@ -1,2 +0,0 @@
1
- import{a,b,c}from"./chunk-UCJDY73U.js";import"./chunk-OGQ5LIYM.js";import"./chunk-KS2O3TJA.js";import"./chunk-JSGXXXFU.js";import"./chunk-WNAYBYSG.js";import"./chunk-WZ3Q7TTB.js";import"./chunk-JBY5A44K.js";import"./chunk-HN3YKQ3C.js";import"./chunk-FILWLZUN.js";import"./chunk-GCO2TOVZ.js";import"./chunk-DYAWQS24.js";import"./chunk-XGQQOMPO.js";import"./chunk-KMNQ3LJT.js";import"./chunk-24OT7GHO.js";import"./chunk-GFQYFEEH.js";import"./chunk-7DYQUG5M.js";export{a as args,c as run,b as usage};
2
- //# sourceMappingURL=push-6WUPKY5W.js.map
@@ -1,7 +0,0 @@
1
- import{f as s}from"./chunk-FILWLZUN.js";import"./chunk-GCO2TOVZ.js";import"./chunk-DYAWQS24.js";import"./chunk-XGQQOMPO.js";import"./chunk-KMNQ3LJT.js";import{ha as n,ja as o}from"./chunk-24OT7GHO.js";import"./chunk-GFQYFEEH.js";import{a as r,h as a}from"./chunk-7DYQUG5M.js";a();var u=r(()=>n`
2
- Show the name and email address of the currently logged in user.
3
-
4
- {gray Usage}
5
- ggt whoami
6
- `,"usage"),l=r(async t=>{let e=await s(t);if(!e){o("You are not logged in");return}e.name?o(`You are logged in as ${e.name} (${e.email})`):o(`You are logged in as ${e.email}`)},"run");export{l as run,u as usage};
7
- //# sourceMappingURL=whoami-AA3ISE77.js.map