@gadgetinc/ggt 1.5.1 → 1.6.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 (71) hide show
  1. package/README.md +16 -0
  2. package/dist/{add-XHMGXWYX.js → add-FGXJSCE2.js} +2 -2
  3. package/dist/{add-XHMGXWYX.js.map → add-FGXJSCE2.js.map} +1 -1
  4. package/dist/{chunk-A75V6SNW.js → chunk-2CKK6A2Y.js} +2 -2
  5. package/dist/{chunk-A75V6SNW.js.map → chunk-2CKK6A2Y.js.map} +1 -1
  6. package/dist/{chunk-Z7JIVKEF.js → chunk-4WFO3NAS.js} +2 -2
  7. package/dist/{chunk-XOSBJSTW.js → chunk-5NCJDCIZ.js} +23 -23
  8. package/dist/{chunk-XOSBJSTW.js.map → chunk-5NCJDCIZ.js.map} +3 -3
  9. package/dist/{chunk-XE5GH5GR.js → chunk-72YIA2TT.js} +2 -2
  10. package/dist/chunk-F4S4AEEO.js +2 -0
  11. package/dist/chunk-F4S4AEEO.js.map +7 -0
  12. package/dist/chunk-I6BQ7MRE.js +116 -0
  13. package/dist/chunk-I6BQ7MRE.js.map +7 -0
  14. package/dist/chunk-IYQBG4II.js +7 -0
  15. package/dist/chunk-IYQBG4II.js.map +7 -0
  16. package/dist/chunk-JHWQLV6Y.js +2 -0
  17. package/dist/chunk-JHWQLV6Y.js.map +7 -0
  18. package/dist/{chunk-WQ4SFIE4.js → chunk-L2MG47NS.js} +2 -2
  19. package/dist/chunk-LPBWX353.js +50 -0
  20. package/dist/chunk-LPBWX353.js.map +7 -0
  21. package/dist/chunk-PA2LOSVH.js +18 -0
  22. package/dist/{chunk-KW4V2PJW.js.map → chunk-PA2LOSVH.js.map} +4 -4
  23. package/dist/chunk-SIAMHUOB.js +2 -0
  24. package/dist/{chunk-U5I2YBJK.js.map → chunk-SIAMHUOB.js.map} +2 -2
  25. package/dist/chunk-VJVFVZNR.js +12 -0
  26. package/dist/{chunk-5VLIBRPJ.js.map → chunk-VJVFVZNR.js.map} +4 -4
  27. package/dist/chunk-XK6JJEHJ.js +2 -0
  28. package/dist/chunk-XK6JJEHJ.js.map +7 -0
  29. package/dist/{chunk-HAYHNB7Q.js → chunk-YT2LSGNB.js} +2 -2
  30. package/dist/configure-L4U26WFP.js +12 -0
  31. package/dist/configure-L4U26WFP.js.map +7 -0
  32. package/dist/{deploy-QW6KPNDB.js → deploy-6JWXSMQJ.js} +2 -2
  33. package/dist/{deploy-QW6KPNDB.js.map → deploy-6JWXSMQJ.js.map} +1 -1
  34. package/dist/{dev-KUTYS7OU.js → dev-M2PFPQXX.js} +2 -2
  35. package/dist/{dev-KUTYS7OU.js.map → dev-M2PFPQXX.js.map} +1 -1
  36. package/dist/{list-OSMGHITM.js → list-LNXNHS2W.js} +2 -2
  37. package/dist/{list-OSMGHITM.js.map → list-LNXNHS2W.js.map} +1 -1
  38. package/dist/login-4F3H443A.js +2 -0
  39. package/dist/logout-JA5JBU3G.js +7 -0
  40. package/dist/{logout-XPKPHMRV.js.map → logout-JA5JBU3G.js.map} +1 -1
  41. package/dist/main.js +6 -6
  42. package/dist/main.js.map +3 -3
  43. package/dist/{open-SP5XOXPG.js → open-TWQBAPIT.js} +2 -2
  44. package/dist/{open-SP5XOXPG.js.map → open-TWQBAPIT.js.map} +1 -1
  45. package/dist/{pull-7JMGBM4A.js → pull-VWGETR4M.js} +2 -2
  46. package/dist/{pull-7JMGBM4A.js.map → pull-VWGETR4M.js.map} +1 -1
  47. package/dist/push-KWUMHQCJ.js +2 -0
  48. package/dist/{status-CJVN2UZ6.js → status-OYEFON4A.js} +2 -2
  49. package/dist/{status-CJVN2UZ6.js.map → status-OYEFON4A.js.map} +1 -1
  50. package/dist/{version-NFFT7WG5.js → version-4QPNJ5VH.js} +2 -2
  51. package/dist/whoami-TIGWXVEY.js +7 -0
  52. package/dist/{whoami-MU3POPXB.js.map → whoami-TIGWXVEY.js.map} +1 -1
  53. package/package.json +1 -1
  54. package/dist/chunk-3B2GY4UU.js +0 -121
  55. package/dist/chunk-3B2GY4UU.js.map +0 -7
  56. package/dist/chunk-5VLIBRPJ.js +0 -12
  57. package/dist/chunk-KW4V2PJW.js +0 -18
  58. package/dist/chunk-LPIHKY3M.js +0 -50
  59. package/dist/chunk-LPIHKY3M.js.map +0 -7
  60. package/dist/chunk-U5I2YBJK.js +0 -2
  61. package/dist/login-UU4MWB6Y.js +0 -2
  62. package/dist/logout-XPKPHMRV.js +0 -7
  63. package/dist/push-7S6V2HSB.js +0 -2
  64. package/dist/whoami-MU3POPXB.js +0 -7
  65. /package/dist/{chunk-Z7JIVKEF.js.map → chunk-4WFO3NAS.js.map} +0 -0
  66. /package/dist/{chunk-XE5GH5GR.js.map → chunk-72YIA2TT.js.map} +0 -0
  67. /package/dist/{chunk-WQ4SFIE4.js.map → chunk-L2MG47NS.js.map} +0 -0
  68. /package/dist/{chunk-HAYHNB7Q.js.map → chunk-YT2LSGNB.js.map} +0 -0
  69. /package/dist/{login-UU4MWB6Y.js.map → login-4F3H443A.js.map} +0 -0
  70. /package/dist/{push-7S6V2HSB.js.map → push-KWUMHQCJ.js.map} +0 -0
  71. /package/dist/{version-NFFT7WG5.js.map → version-4QPNJ5VH.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../node_modules/.pnpm/ignore@6.0.2/node_modules/ignore/index.js", "../node_modules/.pnpm/normalize-path@3.0.0/node_modules/normalize-path/index.js", "../src/services/user/session.ts", "../src/services/filesync/directory.ts"],
4
- "sourcesContent": ["// A simple implementation of make-array\nfunction makeArray (subject) {\n return Array.isArray(subject)\n ? subject\n : [subject]\n}\n\nconst EMPTY = ''\nconst SPACE = ' '\nconst ESCAPE = '\\\\'\nconst REGEX_TEST_BLANK_LINE = /^\\s+$/\nconst REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\\\]|^)\\\\$/\nconst REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\\\!/\nconst REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\\\#/\nconst REGEX_SPLITALL_CRLF = /\\r?\\n/g\n// /foo,\n// ./foo,\n// ../foo,\n// .\n// ..\nconst REGEX_TEST_INVALID_PATH = /^\\.*\\/|^\\.+$/\n\nconst SLASH = '/'\n\n// Do not use ternary expression here, since \"istanbul ignore next\" is buggy\nlet TMP_KEY_IGNORE = 'node-ignore'\n/* istanbul ignore else */\nif (typeof Symbol !== 'undefined') {\n TMP_KEY_IGNORE = Symbol.for('node-ignore')\n}\nconst KEY_IGNORE = TMP_KEY_IGNORE\n\nconst define = (object, key, value) =>\n Object.defineProperty(object, key, {value})\n\nconst REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g\n\nconst RETURN_FALSE = () => false\n\n// Sanitize the range of a regular expression\n// The cases are complicated, see test cases for details\nconst sanitizeRange = range => range.replace(\n REGEX_REGEXP_RANGE,\n (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0)\n ? match\n // Invalid range (out of order) which is ok for gitignore rules but\n // fatal for JavaScript regular expression, so eliminate it.\n : EMPTY\n)\n\n// See fixtures #59\nconst cleanRangeBackSlash = slashes => {\n const {length} = slashes\n return slashes.slice(0, length - length % 2)\n}\n\n// > If the pattern ends with a slash,\n// > it is removed for the purpose of the following description,\n// > but it would only find a match with a directory.\n// > In other words, foo/ will match a directory foo and paths underneath it,\n// > but will not match a regular file or a symbolic link foo\n// > (this is consistent with the way how pathspec works in general in Git).\n// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`'\n// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call\n// you could use option `mark: true` with `glob`\n\n// '`foo/`' should not continue with the '`..`'\nconst REPLACERS = [\n\n [\n // remove BOM\n // TODO:\n // Other similar zero-width characters?\n /^\\uFEFF/,\n () => EMPTY\n ],\n\n // > Trailing spaces are ignored unless they are quoted with backslash (\"\\\")\n [\n // (a\\ ) -> (a )\n // (a ) -> (a)\n // (a ) -> (a)\n // (a \\ ) -> (a )\n /((?:\\\\\\\\)*?)(\\\\?\\s+)$/,\n (_, m1, m2) => m1 + (\n m2.indexOf('\\\\') === 0\n ? SPACE\n : EMPTY\n )\n ],\n\n // replace (\\ ) with ' '\n // (\\ ) -> ' '\n // (\\\\ ) -> '\\\\ '\n // (\\\\\\ ) -> '\\\\ '\n [\n /(\\\\+?)\\s/g,\n (_, m1) => {\n const {length} = m1\n return m1.slice(0, length - length % 2) + SPACE\n }\n ],\n\n // Escape metacharacters\n // which is written down by users but means special for regular expressions.\n\n // > There are 12 characters with special meanings:\n // > - the backslash \\,\n // > - the caret ^,\n // > - the dollar sign $,\n // > - the period or dot .,\n // > - the vertical bar or pipe symbol |,\n // > - the question mark ?,\n // > - the asterisk or star *,\n // > - the plus sign +,\n // > - the opening parenthesis (,\n // > - the closing parenthesis ),\n // > - and the opening square bracket [,\n // > - the opening curly brace {,\n // > These special characters are often called \"metacharacters\".\n [\n /[\\\\$.|*+(){^]/g,\n match => `\\\\${match}`\n ],\n\n [\n // > a question mark (?) matches a single character\n /(?!\\\\)\\?/g,\n () => '[^/]'\n ],\n\n // leading slash\n [\n\n // > A leading slash matches the beginning of the pathname.\n // > For example, \"/*.c\" matches \"cat-file.c\" but not \"mozilla-sha1/sha1.c\".\n // A leading slash matches the beginning of the pathname\n /^\\//,\n () => '^'\n ],\n\n // replace special metacharacter slash after the leading slash\n [\n /\\//g,\n () => '\\\\/'\n ],\n\n [\n // > A leading \"**\" followed by a slash means match in all directories.\n // > For example, \"**/foo\" matches file or directory \"foo\" anywhere,\n // > the same as pattern \"foo\".\n // > \"**/foo/bar\" matches file or directory \"bar\" anywhere that is directly\n // > under directory \"foo\".\n // Notice that the '*'s have been replaced as '\\\\*'\n /^\\^*\\\\\\*\\\\\\*\\\\\\//,\n\n // '**/foo' <-> 'foo'\n () => '^(?:.*\\\\/)?'\n ],\n\n // starting\n [\n // there will be no leading '/'\n // (which has been replaced by section \"leading slash\")\n // If starts with '**', adding a '^' to the regular expression also works\n /^(?=[^^])/,\n function startingReplacer () {\n // If has a slash `/` at the beginning or middle\n return !/\\/(?!$)/.test(this)\n // > Prior to 2.22.1\n // > If the pattern does not contain a slash /,\n // > Git treats it as a shell glob pattern\n // Actually, if there is only a trailing slash,\n // git also treats it as a shell glob pattern\n\n // After 2.22.1 (compatible but clearer)\n // > If there is a separator at the beginning or middle (or both)\n // > of the pattern, then the pattern is relative to the directory\n // > level of the particular .gitignore file itself.\n // > Otherwise the pattern may also match at any level below\n // > the .gitignore level.\n ? '(?:^|\\\\/)'\n\n // > Otherwise, Git treats the pattern as a shell glob suitable for\n // > consumption by fnmatch(3)\n : '^'\n }\n ],\n\n // two globstars\n [\n // Use lookahead assertions so that we could match more than one `'/**'`\n /\\\\\\/\\\\\\*\\\\\\*(?=\\\\\\/|$)/g,\n\n // Zero, one or several directories\n // should not use '*', or it will be replaced by the next replacer\n\n // Check if it is not the last `'/**'`\n (_, index, str) => index + 6 < str.length\n\n // case: /**/\n // > A slash followed by two consecutive asterisks then a slash matches\n // > zero or more directories.\n // > For example, \"a/**/b\" matches \"a/b\", \"a/x/b\", \"a/x/y/b\" and so on.\n // '/**/'\n ? '(?:\\\\/[^\\\\/]+)*'\n\n // case: /**\n // > A trailing `\"/**\"` matches everything inside.\n\n // #21: everything inside but it should not include the current folder\n : '\\\\/.+'\n ],\n\n // normal intermediate wildcards\n [\n // Never replace escaped '*'\n // ignore rule '\\*' will match the path '*'\n\n // 'abc.*/' -> go\n // 'abc.*' -> skip this rule,\n // coz trailing single wildcard will be handed by [trailing wildcard]\n /(^|[^\\\\]+)(\\\\\\*)+(?=.+)/g,\n\n // '*.js' matches '.js'\n // '*.js' doesn't match 'abc'\n (_, p1, p2) => {\n // 1.\n // > An asterisk \"*\" matches anything except a slash.\n // 2.\n // > Other consecutive asterisks are considered regular asterisks\n // > and will match according to the previous rules.\n const unescaped = p2.replace(/\\\\\\*/g, '[^\\\\/]*')\n return p1 + unescaped\n }\n ],\n\n [\n // unescape, revert step 3 except for back slash\n // For example, if a user escape a '\\\\*',\n // after step 3, the result will be '\\\\\\\\\\\\*'\n /\\\\\\\\\\\\(?=[$.|*+(){^])/g,\n () => ESCAPE\n ],\n\n [\n // '\\\\\\\\' -> '\\\\'\n /\\\\\\\\/g,\n () => ESCAPE\n ],\n\n [\n // > The range notation, e.g. [a-zA-Z],\n // > can be used to match one of the characters in a range.\n\n // `\\` is escaped by step 3\n /(\\\\)?\\[([^\\]/]*?)(\\\\*)($|\\])/g,\n (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE\n // '\\\\[bar]' -> '\\\\\\\\[bar\\\\]'\n ? `\\\\[${range}${cleanRangeBackSlash(endEscape)}${close}`\n : close === ']'\n ? endEscape.length % 2 === 0\n // A normal case, and it is a range notation\n // '[bar]'\n // '[bar\\\\\\\\]'\n ? `[${sanitizeRange(range)}${endEscape}]`\n // Invalid range notaton\n // '[bar\\\\]' -> '[bar\\\\\\\\]'\n : '[]'\n : '[]'\n ],\n\n // ending\n [\n // 'js' will not match 'js.'\n // 'ab' will not match 'abc'\n /(?:[^*])$/,\n\n // WTF!\n // https://git-scm.com/docs/gitignore\n // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1)\n // which re-fixes #24, #38\n\n // > If there is a separator at the end of the pattern then the pattern\n // > will only match directories, otherwise the pattern can match both\n // > files and directories.\n\n // 'js*' will not match 'a.js'\n // 'js/' will not match 'a.js'\n // 'js' will match 'a.js' and 'a.js/'\n match => /\\/$/.test(match)\n // foo/ will not match 'foo'\n ? `${match}$`\n // foo matches 'foo' and 'foo/'\n : `${match}(?=$|\\\\/$)`\n ],\n\n // trailing wildcard\n [\n /(\\^|\\\\\\/)?\\\\\\*$/,\n (_, p1) => {\n const prefix = p1\n // '\\^':\n // '/*' does not match EMPTY\n // '/*' does not match everything\n\n // '\\\\\\/':\n // 'abc/*' does not match 'abc/'\n ? `${p1}[^/]+`\n\n // 'a*' matches 'a'\n // 'a*' matches 'aa'\n : '[^/]*'\n\n return `${prefix}(?=$|\\\\/$)`\n }\n ],\n]\n\n// A simple cache, because an ignore rule only has only one certain meaning\nconst regexCache = Object.create(null)\n\n// @param {pattern}\nconst makeRegex = (pattern, ignoreCase) => {\n let source = regexCache[pattern]\n\n if (!source) {\n source = REPLACERS.reduce(\n (prev, [matcher, replacer]) =>\n prev.replace(matcher, replacer.bind(pattern)),\n pattern\n )\n regexCache[pattern] = source\n }\n\n return ignoreCase\n ? new RegExp(source, 'i')\n : new RegExp(source)\n}\n\nconst isString = subject => typeof subject === 'string'\n\n// > A blank line matches no files, so it can serve as a separator for readability.\nconst checkPattern = pattern => pattern\n && isString(pattern)\n && !REGEX_TEST_BLANK_LINE.test(pattern)\n && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern)\n\n // > A line starting with # serves as a comment.\n && pattern.indexOf('#') !== 0\n\nconst splitPattern = pattern => pattern.split(REGEX_SPLITALL_CRLF)\n\nclass IgnoreRule {\n constructor (\n origin,\n pattern,\n negative,\n regex\n ) {\n this.origin = origin\n this.pattern = pattern\n this.negative = negative\n this.regex = regex\n }\n}\n\nconst createRule = (pattern, ignoreCase) => {\n const origin = pattern\n let negative = false\n\n // > An optional prefix \"!\" which negates the pattern;\n if (pattern.indexOf('!') === 0) {\n negative = true\n pattern = pattern.substr(1)\n }\n\n pattern = pattern\n // > Put a backslash (\"\\\") in front of the first \"!\" for patterns that\n // > begin with a literal \"!\", for example, `\"\\!important!.txt\"`.\n .replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!')\n // > Put a backslash (\"\\\") in front of the first hash for patterns that\n // > begin with a hash.\n .replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#')\n\n const regex = makeRegex(pattern, ignoreCase)\n\n return new IgnoreRule(\n origin,\n pattern,\n negative,\n regex\n )\n}\n\nconst throwError = (message, Ctor) => {\n throw new Ctor(message)\n}\n\nconst checkPath = (path, originalPath, doThrow) => {\n if (!isString(path)) {\n return doThrow(\n `path must be a string, but got \\`${originalPath}\\``,\n TypeError\n )\n }\n\n // We don't know if we should ignore EMPTY, so throw\n if (!path) {\n return doThrow(`path must not be empty`, TypeError)\n }\n\n // Check if it is a relative path\n if (checkPath.isNotRelative(path)) {\n const r = '`path.relative()`d'\n return doThrow(\n `path should be a ${r} string, but got \"${originalPath}\"`,\n RangeError\n )\n }\n\n return true\n}\n\nconst isNotRelative = path => REGEX_TEST_INVALID_PATH.test(path)\n\ncheckPath.isNotRelative = isNotRelative\ncheckPath.convert = p => p\n\nclass Ignore {\n constructor ({\n ignorecase = true,\n ignoreCase = ignorecase,\n allowRelativePaths = false\n } = {}) {\n define(this, KEY_IGNORE, true)\n\n this._rules = []\n this._ignoreCase = ignoreCase\n this._allowRelativePaths = allowRelativePaths\n this._initCache()\n }\n\n _initCache () {\n this._ignoreCache = Object.create(null)\n this._testCache = Object.create(null)\n }\n\n _addPattern (pattern) {\n // #32\n if (pattern && pattern[KEY_IGNORE]) {\n this._rules = this._rules.concat(pattern._rules)\n this._added = true\n return\n }\n\n if (checkPattern(pattern)) {\n const rule = createRule(pattern, this._ignoreCase)\n this._added = true\n this._rules.push(rule)\n }\n }\n\n // @param {Array<string> | string | Ignore} pattern\n add (pattern) {\n this._added = false\n\n makeArray(\n isString(pattern)\n ? splitPattern(pattern)\n : pattern\n ).forEach(this._addPattern, this)\n\n // Some rules have just added to the ignore,\n // making the behavior changed.\n if (this._added) {\n this._initCache()\n }\n\n return this\n }\n\n // legacy\n addPattern (pattern) {\n return this.add(pattern)\n }\n\n // | ignored : unignored\n // negative | 0:0 | 0:1 | 1:0 | 1:1\n // -------- | ------- | ------- | ------- | --------\n // 0 | TEST | TEST | SKIP | X\n // 1 | TESTIF | SKIP | TEST | X\n\n // - SKIP: always skip\n // - TEST: always test\n // - TESTIF: only test if checkUnignored\n // - X: that never happen\n\n // @param {boolean} whether should check if the path is unignored,\n // setting `checkUnignored` to `false` could reduce additional\n // path matching.\n\n // @returns {TestResult} true if a file is ignored\n _testOne (path, checkUnignored) {\n let ignored = false\n let unignored = false\n\n this._rules.forEach(rule => {\n const {negative} = rule\n if (\n unignored === negative && ignored !== unignored\n || negative && !ignored && !unignored && !checkUnignored\n ) {\n return\n }\n\n const matched = rule.regex.test(path)\n\n if (matched) {\n ignored = !negative\n unignored = negative\n }\n })\n\n return {\n ignored,\n unignored\n }\n }\n\n // @returns {TestResult}\n _test (originalPath, cache, checkUnignored, slices) {\n const path = originalPath\n // Supports nullable path\n && checkPath.convert(originalPath)\n\n checkPath(\n path,\n originalPath,\n this._allowRelativePaths\n ? RETURN_FALSE\n : throwError\n )\n\n return this._t(path, cache, checkUnignored, slices)\n }\n\n _t (path, cache, checkUnignored, slices) {\n if (path in cache) {\n return cache[path]\n }\n\n if (!slices) {\n // path/to/a.js\n // ['path', 'to', 'a.js']\n slices = path.split(SLASH)\n }\n\n slices.pop()\n\n // If the path has no parent directory, just test it\n if (!slices.length) {\n return cache[path] = this._testOne(path, checkUnignored)\n }\n\n const parent = this._t(\n slices.join(SLASH) + SLASH,\n cache,\n checkUnignored,\n slices\n )\n\n // If the path contains a parent directory, check the parent first\n return cache[path] = parent.ignored\n // > It is not possible to re-include a file if a parent directory of\n // > that file is excluded.\n ? parent\n : this._testOne(path, checkUnignored)\n }\n\n ignores (path) {\n return this._test(path, this._ignoreCache, false).ignored\n }\n\n createFilter () {\n return path => !this.ignores(path)\n }\n\n filter (paths) {\n return makeArray(paths).filter(this.createFilter())\n }\n\n // @returns {TestResult}\n test (path) {\n return this._test(path, this._testCache, true)\n }\n}\n\nconst factory = options => new Ignore(options)\n\nconst isPathValid = path =>\n checkPath(path && checkPath.convert(path), path, RETURN_FALSE)\n\nfactory.isPathValid = isPathValid\n\n// Fixes typescript\nfactory.default = factory\n\nmodule.exports = factory\n\n// Windows\n// --------------------------------------------------------------\n/* istanbul ignore if */\nif (\n // Detect `process` so that it can run in browsers.\n typeof process !== 'undefined'\n && (\n process.env && process.env.IGNORE_TEST_WIN32\n || process.platform === 'win32'\n )\n) {\n /* eslint no-control-regex: \"off\" */\n const makePosix = str => /^\\\\\\\\\\?\\\\/.test(str)\n || /[\"<>|\\u0000-\\u001F]+/u.test(str)\n ? str\n : str.replace(/\\\\/g, '/')\n\n checkPath.convert = makePosix\n\n // 'C:\\\\foo' <- 'C:\\\\foo' has been converted to 'C:/'\n // 'd:\\\\foo'\n const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\\//i\n checkPath.isNotRelative = path =>\n REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path)\n || isNotRelative(path)\n}\n", "/*!\n * normalize-path <https://github.com/jonschlinkert/normalize-path>\n *\n * Copyright (c) 2014-2018, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nmodule.exports = function(path, stripTrailing) {\n if (typeof path !== 'string') {\n throw new TypeError('expected path to be a string');\n }\n\n if (path === '\\\\' || path === '/') return '/';\n\n var len = path.length;\n if (len <= 1) return path;\n\n // ensure that win32 namespaces has two leading slashes, so that the path is\n // handled properly by the win32 version of path.parse() after being normalized\n // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces\n var prefix = '';\n if (len > 4 && path[3] === '\\\\') {\n var ch = path[2];\n if ((ch === '?' || ch === '.') && path.slice(0, 2) === '\\\\\\\\') {\n path = path.slice(2);\n prefix = '//';\n }\n }\n\n var segs = path.split(/[/\\\\]+/);\n if (stripTrailing !== false && segs[segs.length - 1] === '') {\n segs.pop();\n }\n return prefix + segs.join('/');\n};\n", "import fs from \"fs-extra\";\nimport type { Context } from \"../command/context.js\";\nimport { configPath } from \"../config/config.js\";\nimport { swallowEnoent } from \"../filesync/directory.js\";\nimport { memo } from \"../util/function.js\";\n\n/**\n * Reads the session from either the environment variable `GGT_SESSION`\n * or from the `session.txt` file in the config directory.\n *\n * @returns The session string if found, otherwise undefined.\n */\nexport const readSession = memo((ctx: Context): string | undefined => {\n if (process.env[\"GGT_SESSION\"]) {\n ctx.log.debug(\"reading session from env\");\n return process.env[\"GGT_SESSION\"];\n }\n\n try {\n ctx.log.debug(\"reading session from disk\");\n return fs.readFileSync(configPath(\"session.txt\"), \"utf8\");\n } catch (error) {\n swallowEnoent(error);\n return undefined;\n }\n});\n\n/**\n * Writes the session to disk in the `session.txt` file in the config.\n *\n * @param ctx - The context object.\n * @param session - The session to write to disk.\n */\nexport const writeSession = (ctx: Context, session: string | undefined): void => {\n readSession.clear();\n\n if (process.env[\"GGT_SESSION\"]) {\n ctx.log.debug(\"writing session to env\", { session: Boolean(session) });\n process.env[\"GGT_SESSION\"] = session;\n }\n\n ctx.log.debug(\"writing session to disk\", { session: Boolean(session), path: configPath(\"session.txt\") });\n\n if (session) {\n fs.outputFileSync(configPath(\"session.txt\"), session);\n } else {\n fs.removeSync(configPath(\"session.txt\"));\n }\n};\n\nexport const readToken = memo((ctx: Context): string | undefined => {\n ctx.log.debug(\"reading token from env\");\n return process.env[\"GGT_TOKEN\"];\n});\n", "/**\n * DO NOT MODIFY\n *\n * Everything in this file also exists in gadget to ensure that this logic\n * is the same between the two projects.\n */\nimport fs from \"fs-extra\";\nimport type { Ignore } from \"ignore\";\nimport ignore from \"ignore\";\nimport assert from \"node:assert\";\nimport { createHash } from \"node:crypto\";\nimport path from \"node:path\";\nimport { Transform } from \"node:stream\";\nimport { pipeline } from \"node:stream/promises\";\nimport normalizePath from \"normalize-path\";\n\n/**\n * Paths that are never ignored, regardless of the contents of the `.ignore` file.\n */\nexport const NEVER_IGNORE_PATHS = [\".gadget/\"] as const;\n\n/**\n * Paths that are always ignored, regardless of the contents of the `.ignore` file.\n */\nexport const ALWAYS_IGNORE_PATHS = [\".DS_Store\", \"node_modules\", \".git\"] as const;\n\n/**\n * Paths that are ignored when hashing the directory.\n *\n * NOTE: This is the _only_ thing that is allowed to be different between gadget and ggt.\n */\nexport const HASHING_IGNORE_PATHS = [\".gadget/sync.json\", \".gadget/backup\", \"yarn-error.log\"] as const;\n\n/**\n * Represents a directory that is being synced.\n */\nexport class Directory {\n /**\n * A gitignore-style file parser used to determine which files to\n * ignore while syncing.\n *\n * @see https://www.npmjs.com/package/ignore\n */\n private _ignorer!: Ignore;\n\n /**\n * Whether the directory is currently being hashed.\n */\n private _isHashing = false;\n\n private constructor(\n /**\n * An absolute path to the directory that is being synced.\n */\n readonly path: string,\n ) {}\n\n /**\n * Initializes a directory to be synced.\n *\n * If the directory does not exist, it is created.\n *\n * @param dir - The directory to initialize.\n * @returns A Promise that resolves to a Directory instance.\n */\n static async init(dir: string): Promise<Directory> {\n const directory = new Directory(dir);\n await directory.loadIgnoreFile();\n return directory;\n }\n\n /**\n * Returns the relative path from this directory to the specified path.\n *\n * @param to - The path to which the relative path is calculated.\n * @returns The relative path from this directory to the specified path.\n */\n relative(to: string): string {\n if (!path.isAbsolute(to)) {\n // the filepath is already relative\n return to;\n }\n\n return path.relative(this.path, to);\n }\n\n /**\n * Returns the absolute path by resolving the given path segments\n * relative to the directory path.\n *\n * @param pathSegments - The path segments to resolve.\n * @returns The absolute path.\n */\n absolute(...pathSegments: string[]): string {\n const result = path.resolve(this.path, ...pathSegments);\n assert(result.startsWith(this.path), `expected ${result} to be within ${this.path}`);\n return result;\n }\n\n /**\n * Similar to {@linkcode relative} in that it converts an absolute\n * path into a relative one from {@linkcode path}. However, it also\n * changes any slashes to be posix/unix-like forward slashes,\n * condenses repeated slashes into a single slash, and adds a trailing\n * slash if the path is a directory.\n *\n * This is used when sending files to Gadget to ensure that the paths\n * are consistent across platforms.\n *\n * @see https://www.npmjs.com/package/normalize-path\n */\n normalize(filepath: string, isDirectory: boolean): string {\n if (path.isAbsolute(filepath)) {\n filepath = this.relative(filepath);\n }\n\n // true = trim trailing slashes\n filepath = normalizePath(filepath, true);\n\n if (isDirectory) {\n filepath += \"/\";\n }\n\n return filepath;\n }\n\n /**\n * Loads the `.ignore` file in the directory. If the file does not\n * exist, it is silently ignored.\n */\n async loadIgnoreFile(): Promise<void> {\n this._ignorer = ignore.default();\n this._ignorer.add(ALWAYS_IGNORE_PATHS);\n\n try {\n const content = await fs.readFile(this.absolute(\".ignore\"), \"utf8\");\n this._ignorer.add(content);\n } catch (error) {\n swallowEnoent(error);\n }\n }\n\n /**\n * Determines if a file should be ignored based on its filepath.\n *\n * @param filepath - The filepath of the file to check.\n * @returns True if the file should be ignored, false otherwise.\n */\n ignores(filepath: string): boolean {\n filepath = this.relative(filepath);\n if (filepath === \"\") {\n // don't ignore the root dir\n return false;\n }\n\n if (filepath.startsWith(\"..\")) {\n // anything above the root dir is ignored\n return true;\n }\n\n // false = don't trim trailing slashes\n filepath = normalizePath(filepath, false);\n if (this._isHashing && HASHING_IGNORE_PATHS.some((ignored) => filepath.startsWith(ignored))) {\n // special case for hashing\n return true;\n }\n\n if (NEVER_IGNORE_PATHS.some((neverIgnored) => filepath.startsWith(neverIgnored))) {\n // special case for never ignored paths\n return false;\n }\n\n return this._ignorer.ignores(filepath);\n }\n\n /**\n * Recursively walks through the directory and yields all non-ignored\n * files and directories within it.\n *\n * @yields - The normalized path of each file and directory.\n */\n async *walk({ dir = this.path } = {}): AsyncGenerator<string> {\n // don't yield the root directory\n if (dir !== this.path) {\n yield this.normalize(dir, true);\n }\n\n for await (const entry of await fs.opendir(dir)) {\n const filepath = path.join(dir, entry.name);\n if (this.ignores(filepath)) {\n continue;\n }\n\n if (entry.isDirectory()) {\n yield* this.walk({ dir: filepath });\n } else if (entry.isFile()) {\n yield this.normalize(filepath, false);\n }\n }\n }\n\n /**\n * Calculates the hash of each file and directory and returns an\n * object containing the hashes keyed by the normalized file path.\n *\n * @returns A Promise that resolves to an object containing the hashes\n * of each file.\n */\n async hashes(): Promise<Hashes> {\n try {\n this._isHashing = true;\n const files = {} as Hashes;\n\n for await (const normalizedPath of this.walk()) {\n const absolutePath = this.absolute(normalizedPath);\n files[normalizedPath] = await hash(absolutePath);\n }\n\n return files;\n } finally {\n this._isHashing = false;\n }\n }\n\n async hasFiles(): Promise<boolean> {\n return !(await this.isEmptyOrNonExistent());\n }\n\n async isEmptyOrNonExistent(): Promise<boolean> {\n let isEmptyOrNonExistent = true;\n try {\n for await (const _ of this.walk()) {\n isEmptyOrNonExistent = false;\n break;\n }\n } catch (error) {\n swallowEnoent(error);\n }\n return isEmptyOrNonExistent;\n }\n}\n\n/**\n * Key/value pairs where the key is the normalized path and the value is\n * the result of {@linkcode hash} for that path.\n */\nexport type Hashes = Record<string, Hash>;\n\nexport type Hash = {\n /**\n * The SHA-1 hash of the file or directory.\n *\n * If the path points to a directory, the hash is calculated based on\n * the directory's basename. If the path points to a file, the hash is\n * calculated based on the file's basename and contents.\n */\n sha1: string;\n\n /**\n * The Unix-style file permissions of the file or directory, or\n * undefined if the platform that generated this hash doesn't support\n * them.\n *\n * @example 0o644\n * @see supportsPermissions\n */\n permissions?: number;\n};\n\n/**\n * Whether the current platform supports Unix-style file permissions.\n *\n * Windows doesn't support Unix-style file permissions and all file\n * permissions retrieved via `node:fs` on Windows are translated to 666\n * or 444.\n */\nexport const supportsPermissions = process.platform === \"linux\" || process.platform === \"darwin\";\n\n/**\n * Calculates the {@linkcode Hash} of the file or directory at the\n * specified absolute path.\n *\n * @param absolutePath - The absolute path to the file or directory.\n * @returns A Promise that resolves to the {@linkcode Hash} of the file\n * or directory.\n */\nconst hash = async (absolutePath: string): Promise<Hash> => {\n const sha1 = createHash(\"sha1\");\n sha1.update(path.basename(absolutePath));\n\n const stats = await fs.stat(absolutePath);\n\n let permissions;\n if (supportsPermissions) {\n // strip everything but the permissions\n permissions = stats.mode & 0o777;\n }\n\n if (stats.isDirectory()) {\n return { sha1: sha1.digest(\"hex\"), permissions };\n }\n\n // windows uses CRLF line endings whereas unix uses LF line endings so\n // we always strip out CR bytes (0x0d) when hashing files. this does\n // make us blind to files that only differ by CR bytes, but that's a\n // tradeoff we're willing to make.\n const removeCR = new Transform({\n transform(chunk: Buffer, _encoding, callback) {\n if (!chunk.includes(0x0d)) {\n callback(undefined, chunk);\n return;\n }\n\n const filteredChunk = Buffer.alloc(chunk.length);\n let i = 0;\n for (const byte of chunk) {\n if (byte !== 0x0d) {\n filteredChunk[i++] = byte;\n }\n }\n\n callback(undefined, filteredChunk.subarray(0, i));\n },\n });\n\n await pipeline(fs.createReadStream(absolutePath), removeCR, sha1);\n\n return { sha1: sha1.digest(\"hex\"), permissions };\n};\n\n/**\n * Swallows ENOENT errors and throws any other errors.\n *\n * @param error - The error to handle.\n * @throws The original error if it is not an ENOENT error.\n */\nexport const swallowEnoent = (error: unknown): void => {\n if (error && typeof error === \"object\" && \"code\" in error && error.code === \"ENOENT\") {\n return;\n }\n throw error;\n};\n"],
5
- "mappings": "mHAAA,IAAAA,EAAAC,EAAA,CAAAC,GAAAC,IAAA,CAAAC,IACA,SAASC,EAAWC,EAAS,CAC3B,OAAO,MAAM,QAAQA,CAAO,EACxBA,EACA,CAACA,CAAO,CACd,CAJSC,EAAAF,EAAA,aAMT,IAAMG,EAAQ,GACRC,EAAQ,IACRC,EAAS,KACTC,EAAwB,QACxBC,EAAmC,iBACnCC,EAA4C,OAC5CC,EAAqC,OACrCC,EAAsB,SAMtBC,EAA0B,eAE1BC,EAAQ,IAGVC,EAAiB,cAEjB,OAAO,OAAW,MACpBA,EAAiB,OAAO,IAAI,aAAa,GAE3C,IAAMC,EAAaD,EAEbE,EAASb,EAAA,CAACc,EAAQC,EAAKC,IAC3B,OAAO,eAAeF,EAAQC,EAAK,CAAC,MAAAC,CAAK,CAAC,EAD7B,UAGTC,EAAqB,mBAErBC,EAAelB,EAAA,IAAM,GAAN,gBAIfmB,EAAgBnB,EAAAoB,GAASA,EAAM,QACnCH,EACA,CAACI,EAAOC,EAAMC,IAAOD,EAAK,WAAW,CAAC,GAAKC,EAAG,WAAW,CAAC,EACtDF,EAGApB,CACN,EAPsB,iBAUhBuB,EAAsBxB,EAAAyB,GAAW,CACrC,GAAM,CAAC,OAAAC,CAAM,EAAID,EACjB,OAAOA,EAAQ,MAAM,EAAGC,EAASA,EAAS,CAAC,CAC7C,EAH4B,uBAgBtBC,GAAY,CAEhB,CAIE,UACA,IAAM1B,CACR,EAGA,CAKE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d,QAAQ,IAAI,cACdE,EAAI,IAAI,MAAM,yBAA0B,CAAE,QAAS,EAAQO,CAAS,CAAC,EACrE,QAAQ,IAAI,YAAiBA,GAG/BP,EAAI,IAAI,MAAM,0BAA2B,CAAE,QAAS,EAAQO,EAAU,KAAML,EAAW,aAAa,CAAE,CAAC,EAEnGK,EACF,EAAAN,QAAG,eAAeC,EAAW,aAAa,EAAGK,CAAO,EAEpD,EAAAN,QAAG,WAAWC,EAAW,aAAa,CAAC,CAE3C,EAf4B,gBAiBfM,GAAYT,EAAMC,IAC7BA,EAAI,IAAI,MAAM,wBAAwB,EAC/B,QAAQ,IAAI,UACpB",
6
- "names": ["require_ignore", "__commonJSMin", "exports", "module", "init_cjs", "makeArray", "subject", "__name", "EMPTY", "SPACE", "ESCAPE", "REGEX_TEST_BLANK_LINE", "REGEX_INVALID_TRAILING_BACKSLASH", "REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION", "REGEX_REPLACE_LEADING_EXCAPED_HASH", "REGEX_SPLITALL_CRLF", "REGEX_TEST_INVALID_PATH", "SLASH", "TMP_KEY_IGNORE", "KEY_IGNORE", "define", "object", "key", "value", "REGEX_REGEXP_RANGE", "RETURN_FALSE", "sanitizeRange", "range", "match", "from", "to", "cleanRangeBackSlash", "slashes", "length", "REPLACERS", "_", "m1", "m2", "index", "str", "p1", "p2", "unescaped", "leadEscape", "endEscape", "close", "regexCache", "makeRegex", "pattern", "ignoreCase", "source", "prev", "matcher", "replacer", "isString", "checkPattern", "splitPattern", "IgnoreRule", "origin", "negative", "regex", "createRule", "throwError", "message", "Ctor", "checkPath", "path", "originalPath", "doThrow", "isNotRelative", "p", "Ignore", "ignorecase", "allowRelativePaths", "rule", "checkUnignored", "ignored", "unignored", "cache", "slices", "parent", "paths", "factory", "options", "isPathValid", "makePosix", "REGIX_IS_WINDOWS_PATH_ABSOLUTE", "require_normalize_path", "__commonJSMin", "exports", "module", "init_cjs", "path", "stripTrailing", "len", "prefix", "ch", "segs", "init_cjs", "import_fs_extra", "init_cjs", "import_fs_extra", "import_ignore", "import_normalize_path", "assert", "createHash", "path", "Transform", "pipeline", "NEVER_IGNORE_PATHS", "ALWAYS_IGNORE_PATHS", "HASHING_IGNORE_PATHS", "Directory", "_Directory", "path", "__name", "dir", "directory", "to", "pathSegments", "result", "assert", "filepath", "isDirectory", "normalizePath", "ignore", "content", "fs", "error", "swallowEnoent", "ignored", "neverIgnored", "entry", "files", "normalizedPath", "absolutePath", "hash", "isEmptyOrNonExistent", "_", "supportsPermissions", "sha1", "createHash", "stats", "permissions", "removeCR", "Transform", "chunk", "_encoding", "callback", "filteredChunk", "i", "byte", "pipeline", "readSession", "memo", "ctx", "fs", "configPath", "error", "swallowEnoent", "writeSession", "__name", "session", "readToken"]
3
+ "sources": ["../node_modules/.pnpm/ignore@6.0.2/node_modules/ignore/index.js", "../node_modules/.pnpm/normalize-path@3.0.0/node_modules/normalize-path/index.js", "../src/services/filesync/directory.ts"],
4
+ "sourcesContent": ["// A simple implementation of make-array\nfunction makeArray (subject) {\n return Array.isArray(subject)\n ? subject\n : [subject]\n}\n\nconst EMPTY = ''\nconst SPACE = ' '\nconst ESCAPE = '\\\\'\nconst REGEX_TEST_BLANK_LINE = /^\\s+$/\nconst REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\\\]|^)\\\\$/\nconst REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\\\!/\nconst REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\\\#/\nconst REGEX_SPLITALL_CRLF = /\\r?\\n/g\n// /foo,\n// ./foo,\n// ../foo,\n// .\n// ..\nconst REGEX_TEST_INVALID_PATH = /^\\.*\\/|^\\.+$/\n\nconst SLASH = '/'\n\n// Do not use ternary expression here, since \"istanbul ignore next\" is buggy\nlet TMP_KEY_IGNORE = 'node-ignore'\n/* istanbul ignore else */\nif (typeof Symbol !== 'undefined') {\n TMP_KEY_IGNORE = Symbol.for('node-ignore')\n}\nconst KEY_IGNORE = TMP_KEY_IGNORE\n\nconst define = (object, key, value) =>\n Object.defineProperty(object, key, {value})\n\nconst REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g\n\nconst RETURN_FALSE = () => false\n\n// Sanitize the range of a regular expression\n// The cases are complicated, see test cases for details\nconst sanitizeRange = range => range.replace(\n REGEX_REGEXP_RANGE,\n (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0)\n ? match\n // Invalid range (out of order) which is ok for gitignore rules but\n // fatal for JavaScript regular expression, so eliminate it.\n : EMPTY\n)\n\n// See fixtures #59\nconst cleanRangeBackSlash = slashes => {\n const {length} = slashes\n return slashes.slice(0, length - length % 2)\n}\n\n// > If the pattern ends with a slash,\n// > it is removed for the purpose of the following description,\n// > but it would only find a match with a directory.\n// > In other words, foo/ will match a directory foo and paths underneath it,\n// > but will not match a regular file or a symbolic link foo\n// > (this is consistent with the way how pathspec works in general in Git).\n// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`'\n// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call\n// you could use option `mark: true` with `glob`\n\n// '`foo/`' should not continue with the '`..`'\nconst REPLACERS = [\n\n [\n // remove BOM\n // TODO:\n // Other similar zero-width characters?\n /^\\uFEFF/,\n () => EMPTY\n ],\n\n // > Trailing spaces are ignored unless they are quoted with backslash (\"\\\")\n [\n // (a\\ ) -> (a )\n // (a ) -> (a)\n // (a ) -> (a)\n // (a \\ ) -> (a )\n /((?:\\\\\\\\)*?)(\\\\?\\s+)$/,\n (_, m1, m2) => m1 + (\n m2.indexOf('\\\\') === 0\n ? SPACE\n : EMPTY\n )\n ],\n\n // replace (\\ ) with ' '\n // (\\ ) -> ' '\n // (\\\\ ) -> '\\\\ '\n // (\\\\\\ ) -> '\\\\ '\n [\n /(\\\\+?)\\s/g,\n (_, m1) => {\n const {length} = m1\n return m1.slice(0, length - length % 2) + SPACE\n }\n ],\n\n // Escape metacharacters\n // which is written down by users but means special for regular expressions.\n\n // > There are 12 characters with special meanings:\n // > - the backslash \\,\n // > - the caret ^,\n // > - the dollar sign $,\n // > - the period or dot .,\n // > - the vertical bar or pipe symbol |,\n // > - the question mark ?,\n // > - the asterisk or star *,\n // > - the plus sign +,\n // > - the opening parenthesis (,\n // > - the closing parenthesis ),\n // > - and the opening square bracket [,\n // > - the opening curly brace {,\n // > These special characters are often called \"metacharacters\".\n [\n /[\\\\$.|*+(){^]/g,\n match => `\\\\${match}`\n ],\n\n [\n // > a question mark (?) matches a single character\n /(?!\\\\)\\?/g,\n () => '[^/]'\n ],\n\n // leading slash\n [\n\n // > A leading slash matches the beginning of the pathname.\n // > For example, \"/*.c\" matches \"cat-file.c\" but not \"mozilla-sha1/sha1.c\".\n // A leading slash matches the beginning of the pathname\n /^\\//,\n () => '^'\n ],\n\n // replace special metacharacter slash after the leading slash\n [\n /\\//g,\n () => '\\\\/'\n ],\n\n [\n // > A leading \"**\" followed by a slash means match in all directories.\n // > For example, \"**/foo\" matches file or directory \"foo\" anywhere,\n // > the same as pattern \"foo\".\n // > \"**/foo/bar\" matches file or directory \"bar\" anywhere that is directly\n // > under directory \"foo\".\n // Notice that the '*'s have been replaced as '\\\\*'\n /^\\^*\\\\\\*\\\\\\*\\\\\\//,\n\n // '**/foo' <-> 'foo'\n () => '^(?:.*\\\\/)?'\n ],\n\n // starting\n [\n // there will be no leading '/'\n // (which has been replaced by section \"leading slash\")\n // If starts with '**', adding a '^' to the regular expression also works\n /^(?=[^^])/,\n function startingReplacer () {\n // If has a slash `/` at the beginning or middle\n return !/\\/(?!$)/.test(this)\n // > Prior to 2.22.1\n // > If the pattern does not contain a slash /,\n // > Git treats it as a shell glob pattern\n // Actually, if there is only a trailing slash,\n // git also treats it as a shell glob pattern\n\n // After 2.22.1 (compatible but clearer)\n // > If there is a separator at the beginning or middle (or both)\n // > of the pattern, then the pattern is relative to the directory\n // > level of the particular .gitignore file itself.\n // > Otherwise the pattern may also match at any level below\n // > the .gitignore level.\n ? '(?:^|\\\\/)'\n\n // > Otherwise, Git treats the pattern as a shell glob suitable for\n // > consumption by fnmatch(3)\n : '^'\n }\n ],\n\n // two globstars\n [\n // Use lookahead assertions so that we could match more than one `'/**'`\n /\\\\\\/\\\\\\*\\\\\\*(?=\\\\\\/|$)/g,\n\n // Zero, one or several directories\n // should not use '*', or it will be replaced by the next replacer\n\n // Check if it is not the last `'/**'`\n (_, index, str) => index + 6 < str.length\n\n // case: /**/\n // > A slash followed by two consecutive asterisks then a slash matches\n // > zero or more directories.\n // > For example, \"a/**/b\" matches \"a/b\", \"a/x/b\", \"a/x/y/b\" and so on.\n // '/**/'\n ? '(?:\\\\/[^\\\\/]+)*'\n\n // case: /**\n // > A trailing `\"/**\"` matches everything inside.\n\n // #21: everything inside but it should not include the current folder\n : '\\\\/.+'\n ],\n\n // normal intermediate wildcards\n [\n // Never replace escaped '*'\n // ignore rule '\\*' will match the path '*'\n\n // 'abc.*/' -> go\n // 'abc.*' -> skip this rule,\n // coz trailing single wildcard will be handed by [trailing wildcard]\n /(^|[^\\\\]+)(\\\\\\*)+(?=.+)/g,\n\n // '*.js' matches '.js'\n // '*.js' doesn't match 'abc'\n (_, p1, p2) => {\n // 1.\n // > An asterisk \"*\" matches anything except a slash.\n // 2.\n // > Other consecutive asterisks are considered regular asterisks\n // > and will match according to the previous rules.\n const unescaped = p2.replace(/\\\\\\*/g, '[^\\\\/]*')\n return p1 + unescaped\n }\n ],\n\n [\n // unescape, revert step 3 except for back slash\n // For example, if a user escape a '\\\\*',\n // after step 3, the result will be '\\\\\\\\\\\\*'\n /\\\\\\\\\\\\(?=[$.|*+(){^])/g,\n () => ESCAPE\n ],\n\n [\n // '\\\\\\\\' -> '\\\\'\n /\\\\\\\\/g,\n () => ESCAPE\n ],\n\n [\n // > The range notation, e.g. [a-zA-Z],\n // > can be used to match one of the characters in a range.\n\n // `\\` is escaped by step 3\n /(\\\\)?\\[([^\\]/]*?)(\\\\*)($|\\])/g,\n (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE\n // '\\\\[bar]' -> '\\\\\\\\[bar\\\\]'\n ? `\\\\[${range}${cleanRangeBackSlash(endEscape)}${close}`\n : close === ']'\n ? endEscape.length % 2 === 0\n // A normal case, and it is a range notation\n // '[bar]'\n // '[bar\\\\\\\\]'\n ? `[${sanitizeRange(range)}${endEscape}]`\n // Invalid range notaton\n // '[bar\\\\]' -> '[bar\\\\\\\\]'\n : '[]'\n : '[]'\n ],\n\n // ending\n [\n // 'js' will not match 'js.'\n // 'ab' will not match 'abc'\n /(?:[^*])$/,\n\n // WTF!\n // https://git-scm.com/docs/gitignore\n // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1)\n // which re-fixes #24, #38\n\n // > If there is a separator at the end of the pattern then the pattern\n // > will only match directories, otherwise the pattern can match both\n // > files and directories.\n\n // 'js*' will not match 'a.js'\n // 'js/' will not match 'a.js'\n // 'js' will match 'a.js' and 'a.js/'\n match => /\\/$/.test(match)\n // foo/ will not match 'foo'\n ? `${match}$`\n // foo matches 'foo' and 'foo/'\n : `${match}(?=$|\\\\/$)`\n ],\n\n // trailing wildcard\n [\n /(\\^|\\\\\\/)?\\\\\\*$/,\n (_, p1) => {\n const prefix = p1\n // '\\^':\n // '/*' does not match EMPTY\n // '/*' does not match everything\n\n // '\\\\\\/':\n // 'abc/*' does not match 'abc/'\n ? `${p1}[^/]+`\n\n // 'a*' matches 'a'\n // 'a*' matches 'aa'\n : '[^/]*'\n\n return `${prefix}(?=$|\\\\/$)`\n }\n ],\n]\n\n// A simple cache, because an ignore rule only has only one certain meaning\nconst regexCache = Object.create(null)\n\n// @param {pattern}\nconst makeRegex = (pattern, ignoreCase) => {\n let source = regexCache[pattern]\n\n if (!source) {\n source = REPLACERS.reduce(\n (prev, [matcher, replacer]) =>\n prev.replace(matcher, replacer.bind(pattern)),\n pattern\n )\n regexCache[pattern] = source\n }\n\n return ignoreCase\n ? new RegExp(source, 'i')\n : new RegExp(source)\n}\n\nconst isString = subject => typeof subject === 'string'\n\n// > A blank line matches no files, so it can serve as a separator for readability.\nconst checkPattern = pattern => pattern\n && isString(pattern)\n && !REGEX_TEST_BLANK_LINE.test(pattern)\n && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern)\n\n // > A line starting with # serves as a comment.\n && pattern.indexOf('#') !== 0\n\nconst splitPattern = pattern => pattern.split(REGEX_SPLITALL_CRLF)\n\nclass IgnoreRule {\n constructor (\n origin,\n pattern,\n negative,\n regex\n ) {\n this.origin = origin\n this.pattern = pattern\n this.negative = negative\n this.regex = regex\n }\n}\n\nconst createRule = (pattern, ignoreCase) => {\n const origin = pattern\n let negative = false\n\n // > An optional prefix \"!\" which negates the pattern;\n if (pattern.indexOf('!') === 0) {\n negative = true\n pattern = pattern.substr(1)\n }\n\n pattern = pattern\n // > Put a backslash (\"\\\") in front of the first \"!\" for patterns that\n // > begin with a literal \"!\", for example, `\"\\!important!.txt\"`.\n .replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!')\n // > Put a backslash (\"\\\") in front of the first hash for patterns that\n // > begin with a hash.\n .replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#')\n\n const regex = makeRegex(pattern, ignoreCase)\n\n return new IgnoreRule(\n origin,\n pattern,\n negative,\n regex\n )\n}\n\nconst throwError = (message, Ctor) => {\n throw new Ctor(message)\n}\n\nconst checkPath = (path, originalPath, doThrow) => {\n if (!isString(path)) {\n return doThrow(\n `path must be a string, but got \\`${originalPath}\\``,\n TypeError\n )\n }\n\n // We don't know if we should ignore EMPTY, so throw\n if (!path) {\n return doThrow(`path must not be empty`, TypeError)\n }\n\n // Check if it is a relative path\n if (checkPath.isNotRelative(path)) {\n const r = '`path.relative()`d'\n return doThrow(\n `path should be a ${r} string, but got \"${originalPath}\"`,\n RangeError\n )\n }\n\n return true\n}\n\nconst isNotRelative = path => REGEX_TEST_INVALID_PATH.test(path)\n\ncheckPath.isNotRelative = isNotRelative\ncheckPath.convert = p => p\n\nclass Ignore {\n constructor ({\n ignorecase = true,\n ignoreCase = ignorecase,\n allowRelativePaths = false\n } = {}) {\n define(this, KEY_IGNORE, true)\n\n this._rules = []\n this._ignoreCase = ignoreCase\n this._allowRelativePaths = allowRelativePaths\n this._initCache()\n }\n\n _initCache () {\n this._ignoreCache = Object.create(null)\n this._testCache = Object.create(null)\n }\n\n _addPattern (pattern) {\n // #32\n if (pattern && pattern[KEY_IGNORE]) {\n this._rules = this._rules.concat(pattern._rules)\n this._added = true\n return\n }\n\n if (checkPattern(pattern)) {\n const rule = createRule(pattern, this._ignoreCase)\n this._added = true\n this._rules.push(rule)\n }\n }\n\n // @param {Array<string> | string | Ignore} pattern\n add (pattern) {\n this._added = false\n\n makeArray(\n isString(pattern)\n ? splitPattern(pattern)\n : pattern\n ).forEach(this._addPattern, this)\n\n // Some rules have just added to the ignore,\n // making the behavior changed.\n if (this._added) {\n this._initCache()\n }\n\n return this\n }\n\n // legacy\n addPattern (pattern) {\n return this.add(pattern)\n }\n\n // | ignored : unignored\n // negative | 0:0 | 0:1 | 1:0 | 1:1\n // -------- | ------- | ------- | ------- | --------\n // 0 | TEST | TEST | SKIP | X\n // 1 | TESTIF | SKIP | TEST | X\n\n // - SKIP: always skip\n // - TEST: always test\n // - TESTIF: only test if checkUnignored\n // - X: that never happen\n\n // @param {boolean} whether should check if the path is unignored,\n // setting `checkUnignored` to `false` could reduce additional\n // path matching.\n\n // @returns {TestResult} true if a file is ignored\n _testOne (path, checkUnignored) {\n let ignored = false\n let unignored = false\n\n this._rules.forEach(rule => {\n const {negative} = rule\n if (\n unignored === negative && ignored !== unignored\n || negative && !ignored && !unignored && !checkUnignored\n ) {\n return\n }\n\n const matched = rule.regex.test(path)\n\n if (matched) {\n ignored = !negative\n unignored = negative\n }\n })\n\n return {\n ignored,\n unignored\n }\n }\n\n // @returns {TestResult}\n _test (originalPath, cache, checkUnignored, slices) {\n const path = originalPath\n // Supports nullable path\n && checkPath.convert(originalPath)\n\n checkPath(\n path,\n originalPath,\n this._allowRelativePaths\n ? RETURN_FALSE\n : throwError\n )\n\n return this._t(path, cache, checkUnignored, slices)\n }\n\n _t (path, cache, checkUnignored, slices) {\n if (path in cache) {\n return cache[path]\n }\n\n if (!slices) {\n // path/to/a.js\n // ['path', 'to', 'a.js']\n slices = path.split(SLASH)\n }\n\n slices.pop()\n\n // If the path has no parent directory, just test it\n if (!slices.length) {\n return cache[path] = this._testOne(path, checkUnignored)\n }\n\n const parent = this._t(\n slices.join(SLASH) + SLASH,\n cache,\n checkUnignored,\n slices\n )\n\n // If the path contains a parent directory, check the parent first\n return cache[path] = parent.ignored\n // > It is not possible to re-include a file if a parent directory of\n // > that file is excluded.\n ? parent\n : this._testOne(path, checkUnignored)\n }\n\n ignores (path) {\n return this._test(path, this._ignoreCache, false).ignored\n }\n\n createFilter () {\n return path => !this.ignores(path)\n }\n\n filter (paths) {\n return makeArray(paths).filter(this.createFilter())\n }\n\n // @returns {TestResult}\n test (path) {\n return this._test(path, this._testCache, true)\n }\n}\n\nconst factory = options => new Ignore(options)\n\nconst isPathValid = path =>\n checkPath(path && checkPath.convert(path), path, RETURN_FALSE)\n\nfactory.isPathValid = isPathValid\n\n// Fixes typescript\nfactory.default = factory\n\nmodule.exports = factory\n\n// Windows\n// --------------------------------------------------------------\n/* istanbul ignore if */\nif (\n // Detect `process` so that it can run in browsers.\n typeof process !== 'undefined'\n && (\n process.env && process.env.IGNORE_TEST_WIN32\n || process.platform === 'win32'\n )\n) {\n /* eslint no-control-regex: \"off\" */\n const makePosix = str => /^\\\\\\\\\\?\\\\/.test(str)\n || /[\"<>|\\u0000-\\u001F]+/u.test(str)\n ? str\n : str.replace(/\\\\/g, '/')\n\n checkPath.convert = makePosix\n\n // 'C:\\\\foo' <- 'C:\\\\foo' has been converted to 'C:/'\n // 'd:\\\\foo'\n const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\\//i\n checkPath.isNotRelative = path =>\n REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path)\n || isNotRelative(path)\n}\n", "/*!\n * normalize-path <https://github.com/jonschlinkert/normalize-path>\n *\n * Copyright (c) 2014-2018, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nmodule.exports = function(path, stripTrailing) {\n if (typeof path !== 'string') {\n throw new TypeError('expected path to be a string');\n }\n\n if (path === '\\\\' || path === '/') return '/';\n\n var len = path.length;\n if (len <= 1) return path;\n\n // ensure that win32 namespaces has two leading slashes, so that the path is\n // handled properly by the win32 version of path.parse() after being normalized\n // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces\n var prefix = '';\n if (len > 4 && path[3] === '\\\\') {\n var ch = path[2];\n if ((ch === '?' || ch === '.') && path.slice(0, 2) === '\\\\\\\\') {\n path = path.slice(2);\n prefix = '//';\n }\n }\n\n var segs = path.split(/[/\\\\]+/);\n if (stripTrailing !== false && segs[segs.length - 1] === '') {\n segs.pop();\n }\n return prefix + segs.join('/');\n};\n", "/**\n * DO NOT MODIFY\n *\n * Everything in this file also exists in gadget to ensure that this logic\n * is the same between the two projects.\n */\nimport fs from \"fs-extra\";\nimport type { Ignore } from \"ignore\";\nimport ignore from \"ignore\";\nimport assert from \"node:assert\";\nimport { createHash } from \"node:crypto\";\nimport path from \"node:path\";\nimport { Transform } from \"node:stream\";\nimport { pipeline } from \"node:stream/promises\";\nimport normalizePath from \"normalize-path\";\n\n/**\n * Paths that are never ignored, regardless of the contents of the `.ignore` file.\n */\nexport const NEVER_IGNORE_PATHS = [\".gadget/\"] as const;\n\n/**\n * Paths that are always ignored, regardless of the contents of the `.ignore` file.\n */\nexport const ALWAYS_IGNORE_PATHS = [\".DS_Store\", \"node_modules\", \".git\"] as const;\n\n/**\n * Paths that are ignored when hashing the directory.\n *\n * NOTE: This is the _only_ thing that is allowed to be different between gadget and ggt.\n */\nexport const HASHING_IGNORE_PATHS = [\".gadget/sync.json\", \".gadget/backup\", \"yarn-error.log\"] as const;\n\n/**\n * Represents a directory that is being synced.\n */\nexport class Directory {\n /**\n * A gitignore-style file parser used to determine which files to\n * ignore while syncing.\n *\n * @see https://www.npmjs.com/package/ignore\n */\n private _ignorer!: Ignore;\n\n /**\n * Whether the directory is currently being hashed.\n */\n private _isHashing = false;\n\n private constructor(\n /**\n * An absolute path to the directory that is being synced.\n */\n readonly path: string,\n ) {}\n\n /**\n * Initializes a directory to be synced.\n *\n * If the directory does not exist, it is created.\n *\n * @param dir - The directory to initialize.\n * @returns A Promise that resolves to a Directory instance.\n */\n static async init(dir: string): Promise<Directory> {\n const directory = new Directory(dir);\n await directory.loadIgnoreFile();\n return directory;\n }\n\n /**\n * Returns the relative path from this directory to the specified path.\n *\n * @param to - The path to which the relative path is calculated.\n * @returns The relative path from this directory to the specified path.\n */\n relative(to: string): string {\n if (!path.isAbsolute(to)) {\n // the filepath is already relative\n return to;\n }\n\n return path.relative(this.path, to);\n }\n\n /**\n * Returns the absolute path by resolving the given path segments\n * relative to the directory path.\n *\n * @param pathSegments - The path segments to resolve.\n * @returns The absolute path.\n */\n absolute(...pathSegments: string[]): string {\n const result = path.resolve(this.path, ...pathSegments);\n assert(result.startsWith(this.path), `expected ${result} to be within ${this.path}`);\n return result;\n }\n\n /**\n * Similar to {@linkcode relative} in that it converts an absolute\n * path into a relative one from {@linkcode path}. However, it also\n * changes any slashes to be posix/unix-like forward slashes,\n * condenses repeated slashes into a single slash, and adds a trailing\n * slash if the path is a directory.\n *\n * This is used when sending files to Gadget to ensure that the paths\n * are consistent across platforms.\n *\n * @see https://www.npmjs.com/package/normalize-path\n */\n normalize(filepath: string, isDirectory: boolean): string {\n if (path.isAbsolute(filepath)) {\n filepath = this.relative(filepath);\n }\n\n // true = trim trailing slashes\n filepath = normalizePath(filepath, true);\n\n if (isDirectory) {\n filepath += \"/\";\n }\n\n return filepath;\n }\n\n /**\n * Loads the `.ignore` file in the directory. If the file does not\n * exist, it is silently ignored.\n */\n async loadIgnoreFile(): Promise<void> {\n this._ignorer = ignore.default();\n this._ignorer.add(ALWAYS_IGNORE_PATHS);\n\n try {\n const content = await fs.readFile(this.absolute(\".ignore\"), \"utf8\");\n this._ignorer.add(content);\n } catch (error) {\n swallowEnoent(error);\n }\n }\n\n /**\n * Determines if a file should be ignored based on its filepath.\n *\n * @param filepath - The filepath of the file to check.\n * @returns True if the file should be ignored, false otherwise.\n */\n ignores(filepath: string): boolean {\n filepath = this.relative(filepath);\n if (filepath === \"\") {\n // don't ignore the root dir\n return false;\n }\n\n if (filepath.startsWith(\"..\")) {\n // anything above the root dir is ignored\n return true;\n }\n\n // false = don't trim trailing slashes\n filepath = normalizePath(filepath, false);\n if (this._isHashing && HASHING_IGNORE_PATHS.some((ignored) => filepath.startsWith(ignored))) {\n // special case for hashing\n return true;\n }\n\n if (NEVER_IGNORE_PATHS.some((neverIgnored) => filepath.startsWith(neverIgnored))) {\n // special case for never ignored paths\n return false;\n }\n\n return this._ignorer.ignores(filepath);\n }\n\n /**\n * Recursively walks through the directory and yields all non-ignored\n * files and directories within it.\n *\n * @yields - The normalized path of each file and directory.\n */\n async *walk({ dir = this.path } = {}): AsyncGenerator<string> {\n // don't yield the root directory\n if (dir !== this.path) {\n yield this.normalize(dir, true);\n }\n\n for await (const entry of await fs.opendir(dir)) {\n const filepath = path.join(dir, entry.name);\n if (this.ignores(filepath)) {\n continue;\n }\n\n if (entry.isDirectory()) {\n yield* this.walk({ dir: filepath });\n } else if (entry.isFile()) {\n yield this.normalize(filepath, false);\n }\n }\n }\n\n /**\n * Calculates the hash of each file and directory and returns an\n * object containing the hashes keyed by the normalized file path.\n *\n * @returns A Promise that resolves to an object containing the hashes\n * of each file.\n */\n async hashes(): Promise<Hashes> {\n try {\n this._isHashing = true;\n const files = {} as Hashes;\n\n for await (const normalizedPath of this.walk()) {\n const absolutePath = this.absolute(normalizedPath);\n files[normalizedPath] = await hash(absolutePath);\n }\n\n return files;\n } finally {\n this._isHashing = false;\n }\n }\n\n async hasFiles(): Promise<boolean> {\n return !(await this.isEmptyOrNonExistent());\n }\n\n async isEmptyOrNonExistent(): Promise<boolean> {\n let isEmptyOrNonExistent = true;\n try {\n for await (const _ of this.walk()) {\n isEmptyOrNonExistent = false;\n break;\n }\n } catch (error) {\n swallowEnoent(error);\n }\n return isEmptyOrNonExistent;\n }\n}\n\n/**\n * Key/value pairs where the key is the normalized path and the value is\n * the result of {@linkcode hash} for that path.\n */\nexport type Hashes = Record<string, Hash>;\n\nexport type Hash = {\n /**\n * The SHA-1 hash of the file or directory.\n *\n * If the path points to a directory, the hash is calculated based on\n * the directory's basename. If the path points to a file, the hash is\n * calculated based on the file's basename and contents.\n */\n sha1: string;\n\n /**\n * The Unix-style file permissions of the file or directory, or\n * undefined if the platform that generated this hash doesn't support\n * them.\n *\n * @example 0o644\n * @see supportsPermissions\n */\n permissions?: number;\n};\n\n/**\n * Whether the current platform supports Unix-style file permissions.\n *\n * Windows doesn't support Unix-style file permissions and all file\n * permissions retrieved via `node:fs` on Windows are translated to 666\n * or 444.\n */\nexport const supportsPermissions = process.platform === \"linux\" || process.platform === \"darwin\";\n\n/**\n * Calculates the {@linkcode Hash} of the file or directory at the\n * specified absolute path.\n *\n * @param absolutePath - The absolute path to the file or directory.\n * @returns A Promise that resolves to the {@linkcode Hash} of the file\n * or directory.\n */\nconst hash = async (absolutePath: string): Promise<Hash> => {\n const sha1 = createHash(\"sha1\");\n sha1.update(path.basename(absolutePath));\n\n const stats = await fs.stat(absolutePath);\n\n let permissions;\n if (supportsPermissions) {\n // strip everything but the permissions\n permissions = stats.mode & 0o777;\n }\n\n if (stats.isDirectory()) {\n return { sha1: sha1.digest(\"hex\"), permissions };\n }\n\n // windows uses CRLF line endings whereas unix uses LF line endings so\n // we always strip out CR bytes (0x0d) when hashing files. this does\n // make us blind to files that only differ by CR bytes, but that's a\n // tradeoff we're willing to make.\n const removeCR = new Transform({\n transform(chunk: Buffer, _encoding, callback) {\n if (!chunk.includes(0x0d)) {\n callback(undefined, chunk);\n return;\n }\n\n const filteredChunk = Buffer.alloc(chunk.length);\n let i = 0;\n for (const byte of chunk) {\n if (byte !== 0x0d) {\n filteredChunk[i++] = byte;\n }\n }\n\n callback(undefined, filteredChunk.subarray(0, i));\n },\n });\n\n await pipeline(fs.createReadStream(absolutePath), removeCR, sha1);\n\n return { sha1: sha1.digest(\"hex\"), permissions };\n};\n\n/**\n * Swallows ENOENT errors and throws any other errors.\n *\n * @param error - The error to handle.\n * @throws The original error if it is not an ENOENT error.\n */\nexport const swallowEnoent = (error: unknown): void => {\n if (error && typeof error === \"object\" && \"code\" in error && error.code === \"ENOENT\") {\n return;\n }\n throw error;\n};\n"],
5
+ "mappings": "gGAAA,IAAAA,EAAAC,EAAA,CAAAC,GAAAC,IAAA,CAAAC,IACA,SAASC,EAAWC,EAAS,CAC3B,OAAO,MAAM,QAAQA,CAAO,EACxBA,EACA,CAACA,CAAO,CACd,CAJSC,EAAAF,EAAA,aAMT,IAAMG,EAAQ,GACRC,EAAQ,IACRC,EAAS,KACTC,EAAwB,QACxBC,EAAmC,iBACnCC,EAA4C,OAC5CC,EAAqC,OACrCC,EAAsB,SAMtBC,EAA0B,eAE1BC,EAAQ,IAGVC,EAAiB,cAEjB,OAAO,OAAW,MACpBA,EAAiB,OAAO,IAAI,aAAa,GAE3C,IAAMC,EAAaD,EAEbE,EAASb,EAAA,CAACc,EAAQC,EAAKC,IAC3B,OAAO,eAAeF,EAAQC,EAAK,CAAC,MAAAC,CAAK,CAAC,EAD7B,UAGTC,EAAqB,mBAErBC,EAAelB,EAAA,IAAM,GAAN,gBAIfmB,EAAgBnB,EAAAoB,GAASA,EAAM,QACnCH,EACA,CAACI,EAAOC,EAAMC,IAAOD,EAAK,WAAW,CAAC,GAAKC,EAAG,WAAW,CAAC,EACtDF,EAGApB,CACN,EAPsB,iBAUhBuB,EAAsBxB,EAAAyB,GAAW,CACrC,GAAM,CAAC,OAAAC,CAAM,EAAID,EACjB,OAAOA,EAAQ,MAAM,EAAGC,EAASA,EAAS,CAAC,CAC7C,EAH4B,uBAgBtBC,EAAY,CAEhB,CAIE,UACA,IAAM1B,CACR,EAGA,CAKE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,GAAW,MAAM,EAC9BD,EAAK,OAAO1B,EAAK,SAASqB,CAAY,CAAC,EAEvC,IAAMO,EAAQ,MAAM,EAAAf,QAAG,KAAKQ,CAAY,EAEpCQ,EAMJ,GALIJ,KAEFI,EAAcD,EAAM,KAAO,KAGzBA,EAAM,YAAY,EACpB,MAAO,CAAE,KAAMF,EAAK,OAAO,KAAK,EAAG,YAAAG,CAAY,EAOjD,IAAMC,EAAW,IAAIC,GAAU,CAC7B,UAAUC,EAAeC,EAAWC,EAAU,CAC5C,GAAI,CAACF,EAAM,SAAS,EAAI,EAAG,CACzBE,EAAS,OAAWF,CAAK,EACzB,MACF,CAEA,IAAMG,EAAgB,OAAO,MAAMH,EAAM,MAAM,EAC3CI,EAAI,EACR,QAAWC,KAAQL,EACbK,IAAS,KACXF,EAAcC,GAAG,EAAIC,GAIzBH,EAAS,OAAWC,EAAc,SAAS,EAAGC,CAAC,CAAC,CAClD,CACF,CAAC,EAED,aAAME,GAAS,EAAAzB,QAAG,iBAAiBQ,CAAY,EAAGS,EAAUJ,CAAI,EAEzD,CAAE,KAAMA,EAAK,OAAO,KAAK,EAAG,YAAAG,CAAY,CACjD,EA1Ca,QAkDAd,EAAgBd,EAACa,GAAyB,CACrD,GAAI,EAAAA,GAAS,OAAOA,GAAU,UAAY,SAAUA,GAASA,EAAM,OAAS,UAG5E,MAAMA,CACR,EAL6B",
6
+ "names": ["require_ignore", "__commonJSMin", "exports", "module", "init_cjs", "makeArray", "subject", "__name", "EMPTY", "SPACE", "ESCAPE", "REGEX_TEST_BLANK_LINE", "REGEX_INVALID_TRAILING_BACKSLASH", "REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION", "REGEX_REPLACE_LEADING_EXCAPED_HASH", "REGEX_SPLITALL_CRLF", "REGEX_TEST_INVALID_PATH", "SLASH", "TMP_KEY_IGNORE", "KEY_IGNORE", "define", "object", "key", "value", "REGEX_REGEXP_RANGE", "RETURN_FALSE", "sanitizeRange", "range", "match", "from", "to", "cleanRangeBackSlash", "slashes", "length", "REPLACERS", "_", "m1", "m2", "index", "str", "p1", "p2", "unescaped", "leadEscape", "endEscape", "close", "regexCache", "makeRegex", "pattern", "ignoreCase", "source", "prev", "matcher", "replacer", "isString", "checkPattern", "splitPattern", "IgnoreRule", "origin", "negative", "regex", "createRule", "throwError", "message", "Ctor", "checkPath", "path", "originalPath", "doThrow", "isNotRelative", "p", "Ignore", "ignorecase", "allowRelativePaths", "rule", "checkUnignored", "ignored", "unignored", "cache", "slices", "parent", "paths", "factory", "options", "isPathValid", "makePosix", "REGIX_IS_WINDOWS_PATH_ABSOLUTE", "require_normalize_path", "__commonJSMin", "exports", "module", "init_cjs", "path", "stripTrailing", "len", "prefix", "ch", "segs", "init_cjs", "import_fs_extra", "import_ignore", "import_normalize_path", "assert", "createHash", "path", "Transform", "pipeline", "NEVER_IGNORE_PATHS", "ALWAYS_IGNORE_PATHS", "HASHING_IGNORE_PATHS", "Directory", "_Directory", "path", "__name", "dir", "directory", "to", "pathSegments", "result", "assert", "filepath", "isDirectory", "normalizePath", "ignore", "content", "fs", "error", "swallowEnoent", "ignored", "neverIgnored", "entry", "files", "normalizedPath", "absolutePath", "hash", "isEmptyOrNonExistent", "_", "supportsPermissions", "sha1", "createHash", "stats", "permissions", "removeCR", "Transform", "chunk", "_encoding", "callback", "filteredChunk", "i", "byte", "pipeline"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ import{Y as R,ba as L,d as x}from"./chunk-5NCJDCIZ.js";import{a as i,e as P,h as l}from"./chunk-7DYQUG5M.js";l();l();l();import U from"node:process";function d(){let{env:e}=U,{TERM:o,TERM_PROGRAM:t}=e;return U.platform!=="win32"?o!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||t==="Terminus-Sublime"||t==="vscode"||o==="xterm-256color"||o==="alacritty"||o==="rxvt-unicode"||o==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}i(d,"isUnicodeSupported");var S={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},v={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},q={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},w={...S,...v},W={...S,...q},C=d(),F=C?w:W,T=F,Le=Object.entries(v);var V={...x.testLike?w:T};if(d()&&R.windowsOrWsl)for(let e of["tick","cross"])V[e]+=" ";var g={};P(g,{beep:()=>ue,clearScreen:()=>se,clearTerminal:()=>ae,cursorBackward:()=>J,cursorDown:()=>j,cursorForward:()=>K,cursorGetPosition:()=>z,cursorHide:()=>X,cursorLeft:()=>y,cursorMove:()=>N,cursorNextLine:()=>Q,cursorPrevLine:()=>Y,cursorRestorePosition:()=>H,cursorSavePosition:()=>_,cursorShow:()=>Z,cursorTo:()=>$,cursorUp:()=>A,enterAlternativeScreen:()=>ce,eraseDown:()=>ne,eraseEndLine:()=>oe,eraseLine:()=>E,eraseLines:()=>ee,eraseScreen:()=>m,eraseStartLine:()=>te,eraseUp:()=>ie,exitAlternativeScreen:()=>de,iTerm:()=>fe,image:()=>he,link:()=>pe,scrollDown:()=>re,scrollUp:()=>le});l();import B from"node:process";l();var D=globalThis.window?.document!==void 0,Me=globalThis.process?.versions?.node!==void 0,Pe=globalThis.process?.versions?.bun!==void 0,qe=globalThis.Deno?.version?.deno!==void 0,We=globalThis.process?.versions?.electron!==void 0,Ce=globalThis.navigator?.userAgent?.includes("jsdom")===!0,Fe=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,Ve=typeof DedicatedWorkerGlobalScope<"u"&&globalThis instanceof DedicatedWorkerGlobalScope,Ge=typeof SharedWorkerGlobalScope<"u"&&globalThis instanceof SharedWorkerGlobalScope,Ie=typeof ServiceWorkerGlobalScope<"u"&&globalThis instanceof ServiceWorkerGlobalScope,u=globalThis.navigator?.userAgentData?.platform,$e=u==="macOS"||globalThis.navigator?.platform==="MacIntel"||globalThis.navigator?.userAgent?.includes(" Mac ")===!0||globalThis.process?.platform==="darwin",Ne=u==="Windows"||globalThis.navigator?.platform==="Win32"||globalThis.process?.platform==="win32",je=u==="Linux"||globalThis.navigator?.platform?.startsWith("Linux")===!0||globalThis.navigator?.userAgent?.includes(" Linux ")===!0||globalThis.process?.platform==="linux",Ke=u==="iOS"||globalThis.navigator?.platform==="MacIntel"&&globalThis.navigator?.maxTouchPoints>1||/iPad|iPhone|iPod/.test(globalThis.navigator?.platform),Je=u==="Android"||globalThis.navigator?.platform==="Android"||globalThis.navigator?.userAgent?.includes(" Android ")===!0||globalThis.process?.platform==="android";var n="\x1B[",h="\x1B]",c="\x07",p=";",k=!D&&B.env.TERM_PROGRAM==="Apple_Terminal",G=!D&&B.platform==="win32",I=D?()=>{throw new Error("`process.cwd()` only works in Node.js, not the browser.")}:B.cwd,$=i((e,o)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof o!="number"?n+(e+1)+"G":n+(o+1)+p+(e+1)+"H"},"cursorTo"),N=i((e,o)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let t="";return e<0?t+=n+-e+"D":e>0&&(t+=n+e+"C"),o<0?t+=n+-o+"A":o>0&&(t+=n+o+"B"),t},"cursorMove"),A=i((e=1)=>n+e+"A","cursorUp"),j=i((e=1)=>n+e+"B","cursorDown"),K=i((e=1)=>n+e+"C","cursorForward"),J=i((e=1)=>n+e+"D","cursorBackward"),y=n+"G",_=k?"\x1B7":n+"s",H=k?"\x1B8":n+"u",z=n+"6n",Q=n+"E",Y=n+"F",X=n+"?25l",Z=n+"?25h",ee=i(e=>{let o="";for(let t=0;t<e;t++)o+=E+(t<e-1?A():"");return e&&(o+=y),o},"eraseLines"),oe=n+"K",te=n+"1K",E=n+"2K",ne=n+"J",ie=n+"1J",m=n+"2J",le=n+"S",re=n+"T",se="\x1Bc",ae=G?`${m}${n}0f`:`${m}${n}3J${n}H`,ce=n+"?1049h",de=n+"?1049l",ue=c,pe=i((e,o)=>[h,"8",p,p,o,c,e,h,"8",p,p,c].join(""),"link"),he=i((e,o={})=>{let t=`${h}1337;File=inline=1`;return o.width&&(t+=`;width=${o.width}`),o.height&&(t+=`;height=${o.height}`),o.preserveAspectRatio===!1&&(t+=";preserveAspectRatio=0"),t+":"+Buffer.from(e).toString("base64")+c},"image"),fe={setCwd:i((e=I())=>`${h}50;CurrentDir=${e}${c}`,"setCwd"),annotation(e,o={}){let t=`${h}1337;`,r=o.x!==void 0,a=o.y!==void 0;if((r||a)&&!(r&&a&&o.length!==void 0))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replaceAll("|",""),t+=o.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",o.length>0?t+=(r?[e,o.length,o.x,o.y]:[o.length,e]).join("|"):t+=e,t+c}};l();l();import De from"node:assert";import ge from"node:events";import s from"node:process";import O from"node:readline";var M=class e extends ge{static{i(this,"Prompt")}static active=!1;value=void 0;firstRender=!0;done=!1;closed=!1;aborted=!1;exited=!1;close;constructor(){super(),De(!e.active,"only one prompt can be active at a time"),e.active=!0;let o=O.createInterface({input:s.stdin,escapeCodeTimeout:50});O.emitKeypressEvents(s.stdin,o),s.stdin.isTTY&&s.stdin.setRawMode(!0);let t=["SelectPrompt"].includes(this.constructor.name),r=i((a,b)=>{let f=be(b,t);f===!1?this._(a,b):f&&typeof this[f]=="function"?this[f](b):this.bell()},"keypress");this.close=()=>{s.stdin.removeListener("keypress",r),s.stdin.isTTY&&s.stdin.setRawMode(!1),o.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0,e.active=!1},s.stdin.on("keypress",r)}_(o,t){}onRender(){}fire(){this.emit("state",{value:this.value,aborted:this.aborted,exited:this.exited})}bell(){L.writeStdout(g.beep)}render(){this.onRender(),this.firstRender&&(this.firstRender=!1)}},be=i((e,o)=>{if(!(e.meta&&e.name!=="escape")){if(e.ctrl)switch(e.name){case"a":return"first";case"c":case"d":return"abort";case"e":return"last";case"g":return"reset"}if(o){if(e.name==="j")return"down";if(e.name==="k")return"up"}switch(e.name){case"return":case"enter":return"submit";case"backspace":return"delete";case"delete":return"deleteForward";case"abort":return"abort";case"escape":return"exit";case"tab":return"next";case"pagedown":return"nextPage";case"pageup":return"prevPage";case"home":return"home";case"end":return"end";case"up":return"up";case"down":return"down";case"right":return"right";case"left":return"left";default:return!1}}},"getPromptAction"),ao=i((e,o,t)=>{t=t||o;let r=Math.min(o-t,e-Math.floor(t/2));r<0&&(r=0);let a=Math.min(r+t,o);return{startIndex:r,endIndex:a}},"entriesToDisplay");export{g as a,V as b,M as c,ao as d};
2
+ //# sourceMappingURL=chunk-XK6JJEHJ.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/services/output/symbols.ts", "../node_modules/.pnpm/figures@6.1.0/node_modules/figures/index.js", "../node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js", "../node_modules/.pnpm/ansi-escapes@7.0.0/node_modules/ansi-escapes/base.js", "../node_modules/.pnpm/environment@1.1.0/node_modules/environment/index.js", "../node_modules/.pnpm/ansi-escapes@7.0.0/node_modules/ansi-escapes/index.js", "../src/services/output/prompt.ts"],
4
+ "sourcesContent": ["// eslint-disable-next-line no-restricted-imports -- this is the only place we're allowed to import figures\nimport figures, { mainSymbols } from \"figures\";\nimport isUnicodeSupported from \"is-unicode-supported\";\nimport { config } from \"../config/config.js\";\nimport { env } from \"../config/env.js\";\n\n// we always use main symbols in tests rather than figures so that our\n// tests are consistent across platforms (particularly Windows)\nexport const symbol = { ...(env.testLike ? mainSymbols : figures) };\n\nif (isUnicodeSupported() && config.windowsOrWsl) {\n // when unicode is supported and we're on windows or wsl, these\n // symbols end up rendering over two cells while only taking up one,\n // so we add an extra space to each of them to make them take up two\n for (const name of [\"tick\", \"cross\"] as const) {\n symbol[name] += \" \";\n }\n}\n", "import isUnicodeSupported from 'is-unicode-supported';\n\nconst common = {\n\tcircleQuestionMark: '(?)',\n\tquestionMarkPrefix: '(?)',\n\tsquare: '\u2588',\n\tsquareDarkShade: '\u2593',\n\tsquareMediumShade: '\u2592',\n\tsquareLightShade: '\u2591',\n\tsquareTop: '\u2580',\n\tsquareBottom: '\u2584',\n\tsquareLeft: '\u258C',\n\tsquareRight: '\u2590',\n\tsquareCenter: '\u25A0',\n\tbullet: '\u25CF',\n\tdot: '\u2024',\n\tellipsis: '\u2026',\n\tpointerSmall: '\u203A',\n\ttriangleUp: '\u25B2',\n\ttriangleUpSmall: '\u25B4',\n\ttriangleDown: '\u25BC',\n\ttriangleDownSmall: '\u25BE',\n\ttriangleLeftSmall: '\u25C2',\n\ttriangleRightSmall: '\u25B8',\n\thome: '\u2302',\n\theart: '\u2665',\n\tmusicNote: '\u266A',\n\tmusicNoteBeamed: '\u266B',\n\tarrowUp: '\u2191',\n\tarrowDown: '\u2193',\n\tarrowLeft: '\u2190',\n\tarrowRight: '\u2192',\n\tarrowLeftRight: '\u2194',\n\tarrowUpDown: '\u2195',\n\talmostEqual: '\u2248',\n\tnotEqual: '\u2260',\n\tlessOrEqual: '\u2264',\n\tgreaterOrEqual: '\u2265',\n\tidentical: '\u2261',\n\tinfinity: '\u221E',\n\tsubscriptZero: '\u2080',\n\tsubscriptOne: '\u2081',\n\tsubscriptTwo: '\u2082',\n\tsubscriptThree: '\u2083',\n\tsubscriptFour: '\u2084',\n\tsubscriptFive: '\u2085',\n\tsubscriptSix: '\u2086',\n\tsubscriptSeven: '\u2087',\n\tsubscriptEight: '\u2088',\n\tsubscriptNine: '\u2089',\n\toneHalf: '\u00BD',\n\toneThird: '\u2153',\n\toneQuarter: '\u00BC',\n\toneFifth: '\u2155',\n\toneSixth: '\u2159',\n\toneEighth: '\u215B',\n\ttwoThirds: '\u2154',\n\ttwoFifths: '\u2156',\n\tthreeQuarters: '\u00BE',\n\tthreeFifths: '\u2157',\n\tthreeEighths: '\u215C',\n\tfourFifths: '\u2158',\n\tfiveSixths: '\u215A',\n\tfiveEighths: '\u215D',\n\tsevenEighths: '\u215E',\n\tline: '\u2500',\n\tlineBold: '\u2501',\n\tlineDouble: '\u2550',\n\tlineDashed0: '\u2504',\n\tlineDashed1: '\u2505',\n\tlineDashed2: '\u2508',\n\tlineDashed3: '\u2509',\n\tlineDashed4: '\u254C',\n\tlineDashed5: '\u254D',\n\tlineDashed6: '\u2574',\n\tlineDashed7: '\u2576',\n\tlineDashed8: '\u2578',\n\tlineDashed9: '\u257A',\n\tlineDashed10: '\u257C',\n\tlineDashed11: '\u257E',\n\tlineDashed12: '\u2212',\n\tlineDashed13: '\u2013',\n\tlineDashed14: '\u2010',\n\tlineDashed15: '\u2043',\n\tlineVertical: '\u2502',\n\tlineVerticalBold: '\u2503',\n\tlineVerticalDouble: '\u2551',\n\tlineVerticalDashed0: '\u2506',\n\tlineVerticalDashed1: '\u2507',\n\tlineVerticalDashed2: '\u250A',\n\tlineVerticalDashed3: '\u250B',\n\tlineVerticalDashed4: '\u254E',\n\tlineVerticalDashed5: '\u254F',\n\tlineVerticalDashed6: '\u2575',\n\tlineVerticalDashed7: '\u2577',\n\tlineVerticalDashed8: '\u2579',\n\tlineVerticalDashed9: '\u257B',\n\tlineVerticalDashed10: '\u257D',\n\tlineVerticalDashed11: '\u257F',\n\tlineDownLeft: '\u2510',\n\tlineDownLeftArc: '\u256E',\n\tlineDownBoldLeftBold: '\u2513',\n\tlineDownBoldLeft: '\u2512',\n\tlineDownLeftBold: '\u2511',\n\tlineDownDoubleLeftDouble: '\u2557',\n\tlineDownDoubleLeft: '\u2556',\n\tlineDownLeftDouble: '\u2555',\n\tlineDownRight: '\u250C',\n\tlineDownRightArc: '\u256D',\n\tlineDownBoldRightBold: '\u250F',\n\tlineDownBoldRight: '\u250E',\n\tlineDownRightBold: '\u250D',\n\tlineDownDoubleRightDouble: '\u2554',\n\tlineDownDoubleRight: '\u2553',\n\tlineDownRightDouble: '\u2552',\n\tlineUpLeft: '\u2518',\n\tlineUpLeftArc: '\u256F',\n\tlineUpBoldLeftBold: '\u251B',\n\tlineUpBoldLeft: '\u251A',\n\tlineUpLeftBold: '\u2519',\n\tlineUpDoubleLeftDouble: '\u255D',\n\tlineUpDoubleLeft: '\u255C',\n\tlineUpLeftDouble: '\u255B',\n\tlineUpRight: '\u2514',\n\tlineUpRightArc: '\u2570',\n\tlineUpBoldRightBold: '\u2517',\n\tlineUpBoldRight: '\u2516',\n\tlineUpRightBold: '\u2515',\n\tlineUpDoubleRightDouble: '\u255A',\n\tlineUpDoubleRight: '\u2559',\n\tlineUpRightDouble: '\u2558',\n\tlineUpDownLeft: '\u2524',\n\tlineUpBoldDownBoldLeftBold: '\u252B',\n\tlineUpBoldDownBoldLeft: '\u2528',\n\tlineUpDownLeftBold: '\u2525',\n\tlineUpBoldDownLeftBold: '\u2529',\n\tlineUpDownBoldLeftBold: '\u252A',\n\tlineUpDownBoldLeft: '\u2527',\n\tlineUpBoldDownLeft: '\u2526',\n\tlineUpDoubleDownDoubleLeftDouble: '\u2563',\n\tlineUpDoubleDownDoubleLeft: '\u2562',\n\tlineUpDownLeftDouble: '\u2561',\n\tlineUpDownRight: '\u251C',\n\tlineUpBoldDownBoldRightBold: '\u2523',\n\tlineUpBoldDownBoldRight: '\u2520',\n\tlineUpDownRightBold: '\u251D',\n\tlineUpBoldDownRightBold: '\u2521',\n\tlineUpDownBoldRightBold: '\u2522',\n\tlineUpDownBoldRight: '\u251F',\n\tlineUpBoldDownRight: '\u251E',\n\tlineUpDoubleDownDoubleRightDouble: '\u2560',\n\tlineUpDoubleDownDoubleRight: '\u255F',\n\tlineUpDownRightDouble: '\u255E',\n\tlineDownLeftRight: '\u252C',\n\tlineDownBoldLeftBoldRightBold: '\u2533',\n\tlineDownLeftBoldRightBold: '\u252F',\n\tlineDownBoldLeftRight: '\u2530',\n\tlineDownBoldLeftBoldRight: '\u2531',\n\tlineDownBoldLeftRightBold: '\u2532',\n\tlineDownLeftRightBold: '\u252E',\n\tlineDownLeftBoldRight: '\u252D',\n\tlineDownDoubleLeftDoubleRightDouble: '\u2566',\n\tlineDownDoubleLeftRight: '\u2565',\n\tlineDownLeftDoubleRightDouble: '\u2564',\n\tlineUpLeftRight: '\u2534',\n\tlineUpBoldLeftBoldRightBold: '\u253B',\n\tlineUpLeftBoldRightBold: '\u2537',\n\tlineUpBoldLeftRight: '\u2538',\n\tlineUpBoldLeftBoldRight: '\u2539',\n\tlineUpBoldLeftRightBold: '\u253A',\n\tlineUpLeftRightBold: '\u2536',\n\tlineUpLeftBoldRight: '\u2535',\n\tlineUpDoubleLeftDoubleRightDouble: '\u2569',\n\tlineUpDoubleLeftRight: '\u2568',\n\tlineUpLeftDoubleRightDouble: '\u2567',\n\tlineUpDownLeftRight: '\u253C',\n\tlineUpBoldDownBoldLeftBoldRightBold: '\u254B',\n\tlineUpDownBoldLeftBoldRightBold: '\u2548',\n\tlineUpBoldDownLeftBoldRightBold: '\u2547',\n\tlineUpBoldDownBoldLeftRightBold: '\u254A',\n\tlineUpBoldDownBoldLeftBoldRight: '\u2549',\n\tlineUpBoldDownLeftRight: '\u2540',\n\tlineUpDownBoldLeftRight: '\u2541',\n\tlineUpDownLeftBoldRight: '\u253D',\n\tlineUpDownLeftRightBold: '\u253E',\n\tlineUpBoldDownBoldLeftRight: '\u2542',\n\tlineUpDownLeftBoldRightBold: '\u253F',\n\tlineUpBoldDownLeftBoldRight: '\u2543',\n\tlineUpBoldDownLeftRightBold: '\u2544',\n\tlineUpDownBoldLeftBoldRight: '\u2545',\n\tlineUpDownBoldLeftRightBold: '\u2546',\n\tlineUpDoubleDownDoubleLeftDoubleRightDouble: '\u256C',\n\tlineUpDoubleDownDoubleLeftRight: '\u256B',\n\tlineUpDownLeftDoubleRightDouble: '\u256A',\n\tlineCross: '\u2573',\n\tlineBackslash: '\u2572',\n\tlineSlash: '\u2571',\n};\n\nconst specialMainSymbols = {\n\ttick: '\u2714',\n\tinfo: '\u2139',\n\twarning: '\u26A0',\n\tcross: '\u2718',\n\tsquareSmall: '\u25FB',\n\tsquareSmallFilled: '\u25FC',\n\tcircle: '\u25EF',\n\tcircleFilled: '\u25C9',\n\tcircleDotted: '\u25CC',\n\tcircleDouble: '\u25CE',\n\tcircleCircle: '\u24DE',\n\tcircleCross: '\u24E7',\n\tcirclePipe: '\u24BE',\n\tradioOn: '\u25C9',\n\tradioOff: '\u25EF',\n\tcheckboxOn: '\u2612',\n\tcheckboxOff: '\u2610',\n\tcheckboxCircleOn: '\u24E7',\n\tcheckboxCircleOff: '\u24BE',\n\tpointer: '\u276F',\n\ttriangleUpOutline: '\u25B3',\n\ttriangleLeft: '\u25C0',\n\ttriangleRight: '\u25B6',\n\tlozenge: '\u25C6',\n\tlozengeOutline: '\u25C7',\n\thamburger: '\u2630',\n\tsmiley: '\u32E1',\n\tmustache: '\u0DF4',\n\tstar: '\u2605',\n\tplay: '\u25B6',\n\tnodejs: '\u2B22',\n\toneSeventh: '\u2150',\n\toneNinth: '\u2151',\n\toneTenth: '\u2152',\n};\n\nconst specialFallbackSymbols = {\n\ttick: '\u221A',\n\tinfo: 'i',\n\twarning: '\u203C',\n\tcross: '\u00D7',\n\tsquareSmall: '\u25A1',\n\tsquareSmallFilled: '\u25A0',\n\tcircle: '( )',\n\tcircleFilled: '(*)',\n\tcircleDotted: '( )',\n\tcircleDouble: '( )',\n\tcircleCircle: '(\u25CB)',\n\tcircleCross: '(\u00D7)',\n\tcirclePipe: '(\u2502)',\n\tradioOn: '(*)',\n\tradioOff: '( )',\n\tcheckboxOn: '[\u00D7]',\n\tcheckboxOff: '[ ]',\n\tcheckboxCircleOn: '(\u00D7)',\n\tcheckboxCircleOff: '( )',\n\tpointer: '>',\n\ttriangleUpOutline: '\u2206',\n\ttriangleLeft: '\u25C4',\n\ttriangleRight: '\u25BA',\n\tlozenge: '\u2666',\n\tlozengeOutline: '\u25CA',\n\thamburger: '\u2261',\n\tsmiley: '\u263A',\n\tmustache: '\u250C\u2500\u2510',\n\tstar: '\u2736',\n\tplay: '\u25BA',\n\tnodejs: '\u2666',\n\toneSeventh: '1/7',\n\toneNinth: '1/9',\n\toneTenth: '1/10',\n};\n\nexport const mainSymbols = {...common, ...specialMainSymbols};\nexport const fallbackSymbols = {...common, ...specialFallbackSymbols};\n\nconst shouldUseMain = isUnicodeSupported();\nconst figures = shouldUseMain ? mainSymbols : fallbackSymbols;\nexport default figures;\n\nconst replacements = Object.entries(specialMainSymbols);\n\n// On terminals which do not support Unicode symbols, substitute them to other symbols\nexport const replaceSymbols = (string, {useFallback = !shouldUseMain} = {}) => {\n\tif (useFallback) {\n\t\tfor (const [key, mainSymbol] of replacements) {\n\t\t\tstring = string.replaceAll(mainSymbol, fallbackSymbols[key]);\n\t\t}\n\t}\n\n\treturn string;\n};\n", "import process from 'node:process';\n\nexport default function isUnicodeSupported() {\n\tconst {env} = process;\n\tconst {TERM, TERM_PROGRAM} = env;\n\n\tif (process.platform !== 'win32') {\n\t\treturn TERM !== 'linux'; // Linux console (kernel)\n\t}\n\n\treturn Boolean(env.WT_SESSION) // Windows Terminal\n\t\t|| Boolean(env.TERMINUS_SUBLIME) // Terminus (<0.2.27)\n\t\t|| env.ConEmuTask === '{cmd::Cmder}' // ConEmu and cmder\n\t\t|| TERM_PROGRAM === 'Terminus-Sublime'\n\t\t|| TERM_PROGRAM === 'vscode'\n\t\t|| TERM === 'xterm-256color'\n\t\t|| TERM === 'alacritty'\n\t\t|| TERM === 'rxvt-unicode'\n\t\t|| TERM === 'rxvt-unicode-256color'\n\t\t|| env.TERMINAL_EMULATOR === 'JetBrains-JediTerm';\n}\n", "import process from 'node:process';\nimport {isBrowser} from 'environment';\n\nconst ESC = '\\u001B[';\nconst OSC = '\\u001B]';\nconst BEL = '\\u0007';\nconst SEP = ';';\n\nconst isTerminalApp = !isBrowser && process.env.TERM_PROGRAM === 'Apple_Terminal';\nconst isWindows = !isBrowser && process.platform === 'win32';\n\nconst cwdFunction = isBrowser ? () => {\n\tthrow new Error('`process.cwd()` only works in Node.js, not the browser.');\n} : process.cwd;\n\nexport const cursorTo = (x, y) => {\n\tif (typeof x !== 'number') {\n\t\tthrow new TypeError('The `x` argument is required');\n\t}\n\n\tif (typeof y !== 'number') {\n\t\treturn ESC + (x + 1) + 'G';\n\t}\n\n\treturn ESC + (y + 1) + SEP + (x + 1) + 'H';\n};\n\nexport const cursorMove = (x, y) => {\n\tif (typeof x !== 'number') {\n\t\tthrow new TypeError('The `x` argument is required');\n\t}\n\n\tlet returnValue = '';\n\n\tif (x < 0) {\n\t\treturnValue += ESC + (-x) + 'D';\n\t} else if (x > 0) {\n\t\treturnValue += ESC + x + 'C';\n\t}\n\n\tif (y < 0) {\n\t\treturnValue += ESC + (-y) + 'A';\n\t} else if (y > 0) {\n\t\treturnValue += ESC + y + 'B';\n\t}\n\n\treturn returnValue;\n};\n\nexport const cursorUp = (count = 1) => ESC + count + 'A';\nexport const cursorDown = (count = 1) => ESC + count + 'B';\nexport const cursorForward = (count = 1) => ESC + count + 'C';\nexport const cursorBackward = (count = 1) => ESC + count + 'D';\n\nexport const cursorLeft = ESC + 'G';\nexport const cursorSavePosition = isTerminalApp ? '\\u001B7' : ESC + 's';\nexport const cursorRestorePosition = isTerminalApp ? '\\u001B8' : ESC + 'u';\nexport const cursorGetPosition = ESC + '6n';\nexport const cursorNextLine = ESC + 'E';\nexport const cursorPrevLine = ESC + 'F';\nexport const cursorHide = ESC + '?25l';\nexport const cursorShow = ESC + '?25h';\n\nexport const eraseLines = count => {\n\tlet clear = '';\n\n\tfor (let i = 0; i < count; i++) {\n\t\tclear += eraseLine + (i < count - 1 ? cursorUp() : '');\n\t}\n\n\tif (count) {\n\t\tclear += cursorLeft;\n\t}\n\n\treturn clear;\n};\n\nexport const eraseEndLine = ESC + 'K';\nexport const eraseStartLine = ESC + '1K';\nexport const eraseLine = ESC + '2K';\nexport const eraseDown = ESC + 'J';\nexport const eraseUp = ESC + '1J';\nexport const eraseScreen = ESC + '2J';\nexport const scrollUp = ESC + 'S';\nexport const scrollDown = ESC + 'T';\n\nexport const clearScreen = '\\u001Bc';\n\nexport const clearTerminal = isWindows\n\t? `${eraseScreen}${ESC}0f`\n\t// 1. Erases the screen (Only done in case `2` is not supported)\n\t// 2. Erases the whole screen including scrollback buffer\n\t// 3. Moves cursor to the top-left position\n\t// More info: https://www.real-world-systems.com/docs/ANSIcode.html\n\t:\t`${eraseScreen}${ESC}3J${ESC}H`;\n\nexport const enterAlternativeScreen = ESC + '?1049h';\nexport const exitAlternativeScreen = ESC + '?1049l';\n\nexport const beep = BEL;\n\nexport const link = (text, url) => [\n\tOSC,\n\t'8',\n\tSEP,\n\tSEP,\n\turl,\n\tBEL,\n\ttext,\n\tOSC,\n\t'8',\n\tSEP,\n\tSEP,\n\tBEL,\n].join('');\n\nexport const image = (data, options = {}) => {\n\tlet returnValue = `${OSC}1337;File=inline=1`;\n\n\tif (options.width) {\n\t\treturnValue += `;width=${options.width}`;\n\t}\n\n\tif (options.height) {\n\t\treturnValue += `;height=${options.height}`;\n\t}\n\n\tif (options.preserveAspectRatio === false) {\n\t\treturnValue += ';preserveAspectRatio=0';\n\t}\n\n\treturn returnValue + ':' + Buffer.from(data).toString('base64') + BEL;\n};\n\nexport const iTerm = {\n\tsetCwd: (cwd = cwdFunction()) => `${OSC}50;CurrentDir=${cwd}${BEL}`,\n\n\tannotation(message, options = {}) {\n\t\tlet returnValue = `${OSC}1337;`;\n\n\t\tconst hasX = options.x !== undefined;\n\t\tconst hasY = options.y !== undefined;\n\t\tif ((hasX || hasY) && !(hasX && hasY && options.length !== undefined)) {\n\t\t\tthrow new Error('`x`, `y` and `length` must be defined when `x` or `y` is defined');\n\t\t}\n\n\t\tmessage = message.replaceAll('|', '');\n\n\t\treturnValue += options.isHidden ? 'AddHiddenAnnotation=' : 'AddAnnotation=';\n\n\t\tif (options.length > 0) {\n\t\t\treturnValue += (\n\t\t\t\thasX\n\t\t\t\t\t? [message, options.length, options.x, options.y]\n\t\t\t\t\t: [options.length, message]\n\t\t\t).join('|');\n\t\t} else {\n\t\t\treturnValue += message;\n\t\t}\n\n\t\treturn returnValue + BEL;\n\t},\n};\n", "/* globals WorkerGlobalScope, DedicatedWorkerGlobalScope, SharedWorkerGlobalScope, ServiceWorkerGlobalScope */\n\nexport const isBrowser = globalThis.window?.document !== undefined;\n\nexport const isNode = globalThis.process?.versions?.node !== undefined;\n\nexport const isBun = globalThis.process?.versions?.bun !== undefined;\n\nexport const isDeno = globalThis.Deno?.version?.deno !== undefined;\n\nexport const isElectron = globalThis.process?.versions?.electron !== undefined;\n\nexport const isJsDom = globalThis.navigator?.userAgent?.includes('jsdom') === true;\n\nexport const isWebWorker = typeof WorkerGlobalScope !== 'undefined' && globalThis instanceof WorkerGlobalScope;\n\nexport const isDedicatedWorker = typeof DedicatedWorkerGlobalScope !== 'undefined' && globalThis instanceof DedicatedWorkerGlobalScope;\n\nexport const isSharedWorker = typeof SharedWorkerGlobalScope !== 'undefined' && globalThis instanceof SharedWorkerGlobalScope;\n\nexport const isServiceWorker = typeof ServiceWorkerGlobalScope !== 'undefined' && globalThis instanceof ServiceWorkerGlobalScope;\n\n// Note: I'm intentionally not DRYing up the other variables to keep them \"lazy\".\nconst platform = globalThis.navigator?.userAgentData?.platform;\n\nexport const isMacOs = platform === 'macOS'\n\t|| globalThis.navigator?.platform === 'MacIntel' // Even on Apple silicon Macs.\n\t|| globalThis.navigator?.userAgent?.includes(' Mac ') === true\n\t|| globalThis.process?.platform === 'darwin';\n\nexport const isWindows = platform === 'Windows'\n\t|| globalThis.navigator?.platform === 'Win32'\n\t|| globalThis.process?.platform === 'win32';\n\nexport const isLinux = platform === 'Linux'\n\t|| globalThis.navigator?.platform?.startsWith('Linux') === true\n\t|| globalThis.navigator?.userAgent?.includes(' Linux ') === true\n\t|| globalThis.process?.platform === 'linux';\n\nexport const isIos = platform === 'iOS'\n\t|| (globalThis.navigator?.platform === 'MacIntel' && globalThis.navigator?.maxTouchPoints > 1)\n\t|| /iPad|iPhone|iPod/.test(globalThis.navigator?.platform);\n\nexport const isAndroid = platform === 'Android'\n\t|| globalThis.navigator?.platform === 'Android'\n\t|| globalThis.navigator?.userAgent?.includes(' Android ') === true\n\t|| globalThis.process?.platform === 'android';\n", "export * from './base.js';\nexport * as default from './base.js';\n", "import ansiEscapes from \"ansi-escapes\";\nimport assert from \"node:assert\";\nimport EventEmitter from \"node:events\";\nimport process from \"node:process\";\nimport readline from \"node:readline\";\nimport { output } from \"./output.js\";\n\n/**\n * Inspired by `prompts`:\n * https://github.com/terkelg/prompts/blob/e0519913ec4fcc6746bb3d97d8cd0960c3f3ffde/lib/elements/prompt.js\n *\n * MIT License\n *\n * Copyright (c) 2018 Terkel Gjervig Nielsen\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nexport class Prompt extends EventEmitter {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [action: string]: any; // (key: StdinKey) => void;\n\n static active = false;\n\n // state\n value: unknown = undefined;\n firstRender = true;\n done = false;\n closed = false;\n aborted = false;\n exited = false;\n\n // methods that rely on constructor closure\n close: () => void;\n\n constructor() {\n super();\n assert(!Prompt.active, \"only one prompt can be active at a time\");\n Prompt.active = true;\n\n const rl = readline.createInterface({ input: process.stdin, escapeCodeTimeout: 50 });\n readline.emitKeypressEvents(process.stdin, rl);\n\n if (process.stdin.isTTY) {\n process.stdin.setRawMode(true);\n }\n\n const isSelect = [\"SelectPrompt\"].includes(this.constructor.name);\n const keypress = (str: string, key: StdinKey): void => {\n const action = getPromptAction(key, isSelect);\n if (action === false) {\n this._(str, key);\n } else if (action && typeof this[action] === \"function\") {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n this[action](key);\n } else {\n this.bell();\n }\n };\n\n this.close = () => {\n process.stdin.removeListener(\"keypress\", keypress);\n if (process.stdin.isTTY) {\n process.stdin.setRawMode(false);\n }\n\n rl.close();\n this.emit(this.aborted ? \"abort\" : this.exited ? \"exit\" : \"submit\", this.value);\n this.closed = true;\n Prompt.active = false;\n };\n\n process.stdin.on(\"keypress\", keypress);\n }\n\n _(_str: string, _key: StdinKey): void {\n // noop\n }\n\n onRender(): void {\n // noop\n }\n\n fire(): void {\n this.emit(\"state\", {\n value: this.value,\n aborted: this.aborted,\n exited: this.exited,\n });\n }\n\n bell(): void {\n output.writeStdout(ansiEscapes.beep);\n }\n\n render(): void {\n this.onRender();\n if (this.firstRender) {\n this.firstRender = false;\n }\n }\n}\n\nexport type PromptAction =\n | \"abort\"\n | \"exit\"\n | \"submit\"\n | \"next\"\n | \"nextPage\"\n | \"prevPage\"\n | \"home\"\n | \"end\"\n | \"up\"\n | \"down\"\n | \"right\"\n | \"left\"\n | \"reset\"\n | \"delete\"\n | \"deleteForward\"\n | \"first\"\n | \"last\";\n\nexport type StdinKey = {\n name: string;\n ctrl: boolean;\n meta: boolean;\n};\n\nconst getPromptAction = (key: StdinKey, isSelect: boolean): PromptAction | false | undefined => {\n if (key.meta && key.name !== \"escape\") {\n return;\n }\n\n if (key.ctrl) {\n switch (key.name) {\n case \"a\":\n return \"first\";\n case \"c\":\n case \"d\":\n return \"abort\";\n case \"e\":\n return \"last\";\n case \"g\":\n return \"reset\";\n }\n }\n\n if (isSelect) {\n if (key.name === \"j\") {\n return \"down\";\n }\n if (key.name === \"k\") {\n return \"up\";\n }\n }\n\n switch (key.name) {\n case \"return\":\n case \"enter\":\n return \"submit\";\n case \"backspace\":\n return \"delete\";\n case \"delete\":\n return \"deleteForward\";\n case \"abort\":\n return \"abort\";\n case \"escape\":\n return \"exit\";\n case \"tab\":\n return \"next\";\n case \"pagedown\":\n return \"nextPage\";\n case \"pageup\":\n return \"prevPage\";\n case \"home\":\n return \"home\";\n case \"end\":\n return \"end\";\n case \"up\":\n return \"up\";\n case \"down\":\n return \"down\";\n case \"right\":\n return \"right\";\n case \"left\":\n return \"left\";\n default:\n return false;\n }\n};\n\n/**\n * Determine what entries should be displayed on the screen, based on the\n * currently selected index and the maximum visible. Used in list-based\n * prompts like `select` and `multiselect`.\n *\n * @param cursor - the currently selected entry\n * @param total - the total entries available to display\n * @param [maxVisible] - the number of entries that can be displayed\n */\nexport const entriesToDisplay = (cursor: number, total: number, maxVisible: number): { startIndex: number; endIndex: number } => {\n maxVisible = maxVisible || total;\n\n let startIndex = Math.min(total - maxVisible, cursor - Math.floor(maxVisible / 2));\n if (startIndex < 0) {\n startIndex = 0;\n }\n\n const endIndex = Math.min(startIndex + maxVisible, total);\n\n return { startIndex, endIndex };\n};\n"],
5
+ "mappings": "6GAAAA,ICAAC,ICAAC,IAAA,OAAOC,MAAa,eAEL,SAARC,GAAsC,CAC5C,GAAM,CAAC,IAAAC,CAAG,EAAIC,EACR,CAAC,KAAAC,EAAM,aAAAC,CAAY,EAAIH,EAE7B,OAAIC,EAAQ,WAAa,QACjBC,IAAS,QAGV,EAAQF,EAAI,YACf,EAAQA,EAAI,kBACZA,EAAI,aAAe,gBACnBG,IAAiB,oBACjBA,IAAiB,UACjBD,IAAS,kBACTA,IAAS,aACTA,IAAS,gBACTA,IAAS,yBACTF,EAAI,oBAAsB,oBAC/B,CAlBwBI,EAAAL,EAAA,sBDAxB,IAAMM,EAAS,CACd,mBAAoB,MACpB,mBAAoB,MACpB,OAAQ,SACR,gBAAiB,SACjB,kBAAmB,SACnB,iBAAkB,SAClB,UAAW,SACX,aAAc,SACd,WAAY,SACZ,YAAa,SACb,aAAc,SACd,OAAQ,SACR,IAAK,SACL,SAAU,SACV,aAAc,SACd,WAAY,SACZ,gBAAiB,S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ACT,IAAK,OACH,MAAO,OACT,IAAK,MACH,MAAO,MACT,IAAK,KACH,MAAO,KACT,IAAK,OACH,MAAO,OACT,IAAK,QACH,MAAO,QACT,IAAK,OACH,MAAO,OACT,QACE,MAAO,EACX,EACF,EA7DwB,mBAwEXO,GAAmBf,EAAA,CAACgB,EAAgBC,EAAeC,IAAiE,CAC/HA,EAAaA,GAAcD,EAE3B,IAAIE,EAAa,KAAK,IAAIF,EAAQC,EAAYF,EAAS,KAAK,MAAME,EAAa,CAAC,CAAC,EAC7EC,EAAa,IACfA,EAAa,GAGf,IAAMC,EAAW,KAAK,IAAID,EAAaD,EAAYD,CAAK,EAExD,MAAO,CAAE,WAAAE,EAAY,SAAAC,CAAS,CAChC,EAXgC",
6
+ "names": ["init_cjs", "init_cjs", "init_cjs", "process", "isUnicodeSupported", "env", "process", "TERM", "TERM_PROGRAM", "__name", "common", "specialMainSymbols", "specialFallbackSymbols", "mainSymbols", "fallbackSymbols", "shouldUseMain", "isUnicodeSupported", "figures", "figures_default", "replacements", "symbol", "env", "mainSymbols", "figures_default", "isUnicodeSupported", "config", "name", "base_exports", "__export", "beep", "clearScreen", "clearTerminal", "cursorBackward", "cursorDown", "cursorForward", "cursorGetPosition", "cursorHide", "cursorLeft", "cursorMove", "cursorNextLine", "cursorPrevLine", "cursorRestorePosition", "cursorSavePosition", "cursorShow", "cursorTo", "cursorUp", "enterAlternativeScreen", "eraseDown", "eraseEndLine", "eraseLine", "eraseLines", "eraseScreen", "eraseStartLine", "eraseUp", "exitAlternativeScreen", "iTerm", "image", "link", "scrollDown", "scrollUp", "init_cjs", "process", "init_cjs", "isBrowser", "isNode", "isBun", "isDeno", "isElectron", "isJsDom", "isWebWorker", "isDedicatedWorker", "isSharedWorker", "isServiceWorker", "platform", "isMacOs", "isWindows", "isLinux", "isIos", "isAndroid", "ESC", "OSC", "BEL", "SEP", "isTerminalApp", "isBrowser", "process", "isWindows", "cwdFunction", "cursorTo", "__name", "x", "y", "cursorMove", "returnValue", "cursorUp", "count", "cursorDown", "cursorForward", "cursorBackward", "cursorLeft", "cursorSavePosition", "cursorRestorePosition", "cursorGetPosition", "cursorNextLine", "cursorPrevLine", "cursorHide", "cursorShow", "eraseLines", "clear", "i", "eraseLine", "eraseEndLine", "eraseStartLine", "eraseDown", "eraseUp", "eraseScreen", "scrollUp", "scrollDown", "clearScreen", "clearTerminal", "enterAlternativeScreen", "exitAlternativeScreen", "beep", "link", "text", "url", "image", "data", "options", "iTerm", "cwd", "message", "hasX", "hasY", "init_cjs", "init_cjs", "assert", "EventEmitter", "process", "readline", "Prompt", "_Prompt", "EventEmitter", "__name", "assert", "rl", "readline", "process", "isSelect", "keypress", "str", "key", "action", "getPromptAction", "_str", "_key", "output", "base_exports", "entriesToDisplay", "cursor", "total", "maxVisible", "startIndex", "endIndex"]
7
+ }
@@ -1,4 +1,4 @@
1
- import{ca as Xt,ea as tt,fa as Zt,ha as k,ia as et}from"./chunk-XOSBJSTW.js";import{a as s,b as X,d as S,f as Z,h as g}from"./chunk-7DYQUG5M.js";var $=S((qe,rt)=>{g();var D=[],it=0,C=s((i,t)=>{it>=t&&D.push(i)},"debug");C.WARN=1;C.INFO=2;C.DEBUG=3;C.reset=()=>{D=[]};C.setDebugLevel=i=>{it=i};C.warn=i=>C(i,C.WARN);C.info=i=>C(i,C.INFO);C.debug=i=>C(i,C.DEBUG);C.debugMessages=()=>D;rt.exports=C});var Y=S((Ge,lt)=>{g();var nt=Xt();function z(i){return i?/\u001b\[((?:\d*;){0,5}\d*)m/g:/\u001b\[(?:\d*;){0,5}\d*m/g}s(z,"codeRegex");function W(i){let t=z();return(""+i).replace(t,"").split(`
1
+ import{ca as Xt,ea as tt,fa as Zt,ha as k,ia as et}from"./chunk-5NCJDCIZ.js";import{a as s,b as X,d as S,f as Z,h as g}from"./chunk-7DYQUG5M.js";var $=S((qe,rt)=>{g();var D=[],it=0,C=s((i,t)=>{it>=t&&D.push(i)},"debug");C.WARN=1;C.INFO=2;C.DEBUG=3;C.reset=()=>{D=[]};C.setDebugLevel=i=>{it=i};C.warn=i=>C(i,C.WARN);C.info=i=>C(i,C.INFO);C.debug=i=>C(i,C.DEBUG);C.debugMessages=()=>D;rt.exports=C});var Y=S((Ge,lt)=>{g();var nt=Xt();function z(i){return i?/\u001b\[((?:\d*;){0,5}\d*)m/g:/\u001b\[(?:\d*;){0,5}\d*m/g}s(z,"codeRegex");function W(i){let t=z();return(""+i).replace(t,"").split(`
2
2
  `).reduce(function(n,o){return nt(o)>n?nt(o):n},0)}s(W,"strlen");function _(i,t){return Array(t+1).join(i)}s(_,"repeat");function te(i,t,e,r){let n=W(i);if(t+1>=n){let o=t-n;switch(r){case"right":{i=_(e,o)+i;break}case"center":{let l=Math.ceil(o/2),d=o-l;i=_(e,d)+i+_(e,l);break}default:{i=i+_(e,o);break}}}return i}s(te,"pad");var B={};function I(i,t,e){t="\x1B["+t+"m",e="\x1B["+e+"m",B[t]={set:i,to:!0},B[e]={set:i,to:!1},B[i]={on:t,off:e}}s(I,"addToCodeCache");I("bold",1,22);I("italics",3,23);I("underline",4,24);I("inverse",7,27);I("strikethrough",9,29);function ot(i,t){let e=t[1]?parseInt(t[1].split(";")[0]):0;if(e>=30&&e<=39||e>=90&&e<=97){i.lastForegroundAdded=t[0];return}if(e>=40&&e<=49||e>=100&&e<=107){i.lastBackgroundAdded=t[0];return}if(e===0){for(let n in i)Object.prototype.hasOwnProperty.call(i,n)&&delete i[n];return}let r=B[t[0]];r&&(i[r.set]=r.to)}s(ot,"updateState");function ee(i){let t=z(!0),e=t.exec(i),r={};for(;e!==null;)ot(r,e),e=t.exec(i);return r}s(ee,"readState");function st(i,t){let e=i.lastBackgroundAdded,r=i.lastForegroundAdded;return delete i.lastBackgroundAdded,delete i.lastForegroundAdded,Object.keys(i).forEach(function(n){i[n]&&(t+=B[n].off)}),e&&e!="\x1B[49m"&&(t+="\x1B[49m"),r&&r!="\x1B[39m"&&(t+="\x1B[39m"),t}s(st,"unwindState");function ie(i,t){let e=i.lastBackgroundAdded,r=i.lastForegroundAdded;return delete i.lastBackgroundAdded,delete i.lastForegroundAdded,Object.keys(i).forEach(function(n){i[n]&&(t=B[n].on+t)}),e&&e!="\x1B[49m"&&(t=e+t),r&&r!="\x1B[39m"&&(t=r+t),t}s(ie,"rewindState");function re(i,t){if(i.length===W(i))return i.substr(0,t);for(;W(i)>t;)i=i.slice(0,-1);return i}s(re,"truncateWidth");function ne(i,t){let e=z(!0),r=i.split(z()),n=0,o=0,l="",d,m={};for(;o<t;){d=e.exec(i);let h=r[n];if(n++,o+W(h)>t&&(h=re(h,t-o)),l+=h,o+=W(h),o<t){if(!d)break;l+=d[0],ot(m,d)}}return st(m,l)}s(ne,"truncateWidthWithAnsi");function oe(i,t,e){if(e=e||"\u2026",W(i)<=t)return i;t-=W(e);let n=ne(i,t);n+=e;let o="\x1B]8;;\x07";return i.includes(o)&&!n.includes(o)&&(n+=o),n}s(oe,"truncate");function se(){return{chars:{top:"\u2500","top-mid":"\u252C","top-left":"\u250C","top-right":"\u2510",bottom:"\u2500","bottom-mid":"\u2534","bottom-left":"\u2514","bottom-right":"\u2518",left:"\u2502","left-mid":"\u251C",mid:"\u2500","mid-mid":"\u253C",right:"\u2502","right-mid":"\u2524",middle:"\u2502"},truncate:"\u2026",colWidths:[],rowHeights:[],colAligns:[],rowAligns:[],style:{"padding-left":1,"padding-right":1,head:["red"],border:["grey"],compact:!1},head:[]}}s(se,"defaultOptions");function le(i,t){i=i||{},t=t||se();let e=Object.assign({},t,i);return e.chars=Object.assign({},t.chars,i.chars),e.style=Object.assign({},t.style,i.style),e}s(le,"mergeOptions");function ue(i,t){let e=[],r=t.split(/(\s+)/g),n=[],o=0,l;for(let d=0;d<r.length;d+=2){let m=r[d],h=o+W(m);o>0&&l&&(h+=l.length),h>i?(o!==0&&e.push(n.join("")),n=[m],o=W(m)):(n.push(l||"",m),o=h),l=r[d+1]}return o&&e.push(n.join("")),e}s(ue,"wordWrap");function ae(i,t){let e=[],r="";function n(l,d){for(r.length&&d&&(r+=d),r+=l;r.length>i;)e.push(r.slice(0,i)),r=r.slice(i)}s(n,"pushLine");let o=t.split(/(\s+)/g);for(let l=0;l<o.length;l+=2)n(o[l],l&&o[l-1]);return r.length&&e.push(r),e}s(ae,"textWrap");function he(i,t,e=!0){let r=[];t=t.split(`
3
3
  `);let n=e?ue:ae;for(let o=0;o<t.length;o++)r.push.apply(r,n(i,t[o]));return r}s(he,"multiLineWordWrap");function ce(i){let t={},e=[];for(let r=0;r<i.length;r++){let n=ie(t,i[r]);t=ee(n);let o=Object.assign({},t);e.push(st(o,n))}return e}s(ce,"colorizeLines");function fe(i,t){let e="\x1B]",r="\x07",n=";";return[e,"8",n,n,i||t,r,t,e,"8",n,n,r].join("")}s(fe,"hyperlink");lt.exports={strlen:W,repeat:_,pad:te,truncate:oe,mergeOptions:le,wordWrap:he,colorizeLines:ce,hyperlink:fe}});var ct=S((ze,ht)=>{g();var at={};ht.exports=at;var ut={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(ut).forEach(function(i){var t=ut[i],e=at[i]=[];e.open="\x1B["+t[0]+"m",e.close="\x1B["+t[1]+"m"})});var dt=S((He,ft)=>{"use strict";g();ft.exports=function(i,t){t=t||process.argv;var e=t.indexOf("--"),r=/^-{1,2}/.test(i)?"":"--",n=t.indexOf(r+i);return n!==-1&&(e===-1?!0:n<e)}});var gt=S((Ye,pt)=>{"use strict";g();var de=X("os"),M=dt(),R=process.env,j=void 0;M("no-color")||M("no-colors")||M("color=false")?j=!1:(M("color")||M("colors")||M("color=true")||M("color=always"))&&(j=!0);"FORCE_COLOR"in R&&(j=R.FORCE_COLOR.length===0||parseInt(R.FORCE_COLOR,10)!==0);function pe(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}s(pe,"translateLevel");function ge(i){if(j===!1)return 0;if(M("color=16m")||M("color=full")||M("color=truecolor"))return 3;if(M("color=256"))return 2;if(i&&!i.isTTY&&j!==!0)return 0;var t=j?1:0;if(process.platform==="win32"){var e=de.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in R)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(n){return n in R})||R.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in R)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(R.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in R){var r=parseInt((R.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(R.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(R.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(R.TERM)||"COLORTERM"in R?1:(R.TERM==="dumb",t)}s(ge,"supportsColor");function N(i){var t=ge(i);return pe(t)}s(N,"getSupportLevel");pt.exports={supportsColor:N,stdout:N(process.stdout),stderr:N(process.stderr)}});var mt=S((Ue,bt)=>{g();bt.exports=s(function(t,e){var r="";t=t||"Run the trap, drop the bass",t=t.split("");var n={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return t.forEach(function(o){o=o.toLowerCase();var l=n[o]||[" "],d=Math.floor(Math.random()*l.length);typeof n[o]<"u"?r+=n[o][d]:r+=o}),r},"runTheTrap")});var wt=S((Qe,yt)=>{g();yt.exports=s(function(t,e){t=t||" he is here ";var r={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},n=[].concat(r.up,r.down,r.mid);function o(m){var h=Math.floor(Math.random()*m);return h}s(o,"randomNumber");function l(m){var h=!1;return n.filter(function(w){h=w===m}),h}s(l,"isChar");function d(m,h){var w="",v,y;h=h||{},h.up=typeof h.up<"u"?h.up:!0,h.mid=typeof h.mid<"u"?h.mid:!0,h.down=typeof h.down<"u"?h.down:!0,h.size=typeof h.size<"u"?h.size:"maxi",m=m.split("");for(y in m)if(!l(y)){switch(w=w+m[y],v={up:0,down:0,mid:0},h.size){case"mini":v.up=o(8),v.mid=o(2),v.down=o(8);break;case"maxi":v.up=o(16)+3,v.mid=o(4)+1,v.down=o(64)+3;break;default:v.up=o(8)+1,v.mid=o(6)/2,v.down=o(8)+1;break}var a=["up","mid","down"];for(var u in a)for(var c=a[u],p=0;p<=v[c];p++)h[c]&&(w=w+r[c][o(r[c].length)])}return w}return s(d,"heComes"),d(t,e)},"zalgo")});var vt=S((ti,xt)=>{g();xt.exports=function(i){return function(t,e,r){if(t===" ")return t;switch(e%3){case 0:return i.red(t);case 1:return i.white(t);case 2:return i.blue(t)}}}});var Ct=S((ii,St)=>{g();St.exports=function(i){return function(t,e,r){return e%2===0?t:i.inverse(t)}}});var Rt=S((ni,Ot)=>{g();Ot.exports=function(i){var t=["red","yellow","green","blue","magenta"];return function(e,r,n){return e===" "?e:i[t[r++%t.length]](e)}}});var At=S((si,Et)=>{g();Et.exports=function(i){var t=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(e,r,n){return e===" "?e:i[t[Math.round(Math.random()*(t.length-2))]](e)}}});var Bt=S((ai,kt)=>{g();var f={};kt.exports=f;f.themes={};var be=X("util"),L=f.styles=ct(),Wt=Object.defineProperties,me=new RegExp(/[\r\n]+/g);f.supportsColor=gt().supportsColor;typeof f.enabled>"u"&&(f.enabled=f.supportsColor()!==!1);f.enable=function(){f.enabled=!0};f.disable=function(){f.enabled=!1};f.stripColors=f.strip=function(i){return(""+i).replace(/\x1B\[\d+m/g,"")};var ui=f.stylize=s(function(t,e){if(!f.enabled)return t+"";var r=L[e];return!r&&e in f?f[e](t):r.open+t+r.close},"stylize"),ye=/[|\\{}()[\]^$+*?.]/g,we=s(function(i){if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(ye,"\\$&")},"escapeStringRegexp");function Tt(i){var t=s(function e(){return ve.apply(e,arguments)},"builder");return t._styles=i,t.__proto__=xe,t}s(Tt,"build");var Lt=function(){var i={};return L.grey=L.gray,Object.keys(L).forEach(function(t){L[t].closeRe=new RegExp(we(L[t].close),"g"),i[t]={get:s(function(){return Tt(this._styles.concat(t))},"get")}}),i}(),xe=Wt(s(function(){},"colors"),Lt);function ve(){var i=Array.prototype.slice.call(arguments),t=i.map(function(l){return l!=null&&l.constructor===String?l:be.inspect(l)}).join(" ");if(!f.enabled||!t)return t;for(var e=t.indexOf(`
4
4
  `)!=-1,r=this._styles,n=r.length;n--;){var o=L[r[n]];t=o.open+t.replace(o.closeRe,o.open)+o.close,e&&(t=t.replace(me,function(l){return o.close+l+o.open}))}return t}s(ve,"applyStyle");f.setTheme=function(i){if(typeof i=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var t in i)(function(e){f[e]=function(r){if(typeof i[e]=="object"){var n=r;for(var o in i[e])n=f[i[e][o]](n);return n}return f[i[e]](r)}})(t)};function Se(){var i={};return Object.keys(Lt).forEach(function(t){i[t]={get:s(function(){return Tt([t])},"get")}}),i}s(Se,"init");var Ce=s(function(t,e){var r=e.split("");return r=r.map(t),r.join("")},"sequencer");f.trap=mt();f.zalgo=wt();f.maps={};f.maps.america=vt()(f);f.maps.zebra=Ct()(f);f.maps.rainbow=Rt()(f);f.maps.random=At()(f);for(Mt in f.maps)(function(i){f[i]=function(t){return Ce(f.maps[i],t)}})(Mt);var Mt;Wt(f,Se())});var qt=S((fi,jt)=>{g();var Oe=Bt();jt.exports=Oe});var Pt=S((pi,F)=>{g();var{info:Re,debug:Gt}=$(),A=Y(),U=class i{static{s(this,"Cell")}constructor(t){this.setOptions(t),this.x=null,this.y=null}setOptions(t){["boolean","number","bigint","string"].indexOf(typeof t)!==-1&&(t={content:""+t}),t=t||{},this.options=t;let e=t.content;if(["boolean","number","bigint","string"].indexOf(typeof e)!==-1)this.content=String(e);else if(!e)this.content=this.options.href||"";else throw new Error("Content needs to be a primitive, got: "+typeof e);this.colSpan=t.colSpan||1,this.rowSpan=t.rowSpan||1,this.options.href&&Object.defineProperty(this,"href",{get(){return this.options.href}})}mergeTableOptions(t,e){this.cells=e;let r=this.options.chars||{},n=t.chars,o=this.chars={};Ae.forEach(function(m){V(r,n,m,o)}),this.truncate=this.options.truncate||t.truncate;let l=this.options.style=this.options.style||{},d=t.style;V(l,d,"padding-left",this),V(l,d,"padding-right",this),this.head=l.head||d.head,this.border=l.border||d.border,this.fixedWidth=t.colWidths[this.x],this.lines=this.computeLines(t),this.desiredWidth=A.strlen(this.content)+this.paddingLeft+this.paddingRight,this.desiredHeight=this.lines.length}computeLines(t){let e=t.wordWrap||t.textWrap,{wordWrap:r=e}=this.options;if(this.fixedWidth&&r){if(this.fixedWidth-=this.paddingLeft+this.paddingRight,this.colSpan){let l=1;for(;l<this.colSpan;)this.fixedWidth+=t.colWidths[this.x+l],l++}let{wrapOnWordBoundary:n=!0}=t,{wrapOnWordBoundary:o=n}=this.options;return this.wrapLines(A.wordWrap(this.fixedWidth,this.content,o))}return this.wrapLines(this.content.split(`
@@ -8,4 +8,4 @@ import{ca as Xt,ea as tt,fa as Zt,ha as k,ia as et}from"./chunk-XOSBJSTW.js";imp
8
8
  `;return l==="none"&&(y=(0,Ut.dedent)(y).slice(1)),y=y.split(`
9
9
  `).map(a=>a.trimEnd()).join(`
10
10
  `),h&&(y=tt(y,h)),i&&(y=k(i)+k({content:y,ensureEmptyLineAbove:n})),r&&(y=k(y)+k({content:r,ensureEmptyLineAbove:o})),k({content:y,...w})},"sprintTable"),Mi=s(i=>{et(Be(i))},"printTable"),je={none:{"top-left":"",top:"","top-mid":"","top-right":"","left-mid":"",mid:"","mid-mid":"","right-mid":"",left:"",middle:"",right:"","bottom-left":"",bottom:"","bottom-mid":"","bottom-right":""},thin:{"top-left":"\u250C",top:"\u2500","top-mid":"\u252C","top-right":"\u2510","left-mid":"\u251C",mid:"\u2500","mid-mid":"\u253C","right-mid":"\u2524",left:"\u2502",middle:"\u2502",right:"\u2502","bottom-left":"\u2514",bottom:"\u2500","bottom-mid":"\u2534","bottom-right":"\u2518"},thick:{"top-left":"\u2554",top:"\u2550","top-mid":"\u2564","top-right":"\u2557",left:"\u2551",middle:"\u2502",right:"\u2551","left-mid":"\u255F",mid:"\u2500","mid-mid":"\u253C","right-mid":"\u2562","bottom-left":"\u255A",bottom:"\u2550","bottom-mid":"\u2567","bottom-right":"\u255D"}};export{Be as a,Mi as b};
11
- //# sourceMappingURL=chunk-HAYHNB7Q.js.map
11
+ //# sourceMappingURL=chunk-YT2LSGNB.js.map
@@ -0,0 +1,12 @@
1
+ import{a as i,b as s,c as g}from"./chunk-JHWQLV6Y.js";import{b as n}from"./chunk-YT2LSGNB.js";import"./chunk-IYQBG4II.js";import"./chunk-XK6JJEHJ.js";import"./chunk-VJVFVZNR.js";import{ga as a,ia as r}from"./chunk-5NCJDCIZ.js";import{a as o,h as t}from"./chunk-7DYQUG5M.js";t();var c=o(e=>{n({json:e,headers:["Option","Configured Value"],rows:[["telemetry",String(e.telemetry)],["json",String(e.json)]],borders:"thick"})},"printDefaultsConfig"),m=o(e=>a`
2
+ Make changes to the configured defaults. This allows you to set an option on every ggt command by default without
3
+ needing to set a flag on every command.
4
+
5
+ {gray Usage}
6
+ ggt configure show
7
+
8
+ ggt configure change
9
+
10
+ ggt configure clear
11
+ `,"usage"),h=o(async(e,f)=>{switch(f._[0]){case"show":c(await s(e,!1));break;case"change":await i(e);break;case"clear":await g(e);break;default:r(m(e));return}},"run");export{h as run,m as usage};
12
+ //# sourceMappingURL=configure-L4U26WFP.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/commands/configure.ts"],
4
+ "sourcesContent": ["import type { Run, Usage } from \"../services/command/command.js\";\nimport { clearDefaultsConfig, type DefaultsConfigData, loadDefaultsConfig, promptDefaultsConfig } from \"../services/config/defaults.js\";\nimport { println } from \"../services/output/print.js\";\nimport { sprint } from \"../services/output/sprint.js\";\nimport { printTable } from \"../services/output/table.js\";\n\nconst printDefaultsConfig = (defaults: DefaultsConfigData): void => {\n printTable({\n json: defaults,\n headers: [\"Option\", \"Configured Value\"],\n rows: [\n [\"telemetry\", String(defaults.telemetry)],\n [\"json\", String(defaults.json)],\n ],\n borders: \"thick\",\n });\n};\n\nexport const usage: Usage = (_ctx) => {\n return sprint`\n Make changes to the configured defaults. This allows you to set an option on every ggt command by default without\n needing to set a flag on every command.\n\n {gray Usage}\n ggt configure show\n \n ggt configure change\n \n ggt configure clear\n `;\n};\n\nexport const run: Run = async (ctx, args): Promise<void> => {\n switch (args._[0]) {\n case \"show\":\n printDefaultsConfig(await loadDefaultsConfig(ctx, false));\n break;\n case \"change\":\n await promptDefaultsConfig(ctx);\n break;\n case \"clear\":\n await clearDefaultsConfig(ctx);\n break;\n default:\n println(usage(ctx));\n return;\n }\n};\n"],
5
+ "mappings": "kRAAAA,IAMA,IAAMC,EAAsBC,EAACC,GAAuC,CAClEC,EAAW,CACT,KAAMD,EACN,QAAS,CAAC,SAAU,kBAAkB,EACtC,KAAM,CACJ,CAAC,YAAa,OAAOA,EAAS,SAAS,CAAC,EACxC,CAAC,OAAQ,OAAOA,EAAS,IAAI,CAAC,CAChC,EACA,QAAS,OACX,CAAC,CACH,EAV4B,uBAYfE,EAAeH,EAACI,GACpBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IADmB,SAcfC,EAAWN,EAAA,MAAOO,EAAKC,IAAwB,CAC1D,OAAQA,EAAK,EAAE,CAAC,EAAG,CACjB,IAAK,OACHT,EAAoB,MAAMU,EAAmBF,EAAK,EAAK,CAAC,EACxD,MACF,IAAK,SACH,MAAMG,EAAqBH,CAAG,EAC9B,MACF,IAAK,QACH,MAAMI,EAAoBJ,CAAG,EAC7B,MACF,QACEK,EAAQT,EAAMI,CAAG,CAAC,EAClB,MACJ,CACF,EAfwB",
6
+ "names": ["init_cjs", "printDefaultsConfig", "__name", "defaults", "printTable", "usage", "_ctx", "sprint", "run", "ctx", "args", "loadDefaultsConfig", "promptDefaultsConfig", "clearDefaultsConfig", "println"]
7
+ }
@@ -1,4 +1,4 @@
1
- import{a as ee}from"./chunk-SX5LO3XQ.js";import{a as te}from"./chunk-WQ4SFIE4.js";import{b as H,c as R,e as Q,k as y,p as Z}from"./chunk-A75V6SNW.js";import{a as J,c as q,d as _,i as X,n as W,o as K}from"./chunk-3B2GY4UU.js";import"./chunk-HAYHNB7Q.js";import{b as Y}from"./chunk-Z7JIVKEF.js";import"./chunk-U5I2YBJK.js";import"./chunk-HN3YKQ3C.js";import{c as w}from"./chunk-KW4V2PJW.js";import{b as A,e as O,i as z}from"./chunk-LPIHKY3M.js";import"./chunk-5VLIBRPJ.js";import{b as i,ba as G,d as F,ea as j,ga as l,ia as t,m as V}from"./chunk-XOSBJSTW.js";import"./chunk-GFQYFEEH.js";import{a as m,h as M}from"./chunk-7DYQUG5M.js";M();import le from"node:assert";var Re={...te,"--env":{type:String,alias:["-e","--environment","--from"]},"--allow-problems":{type:Boolean,alias:"--allow-issues"},"--allow-charges":{type:Boolean},"--allow-data-delete":{type:Boolean}},_e=m(s=>l`
1
+ import{a as ee}from"./chunk-SX5LO3XQ.js";import{a as te}from"./chunk-L2MG47NS.js";import{b as H,c as R,e as Q,k as y,p as Z}from"./chunk-2CKK6A2Y.js";import{a as J,c as q,d as _,i as X,m as W,n as K}from"./chunk-I6BQ7MRE.js";import"./chunk-YT2LSGNB.js";import{b as Y}from"./chunk-4WFO3NAS.js";import"./chunk-SIAMHUOB.js";import"./chunk-IYQBG4II.js";import"./chunk-HN3YKQ3C.js";import{a as w}from"./chunk-PA2LOSVH.js";import{a as A,d as O,h as z}from"./chunk-LPBWX353.js";import"./chunk-F4S4AEEO.js";import"./chunk-XK6JJEHJ.js";import"./chunk-VJVFVZNR.js";import{b as i,ba as G,d as F,ea as j,ga as l,ia as t,m as V}from"./chunk-5NCJDCIZ.js";import"./chunk-GFQYFEEH.js";import{a as m,h as M}from"./chunk-7DYQUG5M.js";M();import le from"node:assert";var Re={...te,"--env":{type:String,alias:["-e","--environment","--from"]},"--allow-problems":{type:Boolean,alias:"--allow-issues"},"--allow-charges":{type:Boolean},"--allow-data-delete":{type:Boolean}},_e=m(s=>l`
2
2
  Deploys your app to production.
3
3
 
4
4
  This command first performs a sync to ensure that your local and environment directories
@@ -22,4 +22,4 @@ import{a as ee}from"./chunk-SX5LO3XQ.js";import{a as te}from"./chunk-WQ4SFIE4.js
22
22
  Deploys code from the staging environment of a myBlog
23
23
  {cyanBright $ ggt deploy -a myBlog -from staging}
24
24
  `,"usage"),Pe=m(async(s,o)=>{let ne=await K(process.cwd()),a=await W.loadOrInit(s,{command:"deploy",args:o,directory:ne});t({ensureEmptyLineAbove:!0,content:`Deploying ${a.environment.name} to ${A(a.environment.application.primaryDomain,`https://${a.environment.application.primaryDomain}/`)}`});let T=new Z(a),p=await T.hashes(s);if(!p.inSync&&(p.localChangesToPush.size>0||!p.onlyDotGadgetFilesChanged)){if(await T.print(s,{hashes:p}),!o["--force"])if(t({ensureEmptyLineAbove:!0,content:"Your environment's files must match your local files before you can deploy."}),G.isInteractive||F.testLike){let r;switch(!0){case p.bothChanged:r=l`Would you like to push your local changes and {underline discard your environment's} changes now?`,o["--force"]=!0;break;case p.localChangesToPush.size>0:r=l`Would you like to push your local changes now?`;break;case p.environmentChanges.size>0:r=l`Do you want to {underline discard your environment's} changes now?`,o["--force"]=!0;break;default:ee("no changes to push or discard")}await w(r)}else t({ensureEmptyLineAbove:!0,content:"Assuming you want to push your local files now."});await T.push(s,{command:"deploy",hashes:p,force:o["--force"]})}let I={localFilesVersion:String(a.filesVersion),force:o["--allow-problems"],allowDeletedData:o["--allow-data-delete"],allowCharges:o["--allow-charges"]},E,f=e.NOT_STARTED,B=!1,v=a.edit.subscribe({subscription:Q,variables:I,onError:m(async r=>{if(s.log.error("failed to deploy",{error:r}),E?.fail(P(a,f)+" "+y()),V(r.cause)){let c=r.cause[0];if(le(c,"expected graphqlError to be defined"),c.extensions)switch(!0){case c.extensions.requiresUpgrade:t({ensureEmptyLineAbove:!0,content:c.message.replace(/GGT_PAYMENT_REQUIRED:?\s*/,"")}),process.exit(1);break;case c.extensions.requiresAdditionalCharge:t({ensureEmptyLineAbove:!0,content:c.message.replace(/GGT_PAYMENT_REQUIRED:?\s*/,"")}),await w({ensureEmptyLineAbove:!0,content:"Do you want to continue?"}),v.resubscribe({...I,allowCharges:!0});return}}await O(s,r)},"onError"),onData:m(async({publishStatus:r})=>{if(!r){s.log.warn("received empty publish status");return}let{publishStarted:c,progress:D,issues:N,status:g,deletedModelsAndFields:se}=r,C=N.length>0,{deletedModels:U,deletedModelFields:$}=se??{deletedModels:[],deletedModelFields:[]},x=U.length>0||$.length>0;if(!B&&(C||x)){B=!0;let d=N.filter(u=>u.severity===J.Fatal);if(d.length>0&&await O(s,new X(_(d))),C&&(t({ensureEmptyLineAbove:!0,content:l`{bold.yellow !} {bold Issues found in your development app}`}),q({problems:_(N)})),x){t({ensureEmptyLineAbove:!0,content:l`{bold.yellow !} {bold Data deleted on deploy}`});let u=i.blueBright("updated"),b=i.redBright("deleted"),S=[];U.forEach(n=>{S.push({symbol:R,name:i.redBright(n),action:b,indent:0})}),$.forEach(({modelIdentifier:n,fields:h})=>{S.push({symbol:H,name:i.blueBright(n),action:u,indent:0}),h.forEach(L=>{S.push({symbol:R,name:i.redBright(L),action:b,indent:2})})});let re=S.reduce((n,h)=>Math.max(n,h.name.length),0),ae=S.reduce((n,h)=>Math.max(n,h.indent),0),k=2;t({ensureEmptyLineAbove:!0,content:i.gray("These changes will be applied to production based on the app you're deploying.")});for(let n of S){let h=" ".repeat(n.indent*k),L=" ".repeat(re-n.name.length+2),ie=" ".repeat((ae-n.indent)*k);t({ensureEmptyLineAbove:!1,content:j(`${h}${n.symbol} ${n.name}${L}${ie}${n.action}`,6)})}}if(!c)await w("Do you want to continue?"),v.resubscribe({...I,force:!0,allowDeletedData:!0});else{let u=o["--allow-data-delete"],b=o["--allow-problems"];if(!u&&!b)throw new z("expected --allow-data-delete or --allow-problems to be true");b&&t(l`Deploying regardless of problems because "${i.gray("--allow-problems")}" was passed.`),u&&t(l`Deploying regardless of deleted data because "${i.gray("--allow-data-delete")}" was passed.`)}return}if(g?.code==="Errored"){E?.fail(P(a,f)+" "+y()),g.message&&t({ensureEmptyLineAbove:!0,content:i.red(g.message)}),g.output&&t({ensureEmptyLineAbove:!0,content:l`${A("Check logs",g.output)}`});return}if(D===e.COMPLETED){E?.succeed(oe(a,f));let d=i.green("Deploy successful!");g?.output&&(d+=` ${A("Check logs",g.output)}.`),t({ensureEmptyLineAbove:!0,content:d});return}if(D!==f){let d=P(a,D);if(d!==E?.text){E?.succeed(oe(a,f));let u=f===e.NOT_STARTED||!G.isInteractive;E=Y({ensureEmptyLineAbove:u,content:d})}f=D}},"onData"),onComplete:m(()=>{v.unsubscribe()},"onComplete")})},"run"),e=Object.freeze({NOT_STARTED:"NOT_STARTED",STARTING:"STARTING",BUILDING_ASSETS:"BUILDING_ASSETS",UPLOADING_ASSETS:"UPLOADING_ASSETS",CONVERGING_STORAGE:"CONVERGING_STORAGE",PUBLISHING_TREE:"PUBLISHING_TREE",RELOADING_SANDBOX:"RELOADING_SANDBOX",COMPLETED:"COMPLETED"}),P=m((s,o)=>{switch(o){case e.NOT_STARTED:case e.STARTING:case e.BUILDING_ASSETS:case e.UPLOADING_ASSETS:return"Building frontend assets.";case e.CONVERGING_STORAGE:return"Setting up database.";case e.PUBLISHING_TREE:return`Copying ${s.environment.name}.`;case e.RELOADING_SANDBOX:return"Restarting app.";case e.COMPLETED:return"Deploy complete!";default:return"Unknown step."}},"stepToSpinnerStart"),oe=m((s,o)=>{switch(o){case e.NOT_STARTED:case e.STARTING:case e.BUILDING_ASSETS:case e.UPLOADING_ASSETS:return`Built frontend assets. ${y()}`;case e.CONVERGING_STORAGE:return`Setup database. ${y()}`;case e.PUBLISHING_TREE:return`Copied ${s.environment.name}. ${y()}`;case e.RELOADING_SANDBOX:return`Restarted app. ${y()}`;case e.COMPLETED:return"Deploy successful!";default:return`Completed unknown step. ${y()}`}},"stepToSpinnerEnd");export{e as AppDeploymentSteps,Re as args,Pe as run,oe as stepToSpinnerEnd,P as stepToSpinnerStart,_e as usage};
25
- //# sourceMappingURL=deploy-QW6KPNDB.js.map
25
+ //# sourceMappingURL=deploy-6JWXSMQJ.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../src/commands/deploy.ts"],
4
4
  "sourcesContent": ["import chalk from \"chalk\";\nimport indentString from \"indent-string\";\nimport assert from \"node:assert\";\nimport terminalLink from \"terminal-link\";\nimport { PUBLISH_STATUS_SUBSCRIPTION } from \"../services/app/edit/operation.js\";\nimport { type Run, type Usage } from \"../services/command/command.js\";\nimport { env } from \"../services/config/env.js\";\nimport { deletedSymbol, updatedSymbol } from \"../services/filesync/changes.js\";\nimport { DeployDisallowedError } from \"../services/filesync/error.js\";\nimport { FileSync } from \"../services/filesync/filesync.js\";\nimport { SyncJson, loadSyncJsonDirectory } from \"../services/filesync/sync-json.js\";\nimport { confirm } from \"../services/output/confirm.js\";\nimport { output } from \"../services/output/output.js\";\nimport { println } from \"../services/output/print.js\";\nimport { ProblemSeverity, printProblems, publishIssuesToProblems } from \"../services/output/problems.js\";\nimport { UnexpectedError, reportErrorAndExit } from \"../services/output/report.js\";\nimport { spin, type spinner } from \"../services/output/spinner.js\";\nimport { sprint } from \"../services/output/sprint.js\";\nimport { ts } from \"../services/output/timestamp.js\";\nimport { unreachable } from \"../services/util/assert.js\";\nimport { isGraphQLErrors } from \"../services/util/is.js\";\nimport { args as PushArgs } from \"./push.js\";\n\nexport type DeployArgs = typeof args;\n\nexport const args = {\n ...PushArgs,\n \"--env\": { type: String, alias: [\"-e\", \"--environment\", \"--from\"] },\n \"--allow-problems\": { type: Boolean, alias: \"--allow-issues\" },\n \"--allow-charges\": { type: Boolean },\n \"--allow-data-delete\": { type: Boolean },\n};\n\nexport const usage: Usage = (_ctx) => {\n return sprint`\n Deploys your app to production.\n\n This command first performs a sync to ensure that your local and environment directories\n match, changes are tracked since last sync. If any conflicts are detected, they must be\n resolved before deployment.\n\n {gray Usage}\n $ ggt deploy [options]\n\n {gray Options}\n -a, --app <app_name> Selects a specific app to deploy. Default set on \".gadget/sync.json\"\n --from, -e, --env <env_name> Selects a specific environment to sync and deploy from. Default set on \".gadget/sync.json\"\n --force Deploys by discarding any changes made to the environment directory since last sync\n --allow-different-directory Deploys from any local directory with existing files, even if the \".gadget/sync.json\" file is missing\n --allow-different-app Deploys a different app using the --app command, instead of the one specified in the \u201C.gadget/sync.json\u201D file\n --allow-problems Deploys despite any existing issues found in the app (gelly errors, typescript errors etc.)\n --allow-data-delete Deploys even if it results in the deletion of data in production\n --allow-charges Deploys even if it results in additional charges to your plan\n\n {gray Examples}\n Deploys code from the staging environment of a myBlog\n {cyanBright $ ggt deploy -a myBlog -from staging}\n`;\n};\n\nexport const run: Run<DeployArgs> = async (ctx, args) => {\n const directory = await loadSyncJsonDirectory(process.cwd());\n const syncJson = await SyncJson.loadOrInit(ctx, { command: \"deploy\", args, directory });\n\n println({\n ensureEmptyLineAbove: true,\n content: `Deploying ${syncJson.environment.name} to ${terminalLink(syncJson.environment.application.primaryDomain, `https://${syncJson.environment.application.primaryDomain}/`)}`,\n });\n\n const filesync = new FileSync(syncJson);\n const hashes = await filesync.hashes(ctx);\n if (!hashes.inSync && (hashes.localChangesToPush.size > 0 || !hashes.onlyDotGadgetFilesChanged)) {\n // the following is true:\n // 1. our local files don't match our environment's files\n // 2. we have local changes to push or non .gadget/ files have changed on our environment\n // therefor, we need to push before we can deploy\n await filesync.print(ctx, { hashes });\n\n if (!args[\"--force\"]) {\n // they didn't pass --force, so we need to ask them if they want to push\n println({\n ensureEmptyLineAbove: true,\n content: \"Your environment's files must match your local files before you can deploy.\",\n });\n\n if (output.isInteractive || env.testLike) {\n // we're interactive, so ask them what they want to do\n let content: string;\n // eslint-disable-next-line max-depth\n switch (true) {\n case hashes.bothChanged:\n content = sprint`Would you like to push your local changes and {underline discard your environment's} changes now?`;\n args[\"--force\"] = true; // accepting this confirmation implies --force\n break;\n case hashes.localChangesToPush.size > 0:\n content = sprint`Would you like to push your local changes now?`;\n break;\n case hashes.environmentChanges.size > 0:\n content = sprint`Do you want to {underline discard your environment's} changes now?`;\n args[\"--force\"] = true; // same as above\n break;\n default:\n unreachable(\"no changes to push or discard\");\n }\n\n await confirm(content);\n } else {\n // we're not interactive, so we're likely in a CI/CD environment\n // assume they want to push\n println({\n ensureEmptyLineAbove: true,\n content: \"Assuming you want to push your local files now.\",\n });\n }\n }\n\n await filesync.push(ctx, { command: \"deploy\", hashes, force: args[\"--force\"] });\n }\n\n const variables = {\n localFilesVersion: String(syncJson.filesVersion),\n force: args[\"--allow-problems\"],\n allowDeletedData: args[\"--allow-data-delete\"],\n allowCharges: args[\"--allow-charges\"],\n };\n\n let spinner: spinner | undefined;\n let currentStep: AppDeploymentSteps = AppDeploymentSteps.NOT_STARTED;\n let printedProblems = false;\n\n const subscription = syncJson.edit.subscribe({\n subscription: PUBLISH_STATUS_SUBSCRIPTION,\n variables,\n onError: async (error) => {\n ctx.log.error(\"failed to deploy\", { error });\n spinner?.fail(stepToSpinnerStart(syncJson, currentStep) + \" \" + ts());\n\n if (isGraphQLErrors(error.cause)) {\n const graphqlError = error.cause[0];\n assert(graphqlError, \"expected graphqlError to be defined\");\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- TODO: extensions is typed as never undefined, but it can be.\n if (graphqlError.extensions) {\n switch (true) {\n case graphqlError.extensions[\"requiresUpgrade\"]:\n println({ ensureEmptyLineAbove: true, content: graphqlError.message.replace(/GGT_PAYMENT_REQUIRED:?\\s*/, \"\") });\n process.exit(1);\n break;\n case graphqlError.extensions[\"requiresAdditionalCharge\"]:\n println({ ensureEmptyLineAbove: true, content: graphqlError.message.replace(/GGT_PAYMENT_REQUIRED:?\\s*/, \"\") });\n await confirm({ ensureEmptyLineAbove: true, content: \"Do you want to continue?\" });\n subscription.resubscribe({ ...variables, allowCharges: true });\n return;\n }\n }\n }\n\n await reportErrorAndExit(ctx, error);\n },\n onData: async ({ publishStatus }): Promise<void> => {\n if (!publishStatus) {\n ctx.log.warn(\"received empty publish status\");\n return;\n }\n\n const { publishStarted, progress: step, issues, status, deletedModelsAndFields } = publishStatus;\n const hasIssues = issues.length > 0;\n\n const { deletedModels, deletedModelFields } = deletedModelsAndFields ?? { deletedModels: [], deletedModelFields: [] };\n const hasDataLoss = deletedModels.length > 0 || deletedModelFields.length > 0;\n\n if (!printedProblems && (hasIssues || hasDataLoss)) {\n printedProblems = true;\n\n const fatalIssues = issues.filter((issue) => issue.severity === ProblemSeverity.Fatal);\n if (fatalIssues.length > 0) {\n await reportErrorAndExit(ctx, new DeployDisallowedError(publishIssuesToProblems(fatalIssues)));\n }\n\n if (hasIssues) {\n println({ ensureEmptyLineAbove: true, content: sprint`{bold.yellow !} {bold Issues found in your development app}` });\n printProblems({ problems: publishIssuesToProblems(issues) });\n }\n\n if (hasDataLoss) {\n println({\n ensureEmptyLineAbove: true,\n content: sprint`{bold.yellow !} {bold Data deleted on deploy}`,\n });\n\n const updated = chalk.blueBright(\"updated\");\n const deleted = chalk.redBright(\"deleted\");\n\n const rows: { symbol: string; name: string; action: string; indent: number }[] = [];\n\n deletedModels.forEach((model: string) => {\n rows.push({ symbol: deletedSymbol, name: chalk.redBright(model), action: deleted, indent: 0 });\n });\n\n deletedModelFields.forEach(({ modelIdentifier, fields }) => {\n rows.push({ symbol: updatedSymbol, name: chalk.blueBright(modelIdentifier), action: updated, indent: 0 });\n fields.forEach((field) => {\n rows.push({ symbol: deletedSymbol, name: chalk.redBright(field), action: deleted, indent: 2 });\n });\n });\n\n const longestNameLength = rows.reduce((longest, row) => Math.max(longest, row.name.length), 0);\n const longestIndent = rows.reduce((longest, row) => Math.max(longest, row.indent), 0);\n const indentSize = 2;\n\n println({\n ensureEmptyLineAbove: true,\n content: chalk.gray(\"These changes will be applied to production based on the app you're deploying.\"),\n });\n for (const row of rows) {\n const indentation = \" \".repeat(row.indent * indentSize);\n const namePadding = \" \".repeat(longestNameLength - row.name.length + 2);\n const actionPadding = \" \".repeat((longestIndent - row.indent) * indentSize);\n println({\n ensureEmptyLineAbove: false,\n content: indentString(`${indentation}${row.symbol} ${row.name}${namePadding}${actionPadding}${row.action}`, 6),\n });\n }\n }\n\n if (!publishStarted) {\n await confirm(\"Do you want to continue?\");\n subscription.resubscribe({ ...variables, force: true, allowDeletedData: true });\n } else {\n const allowDataDelete = args[\"--allow-data-delete\"];\n const allowProblems = args[\"--allow-problems\"];\n\n if (!allowDataDelete && !allowProblems) {\n throw new UnexpectedError(\"expected --allow-data-delete or --allow-problems to be true\");\n }\n\n if (allowProblems) {\n println(sprint`Deploying regardless of problems because \"${chalk.gray(\"--allow-problems\")}\" was passed.`);\n }\n\n if (allowDataDelete) {\n println(sprint`Deploying regardless of deleted data because \"${chalk.gray(\"--allow-data-delete\")}\" was passed.`);\n }\n }\n\n return;\n }\n\n if (status?.code === \"Errored\") {\n spinner?.fail(stepToSpinnerStart(syncJson, currentStep) + \" \" + ts());\n\n if (status.message) {\n println({ ensureEmptyLineAbove: true, content: chalk.red(status.message) });\n }\n if (status.output) {\n println({ ensureEmptyLineAbove: true, content: sprint`${terminalLink(\"Check logs\", status.output)}` });\n }\n return;\n }\n\n if (step === AppDeploymentSteps.COMPLETED) {\n spinner?.succeed(stepToSpinnerEnd(syncJson, currentStep));\n\n let content = chalk.green(\"Deploy successful!\");\n if (status?.output) {\n content += ` ${terminalLink(\"Check logs\", status.output)}.`;\n }\n\n println({ ensureEmptyLineAbove: true, content });\n return;\n }\n\n if (step !== currentStep) {\n const spinnerText = stepToSpinnerStart(syncJson, step);\n if (spinnerText !== spinner?.text) {\n // stop the current spinner, if any, and start a new one\n spinner?.succeed(stepToSpinnerEnd(syncJson, currentStep));\n\n const ensureEmptyLineAbove = currentStep === AppDeploymentSteps.NOT_STARTED || !output.isInteractive;\n spinner = spin({ ensureEmptyLineAbove, content: spinnerText });\n }\n\n currentStep = step as AppDeploymentSteps;\n }\n },\n onComplete: () => {\n subscription.unsubscribe();\n },\n });\n};\n\nexport const AppDeploymentSteps = Object.freeze({\n NOT_STARTED: \"NOT_STARTED\",\n STARTING: \"STARTING\",\n BUILDING_ASSETS: \"BUILDING_ASSETS\",\n UPLOADING_ASSETS: \"UPLOADING_ASSETS\",\n CONVERGING_STORAGE: \"CONVERGING_STORAGE\",\n PUBLISHING_TREE: \"PUBLISHING_TREE\",\n RELOADING_SANDBOX: \"RELOADING_SANDBOX\",\n COMPLETED: \"COMPLETED\",\n});\n\nexport type AppDeploymentSteps = (typeof AppDeploymentSteps)[keyof typeof AppDeploymentSteps];\n\nexport const stepToSpinnerStart = (syncJson: SyncJson, step: string): string => {\n switch (step) {\n case AppDeploymentSteps.NOT_STARTED:\n case AppDeploymentSteps.STARTING:\n case AppDeploymentSteps.BUILDING_ASSETS:\n case AppDeploymentSteps.UPLOADING_ASSETS:\n return \"Building frontend assets.\";\n case AppDeploymentSteps.CONVERGING_STORAGE:\n return \"Setting up database.\";\n case AppDeploymentSteps.PUBLISHING_TREE:\n return `Copying ${syncJson.environment.name}.`;\n case AppDeploymentSteps.RELOADING_SANDBOX:\n return \"Restarting app.\";\n case AppDeploymentSteps.COMPLETED:\n return \"Deploy complete!\";\n default:\n return \"Unknown step.\";\n }\n};\n\nexport const stepToSpinnerEnd = (syncJson: SyncJson, step: string): string => {\n switch (step) {\n case AppDeploymentSteps.NOT_STARTED:\n case AppDeploymentSteps.STARTING:\n case AppDeploymentSteps.BUILDING_ASSETS:\n case AppDeploymentSteps.UPLOADING_ASSETS:\n return `Built frontend assets. ${ts()}`;\n case AppDeploymentSteps.CONVERGING_STORAGE:\n return `Setup database. ${ts()}`;\n case AppDeploymentSteps.PUBLISHING_TREE:\n return `Copied ${syncJson.environment.name}. ${ts()}`;\n case AppDeploymentSteps.RELOADING_SANDBOX:\n return `Restarted app. ${ts()}`;\n case AppDeploymentSteps.COMPLETED:\n return \"Deploy successful!\";\n default:\n return `Completed unknown step. ${ts()}`;\n }\n};\n"],
5
- "mappings": "wnBAAAA,IAEA,OAAOC,OAAY,cAuBZ,IAAMC,GAAO,CAClB,GAAGA,GACH,QAAS,CAAE,KAAM,OAAQ,MAAO,CAAC,KAAM,gBAAiB,QAAQ,CAAE,EAClE,mBAAoB,CAAE,KAAM,QAAS,MAAO,gBAAiB,EAC7D,kBAAmB,CAAE,KAAM,OAAQ,EACnC,sBAAuB,CAAE,KAAM,OAAQ,CACzC,EAEaC,GAAeC,EAACC,GACp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,gBACtB,MAAO,UAAUf,EAAS,YAAY,IAAI,KAAKqB,EAAG,CAAC,GACrD,KAAKN,EAAmB,kBACtB,MAAO,kBAAkBM,EAAG,CAAC,GAC/B,KAAKN,EAAmB,UACtB,MAAO,qBACT,QACE,MAAO,2BAA2BM,EAAG,CAAC,EAC1C,CACF,EAlBgC",
6
6
  "names": ["init_cjs", "assert", "args", "usage", "__name", "_ctx", "sprint", "run", "ctx", "directory", "loadSyncJsonDirectory", "syncJson", "SyncJson", "println", "terminalLink", "filesync", "FileSync", "hashes", "output", "env", "content", "unreachable", "confirm", "variables", "spinner", "currentStep", "AppDeploymentSteps", "printedProblems", "subscription", "PUBLISH_STATUS_SUBSCRIPTION", "error", "stepToSpinnerStart", "ts", "isGraphQLErrors", "graphqlError", "assert", "reportErrorAndExit", "publishStatus", "publishStarted", "step", "issues", "status", "deletedModelsAndFields", "hasIssues", "deletedModels", "deletedModelFields", "hasDataLoss", "fatalIssues", "issue", "ProblemSeverity", "DeployDisallowedError", "publishIssuesToProblems", "printProblems", "updated", "source_default", "deleted", "rows", "model", "deletedSymbol", "modelIdentifier", "fields", "updatedSymbol", "field", "longestNameLength", "longest", "row", "longestIndent", "indentSize", "indentation", "namePadding", "actionPadding", "indentString", "allowDataDelete", "allowProblems", "UnexpectedError", "stepToSpinnerEnd", "spinnerText", "ensureEmptyLineAbove", "spin"]
7
7
  }