@gadgetinc/ggt 2.2.0 → 3.0.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/README.md +392 -307
- package/dist/action-CF6zatIh.js +64 -0
- package/dist/action-CF6zatIh.js.map +1 -0
- package/dist/action-CrDCeX3F.js +8 -0
- package/dist/action-CrDCeX3F.js.map +1 -0
- package/dist/add-Basu3Gyf.js +1 -0
- package/dist/agent-plugin-CqgwTOk-.js +15 -0
- package/dist/agent-plugin-CqgwTOk-.js.map +1 -0
- package/dist/agent-plugin-DU9G5B1d.js +9 -0
- package/dist/agent-plugin-DU9G5B1d.js.map +1 -0
- package/dist/assert-Bu1E126Z.js +2 -0
- package/dist/assert-Bu1E126Z.js.map +1 -0
- package/dist/chunk-BjEoQXZ0.js +1 -0
- package/dist/collection-C2TCeYqY.js +2 -0
- package/dist/collection-C2TCeYqY.js.map +1 -0
- package/dist/collection-aM0fpch0.js +1 -0
- package/dist/command-2iNTc5dV.js +118 -0
- package/dist/command-2iNTc5dV.js.map +1 -0
- package/dist/completion-D96nxD5n.js +37 -0
- package/dist/completion-D96nxD5n.js.map +1 -0
- package/dist/configure-C8ge-2cK.js +15 -0
- package/dist/configure-C8ge-2cK.js.map +1 -0
- package/dist/debugger-BkYgApKn.js +22 -0
- package/dist/debugger-BkYgApKn.js.map +1 -0
- package/dist/defaults-B_eD7Pia.js +2 -0
- package/dist/defaults-B_eD7Pia.js.map +1 -0
- package/dist/deploy-Da6P2HXS.js +15 -0
- package/dist/deploy-Da6P2HXS.js.map +1 -0
- package/dist/dev-DWMSNcLl.js +32 -0
- package/dist/dev-DWMSNcLl.js.map +1 -0
- package/dist/dev-lock-BFanZSu1.js +10 -0
- package/dist/dev-lock-BFanZSu1.js.map +1 -0
- package/dist/directory-CNL03L6c.js +9 -0
- package/dist/directory-CNL03L6c.js.map +1 -0
- package/dist/env-DoWNvHzW.js +62 -0
- package/dist/env-DoWNvHzW.js.map +1 -0
- package/dist/esm-B25i6Etq.js +12 -0
- package/dist/esm-B25i6Etq.js.map +1 -0
- package/dist/esm-CJocZrdd.js +2 -0
- package/dist/esm-CJocZrdd.js.map +1 -0
- package/dist/eval-BceZMSd5.js +27 -0
- package/dist/eval-BceZMSd5.js.map +1 -0
- package/dist/execAsync-DrhcEHLd.js +2 -0
- package/dist/execAsync-DrhcEHLd.js.map +1 -0
- package/dist/filesync-De6asZeR.js +61 -0
- package/dist/filesync-De6asZeR.js.map +1 -0
- package/dist/getMachineId-bsd-Cch8Z6pV.js +2 -0
- package/dist/getMachineId-bsd-Cch8Z6pV.js.map +1 -0
- package/dist/getMachineId-darwin-kbQWK54o.js +3 -0
- package/dist/getMachineId-darwin-kbQWK54o.js.map +1 -0
- package/dist/getMachineId-linux-DdIel6zr.js +2 -0
- package/dist/getMachineId-linux-DdIel6zr.js.map +1 -0
- package/dist/getMachineId-unsupported-Bvmsh30k.js +2 -0
- package/dist/getMachineId-unsupported-Bvmsh30k.js.map +1 -0
- package/dist/getMachineId-win-BteHZe8j.js +2 -0
- package/dist/getMachineId-win-BteHZe8j.js.map +1 -0
- package/dist/ggt-B3HQjQRM.js +3 -0
- package/dist/ggt-B3HQjQRM.js.map +1 -0
- package/dist/handler-DZyG8Sel.js +4 -0
- package/dist/handler-DZyG8Sel.js.map +1 -0
- package/dist/http-CY3lPMkt.js +320 -0
- package/dist/http-CY3lPMkt.js.map +1 -0
- package/dist/indent-string-BVm-4tyL.js +2 -0
- package/dist/indent-string-BVm-4tyL.js.map +1 -0
- package/dist/list-lQKWZ6ZI.js +10 -0
- package/dist/list-lQKWZ6ZI.js.map +1 -0
- package/dist/login-Ce0tByNd.js +1 -0
- package/dist/logout-_sTWeaiQ.js +5 -0
- package/dist/logout-_sTWeaiQ.js.map +1 -0
- package/dist/logs-DbhJzz4M.js +9 -0
- package/dist/logs-DbhJzz4M.js.map +1 -0
- package/dist/main.js +2 -2
- package/dist/main.js.map +1 -7
- package/dist/model-CBiMKY0P.js +11 -0
- package/dist/model-CBiMKY0P.js.map +1 -0
- package/dist/ms-B7sMc0pR.js +2 -0
- package/dist/ms-B7sMc0pR.js.map +1 -0
- package/dist/open-CSsA4B-l.js +38 -0
- package/dist/open-CSsA4B-l.js.map +1 -0
- package/dist/p-map-DE0acmRv.js +2 -0
- package/dist/p-map-DE0acmRv.js.map +1 -0
- package/dist/problems-BMLsmxd4.js +11 -0
- package/dist/problems-BMLsmxd4.js.map +1 -0
- package/dist/prompt-C9nwJW0G.js +2 -0
- package/dist/prompt-C9nwJW0G.js.map +1 -0
- package/dist/pull-DpizmJGk.js +12 -0
- package/dist/pull-DpizmJGk.js.map +1 -0
- package/dist/push-67KBCw6c.js +12 -0
- package/dist/push-67KBCw6c.js.map +1 -0
- package/dist/root-D_UnUsp7.js +28 -0
- package/dist/root-D_UnUsp7.js.map +1 -0
- package/dist/select-Dey_sjjd.js +4 -0
- package/dist/select-Dey_sjjd.js.map +1 -0
- package/dist/session-BmzGF1t7.js +2 -0
- package/dist/session-BmzGF1t7.js.map +1 -0
- package/dist/spinner-BVmbgIil.js +8 -0
- package/dist/spinner-BVmbgIil.js.map +1 -0
- package/dist/src-DxCC1MV4.js +6 -0
- package/dist/src-DxCC1MV4.js.map +1 -0
- package/dist/status-P_RFQ7J0.js +13 -0
- package/dist/status-P_RFQ7J0.js.map +1 -0
- package/dist/subscribeToEnvironmentLogs-CUicaiw_.js +2 -0
- package/dist/subscribeToEnvironmentLogs-CUicaiw_.js.map +1 -0
- package/dist/sync-json-V52OzeCz.js +112 -0
- package/dist/sync-json-V52OzeCz.js.map +1 -0
- package/dist/table-MrBbxMay.js +11 -0
- package/dist/table-MrBbxMay.js.map +1 -0
- package/dist/update-CfxiL08e.js +12 -0
- package/dist/update-CfxiL08e.js.map +1 -0
- package/dist/update-iyhnL9-M.js +1 -0
- package/dist/var-ByWcufFt.js +59 -0
- package/dist/var-ByWcufFt.js.map +1 -0
- package/dist/version-B_9GB4u3.js +9 -0
- package/dist/version-B_9GB4u3.js.map +1 -0
- package/dist/whoami-BNcXIfz7.js +5 -0
- package/dist/whoami-BNcXIfz7.js.map +1 -0
- package/package.json +19 -23
- package/assets/favicon-128@4x.png +0 -0
- package/dist/add-TWLGKL2T.js +0 -82
- package/dist/add-TWLGKL2T.js.map +0 -7
- package/dist/agent-plugin-TN24O7FB.js +0 -10
- package/dist/agent-plugin-TN24O7FB.js.map +0 -7
- package/dist/chunk-2742UPMB.js +0 -10
- package/dist/chunk-2742UPMB.js.map +0 -7
- package/dist/chunk-3OM5WM7E.js +0 -2
- package/dist/chunk-3OM5WM7E.js.map +0 -7
- package/dist/chunk-442CSROP.js +0 -66
- package/dist/chunk-442CSROP.js.map +0 -7
- package/dist/chunk-7DYQUG5M.js +0 -2
- package/dist/chunk-7DYQUG5M.js.map +0 -7
- package/dist/chunk-DR4CXBD6.js +0 -11
- package/dist/chunk-DR4CXBD6.js.map +0 -7
- package/dist/chunk-F255O64V.js +0 -2
- package/dist/chunk-F255O64V.js.map +0 -7
- package/dist/chunk-GFQYFEEH.js +0 -2
- package/dist/chunk-GFQYFEEH.js.map +0 -7
- package/dist/chunk-GJGBTM5Y.js +0 -2
- package/dist/chunk-GJGBTM5Y.js.map +0 -7
- package/dist/chunk-HCULGPBH.js +0 -2
- package/dist/chunk-HCULGPBH.js.map +0 -7
- package/dist/chunk-J232VCIM.js +0 -2
- package/dist/chunk-J232VCIM.js.map +0 -7
- package/dist/chunk-JG2QCDK2.js +0 -118
- package/dist/chunk-JG2QCDK2.js.map +0 -7
- package/dist/chunk-JKZNSRLU.js +0 -8
- package/dist/chunk-JKZNSRLU.js.map +0 -7
- package/dist/chunk-JYE5LLIF.js +0 -9
- package/dist/chunk-JYE5LLIF.js.map +0 -7
- package/dist/chunk-KKIL22RY.js +0 -2
- package/dist/chunk-KKIL22RY.js.map +0 -7
- package/dist/chunk-L2XBSR7G.js +0 -2
- package/dist/chunk-L2XBSR7G.js.map +0 -7
- package/dist/chunk-MW6MXMSN.js +0 -2
- package/dist/chunk-MW6MXMSN.js.map +0 -7
- package/dist/chunk-OUIZQC4D.js +0 -12
- package/dist/chunk-OUIZQC4D.js.map +0 -7
- package/dist/chunk-R6KJLEKY.js +0 -28
- package/dist/chunk-R6KJLEKY.js.map +0 -7
- package/dist/chunk-SIR6HLN3.js +0 -69
- package/dist/chunk-SIR6HLN3.js.map +0 -7
- package/dist/chunk-SVWK2NXG.js +0 -2
- package/dist/chunk-SVWK2NXG.js.map +0 -7
- package/dist/chunk-T6UHSWMT.js +0 -2
- package/dist/chunk-T6UHSWMT.js.map +0 -7
- package/dist/chunk-WB6O2V5D.js +0 -11
- package/dist/chunk-WB6O2V5D.js.map +0 -7
- package/dist/chunk-XC4F2TLW.js +0 -113
- package/dist/chunk-XC4F2TLW.js.map +0 -7
- package/dist/chunk-YFUOXDPK.js +0 -10
- package/dist/chunk-YFUOXDPK.js.map +0 -7
- package/dist/chunk-ZSREFZXV.js +0 -211
- package/dist/chunk-ZSREFZXV.js.map +0 -7
- package/dist/chunk-ZYDMXS5R.js +0 -6
- package/dist/chunk-ZYDMXS5R.js.map +0 -7
- package/dist/configure-UJS7V2JX.js +0 -12
- package/dist/configure-UJS7V2JX.js.map +0 -7
- package/dist/debugger-QN2MCLBL.js +0 -41
- package/dist/debugger-QN2MCLBL.js.map +0 -7
- package/dist/deploy-J74PHPQA.js +0 -25
- package/dist/deploy-J74PHPQA.js.map +0 -7
- package/dist/dev-GGUSOOYP.js +0 -59
- package/dist/dev-GGUSOOYP.js.map +0 -7
- package/dist/esm-D77XRR65.js +0 -38
- package/dist/esm-D77XRR65.js.map +0 -7
- package/dist/eval-L6WHUFLU.js +0 -54
- package/dist/eval-L6WHUFLU.js.map +0 -7
- package/dist/getMachineId-bsd-QUXN4NKS.js +0 -2
- package/dist/getMachineId-bsd-QUXN4NKS.js.map +0 -7
- package/dist/getMachineId-darwin-TCXBAX22.js +0 -3
- package/dist/getMachineId-darwin-TCXBAX22.js.map +0 -7
- package/dist/getMachineId-linux-IJ3LYIOX.js +0 -2
- package/dist/getMachineId-linux-IJ3LYIOX.js.map +0 -7
- package/dist/getMachineId-unsupported-IKXBUCYY.js +0 -2
- package/dist/getMachineId-unsupported-IKXBUCYY.js.map +0 -7
- package/dist/getMachineId-win-6CX7VSFF.js +0 -2
- package/dist/getMachineId-win-6CX7VSFF.js.map +0 -7
- package/dist/ggt-5XNRJZSW.js +0 -44
- package/dist/ggt-5XNRJZSW.js.map +0 -7
- package/dist/list-756D46N5.js +0 -11
- package/dist/list-756D46N5.js.map +0 -7
- package/dist/login-GMWQRH7V.js +0 -2
- package/dist/login-GMWQRH7V.js.map +0 -7
- package/dist/logout-LQABTJFD.js +0 -7
- package/dist/logout-LQABTJFD.js.map +0 -7
- package/dist/logs-AQZB272X.js +0 -28
- package/dist/logs-AQZB272X.js.map +0 -7
- package/dist/open-OMZWPQ66.js +0 -74
- package/dist/open-OMZWPQ66.js.map +0 -7
- package/dist/problems-FZJKH52E.js +0 -14
- package/dist/problems-FZJKH52E.js.map +0 -7
- package/dist/pull-XYCYN7QN.js +0 -28
- package/dist/pull-XYCYN7QN.js.map +0 -7
- package/dist/push-3QM7ZFTC.js +0 -2
- package/dist/push-3QM7ZFTC.js.map +0 -7
- package/dist/status-PWAXNK5G.js +0 -14
- package/dist/status-PWAXNK5G.js.map +0 -7
- package/dist/update-QIQFJFRQ.js +0 -2
- package/dist/update-QIQFJFRQ.js.map +0 -7
- package/dist/var-N4WGGJXZ.js +0 -159
- package/dist/var-N4WGGJXZ.js.map +0 -7
- package/dist/version-AJKSJJDC.js +0 -11
- package/dist/version-AJKSJJDC.js.map +0 -7
- package/dist/whoami-KJYDSQSD.js +0 -7
- package/dist/whoami-KJYDSQSD.js.map +0 -7
package/dist/chunk-YFUOXDPK.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import{a as I}from"./chunk-L2XBSR7G.js";import{M as L,x as T}from"./chunk-442CSROP.js";import{K as M,ha as f,ma as S,ra as a,ta as o}from"./chunk-JG2QCDK2.js";import{a as W}from"./chunk-GFQYFEEH.js";import{a as m,f as $,h as A}from"./chunk-7DYQUG5M.js";A();var e=$(M(),1),G=$(W(),1);import O from"node:crypto";import U from"node:os";import i from"node:path";var g="AGENTS.md",y="CLAUDE.md",H="https://raw.githubusercontent.com/gadget-inc/skills/main/agents/AGENTS.md",j="gadget-best-practices",N="gadget-inc/skills",D="skills/gadget/",P=(0,G.default)("10s"),K=m(n=>{let t=i.resolve(n.path);return O.createHash("md5").update(f.windows?t.toLowerCase():t).digest("hex").slice(0,16)},"projectHash"),F=m((n,t)=>i.join(f.cacheDir,`${t}${K(n)}`),"optOutPath"),q=m(async({ctx:n,directory:t,force:r})=>{let p=t.absolute(g),w=t.absolute(y),E=await e.default.pathExists(p),s=await e.default.lstat(w).then(()=>!0,()=>!1);if(!r&&(E||s)){o({content:a`{gray ✓} Agent scaffold already exists (reinstall with {cyanBright ggt agent-plugin install --force})`});return}try{let u=await L({context:{ctx:n},method:"GET",url:H,headers:{Accept:"text/plain"},timeout:{request:P}}).text();await e.default.outputFile(p,u.endsWith(`
|
|
2
|
-
`)?u:`${u}
|
|
3
|
-
`)}catch{o({ensureEmptyLineAbove:!0,content:a`{red Failed to install AGENTS.md.} Try again: {cyanBright ggt agent-plugin install}`});return}o({content:a`{greenBright ✓} AGENTS.md installed`});try{r&&await e.default.remove(w),await e.default.symlink(g,w)}catch{f.windows?o({content:a`To link {cyanBright ${y}} → {cyanBright ${g}} on Windows, you may need Developer Mode.
|
|
4
|
-
|
|
5
|
-
Try in PowerShell:
|
|
6
|
-
{cyanBright New-Item -ItemType SymbolicLink -Path ${y} -Target ${g}}`}):o({content:a`Couldn't create {cyanBright ${y}} symlink.
|
|
7
|
-
|
|
8
|
-
Try:
|
|
9
|
-
{cyanBright ln -sf ${g} ${y}}`})}},"installAgentsMdScaffold"),rt=m(async({ctx:n,directory:t})=>{if(!S.isInteractive||f.logFormat==="json"||!await B(t)||await e.default.pathExists(t.absolute(g))||await e.default.lstat(t.absolute(y)).then(()=>!0,()=>!1))return;let r=F(t,"opt_out-agents-md-hint-");if(await e.default.pathExists(r))return;if(!await T({exitWhenNo:!1,ensureEmptyLineAbove:!0,ensureNewLine:!0,content:`Add ${g} to this project for your coding agent?`})){await e.default.outputFile(r,"1").catch(()=>{});return}await q({ctx:n,directory:t})},"maybePromptAgentsMd"),R=m(async({ctx:n,directory:t,ref:r="main",force:p})=>{let w=t.absolute(".agents/skills",j,"SKILL.md");if(!p&&await e.default.pathExists(w)){o({content:a`{gray ✓} Gadget skills already installed (reinstall with {cyanBright ggt agent-plugin install --force})`});return}let E;try{let s=`https://api.github.com/repos/${N}/git/trees/${r}?recursive=1`,u=await L({context:{ctx:n},method:"GET",url:s,headers:{Accept:"application/vnd.github+json"},responseType:"json",resolveBodyOnly:!0,timeout:{request:P}}),{tree:k}=u,l=k.filter(h=>h.type==="blob"&&h.path.startsWith(D));if(l.length===0)throw new Error("No skills found in repository.");let x=new Set;for(let h of l){let c=h.path.slice(D.length);c.includes("..")||c.startsWith("/")||x.add(c.split("/")[0])}let b=t.absolute(".agents",`.tmp-gadget-skills-${Date.now()}`);await e.default.ensureDir(b);try{await I(l,async c=>{let v=c.path.slice(D.length);if(v.includes("..")||v.startsWith("/"))return;let d=i.join(b,v);if(!i.resolve(d).startsWith(i.resolve(b)))return;let _=`https://raw.githubusercontent.com/${N}/${r}/${c.path}`,C=await L({context:{ctx:n},method:"GET",url:_,timeout:{request:P}}).text();await e.default.ensureDir(i.dirname(d)),await e.default.writeFile(d,C)},{concurrency:5});let h=t.absolute(".agents/skills");for(let c of x){let v=i.join(b,c),d=i.join(h,c);await e.default.remove(d),await e.default.move(v,d,{overwrite:!0})}}finally{await e.default.remove(b).catch(()=>{})}E=[...x]}catch(s){o({ensureEmptyLineAbove:!0,content:a`{red Failed to install skills.} ${s instanceof Error?s.message:String(s)}`});return}o({content:a`{greenBright ✓} Installed skills: ${E.join(", ")}`});try{let s=t.absolute(".claude/skills");await e.default.ensureDir(s);for(let u of E){let k=t.absolute(".agents/skills",u),l=i.join(s,u);try{let x=await e.default.readlink(l);if(i.resolve(i.dirname(l),x)===i.resolve(k))continue}catch{}await e.default.remove(l),U.platform()==="win32"?await e.default.symlink(k,l,"junction"):await e.default.symlink(i.relative(i.dirname(l),k),l)}o({content:a`{greenBright ✓} Symlinks created in .claude/skills/`})}catch(s){o({content:a`{yellow ⚠} Failed to create .claude/skills/ symlinks: ${s instanceof Error?s.message:String(s)}`})}},"installGadgetSkillsIntoProject"),B=m(async n=>{try{for await(let t of n.walk())if(!t.startsWith(".gadget"))return!0}catch{return!1}return!1},"hasNonGadgetFiles"),at=m(async({ctx:n,directory:t})=>{if(!S.isInteractive||f.logFormat==="json"||!await B(t)||await e.default.pathExists(t.absolute(".agents/skills",j,"SKILL.md")))return;let r=F(t,"opt_out-gadget-skills-hint-");if(await e.default.pathExists(r))return;if(!await T({exitWhenNo:!1,ensureEmptyLineAbove:!0,ensureNewLine:!0,content:"Install Gadget agent skills for your coding agent?"})){await e.default.outputFile(r,"1").catch(()=>{});return}await R({ctx:n,directory:t,force:!0})},"maybePromptGadgetSkills");export{q as a,rt as b,R as c,at as d};
|
|
10
|
-
//# sourceMappingURL=chunk-YFUOXDPK.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/services/output/agent-plugin.ts"],
|
|
4
|
-
"sourcesContent": ["import fs from \"fs-extra\";\nimport ms from \"ms\";\nimport crypto from \"node:crypto\";\nimport os from \"node:os\";\nimport path from \"node:path\";\nimport pMap from \"p-map\";\n\nimport type { Context } from \"../command/context.js\";\n\nimport { config } from \"../config/config.js\";\nimport { Directory } from \"../filesync/directory.js\";\nimport { http } from \"../http/http.js\";\nimport { confirm } from \"./confirm.js\";\nimport { output } from \"./output.js\";\nimport { println } from \"./print.js\";\nimport { sprint } from \"./sprint.js\";\n\nconst AGENTS_FILE = \"AGENTS.md\";\nconst CLAUDE_FILE = \"CLAUDE.md\";\nconst AGENTS_MD_URL = \"https://raw.githubusercontent.com/gadget-inc/skills/main/agents/AGENTS.md\";\n\nconst SENTINEL_SKILL = \"gadget-best-practices\";\nconst SKILLS_REPO = \"gadget-inc/skills\";\nconst SKILLS_PREFIX = \"skills/gadget/\";\n\nconst HTTP_TIMEOUT = ms(\"10s\");\n\nconst projectHash = (directory: Directory): string => {\n const root = path.resolve(directory.path);\n return crypto\n .createHash(\"md5\")\n .update(config.windows ? root.toLowerCase() : root)\n .digest(\"hex\")\n .slice(0, 16);\n};\n\nconst optOutPath = (directory: Directory, prefix: string): string => {\n return path.join(config.cacheDir, `${prefix}${projectHash(directory)}`);\n};\n\nexport const installAgentsMdScaffold = async ({\n ctx,\n directory,\n force,\n}: {\n ctx: Context;\n directory: Directory;\n force?: boolean;\n}): Promise<void> => {\n const agentsPath = directory.absolute(AGENTS_FILE);\n const claudePath = directory.absolute(CLAUDE_FILE);\n\n const agentsExists = await fs.pathExists(agentsPath);\n const claudeExists = await fs.lstat(claudePath).then(\n () => true,\n () => false,\n );\n\n if (!force && (agentsExists || claudeExists)) {\n println({\n content: sprint`{gray \u2713} Agent scaffold already exists (reinstall with {cyanBright ggt agent-plugin install --force})`,\n });\n return;\n }\n\n try {\n const text = await http({\n context: { ctx },\n method: \"GET\",\n url: AGENTS_MD_URL,\n headers: { Accept: \"text/plain\" },\n timeout: { request: HTTP_TIMEOUT },\n }).text();\n await fs.outputFile(agentsPath, text.endsWith(\"\\n\") ? text : `${text}\\n`);\n } catch {\n println({\n ensureEmptyLineAbove: true,\n content: sprint`{red Failed to install AGENTS.md.} Try again: {cyanBright ggt agent-plugin install}`,\n });\n return;\n }\n\n println({ content: sprint`{greenBright \u2713} AGENTS.md installed` });\n\n try {\n if (force) await fs.remove(claudePath);\n await fs.symlink(AGENTS_FILE, claudePath);\n } catch {\n if (config.windows) {\n println({\n content: sprint`To link {cyanBright ${CLAUDE_FILE}} \u2192 {cyanBright ${AGENTS_FILE}} on Windows, you may need Developer Mode.\n\nTry in PowerShell:\n {cyanBright New-Item -ItemType SymbolicLink -Path ${CLAUDE_FILE} -Target ${AGENTS_FILE}}`,\n });\n } else {\n println({\n content: sprint`Couldn't create {cyanBright ${CLAUDE_FILE}} symlink.\n\nTry:\n {cyanBright ln -sf ${AGENTS_FILE} ${CLAUDE_FILE}}`,\n });\n }\n }\n};\n\nexport const maybePromptAgentsMd = async ({ ctx, directory }: { ctx: Context; directory: Directory }): Promise<void> => {\n if (!output.isInteractive || config.logFormat === \"json\") return;\n // don't prompt to add AGENTS.md if the directory doesn't contain any user files\n // this means the first sync has not happened so we don't know yet if the user has\n // their own AGENTS.md already\n if (!(await hasNonGadgetFiles(directory))) return;\n if (await fs.pathExists(directory.absolute(AGENTS_FILE))) return;\n if (\n await fs.lstat(directory.absolute(CLAUDE_FILE)).then(\n () => true,\n () => false,\n )\n )\n return;\n\n const optOut = optOutPath(directory, \"opt_out-agents-md-hint-\");\n if (await fs.pathExists(optOut)) return;\n\n const yes = await confirm({\n exitWhenNo: false,\n ensureEmptyLineAbove: true,\n ensureNewLine: true,\n content: `Add ${AGENTS_FILE} to this project for your coding agent?`,\n });\n\n if (!yes) {\n await fs.outputFile(optOut, \"1\").catch(() => undefined);\n return;\n }\n\n await installAgentsMdScaffold({ ctx, directory });\n};\n\ntype GitHubTreeEntry = {\n path: string;\n type: string;\n sha: string;\n};\n\nexport const installGadgetSkillsIntoProject = async ({\n ctx,\n directory,\n ref = \"main\",\n force,\n}: {\n ctx: Context;\n directory: Directory;\n ref?: string;\n force?: boolean;\n}): Promise<void> => {\n const sentinelPath = directory.absolute(\".agents/skills\", SENTINEL_SKILL, \"SKILL.md\");\n\n if (!force && (await fs.pathExists(sentinelPath))) {\n println({\n content: sprint`{gray \u2713} Gadget skills already installed (reinstall with {cyanBright ggt agent-plugin install --force})`,\n });\n return;\n }\n\n let skillNames: string[];\n\n try {\n const treeUrl = `https://api.github.com/repos/${SKILLS_REPO}/git/trees/${ref}?recursive=1`;\n const treeData = await http({\n context: { ctx },\n method: \"GET\",\n url: treeUrl,\n headers: { Accept: \"application/vnd.github+json\" },\n responseType: \"json\",\n resolveBodyOnly: true,\n timeout: { request: HTTP_TIMEOUT },\n });\n\n const { tree } = treeData as { tree: GitHubTreeEntry[] };\n const blobs = tree.filter((e) => e.type === \"blob\" && e.path.startsWith(SKILLS_PREFIX));\n if (blobs.length === 0) {\n throw new Error(\"No skills found in repository.\");\n }\n\n const names = new Set<string>();\n for (const blob of blobs) {\n const relative = blob.path.slice(SKILLS_PREFIX.length);\n if (relative.includes(\"..\") || relative.startsWith(\"/\")) continue;\n names.add(relative.split(\"/\")[0] as string);\n }\n\n const tmpDir = directory.absolute(\".agents\", `.tmp-gadget-skills-${Date.now()}`);\n await fs.ensureDir(tmpDir);\n\n try {\n await pMap(\n blobs,\n async (blob) => {\n const relative = blob.path.slice(SKILLS_PREFIX.length);\n if (relative.includes(\"..\") || relative.startsWith(\"/\")) return;\n\n const destPath = path.join(tmpDir, relative);\n if (!path.resolve(destPath).startsWith(path.resolve(tmpDir))) return;\n\n const rawUrl = `https://raw.githubusercontent.com/${SKILLS_REPO}/${ref}/${blob.path}`;\n const text = await http({\n context: { ctx },\n method: \"GET\",\n url: rawUrl,\n timeout: { request: HTTP_TIMEOUT },\n }).text();\n\n await fs.ensureDir(path.dirname(destPath));\n await fs.writeFile(destPath, text);\n },\n { concurrency: 5 },\n );\n\n const skillsDir = directory.absolute(\".agents/skills\");\n for (const name of names) {\n const src = path.join(tmpDir, name);\n const dest = path.join(skillsDir, name);\n await fs.remove(dest);\n await fs.move(src, dest, { overwrite: true });\n }\n } finally {\n await fs.remove(tmpDir).catch(() => undefined);\n }\n\n skillNames = [...names];\n } catch (error) {\n println({\n ensureEmptyLineAbove: true,\n content: sprint`{red Failed to install skills.} ${error instanceof Error ? error.message : String(error)}`,\n });\n return;\n }\n\n println({\n content: sprint`{greenBright \u2713} Installed skills: ${skillNames.join(\", \")}`,\n });\n\n try {\n const claudeSkillsDir = directory.absolute(\".claude/skills\");\n await fs.ensureDir(claudeSkillsDir);\n\n for (const skillName of skillNames) {\n const target = directory.absolute(\".agents/skills\", skillName);\n const linkPath = path.join(claudeSkillsDir, skillName);\n\n try {\n const existing = await fs.readlink(linkPath);\n if (path.resolve(path.dirname(linkPath), existing) === path.resolve(target)) continue;\n } catch {}\n\n await fs.remove(linkPath);\n\n if (os.platform() === \"win32\") {\n await fs.symlink(target, linkPath, \"junction\");\n } else {\n await fs.symlink(path.relative(path.dirname(linkPath), target), linkPath);\n }\n }\n\n println({\n content: sprint`{greenBright \u2713} Symlinks created in .claude/skills/`,\n });\n } catch (error) {\n println({\n content: sprint`{yellow \u26A0} Failed to create .claude/skills/ symlinks: ${error instanceof Error ? error.message : String(error)}`,\n });\n }\n};\n\nconst hasNonGadgetFiles = async (directory: Directory): Promise<boolean> => {\n try {\n for await (const normalizedPath of directory.walk()) {\n if (!normalizedPath.startsWith(\".gadget\")) {\n return true;\n }\n }\n } catch {\n // on error, skip the prompt\n return false;\n }\n\n return false;\n};\n\nexport const maybePromptGadgetSkills = async ({ ctx, directory }: { ctx: Context; directory: Directory }): Promise<void> => {\n if (!output.isInteractive || config.logFormat === \"json\") return;\n // don't prompt to add skills if the directory doesn't contain any user files\n // this means the first sync has not happened so we don't know yet if the user has\n // their own skills already\n if (!(await hasNonGadgetFiles(directory))) return;\n if (await fs.pathExists(directory.absolute(\".agents/skills\", SENTINEL_SKILL, \"SKILL.md\"))) return;\n\n const optOut = optOutPath(directory, \"opt_out-gadget-skills-hint-\");\n if (await fs.pathExists(optOut)) return;\n\n const yes = await confirm({\n exitWhenNo: false,\n ensureEmptyLineAbove: true,\n ensureNewLine: true,\n content: \"Install Gadget agent skills for your coding agent?\",\n });\n\n if (!yes) {\n await fs.outputFile(optOut, \"1\").catch(() => undefined);\n return;\n }\n\n await installGadgetSkillsIntoProject({ ctx, directory, force: true });\n};\n"],
|
|
5
|
-
"mappings": "6PAAAA,IA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EAAY,EACtD,MACF,CAEA,MAAME,EAA+B,CAAE,IAAAhB,EAAK,UAAAR,EAAW,MAAO,EAAK,CAAC,CACtE,EAxBuC",
|
|
6
|
-
"names": ["init_cjs", "import_fs_extra", "import_ms", "crypto", "os", "path", "AGENTS_FILE", "CLAUDE_FILE", "AGENTS_MD_URL", "SENTINEL_SKILL", "SKILLS_REPO", "SKILLS_PREFIX", "HTTP_TIMEOUT", "ms", "projectHash", "__name", "directory", "root", "path", "crypto", "config", "optOutPath", "prefix", "installAgentsMdScaffold", "ctx", "force", "agentsPath", "claudePath", "agentsExists", "fs", "claudeExists", "println", "sprint", "text", "http", "maybePromptAgentsMd", "output", "hasNonGadgetFiles", "optOut", "confirm", "installGadgetSkillsIntoProject", "ref", "sentinelPath", "skillNames", "treeUrl", "treeData", "tree", "blobs", "e", "names", "blob", "relative", "tmpDir", "pMap", "destPath", "rawUrl", "skillsDir", "name", "src", "dest", "error", "claudeSkillsDir", "skillName", "target", "linkPath", "existing", "os", "normalizedPath", "maybePromptGadgetSkills"]
|
|
7
|
-
}
|
package/dist/chunk-ZSREFZXV.js
DELETED
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
import{ra as e}from"./chunk-JG2QCDK2.js";import{h as t}from"./chunk-7DYQUG5M.js";t();var i=e(`
|
|
2
|
-
subscription EnvironmentLogs($query: String!, $start: DateTime, $limit: Int) {
|
|
3
|
-
logsSearchV2(query: $query, start: $start, limit: $limit) {
|
|
4
|
-
status
|
|
5
|
-
data
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
`),s=e(`
|
|
9
|
-
subscription RemoteFileSyncEvents($localFilesVersion: String!) {
|
|
10
|
-
remoteFileSyncEvents(localFilesVersion: $localFilesVersion, encoding: base64) {
|
|
11
|
-
remoteFilesVersion
|
|
12
|
-
changed {
|
|
13
|
-
path
|
|
14
|
-
mode
|
|
15
|
-
content
|
|
16
|
-
encoding
|
|
17
|
-
}
|
|
18
|
-
deleted {
|
|
19
|
-
path
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
`),o=e(`
|
|
24
|
-
query RemoteFilesVersion {
|
|
25
|
-
remoteFilesVersion
|
|
26
|
-
}
|
|
27
|
-
`),a=e(`
|
|
28
|
-
mutation PublishFileSyncEvents($input: PublishFileSyncEventsInput!) {
|
|
29
|
-
publishFileSyncEvents(input: $input) {
|
|
30
|
-
remoteFilesVersion
|
|
31
|
-
problems {
|
|
32
|
-
level
|
|
33
|
-
message
|
|
34
|
-
path
|
|
35
|
-
type
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
`),r=e(`
|
|
40
|
-
query FileSyncFiles($paths: [String!]!, $filesVersion: String, $encoding: FileSyncEncoding) {
|
|
41
|
-
fileSyncFiles(paths: $paths, filesVersion: $filesVersion, encoding: $encoding) {
|
|
42
|
-
filesVersion
|
|
43
|
-
files {
|
|
44
|
-
path
|
|
45
|
-
mode
|
|
46
|
-
content
|
|
47
|
-
encoding
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
`),l=e(`
|
|
52
|
-
query FileSyncHashes($filesVersion: String) {
|
|
53
|
-
fileSyncHashes(filesVersion: $filesVersion) {
|
|
54
|
-
filesVersion
|
|
55
|
-
hashes
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
`),E=e(`
|
|
59
|
-
query FileSyncComparisonHashes($filesVersion: String!) {
|
|
60
|
-
fileSyncComparisonHashes(filesVersion: $filesVersion) {
|
|
61
|
-
filesVersionHashes {
|
|
62
|
-
filesVersion
|
|
63
|
-
hashes
|
|
64
|
-
}
|
|
65
|
-
latestFilesVersionHashes {
|
|
66
|
-
filesVersion
|
|
67
|
-
hashes
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
`),p=e(`
|
|
72
|
-
subscription PublishStatus($localFilesVersion: String!, $force: Boolean, $allowCharges: Boolean, $allowDeletedData: Boolean) {
|
|
73
|
-
publishStatus(localFilesVersion: $localFilesVersion, force: $force, allowCharges: $allowCharges, allowDeletedData: $allowDeletedData) {
|
|
74
|
-
publishStarted
|
|
75
|
-
remoteFilesVersion
|
|
76
|
-
progress
|
|
77
|
-
issues {
|
|
78
|
-
severity
|
|
79
|
-
message
|
|
80
|
-
node {
|
|
81
|
-
type
|
|
82
|
-
key
|
|
83
|
-
apiIdentifier
|
|
84
|
-
name
|
|
85
|
-
fieldType
|
|
86
|
-
parentKey
|
|
87
|
-
parentApiIdentifier
|
|
88
|
-
}
|
|
89
|
-
nodeLabels {
|
|
90
|
-
type
|
|
91
|
-
identifier
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
deletedModelsAndFields {
|
|
95
|
-
deletedModels
|
|
96
|
-
deletedModelFields {
|
|
97
|
-
modelIdentifier
|
|
98
|
-
fields
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
status {
|
|
102
|
-
code
|
|
103
|
-
message
|
|
104
|
-
output
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
`),u=e(`
|
|
109
|
-
mutation createModel($path: String!, $fields: [CreateModelFieldsInput!]) {
|
|
110
|
-
createModel(path: $path, fields: $fields) {
|
|
111
|
-
remoteFilesVersion
|
|
112
|
-
changed {
|
|
113
|
-
path
|
|
114
|
-
mode
|
|
115
|
-
content
|
|
116
|
-
encoding
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
`),S=e(`
|
|
121
|
-
mutation createAction($path: String!) {
|
|
122
|
-
createAction(path: $path) {
|
|
123
|
-
remoteFilesVersion
|
|
124
|
-
changed {
|
|
125
|
-
path
|
|
126
|
-
mode
|
|
127
|
-
content
|
|
128
|
-
encoding
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
`),c=e(`
|
|
133
|
-
mutation createRoute($method: String!, $path: String!) {
|
|
134
|
-
createRoute(method: $method, path: $path) {
|
|
135
|
-
remoteFilesVersion
|
|
136
|
-
changed {
|
|
137
|
-
path
|
|
138
|
-
mode
|
|
139
|
-
content
|
|
140
|
-
encoding
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
`),_=e(`
|
|
145
|
-
mutation createModelFields($path: String!, $fields: [CreateModelFieldsInput!]!) {
|
|
146
|
-
createModelFields(path: $path, fields: $fields) {
|
|
147
|
-
remoteFilesVersion
|
|
148
|
-
changed {
|
|
149
|
-
path
|
|
150
|
-
mode
|
|
151
|
-
content
|
|
152
|
-
encoding
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
`),y=e(`
|
|
157
|
-
mutation CreateEnvironment($environment: EnvironmentInput!) {
|
|
158
|
-
createEnvironment(environment: $environment) {
|
|
159
|
-
slug
|
|
160
|
-
status
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
`),V=e(`
|
|
164
|
-
mutation UnpauseEnvironment {
|
|
165
|
-
unpauseEnvironment {
|
|
166
|
-
success
|
|
167
|
-
alreadyActive
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
`),I=e(`
|
|
171
|
-
query PublishIssues {
|
|
172
|
-
publishIssues {
|
|
173
|
-
severity
|
|
174
|
-
message
|
|
175
|
-
node {
|
|
176
|
-
type
|
|
177
|
-
key
|
|
178
|
-
apiIdentifier
|
|
179
|
-
name
|
|
180
|
-
fieldType
|
|
181
|
-
parentKey
|
|
182
|
-
parentApiIdentifier
|
|
183
|
-
}
|
|
184
|
-
nodeLabels {
|
|
185
|
-
type
|
|
186
|
-
identifier
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
`),T=e(`
|
|
191
|
-
query EnvironmentVariables {
|
|
192
|
-
environmentVariables {
|
|
193
|
-
key
|
|
194
|
-
value
|
|
195
|
-
isSecret
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
`),b=e(`
|
|
199
|
-
mutation SetEnvironmentVariable($input: SetEnvironmentVariableInput!) {
|
|
200
|
-
setEnvironmentVariable(input: $input) {
|
|
201
|
-
remoteFilesVersion
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
`),N=e(`
|
|
205
|
-
mutation DeleteEnvironmentVariable($key: String!) {
|
|
206
|
-
deleteEnvironmentVariable(key: $key) {
|
|
207
|
-
remoteFilesVersion
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
`);export{i as a,s as b,a as c,r as d,l as e,E as f,p as g,u as h,S as i,c as j,_ as k,y as l,V as m,I as n,T as o,b as p,N as q};
|
|
211
|
-
//# sourceMappingURL=chunk-ZSREFZXV.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/services/app/edit/operation.ts"],
|
|
4
|
-
"sourcesContent": ["import type { ExecutionResult } from \"graphql-ws\";\nimport type { JsonObject } from \"type-fest\";\n\nimport type {\n CreateActionMutation,\n CreateActionMutationVariables,\n CreateEnvironmentMutation,\n CreateEnvironmentMutationVariables,\n CreateModelFieldsMutation,\n CreateModelMutation,\n CreateModelMutationVariables,\n CreateRouteMutation,\n CreateRouteMutationVariables,\n DeleteEnvironmentVariableMutation,\n DeleteEnvironmentVariableMutationVariables,\n EnvironmentLogsSubscription,\n EnvironmentLogsSubscriptionVariables,\n EnvironmentVariablesQuery,\n EnvironmentVariablesQueryVariables,\n FileSyncComparisonHashesQuery,\n FileSyncComparisonHashesQueryVariables,\n FileSyncFilesQuery,\n FileSyncFilesQueryVariables,\n FileSyncHashesQuery,\n FileSyncHashesQueryVariables,\n PublishFileSyncEventsMutation,\n PublishFileSyncEventsMutationVariables,\n PublishIssuesQuery,\n PublishIssuesQueryVariables,\n PublishStatusSubscription,\n PublishStatusSubscriptionVariables,\n RemoteFilesVersionQuery,\n RemoteFilesVersionQueryVariables,\n RemoteFileSyncEventsSubscription,\n RemoteFileSyncEventsSubscriptionVariables,\n SetEnvironmentVariableMutation,\n SetEnvironmentVariableMutationVariables,\n UnpauseEnvironmentMutation,\n UnpauseEnvironmentMutationVariables,\n} from \"../../../__generated__/graphql.js\";\n\nimport { sprint } from \"../../output/sprint.js\";\n\n/**\n * A GraphQL query with its associated types.\n *\n * At runtime, this is just a string.\n */\nexport type GraphQLQuery<\n Data extends JsonObject = JsonObject,\n Variables extends JsonObject = JsonObject,\n Extensions extends JsonObject = JsonObject,\n Response extends ExecutionResult<Data, Extensions> = ExecutionResult<Data, Extensions>,\n> = string & { type: \"query\"; Data: Data; Variables: Variables; Extensions: Extensions; Response: Response };\n\n/**\n * A GraphQL mutation with its associated types.\n *\n * At runtime, this is just a string.\n */\nexport type GraphQLMutation<\n Data extends JsonObject = JsonObject,\n Variables extends JsonObject = JsonObject,\n Extensions extends JsonObject = JsonObject,\n Response extends ExecutionResult<Data, Extensions> = ExecutionResult<Data, Extensions>,\n> = string & { type: \"mutation\"; Data: Data; Variables: Variables; Extensions: Extensions; Response: Response };\n\n/**\n * A GraphQL subscription with its associated types.\n *\n * At runtime, this is just a string.\n */\nexport type GraphQLSubscription<\n Data extends JsonObject = JsonObject,\n Variables extends JsonObject = JsonObject,\n Extensions extends JsonObject = JsonObject,\n Response extends ExecutionResult<Data, Extensions> = ExecutionResult<Data, Extensions>,\n> = string & { type: \"subscription\"; Data: Data; Variables: Variables; Extensions: Extensions; Response: Response };\n\nexport const ENVIRONMENT_LOGS_SUBSCRIPTION = sprint(/* GraphQL */ `\n subscription EnvironmentLogs($query: String!, $start: DateTime, $limit: Int) {\n logsSearchV2(query: $query, start: $start, limit: $limit) {\n status\n data\n }\n }\n`) as GraphQLSubscription<EnvironmentLogsSubscription, EnvironmentLogsSubscriptionVariables>;\n\nexport type ENVIRONMENT_LOGS_SUBSCRIPTION = typeof ENVIRONMENT_LOGS_SUBSCRIPTION;\n\nexport const REMOTE_FILE_SYNC_EVENTS_SUBSCRIPTION = sprint(/* GraphQL */ `\n subscription RemoteFileSyncEvents($localFilesVersion: String!) {\n remoteFileSyncEvents(localFilesVersion: $localFilesVersion, encoding: base64) {\n remoteFilesVersion\n changed {\n path\n mode\n content\n encoding\n }\n deleted {\n path\n }\n }\n }\n`) as GraphQLSubscription<RemoteFileSyncEventsSubscription, RemoteFileSyncEventsSubscriptionVariables>;\n\nexport type REMOTE_FILE_SYNC_EVENTS_SUBSCRIPTION = typeof REMOTE_FILE_SYNC_EVENTS_SUBSCRIPTION;\n\nexport const REMOTE_FILES_VERSION_QUERY = sprint(/* GraphQL */ `\n query RemoteFilesVersion {\n remoteFilesVersion\n }\n`) as GraphQLQuery<RemoteFilesVersionQuery, RemoteFilesVersionQueryVariables>;\n\nexport type REMOTE_FILES_VERSION_QUERY = typeof REMOTE_FILES_VERSION_QUERY;\n\nexport const PUBLISH_FILE_SYNC_EVENTS_MUTATION = sprint(/* GraphQL */ `\n mutation PublishFileSyncEvents($input: PublishFileSyncEventsInput!) {\n publishFileSyncEvents(input: $input) {\n remoteFilesVersion\n problems {\n level\n message\n path\n type\n }\n }\n }\n`) as GraphQLMutation<PublishFileSyncEventsMutation, PublishFileSyncEventsMutationVariables>;\n\nexport type PUBLISH_FILE_SYNC_EVENTS_MUTATION = typeof PUBLISH_FILE_SYNC_EVENTS_MUTATION;\n\nexport const FILE_SYNC_FILES_QUERY = sprint(/* GraphQL */ `\n query FileSyncFiles($paths: [String!]!, $filesVersion: String, $encoding: FileSyncEncoding) {\n fileSyncFiles(paths: $paths, filesVersion: $filesVersion, encoding: $encoding) {\n filesVersion\n files {\n path\n mode\n content\n encoding\n }\n }\n }\n`) as GraphQLQuery<FileSyncFilesQuery, FileSyncFilesQueryVariables>;\n\nexport type FILE_SYNC_FILES_QUERY = typeof FILE_SYNC_FILES_QUERY;\n\nexport const FILE_SYNC_HASHES_QUERY = sprint(/* GraphQL */ `\n query FileSyncHashes($filesVersion: String) {\n fileSyncHashes(filesVersion: $filesVersion) {\n filesVersion\n hashes\n }\n }\n`) as GraphQLQuery<FileSyncHashesQuery, FileSyncHashesQueryVariables>;\n\nexport type FILE_SYNC_HASHES_QUERY = typeof FILE_SYNC_HASHES_QUERY;\n\nexport const FILE_SYNC_COMPARISON_HASHES_QUERY = sprint(/* GraphQL */ `\n query FileSyncComparisonHashes($filesVersion: String!) {\n fileSyncComparisonHashes(filesVersion: $filesVersion) {\n filesVersionHashes {\n filesVersion\n hashes\n }\n latestFilesVersionHashes {\n filesVersion\n hashes\n }\n }\n }\n`) as GraphQLQuery<FileSyncComparisonHashesQuery, FileSyncComparisonHashesQueryVariables>;\n\nexport type FILE_SYNC_COMPARISON_HASHES_QUERY = typeof FILE_SYNC_COMPARISON_HASHES_QUERY;\n\nexport const PUBLISH_STATUS_SUBSCRIPTION = sprint(/* GraphQL */ `\n subscription PublishStatus($localFilesVersion: String!, $force: Boolean, $allowCharges: Boolean, $allowDeletedData: Boolean) {\n publishStatus(localFilesVersion: $localFilesVersion, force: $force, allowCharges: $allowCharges, allowDeletedData: $allowDeletedData) {\n publishStarted\n remoteFilesVersion\n progress\n issues {\n severity\n message\n node {\n type\n key\n apiIdentifier\n name\n fieldType\n parentKey\n parentApiIdentifier\n }\n nodeLabels {\n type\n identifier\n }\n }\n deletedModelsAndFields {\n deletedModels\n deletedModelFields {\n modelIdentifier\n fields\n }\n }\n status {\n code\n message\n output\n }\n }\n }\n`) as GraphQLSubscription<PublishStatusSubscription, PublishStatusSubscriptionVariables>;\n\nexport type PUBLISH_STATUS_SUBSCRIPTION = typeof PUBLISH_STATUS_SUBSCRIPTION;\n\nexport const CREATE_MODEL_MUTATION = sprint(/* GraphQL */ `\n mutation createModel($path: String!, $fields: [CreateModelFieldsInput!]) {\n createModel(path: $path, fields: $fields) {\n remoteFilesVersion\n changed {\n path\n mode\n content\n encoding\n }\n }\n }\n`) as GraphQLMutation<CreateModelMutation, CreateModelMutationVariables>;\n\nexport type CREATE_MODEL_MUTATION = typeof CREATE_MODEL_MUTATION;\n\nexport const CREATE_ACTION_MUTATION = sprint(/* GraphQL */ `\n mutation createAction($path: String!) {\n createAction(path: $path) {\n remoteFilesVersion\n changed {\n path\n mode\n content\n encoding\n }\n }\n }\n`) as GraphQLMutation<CreateActionMutation, CreateActionMutationVariables>;\n\nexport type CREATE_ACTION_MUTATION = typeof CREATE_ACTION_MUTATION;\n\nexport const CREATE_ROUTE_MUTATION = sprint(/* GraphQL */ `\n mutation createRoute($method: String!, $path: String!) {\n createRoute(method: $method, path: $path) {\n remoteFilesVersion\n changed {\n path\n mode\n content\n encoding\n }\n }\n }\n`) as GraphQLMutation<CreateRouteMutation, CreateRouteMutationVariables>;\n\nexport type CREATE_ROUTE_MUTATION = typeof CREATE_ROUTE_MUTATION;\n\nexport const CREATE_MODEL_FIELDS_MUTATION = sprint(/* GraphQL */ `\n mutation createModelFields($path: String!, $fields: [CreateModelFieldsInput!]!) {\n createModelFields(path: $path, fields: $fields) {\n remoteFilesVersion\n changed {\n path\n mode\n content\n encoding\n }\n }\n }\n`) as GraphQLMutation<CreateModelFieldsMutation, CreateModelMutationVariables>;\n\nexport type CREATE_MODEL_FIELDS_MUTATION = typeof CREATE_MODEL_FIELDS_MUTATION;\n\nexport const CREATE_ENVIRONMENT_MUTATION = sprint(/* GraphQL */ `\n mutation CreateEnvironment($environment: EnvironmentInput!) {\n createEnvironment(environment: $environment) {\n slug\n status\n }\n }\n`) as GraphQLMutation<CreateEnvironmentMutation, CreateEnvironmentMutationVariables>;\n\nexport type CREATE_ENVIRONMENT_MUTATION = typeof CREATE_ENVIRONMENT_MUTATION;\n\nexport const UNPAUSE_ENVIRONMENT_MUTATION = sprint(/* GraphQL */ `\n mutation UnpauseEnvironment {\n unpauseEnvironment {\n success\n alreadyActive\n }\n }\n`) as GraphQLMutation<UnpauseEnvironmentMutation, UnpauseEnvironmentMutationVariables>;\n\nexport type UNPAUSE_ENVIRONMENT_MUTATION = typeof UNPAUSE_ENVIRONMENT_MUTATION;\n\nexport const PUBLISH_ISSUES_QUERY = sprint(/* GraphQL */ `\n query PublishIssues {\n publishIssues {\n severity\n message\n node {\n type\n key\n apiIdentifier\n name\n fieldType\n parentKey\n parentApiIdentifier\n }\n nodeLabels {\n type\n identifier\n }\n }\n }\n`) as GraphQLQuery<PublishIssuesQuery, PublishIssuesQueryVariables>;\n\nexport type PUBLISH_ISSUES_QUERY = typeof PUBLISH_ISSUES_QUERY;\n\nexport const ENVIRONMENT_VARIABLES_QUERY = sprint(/* GraphQL */ `\n query EnvironmentVariables {\n environmentVariables {\n key\n value\n isSecret\n }\n }\n`) as GraphQLQuery<EnvironmentVariablesQuery, EnvironmentVariablesQueryVariables>;\n\nexport type ENVIRONMENT_VARIABLES_QUERY = typeof ENVIRONMENT_VARIABLES_QUERY;\n\nexport const SET_ENVIRONMENT_VARIABLE_MUTATION = sprint(/* GraphQL */ `\n mutation SetEnvironmentVariable($input: SetEnvironmentVariableInput!) {\n setEnvironmentVariable(input: $input) {\n remoteFilesVersion\n }\n }\n`) as GraphQLMutation<SetEnvironmentVariableMutation, SetEnvironmentVariableMutationVariables>;\n\nexport type SET_ENVIRONMENT_VARIABLE_MUTATION = typeof SET_ENVIRONMENT_VARIABLE_MUTATION;\n\nexport const DELETE_ENVIRONMENT_VARIABLE_MUTATION = sprint(/* GraphQL */ `\n mutation DeleteEnvironmentVariable($key: String!) {\n deleteEnvironmentVariable(key: $key) {\n remoteFilesVersion\n }\n }\n`) as GraphQLMutation<DeleteEnvironmentVariableMutation, DeleteEnvironmentVariableMutationVariables>;\n\nexport type DELETE_ENVIRONMENT_VARIABLE_MUTATION = typeof DELETE_ENVIRONMENT_VARIABLE_MUTATION;\n"],
|
|
5
|
-
"mappings": "iFAAAA,IA+EO,IAAMC,EAAgCC,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAOjE,EAIYC,EAAuCD,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAexE,EAIYE,EAA6BF,EAAqB;AA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EAAuBd,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAoBxD,EAIYe,EAA8Bf,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAQ/D,EAIYgB,EAAoChB,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAMrE,EAIYiB,EAAuCjB,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAMxE",
|
|
6
|
-
"names": ["init_cjs", "ENVIRONMENT_LOGS_SUBSCRIPTION", "sprint", "REMOTE_FILE_SYNC_EVENTS_SUBSCRIPTION", "REMOTE_FILES_VERSION_QUERY", "PUBLISH_FILE_SYNC_EVENTS_MUTATION", "FILE_SYNC_FILES_QUERY", "FILE_SYNC_HASHES_QUERY", "FILE_SYNC_COMPARISON_HASHES_QUERY", "PUBLISH_STATUS_SUBSCRIPTION", "CREATE_MODEL_MUTATION", "CREATE_ACTION_MUTATION", "CREATE_ROUTE_MUTATION", "CREATE_MODEL_FIELDS_MUTATION", "CREATE_ENVIRONMENT_MUTATION", "UNPAUSE_ENVIRONMENT_MUTATION", "PUBLISH_ISSUES_QUERY", "ENVIRONMENT_VARIABLES_QUERY", "SET_ENVIRONMENT_VARIABLE_MUTATION", "DELETE_ENVIRONMENT_VARIABLE_MUTATION"]
|
|
7
|
-
}
|
package/dist/chunk-ZYDMXS5R.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{a as J}from"./chunk-GFQYFEEH.js";import{a as r,b as A,d as O,h as d}from"./chunk-7DYQUG5M.js";var T=O((Fe,j)=>{d();function Z(e){t.debug=t,t.default=t,t.coerce=z,t.disable=P,t.enable=F,t.enabled=U,t.humanize=J(),t.destroy=V,Object.keys(e).forEach(n=>{t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={};function o(n){let s=0;for(let c=0;c<n.length;c++)s=(s<<5)-s+n.charCodeAt(c),s|=0;return t.colors[Math.abs(s)%t.colors.length]}r(o,"selectColor"),t.selectColor=o;function t(n){let s,c=null,f,b;function C(...p){if(!C.enabled)return;let g=C,w=Number(new Date),$=w-(s||w);g.diff=$,g.prev=s,g.curr=w,s=w,p[0]=t.coerce(p[0]),typeof p[0]!="string"&&p.unshift("%O");let v=0;p[0]=p[0].replace(/%([a-zA-Z%])/g,(R,Y)=>{if(R==="%%")return"%";v++;let L=t.formatters[Y];if(typeof L=="function"){let W=p[v];R=L.call(g,W),p.splice(v,1),v--}return R}),t.formatArgs.call(g,p),(g.log||t.log).apply(g,p)}return r(C,"debug"),C.namespace=n,C.useColors=t.useColors(),C.color=t.selectColor(n),C.extend=i,C.destroy=t.destroy,Object.defineProperty(C,"enabled",{enumerable:!0,configurable:!1,get:r(()=>c!==null?c:(f!==t.namespaces&&(f=t.namespaces,b=t.enabled(n)),b),"get"),set:r(p=>{c=p},"set")}),typeof t.init=="function"&&t.init(C),C}r(t,"createDebug");function i(n,s){let c=t(this.namespace+(typeof s>"u"?":":s)+n);return c.log=this.log,c}r(i,"extend");function F(n){t.save(n),t.namespaces=n,t.names=[],t.skips=[];let s=(typeof n=="string"?n:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let c of s)c[0]==="-"?t.skips.push(c.slice(1)):t.names.push(c)}r(F,"enable");function h(n,s){let c=0,f=0,b=-1,C=0;for(;c<n.length;)if(f<s.length&&(s[f]===n[c]||s[f]==="*"))s[f]==="*"?(b=f,C=c,f++):(c++,f++);else if(b!==-1)f=b+1,C++,c=C;else return!1;for(;f<s.length&&s[f]==="*";)f++;return f===s.length}r(h,"matchesTemplate");function P(){let n=[...t.names,...t.skips.map(s=>"-"+s)].join(",");return t.enable(""),n}r(P,"disable");function U(n){for(let s of t.skips)if(h(n,s))return!1;for(let s of t.names)if(h(n,s))return!0;return!1}r(U,"enabled");function z(n){return n instanceof Error?n.stack||n.message:n}r(z,"coerce");function V(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r(V,"destroy"),t.enable(t.load()),t}r(Z,"setup");j.exports=Z});var B=O((a,x)=>{d();a.formatArgs=K;a.save=Q;a.load=X;a.useColors=H;a.storage=ee();a.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();a.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function H(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}r(H,"useColors");function K(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+x.exports.humanize(this.diff),!this.useColors)return;let o="color: "+this.color;e.splice(1,0,o,"color: inherit");let t=0,i=0;e[0].replace(/%[a-zA-Z%]/g,F=>{F!=="%%"&&(t++,F==="%c"&&(i=t))}),e.splice(i,0,o)}r(K,"formatArgs");a.log=console.debug||console.log||(()=>{});function Q(e){try{e?a.storage.setItem("debug",e):a.storage.removeItem("debug")}catch{}}r(Q,"save");function X(){let e;try{e=a.storage.getItem("debug")||a.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}r(X,"load");function ee(){try{return localStorage}catch{}}r(ee,"localstorage");x.exports=T()(a);var{formatters:te}=x.exports;te.j=function(e){try{return JSON.stringify(e)}catch(o){return"[UnexpectedJSONParseError]: "+o.message}}});var k=O((Oe,N)=>{"use strict";d();N.exports=(e,o)=>{o=o||process.argv;let t=e.startsWith("-")?"":e.length===1?"-":"--",i=o.indexOf(t+e),F=o.indexOf("--");return i!==-1&&(F===-1?!0:i<F)}});var q=O((we,D)=>{"use strict";d();var re=A("os"),m=k(),u=process.env,y;m("no-color")||m("no-colors")||m("color=false")?y=!1:(m("color")||m("colors")||m("color=true")||m("color=always"))&&(y=!0);"FORCE_COLOR"in u&&(y=u.FORCE_COLOR.length===0||parseInt(u.FORCE_COLOR,10)!==0);function oe(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}r(oe,"translateLevel");function ne(e){if(y===!1)return 0;if(m("color=16m")||m("color=full")||m("color=truecolor"))return 3;if(m("color=256"))return 2;if(e&&!e.isTTY&&y!==!0)return 0;let o=y?1:0;if(process.platform==="win32"){let t=re.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in u)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(t=>t in u)||u.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in u)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(u.TEAMCITY_VERSION)?1:0;if(u.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in u){let t=parseInt((u.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(u.TERM_PROGRAM){case"iTerm.app":return t>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(u.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(u.TERM)||"COLORTERM"in u?1:(u.TERM==="dumb",o)}r(ne,"supportsColor");function _(e){let o=ne(e);return oe(o)}r(_,"getSupportLevel");D.exports={supportsColor:_,stdout:_(process.stdout),stderr:_(process.stderr)}});var G=O((l,I)=>{d();var se=A("tty"),E=A("util");l.init=ae;l.log=ue;l.formatArgs=ce;l.save=fe;l.load=Ce;l.useColors=ie;l.destroy=E.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");l.colors=[6,2,3,4,5,1];try{let e=q();e&&(e.stderr||e).level>=2&&(l.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}l.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,o)=>{let t=o.substring(6).toLowerCase().replace(/_([a-z])/g,(F,h)=>h.toUpperCase()),i=process.env[o];return/^(yes|on|true|enabled)$/i.test(i)?i=!0:/^(no|off|false|disabled)$/i.test(i)?i=!1:i==="null"?i=null:i=Number(i),e[t]=i,e},{});function ie(){return"colors"in l.inspectOpts?!!l.inspectOpts.colors:se.isatty(process.stderr.fd)}r(ie,"useColors");function ce(e){let{namespace:o,useColors:t}=this;if(t){let i=this.color,F="\x1B[3"+(i<8?i:"8;5;"+i),h=` ${F};1m${o} \x1B[0m`;e[0]=h+e[0].split(`
|
|
2
|
-
`).join(`
|
|
3
|
-
`+h),e.push(F+"m+"+I.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=le()+o+" "+e[0]}r(ce,"formatArgs");function le(){return l.inspectOpts.hideDate?"":new Date().toISOString()+" "}r(le,"getDate");function ue(...e){return process.stderr.write(E.formatWithOptions(l.inspectOpts,...e)+`
|
|
4
|
-
`)}r(ue,"log");function fe(e){e?process.env.DEBUG=e:delete process.env.DEBUG}r(fe,"save");function Ce(){return process.env.DEBUG}r(Ce,"load");function ae(e){e.inspectOpts={};let o=Object.keys(l.inspectOpts);for(let t=0;t<o.length;t++)e.inspectOpts[o[t]]=l.inspectOpts[o[t]]}r(ae,"init");I.exports=T()(l);var{formatters:S}=I.exports;S.o=function(e){return this.inspectOpts.colors=this.useColors,E.inspect(e,this.inspectOpts).split(`
|
|
5
|
-
`).map(o=>o.trim()).join(" ")};S.O=function(e){return this.inspectOpts.colors=this.useColors,E.inspect(e,this.inspectOpts)}});var pe=O((Re,M)=>{d();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?M.exports=B():M.exports=G()});export{pe as a};
|
|
6
|
-
//# sourceMappingURL=chunk-ZYDMXS5R.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js", "../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js", "../node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js", "../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js", "../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js", "../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js"],
|
|
4
|
-
"sourcesContent": ["\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '')\n\t\t\t.trim()\n\t\t\t.replace(/\\s+/g, ',')\n\t\t\t.split(',')\n\t\t\t.filter(Boolean);\n\n\t\tfor (const ns of split) {\n\t\t\tif (ns[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(ns.slice(1));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(ns);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the given string matches a namespace template, honoring\n\t * asterisks as wildcards.\n\t *\n\t * @param {String} search\n\t * @param {String} template\n\t * @return {Boolean}\n\t */\n\tfunction matchesTemplate(search, template) {\n\t\tlet searchIndex = 0;\n\t\tlet templateIndex = 0;\n\t\tlet starIndex = -1;\n\t\tlet matchIndex = 0;\n\n\t\twhile (searchIndex < search.length) {\n\t\t\tif (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {\n\t\t\t\t// Match character or proceed with wildcard\n\t\t\t\tif (template[templateIndex] === '*') {\n\t\t\t\t\tstarIndex = templateIndex;\n\t\t\t\t\tmatchIndex = searchIndex;\n\t\t\t\t\ttemplateIndex++; // Skip the '*'\n\t\t\t\t} else {\n\t\t\t\t\tsearchIndex++;\n\t\t\t\t\ttemplateIndex++;\n\t\t\t\t}\n\t\t\t} else if (starIndex !== -1) { // eslint-disable-line no-negated-condition\n\t\t\t\t// Backtrack to the last '*' and try to match more characters\n\t\t\t\ttemplateIndex = starIndex + 1;\n\t\t\t\tmatchIndex++;\n\t\t\t\tsearchIndex = matchIndex;\n\t\t\t} else {\n\t\t\t\treturn false; // No match\n\t\t\t}\n\t\t}\n\n\t\t// Handle trailing '*' in template\n\t\twhile (templateIndex < template.length && template[templateIndex] === '*') {\n\t\t\ttemplateIndex++;\n\t\t}\n\n\t\treturn templateIndex === template.length;\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names,\n\t\t\t...createDebug.skips.map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tfor (const skip of createDebug.skips) {\n\t\t\tif (matchesTemplate(name, skip)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (const ns of createDebug.names) {\n\t\t\tif (matchesTemplate(name, ns)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n", "/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\tlet m;\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t// eslint-disable-next-line no-return-assign\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)) && parseInt(m[1], 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n", "'use strict';\nmodule.exports = (flag, argv) => {\n\targv = argv || process.argv;\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst pos = argv.indexOf(prefix + flag);\n\tconst terminatorPos = argv.indexOf('--');\n\treturn pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);\n};\n", "'use strict';\nconst os = require('os');\nconst hasFlag = require('has-flag');\n\nconst env = process.env;\n\nlet forceColor;\nif (hasFlag('no-color') ||\n\thasFlag('no-colors') ||\n\thasFlag('color=false')) {\n\tforceColor = false;\n} else if (hasFlag('color') ||\n\thasFlag('colors') ||\n\thasFlag('color=true') ||\n\thasFlag('color=always')) {\n\tforceColor = true;\n}\nif ('FORCE_COLOR' in env) {\n\tforceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3\n\t};\n}\n\nfunction supportsColor(stream) {\n\tif (forceColor === false) {\n\t\treturn 0;\n\t}\n\n\tif (hasFlag('color=16m') ||\n\t\thasFlag('color=full') ||\n\t\thasFlag('color=truecolor')) {\n\t\treturn 3;\n\t}\n\n\tif (hasFlag('color=256')) {\n\t\treturn 2;\n\t}\n\n\tif (stream && !stream.isTTY && forceColor !== true) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor ? 1 : 0;\n\n\tif (process.platform === 'win32') {\n\t\t// Node.js 7.5.0 is the first version of Node.js to include a patch to\n\t\t// libuv that enables 256 color output on Windows. Anything earlier and it\n\t\t// won't work. However, here we target Node.js 8 at minimum as it is an LTS\n\t\t// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows\n\t\t// release that supports 256 colors. Windows 10 build 14931 is the first release\n\t\t// that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(process.versions.node.split('.')[0]) >= 8 &&\n\t\t\tNumber(osRelease[0]) >= 10 &&\n\t\t\tNumber(osRelease[2]) >= 10586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app':\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\tcase 'Apple_Terminal':\n\t\t\t\treturn 2;\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\treturn min;\n}\n\nfunction getSupportLevel(stream) {\n\tconst level = supportsColor(stream);\n\treturn translateLevel(level);\n}\n\nmodule.exports = {\n\tsupportsColor: getSupportLevel,\n\tstdout: getSupportLevel(process.stdout),\n\tstderr: getSupportLevel(process.stderr)\n};\n", "/**\n * Module dependencies.\n */\n\nconst tty = require('tty');\nconst util = require('util');\n\n/**\n * This is the Node.js implementation of `debug()`.\n */\n\nexports.init = init;\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.destroy = util.deprecate(\n\t() => {},\n\t'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'\n);\n\n/**\n * Colors.\n */\n\nexports.colors = [6, 2, 3, 4, 5, 1];\n\ntry {\n\t// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)\n\t// eslint-disable-next-line import/no-extraneous-dependencies\n\tconst supportsColor = require('supports-color');\n\n\tif (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {\n\t\texports.colors = [\n\t\t\t20,\n\t\t\t21,\n\t\t\t26,\n\t\t\t27,\n\t\t\t32,\n\t\t\t33,\n\t\t\t38,\n\t\t\t39,\n\t\t\t40,\n\t\t\t41,\n\t\t\t42,\n\t\t\t43,\n\t\t\t44,\n\t\t\t45,\n\t\t\t56,\n\t\t\t57,\n\t\t\t62,\n\t\t\t63,\n\t\t\t68,\n\t\t\t69,\n\t\t\t74,\n\t\t\t75,\n\t\t\t76,\n\t\t\t77,\n\t\t\t78,\n\t\t\t79,\n\t\t\t80,\n\t\t\t81,\n\t\t\t92,\n\t\t\t93,\n\t\t\t98,\n\t\t\t99,\n\t\t\t112,\n\t\t\t113,\n\t\t\t128,\n\t\t\t129,\n\t\t\t134,\n\t\t\t135,\n\t\t\t148,\n\t\t\t149,\n\t\t\t160,\n\t\t\t161,\n\t\t\t162,\n\t\t\t163,\n\t\t\t164,\n\t\t\t165,\n\t\t\t166,\n\t\t\t167,\n\t\t\t168,\n\t\t\t169,\n\t\t\t170,\n\t\t\t171,\n\t\t\t172,\n\t\t\t173,\n\t\t\t178,\n\t\t\t179,\n\t\t\t184,\n\t\t\t185,\n\t\t\t196,\n\t\t\t197,\n\t\t\t198,\n\t\t\t199,\n\t\t\t200,\n\t\t\t201,\n\t\t\t202,\n\t\t\t203,\n\t\t\t204,\n\t\t\t205,\n\t\t\t206,\n\t\t\t207,\n\t\t\t208,\n\t\t\t209,\n\t\t\t214,\n\t\t\t215,\n\t\t\t220,\n\t\t\t221\n\t\t];\n\t}\n} catch (error) {\n\t// Swallow - we only care if `supports-color` is available; it doesn't have to be.\n}\n\n/**\n * Build up the default `inspectOpts` object from the environment variables.\n *\n * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js\n */\n\nexports.inspectOpts = Object.keys(process.env).filter(key => {\n\treturn /^debug_/i.test(key);\n}).reduce((obj, key) => {\n\t// Camel-case\n\tconst prop = key\n\t\t.substring(6)\n\t\t.toLowerCase()\n\t\t.replace(/_([a-z])/g, (_, k) => {\n\t\t\treturn k.toUpperCase();\n\t\t});\n\n\t// Coerce string value into JS value\n\tlet val = process.env[key];\n\tif (/^(yes|on|true|enabled)$/i.test(val)) {\n\t\tval = true;\n\t} else if (/^(no|off|false|disabled)$/i.test(val)) {\n\t\tval = false;\n\t} else if (val === 'null') {\n\t\tval = null;\n\t} else {\n\t\tval = Number(val);\n\t}\n\n\tobj[prop] = val;\n\treturn obj;\n}, {});\n\n/**\n * Is stdout a TTY? Colored output is enabled when `true`.\n */\n\nfunction useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}\n\n/**\n * Adds ANSI color escape codes if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\tconst {namespace: name, useColors} = this;\n\n\tif (useColors) {\n\t\tconst c = this.color;\n\t\tconst colorCode = '\\u001B[3' + (c < 8 ? c : '8;5;' + c);\n\t\tconst prefix = ` ${colorCode};1m${name} \\u001B[0m`;\n\n\t\targs[0] = prefix + args[0].split('\\n').join('\\n' + prefix);\n\t\targs.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\\u001B[0m');\n\t} else {\n\t\targs[0] = getDate() + name + ' ' + args[0];\n\t}\n}\n\nfunction getDate() {\n\tif (exports.inspectOpts.hideDate) {\n\t\treturn '';\n\t}\n\treturn new Date().toISOString() + ' ';\n}\n\n/**\n * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.\n */\n\nfunction log(...args) {\n\treturn process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\\n');\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\tif (namespaces) {\n\t\tprocess.env.DEBUG = namespaces;\n\t} else {\n\t\t// If you set a process.env field to null or undefined, it gets cast to the\n\t\t// string 'null' or 'undefined'. Just delete instead.\n\t\tdelete process.env.DEBUG;\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n\treturn process.env.DEBUG;\n}\n\n/**\n * Init logic for `debug` instances.\n *\n * Create a new `inspectOpts` object in case `useColors` is set\n * differently for a particular `debug` instance.\n */\n\nfunction init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %o to `util.inspect()`, all on a single line.\n */\n\nformatters.o = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts)\n\t\t.split('\\n')\n\t\t.map(str => str.trim())\n\t\t.join(' ');\n};\n\n/**\n * Map %O to `util.inspect()`, allowing multiple lines if needed.\n */\n\nformatters.O = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts);\n};\n", "/**\n * Detect Electron renderer / nwjs process, which is node, but we should\n * treat as a browser.\n */\n\nif (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {\n\tmodule.exports = require('./browser.js');\n} else {\n\tmodule.exports = require('./node.js');\n}\n"],
|
|
5
|
-
"mappings": "qGAAA,IAAAA,EAAAC,EAAA,CAAAC,GAAAC,IAAA,CAAAC,IAMA,SAASC,EAAMC,EAAK,CACnBC,EAAY,MAAQA,EACpBA,EAAY,QAAUA,EACtBA,EAAY,OAASC,EACrBD,EAAY,QAAUE,EACtBF,EAAY,OAASG,EACrBH,EAAY,QAAUI,EACtBJ,EAAY,SAAW,IACvBA,EAAY,QAAUK,EAEtB,OAAO,KAAKN,CAAG,EAAE,QAAQO,GAAO,CAC/BN,EAAYM,CAAG,EAAIP,EAAIO,CAAG,CAC3B,CAAC,EAMDN,EAAY,MAAQ,CAAC,EACrBA,EAAY,MAAQ,CAAC,EAOrBA,EAAY,WAAa,CAAC,EAQ1B,SAASO,EAAYC,EAAW,CAC/B,IAAIC,EAAO,EAEX,QAASC,EAAI,EAAGA,EAAIF,EAAU,OAAQE,IACrCD,GAASA,GAAQ,GAAKA,EAAQD,EAAU,WAAWE,CAAC,EACpDD,GAAQ,EAGT,OAAOT,EAAY,OAAO,KAAK,IAAIS,CA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AK,UACxB1B,EAAK,QAAQ0B,EAAG,KAAK,WAAW,CACxC,ICtQA,IAAAE,GAAAC,EAAA,CAAAC,GAAAC,IAAA,CAAAC,IAKI,OAAO,QAAY,KAAe,QAAQ,OAAS,YAAc,QAAQ,UAAY,IAAQ,QAAQ,OACxGD,EAAO,QAAU,IAEjBA,EAAO,QAAU",
|
|
6
|
-
"names": ["require_common", "__commonJSMin", "exports", "module", "init_cjs", "setup", "env", "createDebug", "coerce", "disable", "enable", "enabled", "destroy", "key", "selectColor", "namespace", "hash", "i", "__name", "prevTime", "enableOverride", "namespacesCache", "enabledCache", "debug", "args", "self", "curr", "ms", "index", "match", "format", "formatter", "val", "extend", "v", "delimiter", "newDebug", "namespaces", "split", "ns", "matchesTemplate", "search", "template", "searchIndex", "templateIndex", "starIndex", "matchIndex", "name", "skip", "require_browser", "__commonJSMin", "exports", "module", "init_cjs", "formatArgs", "save", "load", "useColors", "localstorage", "warned", "m", "__name", "args", "c", "index", "lastC", "match", "namespaces", "r", "formatters", "v", "error", "require_has_flag", "__commonJSMin", "exports", "module", "init_cjs", "flag", "argv", "prefix", "pos", "terminatorPos", "require_supports_color", "__commonJSMin", "exports", "module", "init_cjs", "os", "hasFlag", "env", "forceColor", "translateLevel", "level", "__name", "supportsColor", "stream", "min", "osRelease", "sign", "version", "getSupportLevel", "require_node", "__commonJSMin", "exports", "module", "init_cjs", "tty", "util", "init", "log", "formatArgs", "save", "load", "useColors", "supportsColor", "key", "obj", "prop", "_", "k", "val", "__name", "args", "name", "c", "colorCode", "prefix", "getDate", "namespaces", "debug", "keys", "i", "formatters", "v", "str", "require_src", "__commonJSMin", "exports", "module", "init_cjs"]
|
|
7
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{a as i,b as s,c as g}from"./chunk-SVWK2NXG.js";import{b as n}from"./chunk-WB6O2V5D.js";import"./chunk-DR4CXBD6.js";import"./chunk-HCULGPBH.js";import"./chunk-OUIZQC4D.js";import{ra as a,ta as r}from"./chunk-JG2QCDK2.js";import{a as o,h as t}from"./chunk-7DYQUG5M.js";t();var c=o(e=>{n({json:e,headers:["Option","Configured Value"],rows:[["telemetry",String(e.telemetry)],["json",String(e.json)]],borders:"thick"})},"printDefaultsConfig"),m=o(e=>a`
|
|
2
|
-
Make changes to the configured defaults. This allows you to set an option on every ggt command by default without
|
|
3
|
-
needing to set a flag on every command.
|
|
4
|
-
|
|
5
|
-
{gray Usage}
|
|
6
|
-
ggt configure show
|
|
7
|
-
|
|
8
|
-
ggt configure change
|
|
9
|
-
|
|
10
|
-
ggt configure clear
|
|
11
|
-
`,"usage"),h=o(async(e,f)=>{switch(f._[0]){case"show":c(await s(e,!1));break;case"change":await i(e);break;case"clear":await g(e);break;default:r(m(e));return}},"run");export{h as run,m as usage};
|
|
12
|
-
//# sourceMappingURL=configure-UJS7V2JX.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/commands/configure.ts"],
|
|
4
|
-
"sourcesContent": ["import type { Run, Usage } from \"../services/command/command.js\";\n\nimport { clearDefaultsConfig, type DefaultsConfigData, loadDefaultsConfig, promptDefaultsConfig } from \"../services/config/defaults.js\";\nimport { println } from \"../services/output/print.js\";\nimport { sprint } from \"../services/output/sprint.js\";\nimport { printTable } from \"../services/output/table.js\";\n\nconst printDefaultsConfig = (defaults: DefaultsConfigData): void => {\n printTable({\n json: defaults,\n headers: [\"Option\", \"Configured Value\"],\n rows: [\n [\"telemetry\", String(defaults.telemetry)],\n [\"json\", String(defaults.json)],\n ],\n borders: \"thick\",\n });\n};\n\nexport const usage: Usage = (_ctx) => {\n return sprint`\n Make changes to the configured defaults. This allows you to set an option on every ggt command by default without\n needing to set a flag on every command.\n\n {gray Usage}\n ggt configure show\n \n ggt configure change\n \n ggt configure clear\n `;\n};\n\nexport const run: Run = async (ctx, args): Promise<void> => {\n switch (args._[0]) {\n case \"show\":\n printDefaultsConfig(await loadDefaultsConfig(ctx, false));\n break;\n case \"change\":\n await promptDefaultsConfig(ctx);\n break;\n case \"clear\":\n await clearDefaultsConfig(ctx);\n break;\n default:\n println(usage(ctx));\n return;\n }\n};\n"],
|
|
5
|
-
"mappings": "kRAAAA,IAOA,IAAMC,EAAsBC,EAACC,GAAuC,CAClEC,EAAW,CACT,KAAMD,EACN,QAAS,CAAC,SAAU,kBAAkB,EACtC,KAAM,CACJ,CAAC,YAAa,OAAOA,EAAS,SAAS,CAAC,EACxC,CAAC,OAAQ,OAAOA,EAAS,IAAI,CAAC,CAChC,EACA,QAAS,OACX,CAAC,CACH,EAV4B,uBAYfE,EAAeH,EAACI,GACpBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IADmB,SAcfC,EAAWN,EAAA,MAAOO,EAAKC,IAAwB,CAC1D,OAAQA,EAAK,EAAE,CAAC,EAAG,CACjB,IAAK,OACHT,EAAoB,MAAMU,EAAmBF,EAAK,EAAK,CAAC,EACxD,MACF,IAAK,SACH,MAAMG,EAAqBH,CAAG,EAC9B,MACF,IAAK,QACH,MAAMI,EAAoBJ,CAAG,EAC7B,MACF,QACEK,EAAQT,EAAMI,CAAG,CAAC,EAClB,MACJ,CACF,EAfwB",
|
|
6
|
-
"names": ["init_cjs", "printDefaultsConfig", "__name", "defaults", "printTable", "usage", "_ctx", "sprint", "run", "ctx", "args", "loadDefaultsConfig", "promptDefaultsConfig", "clearDefaultsConfig", "println"]
|
|
7
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import{b as H}from"./chunk-JKZNSRLU.js";import{n as U,o as T,r as E}from"./chunk-XC4F2TLW.js";import"./chunk-T6UHSWMT.js";import"./chunk-DR4CXBD6.js";import"./chunk-ZYDMXS5R.js";import{I as A,M,c as $,q as D,r as p,s as W}from"./chunk-442CSROP.js";import"./chunk-F255O64V.js";import{c as h}from"./chunk-HCULGPBH.js";import"./chunk-OUIZQC4D.js";import{b as u,ha as P,ra as f,ta as d}from"./chunk-JG2QCDK2.js";import"./chunk-GFQYFEEH.js";import{a as c,h as I}from"./chunk-7DYQUG5M.js";I();import{randomUUID as V}from"node:crypto";import{existsSync as l,mkdirSync as N,readFileSync as b,writeFileSync as J}from"node:fs";import{createServer as q}from"node:http";import y from"node:path";import B,{nextTick as G}from"node:process";var L="Starting ggt debugger",j="ggt debugger running on",ue={...U,...A,"--port":{type:Number,alias:["-p"]},"--configure":{type:String}},m=["vscode","cursor"],he=c(r=>f`
|
|
2
|
-
Start a Chrome DevTools Protocol proxy server that connects to the Gadget debugger.
|
|
3
|
-
This allows you to debug your Gadget app using VS Code, Chrome DevTools, or any other
|
|
4
|
-
CDP-compatible debugger client.
|
|
5
|
-
|
|
6
|
-
{gray Usage}
|
|
7
|
-
$ ggt debugger [DIRECTORY] [options]
|
|
8
|
-
|
|
9
|
-
DIRECTORY: The directory containing your Gadget app (default: current directory)
|
|
10
|
-
|
|
11
|
-
{gray Options}
|
|
12
|
-
-a, --app <app_name> Selects the app to debug. Defaults to the app synced to the current directory, if there is one.
|
|
13
|
-
-e, --env <env_name> Selects the environment to debug. Defaults to the environment synced to the current directory, if there is one.
|
|
14
|
-
-p, --port <port> Local port for the inspector proxy (default: 9229)
|
|
15
|
-
--configure <editor> Configure debugger for ${m.join(", ")}
|
|
16
|
-
|
|
17
|
-
{gray Examples}
|
|
18
|
-
start debugger proxy for current environment
|
|
19
|
-
{cyanBright $ ggt debugger}
|
|
20
|
-
|
|
21
|
-
use a custom port
|
|
22
|
-
{cyanBright $ ggt debugger --port 9230}
|
|
23
|
-
|
|
24
|
-
debug a specific app and environment
|
|
25
|
-
{cyanBright $ ggt debugger --app myApp --env development}
|
|
26
|
-
|
|
27
|
-
configure VS Code debugger
|
|
28
|
-
{cyanBright $ ggt debugger --configure vscode}
|
|
29
|
-
`,"usage"),pe=c(async(r,e)=>{let t=await E(e._[0]||B.cwd()),n=await T.load(r,{command:"debugger",args:e,directory:t});if(e["--configure"]){let g=e["--configure"].toLowerCase();if(!m.includes(g))throw new Error(`Invalid editor "${e["--configure"]}". Supported editors: ${m.join(", ")}`);let _=new v(t.path),O=e["--port"]??9229;_.configure(O),d({ensureEmptyLineAbove:!0,content:u.green(`${h.tick} Configured ${g} debugger`)}),d({content:f`
|
|
30
|
-
Added configuration to:
|
|
31
|
-
• ${_.launchJsonPath}
|
|
32
|
-
• ${_.tasksJsonPath}
|
|
33
|
-
|
|
34
|
-
You can now start debugging by running the "Gadget debugger" launch configuration.
|
|
35
|
-
`});return}let o=H(`${L} for ${n.environment.name} environment`);r.log.info("debugger command started"),r.log.trace("sync json loaded",{app:n.environment.application.slug,environment:n.environment.name});let i=D(r),s=e["--port"]??9229,a=V();new v(t.path).hasLaunchConfiguration()||(r.log.warn("vscode/cursor debugger configuration not found"),d({ensureEmptyLineAbove:!0,content:u.yellow(`\u26A0 Gadget debugger not configured. Run "${u.bold(`ggt debugger --configure ${m[0]}`)}" to set up.`)}));let R=new S(r,{appIdentity:n,authHeaders:i,sessionId:a,port:s});try{await R.start(),o.succeed(),d({ensureEmptyLineAbove:!0,content:u.green(`${h.tick} ${j} ws://localhost:${s}/${a}`)}),d({content:u.gray("Press Ctrl+C to stop")}),await new Promise(g=>{r.onAbort(()=>{r.log.info("abort signal received"),g()})}),R.stop(),d({ensureEmptyLineAbove:!0,content:`${h.tick} Proxy server stopped`})}catch(g){r.log.error("debugger command failed",{error:g}),await $(r,g)}},"run"),S=class{static{c(this,"DebuggerProxy")}_ctx;_appIdentity;_authHeaders;_sessionId;_port;_subdomain;_httpServer;_wsServer;_sessionManager;constructor(e,t){this._ctx=e,this._appIdentity=t.appIdentity,this._authHeaders=t.authHeaders,this._sessionId=t.sessionId,this._port=t.port,this._subdomain=this._buildSubdomain()}async start(){this._sessionManager=new C(this._ctx),this._httpServer=this._createHttpServer(),this._wsServer=new W.default({noServer:!0}),this._httpServer.on("upgrade",(e,t,n)=>{this._handleUpgrade(e,t,n)}),await this._listen()}stop(){this._ctx.log.debug("shutting down proxy server"),this._wsServer?.close(),this._httpServer?.close(),this._ctx.log.info("proxy server stopped")}_buildSubdomain(){let{application:e,name:t,type:n}=this._appIdentity.environment;return n==="production"?e.slug:`${e.slug}--${t}`}_createHttpServer(){return q((e,t)=>{let n=new URL(e.url??"/",`http://${e.headers.host}`);this._ctx.log.trace("debugger proxy http request received",{method:e.method,rUrl:e.url,urlPathname:n.pathname,url:n.toString()});try{n.pathname==="/json/version"?this._handleVersionRequest(t):n.pathname==="/json/list"?this._handleListRequest(t):this._handleNotFound(t,n)}catch(o){this._handleError(t,o)}})}_handleVersionRequest(e){let t={"Protocol-Version":"1.1",Browser:`node.js/${this._appIdentity.environment.nodeVersion}`};this._ctx.log.trace("debugger proxy http version request payload",{payload:t}),e.setHeader("Content-Type","application/json"),e.end(JSON.stringify(t))}_handleListRequest(e){let t=[{id:this._sessionId,type:"node",title:"ggt debugger",description:`authenticated CDP proxy to current sandbox process for ${this._appIdentity.environment.application.slug}@${this._appIdentity.environment.name}`,faviconUrl:"https://assets.gadget.dev/assets/environment/dev/favicon-32.png",webSocketDebuggerUrl:`ws://127.0.0.1:${this._port}/${this._sessionId}`}];this._ctx.log.trace("debugger proxy http list request payload",{payload:t}),e.setHeader("Content-Type","application/json"),e.end(JSON.stringify(t))}_handleNotFound(e,t){this._ctx.log.warn("debugger proxy http request not found",{url:t.toString()}),e.statusCode=404,e.end("Not Found")}_handleError(e,t){this._ctx.log.error("error handling debugger proxy http request",{error:t}),e.statusCode=500,e.end("Internal Server Error")}_handleUpgrade(e,t,n){if(!this._sessionManager||!this._wsServer){t.destroy();return}let o=new URL(e.url??"/",`http://${e.headers.host}`);if(this._ctx.log.trace("debugger proxy websocket upgrade request received",{url:e.url,isConnecting:this._sessionManager.isConnecting,hasActiveConnection:this._sessionManager.hasActiveConnection}),o.pathname!==`/${this._sessionId}`){t.destroy();return}if(this._sessionManager.hasActiveConnection||this._sessionManager.isConnecting){this._ctx.log.debug("rejecting upgrade request",{hasActiveConnection:this._sessionManager.hasActiveConnection,isConnecting:this._sessionManager.isConnecting}),this._rejectUpgrade(t);return}this._sessionManager.clearStaleConnection(),this._acceptUpgrade(e,t,n)}_rejectUpgrade(e){e.write(`HTTP/1.1 409 Another debugger session is already running for this environment\r
|
|
36
|
-
Connection: close\r
|
|
37
|
-
\r
|
|
38
|
-
`),e.destroy()}_acceptUpgrade(e,t,n){!this._wsServer||!this._sessionManager||this._wsServer.handleUpgrade(e,t,n,o=>{this._ctx.log.info("client websocket upgraded, establishing remote connection"),this._handleClientConnection(o)})}async _handleClientConnection(e){if(!this._sessionManager)return;let t=new x(this._ctx,e,this._sessionManager);try{let n=await this._establishRemoteConnection();t.connectToRemote(n),this._sessionManager.setActiveConnection(e)}catch(n){this._ctx.log.error("error establishing remote debugger connection",{error:n}),t.closeWithError("Failed to establish remote debugger connection")}}async _establishRemoteConnection(){let e=await M({context:{ctx:this._ctx},method:"POST",url:`https://${this._subdomain}.${P.domains.app}/edit/api/debugger/start-session`,headers:{...this._authHeaders,"x-gadget-debugger-session-id":this._sessionId},responseType:"json",resolveBodyOnly:!0});return this._ctx.log.debug("debugger session created",{session:e}),await new w(this._ctx,{wsUrl:e.wsUrl,sessionId:this._sessionId,authHeaders:this._authHeaders}).connect()}async _listen(){this._httpServer&&await new Promise((e,t)=>{let n=this._httpServer;if(!n){t(new Error("HTTP server is not initialized"));return}n.listen(this._port,"127.0.0.1",()=>{this._ctx.log.info("debugger proxy server listening",{port:this._port}),e()}),n.on("error",t)})}},C=class{static{c(this,"DebuggerSessionManager")}_ctx;_activeConnection;_isConnecting=!1;constructor(e){this._ctx=e}get hasActiveConnection(){return!!this._activeConnection&&this._activeConnection.readyState===p.default.OPEN}get isConnecting(){return this._isConnecting}setActiveConnection(e){this._activeConnection=e,this._isConnecting=!1}clearActiveConnection(){this._activeConnection=void 0}clearStaleConnection(){this._activeConnection&&(this._ctx.log.debug("clearing stale connection reference"),this._activeConnection=void 0)}startConnecting(){this._isConnecting=!0}stopConnecting(){this._isConnecting=!1}},x=class{static{c(this,"ClientConnection")}_ctx;_clientWs;_sessionManager;_messageQueue=[];_remoteWs;_remoteReady=!1;constructor(e,t,n){this._ctx=e,this._clientWs=t,this._sessionManager=n,this._setupClientHandlers()}connectToRemote(e){this._remoteWs=e,this._setupRemoteHandlers(),this._flushMessageQueue()}closeWithError(e){this._sessionManager.stopConnecting(),this._clientWs.close(1011,e)}_setupClientHandlers(){this._clientWs.on("message",(e,t)=>{this._handleClientMessage(e,t)}),this._clientWs.on("error",e=>{this._ctx.log.error("client websocket error",{error:e.message,stack:e.stack}),this._remoteWs?.close()}),this._clientWs.on("close",()=>{this._ctx.log.info("client websocket closed"),this._sessionManager.clearActiveConnection(),this._remoteWs?.close()})}_handleClientMessage(e,t){let n=t?"<binary data>":String(e);this._ctx.log.trace("received message from client",{message:n}),this._remoteReady&&this._remoteWs?this._remoteWs.send(e,{binary:t}):this._messageQueue.push({data:e,isBinary:t})}_setupRemoteHandlers(){this._remoteWs&&(this._remoteWs.on("message",(e,t)=>{let n=t?"<binary data>":String(e);this._ctx.log.trace("received message from remote debugger",{message:n}),this._clientWs.send(e,{binary:t})}),this._remoteWs.on("error",e=>{this._ctx.log.error("remote debugger error",{error:e.message,stack:e.stack}),this._clientWs.close(1011,"Remote debugger connection error, please reconnect")}),this._remoteWs.on("close",()=>{this._ctx.log.info("remote debugger connection closed"),this._clientWs.close(1011,"Remote debugger connection closed by server, please reconnect")}),this._remoteReady=!0)}_flushMessageQueue(){if(this._remoteWs){this._ctx.log.debug("remote debugger connected, flushing message queue",{queueLength:this._messageQueue.length});for(let{data:e,isBinary:t}of this._messageQueue)this._remoteWs.send(e,{binary:t});this._messageQueue.length=0}}},w=class{static{c(this,"RemoteDebuggerConnection")}_ctx;_wsUrl;_sessionId;_authHeaders;constructor(e,t){this._ctx=e,this._wsUrl=t.wsUrl,this._sessionId=t.sessionId,this._authHeaders=t.authHeaders}async connect(){let e,t,n=!1,o=new Promise((s,a)=>{e=s,t=a}),i=new p.default(this._wsUrl,{headers:{...this._authHeaders,"x-gadget-debugger-session-id":this._sessionId}});return i.on("open",()=>{this._ctx.log.debug("connected to remote debugger"),!n&&(n=!0,e())}),i.on("error",s=>{this._ctx.log.error("remote debugger error",{error:s.message,stack:s.stack}),n||t(s)}),i.readyState===p.default.OPEN&&G(()=>{e()}),await o,i}},v=class{static{c(this,"DebuggerConfigurator")}_vscodeDir;constructor(e){this._vscodeDir=y.join(e,".vscode")}get launchJsonPath(){return y.join(this._vscodeDir,"launch.json")}get tasksJsonPath(){return y.join(this._vscodeDir,"tasks.json")}hasLaunchConfiguration(){if(!l(this.launchJsonPath))return!1;try{return(JSON.parse(b(this.launchJsonPath,"utf-8")).configurations??[]).some(n=>n.name==="Gadget debugger")}catch{return!1}}configure(e){l(this._vscodeDir)||N(this._vscodeDir,{recursive:!0}),this._configureLaunch(e),this._configureTasks()}_configureLaunch(e){let t={type:"node",request:"attach",name:"Gadget debugger",address:"127.0.0.1",port:e,localRoot:"${workspaceFolder}",remoteRoot:"/gadget/app",preLaunchTask:"ggt debugger",restart:!0,timeout:6e4},n;if(l(this.launchJsonPath)){let o=b(this.launchJsonPath,"utf-8"),i=JSON.parse(o),s=i.configurations??[],a=s.findIndex(k=>k.name==="Gadget debugger");a>=0?s[a]=t:s.push(t),n={version:i.version,configurations:s}}else n={version:"0.2.0",configurations:[t]};J(this.launchJsonPath,JSON.stringify(n,void 0,2)+`
|
|
39
|
-
`,"utf-8")}_configureTasks(){let e={label:"ggt debugger",type:"shell",command:"ggt debugger",isBackground:!0,problemMatcher:{pattern:{regexp:"^$"},background:{activeOnStart:!0,beginsPattern:L,endsPattern:j}}},t;if(l(this.tasksJsonPath)){let n=b(this.tasksJsonPath,"utf-8"),o=JSON.parse(n),i=o.tasks??[],s=i.findIndex(a=>a.label==="ggt debugger");s>=0?i[s]=e:i.push(e),t={version:o.version,tasks:i}}else t={version:"2.0.0",tasks:[e]};J(this.tasksJsonPath,JSON.stringify(t,void 0,2)+`
|
|
40
|
-
`,"utf-8")}};export{ue as args,pe as run,he as usage};
|
|
41
|
-
//# sourceMappingURL=debugger-QN2MCLBL.js.map
|