@gadgetinc/ggt 1.7.4 → 2.3.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.
Files changed (149) hide show
  1. package/README.md +167 -31
  2. package/dist/{add-KJLV4API.js → add-7MLI3TCY.js} +10 -9
  3. package/dist/add-7MLI3TCY.js.map +7 -0
  4. package/dist/agent-plugin-543K6WBH.js +11 -0
  5. package/dist/agent-plugin-543K6WBH.js.map +7 -0
  6. package/dist/chunk-2HJS3KFB.js +2 -0
  7. package/dist/{chunk-J2OYMAMD.js.map → chunk-2HJS3KFB.js.map} +2 -2
  8. package/dist/chunk-3WKH3DJL.js +2 -0
  9. package/dist/chunk-3WKH3DJL.js.map +7 -0
  10. package/dist/chunk-577KP32Z.js +8 -0
  11. package/dist/chunk-577KP32Z.js.map +7 -0
  12. package/dist/chunk-6FVHOLT7.js +28 -0
  13. package/dist/chunk-6FVHOLT7.js.map +7 -0
  14. package/dist/chunk-72J7X5LR.js +2 -0
  15. package/dist/chunk-72J7X5LR.js.map +7 -0
  16. package/dist/chunk-ALSXPCRD.js +118 -0
  17. package/dist/chunk-ALSXPCRD.js.map +7 -0
  18. package/dist/chunk-CNNOPE5K.js +69 -0
  19. package/dist/chunk-CNNOPE5K.js.map +7 -0
  20. package/dist/chunk-ETKWDO4V.js +2 -0
  21. package/dist/chunk-ETKWDO4V.js.map +7 -0
  22. package/dist/chunk-F6BGQ4LG.js +11 -0
  23. package/dist/chunk-F6BGQ4LG.js.map +7 -0
  24. package/dist/chunk-FE5O5VX4.js +2 -0
  25. package/dist/chunk-FE5O5VX4.js.map +7 -0
  26. package/dist/chunk-GJGBTM5Y.js +2 -0
  27. package/dist/chunk-GJGBTM5Y.js.map +7 -0
  28. package/dist/chunk-GZTHIOXS.js +2 -0
  29. package/dist/chunk-GZTHIOXS.js.map +7 -0
  30. package/dist/chunk-IQSZEOYY.js +283 -0
  31. package/dist/chunk-IQSZEOYY.js.map +7 -0
  32. package/dist/chunk-J232VCIM.js +2 -0
  33. package/dist/chunk-J232VCIM.js.map +7 -0
  34. package/dist/{chunk-SX5LO3XQ.js → chunk-KKIL22RY.js} +1 -1
  35. package/dist/{chunk-SX5LO3XQ.js.map → chunk-KKIL22RY.js.map} +1 -1
  36. package/dist/chunk-L2XBSR7G.js +2 -0
  37. package/dist/chunk-L2XBSR7G.js.map +7 -0
  38. package/dist/chunk-N5FFICAP.js +9 -0
  39. package/dist/chunk-N5FFICAP.js.map +7 -0
  40. package/dist/chunk-TGCJ6TMW.js +10 -0
  41. package/dist/chunk-TGCJ6TMW.js.map +7 -0
  42. package/dist/chunk-ULJYEUQG.js +113 -0
  43. package/dist/chunk-ULJYEUQG.js.map +7 -0
  44. package/dist/chunk-UVVKKUYG.js +10 -0
  45. package/dist/chunk-UVVKKUYG.js.map +7 -0
  46. package/dist/{chunk-JSGXXXFU.js → chunk-WZ2PO6H2.js} +6 -6
  47. package/dist/{chunk-JSGXXXFU.js.map → chunk-WZ2PO6H2.js.map} +3 -3
  48. package/dist/chunk-X4XSYLCE.js +12 -0
  49. package/dist/chunk-X4XSYLCE.js.map +7 -0
  50. package/dist/chunk-ZYDMXS5R.js +6 -0
  51. package/dist/chunk-ZYDMXS5R.js.map +7 -0
  52. package/dist/{configure-CXY6JQB7.js → configure-PYRXYNGZ.js} +2 -2
  53. package/dist/debugger-VKLUEWIN.js +41 -0
  54. package/dist/debugger-VKLUEWIN.js.map +7 -0
  55. package/dist/deploy-JCREEGBA.js +25 -0
  56. package/dist/deploy-JCREEGBA.js.map +7 -0
  57. package/dist/dev-Y2GLI7EH.js +59 -0
  58. package/dist/dev-Y2GLI7EH.js.map +7 -0
  59. package/dist/env-5OPHX3MC.js +135 -0
  60. package/dist/env-5OPHX3MC.js.map +7 -0
  61. package/dist/esm-3JVXH7DT.js +37 -0
  62. package/dist/esm-3JVXH7DT.js.map +7 -0
  63. package/dist/eval-LZPZ6PBQ.js +54 -0
  64. package/dist/eval-LZPZ6PBQ.js.map +7 -0
  65. package/dist/getMachineId-bsd-QUXN4NKS.js +2 -0
  66. package/dist/getMachineId-bsd-QUXN4NKS.js.map +7 -0
  67. package/dist/getMachineId-darwin-TCXBAX22.js +3 -0
  68. package/dist/getMachineId-darwin-TCXBAX22.js.map +7 -0
  69. package/dist/getMachineId-linux-IJ3LYIOX.js +2 -0
  70. package/dist/getMachineId-linux-IJ3LYIOX.js.map +7 -0
  71. package/dist/getMachineId-unsupported-IKXBUCYY.js +2 -0
  72. package/dist/getMachineId-unsupported-IKXBUCYY.js.map +7 -0
  73. package/dist/getMachineId-win-6CX7VSFF.js +2 -0
  74. package/dist/getMachineId-win-6CX7VSFF.js.map +7 -0
  75. package/dist/ggt-KUAF6WUA.js +45 -0
  76. package/dist/ggt-KUAF6WUA.js.map +7 -0
  77. package/dist/{list-3QZTSHQV.js → list-IANT7SNF.js} +2 -2
  78. package/dist/login-TYRZLN5S.js +2 -0
  79. package/dist/{logout-SWWGI27Q.js → logout-P75XYYZ6.js} +2 -2
  80. package/dist/logs-SBMD6JSR.js +28 -0
  81. package/dist/logs-SBMD6JSR.js.map +7 -0
  82. package/dist/main.js +1 -43
  83. package/dist/main.js.map +4 -4
  84. package/dist/{open-J2ZVNVJ6.js → open-JPAMII4K.js} +11 -11
  85. package/dist/open-JPAMII4K.js.map +7 -0
  86. package/dist/problems-EZRSHLZT.js +14 -0
  87. package/dist/problems-EZRSHLZT.js.map +7 -0
  88. package/dist/pull-R3PMBVOT.js +28 -0
  89. package/dist/pull-R3PMBVOT.js.map +7 -0
  90. package/dist/push-5XEEESQQ.js +2 -0
  91. package/dist/status-RJN5ES6S.js +14 -0
  92. package/dist/status-RJN5ES6S.js.map +7 -0
  93. package/dist/update-X7YS3MNH.js +2 -0
  94. package/dist/update-X7YS3MNH.js.map +7 -0
  95. package/dist/var-PC6KQUPF.js +159 -0
  96. package/dist/var-PC6KQUPF.js.map +7 -0
  97. package/dist/{version-NZHW3VLV.js → version-GZJOU2CV.js} +2 -2
  98. package/dist/{whoami-MIJFO4MW.js → whoami-GKPGPZ3B.js} +2 -2
  99. package/package.json +64 -74
  100. package/dist/add-KJLV4API.js.map +0 -7
  101. package/dist/chunk-24OT7GHO.js +0 -65
  102. package/dist/chunk-24OT7GHO.js.map +0 -7
  103. package/dist/chunk-HN3YKQ3C.js +0 -6
  104. package/dist/chunk-HN3YKQ3C.js.map +0 -7
  105. package/dist/chunk-J2OYMAMD.js +0 -2
  106. package/dist/chunk-JBY5A44K.js +0 -7
  107. package/dist/chunk-JBY5A44K.js.map +0 -7
  108. package/dist/chunk-L5H5T2T6.js +0 -66
  109. package/dist/chunk-L5H5T2T6.js.map +0 -7
  110. package/dist/chunk-M6L2X3GX.js +0 -194
  111. package/dist/chunk-M6L2X3GX.js.map +0 -7
  112. package/dist/chunk-MHTXRD5G.js +0 -2
  113. package/dist/chunk-MHTXRD5G.js.map +0 -7
  114. package/dist/chunk-OIVNACS7.js +0 -12
  115. package/dist/chunk-OIVNACS7.js.map +0 -7
  116. package/dist/chunk-QXWICGG6.js +0 -2
  117. package/dist/chunk-QXWICGG6.js.map +0 -7
  118. package/dist/chunk-WNAYBYSG.js +0 -8
  119. package/dist/chunk-WNAYBYSG.js.map +0 -7
  120. package/dist/chunk-X47UA3VR.js +0 -2
  121. package/dist/chunk-X47UA3VR.js.map +0 -7
  122. package/dist/chunk-XGQQOMPO.js +0 -2
  123. package/dist/chunk-XGQQOMPO.js.map +0 -7
  124. package/dist/chunk-XKYYKHP4.js +0 -28
  125. package/dist/chunk-XKYYKHP4.js.map +0 -7
  126. package/dist/chunk-YU6P3ESA.js +0 -121
  127. package/dist/chunk-YU6P3ESA.js.map +0 -7
  128. package/dist/deploy-XFZBJJWP.js +0 -25
  129. package/dist/deploy-XFZBJJWP.js.map +0 -7
  130. package/dist/dev-GG6TU3DJ.js +0 -59
  131. package/dist/dev-GG6TU3DJ.js.map +0 -7
  132. package/dist/esm-PLVGBDRY.js +0 -38
  133. package/dist/esm-PLVGBDRY.js.map +0 -7
  134. package/dist/login-HKGCVIWO.js +0 -2
  135. package/dist/logs-DW4PH3U6.js +0 -28
  136. package/dist/logs-DW4PH3U6.js.map +0 -7
  137. package/dist/open-J2ZVNVJ6.js.map +0 -7
  138. package/dist/pull-ORNQFSFG.js +0 -28
  139. package/dist/pull-ORNQFSFG.js.map +0 -7
  140. package/dist/push-KMZZ6JJL.js +0 -2
  141. package/dist/status-JAREJZ4X.js +0 -14
  142. package/dist/status-JAREJZ4X.js.map +0 -7
  143. /package/dist/{configure-CXY6JQB7.js.map → configure-PYRXYNGZ.js.map} +0 -0
  144. /package/dist/{list-3QZTSHQV.js.map → list-IANT7SNF.js.map} +0 -0
  145. /package/dist/{login-HKGCVIWO.js.map → login-TYRZLN5S.js.map} +0 -0
  146. /package/dist/{logout-SWWGI27Q.js.map → logout-P75XYYZ6.js.map} +0 -0
  147. /package/dist/{push-KMZZ6JJL.js.map → push-5XEEESQQ.js.map} +0 -0
  148. /package/dist/{version-NZHW3VLV.js.map → version-GZJOU2CV.js.map} +0 -0
  149. /package/dist/{whoami-MIJFO4MW.js.map → whoami-GKPGPZ3B.js.map} +0 -0
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js", "../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js", "../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js", "../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js", "../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js", "../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js", "../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js", "../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js", "../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js", "../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js", "../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js", "../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js", "../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js", "../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js", "../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.js", "../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.js", "../node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.js", "../src/services/filesync/changes.ts", "../src/services/app/edit/operation.ts", "../src/services/output/timestamp.ts", "../src/services/util/boolean.ts", "../src/services/filesync/conflicts.ts", "../src/services/filesync/hashes.ts", "../src/services/filesync/strategy.ts", "../src/services/filesync/filesync.ts", "../node_modules/.pnpm/execa@8.0.1/node_modules/execa/index.js", "../node_modules/.pnpm/strip-final-newline@3.0.0/node_modules/strip-final-newline/index.js", "../node_modules/.pnpm/npm-run-path@5.3.0/node_modules/npm-run-path/index.js", "../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js", "../node_modules/.pnpm/onetime@6.0.0/node_modules/onetime/index.js", "../node_modules/.pnpm/mimic-fn@4.0.0/node_modules/mimic-fn/index.js", "../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/error.js", "../node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/main.js", "../node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/realtime.js", "../node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/signals.js", "../node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/core.js", "../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/stdio.js", "../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/kill.js", "../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/pipe.js", "../node_modules/.pnpm/is-stream@3.0.0/node_modules/is-stream/index.js", "../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/stream.js", "../node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/index.js", "../node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/array.js", "../node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/contents.js", "../node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/utils.js", "../node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/array-buffer.js", "../node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/buffer.js", "../node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/string.js", "../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/promise.js", "../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/command.js", "../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/verbose.js", "../node_modules/.pnpm/p-map@7.0.3/node_modules/p-map/index.js", "../node_modules/.pnpm/p-retry@6.2.1/node_modules/p-retry/index.js", "../node_modules/.pnpm/is-network-error@1.1.0/node_modules/is-network-error/index.js", "../src/__generated__/graphql.ts"],
4
- "sourcesContent": ["module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction checkPathExt (path, options) {\n var pathext = options.pathExt !== undefined ?\n options.pathExt : process.env.PATHEXT\n\n if (!pathext) {\n return true\n }\n\n pathext = pathext.split(';')\n if (pathext.indexOf('') !== -1) {\n return true\n }\n for (var i = 0; i < pathext.length; i++) {\n var p = pathext[i].toLowerCase()\n if (p && path.substr(-p.length).toLowerCase() === p) {\n return true\n }\n }\n return false\n}\n\nfunction checkStat (stat, path, options) {\n if (!stat.isSymbolicLink() && !stat.isFile()) {\n return false\n }\n return checkPathExt(path, options)\n}\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, path, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), path, options)\n}\n", "module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), options)\n}\n\nfunction checkStat (stat, options) {\n return stat.isFile() && checkMode(stat, options)\n}\n\nfunction checkMode (stat, options) {\n var mod = stat.mode\n var uid = stat.uid\n var gid = stat.gid\n\n var myUid = options.uid !== undefined ?\n options.uid : process.getuid && process.getuid()\n var myGid = options.gid !== undefined ?\n options.gid : process.getgid && process.getgid()\n\n var u = parseInt('100', 8)\n var g = parseInt('010', 8)\n var o = parseInt('001', 8)\n var ug = u | g\n\n var ret = (mod & o) ||\n (mod & g) && gid === myGid ||\n (mod & u) && uid === myUid ||\n (mod & ug) && myUid === 0\n\n return ret\n}\n", "var fs = require('fs')\nvar core\nif (process.platform === 'win32' || global.TESTING_WINDOWS) {\n core = require('./windows.js')\n} else {\n core = require('./mode.js')\n}\n\nmodule.exports = isexe\nisexe.sync = sync\n\nfunction isexe (path, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = {}\n }\n\n if (!cb) {\n if (typeof Promise !== 'function') {\n throw new TypeError('callback not provided')\n }\n\n return new Promise(function (resolve, reject) {\n isexe(path, options || {}, function (er, is) {\n if (er) {\n reject(er)\n } else {\n resolve(is)\n }\n })\n })\n }\n\n core(path, options || {}, function (er, is) {\n // ignore EACCES because that just means we aren't allowed to run it\n if (er) {\n if (er.code === 'EACCES' || options && options.ignoreErrors) {\n er = null\n is = false\n }\n }\n cb(er, is)\n })\n}\n\nfunction sync (path, options) {\n // my kingdom for a filtered catch\n try {\n return core.sync(path, options || {})\n } catch (er) {\n if (options && options.ignoreErrors || er.code === 'EACCES') {\n return false\n } else {\n throw er\n }\n }\n}\n", "const isWindows = process.platform === 'win32' ||\n process.env.OSTYPE === 'cygwin' ||\n process.env.OSTYPE === 'msys'\n\nconst path = require('path')\nconst COLON = isWindows ? ';' : ':'\nconst isexe = require('isexe')\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, opt) => {\n const colon = opt.colon || COLON\n\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(/\\//) || isWindows && cmd.match(/\\\\/) ? ['']\n : (\n [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(opt.path || process.env.PATH ||\n /* istanbul ignore next: very unusual */ '').split(colon),\n ]\n )\n const pathExtExe = isWindows\n ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'\n : ''\n const pathExt = isWindows ? pathExtExe.split(colon) : ['']\n\n if (isWindows) {\n if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')\n pathExt.unshift('')\n }\n\n return {\n pathEnv,\n pathExt,\n pathExtExe,\n }\n}\n\nconst which = (cmd, opt, cb) => {\n if (typeof opt === 'function') {\n cb = opt\n opt = {}\n }\n if (!opt)\n opt = {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n const step = i => new Promise((resolve, reject) => {\n if (i === pathEnv.length)\n return opt.all && found.length ? resolve(found)\n : reject(getNotFoundError(cmd))\n\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n resolve(subStep(p, i, 0))\n })\n\n const subStep = (p, i, ii) => new Promise((resolve, reject) => {\n if (ii === pathExt.length)\n return resolve(step(i + 1))\n const ext = pathExt[ii]\n isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {\n if (!er && is) {\n if (opt.all)\n found.push(p + ext)\n else\n return resolve(p + ext)\n }\n return resolve(subStep(p, i, ii + 1))\n })\n })\n\n return cb ? step(0).then(res => cb(null, res), cb) : step(0)\n}\n\nconst whichSync = (cmd, opt) => {\n opt = opt || {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (let i = 0; i < pathEnv.length; i ++) {\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n for (let j = 0; j < pathExt.length; j ++) {\n const cur = p + pathExt[j]\n try {\n const is = isexe.sync(cur, { pathExt: pathExtExe })\n if (is) {\n if (opt.all)\n found.push(cur)\n else\n return cur\n }\n } catch (ex) {}\n }\n }\n\n if (opt.all && found.length)\n return found\n\n if (opt.nothrow)\n return null\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n", "'use strict';\n\nconst pathKey = (options = {}) => {\n\tconst environment = options.env || process.env;\n\tconst platform = options.platform || process.platform;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n};\n\nmodule.exports = pathKey;\n// TODO: Remove this for the next major release\nmodule.exports.default = pathKey;\n", "'use strict';\n\nconst path = require('path');\nconst which = require('which');\nconst getPathKey = require('path-key');\n\nfunction resolveCommandAttempt(parsed, withoutPathExt) {\n const env = parsed.options.env || process.env;\n const cwd = process.cwd();\n const hasCustomCwd = parsed.options.cwd != null;\n // Worker threads do not have process.chdir()\n const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;\n\n // If a custom `cwd` was specified, we need to change the process cwd\n // because `which` will do stat calls but does not support a custom cwd\n if (shouldSwitchCwd) {\n try {\n process.chdir(parsed.options.cwd);\n } catch (err) {\n /* Empty */\n }\n }\n\n let resolved;\n\n try {\n resolved = which.sync(parsed.command, {\n path: env[getPathKey({ env })],\n pathExt: withoutPathExt ? path.delimiter : undefined,\n });\n } catch (e) {\n /* Empty */\n } finally {\n if (shouldSwitchCwd) {\n process.chdir(cwd);\n }\n }\n\n // If we successfully resolved, ensure that an absolute path is returned\n // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it\n if (resolved) {\n resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);\n }\n\n return resolved;\n}\n\nfunction resolveCommand(parsed) {\n return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);\n}\n\nmodule.exports = resolveCommand;\n", "'use strict';\n\n// See http://www.robvanderwoude.com/escapechars.php\nconst metaCharsRegExp = /([()\\][%!^\"`<>&|;, *?])/g;\n\nfunction escapeCommand(arg) {\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n return arg;\n}\n\nfunction escapeArgument(arg, doubleEscapeMetaChars) {\n // Convert to string\n arg = `${arg}`;\n\n // Algorithm below is based on https://qntm.org/cmd\n\n // Sequence of backslashes followed by a double quote:\n // double up all the backslashes and escape the double quote\n arg = arg.replace(/(\\\\*)\"/g, '$1$1\\\\\"');\n\n // Sequence of backslashes followed by the end of the string\n // (which will become a double quote later):\n // double up all the backslashes\n arg = arg.replace(/(\\\\*)$/, '$1$1');\n\n // All other backslashes occur literally\n\n // Quote the whole thing:\n arg = `\"${arg}\"`;\n\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n // Double escape meta chars if necessary\n if (doubleEscapeMetaChars) {\n arg = arg.replace(metaCharsRegExp, '^$1');\n }\n\n return arg;\n}\n\nmodule.exports.command = escapeCommand;\nmodule.exports.argument = escapeArgument;\n", "'use strict';\nmodule.exports = /^#!(.*)/;\n", "'use strict';\nconst shebangRegex = require('shebang-regex');\n\nmodule.exports = (string = '') => {\n\tconst match = string.match(shebangRegex);\n\n\tif (!match) {\n\t\treturn null;\n\t}\n\n\tconst [path, argument] = match[0].replace(/#! ?/, '').split(' ');\n\tconst binary = path.split('/').pop();\n\n\tif (binary === 'env') {\n\t\treturn argument;\n\t}\n\n\treturn argument ? `${binary} ${argument}` : binary;\n};\n", "'use strict';\n\nconst fs = require('fs');\nconst shebangCommand = require('shebang-command');\n\nfunction readShebang(command) {\n // Read the first 150 bytes from the file\n const size = 150;\n const buffer = Buffer.alloc(size);\n\n let fd;\n\n try {\n fd = fs.openSync(command, 'r');\n fs.readSync(fd, buffer, 0, size, 0);\n fs.closeSync(fd);\n } catch (e) { /* Empty */ }\n\n // Attempt to extract shebang (null is returned if not a shebang)\n return shebangCommand(buffer.toString());\n}\n\nmodule.exports = readShebang;\n", "'use strict';\n\nconst path = require('path');\nconst resolveCommand = require('./util/resolveCommand');\nconst escape = require('./util/escape');\nconst readShebang = require('./util/readShebang');\n\nconst isWin = process.platform === 'win32';\nconst isExecutableRegExp = /\\.(?:com|exe)$/i;\nconst isCmdShimRegExp = /node_modules[\\\\/].bin[\\\\/][^\\\\/]+\\.cmd$/i;\n\nfunction detectShebang(parsed) {\n parsed.file = resolveCommand(parsed);\n\n const shebang = parsed.file && readShebang(parsed.file);\n\n if (shebang) {\n parsed.args.unshift(parsed.file);\n parsed.command = shebang;\n\n return resolveCommand(parsed);\n }\n\n return parsed.file;\n}\n\nfunction parseNonShell(parsed) {\n if (!isWin) {\n return parsed;\n }\n\n // Detect & add support for shebangs\n const commandFile = detectShebang(parsed);\n\n // We don't need a shell if the command filename is an executable\n const needsShell = !isExecutableRegExp.test(commandFile);\n\n // If a shell is required, use cmd.exe and take care of escaping everything correctly\n // Note that `forceShell` is an hidden option used only in tests\n if (parsed.options.forceShell || needsShell) {\n // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`\n // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument\n // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,\n // we need to double escape them\n const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);\n\n // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\\bar)\n // This is necessary otherwise it will always fail with ENOENT in those cases\n parsed.command = path.normalize(parsed.command);\n\n // Escape command & arguments\n parsed.command = escape.command(parsed.command);\n parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));\n\n const shellCommand = [parsed.command].concat(parsed.args).join(' ');\n\n parsed.args = ['/d', '/s', '/c', `\"${shellCommand}\"`];\n parsed.command = process.env.comspec || 'cmd.exe';\n parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped\n }\n\n return parsed;\n}\n\nfunction parse(command, args, options) {\n // Normalize arguments, similar to nodejs\n if (args && !Array.isArray(args)) {\n options = args;\n args = null;\n }\n\n args = args ? args.slice(0) : []; // Clone array to avoid changing the original\n options = Object.assign({}, options); // Clone object to avoid changing the original\n\n // Build our parsed object\n const parsed = {\n command,\n args,\n options,\n file: undefined,\n original: {\n command,\n args,\n },\n };\n\n // Delegate further parsing to shell or non-shell\n return options.shell ? parsed : parseNonShell(parsed);\n}\n\nmodule.exports = parse;\n", "'use strict';\n\nconst isWin = process.platform === 'win32';\n\nfunction notFoundError(original, syscall) {\n return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {\n code: 'ENOENT',\n errno: 'ENOENT',\n syscall: `${syscall} ${original.command}`,\n path: original.command,\n spawnargs: original.args,\n });\n}\n\nfunction hookChildProcess(cp, parsed) {\n if (!isWin) {\n return;\n }\n\n const originalEmit = cp.emit;\n\n cp.emit = function (name, arg1) {\n // If emitting \"exit\" event and exit code is 1, we need to check if\n // the command exists and emit an \"error\" instead\n // See https://github.com/IndigoUnited/node-cross-spawn/issues/16\n if (name === 'exit') {\n const err = verifyENOENT(arg1, parsed, 'spawn');\n\n if (err) {\n return originalEmit.call(cp, 'error', err);\n }\n }\n\n return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params\n };\n}\n\nfunction verifyENOENT(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawn');\n }\n\n return null;\n}\n\nfunction verifyENOENTSync(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawnSync');\n }\n\n return null;\n}\n\nmodule.exports = {\n hookChildProcess,\n verifyENOENT,\n verifyENOENTSync,\n notFoundError,\n};\n", "'use strict';\n\nconst cp = require('child_process');\nconst parse = require('./lib/parse');\nconst enoent = require('./lib/enoent');\n\nfunction spawn(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);\n\n // Hook into child process \"exit\" event to emit an error if the command\n // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n enoent.hookChildProcess(spawned, parsed);\n\n return spawned;\n}\n\nfunction spawnSync(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);\n\n // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);\n\n return result;\n}\n\nmodule.exports = spawn;\nmodule.exports.spawn = spawn;\nmodule.exports.sync = spawnSync;\n\nmodule.exports._parse = parse;\nmodule.exports._enoent = enoent;\n", "'use strict';\n\nconst { PassThrough } = require('stream');\n\nmodule.exports = function (/*streams...*/) {\n var sources = []\n var output = new PassThrough({objectMode: true})\n\n output.setMaxListeners(0)\n\n output.add = add\n output.isEmpty = isEmpty\n\n output.on('unpipe', remove)\n\n Array.prototype.slice.call(arguments).forEach(add)\n\n return output\n\n function add (source) {\n if (Array.isArray(source)) {\n source.forEach(add)\n return this\n }\n\n sources.push(source);\n source.once('end', remove.bind(null, source))\n source.once('error', output.emit.bind(output, 'error'))\n source.pipe(output, {end: false})\n return this\n }\n\n function isEmpty () {\n return sources.length == 0;\n }\n\n function remove (source) {\n sources = sources.filter(function (it) { return it !== source })\n if (!sources.length && output.readable) { output.end() }\n }\n}\n", "function RetryOperation(timeouts, options) {\n // Compatibility for the old (timeouts, retryForever) signature\n if (typeof options === 'boolean') {\n options = { forever: options };\n }\n\n this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));\n this._timeouts = timeouts;\n this._options = options || {};\n this._maxRetryTime = options && options.maxRetryTime || Infinity;\n this._fn = null;\n this._errors = [];\n this._attempts = 1;\n this._operationTimeout = null;\n this._operationTimeoutCb = null;\n this._timeout = null;\n this._operationStart = null;\n this._timer = null;\n\n if (this._options.forever) {\n this._cachedTimeouts = this._timeouts.slice(0);\n }\n}\nmodule.exports = RetryOperation;\n\nRetryOperation.prototype.reset = function() {\n this._attempts = 1;\n this._timeouts = this._originalTimeouts.slice(0);\n}\n\nRetryOperation.prototype.stop = function() {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n if (this._timer) {\n clearTimeout(this._timer);\n }\n\n this._timeouts = [];\n this._cachedTimeouts = null;\n};\n\nRetryOperation.prototype.retry = function(err) {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n\n if (!err) {\n return false;\n }\n var currentTime = new Date().getTime();\n if (err && currentTime - this._operationStart >= this._maxRetryTime) {\n this._errors.push(err);\n this._errors.unshift(new Error('RetryOperation timeout occurred'));\n return false;\n }\n\n this._errors.push(err);\n\n var timeout = this._timeouts.shift();\n if (timeout === undefined) {\n if (this._cachedTimeouts) {\n // retry forever, only keep last error\n this._errors.splice(0, this._errors.length - 1);\n timeout = this._cachedTimeouts.slice(-1);\n } else {\n return false;\n }\n }\n\n var self = this;\n this._timer = setTimeout(function() {\n self._attempts++;\n\n if (self._operationTimeoutCb) {\n self._timeout = setTimeout(function() {\n self._operationTimeoutCb(self._attempts);\n }, self._operationTimeout);\n\n if (self._options.unref) {\n self._timeout.unref();\n }\n }\n\n self._fn(self._attempts);\n }, timeout);\n\n if (this._options.unref) {\n this._timer.unref();\n }\n\n return true;\n};\n\nRetryOperation.prototype.attempt = function(fn, timeoutOps) {\n this._fn = fn;\n\n if (timeoutOps) {\n if (timeoutOps.timeout) {\n this._operationTimeout = timeoutOps.timeout;\n }\n if (timeoutOps.cb) {\n this._operationTimeoutCb = timeoutOps.cb;\n }\n }\n\n var self = this;\n if (this._operationTimeoutCb) {\n this._timeout = setTimeout(function() {\n self._operationTimeoutCb();\n }, self._operationTimeout);\n }\n\n this._operationStart = new Date().getTime();\n\n this._fn(this._attempts);\n};\n\nRetryOperation.prototype.try = function(fn) {\n console.log('Using RetryOperation.try() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = function(fn) {\n console.log('Using RetryOperation.start() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = RetryOperation.prototype.try;\n\nRetryOperation.prototype.errors = function() {\n return this._errors;\n};\n\nRetryOperation.prototype.attempts = function() {\n return this._attempts;\n};\n\nRetryOperation.prototype.mainError = function() {\n if (this._errors.length === 0) {\n return null;\n }\n\n var counts = {};\n var mainError = null;\n var mainErrorCount = 0;\n\n for (var i = 0; i < this._errors.length; i++) {\n var error = this._errors[i];\n var message = error.message;\n var count = (counts[message] || 0) + 1;\n\n counts[message] = count;\n\n if (count >= mainErrorCount) {\n mainError = error;\n mainErrorCount = count;\n }\n }\n\n return mainError;\n};\n", "var RetryOperation = require('./retry_operation');\n\nexports.operation = function(options) {\n var timeouts = exports.timeouts(options);\n return new RetryOperation(timeouts, {\n forever: options && (options.forever || options.retries === Infinity),\n unref: options && options.unref,\n maxRetryTime: options && options.maxRetryTime\n });\n};\n\nexports.timeouts = function(options) {\n if (options instanceof Array) {\n return [].concat(options);\n }\n\n var opts = {\n retries: 10,\n factor: 2,\n minTimeout: 1 * 1000,\n maxTimeout: Infinity,\n randomize: false\n };\n for (var key in options) {\n opts[key] = options[key];\n }\n\n if (opts.minTimeout > opts.maxTimeout) {\n throw new Error('minTimeout is greater than maxTimeout');\n }\n\n var timeouts = [];\n for (var i = 0; i < opts.retries; i++) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n if (options && options.forever && !timeouts.length) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n // sort the array numerically ascending\n timeouts.sort(function(a,b) {\n return a - b;\n });\n\n return timeouts;\n};\n\nexports.createTimeout = function(attempt, opts) {\n var random = (opts.randomize)\n ? (Math.random() + 1)\n : 1;\n\n var timeout = Math.round(random * Math.max(opts.minTimeout, 1) * Math.pow(opts.factor, attempt));\n timeout = Math.min(timeout, opts.maxTimeout);\n\n return timeout;\n};\n\nexports.wrap = function(obj, options, methods) {\n if (options instanceof Array) {\n methods = options;\n options = null;\n }\n\n if (!methods) {\n methods = [];\n for (var key in obj) {\n if (typeof obj[key] === 'function') {\n methods.push(key);\n }\n }\n }\n\n for (var i = 0; i < methods.length; i++) {\n var method = methods[i];\n var original = obj[method];\n\n obj[method] = function retryWrapper(original) {\n var op = exports.operation(options);\n var args = Array.prototype.slice.call(arguments, 1);\n var callback = args.pop();\n\n args.push(function(err) {\n if (op.retry(err)) {\n return;\n }\n if (err) {\n arguments[0] = op.mainError();\n }\n callback.apply(this, arguments);\n });\n\n op.attempt(function() {\n original.apply(obj, args);\n });\n }.bind(obj, original);\n obj[method].options = options;\n }\n};\n", "module.exports = require('./lib/retry');", "import chalk from \"chalk\";\nimport pluralize from \"pluralize\";\nimport type { Context } from \"../command/context.js\";\nimport { config } from \"../config/config.js\";\nimport { Level } from \"../output/log/level.js\";\nimport { println } from \"../output/print.js\";\nimport { sprint, sprintln } from \"../output/sprint.js\";\nimport { symbol } from \"../output/symbols.js\";\nimport { sprintTable, type SprintTableOptions } from \"../output/table.js\";\nimport { memo } from \"../util/function.js\";\nimport { isNever, isString } from \"../util/is.js\";\nimport type { ChangesWithHash } from \"./hashes.js\";\n\nexport type Create = { type: \"create\"; oldPath?: string };\nexport type Update = { type: \"update\" };\nexport type Delete = { type: \"delete\" };\nexport type Change = Create | Update | Delete;\n\nexport class Changes extends Map<string, Change> {\n created = memo((): string[] => {\n return Array.from(this.entries())\n .filter(([, change]) => change.type === \"create\")\n .map(([path]) => path);\n });\n\n updated = memo((): string[] => {\n return Array.from(this.entries())\n .filter(([, change]) => change.type === \"update\")\n .map(([path]) => path);\n });\n\n deleted = memo((): string[] => {\n return Array.from(this.entries())\n .filter(([, change]) => change.type === \"delete\")\n .map(([path]) => path);\n });\n}\n\nexport type PrintChangesOptions = Partial<SprintTableOptions> & {\n /**\n * The tense to use for the change type.\n */\n tense: \"past\" | \"present\";\n\n /**\n * The maximum number of changes to print.\n *\n * @default Infinity\n */\n limit?: number;\n};\n\nexport const createdSymbol = chalk.greenBright(\"+\");\nexport const updatedSymbol = chalk.blueBright(\"\u00B1\");\nexport const deletedSymbol = chalk.redBright(\"-\");\nexport const renameSymbol = chalk.yellowBright(\"\u2192\");\n\n/**\n * Prints the changes to the console.\n *\n * @param _ctx - The current context.\n * @see {@linkcode SprintChangesOptions}\n */\nexport const sprintChanges = (\n _ctx: Context,\n { changes, tense, limit = Infinity, ...tableOptions }: { changes: Changes | ChangesWithHash } & PrintChangesOptions,\n): string => {\n if (config.logLevel <= Level.TRACE) {\n // print all changes when tracing\n limit = Infinity;\n }\n\n const changesToPrint = Array.from(changes.entries()).filter(([filepath]) => !filepath.startsWith(\".gadget/\"));\n if (changesToPrint.length === 0) {\n return \"\";\n }\n\n const renamed = chalk.yellowBright(tense === \"past\" ? \"renamed\" : \"rename\");\n const created = chalk.greenBright(tense === \"past\" ? \"created\" : \"create\");\n const updated = chalk.blueBright(tense === \"past\" ? \"updated\" : \"update\");\n const deleted = chalk.redBright(tense === \"past\" ? \"deleted\" : \"delete\");\n\n const rows = changesToPrint\n .sort((a, b) => a[0].localeCompare(b[0]))\n .slice(0, limit)\n .map(([path, change]) => {\n switch (true) {\n case change.type === \"create\" && isString(change.oldPath):\n return [renameSymbol, chalk.yellowBright(change.oldPath), renamed, renameSymbol, chalk.yellowBright(path)];\n case change.type === \"create\":\n return [createdSymbol, chalk.greenBright(path), created];\n case change.type === \"update\":\n return [updatedSymbol, chalk.blueBright(path), updated];\n case change.type === \"delete\":\n return [deletedSymbol, chalk.redBright(path), deleted];\n default:\n return isNever(change);\n }\n });\n\n if (changesToPrint.length > limit) {\n rows.push([chalk.gray(symbol.ellipsis), sprint`{gray ${changesToPrint.length - limit} more}`, \"\"]);\n }\n\n let footer: string | undefined;\n if (changesToPrint.length >= 5) {\n const breakdown = [];\n\n const createdCount = changesToPrint.filter(([, change]) => change.type === \"create\").length;\n if (createdCount > 0) {\n const created = tense === \"past\" ? `${createdCount} created` : pluralize(\"create\", createdCount, true);\n breakdown.push(sprint`{greenBright ${created}}`);\n }\n\n const updatedCount = changesToPrint.filter(([, change]) => change.type === \"update\").length;\n if (updatedCount > 0) {\n const updated = tense === \"past\" ? `${updatedCount} updated` : pluralize(\"update\", updatedCount, true);\n breakdown.push(sprint`{blueBright ${updated}}`);\n }\n\n const deletedCount = changesToPrint.filter(([, change]) => change.type === \"delete\").length;\n if (deletedCount > 0) {\n const deleted = tense === \"past\" ? `${deletedCount} deleted` : pluralize(\"delete\", deletedCount, true);\n breakdown.push(sprint`{redBright ${deleted}}`);\n }\n\n footer = sprintln`\n ${pluralize(\"change\", changesToPrint.length, true)} in total. ${breakdown.join(\", \")}.\n `;\n }\n\n return sprintTable({\n rows,\n footer,\n ensureEmptyLineAbove: true,\n ensureEmptyLineAboveBody: false,\n ensureEmptyLineAboveFooter: true,\n indent: 0,\n ...tableOptions,\n });\n};\n\n/**\n * Prints the changes to the console.\n *\n * @param _ctx - The current context.\n * @see {@linkcode SprintChangesOptions}\n */\nexport const printChanges = (_ctx: Context, options: { changes: Changes | ChangesWithHash } & PrintChangesOptions): void => {\n const text = sprintChanges(_ctx, options);\n\n // if all the changes were in the .gadget/ directory then\n // sprintChanges will return an empty string. in that case we don't\n // want to print anything\n if (text) {\n println(text);\n }\n};\n", "import type { ExecutionResult } from \"graphql-ws\";\nimport type { JsonObject } from \"type-fest\";\nimport type {\n CreateActionMutation,\n CreateActionMutationVariables,\n CreateEnvironmentMutation,\n CreateEnvironmentMutationVariables,\n CreateModelFieldsMutation,\n CreateModelMutation,\n CreateModelMutationVariables,\n CreateRouteMutation,\n CreateRouteMutationVariables,\n EnvironmentLogsSubscription,\n EnvironmentLogsSubscriptionVariables,\n FileSyncComparisonHashesQuery,\n FileSyncComparisonHashesQueryVariables,\n FileSyncFilesQuery,\n FileSyncFilesQueryVariables,\n FileSyncHashesQuery,\n FileSyncHashesQueryVariables,\n PublishFileSyncEventsMutation,\n PublishFileSyncEventsMutationVariables,\n PublishStatusSubscription,\n PublishStatusSubscriptionVariables,\n RemoteFilesVersionQuery,\n RemoteFilesVersionQueryVariables,\n RemoteFileSyncEventsSubscription,\n RemoteFileSyncEventsSubscriptionVariables,\n} from \"../../../__generated__/graphql.js\";\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", "import chalk from \"chalk\";\nimport dayjs from \"dayjs\";\nimport { env } from \"../config/env.js\";\nimport { parseBoolean } from \"../util/boolean.js\";\n\nexport const ts = (): string => {\n if (!env.testLike && parseBoolean(process.env[\"CI\"])) {\n return new Date().toISOString();\n }\n return chalk.gray(dayjs().format(\"hh:mm:ss A\"));\n};\n", "import { MemoFirstArg, memo } from \"./function.js\";\n\n/**\n * Parses a string value and returns a boolean value.\n *\n * @param value - The string value to parse.\n * @returns A boolean value representing the parsed value.\n */\nexport const parseBoolean = memo(MemoFirstArg, (value: string | null | undefined): boolean => {\n value ??= \"\";\n return [\"true\", \"1\"].includes(value.trim().toLowerCase());\n});\n", "import chalk from \"chalk\";\nimport { printTable } from \"../output/table.js\";\nimport { ChangesWithHash, isEqualHash, type ChangeWithHash } from \"./hashes.js\";\n\n/**\n * A map of conflicting changes made between the user's local filesystem\n * and Gadget's filesystem where the key is the path of the conflicting\n * file and the value is an object containing the conflicting changes.\n */\nexport class Conflicts extends Map<string, { localChange: ChangeWithHash; gadgetChange: ChangeWithHash }> {}\n\n/**\n * Returns the conflicting changes between the user's local filesystem\n * and Gadget's filesystem.\n */\nexport const getConflicts = ({\n localChanges,\n environmentChanges,\n}: {\n localChanges: ChangesWithHash;\n environmentChanges: ChangesWithHash;\n}): Conflicts => {\n const conflicts = new Conflicts();\n\n for (const [filepath, localChange] of localChanges) {\n const gadgetChange = environmentChanges.get(filepath);\n if (!gadgetChange) {\n // gadget doesn't have this change, so there's no conflict\n continue;\n }\n\n if (localChange.type === \"delete\" && gadgetChange.type === \"delete\") {\n // local and gadget both deleted the same file\n continue;\n }\n\n if (\n \"targetHash\" in localChange &&\n \"targetHash\" in gadgetChange &&\n isEqualHash(filepath, localChange.targetHash, gadgetChange.targetHash)\n ) {\n // local and gadget both created/updated the same file with the same content\n continue;\n }\n\n // local and gadget both updated the same file with different\n // content or one updated and the other deleted\n conflicts.set(filepath, { localChange, gadgetChange });\n }\n\n // ignore .gadget/ file conflicts and always use gadget's version\n // since gadget is the source of truth for .gadget/ files\n for (const filepath of conflicts.keys()) {\n if (filepath.startsWith(\".gadget/\")) {\n conflicts.delete(filepath);\n }\n }\n\n return conflicts;\n};\n\n/**\n * Returns a new `Changes` object that contains only the changes that do\n * not have conflicts.\n *\n * @param options - The options to use.\n * @param options.conflicts - The conflicts to check against.\n * @param options.changes - The changes to filter.\n * @returns A new {@linkcode Changes} object without conflicts.\n */\nexport const withoutConflictingChanges = ({ conflicts, changes }: { conflicts: Conflicts; changes: ChangesWithHash }): ChangesWithHash => {\n const changesWithoutConflicts = new ChangesWithHash(changes);\n\n for (const [filepath] of changesWithoutConflicts) {\n if (conflicts.has(filepath)) {\n changesWithoutConflicts.delete(filepath);\n }\n }\n\n return changesWithoutConflicts;\n};\n\n/**\n * Prints a table of conflicts between local changes and gadget changes.\n *\n * @param options - The options to use.\n * @param options.conflicts - The conflicts to print.\n */\n// TODO: write a snapshot test for this!\nexport const printConflicts = ({ conflicts }: { conflicts: Conflicts }): void => {\n const created = chalk.greenBright(\"+ created\");\n const updated = chalk.blueBright(\"\u00B1 updated\");\n const deleted = chalk.redBright(\"- deleted\");\n\n printTable({\n title: \"These files have conflicting changes.\",\n ensureEmptyLineAbove: true,\n ensureEmptyLineAboveBody: true,\n colAligns: [\"left\", \"center\", \"center\"],\n headers: [\"\", \"You\", \"Environment\"],\n rows: Array.from(conflicts.entries())\n .sort((a, b) => a[0].localeCompare(b[0]))\n .map(([path, { localChange, gadgetChange }]) => {\n switch (true) {\n case localChange.type === \"create\" && gadgetChange.type === \"create\":\n return [path, created, created];\n case localChange.type === \"create\" && gadgetChange.type === \"update\":\n return [path, created, updated];\n case localChange.type === \"create\" && gadgetChange.type === \"delete\":\n return [path, created, deleted];\n case localChange.type === \"update\" && gadgetChange.type === \"create\":\n return [path, updated, created];\n case localChange.type === \"update\" && gadgetChange.type === \"update\":\n return [path, updated, updated];\n case localChange.type === \"update\" && gadgetChange.type === \"delete\":\n return [path, updated, deleted];\n case localChange.type === \"delete\" && gadgetChange.type === \"create\":\n return [path, deleted, created];\n case localChange.type === \"delete\" && gadgetChange.type === \"update\":\n return [path, deleted, updated];\n default:\n throw new Error(`Unexpected conflict: ${localChange.type} vs ${gadgetChange.type}`);\n }\n }),\n });\n};\n", "import assert from \"node:assert\";\nimport type { Context } from \"../command/context.js\";\nimport { type Create, type Delete, type Update } from \"./changes.js\";\nimport type { Hash, Hashes } from \"./directory.js\";\n\nexport type CreateWithHash = Create & { targetHash: Hash };\nexport type UpdateWithHash = Update & { sourceHash: Hash; targetHash: Hash };\nexport type DeleteWithHash = Delete & { sourceHash: Hash };\nexport type ChangeWithHash = CreateWithHash | UpdateWithHash | DeleteWithHash;\n\nexport class ChangesWithHash extends Map<string, ChangeWithHash> {\n created(): string[] {\n return Array.from(this.entries())\n .filter(([, change]) => change.type === \"create\")\n .map(([path]) => path);\n }\n\n updated(): string[] {\n return Array.from(this.entries())\n .filter(([, change]) => change.type === \"update\")\n .map(([path]) => path);\n }\n\n deleted(): string[] {\n return Array.from(this.entries())\n .filter(([, change]) => change.type === \"delete\")\n .map(([path]) => path);\n }\n}\n\n/**\n * Depending on the callers perspective, this either calculates the\n * changes that were made to `from` to make it end up as `to`, or it\n * calculates the changes that need to be made to `from` to make it end\n * up as `to`.\n *\n * If `existing` is provided, any changes that `existing` already has\n * are skipped.\n *\n * If `ignore` is provided, any changes that were made to a path that\n * starts with any of the `ignore`ed paths are skipped.\n *\n * @param ctx - The current context.\n * @param options - The options to use.\n * @param options.from - The source hashes.\n * @param options.to - The target hashes.\n * @param options.existing - The existing hashes.\n * @param options.ignore - The paths to ignore.\n */\nexport const getNecessaryChanges = (\n ctx: Context,\n {\n from: source,\n to: target,\n existing,\n ignore,\n }: {\n from: Hashes;\n to: Hashes;\n existing?: Hashes;\n ignore?: string[];\n },\n): ChangesWithHash => {\n const changes = new ChangesWithHash();\n const targetPaths = Object.keys(target);\n\n for (const [sourcePath, sourceHash] of Object.entries(source)) {\n if (ignore?.some((ignored) => sourcePath.startsWith(ignored))) {\n continue;\n }\n\n const targetHash = target[sourcePath];\n if (!targetHash) {\n if (!sourcePath.endsWith(\"/\") || !targetPaths.some((targetPath) => targetPath.startsWith(sourcePath))) {\n // sourcePath is a file and it doesn't exist in target OR\n // sourcePath is a directory and target doesn't have any\n // existing files inside it, therefor the sourcePath has been\n // deleted\n changes.set(sourcePath, { type: \"delete\", sourceHash });\n ctx.log.trace(\"file deleted\", { path: sourcePath, sourceHash });\n }\n } else if (!isEqualHash(sourcePath, sourceHash, targetHash)) {\n // the file or directory exists in target, but has a different\n // hash, so it's been updated\n changes.set(sourcePath, { type: \"update\", sourceHash, targetHash });\n ctx.log.trace(\"file updated\", { path: sourcePath, sourceHash, targetHash });\n }\n }\n\n for (const targetPath of targetPaths) {\n if (ignore?.some((ignored) => targetPath.startsWith(ignored))) {\n continue;\n }\n\n if (!source[targetPath]) {\n // the targetPath doesn't exist in source, so it's been created\n const targetHash = target[targetPath];\n assert(targetHash, \"targetHash should exist\");\n\n changes.set(targetPath, { type: \"create\", targetHash });\n ctx.log.trace(\"file created\", { path: targetPath, targetHash });\n }\n }\n\n if (!existing) {\n return changes;\n }\n\n return withoutUnnecessaryChanges(ctx, { changes, existing });\n};\n\n/**\n * Filters out changes that the existing filesystem already has.\n */\nexport const withoutUnnecessaryChanges = (\n ctx: Context,\n { changes, existing }: { changes: ChangesWithHash; existing: Hashes },\n): ChangesWithHash => {\n const necessaryChanges = new ChangesWithHash();\n\n for (const [path, change] of changes) {\n const existingHash = existing[path];\n if (change.type === \"delete\" && !existingHash) {\n // already deleted\n ctx.log.trace(\"already deleted\", { path });\n continue;\n }\n\n if (change.type !== \"delete\" && existingHash && isEqualHash(path, change.targetHash, existingHash)) {\n // already created or updated\n ctx.log.trace(\"already created or updated\", { path, existingHash, targetHash: change.targetHash });\n continue;\n }\n\n // we could do this:\n // if (change.type === \"update\" && !existingHash) {\n // change = { type: \"create\", targetHash: change.targetHash };\n // }\n // but, changing the type makes the output look confusing and it\n // doesn't change the outcome, so we just leave it as is\n\n necessaryChanges.set(path, change);\n }\n\n return necessaryChanges;\n};\n\nexport const isEqualHash = (_path: string, aHash: Hash, bHash: Hash): boolean => {\n // FIXME: we're running into issues syncing permissions with Gadget\n // so we're temporarily disabling this check until we can figure out\n return aHash.sha1 === bHash.sha1;\n\n // if (aHash.sha1 !== bHash.sha1) {\n // // the contents are different\n // return false;\n // }\n\n // if (path.endsWith(\"/\")) {\n // // it's a directory, so we don't care about permissions\n // return true;\n // }\n\n // if (isNil(aHash.permissions) || isNil(bHash.permissions)) {\n // // one of the filesystems doesn't support permissions, so ignore them\n // return true;\n // }\n\n // // the contents are the same, and both filesystems support permissions\n // // so ensure the permissions are also the same\n // return aHash.permissions === bHash.permissions;\n};\n\nexport const isEqualHashes = (ctx: Context, a: Hashes, b: Hashes): boolean => {\n for (const [aPath, aHash] of Object.entries(a)) {\n const bHash = b[aPath];\n if (!bHash || !isEqualHash(aPath, aHash, bHash)) {\n ctx.log.debug(\"hashes are not equal\", { path: aPath, aHash, bHash });\n return false;\n }\n }\n\n for (const bPath of Object.keys(b)) {\n if (!a[bPath]) {\n ctx.log.debug(\"hashes are not equal\", { path: bPath, aHash: undefined, bHash: b[bPath] });\n return false;\n }\n }\n\n return true;\n};\n", "import { ArgError } from \"../command/arg.js\";\nimport { sprint } from \"../output/sprint.js\";\n\nexport const FileSyncStrategy = Object.freeze({\n CANCEL: \"cancel\",\n MERGE: \"merge\",\n PUSH: \"push\",\n PULL: \"pull\",\n});\n\nexport type FileSyncStrategy = (typeof FileSyncStrategy)[keyof typeof FileSyncStrategy];\n\nexport const MergeConflictPreference = Object.freeze({\n CANCEL: sprint`Cancel (Ctrl+C)`,\n LOCAL: sprint`Keep {underline local} conflicting changes`,\n ENVIRONMENT: sprint`Keep {underline environment}'s conflicting changes`,\n});\n\nexport type MergeConflictPreference = (typeof MergeConflictPreference)[keyof typeof MergeConflictPreference];\n\nexport const MergeConflictPreferenceArg = (value: string, name: string): MergeConflictPreference => {\n if ([\"local\", \"environment\"].includes(value)) {\n return MergeConflictPreference[value.toUpperCase() as keyof typeof MergeConflictPreference];\n }\n\n if (value === \"gadget\") {\n // v0.4 (deprecated)\n return MergeConflictPreference.ENVIRONMENT;\n }\n\n throw new ArgError(sprint`\n ${name} must be {bold local} or {bold environment}\n\n {bold EXAMPLES:}\n ${name}=local\n ${name}=environment\n `);\n};\n\n// export type FileSyncArgs = DevArgs | PushArgs | PullArgs;\n\n// export const getFileSyncStrategy = (ctx: Context<FileSyncArgs>): FileSyncStrategy | undefined => {\n// switch (true) {\n// case ctx.args[\"--push\"]:\n// return FileSyncStrategy.PUSH;\n// case ctx.args[\"--pull\"]:\n// return FileSyncStrategy.PULL;\n// case ctx.args[\"--merge\"]:\n// return FileSyncStrategy.MERGE;\n// default:\n// return undefined;\n// }\n// };\n\n// export const validateFileSyncStrategy = (ctx: Context<FileSyncArgs>): void => {\n// const strategies = [\"--push\", \"--pull\", \"--merge\"] as const;\n// for (const strategy of strategies) {\n// if (!ctx.args[strategy]) {\n// continue;\n// }\n\n// for (const conflicting of strategies.filter((s) => s !== strategy)) {\n// if (ctx.args[conflicting]) {\n// throw new ArgError(sprint`{bold ${strategy}} and {bold ${conflicting}} cannot be used together`);\n// }\n// }\n// }\n// };\n", "import chalk from \"chalk\";\nimport { execa } from \"execa\";\nimport fs from \"fs-extra\";\nimport ms from \"ms\";\nimport assert from \"node:assert\";\nimport path from \"node:path\";\nimport process from \"node:process\";\nimport pMap from \"p-map\";\nimport PQueue from \"p-queue\";\nimport pRetry from \"p-retry\";\nimport pluralize from \"pluralize\";\nimport type { Promisable } from \"type-fest\";\nimport { FileSyncEncoding, type FileSyncChangedEventInput, type FileSyncDeletedEventInput } from \"../../__generated__/graphql.js\";\nimport { type EditSubscription } from \"../app/edit/edit.js\";\nimport {\n ENVIRONMENT_LOGS_SUBSCRIPTION,\n FILE_SYNC_COMPARISON_HASHES_QUERY,\n FILE_SYNC_FILES_QUERY,\n FILE_SYNC_HASHES_QUERY,\n PUBLISH_FILE_SYNC_EVENTS_MUTATION,\n REMOTE_FILE_SYNC_EVENTS_SUBSCRIPTION,\n} from \"../app/edit/operation.js\";\nimport type { Command } from \"../command/command.js\";\nimport type { Context } from \"../command/context.js\";\nimport { confirm } from \"../output/confirm.js\";\nimport type { Fields } from \"../output/log/field.js\";\nimport { Level } from \"../output/log/level.js\";\nimport { createEnvironmentStructuredLogger, type LoggingArgsResult } from \"../output/log/structured.js\";\nimport { println } from \"../output/print.js\";\nimport { filesyncProblemsToProblems, sprintProblems } from \"../output/problems.js\";\nimport { EdgeCaseError } from \"../output/report.js\";\nimport { select } from \"../output/select.js\";\nimport { spin, type spinner } from \"../output/spinner.js\";\nimport { sprint, sprintln } from \"../output/sprint.js\";\nimport { symbol } from \"../output/symbols.js\";\nimport { ts } from \"../output/timestamp.js\";\nimport { noop } from \"../util/function.js\";\nimport { isEEXISTError, isENOENTError, isENOTDIRError, isENOTEMPTYError } from \"../util/is.js\";\nimport { serializeError } from \"../util/object.js\";\nimport { Changes, printChanges, sprintChanges, type PrintChangesOptions } from \"./changes.js\";\nimport { getConflicts, printConflicts, withoutConflictingChanges } from \"./conflicts.js\";\nimport { supportsPermissions, swallowEnoent, type Hashes } from \"./directory.js\";\nimport { isFilesVersionMismatchError, swallowFilesVersionMismatch, TooManyMergeAttemptsError, TooManyPushAttemptsError } from \"./error.js\";\nimport type { File } from \"./file.js\";\nimport { getNecessaryChanges, isEqualHashes, type ChangesWithHash } from \"./hashes.js\";\nimport { MergeConflictPreference } from \"./strategy.js\";\nimport { type SyncJson } from \"./sync-json.js\";\n\n/**\n * The maximum attempts to automatically merge local and environment\n * file changes when a FilesVersionMismatchError is encountered before\n * throwing a {@linkcode TooManyMergeAttemptsError}.\n */\nexport const MAX_MERGE_ATTEMPTS = 10;\n\n/**\n * The maximum attempts to push local changes to the environment when a\n * FilesVersionMismatchError is encountered before throwing a\n * {@linkcode TooManyPushAttemptsError}.\n */\nexport const MAX_PUSH_ATTEMPTS = 10;\n\n/**\n * The maximum length of file content that can be pushed to Gadget in a\n * single request.\n */\nexport const MAX_PUSH_CONTENT_LENGTH = 50 * 1024 * 1024; // 50mb\n\nexport type FileSyncHashes = {\n /**\n * Whether the local filesystem is in sync with the environment's\n * filesystem.\n */\n inSync: boolean;\n\n /**\n * Whether the local filesystem and the environment's filesystem have\n * both changed since the last sync.\n */\n bothChanged: boolean;\n\n /**\n * Whether only .gadget/ files have changed on the environment's\n * filesystem.\n */\n onlyDotGadgetFilesChanged: boolean;\n\n /**\n * The hashes of the files at the local filesVersion.\n */\n localFilesVersionHashes: Hashes;\n\n /**\n * The hashes of the files on the local filesystem.\n */\n localHashes: Hashes;\n\n /**\n * The changes the local filesystem has made since the last sync.\n */\n localChanges: ChangesWithHash;\n\n /**\n * The changes the local filesystem needs to push to make the\n * environment's filesystem in sync with the local filesystem.\n *\n * NOTE: If the environment's filesystem has changed since the last\n * sync, these changes will undo those changes.\n */\n localChangesToPush: Changes | ChangesWithHash;\n\n /**\n * The filesVersion of the environment's filesystem.\n */\n environmentFilesVersion: bigint;\n\n /**\n * The hashes of the files on the environment's filesystem.\n */\n environmentHashes: Hashes;\n\n /**\n * The changes the environment's filesystem has made since the last\n * sync.\n */\n environmentChanges: ChangesWithHash;\n\n /**\n * The changes the local filesystem needs to pull from the\n * environment's filesystem to be in sync with the environment's\n * filesystem.\n *\n * NOTE: If the local filesystem has changed since the last sync,\n * these changes will undo those changes.\n */\n environmentChangesToPull: Changes | ChangesWithHash;\n};\n\nexport class FileSync {\n /**\n * A FIFO async callback queue that ensures we process filesync events\n * in the order we receive them.\n */\n private _syncOperations = new PQueue({ concurrency: 1 });\n\n constructor(readonly syncJson: SyncJson) {}\n\n async hashes(ctx: Context, { silent = false }: { silent?: boolean } = {}): Promise<FileSyncHashes> {\n const spinner = !silent ? spin({ ensureEmptyLineAbove: true, content: \"Calculating file changes.\" }) : undefined;\n\n try {\n const [localHashes, { localFilesVersionHashes, environmentHashes, environmentFilesVersion }] = await Promise.all([\n // get the hashes of our local files\n this.syncJson.directory.hashes(),\n // get the hashes of our local filesVersion and the latest filesVersion\n (async () => {\n let localFilesVersionHashes: Hashes;\n let environmentHashes: Hashes;\n let environmentFilesVersion: bigint;\n\n if (this.syncJson.filesVersion === 0n) {\n // we're either syncing for the first time or we're syncing a\n // non-empty directory without a `.gadget/sync.json` file,\n // regardless get the hashes of the latest filesVersion\n const { fileSyncHashes } = await this.syncJson.edit.query({ query: FILE_SYNC_HASHES_QUERY });\n environmentFilesVersion = BigInt(fileSyncHashes.filesVersion);\n environmentHashes = fileSyncHashes.hashes;\n localFilesVersionHashes = {}; // represents an empty directory\n } else {\n // this isn't the first time we're syncing, so get the\n // hashes of the files at our local filesVersion and the\n // latest filesVersion\n const { fileSyncComparisonHashes } = await this.syncJson.edit.query({\n query: FILE_SYNC_COMPARISON_HASHES_QUERY,\n variables: { filesVersion: String(this.syncJson.filesVersion) },\n });\n\n localFilesVersionHashes = fileSyncComparisonHashes.filesVersionHashes.hashes;\n environmentHashes = fileSyncComparisonHashes.latestFilesVersionHashes.hashes;\n environmentFilesVersion = BigInt(fileSyncComparisonHashes.latestFilesVersionHashes.filesVersion);\n }\n\n return { localFilesVersionHashes, environmentHashes, environmentFilesVersion };\n })(),\n ]);\n\n const inSync = isEqualHashes(ctx, localHashes, environmentHashes);\n\n const localChanges = getNecessaryChanges(ctx, {\n from: localFilesVersionHashes,\n to: localHashes,\n existing: environmentHashes,\n ignore: [\".gadget/\"], // gadget manages these files\n });\n\n let environmentChanges = getNecessaryChanges(ctx, {\n from: localFilesVersionHashes,\n to: environmentHashes,\n existing: localHashes,\n });\n\n if (!inSync && localChanges.size === 0 && environmentChanges.size === 0) {\n // we're not in sync, but neither the local filesystem nor the\n // environment's filesystem have any changes; this is only\n // possible if the local filesystem has modified .gadget/ files\n environmentChanges = getNecessaryChanges(ctx, { from: localHashes, to: environmentHashes });\n assert(environmentChanges.size > 0, \"expected environmentChanges to have changes\");\n assert(\n Array.from(environmentChanges.keys()).every((path) => path.startsWith(\".gadget/\")),\n \"expected all environmentChanges to be .gadget/ files\",\n );\n }\n\n assert(inSync || localChanges.size > 0 || environmentChanges.size > 0, \"there must be changes if hashes don't match\");\n\n const localChangesToPush = getNecessaryChanges(ctx, { from: environmentHashes, to: localHashes, ignore: [\".gadget/\"] });\n const environmentChangesToPull = getNecessaryChanges(ctx, { from: localHashes, to: environmentHashes });\n\n const onlyDotGadgetFilesChanged =\n environmentChanges.size > 0 && Array.from(environmentChanges.keys()).every((filepath) => filepath.startsWith(\".gadget/\"));\n\n const bothChanged = localChanges.size > 0 && environmentChanges.size > 0 && !onlyDotGadgetFilesChanged;\n\n if (spinner) {\n if (onlyDotGadgetFilesChanged) {\n // only .gadget/ files changed, so pretend like nothing happened\n spinner.clear();\n } else if (inSync) {\n spinner.succeed(`Your files are up to date. ${ts()}`);\n } else {\n spinner.succeed(`Calculated file changes. ${ts()}`);\n }\n }\n\n return {\n inSync,\n localFilesVersionHashes,\n localHashes,\n localChanges,\n localChangesToPush,\n environmentHashes,\n environmentChanges,\n environmentChangesToPull,\n environmentFilesVersion,\n onlyDotGadgetFilesChanged,\n bothChanged,\n };\n } catch (error) {\n if (spinner) {\n spinner.fail();\n }\n throw error;\n }\n }\n\n async print(ctx: Context, { hashes }: { hashes?: FileSyncHashes } = {}): Promise<void> {\n const { inSync, localChanges, environmentChanges, onlyDotGadgetFilesChanged, bothChanged } = hashes ?? (await this.hashes(ctx));\n if (inSync) {\n // the spinner in hashes will have already printed that we're in sync\n return;\n }\n\n if (localChanges.size > 0) {\n printChanges(ctx, {\n changes: localChanges,\n tense: \"past\",\n title: sprint`Your local files {underline have} changed.`,\n });\n } else {\n println({ ensureEmptyLineAbove: true, content: sprint`Your local files {underline have not} changed.` });\n }\n\n if (environmentChanges.size > 0 && !onlyDotGadgetFilesChanged) {\n printChanges(ctx, {\n changes: environmentChanges,\n tense: \"past\",\n title: sprint`Your environment's files {underline have}${bothChanged ? \" also\" : \"\"} changed.`,\n });\n } else {\n println({ ensureEmptyLineAbove: true, content: sprint`Your environment's files {underline have not} changed.` });\n }\n }\n\n /**\n * Waits for all pending and ongoing filesync operations to complete.\n */\n async idle(): Promise<void> {\n await this._syncOperations.onIdle();\n }\n\n /**\n * Attempts to send file changes to the Gadget. If a files version\n * mismatch error occurs, this function will merge the changes with\n * Gadget instead.\n *\n * @param ctx - The context to use.\n * @param options - The options to use.\n * @param options.changes - The changes to send.\n * @param options.printLocalChangesOptions - The options to use when printing the local changes.\n * @param options.printEnvironmentChangesOptions - The options to use when printing the changes from Gadget.\n * @returns A promise that resolves when the changes have been sent.\n */\n async mergeChangesWithEnvironment(\n ctx: Context,\n {\n changes,\n printLocalChangesOptions,\n printEnvironmentChangesOptions,\n }: {\n changes: Changes;\n printLocalChangesOptions?: Partial<PrintChangesOptions>;\n printEnvironmentChangesOptions?: Partial<PrintChangesOptions>;\n },\n ): Promise<void> {\n await this._syncOperations.add(async () => {\n try {\n await this._sendChangesToEnvironment(ctx, { changes, printLocalChangesOptions });\n } catch (error) {\n swallowFilesVersionMismatch(ctx, error);\n // we either sent the wrong expectedFilesVersion or we received\n // a filesVersion that is greater than the expectedFilesVersion\n // + 1, so we need to stop what we're doing and get in sync\n await this.merge(ctx, { printEnvironmentChangesOptions });\n }\n });\n }\n\n subscribeToEnvironmentLogs(\n args: LoggingArgsResult,\n {\n onError,\n }: {\n onError: (error: unknown) => void;\n },\n ): EditSubscription<ENVIRONMENT_LOGS_SUBSCRIPTION> {\n const logger = createEnvironmentStructuredLogger(this.syncJson.environment);\n\n const includedLevels = Object.entries(Level)\n .filter(([_, value]) => {\n return value >= args[\"--log-level\"];\n })\n .map(([key]) => key.toLowerCase())\n .join(\"|\");\n\n return this.syncJson.edit.subscribe({\n subscription: ENVIRONMENT_LOGS_SUBSCRIPTION,\n variables: () => ({\n query: `{environment_id=\"${this.syncJson.environment.id}\"} | json | level=~\"${includedLevels}\"${args[\"--my-logs\"] ? ' | source=\"user\"' : \"\"}`,\n start: new Date(),\n }),\n onError,\n onData: ({ logsSearchV2 }) => {\n for (const log of logsSearchV2.data[\"messages\"] as [string, string][]) {\n const message: unknown = JSON.parse(log[1]);\n const { msg, name, level, ...fields } = message as Record<string, unknown>;\n\n logger(\n level as string,\n name as string,\n msg as Lowercase<string>,\n {\n ...fields,\n } as Fields,\n new Date(Number(log[0]) / 1_000_000),\n );\n }\n },\n });\n }\n\n /**\n * Subscribes to file changes on Gadget and executes the provided\n * callbacks before and after the changes occur.\n *\n * @param ctx - The context to use.\n * @param options - The options to use.\n * @param options.beforeChanges - A callback that is called before the changes occur.\n * @param options.afterChanges - A callback that is called after the changes occur.\n * @param options.onError - A callback that is called if an error occurs.\n * @param options.printEnvironmentChangesOptions - The options to use when printing the changes from Gadget.\n * @returns A function that unsubscribes from changes on Gadget.\n */\n subscribeToEnvironmentChanges(\n ctx: Context,\n {\n beforeChanges = noop,\n printEnvironmentChangesOptions,\n afterChanges = noop,\n onError,\n }: {\n beforeChanges?: (data: { changed: string[]; deleted: string[] }) => Promisable<void>;\n printEnvironmentChangesOptions?: Partial<PrintChangesOptions>;\n afterChanges?: (data: { changes: Changes }) => Promisable<void>;\n onError: (error: unknown) => void;\n },\n ): EditSubscription<REMOTE_FILE_SYNC_EVENTS_SUBSCRIPTION> {\n return this.syncJson.edit.subscribe({\n subscription: REMOTE_FILE_SYNC_EVENTS_SUBSCRIPTION,\n // the reason this is a function rather than a static value is\n // so that it will be re-evaluated if the connection is lost and\n // then re-established. this ensures that we send our current\n // filesVersion rather than the one that was sent when we first\n // subscribed\n variables: () => ({ localFilesVersion: String(this.syncJson.filesVersion) }),\n onError,\n onData: ({ remoteFileSyncEvents: { changed, deleted, remoteFilesVersion } }) => {\n this._syncOperations\n .add(async () => {\n if (BigInt(remoteFilesVersion) < this.syncJson.filesVersion) {\n ctx.log.warn(\"skipping received changes because files version is outdated\", { filesVersion: remoteFilesVersion });\n return;\n }\n\n ctx.log.debug(\"received files\", {\n remoteFilesVersion,\n changed: changed.map((change) => change.path),\n deleted: deleted.map((change) => change.path),\n });\n\n const filterIgnoredFiles = (file: { path: string }): boolean => {\n const ignored = this.syncJson.directory.ignores(file.path);\n if (ignored) {\n ctx.log.warn(\"skipping received change because file is ignored\", { path: file.path });\n }\n return !ignored;\n };\n\n changed = changed.filter(filterIgnoredFiles);\n deleted = deleted.filter(filterIgnoredFiles);\n\n if (changed.length === 0 && deleted.length === 0) {\n await this.syncJson.save(remoteFilesVersion);\n return;\n }\n\n await beforeChanges({\n changed: changed.map((file) => file.path),\n deleted: deleted.map((file) => file.path),\n });\n\n const changes = await this.writeToLocalFilesystem(ctx, {\n filesVersion: remoteFilesVersion,\n files: changed,\n delete: deleted.map((file) => file.path),\n printEnvironmentChangesOptions: {\n tense: \"past\",\n ensureEmptyLineAbove: true,\n title: sprintln`{greenBright ${symbol.tick}} Pulled ${pluralize(\"file\", changed.length + deleted.length)}. ${ts()}`,\n limit: 5,\n ...printEnvironmentChangesOptions,\n },\n });\n\n await afterChanges({ changes });\n })\n .catch(onError);\n },\n });\n }\n\n /**\n * Ensures the local filesystem is in sync with Gadget's filesystem.\n * - All non-conflicting changes are automatically merged.\n * - Conflicts are resolved by prompting the user to either keep their local changes or keep Gadget's changes.\n * - This function will not return until the filesystem is in sync.\n */\n async merge(\n ctx: Context,\n {\n hashes,\n prefer,\n maxAttempts = MAX_MERGE_ATTEMPTS,\n printLocalChangesOptions,\n printEnvironmentChangesOptions,\n silent,\n }: {\n hashes?: FileSyncHashes;\n prefer?: MergeConflictPreference;\n maxAttempts?: number;\n printLocalChangesOptions?: Partial<PrintChangesOptions>;\n printEnvironmentChangesOptions?: Partial<PrintChangesOptions>;\n silent?: boolean;\n } = {},\n ): Promise<void> {\n let attempt = 0;\n\n do {\n if (attempt === 0) {\n hashes ??= await this.hashes(ctx, { silent });\n } else {\n hashes = await this.hashes(ctx, { silent });\n }\n\n if (hashes.inSync) {\n this._syncOperations.clear();\n ctx.log.info(\"filesystem in sync\");\n await this.syncJson.save(hashes.environmentFilesVersion);\n return;\n }\n\n attempt += 1;\n ctx.log.info(\"merging\", { attempt, ...hashes });\n\n try {\n await this._merge(ctx, { hashes, prefer, printLocalChangesOptions, printEnvironmentChangesOptions });\n } catch (error) {\n swallowFilesVersionMismatch(ctx, error);\n // we either sent the wrong expectedFilesVersion or we received\n // a filesVersion that is greater than the expectedFilesVersion\n // + 1, so try again\n }\n } while (attempt < maxAttempts);\n\n throw new TooManyMergeAttemptsError(maxAttempts);\n }\n\n /**\n * Pushes any changes made to the local filesystem since the last sync\n * to Gadget.\n */\n async push(\n ctx: Context,\n {\n command,\n hashes,\n maxAttempts = MAX_PUSH_ATTEMPTS,\n printLocalChangesOptions,\n }: {\n command: Command;\n hashes?: FileSyncHashes;\n maxAttempts?: number;\n printLocalChangesOptions?: PrintChangesOptions;\n },\n ): Promise<void> {\n let attempt = 0;\n\n do {\n const { localChangesToPush, environmentFilesVersion } = hashes ?? (await this.hashes(ctx));\n if (localChangesToPush.size === 0) {\n return;\n }\n\n attempt += 1;\n\n try {\n await this._sendChangesToEnvironment(ctx, {\n changes: localChangesToPush,\n expectedFilesVersion: environmentFilesVersion,\n printLocalChangesOptions,\n });\n return;\n } catch (error) {\n swallowFilesVersionMismatch(ctx, error);\n // we either sent the wrong expectedFilesVersion or received a\n // filesVersion that is greater than expectedFilesVersion + 1\n hashes = await this.hashes(ctx, { silent: true });\n if (hashes.environmentFilesVersion > environmentFilesVersion + 1n) {\n // the returned filesVersion is greater than the\n // expectedFilesVersion + 1, so the files were pushed\n // successfully.\n return;\n }\n\n // we sent the wrong expectedFilesVersion and files have changed\n // on the environment's filesystem since we last checked\n if (hashes.onlyDotGadgetFilesChanged) {\n // only .gadget/ files changed, so we can try again\n continue;\n }\n\n // non-.gadget/ files changed, so we can't try again\n throw new EdgeCaseError(sprint`\n Your environment's files have changed since we last checked.\n\n Please re-run \"ggt ${command}\" to see the changes and try again.\n `);\n }\n } while (attempt < maxAttempts);\n\n throw new TooManyPushAttemptsError(maxAttempts, command);\n }\n\n async pull(\n ctx: Context,\n {\n hashes,\n force,\n printEnvironmentChangesOptions,\n }: {\n hashes?: FileSyncHashes;\n force?: boolean;\n printEnvironmentChangesOptions?: Partial<PrintChangesOptions>;\n } = {},\n ): Promise<void> {\n const { localChanges, environmentChangesToPull, environmentFilesVersion } = hashes ?? (await this.hashes(ctx));\n assert(environmentChangesToPull.size > 0, \"cannot pull if there are no changes\");\n\n // TODO: lift this check up to the pull command\n if (localChanges.size > 0 && !force) {\n await confirm(sprint`\n Are you sure you want to {underline discard} your local changes?\n `);\n }\n\n await this._getChangesFromEnvironment(ctx, {\n changes: environmentChangesToPull,\n filesVersion: environmentFilesVersion,\n printEnvironmentChangesOptions,\n });\n }\n\n async writeToLocalFilesystem(\n ctx: Context,\n options: {\n filesVersion: bigint | string;\n files: File[];\n delete: string[];\n printEnvironmentChangesOptions?: Partial<PrintChangesOptions>;\n spinner?: spinner;\n },\n ): Promise<Changes> {\n const filesVersion = BigInt(options.filesVersion);\n assert(filesVersion >= this.syncJson.filesVersion, \"filesVersion must be greater than or equal to current filesVersion\");\n\n ctx.log.debug(\"writing to local filesystem\", {\n filesVersion,\n files: options.files.map((file) => file.path),\n delete: options.delete,\n });\n\n const changes = new Changes();\n const directoriesWithDeletedFiles = new Set<string>();\n\n for (const pathToDelete of options.delete.sort().reverse()) {\n // add all the directories that contain this file to\n // directoriesWithDeletedFiles so we can clean them up later\n let dir = path.dirname(pathToDelete);\n while (dir !== \".\") {\n directoriesWithDeletedFiles.add(this.syncJson.directory.normalize(dir, true));\n dir = path.dirname(dir);\n }\n\n const currentPath = this.syncJson.directory.absolute(pathToDelete);\n const backupPath = this.syncJson.directory.absolute(\".gadget/backup\", this.syncJson.directory.relative(pathToDelete));\n\n // rather than `rm -rf`ing files, we move them to\n // `.gadget/backup/` so that users can recover them if something\n // goes wrong. We've seen a lot of EBUSY/EINVAL errors when moving\n // files so we retry a few times.\n await pRetry(\n async () => {\n try {\n // remove the current backup file in case it exists and is a\n // different type (file vs directory)\n await fs.remove(backupPath);\n await fs.move(currentPath, backupPath);\n changes.set(pathToDelete, { type: \"delete\" });\n } catch (error) {\n if (isENOENTError(error)) {\n // replicate the behavior of `rm -rf` and ignore ENOENT\n return;\n }\n\n if (isENOTDIRError(error) || isEEXISTError(error)) {\n // the backup path already exists and ends in a file\n // rather than a directory, so we have to remove the file\n // before we can move the current path to the backup path\n let dir = path.dirname(backupPath);\n while (dir !== this.syncJson.directory.absolute(\".gadget/backup\")) {\n const stats = await fs.stat(dir);\n // eslint-disable-next-line max-depth\n if (!stats.isDirectory()) {\n // this file is in the way, so remove it\n ctx.log.debug(\"removing file in the way of backup path\", { currentPath, backupPath, file: dir });\n await fs.remove(dir);\n }\n dir = path.dirname(dir);\n }\n // still throw the error so we retry\n }\n\n throw error;\n }\n },\n {\n retries: 5,\n minTimeout: ms(\"100ms\"),\n onFailedAttempt: (error) => {\n ctx.log.warn(\"failed to move file to backup\", { error, currentPath, backupPath });\n },\n },\n );\n }\n\n for (const directoryWithDeletedFile of Array.from(directoriesWithDeletedFiles.values()).sort().reverse()) {\n if (options.files.some((file) => file.path === directoryWithDeletedFile)) {\n // we're about to create this directory, so we don't need to\n // clean it up\n continue;\n }\n\n try {\n // delete any empty directories that contained a deleted file.\n // if the empty directory should continue to exist, we would\n // have received an event to create it above\n await fs.rmdir(this.syncJson.directory.absolute(directoryWithDeletedFile));\n changes.set(directoryWithDeletedFile, { type: \"delete\" });\n } catch (error) {\n if (isENOENTError(error) || isENOTEMPTYError(error)) {\n // noop if the directory doesn't exist or isn't empty\n continue;\n }\n throw error;\n }\n }\n\n await pMap(options.files, async (file) => {\n const absolutePath = this.syncJson.directory.absolute(file.path);\n if (await fs.pathExists(absolutePath)) {\n if (!file.path.endsWith(\"/\")) {\n // only track file updates, not directory updates\n changes.set(file.path, { type: \"update\" });\n }\n } else {\n changes.set(file.path, { type: \"create\" });\n }\n\n if (file.path.endsWith(\"/\")) {\n await fs.ensureDir(absolutePath);\n } else {\n await fs.outputFile(absolutePath, Buffer.from(file.content, file.encoding));\n }\n\n if (supportsPermissions) {\n // the os's default umask makes setting the mode during creation\n // not work, so an additional fs.chmod call is necessary to\n // ensure the file has the correct mode\n await fs.chmod(absolutePath, file.mode & 0o777);\n }\n\n if (absolutePath === this.syncJson.directory.absolute(\".ignore\")) {\n await this.syncJson.directory.loadIgnoreFile();\n }\n });\n\n await this.syncJson.save(String(filesVersion));\n\n options.spinner?.clear();\n\n printChanges(ctx, {\n changes,\n tense: \"past\",\n title: sprint`{greenBright ${symbol.arrowDown}} Pulled ${pluralize(\"file\", changes.size)}. ${ts()}`,\n ...options.printEnvironmentChangesOptions,\n });\n\n if (changes.has(\"yarn.lock\")) {\n const spinner = spin({ ensureEmptyLineAbove: true, content: 'Running \"yarn install --check-files\"' });\n\n try {\n await execa(\"yarn\", [\"install\", \"--check-files\"], { cwd: this.syncJson.directory.path });\n spinner.succeed(`Ran \"yarn install --check-files\" ${ts()}`);\n } catch (error) {\n spinner.fail();\n ctx.log.error(\"yarn install failed\", { error });\n\n const content = serializeError(error).message;\n if (content) {\n println({ ensureEmptyLineAbove: true, indent: 2, content });\n }\n }\n }\n\n return changes;\n }\n\n private async _merge(\n ctx: Context,\n {\n hashes: { localChanges, environmentChanges, environmentFilesVersion },\n prefer: preference,\n printLocalChangesOptions,\n printEnvironmentChangesOptions,\n }: {\n hashes: FileSyncHashes;\n prefer?: MergeConflictPreference;\n printLocalChangesOptions?: Partial<PrintChangesOptions>;\n printEnvironmentChangesOptions?: Partial<PrintChangesOptions>;\n },\n ): Promise<void> {\n const conflicts = getConflicts({ localChanges, environmentChanges });\n if (conflicts.size > 0) {\n ctx.log.debug(\"conflicts detected\", { conflicts });\n\n if (!preference) {\n printConflicts({ conflicts });\n preference = await select({\n choices: Object.values(MergeConflictPreference),\n content: chalk.bold(\"How should we resolve these conflicts?\"),\n });\n }\n\n switch (preference) {\n case MergeConflictPreference.CANCEL: {\n process.exit(0);\n break;\n }\n case MergeConflictPreference.LOCAL: {\n environmentChanges = withoutConflictingChanges({ conflicts, changes: environmentChanges });\n break;\n }\n case MergeConflictPreference.ENVIRONMENT: {\n localChanges = withoutConflictingChanges({ conflicts, changes: localChanges });\n break;\n }\n }\n }\n\n if (environmentChanges.size > 0) {\n await this._getChangesFromEnvironment(ctx, {\n changes: environmentChanges,\n filesVersion: environmentFilesVersion,\n printEnvironmentChangesOptions,\n });\n }\n\n if (localChanges.size > 0) {\n await this._sendChangesToEnvironment(ctx, {\n changes: localChanges,\n expectedFilesVersion: environmentFilesVersion,\n printLocalChangesOptions,\n });\n }\n }\n\n private async _getChangesFromEnvironment(\n ctx: Context,\n {\n filesVersion,\n changes,\n printEnvironmentChangesOptions,\n }: {\n filesVersion: bigint;\n changes: Changes | ChangesWithHash;\n printEnvironmentChangesOptions?: Partial<PrintChangesOptions>;\n },\n ): Promise<void> {\n ctx.log.debug(\"getting changes from gadget\", { filesVersion, changes });\n const created = changes.created();\n const updated = changes.updated();\n\n const spinner = spin({\n ensureEmptyLineAbove: true,\n content: sprintChanges(ctx, {\n changes,\n tense: \"present\",\n title: sprint`Pulling ${pluralize(\"file\", changes.size)}.`,\n ...printEnvironmentChangesOptions,\n }),\n });\n\n try {\n let files: File[] = [];\n if (created.length > 0 || updated.length > 0) {\n const { fileSyncFiles } = await this.syncJson.edit.query({\n query: FILE_SYNC_FILES_QUERY,\n variables: {\n paths: [...created, ...updated],\n filesVersion: String(filesVersion),\n encoding: FileSyncEncoding.Base64,\n },\n });\n\n files = fileSyncFiles.files;\n }\n\n await this.writeToLocalFilesystem(ctx, {\n filesVersion,\n files,\n delete: changes.deleted(),\n spinner,\n printEnvironmentChangesOptions,\n });\n } catch (error) {\n spinner.fail();\n throw error;\n }\n }\n\n private async _sendChangesToEnvironment(\n ctx: Context,\n {\n changes,\n expectedFilesVersion = this.syncJson.filesVersion,\n printLocalChangesOptions,\n }: {\n changes: Changes | ChangesWithHash;\n expectedFilesVersion?: bigint;\n printLocalChangesOptions?: Partial<PrintChangesOptions>;\n },\n ): Promise<void> {\n ctx.log.debug(\"sending changes to gadget\", { expectedFilesVersion, changes });\n const changed: FileSyncChangedEventInput[] = [];\n const deleted: FileSyncDeletedEventInput[] = [];\n\n await pMap(changes, async ([normalizedPath, change]) => {\n if (change.type === \"delete\") {\n deleted.push({ path: normalizedPath });\n return;\n }\n\n const absolutePath = this.syncJson.directory.absolute(normalizedPath);\n\n let stats;\n try {\n stats = await fs.stat(absolutePath);\n } catch (error) {\n swallowEnoent(error);\n ctx.log.debug(\"skipping change because file doesn't exist\", { path: normalizedPath });\n return;\n }\n\n let content = \"\";\n if (stats.isFile()) {\n content = await fs.readFile(absolutePath, FileSyncEncoding.Base64);\n }\n\n let oldPath;\n if (change.type === \"create\" && change.oldPath) {\n oldPath = change.oldPath;\n }\n\n changed.push({\n content,\n oldPath,\n path: normalizedPath,\n mode: stats.mode,\n encoding: FileSyncEncoding.Base64,\n });\n });\n\n if (changed.length === 0 && deleted.length === 0) {\n ctx.log.debug(\"skipping send because there are no changes\");\n return;\n }\n\n const contentLength = changed.map((change) => change.content.length).reduce((a, b) => a + b, 0);\n if (contentLength > MAX_PUSH_CONTENT_LENGTH) {\n throw new EdgeCaseError(sprint`\n {underline Your file changes are too large to push.}\n\n Run \"ggt status\" to see your changes and consider\n ignoring some files or pushing in smaller batches.\n `);\n }\n\n const spinner = spin({\n ensureEmptyLineAbove: true,\n content: sprintChanges(ctx, {\n changes,\n tense: \"present\",\n title: sprintln`Pushing ${pluralize(\"file\", changed.length + deleted.length)}. ${symbol.arrowRight}`,\n ...printLocalChangesOptions,\n }),\n });\n\n try {\n const {\n publishFileSyncEvents: { remoteFilesVersion, problems: filesyncProblems },\n } = await this.syncJson.edit.mutate({\n mutation: PUBLISH_FILE_SYNC_EVENTS_MUTATION,\n variables: {\n input: {\n expectedRemoteFilesVersion: String(expectedFilesVersion),\n changed,\n deleted,\n },\n },\n http: {\n retry: {\n // we can retry this request because\n // expectedRemoteFilesVersion makes it idempotent\n methods: [\"POST\"],\n calculateDelay: ({ error, computedValue }) => {\n if (isFilesVersionMismatchError(error.response?.body)) {\n // don't retry if we get a files version mismatch error\n return 0;\n }\n return computedValue;\n },\n },\n },\n });\n\n if (BigInt(remoteFilesVersion) > expectedFilesVersion + 1n) {\n // we can't save the remoteFilesVersion because we haven't\n // received the intermediate filesVersions yet\n throw new Error(\"Files version mismatch\");\n }\n\n await this.syncJson.save(remoteFilesVersion);\n\n spinner.succeed(\n sprintChanges(ctx, {\n changes,\n tense: \"past\",\n title: sprintln`Pushed ${pluralize(\"file\", changed.length + deleted.length)}. ${symbol.arrowRight} ${ts()}`,\n ...printLocalChangesOptions,\n }),\n );\n\n if (filesyncProblems.length > 0) {\n println({\n ensureEmptyLineAbove: true,\n content: sprint`\n {red Gadget has detected the following fatal errors with your files:}\n\n ${sprintProblems({\n problems: filesyncProblemsToProblems(filesyncProblems),\n showFileTypes: false,\n indent: 12,\n })}\n\n {red Your app will not be operational until all fatal errors are fixed.}\n `,\n });\n }\n } catch (error) {\n if (isFilesVersionMismatchError(error)) {\n spinner.clear();\n } else {\n spinner.fail();\n }\n\n throw error;\n }\n }\n}\n", "import {Buffer} from 'node:buffer';\nimport path from 'node:path';\nimport childProcess from 'node:child_process';\nimport process from 'node:process';\nimport crossSpawn from 'cross-spawn';\nimport stripFinalNewline from 'strip-final-newline';\nimport {npmRunPathEnv} from 'npm-run-path';\nimport onetime from 'onetime';\nimport {makeError} from './lib/error.js';\nimport {normalizeStdio, normalizeStdioNode} from './lib/stdio.js';\nimport {spawnedKill, spawnedCancel, setupTimeout, validateTimeout, setExitHandler} from './lib/kill.js';\nimport {addPipeMethods} from './lib/pipe.js';\nimport {handleInput, getSpawnedResult, makeAllStream, handleInputSync} from './lib/stream.js';\nimport {mergePromise, getSpawnedPromise} from './lib/promise.js';\nimport {joinCommand, parseCommand, parseTemplates, getEscapedCommand} from './lib/command.js';\nimport {logCommand, verboseDefault} from './lib/verbose.js';\n\nconst DEFAULT_MAX_BUFFER = 1000 * 1000 * 100;\n\nconst getEnv = ({env: envOption, extendEnv, preferLocal, localDir, execPath}) => {\n\tconst env = extendEnv ? {...process.env, ...envOption} : envOption;\n\n\tif (preferLocal) {\n\t\treturn npmRunPathEnv({env, cwd: localDir, execPath});\n\t}\n\n\treturn env;\n};\n\nconst handleArguments = (file, args, options = {}) => {\n\tconst parsed = crossSpawn._parse(file, args, options);\n\tfile = parsed.command;\n\targs = parsed.args;\n\toptions = parsed.options;\n\n\toptions = {\n\t\tmaxBuffer: DEFAULT_MAX_BUFFER,\n\t\tbuffer: true,\n\t\tstripFinalNewline: true,\n\t\textendEnv: true,\n\t\tpreferLocal: false,\n\t\tlocalDir: options.cwd || process.cwd(),\n\t\texecPath: process.execPath,\n\t\tencoding: 'utf8',\n\t\treject: true,\n\t\tcleanup: true,\n\t\tall: false,\n\t\twindowsHide: true,\n\t\tverbose: verboseDefault,\n\t\t...options,\n\t};\n\n\toptions.env = getEnv(options);\n\n\toptions.stdio = normalizeStdio(options);\n\n\tif (process.platform === 'win32' && path.basename(file, '.exe') === 'cmd') {\n\t\t// #116\n\t\targs.unshift('/q');\n\t}\n\n\treturn {file, args, options, parsed};\n};\n\nconst handleOutput = (options, value, error) => {\n\tif (typeof value !== 'string' && !Buffer.isBuffer(value)) {\n\t\t// When `execaSync()` errors, we normalize it to '' to mimic `execa()`\n\t\treturn error === undefined ? undefined : '';\n\t}\n\n\tif (options.stripFinalNewline) {\n\t\treturn stripFinalNewline(value);\n\t}\n\n\treturn value;\n};\n\nexport function execa(file, args, options) {\n\tconst parsed = handleArguments(file, args, options);\n\tconst command = joinCommand(file, args);\n\tconst escapedCommand = getEscapedCommand(file, args);\n\tlogCommand(escapedCommand, parsed.options);\n\n\tvalidateTimeout(parsed.options);\n\n\tlet spawned;\n\ttry {\n\t\tspawned = childProcess.spawn(parsed.file, parsed.args, parsed.options);\n\t} catch (error) {\n\t\t// Ensure the returned error is always both a promise and a child process\n\t\tconst dummySpawned = new childProcess.ChildProcess();\n\t\tconst errorPromise = Promise.reject(makeError({\n\t\t\terror,\n\t\t\tstdout: '',\n\t\t\tstderr: '',\n\t\t\tall: '',\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t}));\n\t\tmergePromise(dummySpawned, errorPromise);\n\t\treturn dummySpawned;\n\t}\n\n\tconst spawnedPromise = getSpawnedPromise(spawned);\n\tconst timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise);\n\tconst processDone = setExitHandler(spawned, parsed.options, timedPromise);\n\n\tconst context = {isCanceled: false};\n\n\tspawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned));\n\tspawned.cancel = spawnedCancel.bind(null, spawned, context);\n\n\tconst handlePromise = async () => {\n\t\tconst [{error, exitCode, signal, timedOut}, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);\n\t\tconst stdout = handleOutput(parsed.options, stdoutResult);\n\t\tconst stderr = handleOutput(parsed.options, stderrResult);\n\t\tconst all = handleOutput(parsed.options, allResult);\n\n\t\tif (error || exitCode !== 0 || signal !== null) {\n\t\t\tconst returnedError = makeError({\n\t\t\t\terror,\n\t\t\t\texitCode,\n\t\t\t\tsignal,\n\t\t\t\tstdout,\n\t\t\t\tstderr,\n\t\t\t\tall,\n\t\t\t\tcommand,\n\t\t\t\tescapedCommand,\n\t\t\t\tparsed,\n\t\t\t\ttimedOut,\n\t\t\t\tisCanceled: context.isCanceled || (parsed.options.signal ? parsed.options.signal.aborted : false),\n\t\t\t\tkilled: spawned.killed,\n\t\t\t});\n\n\t\t\tif (!parsed.options.reject) {\n\t\t\t\treturn returnedError;\n\t\t\t}\n\n\t\t\tthrow returnedError;\n\t\t}\n\n\t\treturn {\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\texitCode: 0,\n\t\t\tstdout,\n\t\t\tstderr,\n\t\t\tall,\n\t\t\tfailed: false,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t};\n\t};\n\n\tconst handlePromiseOnce = onetime(handlePromise);\n\n\thandleInput(spawned, parsed.options);\n\n\tspawned.all = makeAllStream(spawned, parsed.options);\n\n\taddPipeMethods(spawned);\n\tmergePromise(spawned, handlePromiseOnce);\n\treturn spawned;\n}\n\nexport function execaSync(file, args, options) {\n\tconst parsed = handleArguments(file, args, options);\n\tconst command = joinCommand(file, args);\n\tconst escapedCommand = getEscapedCommand(file, args);\n\tlogCommand(escapedCommand, parsed.options);\n\n\tconst input = handleInputSync(parsed.options);\n\n\tlet result;\n\ttry {\n\t\tresult = childProcess.spawnSync(parsed.file, parsed.args, {...parsed.options, input});\n\t} catch (error) {\n\t\tthrow makeError({\n\t\t\terror,\n\t\t\tstdout: '',\n\t\t\tstderr: '',\n\t\t\tall: '',\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t});\n\t}\n\n\tconst stdout = handleOutput(parsed.options, result.stdout, result.error);\n\tconst stderr = handleOutput(parsed.options, result.stderr, result.error);\n\n\tif (result.error || result.status !== 0 || result.signal !== null) {\n\t\tconst error = makeError({\n\t\t\tstdout,\n\t\t\tstderr,\n\t\t\terror: result.error,\n\t\t\tsignal: result.signal,\n\t\t\texitCode: result.status,\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: result.error && result.error.code === 'ETIMEDOUT',\n\t\t\tisCanceled: false,\n\t\t\tkilled: result.signal !== null,\n\t\t});\n\n\t\tif (!parsed.options.reject) {\n\t\t\treturn error;\n\t\t}\n\n\t\tthrow error;\n\t}\n\n\treturn {\n\t\tcommand,\n\t\tescapedCommand,\n\t\texitCode: 0,\n\t\tstdout,\n\t\tstderr,\n\t\tfailed: false,\n\t\ttimedOut: false,\n\t\tisCanceled: false,\n\t\tkilled: false,\n\t};\n}\n\nconst normalizeScriptStdin = ({input, inputFile, stdio}) => input === undefined && inputFile === undefined && stdio === undefined\n\t? {stdin: 'inherit'}\n\t: {};\n\nconst normalizeScriptOptions = (options = {}) => ({\n\tpreferLocal: true,\n\t...normalizeScriptStdin(options),\n\t...options,\n});\n\nfunction create$(options) {\n\tfunction $(templatesOrOptions, ...expressions) {\n\t\tif (!Array.isArray(templatesOrOptions)) {\n\t\t\treturn create$({...options, ...templatesOrOptions});\n\t\t}\n\n\t\tconst [file, ...args] = parseTemplates(templatesOrOptions, expressions);\n\t\treturn execa(file, args, normalizeScriptOptions(options));\n\t}\n\n\t$.sync = (templates, ...expressions) => {\n\t\tif (!Array.isArray(templates)) {\n\t\t\tthrow new TypeError('Please use $(options).sync`command` instead of $.sync(options)`command`.');\n\t\t}\n\n\t\tconst [file, ...args] = parseTemplates(templates, expressions);\n\t\treturn execaSync(file, args, normalizeScriptOptions(options));\n\t};\n\n\treturn $;\n}\n\nexport const $ = create$();\n\nexport function execaCommand(command, options) {\n\tconst [file, ...args] = parseCommand(command);\n\treturn execa(file, args, options);\n}\n\nexport function execaCommandSync(command, options) {\n\tconst [file, ...args] = parseCommand(command);\n\treturn execaSync(file, args, options);\n}\n\nexport function execaNode(scriptPath, args, options = {}) {\n\tif (args && !Array.isArray(args) && typeof args === 'object') {\n\t\toptions = args;\n\t\targs = [];\n\t}\n\n\tconst stdio = normalizeStdioNode(options);\n\tconst defaultExecArgv = process.execArgv.filter(arg => !arg.startsWith('--inspect'));\n\n\tconst {\n\t\tnodePath = process.execPath,\n\t\tnodeOptions = defaultExecArgv,\n\t} = options;\n\n\treturn execa(\n\t\tnodePath,\n\t\t[\n\t\t\t...nodeOptions,\n\t\t\tscriptPath,\n\t\t\t...(Array.isArray(args) ? args : []),\n\t\t],\n\t\t{\n\t\t\t...options,\n\t\t\tstdin: undefined,\n\t\t\tstdout: undefined,\n\t\t\tstderr: undefined,\n\t\t\tstdio,\n\t\t\tshell: false,\n\t\t},\n\t);\n}\n", "export default function stripFinalNewline(input) {\n\tconst LF = typeof input === 'string' ? '\\n' : '\\n'.charCodeAt();\n\tconst CR = typeof input === 'string' ? '\\r' : '\\r'.charCodeAt();\n\n\tif (input[input.length - 1] === LF) {\n\t\tinput = input.slice(0, -1);\n\t}\n\n\tif (input[input.length - 1] === CR) {\n\t\tinput = input.slice(0, -1);\n\t}\n\n\treturn input;\n}\n", "import process from 'node:process';\nimport path from 'node:path';\nimport {fileURLToPath} from 'node:url';\nimport pathKey from 'path-key';\n\nexport const npmRunPath = ({\n\tcwd = process.cwd(),\n\tpath: pathOption = process.env[pathKey()],\n\tpreferLocal = true,\n\texecPath = process.execPath,\n\taddExecPath = true,\n} = {}) => {\n\tconst cwdString = cwd instanceof URL ? fileURLToPath(cwd) : cwd;\n\tconst cwdPath = path.resolve(cwdString);\n\tconst result = [];\n\n\tif (preferLocal) {\n\t\tapplyPreferLocal(result, cwdPath);\n\t}\n\n\tif (addExecPath) {\n\t\tapplyExecPath(result, execPath, cwdPath);\n\t}\n\n\treturn [...result, pathOption].join(path.delimiter);\n};\n\nconst applyPreferLocal = (result, cwdPath) => {\n\tlet previous;\n\n\twhile (previous !== cwdPath) {\n\t\tresult.push(path.join(cwdPath, 'node_modules/.bin'));\n\t\tprevious = cwdPath;\n\t\tcwdPath = path.resolve(cwdPath, '..');\n\t}\n};\n\n// Ensure the running `node` binary is used\nconst applyExecPath = (result, execPath, cwdPath) => {\n\tconst execPathString = execPath instanceof URL ? fileURLToPath(execPath) : execPath;\n\tresult.push(path.resolve(cwdPath, execPathString, '..'));\n};\n\nexport const npmRunPathEnv = ({env = process.env, ...options} = {}) => {\n\tenv = {...env};\n\n\tconst pathName = pathKey({env});\n\toptions.path = env[pathName];\n\tenv[pathName] = npmRunPath(options);\n\n\treturn env;\n};\n", "export default function pathKey(options = {}) {\n\tconst {\n\t\tenv = process.env,\n\t\tplatform = process.platform\n\t} = options;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(env).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n}\n", "import mimicFunction from 'mimic-fn';\n\nconst calledFunctions = new WeakMap();\n\nconst onetime = (function_, options = {}) => {\n\tif (typeof function_ !== 'function') {\n\t\tthrow new TypeError('Expected a function');\n\t}\n\n\tlet returnValue;\n\tlet callCount = 0;\n\tconst functionName = function_.displayName || function_.name || '<anonymous>';\n\n\tconst onetime = function (...arguments_) {\n\t\tcalledFunctions.set(onetime, ++callCount);\n\n\t\tif (callCount === 1) {\n\t\t\treturnValue = function_.apply(this, arguments_);\n\t\t\tfunction_ = null;\n\t\t} else if (options.throw === true) {\n\t\t\tthrow new Error(`Function \\`${functionName}\\` can only be called once`);\n\t\t}\n\n\t\treturn returnValue;\n\t};\n\n\tmimicFunction(onetime, function_);\n\tcalledFunctions.set(onetime, callCount);\n\n\treturn onetime;\n};\n\nonetime.callCount = function_ => {\n\tif (!calledFunctions.has(function_)) {\n\t\tthrow new Error(`The given function \\`${function_.name}\\` is not wrapped by the \\`onetime\\` package`);\n\t}\n\n\treturn calledFunctions.get(function_);\n};\n\nexport default onetime;\n", "const copyProperty = (to, from, property, ignoreNonConfigurable) => {\n\t// `Function#length` should reflect the parameters of `to` not `from` since we keep its body.\n\t// `Function#prototype` is non-writable and non-configurable so can never be modified.\n\tif (property === 'length' || property === 'prototype') {\n\t\treturn;\n\t}\n\n\t// `Function#arguments` and `Function#caller` should not be copied. They were reported to be present in `Reflect.ownKeys` for some devices in React Native (#41), so we explicitly ignore them here.\n\tif (property === 'arguments' || property === 'caller') {\n\t\treturn;\n\t}\n\n\tconst toDescriptor = Object.getOwnPropertyDescriptor(to, property);\n\tconst fromDescriptor = Object.getOwnPropertyDescriptor(from, property);\n\n\tif (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {\n\t\treturn;\n\t}\n\n\tObject.defineProperty(to, property, fromDescriptor);\n};\n\n// `Object.defineProperty()` throws if the property exists, is not configurable and either:\n// - one its descriptors is changed\n// - it is non-writable and its value is changed\nconst canCopyProperty = function (toDescriptor, fromDescriptor) {\n\treturn toDescriptor === undefined || toDescriptor.configurable || (\n\t\ttoDescriptor.writable === fromDescriptor.writable &&\n\t\ttoDescriptor.enumerable === fromDescriptor.enumerable &&\n\t\ttoDescriptor.configurable === fromDescriptor.configurable &&\n\t\t(toDescriptor.writable || toDescriptor.value === fromDescriptor.value)\n\t);\n};\n\nconst changePrototype = (to, from) => {\n\tconst fromPrototype = Object.getPrototypeOf(from);\n\tif (fromPrototype === Object.getPrototypeOf(to)) {\n\t\treturn;\n\t}\n\n\tObject.setPrototypeOf(to, fromPrototype);\n};\n\nconst wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/\\n${fromBody}`;\n\nconst toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, 'toString');\nconst toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, 'name');\n\n// We call `from.toString()` early (not lazily) to ensure `from` can be garbage collected.\n// We use `bind()` instead of a closure for the same reason.\n// Calling `from.toString()` early also allows caching it in case `to.toString()` is called several times.\nconst changeToString = (to, from, name) => {\n\tconst withName = name === '' ? '' : `with ${name.trim()}() `;\n\tconst newToString = wrappedToString.bind(null, withName, from.toString());\n\t// Ensure `to.toString.toString` is non-enumerable and has the same `same`\n\tObject.defineProperty(newToString, 'name', toStringName);\n\tObject.defineProperty(to, 'toString', {...toStringDescriptor, value: newToString});\n};\n\nexport default function mimicFunction(to, from, {ignoreNonConfigurable = false} = {}) {\n\tconst {name} = to;\n\n\tfor (const property of Reflect.ownKeys(from)) {\n\t\tcopyProperty(to, from, property, ignoreNonConfigurable);\n\t}\n\n\tchangePrototype(to, from);\n\tchangeToString(to, from, name);\n\n\treturn to;\n}\n", "import process from 'node:process';\nimport {signalsByName} from 'human-signals';\n\nconst getErrorPrefix = ({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled}) => {\n\tif (timedOut) {\n\t\treturn `timed out after ${timeout} milliseconds`;\n\t}\n\n\tif (isCanceled) {\n\t\treturn 'was canceled';\n\t}\n\n\tif (errorCode !== undefined) {\n\t\treturn `failed with ${errorCode}`;\n\t}\n\n\tif (signal !== undefined) {\n\t\treturn `was killed with ${signal} (${signalDescription})`;\n\t}\n\n\tif (exitCode !== undefined) {\n\t\treturn `failed with exit code ${exitCode}`;\n\t}\n\n\treturn 'failed';\n};\n\nexport const makeError = ({\n\tstdout,\n\tstderr,\n\tall,\n\terror,\n\tsignal,\n\texitCode,\n\tcommand,\n\tescapedCommand,\n\ttimedOut,\n\tisCanceled,\n\tkilled,\n\tparsed: {options: {timeout, cwd = process.cwd()}},\n}) => {\n\t// `signal` and `exitCode` emitted on `spawned.on('exit')` event can be `null`.\n\t// We normalize them to `undefined`\n\texitCode = exitCode === null ? undefined : exitCode;\n\tsignal = signal === null ? undefined : signal;\n\tconst signalDescription = signal === undefined ? undefined : signalsByName[signal].description;\n\n\tconst errorCode = error && error.code;\n\n\tconst prefix = getErrorPrefix({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled});\n\tconst execaMessage = `Command ${prefix}: ${command}`;\n\tconst isError = Object.prototype.toString.call(error) === '[object Error]';\n\tconst shortMessage = isError ? `${execaMessage}\\n${error.message}` : execaMessage;\n\tconst message = [shortMessage, stderr, stdout].filter(Boolean).join('\\n');\n\n\tif (isError) {\n\t\terror.originalMessage = error.message;\n\t\terror.message = message;\n\t} else {\n\t\terror = new Error(message);\n\t}\n\n\terror.shortMessage = shortMessage;\n\terror.command = command;\n\terror.escapedCommand = escapedCommand;\n\terror.exitCode = exitCode;\n\terror.signal = signal;\n\terror.signalDescription = signalDescription;\n\terror.stdout = stdout;\n\terror.stderr = stderr;\n\terror.cwd = cwd;\n\n\tif (all !== undefined) {\n\t\terror.all = all;\n\t}\n\n\tif ('bufferedData' in error) {\n\t\tdelete error.bufferedData;\n\t}\n\n\terror.failed = true;\n\terror.timedOut = Boolean(timedOut);\n\terror.isCanceled = isCanceled;\n\terror.killed = killed && !timedOut;\n\n\treturn error;\n};\n", "import{constants}from\"node:os\";\n\nimport{SIGRTMAX}from\"./realtime.js\";\nimport{getSignals}from\"./signals.js\";\n\n\n\nconst getSignalsByName=()=>{\nconst signals=getSignals();\nreturn Object.fromEntries(signals.map(getSignalByName))\n};\n\nconst getSignalByName=({\nname,\nnumber,\ndescription,\nsupported,\naction,\nforced,\nstandard\n})=>[name,{name,number,description,supported,action,forced,standard}];\n\nexport const signalsByName=getSignalsByName();\n\n\n\n\nconst getSignalsByNumber=()=>{\nconst signals=getSignals();\nconst length=SIGRTMAX+1;\nconst signalsA=Array.from({length},(value,number)=>\ngetSignalByNumber(number,signals)\n);\nreturn Object.assign({},...signalsA)\n};\n\nconst getSignalByNumber=(number,signals)=>{\nconst signal=findSignalByNumber(number,signals);\n\nif(signal===undefined){\nreturn{}\n}\n\nconst{name,description,supported,action,forced,standard}=signal;\nreturn{\n[number]:{\nname,\nnumber,\ndescription,\nsupported,\naction,\nforced,\nstandard\n}\n}\n};\n\n\n\nconst findSignalByNumber=(number,signals)=>{\nconst signal=signals.find(({name})=>constants.signals[name]===number);\n\nif(signal!==undefined){\nreturn signal\n}\n\nreturn signals.find((signalA)=>signalA.number===number)\n};\n\nexport const signalsByNumber=getSignalsByNumber();", "\nexport const getRealtimeSignals=()=>{\nconst length=SIGRTMAX-SIGRTMIN+1;\nreturn Array.from({length},getRealtimeSignal)\n};\n\nconst getRealtimeSignal=(value,index)=>({\nname:`SIGRT${index+1}`,\nnumber:SIGRTMIN+index,\naction:\"terminate\",\ndescription:\"Application-specific signal (realtime)\",\nstandard:\"posix\"\n});\n\nconst SIGRTMIN=34;\nexport const SIGRTMAX=64;", "import{constants}from\"node:os\";\n\nimport{SIGNALS}from\"./core.js\";\nimport{getRealtimeSignals}from\"./realtime.js\";\n\n\n\nexport const getSignals=()=>{\nconst realtimeSignals=getRealtimeSignals();\nconst signals=[...SIGNALS,...realtimeSignals].map(normalizeSignal);\nreturn signals\n};\n\n\n\n\n\n\n\nconst normalizeSignal=({\nname,\nnumber:defaultNumber,\ndescription,\naction,\nforced=false,\nstandard\n})=>{\nconst{\nsignals:{[name]:constantSignal}\n}=constants;\nconst supported=constantSignal!==undefined;\nconst number=supported?constantSignal:defaultNumber;\nreturn{name,number,description,supported,action,forced,standard}\n};", "\n\nexport const SIGNALS=[\n{\nname:\"SIGHUP\",\nnumber:1,\naction:\"terminate\",\ndescription:\"Terminal closed\",\nstandard:\"posix\"\n},\n{\nname:\"SIGINT\",\nnumber:2,\naction:\"terminate\",\ndescription:\"User interruption with CTRL-C\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGQUIT\",\nnumber:3,\naction:\"core\",\ndescription:\"User interruption with CTRL-\\\\\",\nstandard:\"posix\"\n},\n{\nname:\"SIGILL\",\nnumber:4,\naction:\"core\",\ndescription:\"Invalid machine instruction\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGTRAP\",\nnumber:5,\naction:\"core\",\ndescription:\"Debugger breakpoint\",\nstandard:\"posix\"\n},\n{\nname:\"SIGABRT\",\nnumber:6,\naction:\"core\",\ndescription:\"Aborted\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGIOT\",\nnumber:6,\naction:\"core\",\ndescription:\"Aborted\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGBUS\",\nnumber:7,\naction:\"core\",\ndescription:\n\"Bus error due to misaligned, non-existing address or paging error\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGEMT\",\nnumber:7,\naction:\"terminate\",\ndescription:\"Command should be emulated but is not implemented\",\nstandard:\"other\"\n},\n{\nname:\"SIGFPE\",\nnumber:8,\naction:\"core\",\ndescription:\"Floating point arithmetic error\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGKILL\",\nnumber:9,\naction:\"terminate\",\ndescription:\"Forced termination\",\nstandard:\"posix\",\nforced:true\n},\n{\nname:\"SIGUSR1\",\nnumber:10,\naction:\"terminate\",\ndescription:\"Application-specific signal\",\nstandard:\"posix\"\n},\n{\nname:\"SIGSEGV\",\nnumber:11,\naction:\"core\",\ndescription:\"Segmentation fault\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGUSR2\",\nnumber:12,\naction:\"terminate\",\ndescription:\"Application-specific signal\",\nstandard:\"posix\"\n},\n{\nname:\"SIGPIPE\",\nnumber:13,\naction:\"terminate\",\ndescription:\"Broken pipe or socket\",\nstandard:\"posix\"\n},\n{\nname:\"SIGALRM\",\nnumber:14,\naction:\"terminate\",\ndescription:\"Timeout or timer\",\nstandard:\"posix\"\n},\n{\nname:\"SIGTERM\",\nnumber:15,\naction:\"terminate\",\ndescription:\"Termination\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGSTKFLT\",\nnumber:16,\naction:\"terminate\",\ndescription:\"Stack is empty or overflowed\",\nstandard:\"other\"\n},\n{\nname:\"SIGCHLD\",\nnumber:17,\naction:\"ignore\",\ndescription:\"Child process terminated, paused or unpaused\",\nstandard:\"posix\"\n},\n{\nname:\"SIGCLD\",\nnumber:17,\naction:\"ignore\",\ndescription:\"Child process terminated, paused or unpaused\",\nstandard:\"other\"\n},\n{\nname:\"SIGCONT\",\nnumber:18,\naction:\"unpause\",\ndescription:\"Unpaused\",\nstandard:\"posix\",\nforced:true\n},\n{\nname:\"SIGSTOP\",\nnumber:19,\naction:\"pause\",\ndescription:\"Paused\",\nstandard:\"posix\",\nforced:true\n},\n{\nname:\"SIGTSTP\",\nnumber:20,\naction:\"pause\",\ndescription:\"Paused using CTRL-Z or \\\"suspend\\\"\",\nstandard:\"posix\"\n},\n{\nname:\"SIGTTIN\",\nnumber:21,\naction:\"pause\",\ndescription:\"Background process cannot read terminal input\",\nstandard:\"posix\"\n},\n{\nname:\"SIGBREAK\",\nnumber:21,\naction:\"terminate\",\ndescription:\"User interruption with CTRL-BREAK\",\nstandard:\"other\"\n},\n{\nname:\"SIGTTOU\",\nnumber:22,\naction:\"pause\",\ndescription:\"Background process cannot write to terminal output\",\nstandard:\"posix\"\n},\n{\nname:\"SIGURG\",\nnumber:23,\naction:\"ignore\",\ndescription:\"Socket received out-of-band data\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGXCPU\",\nnumber:24,\naction:\"core\",\ndescription:\"Process timed out\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGXFSZ\",\nnumber:25,\naction:\"core\",\ndescription:\"File too big\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGVTALRM\",\nnumber:26,\naction:\"terminate\",\ndescription:\"Timeout or timer\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGPROF\",\nnumber:27,\naction:\"terminate\",\ndescription:\"Timeout or timer\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGWINCH\",\nnumber:28,\naction:\"ignore\",\ndescription:\"Terminal window size changed\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGIO\",\nnumber:29,\naction:\"terminate\",\ndescription:\"I/O is available\",\nstandard:\"other\"\n},\n{\nname:\"SIGPOLL\",\nnumber:29,\naction:\"terminate\",\ndescription:\"Watched event\",\nstandard:\"other\"\n},\n{\nname:\"SIGINFO\",\nnumber:29,\naction:\"ignore\",\ndescription:\"Request for process information\",\nstandard:\"other\"\n},\n{\nname:\"SIGPWR\",\nnumber:30,\naction:\"terminate\",\ndescription:\"Device running out of power\",\nstandard:\"systemv\"\n},\n{\nname:\"SIGSYS\",\nnumber:31,\naction:\"core\",\ndescription:\"Invalid system call\",\nstandard:\"other\"\n},\n{\nname:\"SIGUNUSED\",\nnumber:31,\naction:\"terminate\",\ndescription:\"Invalid system call\",\nstandard:\"other\"\n}];", "const aliases = ['stdin', 'stdout', 'stderr'];\n\nconst hasAlias = options => aliases.some(alias => options[alias] !== undefined);\n\nexport const normalizeStdio = options => {\n\tif (!options) {\n\t\treturn;\n\t}\n\n\tconst {stdio} = options;\n\n\tif (stdio === undefined) {\n\t\treturn aliases.map(alias => options[alias]);\n\t}\n\n\tif (hasAlias(options)) {\n\t\tthrow new Error(`It's not possible to provide \\`stdio\\` in combination with one of ${aliases.map(alias => `\\`${alias}\\``).join(', ')}`);\n\t}\n\n\tif (typeof stdio === 'string') {\n\t\treturn stdio;\n\t}\n\n\tif (!Array.isArray(stdio)) {\n\t\tthrow new TypeError(`Expected \\`stdio\\` to be of type \\`string\\` or \\`Array\\`, got \\`${typeof stdio}\\``);\n\t}\n\n\tconst length = Math.max(stdio.length, aliases.length);\n\treturn Array.from({length}, (value, index) => stdio[index]);\n};\n\n// `ipc` is pushed unless it is already present\nexport const normalizeStdioNode = options => {\n\tconst stdio = normalizeStdio(options);\n\n\tif (stdio === 'ipc') {\n\t\treturn 'ipc';\n\t}\n\n\tif (stdio === undefined || typeof stdio === 'string') {\n\t\treturn [stdio, stdio, stdio, 'ipc'];\n\t}\n\n\tif (stdio.includes('ipc')) {\n\t\treturn stdio;\n\t}\n\n\treturn [...stdio, 'ipc'];\n};\n", "import os from 'node:os';\nimport {onExit} from 'signal-exit';\n\nconst DEFAULT_FORCE_KILL_TIMEOUT = 1000 * 5;\n\n// Monkey-patches `childProcess.kill()` to add `forceKillAfterTimeout` behavior\nexport const spawnedKill = (kill, signal = 'SIGTERM', options = {}) => {\n\tconst killResult = kill(signal);\n\tsetKillTimeout(kill, signal, options, killResult);\n\treturn killResult;\n};\n\nconst setKillTimeout = (kill, signal, options, killResult) => {\n\tif (!shouldForceKill(signal, options, killResult)) {\n\t\treturn;\n\t}\n\n\tconst timeout = getForceKillAfterTimeout(options);\n\tconst t = setTimeout(() => {\n\t\tkill('SIGKILL');\n\t}, timeout);\n\n\t// Guarded because there's no `.unref()` when `execa` is used in the renderer\n\t// process in Electron. This cannot be tested since we don't run tests in\n\t// Electron.\n\t// istanbul ignore else\n\tif (t.unref) {\n\t\tt.unref();\n\t}\n};\n\nconst shouldForceKill = (signal, {forceKillAfterTimeout}, killResult) => isSigterm(signal) && forceKillAfterTimeout !== false && killResult;\n\nconst isSigterm = signal => signal === os.constants.signals.SIGTERM\n\t\t|| (typeof signal === 'string' && signal.toUpperCase() === 'SIGTERM');\n\nconst getForceKillAfterTimeout = ({forceKillAfterTimeout = true}) => {\n\tif (forceKillAfterTimeout === true) {\n\t\treturn DEFAULT_FORCE_KILL_TIMEOUT;\n\t}\n\n\tif (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) {\n\t\tthrow new TypeError(`Expected the \\`forceKillAfterTimeout\\` option to be a non-negative integer, got \\`${forceKillAfterTimeout}\\` (${typeof forceKillAfterTimeout})`);\n\t}\n\n\treturn forceKillAfterTimeout;\n};\n\n// `childProcess.cancel()`\nexport const spawnedCancel = (spawned, context) => {\n\tconst killResult = spawned.kill();\n\n\tif (killResult) {\n\t\tcontext.isCanceled = true;\n\t}\n};\n\nconst timeoutKill = (spawned, signal, reject) => {\n\tspawned.kill(signal);\n\treject(Object.assign(new Error('Timed out'), {timedOut: true, signal}));\n};\n\n// `timeout` option handling\nexport const setupTimeout = (spawned, {timeout, killSignal = 'SIGTERM'}, spawnedPromise) => {\n\tif (timeout === 0 || timeout === undefined) {\n\t\treturn spawnedPromise;\n\t}\n\n\tlet timeoutId;\n\tconst timeoutPromise = new Promise((resolve, reject) => {\n\t\ttimeoutId = setTimeout(() => {\n\t\t\ttimeoutKill(spawned, killSignal, reject);\n\t\t}, timeout);\n\t});\n\n\tconst safeSpawnedPromise = spawnedPromise.finally(() => {\n\t\tclearTimeout(timeoutId);\n\t});\n\n\treturn Promise.race([timeoutPromise, safeSpawnedPromise]);\n};\n\nexport const validateTimeout = ({timeout}) => {\n\tif (timeout !== undefined && (!Number.isFinite(timeout) || timeout < 0)) {\n\t\tthrow new TypeError(`Expected the \\`timeout\\` option to be a non-negative integer, got \\`${timeout}\\` (${typeof timeout})`);\n\t}\n};\n\n// `cleanup` option handling\nexport const setExitHandler = async (spawned, {cleanup, detached}, timedPromise) => {\n\tif (!cleanup || detached) {\n\t\treturn timedPromise;\n\t}\n\n\tconst removeExitHandler = onExit(() => {\n\t\tspawned.kill();\n\t});\n\n\treturn timedPromise.finally(() => {\n\t\tremoveExitHandler();\n\t});\n};\n", "import {createWriteStream} from 'node:fs';\nimport {ChildProcess} from 'node:child_process';\nimport {isWritableStream} from 'is-stream';\n\nconst isExecaChildProcess = target => target instanceof ChildProcess && typeof target.then === 'function';\n\nconst pipeToTarget = (spawned, streamName, target) => {\n\tif (typeof target === 'string') {\n\t\tspawned[streamName].pipe(createWriteStream(target));\n\t\treturn spawned;\n\t}\n\n\tif (isWritableStream(target)) {\n\t\tspawned[streamName].pipe(target);\n\t\treturn spawned;\n\t}\n\n\tif (!isExecaChildProcess(target)) {\n\t\tthrow new TypeError('The second argument must be a string, a stream or an Execa child process.');\n\t}\n\n\tif (!isWritableStream(target.stdin)) {\n\t\tthrow new TypeError('The target child process\\'s stdin must be available.');\n\t}\n\n\tspawned[streamName].pipe(target.stdin);\n\treturn target;\n};\n\nexport const addPipeMethods = spawned => {\n\tif (spawned.stdout !== null) {\n\t\tspawned.pipeStdout = pipeToTarget.bind(undefined, spawned, 'stdout');\n\t}\n\n\tif (spawned.stderr !== null) {\n\t\tspawned.pipeStderr = pipeToTarget.bind(undefined, spawned, 'stderr');\n\t}\n\n\tif (spawned.all !== undefined) {\n\t\tspawned.pipeAll = pipeToTarget.bind(undefined, spawned, 'all');\n\t}\n};\n", "export function isStream(stream) {\n\treturn stream !== null\n\t\t&& typeof stream === 'object'\n\t\t&& typeof stream.pipe === 'function';\n}\n\nexport function isWritableStream(stream) {\n\treturn isStream(stream)\n\t\t&& stream.writable !== false\n\t\t&& typeof stream._write === 'function'\n\t\t&& typeof stream._writableState === 'object';\n}\n\nexport function isReadableStream(stream) {\n\treturn isStream(stream)\n\t\t&& stream.readable !== false\n\t\t&& typeof stream._read === 'function'\n\t\t&& typeof stream._readableState === 'object';\n}\n\nexport function isDuplexStream(stream) {\n\treturn isWritableStream(stream)\n\t\t&& isReadableStream(stream);\n}\n\nexport function isTransformStream(stream) {\n\treturn isDuplexStream(stream)\n\t\t&& typeof stream._transform === 'function';\n}\n", "import {createReadStream, readFileSync} from 'node:fs';\nimport {setTimeout} from 'node:timers/promises';\nimport {isStream} from 'is-stream';\nimport getStream, {getStreamAsBuffer} from 'get-stream';\nimport mergeStream from 'merge-stream';\n\nconst validateInputOptions = input => {\n\tif (input !== undefined) {\n\t\tthrow new TypeError('The `input` and `inputFile` options cannot be both set.');\n\t}\n};\n\nconst getInputSync = ({input, inputFile}) => {\n\tif (typeof inputFile !== 'string') {\n\t\treturn input;\n\t}\n\n\tvalidateInputOptions(input);\n\treturn readFileSync(inputFile);\n};\n\n// `input` and `inputFile` option in sync mode\nexport const handleInputSync = options => {\n\tconst input = getInputSync(options);\n\n\tif (isStream(input)) {\n\t\tthrow new TypeError('The `input` option cannot be a stream in sync mode');\n\t}\n\n\treturn input;\n};\n\nconst getInput = ({input, inputFile}) => {\n\tif (typeof inputFile !== 'string') {\n\t\treturn input;\n\t}\n\n\tvalidateInputOptions(input);\n\treturn createReadStream(inputFile);\n};\n\n// `input` and `inputFile` option in async mode\nexport const handleInput = (spawned, options) => {\n\tconst input = getInput(options);\n\n\tif (input === undefined) {\n\t\treturn;\n\t}\n\n\tif (isStream(input)) {\n\t\tinput.pipe(spawned.stdin);\n\t} else {\n\t\tspawned.stdin.end(input);\n\t}\n};\n\n// `all` interleaves `stdout` and `stderr`\nexport const makeAllStream = (spawned, {all}) => {\n\tif (!all || (!spawned.stdout && !spawned.stderr)) {\n\t\treturn;\n\t}\n\n\tconst mixed = mergeStream();\n\n\tif (spawned.stdout) {\n\t\tmixed.add(spawned.stdout);\n\t}\n\n\tif (spawned.stderr) {\n\t\tmixed.add(spawned.stderr);\n\t}\n\n\treturn mixed;\n};\n\n// On failure, `result.stdout|stderr|all` should contain the currently buffered stream\nconst getBufferedData = async (stream, streamPromise) => {\n\t// When `buffer` is `false`, `streamPromise` is `undefined` and there is no buffered data to retrieve\n\tif (!stream || streamPromise === undefined) {\n\t\treturn;\n\t}\n\n\t// Wait for the `all` stream to receive the last chunk before destroying the stream\n\tawait setTimeout(0);\n\n\tstream.destroy();\n\n\ttry {\n\t\treturn await streamPromise;\n\t} catch (error) {\n\t\treturn error.bufferedData;\n\t}\n};\n\nconst getStreamPromise = (stream, {encoding, buffer, maxBuffer}) => {\n\tif (!stream || !buffer) {\n\t\treturn;\n\t}\n\n\t// eslint-disable-next-line unicorn/text-encoding-identifier-case\n\tif (encoding === 'utf8' || encoding === 'utf-8') {\n\t\treturn getStream(stream, {maxBuffer});\n\t}\n\n\tif (encoding === null || encoding === 'buffer') {\n\t\treturn getStreamAsBuffer(stream, {maxBuffer});\n\t}\n\n\treturn applyEncoding(stream, maxBuffer, encoding);\n};\n\nconst applyEncoding = async (stream, maxBuffer, encoding) => {\n\tconst buffer = await getStreamAsBuffer(stream, {maxBuffer});\n\treturn buffer.toString(encoding);\n};\n\n// Retrieve result of child process: exit code, signal, error, streams (stdout/stderr/all)\nexport const getSpawnedResult = async ({stdout, stderr, all}, {encoding, buffer, maxBuffer}, processDone) => {\n\tconst stdoutPromise = getStreamPromise(stdout, {encoding, buffer, maxBuffer});\n\tconst stderrPromise = getStreamPromise(stderr, {encoding, buffer, maxBuffer});\n\tconst allPromise = getStreamPromise(all, {encoding, buffer, maxBuffer: maxBuffer * 2});\n\n\ttry {\n\t\treturn await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]);\n\t} catch (error) {\n\t\treturn Promise.all([\n\t\t\t{error, signal: error.signal, timedOut: error.timedOut},\n\t\t\tgetBufferedData(stdout, stdoutPromise),\n\t\t\tgetBufferedData(stderr, stderrPromise),\n\t\t\tgetBufferedData(all, allPromise),\n\t\t]);\n\t}\n};\n", "export {getStreamAsArray} from './array.js';\nexport {getStreamAsArrayBuffer} from './array-buffer.js';\nexport {getStreamAsBuffer} from './buffer.js';\nexport {getStreamAsString as default} from './string.js';\nexport {MaxBufferError} from './contents.js';\n", "import {getStreamContents} from './contents.js';\nimport {identity, noop, getContentsProp} from './utils.js';\n\nexport async function getStreamAsArray(stream, options) {\n\treturn getStreamContents(stream, arrayMethods, options);\n}\n\nconst initArray = () => ({contents: []});\n\nconst increment = () => 1;\n\nconst addArrayChunk = (convertedChunk, {contents}) => {\n\tcontents.push(convertedChunk);\n\treturn contents;\n};\n\nconst arrayMethods = {\n\tinit: initArray,\n\tconvertChunk: {\n\t\tstring: identity,\n\t\tbuffer: identity,\n\t\tarrayBuffer: identity,\n\t\tdataView: identity,\n\t\ttypedArray: identity,\n\t\tothers: identity,\n\t},\n\tgetSize: increment,\n\ttruncateChunk: noop,\n\taddChunk: addArrayChunk,\n\tgetFinalChunk: noop,\n\tfinalize: getContentsProp,\n};\n", "export const getStreamContents = async (stream, {init, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, finalize}, {maxBuffer = Number.POSITIVE_INFINITY} = {}) => {\n\tif (!isAsyncIterable(stream)) {\n\t\tthrow new Error('The first argument must be a Readable, a ReadableStream, or an async iterable.');\n\t}\n\n\tconst state = init();\n\tstate.length = 0;\n\n\ttry {\n\t\tfor await (const chunk of stream) {\n\t\t\tconst chunkType = getChunkType(chunk);\n\t\t\tconst convertedChunk = convertChunk[chunkType](chunk, state);\n\t\t\tappendChunk({convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer});\n\t\t}\n\n\t\tappendFinalChunk({state, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, maxBuffer});\n\t\treturn finalize(state);\n\t} catch (error) {\n\t\terror.bufferedData = finalize(state);\n\t\tthrow error;\n\t}\n};\n\nconst appendFinalChunk = ({state, getSize, truncateChunk, addChunk, getFinalChunk, maxBuffer}) => {\n\tconst convertedChunk = getFinalChunk(state);\n\tif (convertedChunk !== undefined) {\n\t\tappendChunk({convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer});\n\t}\n};\n\nconst appendChunk = ({convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer}) => {\n\tconst chunkSize = getSize(convertedChunk);\n\tconst newLength = state.length + chunkSize;\n\n\tif (newLength <= maxBuffer) {\n\t\taddNewChunk(convertedChunk, state, addChunk, newLength);\n\t\treturn;\n\t}\n\n\tconst truncatedChunk = truncateChunk(convertedChunk, maxBuffer - state.length);\n\n\tif (truncatedChunk !== undefined) {\n\t\taddNewChunk(truncatedChunk, state, addChunk, maxBuffer);\n\t}\n\n\tthrow new MaxBufferError();\n};\n\nconst addNewChunk = (convertedChunk, state, addChunk, newLength) => {\n\tstate.contents = addChunk(convertedChunk, state, newLength);\n\tstate.length = newLength;\n};\n\nconst isAsyncIterable = stream => typeof stream === 'object' && stream !== null && typeof stream[Symbol.asyncIterator] === 'function';\n\nconst getChunkType = chunk => {\n\tconst typeOfChunk = typeof chunk;\n\n\tif (typeOfChunk === 'string') {\n\t\treturn 'string';\n\t}\n\n\tif (typeOfChunk !== 'object' || chunk === null) {\n\t\treturn 'others';\n\t}\n\n\t// eslint-disable-next-line n/prefer-global/buffer\n\tif (globalThis.Buffer?.isBuffer(chunk)) {\n\t\treturn 'buffer';\n\t}\n\n\tconst prototypeName = objectToString.call(chunk);\n\n\tif (prototypeName === '[object ArrayBuffer]') {\n\t\treturn 'arrayBuffer';\n\t}\n\n\tif (prototypeName === '[object DataView]') {\n\t\treturn 'dataView';\n\t}\n\n\tif (\n\t\tNumber.isInteger(chunk.byteLength)\n\t\t&& Number.isInteger(chunk.byteOffset)\n\t\t&& objectToString.call(chunk.buffer) === '[object ArrayBuffer]'\n\t) {\n\t\treturn 'typedArray';\n\t}\n\n\treturn 'others';\n};\n\nconst {toString: objectToString} = Object.prototype;\n\nexport class MaxBufferError extends Error {\n\tname = 'MaxBufferError';\n\n\tconstructor() {\n\t\tsuper('maxBuffer exceeded');\n\t}\n}\n", "export const identity = value => value;\n\nexport const noop = () => undefined;\n\nexport const getContentsProp = ({contents}) => contents;\n\nexport const throwObjectStream = chunk => {\n\tthrow new Error(`Streams in object mode are not supported: ${String(chunk)}`);\n};\n\nexport const getLengthProp = convertedChunk => convertedChunk.length;\n", "import {getStreamContents} from './contents.js';\nimport {noop, throwObjectStream, getLengthProp} from './utils.js';\n\nexport async function getStreamAsArrayBuffer(stream, options) {\n\treturn getStreamContents(stream, arrayBufferMethods, options);\n}\n\nconst initArrayBuffer = () => ({contents: new ArrayBuffer(0)});\n\nconst useTextEncoder = chunk => textEncoder.encode(chunk);\nconst textEncoder = new TextEncoder();\n\nconst useUint8Array = chunk => new Uint8Array(chunk);\n\nconst useUint8ArrayWithOffset = chunk => new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength);\n\nconst truncateArrayBufferChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize);\n\n// `contents` is an increasingly growing `Uint8Array`.\nconst addArrayBufferChunk = (convertedChunk, {contents, length: previousLength}, length) => {\n\tconst newContents = hasArrayBufferResize() ? resizeArrayBuffer(contents, length) : resizeArrayBufferSlow(contents, length);\n\tnew Uint8Array(newContents).set(convertedChunk, previousLength);\n\treturn newContents;\n};\n\n// Without `ArrayBuffer.resize()`, `contents` size is always a power of 2.\n// This means its last bytes are zeroes (not stream data), which need to be\n// trimmed at the end with `ArrayBuffer.slice()`.\nconst resizeArrayBufferSlow = (contents, length) => {\n\tif (length <= contents.byteLength) {\n\t\treturn contents;\n\t}\n\n\tconst arrayBuffer = new ArrayBuffer(getNewContentsLength(length));\n\tnew Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0);\n\treturn arrayBuffer;\n};\n\n// With `ArrayBuffer.resize()`, `contents` size matches exactly the size of\n// the stream data. It does not include extraneous zeroes to trim at the end.\n// The underlying `ArrayBuffer` does allocate a number of bytes that is a power\n// of 2, but those bytes are only visible after calling `ArrayBuffer.resize()`.\nconst resizeArrayBuffer = (contents, length) => {\n\tif (length <= contents.maxByteLength) {\n\t\tcontents.resize(length);\n\t\treturn contents;\n\t}\n\n\tconst arrayBuffer = new ArrayBuffer(length, {maxByteLength: getNewContentsLength(length)});\n\tnew Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0);\n\treturn arrayBuffer;\n};\n\n// Retrieve the closest `length` that is both >= and a power of 2\nconst getNewContentsLength = length => SCALE_FACTOR ** Math.ceil(Math.log(length) / Math.log(SCALE_FACTOR));\n\nconst SCALE_FACTOR = 2;\n\nconst finalizeArrayBuffer = ({contents, length}) => hasArrayBufferResize() ? contents : contents.slice(0, length);\n\n// `ArrayBuffer.slice()` is slow. When `ArrayBuffer.resize()` is available\n// (Node >=20.0.0, Safari >=16.4 and Chrome), we can use it instead.\n// eslint-disable-next-line no-warning-comments\n// TODO: remove after dropping support for Node 20.\n// eslint-disable-next-line no-warning-comments\n// TODO: use `ArrayBuffer.transferToFixedLength()` instead once it is available\nconst hasArrayBufferResize = () => 'resize' in ArrayBuffer.prototype;\n\nconst arrayBufferMethods = {\n\tinit: initArrayBuffer,\n\tconvertChunk: {\n\t\tstring: useTextEncoder,\n\t\tbuffer: useUint8Array,\n\t\tarrayBuffer: useUint8Array,\n\t\tdataView: useUint8ArrayWithOffset,\n\t\ttypedArray: useUint8ArrayWithOffset,\n\t\tothers: throwObjectStream,\n\t},\n\tgetSize: getLengthProp,\n\ttruncateChunk: truncateArrayBufferChunk,\n\taddChunk: addArrayBufferChunk,\n\tgetFinalChunk: noop,\n\tfinalize: finalizeArrayBuffer,\n};\n", "import {getStreamAsArrayBuffer} from './array-buffer.js';\n\nexport async function getStreamAsBuffer(stream, options) {\n\tif (!('Buffer' in globalThis)) {\n\t\tthrow new Error('getStreamAsBuffer() is only supported in Node.js');\n\t}\n\n\ttry {\n\t\treturn arrayBufferToNodeBuffer(await getStreamAsArrayBuffer(stream, options));\n\t} catch (error) {\n\t\tif (error.bufferedData !== undefined) {\n\t\t\terror.bufferedData = arrayBufferToNodeBuffer(error.bufferedData);\n\t\t}\n\n\t\tthrow error;\n\t}\n}\n\n// eslint-disable-next-line n/prefer-global/buffer\nconst arrayBufferToNodeBuffer = arrayBuffer => globalThis.Buffer.from(arrayBuffer);\n", "import {getStreamContents} from './contents.js';\nimport {identity, getContentsProp, throwObjectStream, getLengthProp} from './utils.js';\n\nexport async function getStreamAsString(stream, options) {\n\treturn getStreamContents(stream, stringMethods, options);\n}\n\nconst initString = () => ({contents: '', textDecoder: new TextDecoder()});\n\nconst useTextDecoder = (chunk, {textDecoder}) => textDecoder.decode(chunk, {stream: true});\n\nconst addStringChunk = (convertedChunk, {contents}) => contents + convertedChunk;\n\nconst truncateStringChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize);\n\nconst getFinalStringChunk = ({textDecoder}) => {\n\tconst finalChunk = textDecoder.decode();\n\treturn finalChunk === '' ? undefined : finalChunk;\n};\n\nconst stringMethods = {\n\tinit: initString,\n\tconvertChunk: {\n\t\tstring: identity,\n\t\tbuffer: useTextDecoder,\n\t\tarrayBuffer: useTextDecoder,\n\t\tdataView: useTextDecoder,\n\t\ttypedArray: useTextDecoder,\n\t\tothers: throwObjectStream,\n\t},\n\tgetSize: getLengthProp,\n\ttruncateChunk: truncateStringChunk,\n\taddChunk: addStringChunk,\n\tgetFinalChunk: getFinalStringChunk,\n\tfinalize: getContentsProp,\n};\n", "// eslint-disable-next-line unicorn/prefer-top-level-await\nconst nativePromisePrototype = (async () => {})().constructor.prototype;\n\nconst descriptors = ['then', 'catch', 'finally'].map(property => [\n\tproperty,\n\tReflect.getOwnPropertyDescriptor(nativePromisePrototype, property),\n]);\n\n// The return value is a mixin of `childProcess` and `Promise`\nexport const mergePromise = (spawned, promise) => {\n\tfor (const [property, descriptor] of descriptors) {\n\t\t// Starting the main `promise` is deferred to avoid consuming streams\n\t\tconst value = typeof promise === 'function'\n\t\t\t? (...args) => Reflect.apply(descriptor.value, promise(), args)\n\t\t\t: descriptor.value.bind(promise);\n\n\t\tReflect.defineProperty(spawned, property, {...descriptor, value});\n\t}\n};\n\n// Use promises instead of `child_process` events\nexport const getSpawnedPromise = spawned => new Promise((resolve, reject) => {\n\tspawned.on('exit', (exitCode, signal) => {\n\t\tresolve({exitCode, signal});\n\t});\n\n\tspawned.on('error', error => {\n\t\treject(error);\n\t});\n\n\tif (spawned.stdin) {\n\t\tspawned.stdin.on('error', error => {\n\t\t\treject(error);\n\t\t});\n\t}\n});\n", "import {Buffer} from 'node:buffer';\nimport {ChildProcess} from 'node:child_process';\n\nconst normalizeArgs = (file, args = []) => {\n\tif (!Array.isArray(args)) {\n\t\treturn [file];\n\t}\n\n\treturn [file, ...args];\n};\n\nconst NO_ESCAPE_REGEXP = /^[\\w.-]+$/;\n\nconst escapeArg = arg => {\n\tif (typeof arg !== 'string' || NO_ESCAPE_REGEXP.test(arg)) {\n\t\treturn arg;\n\t}\n\n\treturn `\"${arg.replaceAll('\"', '\\\\\"')}\"`;\n};\n\nexport const joinCommand = (file, args) => normalizeArgs(file, args).join(' ');\n\nexport const getEscapedCommand = (file, args) => normalizeArgs(file, args).map(arg => escapeArg(arg)).join(' ');\n\nconst SPACES_REGEXP = / +/g;\n\n// Handle `execaCommand()`\nexport const parseCommand = command => {\n\tconst tokens = [];\n\tfor (const token of command.trim().split(SPACES_REGEXP)) {\n\t\t// Allow spaces to be escaped by a backslash if not meant as a delimiter\n\t\tconst previousToken = tokens.at(-1);\n\t\tif (previousToken && previousToken.endsWith('\\\\')) {\n\t\t\t// Merge previous token with current one\n\t\t\ttokens[tokens.length - 1] = `${previousToken.slice(0, -1)} ${token}`;\n\t\t} else {\n\t\t\ttokens.push(token);\n\t\t}\n\t}\n\n\treturn tokens;\n};\n\nconst parseExpression = expression => {\n\tconst typeOfExpression = typeof expression;\n\n\tif (typeOfExpression === 'string') {\n\t\treturn expression;\n\t}\n\n\tif (typeOfExpression === 'number') {\n\t\treturn String(expression);\n\t}\n\n\tif (\n\t\ttypeOfExpression === 'object'\n\t\t&& expression !== null\n\t\t&& !(expression instanceof ChildProcess)\n\t\t&& 'stdout' in expression\n\t) {\n\t\tconst typeOfStdout = typeof expression.stdout;\n\n\t\tif (typeOfStdout === 'string') {\n\t\t\treturn expression.stdout;\n\t\t}\n\n\t\tif (Buffer.isBuffer(expression.stdout)) {\n\t\t\treturn expression.stdout.toString();\n\t\t}\n\n\t\tthrow new TypeError(`Unexpected \"${typeOfStdout}\" stdout in template expression`);\n\t}\n\n\tthrow new TypeError(`Unexpected \"${typeOfExpression}\" in template expression`);\n};\n\nconst concatTokens = (tokens, nextTokens, isNew) => isNew || tokens.length === 0 || nextTokens.length === 0\n\t? [...tokens, ...nextTokens]\n\t: [\n\t\t...tokens.slice(0, -1),\n\t\t`${tokens.at(-1)}${nextTokens[0]}`,\n\t\t...nextTokens.slice(1),\n\t];\n\nconst parseTemplate = ({templates, expressions, tokens, index, template}) => {\n\tconst templateString = template ?? templates.raw[index];\n\tconst templateTokens = templateString.split(SPACES_REGEXP).filter(Boolean);\n\tconst newTokens = concatTokens(\n\t\ttokens,\n\t\ttemplateTokens,\n\t\ttemplateString.startsWith(' '),\n\t);\n\n\tif (index === expressions.length) {\n\t\treturn newTokens;\n\t}\n\n\tconst expression = expressions[index];\n\tconst expressionTokens = Array.isArray(expression)\n\t\t? expression.map(expression => parseExpression(expression))\n\t\t: [parseExpression(expression)];\n\treturn concatTokens(\n\t\tnewTokens,\n\t\texpressionTokens,\n\t\ttemplateString.endsWith(' '),\n\t);\n};\n\nexport const parseTemplates = (templates, expressions) => {\n\tlet tokens = [];\n\n\tfor (const [index, template] of templates.entries()) {\n\t\ttokens = parseTemplate({templates, expressions, tokens, index, template});\n\t}\n\n\treturn tokens;\n};\n\n", "import {debuglog} from 'node:util';\nimport process from 'node:process';\n\nexport const verboseDefault = debuglog('execa').enabled;\n\nconst padField = (field, padding) => String(field).padStart(padding, '0');\n\nconst getTimestamp = () => {\n\tconst date = new Date();\n\treturn `${padField(date.getHours(), 2)}:${padField(date.getMinutes(), 2)}:${padField(date.getSeconds(), 2)}.${padField(date.getMilliseconds(), 3)}`;\n};\n\nexport const logCommand = (escapedCommand, {verbose}) => {\n\tif (!verbose) {\n\t\treturn;\n\t}\n\n\tprocess.stderr.write(`[${getTimestamp()}] ${escapedCommand}\\n`);\n};\n", "export default async function pMap(\n\titerable,\n\tmapper,\n\t{\n\t\tconcurrency = Number.POSITIVE_INFINITY,\n\t\tstopOnError = true,\n\t\tsignal,\n\t} = {},\n) {\n\treturn new Promise((resolve_, reject_) => {\n\t\tif (iterable[Symbol.iterator] === undefined && iterable[Symbol.asyncIterator] === undefined) {\n\t\t\tthrow new TypeError(`Expected \\`input\\` to be either an \\`Iterable\\` or \\`AsyncIterable\\`, got (${typeof iterable})`);\n\t\t}\n\n\t\tif (typeof mapper !== 'function') {\n\t\t\tthrow new TypeError('Mapper function is required');\n\t\t}\n\n\t\tif (!((Number.isSafeInteger(concurrency) && concurrency >= 1) || concurrency === Number.POSITIVE_INFINITY)) {\n\t\t\tthrow new TypeError(`Expected \\`concurrency\\` to be an integer from 1 and up or \\`Infinity\\`, got \\`${concurrency}\\` (${typeof concurrency})`);\n\t\t}\n\n\t\tconst result = [];\n\t\tconst errors = [];\n\t\tconst skippedIndexesMap = new Map();\n\t\tlet isRejected = false;\n\t\tlet isResolved = false;\n\t\tlet isIterableDone = false;\n\t\tlet resolvingCount = 0;\n\t\tlet currentIndex = 0;\n\t\tconst iterator = iterable[Symbol.iterator] === undefined ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();\n\n\t\tconst signalListener = () => {\n\t\t\treject(signal.reason);\n\t\t};\n\n\t\tconst cleanup = () => {\n\t\t\tsignal?.removeEventListener('abort', signalListener);\n\t\t};\n\n\t\tconst resolve = value => {\n\t\t\tresolve_(value);\n\t\t\tcleanup();\n\t\t};\n\n\t\tconst reject = reason => {\n\t\t\tisRejected = true;\n\t\t\tisResolved = true;\n\t\t\treject_(reason);\n\t\t\tcleanup();\n\t\t};\n\n\t\tif (signal) {\n\t\t\tif (signal.aborted) {\n\t\t\t\treject(signal.reason);\n\t\t\t}\n\n\t\t\tsignal.addEventListener('abort', signalListener, {once: true});\n\t\t}\n\n\t\tconst next = async () => {\n\t\t\tif (isResolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst nextItem = await iterator.next();\n\n\t\t\tconst index = currentIndex;\n\t\t\tcurrentIndex++;\n\n\t\t\t// Note: `iterator.next()` can be called many times in parallel.\n\t\t\t// This can cause multiple calls to this `next()` function to\n\t\t\t// receive a `nextItem` with `done === true`.\n\t\t\t// The shutdown logic that rejects/resolves must be protected\n\t\t\t// so it runs only one time as the `skippedIndex` logic is\n\t\t\t// non-idempotent.\n\t\t\tif (nextItem.done) {\n\t\t\t\tisIterableDone = true;\n\n\t\t\t\tif (resolvingCount === 0 && !isResolved) {\n\t\t\t\t\tif (!stopOnError && errors.length > 0) {\n\t\t\t\t\t\treject(new AggregateError(errors)); // eslint-disable-line unicorn/error-message\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tisResolved = true;\n\n\t\t\t\t\tif (skippedIndexesMap.size === 0) {\n\t\t\t\t\t\tresolve(result);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst pureResult = [];\n\n\t\t\t\t\t// Support multiple `pMapSkip`'s.\n\t\t\t\t\tfor (const [index, value] of result.entries()) {\n\t\t\t\t\t\tif (skippedIndexesMap.get(index) === pMapSkip) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpureResult.push(value);\n\t\t\t\t\t}\n\n\t\t\t\t\tresolve(pureResult);\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tresolvingCount++;\n\n\t\t\t// Intentionally detached\n\t\t\t(async () => {\n\t\t\t\ttry {\n\t\t\t\t\tconst element = await nextItem.value;\n\n\t\t\t\t\tif (isResolved) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst value = await mapper(element, index);\n\n\t\t\t\t\t// Use Map to stage the index of the element.\n\t\t\t\t\tif (value === pMapSkip) {\n\t\t\t\t\t\tskippedIndexesMap.set(index, value);\n\t\t\t\t\t}\n\n\t\t\t\t\tresult[index] = value;\n\n\t\t\t\t\tresolvingCount--;\n\t\t\t\t\tawait next();\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (stopOnError) {\n\t\t\t\t\t\treject(error);\n\t\t\t\t\t} else {\n\t\t\t\t\t\terrors.push(error);\n\t\t\t\t\t\tresolvingCount--;\n\n\t\t\t\t\t\t// In that case we can't really continue regardless of `stopOnError` state\n\t\t\t\t\t\t// since an iterable is likely to continue throwing after it throws once.\n\t\t\t\t\t\t// If we continue calling `next()` indefinitely we will likely end up\n\t\t\t\t\t\t// in an infinite loop of failed iteration.\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait next();\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\treject(error);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})();\n\t\t};\n\n\t\t// Create the concurrent runners in a detached (non-awaited)\n\t\t// promise. We need this so we can await the `next()` calls\n\t\t// to stop creating runners before hitting the concurrency limit\n\t\t// if the iterable has already been marked as done.\n\t\t// NOTE: We *must* do this for async iterators otherwise we'll spin up\n\t\t// infinite `next()` calls by default and never start the event loop.\n\t\t(async () => {\n\t\t\tfor (let index = 0; index < concurrency; index++) {\n\t\t\t\ttry {\n\t\t\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\t\t\tawait next();\n\t\t\t\t} catch (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (isIterableDone || isRejected) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t})();\n\t});\n}\n\nexport function pMapIterable(\n\titerable,\n\tmapper,\n\t{\n\t\tconcurrency = Number.POSITIVE_INFINITY,\n\t\tbackpressure = concurrency,\n\t} = {},\n) {\n\tif (iterable[Symbol.iterator] === undefined && iterable[Symbol.asyncIterator] === undefined) {\n\t\tthrow new TypeError(`Expected \\`input\\` to be either an \\`Iterable\\` or \\`AsyncIterable\\`, got (${typeof iterable})`);\n\t}\n\n\tif (typeof mapper !== 'function') {\n\t\tthrow new TypeError('Mapper function is required');\n\t}\n\n\tif (!((Number.isSafeInteger(concurrency) && concurrency >= 1) || concurrency === Number.POSITIVE_INFINITY)) {\n\t\tthrow new TypeError(`Expected \\`concurrency\\` to be an integer from 1 and up or \\`Infinity\\`, got \\`${concurrency}\\` (${typeof concurrency})`);\n\t}\n\n\tif (!((Number.isSafeInteger(backpressure) && backpressure >= concurrency) || backpressure === Number.POSITIVE_INFINITY)) {\n\t\tthrow new TypeError(`Expected \\`backpressure\\` to be an integer from \\`concurrency\\` (${concurrency}) and up or \\`Infinity\\`, got \\`${backpressure}\\` (${typeof backpressure})`);\n\t}\n\n\treturn {\n\t\tasync * [Symbol.asyncIterator]() {\n\t\t\tconst iterator = iterable[Symbol.asyncIterator] === undefined ? iterable[Symbol.iterator]() : iterable[Symbol.asyncIterator]();\n\n\t\t\tconst promises = [];\n\t\t\tlet runningMappersCount = 0;\n\t\t\tlet isDone = false;\n\t\t\tlet index = 0;\n\n\t\t\tfunction trySpawn() {\n\t\t\t\tif (isDone || !(runningMappersCount < concurrency && promises.length < backpressure)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst promise = (async () => {\n\t\t\t\t\tconst {done, value} = await iterator.next();\n\n\t\t\t\t\tif (done) {\n\t\t\t\t\t\treturn {done: true};\n\t\t\t\t\t}\n\n\t\t\t\t\trunningMappersCount++;\n\n\t\t\t\t\t// Spawn if still below concurrency and backpressure limit\n\t\t\t\t\ttrySpawn();\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst returnValue = await mapper(await value, index++);\n\n\t\t\t\t\t\trunningMappersCount--;\n\n\t\t\t\t\t\tif (returnValue === pMapSkip) {\n\t\t\t\t\t\t\tconst index = promises.indexOf(promise);\n\n\t\t\t\t\t\t\tif (index > 0) {\n\t\t\t\t\t\t\t\tpromises.splice(index, 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Spawn if still below backpressure limit and just dropped below concurrency limit\n\t\t\t\t\t\ttrySpawn();\n\n\t\t\t\t\t\treturn {done: false, value: returnValue};\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tisDone = true;\n\t\t\t\t\t\treturn {error};\n\t\t\t\t\t}\n\t\t\t\t})();\n\n\t\t\t\tpromises.push(promise);\n\t\t\t}\n\n\t\t\ttrySpawn();\n\n\t\t\twhile (promises.length > 0) {\n\t\t\t\tconst {error, done, value} = await promises[0]; // eslint-disable-line no-await-in-loop\n\n\t\t\t\tpromises.shift();\n\n\t\t\t\tif (error) {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\n\t\t\t\tif (done) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Spawn if just dropped below backpressure limit and below the concurrency limit\n\t\t\t\ttrySpawn();\n\n\t\t\t\tif (value === pMapSkip) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tyield value;\n\t\t\t}\n\t\t},\n\t};\n}\n\nexport const pMapSkip = Symbol('skip');\n", "import retry from 'retry';\nimport isNetworkError from 'is-network-error';\n\nexport class AbortError extends Error {\n\tconstructor(message) {\n\t\tsuper();\n\n\t\tif (message instanceof Error) {\n\t\t\tthis.originalError = message;\n\t\t\t({message} = message);\n\t\t} else {\n\t\t\tthis.originalError = new Error(message);\n\t\t\tthis.originalError.stack = this.stack;\n\t\t}\n\n\t\tthis.name = 'AbortError';\n\t\tthis.message = message;\n\t}\n}\n\nconst decorateErrorWithCounts = (error, attemptNumber, options) => {\n\t// Minus 1 from attemptNumber because the first attempt does not count as a retry\n\tconst retriesLeft = options.retries - (attemptNumber - 1);\n\n\terror.attemptNumber = attemptNumber;\n\terror.retriesLeft = retriesLeft;\n\treturn error;\n};\n\nexport default async function pRetry(input, options) {\n\treturn new Promise((resolve, reject) => {\n\t\toptions = {...options};\n\t\toptions.onFailedAttempt ??= () => {};\n\t\toptions.shouldRetry ??= () => true;\n\t\toptions.retries ??= 10;\n\n\t\tconst operation = retry.operation(options);\n\n\t\tconst abortHandler = () => {\n\t\t\toperation.stop();\n\t\t\treject(options.signal?.reason);\n\t\t};\n\n\t\tif (options.signal && !options.signal.aborted) {\n\t\t\toptions.signal.addEventListener('abort', abortHandler, {once: true});\n\t\t}\n\n\t\tconst cleanUp = () => {\n\t\t\toptions.signal?.removeEventListener('abort', abortHandler);\n\t\t\toperation.stop();\n\t\t};\n\n\t\toperation.attempt(async attemptNumber => {\n\t\t\ttry {\n\t\t\t\tconst result = await input(attemptNumber);\n\t\t\t\tcleanUp();\n\t\t\t\tresolve(result);\n\t\t\t} catch (error) {\n\t\t\t\ttry {\n\t\t\t\t\tif (!(error instanceof Error)) {\n\t\t\t\t\t\tthrow new TypeError(`Non-error was thrown: \"${error}\". You should only throw errors.`);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (error instanceof AbortError) {\n\t\t\t\t\t\tthrow error.originalError;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (error instanceof TypeError && !isNetworkError(error)) {\n\t\t\t\t\t\tthrow error;\n\t\t\t\t\t}\n\n\t\t\t\t\tdecorateErrorWithCounts(error, attemptNumber, options);\n\n\t\t\t\t\tif (!(await options.shouldRetry(error))) {\n\t\t\t\t\t\toperation.stop();\n\t\t\t\t\t\treject(error);\n\t\t\t\t\t}\n\n\t\t\t\t\tawait options.onFailedAttempt(error);\n\n\t\t\t\t\tif (!operation.retry(error)) {\n\t\t\t\t\t\tthrow operation.mainError();\n\t\t\t\t\t}\n\t\t\t\t} catch (finalError) {\n\t\t\t\t\tdecorateErrorWithCounts(finalError, attemptNumber, options);\n\t\t\t\t\tcleanUp();\n\t\t\t\t\treject(finalError);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}\n", "const objectToString = Object.prototype.toString;\n\nconst isError = value => objectToString.call(value) === '[object Error]';\n\nconst errorMessages = new Set([\n\t'network error', // Chrome\n\t'Failed to fetch', // Chrome\n\t'NetworkError when attempting to fetch resource.', // Firefox\n\t'The Internet connection appears to be offline.', // Safari 16\n\t'Load failed', // Safari 17+\n\t'Network request failed', // `cross-fetch`\n\t'fetch failed', // Undici (Node.js)\n\t'terminated', // Undici (Node.js)\n]);\n\nexport default function isNetworkError(error) {\n\tconst isValid = error\n\t\t&& isError(error)\n\t\t&& error.name === 'TypeError'\n\t\t&& typeof error.message === 'string';\n\n\tif (!isValid) {\n\t\treturn false;\n\t}\n\n\t// We do an extra check for Safari 17+ as it has a very generic error message.\n\t// Network errors in Safari have no stack.\n\tif (error.message === 'Load failed') {\n\t\treturn error.stack === undefined;\n\t}\n\n\treturn errorMessages.has(error.message);\n}\n", "/**\n * ======================================================\n * THIS IS A GENERATED FILE! DO NOT EDIT IT MANUALLY!\n *\n * You can regenerate it by running `npm run generate-graphql`.\n * ======================================================\n */\n\nexport type Maybe<T> = T | null;\nexport type InputMaybe<T> = Maybe<T>;\nexport type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };\nexport type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };\nexport type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };\nexport type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };\nexport type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: { input: string; output: string; }\n String: { input: string; output: string; }\n Boolean: { input: boolean; output: boolean; }\n Int: { input: number; output: number; }\n Float: { input: number; output: number; }\n /** A date string, such as 2007-12-03, compliant with the `full-date` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar. */\n Date: { input: any; output: any; }\n /** A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar. */\n DateTime: { input: any; output: any; }\n /** The ID of a record in Gadget */\n GadgetID: { input: any; output: any; }\n /** Instructions for a client to turn raw transport types (like strings) into useful client side types (like Dates). Unstable and not intended for developer use. */\n HydrationPlan: { input: any; output: any; }\n /** Represents one session result record in internal api calls. Returns a JSON blob of all the record's fields. */\n InternalSessionRecord: { input: any; output: any; }\n /** The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */\n JSON: { input: { [key: string]: any }; output: { [key: string]: any }; }\n /** The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */\n JSONObject: { input: any; output: any; }\n /** Represents the state of one record in a Gadget database. Represented as either a string or set of strings nested in objects. */\n RecordState: { input: any; output: any; }\n /** The `Upload` scalar type represents a file upload. */\n Upload: { input: any; output: any; }\n};\n\nexport type ApiUpgradeConvergePlanResult = {\n __typename?: 'APIUpgradeConvergePlanResult';\n items: Array<Scalars['JSON']['output']>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type AccessToken = {\n __typename?: 'AccessToken';\n createdAt: Scalars['DateTime']['output'];\n creator: PlatformAccessTokenUser;\n id: Scalars['String']['output'];\n name: Scalars['String']['output'];\n tokenPrefix: Scalars['String']['output'];\n};\n\nexport type AddApplicationTagResult = {\n __typename?: 'AddApplicationTagResult';\n reason?: Maybe<Scalars['String']['output']>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type AddUserTagResult = {\n __typename?: 'AddUserTagResult';\n reason?: Maybe<Scalars['String']['output']>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type AppDomain = {\n __typename?: 'AppDomain';\n environmentType: Scalars['String']['output'];\n host: Scalars['String']['output'];\n isPrimary: Scalars['Boolean']['output'];\n};\n\nexport type BackgroundAction = {\n __typename?: 'BackgroundAction';\n actionApiIdentifier: Scalars['String']['output'];\n attempts: Array<BackgroundActionAttempt>;\n cancelledAt?: Maybe<Scalars['DateTime']['output']>;\n createdDate: Scalars['DateTime']['output'];\n id: Scalars['String']['output'];\n lastAttemptFinishedAt?: Maybe<Scalars['DateTime']['output']>;\n lastAttemptStartedAt?: Maybe<Scalars['DateTime']['output']>;\n lastRestartedAt?: Maybe<Scalars['DateTime']['output']>;\n nextAttemptStartsAfter?: Maybe<Scalars['DateTime']['output']>;\n payload: Scalars['JSON']['output'];\n priority: Scalars['String']['output'];\n queue?: Maybe<Scalars['String']['output']>;\n result?: Maybe<Scalars['JSON']['output']>;\n retryPolicy: Scalars['JSON']['output'];\n state: BackgroundActionState;\n type: Scalars['String']['output'];\n};\n\nexport type BackgroundActionAttempt = {\n __typename?: 'BackgroundActionAttempt';\n attemptNumber: Scalars['Int']['output'];\n createdDate?: Maybe<Scalars['DateTime']['output']>;\n details: Scalars['JSON']['output'];\n failureReason?: Maybe<Scalars['JSON']['output']>;\n failureSummary?: Maybe<Scalars['String']['output']>;\n finishedDate?: Maybe<Scalars['DateTime']['output']>;\n id: Scalars['String']['output'];\n startedDate?: Maybe<Scalars['DateTime']['output']>;\n state: BackgroundActionAttemptState;\n};\n\nexport enum BackgroundActionAttemptState {\n Failed = 'FAILED',\n Running = 'RUNNING',\n Succeeded = 'SUCCEEDED'\n}\n\nexport type BackgroundActionBulkResult = {\n __typename?: 'BackgroundActionBulkResult';\n failedCount: Scalars['Int']['output'];\n successCount: Scalars['Int']['output'];\n};\n\nexport type BackgroundActionConnection = {\n __typename?: 'BackgroundActionConnection';\n nodes: Array<BackgroundAction>;\n pageInfo: OffsetPageInfo;\n};\n\nexport type BackgroundActionFilter = {\n inState?: InputMaybe<Array<BackgroundActionState>>;\n priority?: InputMaybe<Scalars['String']['input']>;\n search?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport enum BackgroundActionState {\n Cancelled = 'CANCELLED',\n Completed = 'COMPLETED',\n Failed = 'FAILED',\n Retrying = 'RETRYING',\n Running = 'RUNNING',\n Scheduled = 'SCHEDULED',\n Waiting = 'WAITING'\n}\n\nexport type ChangeAppDomainResult = {\n __typename?: 'ChangeAppDomainResult';\n onlyValidate?: Maybe<Scalars['Boolean']['output']>;\n reason?: Maybe<Scalars['String']['output']>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type ChangeEnvironmentSlugResult = {\n __typename?: 'ChangeEnvironmentSlugResult';\n onlyValidate?: Maybe<Scalars['Boolean']['output']>;\n reason?: Maybe<Scalars['String']['output']>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type ContributorResult = {\n __typename?: 'ContributorResult';\n email: Scalars['String']['output'];\n isOwner: Scalars['Boolean']['output'];\n isPending: Scalars['Boolean']['output'];\n};\n\nexport type CreateModelFieldsInput = {\n fieldType: Scalars['String']['input'];\n name: Scalars['String']['input'];\n};\n\nexport type CreateModelInput = {\n fields: Array<CreateModelFieldsInput>;\n path: Scalars['String']['input'];\n};\n\nexport type DeleteAppStatusResult = {\n __typename?: 'DeleteAppStatusResult';\n isNotCreator?: Maybe<Scalars['Boolean']['output']>;\n isNotOwner?: Maybe<Scalars['Boolean']['output']>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type DeletedModelFieldsSummary = {\n __typename?: 'DeletedModelFieldsSummary';\n fields: Array<Scalars['String']['output']>;\n modelIdentifier: Scalars['String']['output'];\n};\n\nexport type DeletedModelsAndFields = {\n __typename?: 'DeletedModelsAndFields';\n deletedModelFields: Array<DeletedModelFieldsSummary>;\n deletedModels: Array<Scalars['String']['output']>;\n};\n\n/** One upload target to use for the Direct Upload style of sending files to Gadget */\nexport type DirectUploadToken = {\n __typename?: 'DirectUploadToken';\n /** The token to pass to an action to reference the uploaded file. */\n token: Scalars['String']['output'];\n /** The URL to upload a file to. */\n url: Scalars['String']['output'];\n};\n\nexport type EnableFrontendResult = {\n __typename?: 'EnableFrontendResult';\n reason?: Maybe<Scalars['String']['output']>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type Environment = {\n __typename?: 'Environment';\n id: Scalars['String']['output'];\n lastUserEditDate: Scalars['DateTime']['output'];\n name: Scalars['String']['output'];\n slug: Scalars['String']['output'];\n status: EnvironmentStatus;\n type: EnvironmentType;\n};\n\nexport type EnvironmentInput = {\n slug: Scalars['String']['input'];\n sourceSlug?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type EnvironmentPatchResult = {\n __typename?: 'EnvironmentPatchResult';\n success: Scalars['Boolean']['output'];\n};\n\nexport type EnvironmentPublishResult = {\n __typename?: 'EnvironmentPublishResult';\n success: Scalars['Boolean']['output'];\n};\n\nexport enum EnvironmentStatus {\n Active = 'ACTIVE',\n FatalError = 'FATAL_ERROR',\n Paused = 'PAUSED',\n Pending = 'PENDING'\n}\n\nexport type EnvironmentSubscriptionResult = {\n __typename?: 'EnvironmentSubscriptionResult';\n patches: Array<Scalars['JSON']['output']>;\n};\n\nexport type EnvironmentTreeClientId = {\n clientType: Scalars['String']['input'];\n id: Scalars['String']['input'];\n};\n\nexport enum EnvironmentType {\n Development = 'DEVELOPMENT',\n Production = 'PRODUCTION',\n Test = 'TEST'\n}\n\nexport type ExecutionError = {\n /** The Gadget platform error code for this error. */\n code: Scalars['String']['output'];\n /** The human facing error message for this error. */\n message: Scalars['String']['output'];\n /** The stack for any exception that caused the error. Only available for super users. */\n stack?: Maybe<Scalars['String']['output']>;\n};\n\nexport type FileSyncChangedEvent = {\n __typename?: 'FileSyncChangedEvent';\n content: Scalars['String']['output'];\n encoding: FileSyncEncoding;\n mode: Scalars['Float']['output'];\n path: Scalars['String']['output'];\n};\n\nexport type FileSyncChangedEventInput = {\n content: Scalars['String']['input'];\n encoding?: InputMaybe<FileSyncEncoding>;\n mode: Scalars['Float']['input'];\n oldPath?: InputMaybe<Scalars['String']['input']>;\n path: Scalars['String']['input'];\n};\n\nexport type FileSyncComparisonHashes = {\n __typename?: 'FileSyncComparisonHashes';\n filesVersionHashes: FileSyncHashes;\n latestFilesVersionHashes: FileSyncHashes;\n};\n\nexport type FileSyncDeletedEvent = {\n __typename?: 'FileSyncDeletedEvent';\n path: Scalars['String']['output'];\n};\n\nexport type FileSyncDeletedEventInput = {\n path: Scalars['String']['input'];\n};\n\nexport enum FileSyncEncoding {\n Base64 = 'base64',\n Utf8 = 'utf8'\n}\n\nexport type FileSyncFile = {\n __typename?: 'FileSyncFile';\n content: Scalars['String']['output'];\n encoding: FileSyncEncoding;\n mode: Scalars['Float']['output'];\n path: Scalars['String']['output'];\n};\n\nexport type FileSyncFiles = {\n __typename?: 'FileSyncFiles';\n files: Array<FileSyncFile>;\n filesVersion: Scalars['String']['output'];\n};\n\nexport type FileSyncHashes = {\n __typename?: 'FileSyncHashes';\n filesVersion: Scalars['String']['output'];\n hashes: Scalars['JSON']['output'];\n};\n\nexport type GadgetAction = {\n __typename?: 'GadgetAction';\n acceptsInput: Scalars['Boolean']['output'];\n apiIdentifier: Scalars['String']['output'];\n availableInBulk: Scalars['Boolean']['output'];\n bulkApiIdentifier?: Maybe<Scalars['String']['output']>;\n bulkInvokedByIDOnly: Scalars['Boolean']['output'];\n examples?: Maybe<GadgetActionGraphQlType>;\n hasAmbiguousIdentifier: Scalars['Boolean']['output'];\n /** @deprecated This field will be removed. Use `isCreateOrUpdateAction` instead. */\n hasCreateOrUpdateEffect: Scalars['Boolean']['output'];\n /** @deprecated This field will be removed. Use `isDeleteAction` instead. */\n hasDeleteRecordEffect: Scalars['Boolean']['output'];\n inputFields: Array<GadgetObjectField>;\n isCreateOrUpdateAction: Scalars['Boolean']['output'];\n isDeleteAction: Scalars['Boolean']['output'];\n name: Scalars['String']['output'];\n operatesWithRecordIdentity: Scalars['Boolean']['output'];\n possibleTransitions: Scalars['JSONObject']['output'];\n requiresInput: Scalars['Boolean']['output'];\n triggers?: Maybe<Array<GadgetTrigger>>;\n};\n\nexport type GadgetActionGraphQlType = {\n __typename?: 'GadgetActionGraphQLType';\n bulkOutputGraphQLTypeSDL?: Maybe<Scalars['String']['output']>;\n exampleBulkGraphQLMutation?: Maybe<Scalars['String']['output']>;\n exampleBulkGraphQLVariables?: Maybe<Scalars['JSON']['output']>;\n exampleBulkImperativeInvocation?: Maybe<Scalars['String']['output']>;\n /** @deprecated moved to exampleBulkGraphQLMutation */\n exampleBulkMutation?: Maybe<Scalars['String']['output']>;\n exampleBulkReactHook?: Maybe<Scalars['String']['output']>;\n exampleGraphQLMutation: Scalars['String']['output'];\n exampleGraphQLVariables: Scalars['JSON']['output'];\n exampleImperativeInvocation: Scalars['String']['output'];\n exampleJSInputs: Scalars['JSON']['output'];\n /** @deprecated moved to exampleGraphQLMutation */\n exampleMutation: Scalars['String']['output'];\n exampleReactHook: Scalars['String']['output'];\n inputGraphQLTypeSDL?: Maybe<Scalars['String']['output']>;\n inputTypeScriptInterface?: Maybe<Scalars['String']['output']>;\n outputGraphQLTypeSDL: Scalars['String']['output'];\n outputTypeScriptInterface: Scalars['String']['output'];\n};\n\nexport type GadgetApplicationMeta = {\n __typename?: 'GadgetApplicationMeta';\n allHydrations: Scalars['JSON']['output'];\n /** The roles that the entity making this API call has been assigned */\n assignedRoles: Array<GadgetRole>;\n canonicalRenderURL: Scalars['String']['output'];\n developmentGraphQLEndpoint: Scalars['String']['output'];\n developmentRenderURL: Scalars['String']['output'];\n directUploadToken?: Maybe<DirectUploadToken>;\n editURL: Scalars['String']['output'];\n environmentID: Scalars['GadgetID']['output'];\n environmentName: Scalars['String']['output'];\n environmentSlug: Scalars['String']['output'];\n firstModelForExamples: GadgetModel;\n globalActions: Array<GadgetGlobalAction>;\n graphQLEndpoint: Scalars['String']['output'];\n hasGlobalActions: Scalars['Boolean']['output'];\n hasLegacyEffectCards: Scalars['Boolean']['output'];\n hasShopifyConnection: Scalars['Boolean']['output'];\n hasSplitEnvironments: Scalars['Boolean']['output'];\n hydrations?: Maybe<Scalars['HydrationPlan']['output']>;\n id: Scalars['GadgetID']['output'];\n jsPackageIdentifier: Scalars['String']['output'];\n jsPackageTarballURL: Scalars['String']['output'];\n model?: Maybe<GadgetModel>;\n models: Array<GadgetModel>;\n name: Scalars['String']['output'];\n productionGraphQLEndpoint: Scalars['String']['output'];\n productionRenderURL: Scalars['String']['output'];\n referencedHydrations: Scalars['JSON']['output'];\n roles: Array<GadgetRole>;\n /** @deprecated The current session is available as the root field `currentSession` on the root Query object, which has the ID as well as other attributes of the session. */\n sessionID?: Maybe<Scalars['String']['output']>;\n shopifyConnectionApiVersion?: Maybe<Scalars['String']['output']>;\n slug: Scalars['String']['output'];\n};\n\n\nexport type GadgetApplicationMetaDirectUploadTokenArgs = {\n nonce?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type GadgetApplicationMetaHydrationsArgs = {\n modelName: Scalars['String']['input'];\n};\n\n\nexport type GadgetApplicationMetaModelArgs = {\n apiIdentifier?: InputMaybe<Scalars['String']['input']>;\n key?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type GadgetBelongsToConfig = GadgetFieldConfigInterface & {\n __typename?: 'GadgetBelongsToConfig';\n fieldType: GadgetFieldType;\n isConfigured: Scalars['Boolean']['output'];\n isInverseConfigured: Scalars['Boolean']['output'];\n relatedModel?: Maybe<GadgetModel>;\n relatedModelKey?: Maybe<Scalars['String']['output']>;\n};\n\nexport type GadgetDateTimeConfig = GadgetFieldConfigInterface & {\n __typename?: 'GadgetDateTimeConfig';\n fieldType: GadgetFieldType;\n includeTime: Scalars['Boolean']['output'];\n};\n\nexport type GadgetEnumConfig = GadgetFieldConfigInterface & {\n __typename?: 'GadgetEnumConfig';\n allowMultiple: Scalars['Boolean']['output'];\n allowOther: Scalars['Boolean']['output'];\n fieldType: GadgetFieldType;\n options: Array<GadgetEnumOption>;\n};\n\nexport type GadgetEnumOption = {\n __typename?: 'GadgetEnumOption';\n color: Scalars['String']['output'];\n name: Scalars['String']['output'];\n};\n\nexport type GadgetField = {\n apiIdentifier: Scalars['String']['output'];\n configuration: GadgetFieldConfigInterface;\n fieldType: GadgetFieldType;\n hasDefault: Scalars['Boolean']['output'];\n name: Scalars['String']['output'];\n required: Scalars['Boolean']['output'];\n requiredArgumentForInput: Scalars['Boolean']['output'];\n};\n\n/** The common bits that all field configuration types share */\nexport type GadgetFieldConfigInterface = {\n fieldType: GadgetFieldType;\n};\n\n/** The type of a given field of a model or other in-transit object within Gadget's type system */\nexport enum GadgetFieldType {\n Any = 'Any',\n Array = 'Array',\n BelongsTo = 'BelongsTo',\n Boolean = 'Boolean',\n Code = 'Code',\n Color = 'Color',\n Computed = 'Computed',\n DateTime = 'DateTime',\n Email = 'Email',\n EncryptedString = 'EncryptedString',\n Enum = 'Enum',\n File = 'File',\n HasMany = 'HasMany',\n HasManyThrough = 'HasManyThrough',\n HasOne = 'HasOne',\n Id = 'ID',\n Json = 'JSON',\n Money = 'Money',\n Null = 'Null',\n Number = 'Number',\n Object = 'Object',\n Password = 'Password',\n RecordState = 'RecordState',\n RichText = 'RichText',\n RoleAssignments = 'RoleAssignments',\n String = 'String',\n Url = 'URL',\n Vector = 'Vector'\n}\n\nexport type GadgetFieldUsageExample = {\n __typename?: 'GadgetFieldUsageExample';\n exampleGraphQLMutation: Scalars['String']['output'];\n exampleGraphQLVariables: Scalars['JSON']['output'];\n exampleImperativeInvocation: Scalars['String']['output'];\n exampleReactHook: Scalars['String']['output'];\n};\n\nexport type GadgetGenericFieldConfig = GadgetFieldConfigInterface & {\n __typename?: 'GadgetGenericFieldConfig';\n fieldType: GadgetFieldType;\n};\n\nexport type GadgetGlobalAction = {\n __typename?: 'GadgetGlobalAction';\n acceptsInput: Scalars['Boolean']['output'];\n apiIdentifier: Scalars['String']['output'];\n examples?: Maybe<GadgetGlobalActionGraphQlType>;\n name: Scalars['String']['output'];\n namespace?: Maybe<Array<Scalars['String']['output']>>;\n requiresInput: Scalars['Boolean']['output'];\n triggers?: Maybe<Array<GadgetTrigger>>;\n};\n\nexport type GadgetGlobalActionGraphQlType = {\n __typename?: 'GadgetGlobalActionGraphQLType';\n exampleGraphQLMutation: Scalars['String']['output'];\n exampleGraphQLVariables: Scalars['JSON']['output'];\n exampleImperativeInvocation: Scalars['String']['output'];\n exampleJSInputs: Scalars['JSON']['output'];\n /** @deprecated moved to exampleGraphQLMutation */\n exampleMutation: Scalars['String']['output'];\n exampleReactHook: Scalars['String']['output'];\n inputGraphQLTypeSDL?: Maybe<Scalars['String']['output']>;\n inputTypeScriptInterface?: Maybe<Scalars['String']['output']>;\n outputGraphQLTypeSDL: Scalars['String']['output'];\n outputTypeScriptInterface: Scalars['String']['output'];\n};\n\nexport type GadgetHasManyConfig = GadgetFieldConfigInterface & {\n __typename?: 'GadgetHasManyConfig';\n fieldType: GadgetFieldType;\n isConfigured: Scalars['Boolean']['output'];\n isInverseConfigured: Scalars['Boolean']['output'];\n relatedModel?: Maybe<GadgetModel>;\n relatedModelKey?: Maybe<Scalars['String']['output']>;\n};\n\nexport type GadgetModel = {\n __typename?: 'GadgetModel';\n action?: Maybe<GadgetAction>;\n actions: Array<GadgetAction>;\n apiIdentifier: Scalars['String']['output'];\n currentSingletonApiIdentifier?: Maybe<Scalars['String']['output']>;\n exampleFilterQuery: Scalars['String']['output'];\n exampleFindMostRecentlyCreatedQuery: Scalars['String']['output'];\n exampleFullFindFirstQuery: Scalars['String']['output'];\n exampleFullFindManyQuery: Scalars['String']['output'];\n exampleFullFindOneQuery: Scalars['String']['output'];\n exampleInternalBulkCreateMutation: Scalars['String']['output'];\n exampleInternalCreateMutation: Scalars['String']['output'];\n exampleInternalDeleteManyMutation: Scalars['String']['output'];\n exampleInternalDeleteMutation: Scalars['String']['output'];\n exampleInternalFindFirstQuery: Scalars['String']['output'];\n exampleInternalFindManyQuery: Scalars['String']['output'];\n exampleInternalFindOneQuery: Scalars['String']['output'];\n exampleInternalUpdateMutation: Scalars['String']['output'];\n examplePaginationQuery: Scalars['String']['output'];\n exampleSearchQuery: Scalars['String']['output'];\n exampleSimpleFindManyQuery: Scalars['String']['output'];\n exampleSimpleFindOneQuery: Scalars['String']['output'];\n fields: Array<GadgetModelField>;\n filterGraphQLTypeName?: Maybe<Scalars['String']['output']>;\n filterGraphQLTypeSDL?: Maybe<Scalars['String']['output']>;\n filterable: Scalars['Boolean']['output'];\n graphQLTypeName: Scalars['String']['output'];\n graphQLTypeSDL: Scalars['String']['output'];\n initialCreatedState?: Maybe<Scalars['String']['output']>;\n key: Scalars['String']['output'];\n name: Scalars['String']['output'];\n namespace?: Maybe<Array<Scalars['String']['output']>>;\n pluralApiIdentifier: Scalars['String']['output'];\n pluralName: Scalars['String']['output'];\n searchable: Scalars['Boolean']['output'];\n sortGraphQLTypeName?: Maybe<Scalars['String']['output']>;\n sortGraphQLTypeSDL?: Maybe<Scalars['String']['output']>;\n sortable: Scalars['Boolean']['output'];\n typescriptTypeInterface: Scalars['String']['output'];\n typescriptTypeInterfaceName: Scalars['String']['output'];\n};\n\n\nexport type GadgetModelActionArgs = {\n apiIdentifier: Scalars['String']['input'];\n};\n\n/** One field of a Gadget model */\nexport type GadgetModelField = GadgetField & {\n __typename?: 'GadgetModelField';\n apiIdentifier: Scalars['String']['output'];\n configuration: GadgetFieldConfigInterface;\n examples: GadgetModelFieldExamples;\n fieldType: GadgetFieldType;\n filterable: Scalars['Boolean']['output'];\n hasDefault: Scalars['Boolean']['output'];\n isUniqueField: Scalars['Boolean']['output'];\n name: Scalars['String']['output'];\n required: Scalars['Boolean']['output'];\n requiredArgumentForInput: Scalars['Boolean']['output'];\n sortable: Scalars['Boolean']['output'];\n};\n\nexport type GadgetModelFieldExamples = {\n __typename?: 'GadgetModelFieldExamples';\n createNestedInParent?: Maybe<GadgetFieldUsageExample>;\n linkExistingChild?: Maybe<GadgetFieldUsageExample>;\n linkNewChild?: Maybe<GadgetFieldUsageExample>;\n linkToExistingParent?: Maybe<GadgetFieldUsageExample>;\n};\n\n/** One field of an action input or other transitory object in Gadget */\nexport type GadgetObjectField = GadgetField & {\n __typename?: 'GadgetObjectField';\n apiIdentifier: Scalars['String']['output'];\n configuration: GadgetFieldConfigInterface;\n fieldType: GadgetFieldType;\n hasDefault: Scalars['Boolean']['output'];\n name: Scalars['String']['output'];\n required: Scalars['Boolean']['output'];\n requiredArgumentForInput: Scalars['Boolean']['output'];\n};\n\nexport type GadgetObjectFieldConfig = GadgetFieldConfigInterface & {\n __typename?: 'GadgetObjectFieldConfig';\n fieldType: GadgetFieldType;\n fields: Array<GadgetModelField>;\n name?: Maybe<Scalars['String']['output']>;\n};\n\n/** Represents one of the roles an identity in the system can be entitled to */\nexport type GadgetRole = {\n __typename?: 'GadgetRole';\n key: Scalars['String']['output'];\n name: Scalars['String']['output'];\n order: Scalars['Int']['output'];\n selectable: Scalars['Boolean']['output'];\n};\n\nexport type GadgetTrigger = {\n __typename?: 'GadgetTrigger';\n specID: Scalars['String']['output'];\n};\n\nexport type GadgetV1MigrationEligibilityResult = {\n __typename?: 'GadgetV1MigrationEligibilityResult';\n eligible: Scalars['Boolean']['output'];\n reason?: Maybe<Scalars['String']['output']>;\n};\n\nexport type GeneratePlatformAccessTokenResult = {\n __typename?: 'GeneratePlatformAccessTokenResult';\n createdAt: Scalars['DateTime']['output'];\n creator: PlatformAccessTokenUser;\n id: Scalars['String']['output'];\n name: Scalars['String']['output'];\n token: Scalars['String']['output'];\n};\n\nexport type IdentifySupportConversationResult = {\n __typename?: 'IdentifySupportConversationResult';\n identificationEmail: Scalars['String']['output'];\n identificationToken: Scalars['String']['output'];\n};\n\nexport type InternalBulkCreateSessionsResult = {\n __typename?: 'InternalBulkCreateSessionsResult';\n errors?: Maybe<Array<ExecutionError>>;\n sessions?: Maybe<Array<Maybe<Scalars['InternalSessionRecord']['output']>>>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type InternalCreateSessionResult = {\n __typename?: 'InternalCreateSessionResult';\n errors?: Maybe<Array<ExecutionError>>;\n session?: Maybe<Scalars['InternalSessionRecord']['output']>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type InternalDeleteManySessionResult = {\n __typename?: 'InternalDeleteManySessionResult';\n errors?: Maybe<Array<ExecutionError>>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type InternalDeleteSessionResult = {\n __typename?: 'InternalDeleteSessionResult';\n errors?: Maybe<Array<ExecutionError>>;\n session?: Maybe<Scalars['InternalSessionRecord']['output']>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type InternalMutations = {\n __typename?: 'InternalMutations';\n /** Acquire a backend lock, returning only once the lock has been acquired */\n acquireLock: LockOperationResult;\n bulkCreateSessions?: Maybe<InternalBulkCreateSessionsResult>;\n commitTransaction: Scalars['String']['output'];\n createSession?: Maybe<InternalCreateSessionResult>;\n deleteManySession?: Maybe<InternalDeleteManySessionResult>;\n deleteSession?: Maybe<InternalDeleteSessionResult>;\n rollbackTransaction: Scalars['String']['output'];\n startTransaction: Scalars['String']['output'];\n updateSession?: Maybe<InternalUpdateSessionResult>;\n};\n\n\nexport type InternalMutationsAcquireLockArgs = {\n lock: Scalars['String']['input'];\n};\n\n\nexport type InternalMutationsBulkCreateSessionsArgs = {\n sessions: Array<InputMaybe<InternalSessionInput>>;\n};\n\n\nexport type InternalMutationsCreateSessionArgs = {\n session?: InputMaybe<InternalSessionInput>;\n};\n\n\nexport type InternalMutationsDeleteSessionArgs = {\n id: Scalars['GadgetID']['input'];\n};\n\n\nexport type InternalMutationsUpdateSessionArgs = {\n id: Scalars['GadgetID']['input'];\n session?: InputMaybe<InternalSessionInput>;\n};\n\nexport type InternalQueries = {\n __typename?: 'InternalQueries';\n /** Currently open platform transaction details, or null if no transaction is open */\n currentTransactionDetails?: Maybe<Scalars['JSONObject']['output']>;\n listSession: InternalSessionRecordConnection;\n session?: Maybe<Scalars['InternalSessionRecord']['output']>;\n};\n\n\nexport type InternalQueriesListSessionArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n select?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\n\nexport type InternalQueriesSessionArgs = {\n id: Scalars['GadgetID']['input'];\n select?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\nexport type InternalSessionInput = {\n createdAt?: InputMaybe<Scalars['DateTime']['input']>;\n id?: InputMaybe<Scalars['GadgetID']['input']>;\n /** A string list of Gadget platform Role keys to assign to this record */\n roles?: InputMaybe<Array<Scalars['String']['input']>>;\n state?: InputMaybe<Scalars['RecordState']['input']>;\n stateHistory?: InputMaybe<Scalars['RecordState']['input']>;\n updatedAt?: InputMaybe<Scalars['DateTime']['input']>;\n};\n\n/** A connection to a list of InternalSessionRecord items. */\nexport type InternalSessionRecordConnection = {\n __typename?: 'InternalSessionRecordConnection';\n /** A list of edges. */\n edges: Array<InternalSessionRecordEdge>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n};\n\n/** An edge in a InternalSessionRecord connection. */\nexport type InternalSessionRecordEdge = {\n __typename?: 'InternalSessionRecordEdge';\n /** A cursor for use in pagination */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge */\n node: Scalars['InternalSessionRecord']['output'];\n};\n\nexport type InternalUpdateSessionResult = {\n __typename?: 'InternalUpdateSessionResult';\n errors?: Maybe<Array<ExecutionError>>;\n session?: Maybe<Scalars['InternalSessionRecord']['output']>;\n success: Scalars['Boolean']['output'];\n};\n\n/** This Error object represents one individual failed validation for a record field. It has a message which is appropriate for display to a user, and lists the apiIdentifier of the field in question. The `apiIdentifier` for the field is not guaranteed to exist on the model. */\nexport type InvalidFieldError = {\n __typename?: 'InvalidFieldError';\n /** The apiIdentifier of the field this error occurred on. */\n apiIdentifier: Scalars['String']['output'];\n /** The human facing error message for this error. */\n message: Scalars['String']['output'];\n};\n\n/** This object is returned as an error when a record doesn't pass the defined validations on the model. The validation messages for each of the invalid fields are available via the other fields on this error type. */\nexport type InvalidRecordError = ExecutionError & {\n __typename?: 'InvalidRecordError';\n /** The Gadget platform error code for this InvalidRecordError. */\n code: Scalars['String']['output'];\n /** The human facing error message for this error. */\n message: Scalars['String']['output'];\n /** The model of the record which failed validation */\n model?: Maybe<GadgetModel>;\n /** The record which failed validation, if available. Returns all the owned fields of the record -- no sub-selections are required or possible. Only available for super users. */\n record?: Maybe<Scalars['JSONObject']['output']>;\n /** The stack for any exception that caused the error */\n stack?: Maybe<Scalars['String']['output']>;\n /** A list of InvalidFieldError objects describing each of the errors encountered on the invalid record. */\n validationErrors?: Maybe<Array<InvalidFieldError>>;\n /** An object mapping field apiIdentifiers to arrays of validation error message strings for that field, as a JSON object. The object may have keys that don't correspond exactly to field apiIdentifiers if added by validations, and the object may have missing keys if no errors were encountered for that field. */\n validationErrorsByField?: Maybe<Scalars['JSONObject']['output']>;\n};\n\nexport type LockOperationResult = {\n __typename?: 'LockOperationResult';\n /** Any errors encountered during the locking/unlocking operation */\n errors?: Maybe<Array<ExecutionError>>;\n /** Whether the lock operation succeeded */\n success: Scalars['Boolean']['output'];\n};\n\nexport type LogSearchResult = {\n __typename?: 'LogSearchResult';\n data: Scalars['JSON']['output'];\n status: Scalars['String']['output'];\n};\n\nexport type MigrateAacResult = {\n __typename?: 'MigrateAACResult';\n reason?: Maybe<Scalars['String']['output']>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type MigrateEnvironmentsResult = {\n __typename?: 'MigrateEnvironmentsResult';\n success: Scalars['Boolean']['output'];\n};\n\nexport type MigrateGadgetV1Result = {\n __typename?: 'MigrateGadgetV1Result';\n installDependenciesOperationKey?: Maybe<Scalars['String']['output']>;\n reason?: Maybe<Scalars['String']['output']>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type MigrateGadgetV1Status = {\n __typename?: 'MigrateGadgetV1Status';\n inProgress: Scalars['Boolean']['output'];\n progress?: Maybe<Scalars['String']['output']>;\n progressDetails?: Maybe<MigrateGadgetV1StatusProgressDetails>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type MigrateGadgetV1StatusProgressDetails = {\n __typename?: 'MigrateGadgetV1StatusProgressDetails';\n current: Scalars['Int']['output'];\n total: Scalars['Int']['output'];\n};\n\nexport enum ModelExportFormat {\n Csv = 'CSV',\n Ndjson = 'NDJSON'\n}\n\nexport type Mutation = {\n __typename?: 'Mutation';\n addApplicationTag?: Maybe<AddApplicationTagResult>;\n addUserTag?: Maybe<AddUserTagResult>;\n bulkCancelBackgroundActions: BackgroundActionBulkResult;\n bulkDeleteBackgroundActions: BackgroundActionBulkResult;\n bulkStartNextBackgroundActionAttemptsNow: BackgroundActionBulkResult;\n cancelBackgroundAction: BackgroundAction;\n changeAppDomain?: Maybe<ChangeAppDomainResult>;\n changeEnvironmentSlug?: Maybe<ChangeEnvironmentSlugResult>;\n convergePackages: Scalars['Boolean']['output'];\n createAction: RemoteFileSyncEvents;\n createEnvironment: Environment;\n createModel: RemoteFileSyncEvents;\n createModelFields: RemoteFileSyncEvents;\n createRoute: RemoteFileSyncEvents;\n deleteApp?: Maybe<DeleteAppStatusResult>;\n deleteBackgroundAction: Scalars['Boolean']['output'];\n deleteEnvironment: Scalars['Boolean']['output'];\n deletePlatformAccessTokens: Scalars['Boolean']['output'];\n /** @deprecated enabling frontends on legacy apps is no longer supported */\n enableFrontend?: Maybe<EnableFrontendResult>;\n exportModelData: Scalars['Boolean']['output'];\n /** Meta information about the application, like it's name, schema, and other internal details. */\n gadgetMeta: GadgetApplicationMeta;\n gadgetV1MigrationEligibility?: Maybe<GadgetV1MigrationEligibilityResult>;\n generatePlatformAccessToken: GeneratePlatformAccessTokenResult;\n internal?: Maybe<InternalMutations>;\n migrateAAC?: Maybe<MigrateAacResult>;\n /** @deprecated legacy environments are no longer supported */\n migrateEnvironments?: Maybe<MigrateEnvironmentsResult>;\n migrateGadgetV1?: Maybe<MigrateGadgetV1Result>;\n patchEnvironmentTree?: Maybe<EnvironmentPatchResult>;\n publish?: Maybe<EnvironmentPublishResult>;\n publishFileSyncEvents: PublishFileSyncEventsResult;\n refreshScopes?: Maybe<RefreshScopesResult>;\n registerWebhooks?: Maybe<RegisterWebhooksResult>;\n /** @deprecated use team */\n removeContributor?: Maybe<RemoveContributorResult>;\n /** @deprecated app invitations are no longer supported */\n sendAppInvitation?: Maybe<SendAppInvitationResult>;\n setFrameworkVersion: SetFrameworkVersionResult;\n startLogsExport: Scalars['Boolean']['output'];\n startNextBackgroundActionAttemptNow: BackgroundAction;\n syncToWebflow: Scalars['Boolean']['output'];\n triggerRunShopifySync?: Maybe<TriggerRunShopifySyncResult>;\n uninstallShop?: Maybe<UninstallShopResult>;\n unregisterWebhooks?: Maybe<UnregisterWebhooksResult>;\n updatePlatformAccessTokens: Array<AccessToken>;\n uploadFiles: UploadFilesResult;\n uploadTemplateAsset: UploadTemplateAssetResult;\n};\n\n\nexport type MutationAddApplicationTagArgs = {\n tag: Scalars['String']['input'];\n};\n\n\nexport type MutationAddUserTagArgs = {\n replaceMatches?: InputMaybe<Array<Scalars['String']['input']>>;\n tag: Scalars['String']['input'];\n};\n\n\nexport type MutationBulkCancelBackgroundActionsArgs = {\n filter: BackgroundActionFilter;\n};\n\n\nexport type MutationBulkDeleteBackgroundActionsArgs = {\n filter: BackgroundActionFilter;\n};\n\n\nexport type MutationBulkStartNextBackgroundActionAttemptsNowArgs = {\n filter: BackgroundActionFilter;\n};\n\n\nexport type MutationCancelBackgroundActionArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type MutationChangeAppDomainArgs = {\n newSubdomain: Scalars['String']['input'];\n onlyValidate?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type MutationChangeEnvironmentSlugArgs = {\n newSlug: Scalars['String']['input'];\n onlyValidate?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type MutationCreateActionArgs = {\n path: Scalars['String']['input'];\n};\n\n\nexport type MutationCreateEnvironmentArgs = {\n environment: EnvironmentInput;\n};\n\n\nexport type MutationCreateModelArgs = {\n fields?: InputMaybe<Array<CreateModelFieldsInput>>;\n path: Scalars['String']['input'];\n};\n\n\nexport type MutationCreateModelFieldsArgs = {\n fields: Array<CreateModelFieldsInput>;\n path: Scalars['String']['input'];\n};\n\n\nexport type MutationCreateRouteArgs = {\n method: Scalars['String']['input'];\n path: Scalars['String']['input'];\n};\n\n\nexport type MutationDeleteAppArgs = {\n onlyProduction?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type MutationDeleteBackgroundActionArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type MutationDeleteEnvironmentArgs = {\n slug: Scalars['String']['input'];\n};\n\n\nexport type MutationDeletePlatformAccessTokensArgs = {\n tokens: Array<Scalars['String']['input']>;\n};\n\n\nexport type MutationEnableFrontendArgs = {\n hasShopifyConnection: Scalars['Boolean']['input'];\n};\n\n\nexport type MutationExportModelDataArgs = {\n filterSort?: InputMaybe<Scalars['JSON']['input']>;\n format?: InputMaybe<ModelExportFormat>;\n modelApiIdentifier: Scalars['String']['input'];\n selection?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\n\nexport type MutationGeneratePlatformAccessTokenArgs = {\n name: Scalars['String']['input'];\n};\n\n\nexport type MutationMigrateEnvironmentsArgs = {\n existingToProduction: Scalars['Boolean']['input'];\n};\n\n\nexport type MutationPatchEnvironmentTreeArgs = {\n clientID: EnvironmentTreeClientId;\n patches: Array<Scalars['JSON']['input']>;\n txID?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type MutationPublishFileSyncEventsArgs = {\n input: PublishFileSyncEventsInput;\n};\n\n\nexport type MutationRefreshScopesArgs = {\n appConfigKey: Scalars['String']['input'];\n connectionKey: Scalars['String']['input'];\n shopId: Scalars['String']['input'];\n};\n\n\nexport type MutationRegisterWebhooksArgs = {\n connectionKey: Scalars['String']['input'];\n keepExtraTopics?: InputMaybe<Scalars['Boolean']['input']>;\n modelKeys?: InputMaybe<Array<Scalars['String']['input']>>;\n shopIds: Array<Scalars['String']['input']>;\n};\n\n\nexport type MutationRemoveContributorArgs = {\n email: Scalars['String']['input'];\n isInvitation: Scalars['Boolean']['input'];\n};\n\n\nexport type MutationSendAppInvitationArgs = {\n email?: InputMaybe<Scalars['String']['input']>;\n emails?: InputMaybe<Array<Scalars['String']['input']>>;\n resend?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type MutationSetFrameworkVersionArgs = {\n constraint: Scalars['String']['input'];\n};\n\n\nexport type MutationStartLogsExportArgs = {\n end?: InputMaybe<Scalars['DateTime']['input']>;\n query: Scalars['String']['input'];\n start: Scalars['DateTime']['input'];\n};\n\n\nexport type MutationStartNextBackgroundActionAttemptNowArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type MutationTriggerRunShopifySyncArgs = {\n shopIds: Array<Scalars['String']['input']>;\n};\n\n\nexport type MutationUninstallShopArgs = {\n shopId: Scalars['String']['input'];\n};\n\n\nexport type MutationUnregisterWebhooksArgs = {\n apiKeys?: InputMaybe<Array<Scalars['String']['input']>>;\n connectionKey: Scalars['String']['input'];\n modelKeys?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\n\nexport type MutationUpdatePlatformAccessTokensArgs = {\n tokens: Array<PlatformAccessTokenInput>;\n};\n\n\nexport type MutationUploadFilesArgs = {\n files: Array<UploadFile>;\n};\n\n\nexport type MutationUploadTemplateAssetArgs = {\n file: Scalars['Upload']['input'];\n};\n\nexport type OffsetPageInfo = {\n __typename?: 'OffsetPageInfo';\n hasNextPage: Scalars['Boolean']['output'];\n hasPreviousPage: Scalars['Boolean']['output'];\n page: Scalars['Int']['output'];\n total: Scalars['Int']['output'];\n /**\n * If the total is less than the real total, this will be true.\n *\n * Can be used, for example, to show a \"100+\" in the UI.\n */\n totalIncomplete: Scalars['Boolean']['output'];\n};\n\n/** Information about pagination in a connection. */\nexport type PageInfo = {\n __typename?: 'PageInfo';\n /** When paginating forwards, the cursor to continue. */\n endCursor?: Maybe<Scalars['String']['output']>;\n /** When paginating forwards, are there more items? */\n hasNextPage: Scalars['Boolean']['output'];\n /** When paginating backwards, are there more items? */\n hasPreviousPage: Scalars['Boolean']['output'];\n /** When paginating backwards, the cursor to continue. */\n startCursor?: Maybe<Scalars['String']['output']>;\n};\n\nexport type PlatformAccessTokenInput = {\n id: Scalars['String']['input'];\n name: Scalars['String']['input'];\n};\n\nexport type PlatformAccessTokenUser = {\n __typename?: 'PlatformAccessTokenUser';\n email: Scalars['String']['output'];\n id: Scalars['String']['output'];\n name?: Maybe<Scalars['String']['output']>;\n};\n\nexport type Problem = {\n __typename?: 'Problem';\n level: Scalars['String']['output'];\n message: Scalars['String']['output'];\n path: Scalars['String']['output'];\n type: Scalars['String']['output'];\n};\n\nexport type PublishFileSyncEventsInput = {\n changed: Array<FileSyncChangedEventInput>;\n deleted: Array<FileSyncDeletedEventInput>;\n expectedRemoteFilesVersion: Scalars['String']['input'];\n};\n\nexport type PublishFileSyncEventsResult = {\n __typename?: 'PublishFileSyncEventsResult';\n problems: Array<Problem>;\n remoteFilesVersion: Scalars['String']['output'];\n};\n\nexport type PublishIssue = {\n __typename?: 'PublishIssue';\n message: Scalars['String']['output'];\n node?: Maybe<PublishIssueNode>;\n nodeLabels?: Maybe<Array<Maybe<PublishIssueNodeLabel>>>;\n severity: Scalars['String']['output'];\n};\n\nexport type PublishIssueNode = {\n __typename?: 'PublishIssueNode';\n apiIdentifier?: Maybe<Scalars['String']['output']>;\n fieldType?: Maybe<Scalars['String']['output']>;\n key: Scalars['String']['output'];\n name?: Maybe<Scalars['String']['output']>;\n parentApiIdentifier?: Maybe<Scalars['String']['output']>;\n parentKey?: Maybe<Scalars['String']['output']>;\n type: Scalars['String']['output'];\n};\n\nexport type PublishIssueNodeLabel = {\n __typename?: 'PublishIssueNodeLabel';\n identifier?: Maybe<Scalars['String']['output']>;\n type?: Maybe<Scalars['String']['output']>;\n};\n\nexport type PublishStatus = {\n __typename?: 'PublishStatus';\n code?: Maybe<Scalars['String']['output']>;\n message?: Maybe<Scalars['String']['output']>;\n output?: Maybe<Scalars['String']['output']>;\n};\n\nexport type PublishStatusState = {\n __typename?: 'PublishStatusState';\n deletedModelsAndFields?: Maybe<DeletedModelsAndFields>;\n issues: Array<PublishIssue>;\n progress: Scalars['String']['output'];\n publishStarted: Scalars['Boolean']['output'];\n remoteFilesVersion: Scalars['String']['output'];\n status?: Maybe<PublishStatus>;\n};\n\nexport type Query = {\n __typename?: 'Query';\n apiUpgradeConvergePlan?: Maybe<ApiUpgradeConvergePlanResult>;\n appDomains: Array<AppDomain>;\n backgroundAction?: Maybe<BackgroundAction>;\n backgroundActions: BackgroundActionConnection;\n currentSession?: Maybe<Session>;\n currentUser: User;\n environmentTreeChildKeys: Array<Scalars['String']['output']>;\n environmentTreePath?: Maybe<Scalars['JSON']['output']>;\n environments: Array<Environment>;\n fileSyncComparisonHashes: FileSyncComparisonHashes;\n fileSyncFiles: FileSyncFiles;\n fileSyncHashes: FileSyncHashes;\n /** Meta information about the application, like it's name, schema, and other internal details. */\n gadgetMeta: GadgetApplicationMeta;\n identifySupportConversation?: Maybe<IdentifySupportConversationResult>;\n initialSnapshot: Scalars['JSON']['output'];\n internal?: Maybe<InternalQueries>;\n /** @deprecated use team */\n listContributors: Array<ContributorResult>;\n logsSearch: LogSearchResult;\n platformAccessTokens: Array<AccessToken>;\n publishIssues: Array<PublishIssue>;\n remoteFilesVersion: Scalars['String']['output'];\n roles: Array<GadgetRole>;\n runTestSupportFunction?: Maybe<Scalars['JSON']['output']>;\n session?: Maybe<Session>;\n sessions: SessionConnection;\n team: TeamResult;\n typesManifest: TypesManifest;\n};\n\n\nexport type QueryApiUpgradeConvergePlanArgs = {\n currentVersion: Scalars['String']['input'];\n targetVersion: Scalars['String']['input'];\n};\n\n\nexport type QueryBackgroundActionArgs = {\n id: Scalars['String']['input'];\n};\n\n\nexport type QueryBackgroundActionsArgs = {\n filter?: InputMaybe<BackgroundActionFilter>;\n page?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryEnvironmentTreeChildKeysArgs = {\n path: Scalars['String']['input'];\n};\n\n\nexport type QueryEnvironmentTreePathArgs = {\n hydrateChildrenGlobs?: InputMaybe<Array<Scalars['String']['input']>>;\n path: Scalars['String']['input'];\n};\n\n\nexport type QueryFileSyncComparisonHashesArgs = {\n filesVersion: Scalars['String']['input'];\n};\n\n\nexport type QueryFileSyncFilesArgs = {\n encoding?: InputMaybe<FileSyncEncoding>;\n filesVersion?: InputMaybe<Scalars['String']['input']>;\n paths: Array<Scalars['String']['input']>;\n};\n\n\nexport type QueryFileSyncHashesArgs = {\n filesVersion?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryLogsSearchArgs = {\n direction?: InputMaybe<Scalars['String']['input']>;\n end?: InputMaybe<Scalars['DateTime']['input']>;\n limit?: InputMaybe<Scalars['Int']['input']>;\n query: Scalars['String']['input'];\n start?: InputMaybe<Scalars['DateTime']['input']>;\n step?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QuerySessionArgs = {\n id: Scalars['GadgetID']['input'];\n};\n\n\nexport type QuerySessionsArgs = {\n after?: InputMaybe<Scalars['String']['input']>;\n before?: InputMaybe<Scalars['String']['input']>;\n first?: InputMaybe<Scalars['Int']['input']>;\n last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryTypesManifestArgs = {\n dependenciesHash: Scalars['String']['input'];\n environmentStatus?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type RefreshScopesResult = {\n __typename?: 'RefreshScopesResult';\n success: Scalars['Boolean']['output'];\n};\n\nexport type RegisterWebhooksResult = {\n __typename?: 'RegisterWebhooksResult';\n success: Scalars['Boolean']['output'];\n};\n\nexport type RemoteFileSyncEvents = {\n __typename?: 'RemoteFileSyncEvents';\n changed: Array<FileSyncChangedEvent>;\n deleted: Array<FileSyncDeletedEvent>;\n remoteFilesVersion: Scalars['String']['output'];\n};\n\nexport type RemoveContributorResult = {\n __typename?: 'RemoveContributorResult';\n reason?: Maybe<Scalars['String']['output']>;\n success: Scalars['Boolean']['output'];\n};\n\n/** A named group of permissions granted to a particular actor in the system. Managed in the Gadget editor. */\nexport type Role = {\n __typename?: 'Role';\n /** The stable identifier for this role. Null if the role has since been deleted. */\n key: Scalars['String']['output'];\n /** The human readable name for this role. Can be changed. */\n name: Scalars['String']['output'];\n};\n\nexport type SendAppInvitationResult = {\n __typename?: 'SendAppInvitationResult';\n reason?: Maybe<Scalars['String']['output']>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type Session = {\n __typename?: 'Session';\n /** Get all the fields for this record. Useful for not having to list out all the fields you want to retrieve, but slower. */\n _all: Scalars['JSONObject']['output'];\n /** The time at which this record was first created. Set once upon record creation and never changed. Managed by Gadget. */\n createdAt: Scalars['DateTime']['output'];\n /** The globally unique, unchanging identifier for this record. Assigned and managed by Gadget. */\n id?: Maybe<Scalars['GadgetID']['output']>;\n roles?: Maybe<Array<Role>>;\n /** The time at which this record was last changed. Set each time the record is successfully acted upon by an action. Managed by Gadget. */\n updatedAt: Scalars['DateTime']['output'];\n};\n\n/** A connection to a list of Session items. */\nexport type SessionConnection = {\n __typename?: 'SessionConnection';\n /** A list of edges. */\n edges: Array<SessionEdge>;\n /** Information to aid in pagination. */\n pageInfo: PageInfo;\n};\n\n/** An edge in a Session connection. */\nexport type SessionEdge = {\n __typename?: 'SessionEdge';\n /** A cursor for use in pagination */\n cursor: Scalars['String']['output'];\n /** The item at the end of the edge */\n node: Session;\n};\n\nexport type SetFrameworkVersionResult = {\n __typename?: 'SetFrameworkVersionResult';\n installDependenciesOperationKey?: Maybe<Scalars['String']['output']>;\n};\n\n/** This Error object is returned for errors which don't have other specific handling. It has a message which is safe to display to users, but is often technical in nature. It also has a `code` field which is documented in the Gadget API Error Codes docs. */\nexport type SimpleError = ExecutionError & {\n __typename?: 'SimpleError';\n /** The Gadget platform error code for this error. */\n code: Scalars['String']['output'];\n /** The human facing error message for this error. */\n message: Scalars['String']['output'];\n /** The stack for any exception that caused the error */\n stack?: Maybe<Scalars['String']['output']>;\n};\n\nexport type Subscription = {\n __typename?: 'Subscription';\n environmentTreePathPatches?: Maybe<EnvironmentSubscriptionResult>;\n logsSearchV2: LogSearchResult;\n migrateGadgetV1Status?: Maybe<MigrateGadgetV1Status>;\n openBackgroundActions: Scalars['Int']['output'];\n publishStatus?: Maybe<PublishStatusState>;\n remoteFileSyncEvents: RemoteFileSyncEvents;\n reportClientPresence?: Maybe<Scalars['Boolean']['output']>;\n typesManifestStream: TypesManifest;\n};\n\n\nexport type SubscriptionEnvironmentTreePathPatchesArgs = {\n clientID: EnvironmentTreeClientId;\n path: Scalars['String']['input'];\n};\n\n\nexport type SubscriptionLogsSearchV2Args = {\n limit?: InputMaybe<Scalars['Int']['input']>;\n query: Scalars['String']['input'];\n start?: InputMaybe<Scalars['DateTime']['input']>;\n};\n\n\nexport type SubscriptionPublishStatusArgs = {\n allowCharges?: InputMaybe<Scalars['Boolean']['input']>;\n allowDeletedData?: InputMaybe<Scalars['Boolean']['input']>;\n force?: InputMaybe<Scalars['Boolean']['input']>;\n localFilesVersion: Scalars['String']['input'];\n};\n\n\nexport type SubscriptionRemoteFileSyncEventsArgs = {\n encoding?: InputMaybe<FileSyncEncoding>;\n localFilesVersion: Scalars['String']['input'];\n};\n\n\nexport type SubscriptionReportClientPresenceArgs = {\n clientID: EnvironmentTreeClientId;\n};\n\nexport type TeamEntitlements = {\n __typename?: 'TeamEntitlements';\n openAICredits?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type TeamMember = {\n __typename?: 'TeamMember';\n contributesToApp: Scalars['Boolean']['output'];\n email: Scalars['String']['output'];\n};\n\nexport type TeamResult = {\n __typename?: 'TeamResult';\n availableSeats?: Maybe<Scalars['Int']['output']>;\n canPublish: Scalars['Boolean']['output'];\n costPerApplication?: Maybe<Scalars['String']['output']>;\n costPerSeat?: Maybe<Scalars['String']['output']>;\n includedApplications?: Maybe<Scalars['Int']['output']>;\n includedApplicationsRemaining?: Maybe<Scalars['Int']['output']>;\n maxApplications?: Maybe<Scalars['Int']['output']>;\n teamEntitlements: TeamEntitlements;\n teamMembers: Array<TeamMember>;\n};\n\nexport type TriggerRunShopifySyncResult = {\n __typename?: 'TriggerRunShopifySyncResult';\n failedShopIds: Array<Scalars['String']['output']>;\n success: Scalars['Boolean']['output'];\n successfulShopIds: Array<Scalars['String']['output']>;\n};\n\nexport type TypeManifestEntry = {\n __typename?: 'TypeManifestEntry';\n declaration: Scalars['String']['output'];\n path: Scalars['String']['output'];\n};\n\nexport type TypesManifest = {\n __typename?: 'TypesManifest';\n cdn: Array<Scalars['String']['output']>;\n dependenciesHash: Scalars['String']['output'];\n entries: Array<TypeManifestEntry>;\n environmentVersion: Scalars['Int']['output'];\n};\n\nexport type UninstallShopResult = {\n __typename?: 'UninstallShopResult';\n reason?: Maybe<Scalars['String']['output']>;\n success: Scalars['Boolean']['output'];\n};\n\nexport type UnregisterWebhooksResult = {\n __typename?: 'UnregisterWebhooksResult';\n success: Scalars['Boolean']['output'];\n};\n\nexport type UploadFile = {\n file: Scalars['Upload']['input'];\n path: Scalars['String']['input'];\n};\n\nexport type UploadFilesResult = {\n __typename?: 'UploadFilesResult';\n success: Scalars['Boolean']['output'];\n};\n\nexport type UploadTemplateAssetResult = {\n __typename?: 'UploadTemplateAssetResult';\n success: Scalars['Boolean']['output'];\n url?: Maybe<Scalars['String']['output']>;\n};\n\nexport type User = {\n __typename?: 'User';\n email: Scalars['String']['output'];\n name?: Maybe<Scalars['String']['output']>;\n};\n\nexport type GadgetMetaModelsQueryVariables = Exact<{ [key: string]: never; }>;\n\n\nexport type GadgetMetaModelsQuery = { __typename?: 'Query', gadgetMeta: { __typename?: 'GadgetApplicationMeta', models: Array<{ __typename?: 'GadgetModel', apiIdentifier: string, namespace?: Array<string> | null }> } };\n\nexport type GadgetMetaGlobalActionsQueryVariables = Exact<{ [key: string]: never; }>;\n\n\nexport type GadgetMetaGlobalActionsQuery = { __typename?: 'Query', gadgetMeta: { __typename?: 'GadgetApplicationMeta', globalActions: Array<{ __typename?: 'GadgetGlobalAction', apiIdentifier: string, namespace?: Array<string> | null }> } };\n\nexport type EnvironmentLogsSubscriptionVariables = Exact<{\n query: Scalars['String']['input'];\n start?: InputMaybe<Scalars['DateTime']['input']>;\n limit?: InputMaybe<Scalars['Int']['input']>;\n}>;\n\n\nexport type EnvironmentLogsSubscription = { __typename?: 'Subscription', logsSearchV2: { __typename?: 'LogSearchResult', status: string, data: { [key: string]: any } } };\n\nexport type RemoteFileSyncEventsSubscriptionVariables = Exact<{\n localFilesVersion: Scalars['String']['input'];\n}>;\n\n\nexport type RemoteFileSyncEventsSubscription = { __typename?: 'Subscription', remoteFileSyncEvents: { __typename?: 'RemoteFileSyncEvents', remoteFilesVersion: string, changed: Array<{ __typename?: 'FileSyncChangedEvent', path: string, mode: number, content: string, encoding: FileSyncEncoding }>, deleted: Array<{ __typename?: 'FileSyncDeletedEvent', path: string }> } };\n\nexport type RemoteFilesVersionQueryVariables = Exact<{ [key: string]: never; }>;\n\n\nexport type RemoteFilesVersionQuery = { __typename?: 'Query', remoteFilesVersion: string };\n\nexport type PublishFileSyncEventsMutationVariables = Exact<{\n input: PublishFileSyncEventsInput;\n}>;\n\n\nexport type PublishFileSyncEventsMutation = { __typename?: 'Mutation', publishFileSyncEvents: { __typename?: 'PublishFileSyncEventsResult', remoteFilesVersion: string, problems: Array<{ __typename?: 'Problem', level: string, message: string, path: string, type: string }> } };\n\nexport type FileSyncFilesQueryVariables = Exact<{\n paths: Array<Scalars['String']['input']> | Scalars['String']['input'];\n filesVersion?: InputMaybe<Scalars['String']['input']>;\n encoding?: InputMaybe<FileSyncEncoding>;\n}>;\n\n\nexport type FileSyncFilesQuery = { __typename?: 'Query', fileSyncFiles: { __typename?: 'FileSyncFiles', filesVersion: string, files: Array<{ __typename?: 'FileSyncFile', path: string, mode: number, content: string, encoding: FileSyncEncoding }> } };\n\nexport type FileSyncHashesQueryVariables = Exact<{\n filesVersion?: InputMaybe<Scalars['String']['input']>;\n}>;\n\n\nexport type FileSyncHashesQuery = { __typename?: 'Query', fileSyncHashes: { __typename?: 'FileSyncHashes', filesVersion: string, hashes: { [key: string]: any } } };\n\nexport type FileSyncComparisonHashesQueryVariables = Exact<{\n filesVersion: Scalars['String']['input'];\n}>;\n\n\nexport type FileSyncComparisonHashesQuery = { __typename?: 'Query', fileSyncComparisonHashes: { __typename?: 'FileSyncComparisonHashes', filesVersionHashes: { __typename?: 'FileSyncHashes', filesVersion: string, hashes: { [key: string]: any } }, latestFilesVersionHashes: { __typename?: 'FileSyncHashes', filesVersion: string, hashes: { [key: string]: any } } } };\n\nexport type PublishStatusSubscriptionVariables = Exact<{\n localFilesVersion: Scalars['String']['input'];\n force?: InputMaybe<Scalars['Boolean']['input']>;\n allowCharges?: InputMaybe<Scalars['Boolean']['input']>;\n allowDeletedData?: InputMaybe<Scalars['Boolean']['input']>;\n}>;\n\n\nexport type PublishStatusSubscription = { __typename?: 'Subscription', publishStatus?: { __typename?: 'PublishStatusState', publishStarted: boolean, remoteFilesVersion: string, progress: string, issues: Array<{ __typename?: 'PublishIssue', severity: string, message: string, node?: { __typename?: 'PublishIssueNode', type: string, key: string, apiIdentifier?: string | null, name?: string | null, fieldType?: string | null, parentKey?: string | null, parentApiIdentifier?: string | null } | null, nodeLabels?: Array<{ __typename?: 'PublishIssueNodeLabel', type?: string | null, identifier?: string | null } | null> | null }>, deletedModelsAndFields?: { __typename?: 'DeletedModelsAndFields', deletedModels: Array<string>, deletedModelFields: Array<{ __typename?: 'DeletedModelFieldsSummary', modelIdentifier: string, fields: Array<string> }> } | null, status?: { __typename?: 'PublishStatus', code?: string | null, message?: string | null, output?: string | null } | null } | null };\n\nexport type CreateModelMutationVariables = Exact<{\n path: Scalars['String']['input'];\n fields?: InputMaybe<Array<CreateModelFieldsInput> | CreateModelFieldsInput>;\n}>;\n\n\nexport type CreateModelMutation = { __typename?: 'Mutation', createModel: { __typename?: 'RemoteFileSyncEvents', remoteFilesVersion: string, changed: Array<{ __typename?: 'FileSyncChangedEvent', path: string, mode: number, content: string, encoding: FileSyncEncoding }> } };\n\nexport type CreateActionMutationVariables = Exact<{\n path: Scalars['String']['input'];\n}>;\n\n\nexport type CreateActionMutation = { __typename?: 'Mutation', createAction: { __typename?: 'RemoteFileSyncEvents', remoteFilesVersion: string, changed: Array<{ __typename?: 'FileSyncChangedEvent', path: string, mode: number, content: string, encoding: FileSyncEncoding }> } };\n\nexport type CreateRouteMutationVariables = Exact<{\n method: Scalars['String']['input'];\n path: Scalars['String']['input'];\n}>;\n\n\nexport type CreateRouteMutation = { __typename?: 'Mutation', createRoute: { __typename?: 'RemoteFileSyncEvents', remoteFilesVersion: string, changed: Array<{ __typename?: 'FileSyncChangedEvent', path: string, mode: number, content: string, encoding: FileSyncEncoding }> } };\n\nexport type CreateModelFieldsMutationVariables = Exact<{\n path: Scalars['String']['input'];\n fields: Array<CreateModelFieldsInput> | CreateModelFieldsInput;\n}>;\n\n\nexport type CreateModelFieldsMutation = { __typename?: 'Mutation', createModelFields: { __typename?: 'RemoteFileSyncEvents', remoteFilesVersion: string, changed: Array<{ __typename?: 'FileSyncChangedEvent', path: string, mode: number, content: string, encoding: FileSyncEncoding }> } };\n\nexport type CreateEnvironmentMutationVariables = Exact<{\n environment: EnvironmentInput;\n}>;\n\n\nexport type CreateEnvironmentMutation = { __typename?: 'Mutation', createEnvironment: { __typename?: 'Environment', slug: string, status: EnvironmentStatus } };\n"],
5
- "mappings": "ssBAAA,IAAAA,GAAAC,EAAA,CAAAC,GAAAC,KAAA,CAAAC,IAAAD,GAAO,QAAUE,GACjBA,GAAM,KAAOC,GAEb,IAAIC,GAAK,EAAQ,IAAI,EAErB,SAASC,GAAcC,EAAMC,EAAS,CACpC,IAAIC,EAAUD,EAAQ,UAAY,OAChCA,EAAQ,QAAU,QAAQ,IAAI,QAOhC,GALI,CAACC,IAILA,EAAUA,EAAQ,MAAM,GAAG,EACvBA,EAAQ,QAAQ,EAAE,IAAM,IAC1B,MAAO,GAET,QAASC,EAAI,EAAGA,EAAID,EAAQ,OAAQC,IAAK,CACvC,IAAIC,EAAIF,EAAQC,CAAC,EAAE,YAAY,EAC/B,GAAIC,GAAKJ,EAAK,OAAO,CAACI,EAAE,MAAM,EAAE,YAAY,IAAMA,EAChD,MAAO,EAEX,CACA,MAAO,EACT,CAnBSC,EAAAN,GAAA,gBAqBT,SAASO,GAAWC,EAAMP,EAAMC,EAAS,C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,KAAK,UACL,OAAO,GACP,OAAO,YACP,YAAY,wBACZ,SAAS,OACT,EACA,CACA,KAAK,UACL,OAAO,GACP,OAAO,YACP,YAAY,mBACZ,SAAS,OACT,EACA,CACA,KAAK,UACL,OAAO,GACP,OAAO,YACP,YAAY,cACZ,SAAS,MACT,EACA,CACA,KAAK,YACL,OAAO,GACP,OAAO,YACP,YAAY,+BACZ,SAAS,OACT,EACA,CACA,KAAK,UACL,OAAO,GACP,OAAO,SACP,YAAY,+CACZ,SAAS,OACT,EACA,CACA,KAAK,SACL,OAAO,GACP,OAAO,SACP,YAAY,+CACZ,SAAS,OACT,EACA,CACA,KAAK,UACL,OAAO,GACP,OAAO,UACP,YAAY,WACZ,SAAS,QACT,OAAO,EACP,EACA,CACA,KAAK,UACL,OAAO,GACP,OAAO,QACP,YAAY,SACZ,SAAS,QACT,OAAO,EACP,EACA,CACA,KAAK,UACL,OAAO,GACP,OAAO,QACP,YAAY,mCACZ,SAAS,OACT,EACA,CACA,KAAK,UACL,OAAO,GACP,OAAO,QACP,YAAY,gDACZ,SAAS,OACT,EACA,CACA,KAAK,WACL,OAAO,GACP,OAAO,YACP,YAAY,oCACZ,SAAS,OACT,EACA,CACA,KAAK,UACL,OAAO,GACP,OAAO,QACP,YAAY,qDACZ,SAAS,OACT,EACA,CACA,KAAK,SACL,OAAO,GACP,OAAO,SACP,YAAY,mCACZ,SAAS,KACT,EACA,CACA,KAAK,UACL,OAAO,GACP,OAAO,OACP,YAAY,oBACZ,SAAS,KACT,EACA,CACA,KAAK,UACL,OAAO,GACP,OAAO,OACP,YAAY,eACZ,SAAS,KACT,EACA,CACA,KAAK,YACL,OAAO,GACP,OAAO,YACP,YAAY,mBACZ,SAAS,KACT,EACA,CACA,KAAK,UACL,OAAO,GACP,OAAO,YACP,YAAY,mBACZ,SAAS,KACT,EACA,CACA,KAAK,WACL,OAAO,GACP,OAAO,SACP,YAAY,+BACZ,SAAS,KACT,EACA,CACA,KAAK,QACL,OAAO,GACP,O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AQT,EAAQ,OAASC,EAAQ,MAAM,CAAC,KAAKO,EAAO,UAAU,GAClG,GAAGhC,CACL,CAAC,CACH,CAAC,EAED,GAAI,CACF,GAAM,CACJ,sBAAuB,CAAE,mBAAA0B,EAAoB,SAAU6D,CAAiB,CAC1E,EAAI,MAAM,KAAK,SAAS,KAAK,OAAO,CAClC,SAAUC,GACV,UAAW,CACT,MAAO,CACL,2BAA4B,OAAOR,CAAoB,EACvD,QAAAxD,EACA,QAAAC,CACF,CACF,EACA,KAAM,CACJ,MAAO,CAGL,QAAS,CAAC,MAAM,EAChB,eAAgB1D,EAAA,CAAC,CAAE,MAAA2B,EAAO,cAAA+F,CAAc,IAClCC,GAA4BhG,EAAM,UAAU,IAAI,EAE3C,EAEF+F,EALO,iBAOlB,CACF,CACF,CAAC,EAED,GAAI,OAAO/D,CAAkB,EAAIsD,EAAuB,GAGtD,MAAM,IAAI,MAAM,wBAAwB,EAG1C,MAAM,KAAK,SAAS,KAAKtD,CAAkB,EAE3CvD,EAAQ,QACNyG,EAAc3G,EAAK,CACjB,QAAA8B,EACA,MAAO,OACP,MAAOgC,cAAkB,EAAAE,SAAU,OAAQT,EAAQ,OAASC,EAAQ,MAAM,CAAC,KAAKO,EAAO,UAAU,IAAIvC,EAAG,CAAC,GACzG,GAAGO,CACL,CAAC,CACH,EAEIuF,EAAiB,OAAS,GAC5BzF,EAAQ,CACN,qBAAsB,GACtB,QAASD;AAAA;AAAA;AAAA,cAGL8F,GAAe,CACf,SAAUC,GAA2BL,CAAgB,EACrD,cAAe,GACf,OAAQ,EACV,CAAC,CAAC;AAAA;AAAA;AAAA,WAIN,CAAC,CAEL,OAAS7F,EAAO,CACd,MAAIgG,GAA4BhG,CAAK,EACnCvB,EAAQ,MAAM,EAEdA,EAAQ,KAAK,EAGTuB,CACR,CACF,CACF",
6
- "names": ["require_windows", "__commonJSMin", "exports", "module", "init_cjs", "isexe", "sync", "fs", "checkPathExt", "path", "options", "pathext", "i", "p", "__name", "checkStat", "stat", "cb", "er", "require_mode", "__commonJSMin", "exports", "module", "init_cjs", "isexe", "sync", "fs", "path", "options", "cb", "er", "stat", "checkStat", "__name", "checkMode", "mod", "uid", "gid", "myUid", "myGid", "u", "g", "o", "ug", "ret", "require_isexe", "__commonJSMin", "exports", "module", "init_cjs", "fs", "core", "isexe", "sync", "path", "options", "cb", "resolve", "reject", "er", "is", "__name", "require_which", "__commonJSMin", "exports", "module", "init_cjs", "isWindows", "path", "COLON", "isexe", "getNotFoundError", "__name", "cmd", "getPathInfo", "opt", "colon", "pathEnv", "pathExtExe", "pathExt", "which", "cb", "found", "step", "i", "resolve", "reject", "ppRaw", "pathPart", "pCmd", "p", "subStep", "ii", "ext", "er", "is", "res", "whichSync", "j", "cur", "require_path_key", "__commonJSMin", "exports", "module", "init_cjs", "pathKey", "__name", "options", "environment", "key", "require_resolveCommand", "__commonJSMin", "exports", "module", "init_cjs", "path", "which", "getPathKey", "resolveCommandAttempt", "parsed", "withoutPathExt", "env", "cwd", "hasCustomCwd", "shouldSwitchCwd", "resolved", "__name", "resolveCommand", "require_escape", "__commonJSMin", "exports", "module", "init_cjs", "metaCharsRegExp", "escapeCommand", "arg", "__name", "escapeArgument", "doubleEscapeMetaChars", "require_shebang_regex", "__commonJSMin", "exports", "module", "init_cjs", "require_shebang_command", "__commonJSMin", "exports", "module", "init_cjs", "shebangRegex", "string", "match", "path", "argument", "binary", "require_readShebang", "__commonJSMin", "exports", "module", "init_cjs", "fs", "shebangCommand", "readShebang", "command", "buffer", "fd", "__name", "require_parse", "__commonJSMin", "exports", "module", "init_cjs", "path", "resolveCommand", "escape", "readShebang", "isWin", "isExecutableRegExp", "isCmdShimRegExp", "detectShebang", "parsed", "shebang", "__name", "parseNonShell", "commandFile", "needsShell", "needsDoubleEscapeMetaChars", "arg", "shellCommand", "parse", "command", "args", "options", "require_enoent", "__commonJSMin", "exports", "module", "init_cjs", "isWin", "notFoundError", "original", "syscall", "__name", "hookChildProcess", "cp", "parsed", "originalEmit", "name", "arg1", "err", "verifyENOENT", "status", "verifyENOENTSync", "require_cross_spawn", "__commonJSMin", "exports", "module", "init_cjs", "cp", "parse", "enoent", "spawn", "command", "args", "options", "parsed", "spawned", "__name", "spawnSync", "result", "require_merge_stream", "__commonJSMin", "exports", "module", "init_cjs", "PassThrough", "sources", "output", "add", "isEmpty", "remove", "source", "__name", "it", "require_retry_operation", "__commonJSMin", "exports", "module", "init_cjs", "RetryOperation", "timeouts", "options", "__name", "err", "currentTime", "timeout", "self", "fn", "timeoutOps", "counts", "mainError", "mainErrorCount", "i", "error", "message", "count", "require_retry", "__commonJSMin", "exports", "init_cjs", "RetryOperation", "options", "timeouts", "opts", "key", "i", "a", "b", "attempt", "random", "timeout", "obj", "methods", "method", "original", "__name", "op", "args", "callback", "err", "require_retry", "__commonJSMin", "exports", "module", "init_cjs", "init_cjs", "import_pluralize", "Changes", "__name", "memo", "change", "path", "createdSymbol", "source_default", "updatedSymbol", "deletedSymbol", "renameSymbol", "sprintChanges", "_ctx", "changes", "tense", "limit", "tableOptions", "config", "Level", "changesToPrint", "filepath", "renamed", "created", "updated", "deleted", "rows", "a", "b", "isString", "isNever", "symbol", "sprint", "footer", "breakdown", "createdCount", "pluralize", "updatedCount", "deletedCount", "sprintln", "sprintTable", "printChanges", "options", "text", "println", "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", "init_cjs", "import_dayjs", "init_cjs", "parseBoolean", "memo", "MemoFirstArg", "value", "ts", "__name", "env", "parseBoolean", "source_default", "dayjs", "init_cjs", "init_cjs", "assert", "ChangesWithHash", "__name", "change", "path", "getNecessaryChanges", "ctx", "source", "target", "existing", "ignore", "changes", "targetPaths", "sourcePath", "sourceHash", "ignored", "targetHash", "isEqualHash", "targetPath", "assert", "withoutUnnecessaryChanges", "necessaryChanges", "existingHash", "_path", "aHash", "bHash", "isEqualHashes", "a", "b", "aPath", "bPath", "Conflicts", "__name", "getConflicts", "localChanges", "environmentChanges", "conflicts", "filepath", "localChange", "gadgetChange", "isEqualHash", "withoutConflictingChanges", "changes", "changesWithoutConflicts", "ChangesWithHash", "printConflicts", "created", "source_default", "updated", "deleted", "printTable", "a", "b", "path", "init_cjs", "FileSyncStrategy", "MergeConflictPreference", "sprint", "MergeConflictPreferenceArg", "__name", "value", "name", "ArgError", "init_cjs", "init_cjs", "import_cross_spawn", "Buffer", "path", "childProcess", "process", "init_cjs", "stripFinalNewline", "input", "LF", "CR", "__name", "init_cjs", "process", "path", "fileURLToPath", "init_cjs", "pathKey", "options", "env", "platform", "key", "__name", "npmRunPath", "__name", "cwd", "process", "pathOption", "pathKey", "preferLocal", "execPath", "addExecPath", "cwdString", "fileURLToPath", "cwdPath", "path", "result", "applyPreferLocal", "applyExecPath", "previous", "execPathString", "npmRunPathEnv", "env", "options", "pathName", "init_cjs", "init_cjs", "copyProperty", "__name", "to", "from", "property", "ignoreNonConfigurable", "toDescriptor", "fromDescriptor", "canCopyProperty", "changePrototype", "fromPrototype", "wrappedToString", "withName", "fromBody", "toStringDescriptor", "toStringName", "changeToString", "name", "newToString", "mimicFunction", "calledFunctions", "onetime", "__name", "function_", "options", "returnValue", "callCount", "functionName", "arguments_", "mimicFunction", "onetime_default", "init_cjs", "process", "init_cjs", "constants", "init_cjs", "getRealtimeSignals", "__name", "length", "SIGRTMAX", "SIGRTMIN", "getRealtimeSignal", "value", "index", "init_cjs", "constants", "init_cjs", "SIGNALS", "getSignals", "__name", "realtimeSignals", "getRealtimeSignals", "SIGNALS", "normalizeSignal", "name", "defaultNumber", "description", "action", "forced", "standard", "constantSignal", "constants", "supported", "getSignalsByName", "__name", "signals", "getSignals", "getSignalByName", "name", "number", "description", "supported", "action", "forced", "standard", "signalsByName", "getSignalsByNumber", "length", "SIGRTMAX", "signalsA", "value", "getSignalByNumber", "signal", "findSignalByNumber", "constants", "signalA", "signalsByNumber", "getErrorPrefix", "__name", "timedOut", "timeout", "errorCode", "signal", "signalDescription", "exitCode", "isCanceled", "makeError", "stdout", "stderr", "all", "error", "command", "escapedCommand", "killed", "cwd", "process", "signalsByName", "execaMessage", "isError", "shortMessage", "message", "init_cjs", "aliases", "hasAlias", "__name", "options", "alias", "normalizeStdio", "stdio", "length", "value", "index", "init_cjs", "os", "DEFAULT_FORCE_KILL_TIMEOUT", "spawnedKill", "__name", "kill", "signal", "options", "killResult", "setKillTimeout", "shouldForceKill", "timeout", "getForceKillAfterTimeout", "t", "forceKillAfterTimeout", "isSigterm", "os", "spawnedCancel", "spawned", "context", "timeoutKill", "reject", "setupTimeout", "killSignal", "spawnedPromise", "timeoutId", "timeoutPromise", "resolve", "safeSpawnedPromise", "validateTimeout", "setExitHandler", "cleanup", "detached", "timedPromise", "removeExitHandler", "onExit", "init_cjs", "createWriteStream", "ChildProcess", "init_cjs", "isStream", "stream", "__name", "isWritableStream", "isExecaChildProcess", "__name", "target", "ChildProcess", "pipeToTarget", "spawned", "streamName", "createWriteStream", "isWritableStream", "addPipeMethods", "init_cjs", "createReadStream", "readFileSync", "setTimeout", "init_cjs", "init_cjs", "init_cjs", "getStreamContents", "__name", "stream", "init", "convertChunk", "getSize", "truncateChunk", "addChunk", "getFinalChunk", "finalize", "maxBuffer", "isAsyncIterable", "state", "chunk", "chunkType", "getChunkType", "convertedChunk", "appendChunk", "appendFinalChunk", "error", "chunkSize", "newLength", "addNewChunk", "truncatedChunk", "MaxBufferError", "typeOfChunk", "prototypeName", "objectToString", "init_cjs", "identity", "__name", "value", "noop", "getContentsProp", "contents", "throwObjectStream", "chunk", "getLengthProp", "convertedChunk", "init_cjs", "getStreamAsArrayBuffer", "stream", "options", "getStreamContents", "arrayBufferMethods", "__name", "initArrayBuffer", "useTextEncoder", "chunk", "textEncoder", "useUint8Array", "useUint8ArrayWithOffset", "truncateArrayBufferChunk", "convertedChunk", "chunkSize", "addArrayBufferChunk", "contents", "previousLength", "length", "newContents", "hasArrayBufferResize", "resizeArrayBuffer", "resizeArrayBufferSlow", "arrayBuffer", "getNewContentsLength", "SCALE_FACTOR", "finalizeArrayBuffer", "throwObjectStream", "getLengthProp", "noop", "init_cjs", "getStreamAsBuffer", "stream", "options", "arrayBufferToNodeBuffer", "getStreamAsArrayBuffer", "error", "__name", "arrayBuffer", "init_cjs", "getStreamAsString", "stream", "options", "getStreamContents", "stringMethods", "__name", "initString", "useTextDecoder", "chunk", "textDecoder", "addStringChunk", "convertedChunk", "contents", "truncateStringChunk", "chunkSize", "getFinalStringChunk", "finalChunk", "identity", "throwObjectStream", "getLengthProp", "getContentsProp", "import_merge_stream", "validateInputOptions", "__name", "input", "getInputSync", "inputFile", "readFileSync", "handleInputSync", "options", "isStream", "getInput", "createReadStream", "handleInput", "spawned", "makeAllStream", "all", "mixed", "mergeStream", "getBufferedData", "stream", "streamPromise", "setTimeout", "error", "getStreamPromise", "encoding", "buffer", "maxBuffer", "getStreamAsString", "getStreamAsBuffer", "applyEncoding", "getSpawnedResult", "stdout", "stderr", "processDone", "stdoutPromise", "stderrPromise", "allPromise", "init_cjs", "nativePromisePrototype", "descriptors", "property", "mergePromise", "__name", "spawned", "promise", "descriptor", "value", "args", "getSpawnedPromise", "resolve", "reject", "exitCode", "signal", "error", "init_cjs", "Buffer", "ChildProcess", "normalizeArgs", "__name", "file", "args", "NO_ESCAPE_REGEXP", "escapeArg", "arg", "joinCommand", "getEscapedCommand", "SPACES_REGEXP", "parseExpression", "__name", "expression", "typeOfExpression", "ChildProcess", "typeOfStdout", "Buffer", "concatTokens", "tokens", "nextTokens", "isNew", "parseTemplate", "templates", "expressions", "index", "template", "templateString", "templateTokens", "SPACES_REGEXP", "newTokens", "expressionTokens", "parseTemplates", "init_cjs", "debuglog", "process", "verboseDefault", "debuglog", "padField", "__name", "field", "padding", "getTimestamp", "date", "logCommand", "escapedCommand", "verbose", "process", "DEFAULT_MAX_BUFFER", "getEnv", "__name", "envOption", "extendEnv", "preferLocal", "localDir", "execPath", "env", "process", "npmRunPathEnv", "handleArguments", "file", "args", "options", "parsed", "crossSpawn", "verboseDefault", "normalizeStdio", "path", "handleOutput", "value", "error", "Buffer", "stripFinalNewline", "execa", "command", "joinCommand", "escapedCommand", "getEscapedCommand", "logCommand", "validateTimeout", "spawned", "childProcess", "dummySpawned", "errorPromise", "makeError", "mergePromise", "spawnedPromise", "getSpawnedPromise", "timedPromise", "setupTimeout", "processDone", "setExitHandler", "context", "spawnedKill", "spawnedCancel", "handlePromiseOnce", "onetime_default", "exitCode", "signal", "timedOut", "stdoutResult", "stderrResult", "allResult", "getSpawnedResult", "stdout", "stderr", "all", "returnedError", "handleInput", "makeAllStream", "addPipeMethods", "execaSync", "input", "handleInputSync", "result", "normalizeScriptStdin", "inputFile", "stdio", "normalizeScriptOptions", "create$", "$", "templatesOrOptions", "expressions", "parseTemplates", "templates", "import_fs_extra", "import_ms", "assert", "path", "process", "init_cjs", "pMap", "iterable", "mapper", "concurrency", "stopOnError", "signal", "resolve_", "reject_", "result", "errors", "skippedIndexesMap", "isRejected", "isResolved", "isIterableDone", "resolvingCount", "currentIndex", "iterator", "signalListener", "__name", "reject", "cleanup", "resolve", "value", "reason", "next", "nextItem", "index", "pureResult", "pMapSkip", "element", "error", "pMapSkip", "init_cjs", "import_retry", "init_cjs", "objectToString", "isError", "__name", "value", "errorMessages", "isNetworkError", "error", "AbortError", "__name", "message", "decorateErrorWithCounts", "error", "attemptNumber", "options", "retriesLeft", "pRetry", "input", "resolve", "reject", "operation", "retry", "abortHandler", "cleanUp", "result", "isNetworkError", "finalError", "import_pluralize", "init_cjs", "MAX_MERGE_ATTEMPTS", "MAX_PUSH_ATTEMPTS", "MAX_PUSH_CONTENT_LENGTH", "FileSync", "syncJson", "__name", "PQueue", "ctx", "silent", "spinner", "spin", "localHashes", "localFilesVersionHashes", "environmentHashes", "environmentFilesVersion", "fileSyncHashes", "FILE_SYNC_HASHES_QUERY", "fileSyncComparisonHashes", "FILE_SYNC_COMPARISON_HASHES_QUERY", "inSync", "isEqualHashes", "localChanges", "getNecessaryChanges", "environmentChanges", "assert", "path", "localChangesToPush", "environmentChangesToPull", "onlyDotGadgetFilesChanged", "filepath", "bothChanged", "ts", "error", "hashes", "printChanges", "sprint", "println", "changes", "printLocalChangesOptions", "printEnvironmentChangesOptions", "swallowFilesVersionMismatch", "args", "onError", "logger", "createEnvironmentStructuredLogger", "includedLevels", "Level", "_", "value", "key", "ENVIRONMENT_LOGS_SUBSCRIPTION", "logsSearchV2", "log", "message", "msg", "name", "level", "fields", "beforeChanges", "noop", "afterChanges", "REMOTE_FILE_SYNC_EVENTS_SUBSCRIPTION", "changed", "deleted", "remoteFilesVersion", "change", "filterIgnoredFiles", "file", "ignored", "sprintln", "symbol", "pluralize", "prefer", "maxAttempts", "attempt", "TooManyMergeAttemptsError", "command", "EdgeCaseError", "TooManyPushAttemptsError", "force", "confirm", "options", "filesVersion", "Changes", "directoriesWithDeletedFiles", "pathToDelete", "dir", "currentPath", "backupPath", "pRetry", "fs", "isENOENTError", "isENOTDIRError", "isEEXISTError", "ms", "directoryWithDeletedFile", "isENOTEMPTYError", "pMap", "absolutePath", "supportsPermissions", "execa", "content", "serializeError", "preference", "conflicts", "getConflicts", "printConflicts", "select", "MergeConflictPreference", "source_default", "process", "withoutConflictingChanges", "created", "updated", "sprintChanges", "files", "fileSyncFiles", "FILE_SYNC_FILES_QUERY", "expectedFilesVersion", "normalizedPath", "stats", "swallowEnoent", "oldPath", "a", "b", "filesyncProblems", "PUBLISH_FILE_SYNC_EVENTS_MUTATION", "computedValue", "isFilesVersionMismatchError", "sprintProblems", "filesyncProblemsToProblems"]
7
- }