sandbox 2.4.0 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/{ansi-styles-B57ln_zO.mjs → ansi-styles-DEyvEjde.mjs} +1 -1
  2. package/dist/{ansi-styles-B57ln_zO.mjs.map → ansi-styles-DEyvEjde.mjs.map} +1 -1
  3. package/dist/{app-uOMbKaBL.mjs → app-DCn8EUEY.mjs} +71 -80
  4. package/dist/app-DCn8EUEY.mjs.map +1 -0
  5. package/dist/{cli-truncate-DMIDACmY.mjs → cli-truncate-BM8ZM2fH.mjs} +2 -2
  6. package/dist/{cli-truncate-DMIDACmY.mjs.map → cli-truncate-BM8ZM2fH.mjs.map} +1 -1
  7. package/dist/index.mjs +2 -2
  8. package/dist/{log-update-txb7Or7B.mjs → log-update-i5LRJCHc.mjs} +3 -3
  9. package/dist/{log-update-txb7Or7B.mjs.map → log-update-i5LRJCHc.mjs.map} +1 -1
  10. package/dist/pty-server-linux-x86_64 +0 -0
  11. package/dist/sandbox.mjs +2 -2
  12. package/dist/{token-Bwtve9Y6.mjs → token-CFLlmxRf.mjs} +19 -11
  13. package/dist/token-CFLlmxRf.mjs.map +1 -0
  14. package/dist/token-util-B2dwBZRL.mjs +5 -0
  15. package/dist/{token-util-BpWskZEO.mjs → token-util-DACSFqcB.mjs} +107 -23
  16. package/dist/token-util-DACSFqcB.mjs.map +1 -0
  17. package/dist/wrap-ansi-BEIieZPu.mjs +5 -0
  18. package/dist/{wrap-ansi-DoQ74EEn.mjs → wrap-ansi-zdFz5AsC.mjs} +2 -2
  19. package/dist/{wrap-ansi-DoQ74EEn.mjs.map → wrap-ansi-zdFz5AsC.mjs.map} +1 -1
  20. package/package.json +4 -4
  21. package/dist/app-uOMbKaBL.mjs.map +0 -1
  22. package/dist/token-Bwtve9Y6.mjs.map +0 -1
  23. package/dist/token-error-C0CafU2G.mjs +0 -43
  24. package/dist/token-error-C0CafU2G.mjs.map +0 -1
  25. package/dist/token-util-BpWskZEO.mjs.map +0 -1
  26. package/dist/token-util-CRAtcwBI.mjs +0 -6
  27. package/dist/wrap-ansi-CEi7ZT5i.mjs +0 -5
@@ -165,4 +165,4 @@ var ansi_styles_default = ansiStyles;
165
165
 
166
166
  //#endregion
167
167
  export { ansi_styles_default as t };
168
- //# sourceMappingURL=ansi-styles-B57ln_zO.mjs.map
168
+ //# sourceMappingURL=ansi-styles-DEyvEjde.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ansi-styles-B57ln_zO.mjs","names":[],"sources":["../../../node_modules/.pnpm/ansi-styles@6.2.1/node_modules/ansi-styles/index.js"],"sourcesContent":["const ANSI_BACKGROUND_OFFSET = 10;\n\nconst wrapAnsi16 = (offset = 0) => code => `\\u001B[${code + offset}m`;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u001B[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u001B[${38 + offset};2;${red};${green};${blue}m`;\n\nconst styles = {\n\tmodifier: {\n\t\treset: [0, 0],\n\t\t// 21 isn't widely supported and 22 does the same thing\n\t\tbold: [1, 22],\n\t\tdim: [2, 22],\n\t\titalic: [3, 23],\n\t\tunderline: [4, 24],\n\t\toverline: [53, 55],\n\t\tinverse: [7, 27],\n\t\thidden: [8, 28],\n\t\tstrikethrough: [9, 29],\n\t},\n\tcolor: {\n\t\tblack: [30, 39],\n\t\tred: [31, 39],\n\t\tgreen: [32, 39],\n\t\tyellow: [33, 39],\n\t\tblue: [34, 39],\n\t\tmagenta: [35, 39],\n\t\tcyan: [36, 39],\n\t\twhite: [37, 39],\n\n\t\t// Bright color\n\t\tblackBright: [90, 39],\n\t\tgray: [90, 39], // Alias of `blackBright`\n\t\tgrey: [90, 39], // Alias of `blackBright`\n\t\tredBright: [91, 39],\n\t\tgreenBright: [92, 39],\n\t\tyellowBright: [93, 39],\n\t\tblueBright: [94, 39],\n\t\tmagentaBright: [95, 39],\n\t\tcyanBright: [96, 39],\n\t\twhiteBright: [97, 39],\n\t},\n\tbgColor: {\n\t\tbgBlack: [40, 49],\n\t\tbgRed: [41, 49],\n\t\tbgGreen: [42, 49],\n\t\tbgYellow: [43, 49],\n\t\tbgBlue: [44, 49],\n\t\tbgMagenta: [45, 49],\n\t\tbgCyan: [46, 49],\n\t\tbgWhite: [47, 49],\n\n\t\t// Bright color\n\t\tbgBlackBright: [100, 49],\n\t\tbgGray: [100, 49], // Alias of `bgBlackBright`\n\t\tbgGrey: [100, 49], // Alias of `bgBlackBright`\n\t\tbgRedBright: [101, 49],\n\t\tbgGreenBright: [102, 49],\n\t\tbgYellowBright: [103, 49],\n\t\tbgBlueBright: [104, 49],\n\t\tbgMagentaBright: [105, 49],\n\t\tbgCyanBright: [106, 49],\n\t\tbgWhiteBright: [107, 49],\n\t},\n};\n\nexport const modifierNames = Object.keys(styles.modifier);\nexport const foregroundColorNames = Object.keys(styles.color);\nexport const backgroundColorNames = Object.keys(styles.bgColor);\nexport const colorNames = [...foregroundColorNames, ...backgroundColorNames];\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`,\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false,\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false,\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi = wrapAnsi16();\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue: (red, green, blue) => {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16\n\t\t\t\t\t+ (36 * Math.round(red / 255 * 5))\n\t\t\t\t\t+ (6 * Math.round(green / 255 * 5))\n\t\t\t\t\t+ Math.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue: hex => {\n\t\t\t\tconst matches = /[a-f\\d]{6}|[a-f\\d]{3}/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet [colorString] = matches;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = [...colorString].map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t/* eslint-disable no-bitwise */\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF,\n\t\t\t\t\t/* eslint-enable no-bitwise */\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t\tansi256ToAnsi: {\n\t\t\tvalue: code => {\n\t\t\t\tif (code < 8) {\n\t\t\t\t\treturn 30 + code;\n\t\t\t\t}\n\n\t\t\t\tif (code < 16) {\n\t\t\t\t\treturn 90 + (code - 8);\n\t\t\t\t}\n\n\t\t\t\tlet red;\n\t\t\t\tlet green;\n\t\t\t\tlet blue;\n\n\t\t\t\tif (code >= 232) {\n\t\t\t\t\tred = (((code - 232) * 10) + 8) / 255;\n\t\t\t\t\tgreen = red;\n\t\t\t\t\tblue = red;\n\t\t\t\t} else {\n\t\t\t\t\tcode -= 16;\n\n\t\t\t\t\tconst remainder = code % 36;\n\n\t\t\t\t\tred = Math.floor(code / 36) / 5;\n\t\t\t\t\tgreen = Math.floor(remainder / 6) / 5;\n\t\t\t\t\tblue = (remainder % 6) / 5;\n\t\t\t\t}\n\n\t\t\t\tconst value = Math.max(red, green, blue) * 2;\n\n\t\t\t\tif (value === 0) {\n\t\t\t\t\treturn 30;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tlet result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));\n\n\t\t\t\tif (value === 2) {\n\t\t\t\t\tresult += 60;\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\trgbToAnsi: {\n\t\t\tvalue: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi: {\n\t\t\tvalue: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t});\n\n\treturn styles;\n}\n\nconst ansiSt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S,OAAO,OAAO,KAAM,KAAK;AAClC,aAAQ;AACR,YAAO;WACD;AACN,aAAQ;KAER,MAAM,YAAY,OAAO;AAEzB,WAAM,KAAK,MAAM,OAAO,GAAG,GAAG;AAC9B,aAAQ,KAAK,MAAM,YAAY,EAAE,GAAG;AACpC,YAAQ,YAAY,IAAK;;IAG1B,MAAM,QAAQ,KAAK,IAAI,KAAK,OAAO,KAAK,GAAG;AAE3C,QAAI,UAAU,EACb,QAAO;IAIR,IAAI,SAAS,MAAO,KAAK,MAAM,KAAK,IAAI,IAAM,KAAK,MAAM,MAAM,IAAI,IAAK,KAAK,MAAM,IAAI;AAEvF,QAAI,UAAU,EACb,WAAU;AAGX,WAAO;;GAER,YAAY;GACZ;EACD,WAAW;GACV,QAAQ,KAAK,OAAO,SAAS,OAAO,cAAc,OAAO,aAAa,KAAK,OAAO,KAAK,CAAC;GACxF,YAAY;GACZ;EACD,WAAW;GACV,QAAO,QAAO,OAAO,cAAc,OAAO,aAAa,IAAI,CAAC;GAC5D,YAAY;GACZ;EACD,CAAC;AAEF,QAAO;;AAGR,MAAM,aAAa,gBAAgB;AAEnC,0BAAe"}
1
+ {"version":3,"file":"ansi-styles-DEyvEjde.mjs","names":[],"sources":["../../../node_modules/.pnpm/ansi-styles@6.2.1/node_modules/ansi-styles/index.js"],"sourcesContent":["const ANSI_BACKGROUND_OFFSET = 10;\n\nconst wrapAnsi16 = (offset = 0) => code => `\\u001B[${code + offset}m`;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u001B[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u001B[${38 + offset};2;${red};${green};${blue}m`;\n\nconst styles = {\n\tmodifier: {\n\t\treset: [0, 0],\n\t\t// 21 isn't widely supported and 22 does the same thing\n\t\tbold: [1, 22],\n\t\tdim: [2, 22],\n\t\titalic: [3, 23],\n\t\tunderline: [4, 24],\n\t\toverline: [53, 55],\n\t\tinverse: [7, 27],\n\t\thidden: [8, 28],\n\t\tstrikethrough: [9, 29],\n\t},\n\tcolor: {\n\t\tblack: [30, 39],\n\t\tred: [31, 39],\n\t\tgreen: [32, 39],\n\t\tyellow: [33, 39],\n\t\tblue: [34, 39],\n\t\tmagenta: [35, 39],\n\t\tcyan: [36, 39],\n\t\twhite: [37, 39],\n\n\t\t// Bright color\n\t\tblackBright: [90, 39],\n\t\tgray: [90, 39], // Alias of `blackBright`\n\t\tgrey: [90, 39], // Alias of `blackBright`\n\t\tredBright: [91, 39],\n\t\tgreenBright: [92, 39],\n\t\tyellowBright: [93, 39],\n\t\tblueBright: [94, 39],\n\t\tmagentaBright: [95, 39],\n\t\tcyanBright: [96, 39],\n\t\twhiteBright: [97, 39],\n\t},\n\tbgColor: {\n\t\tbgBlack: [40, 49],\n\t\tbgRed: [41, 49],\n\t\tbgGreen: [42, 49],\n\t\tbgYellow: [43, 49],\n\t\tbgBlue: [44, 49],\n\t\tbgMagenta: [45, 49],\n\t\tbgCyan: [46, 49],\n\t\tbgWhite: [47, 49],\n\n\t\t// Bright color\n\t\tbgBlackBright: [100, 49],\n\t\tbgGray: [100, 49], // Alias of `bgBlackBright`\n\t\tbgGrey: [100, 49], // Alias of `bgBlackBright`\n\t\tbgRedBright: [101, 49],\n\t\tbgGreenBright: [102, 49],\n\t\tbgYellowBright: [103, 49],\n\t\tbgBlueBright: [104, 49],\n\t\tbgMagentaBright: [105, 49],\n\t\tbgCyanBright: [106, 49],\n\t\tbgWhiteBright: [107, 49],\n\t},\n};\n\nexport const modifierNames = Object.keys(styles.modifier);\nexport const foregroundColorNames = Object.keys(styles.color);\nexport const backgroundColorNames = Object.keys(styles.bgColor);\nexport const colorNames = [...foregroundColorNames, ...backgroundColorNames];\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`,\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false,\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false,\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi = wrapAnsi16();\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue: (red, green, blue) => {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16\n\t\t\t\t\t+ (36 * Math.round(red / 255 * 5))\n\t\t\t\t\t+ (6 * Math.round(green / 255 * 5))\n\t\t\t\t\t+ Math.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue: hex => {\n\t\t\t\tconst matches = /[a-f\\d]{6}|[a-f\\d]{3}/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet [colorString] = matches;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = [...colorString].map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t/* eslint-disable no-bitwise */\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF,\n\t\t\t\t\t/* eslint-enable no-bitwise */\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t\tansi256ToAnsi: {\n\t\t\tvalue: code => {\n\t\t\t\tif (code < 8) {\n\t\t\t\t\treturn 30 + code;\n\t\t\t\t}\n\n\t\t\t\tif (code < 16) {\n\t\t\t\t\treturn 90 + (code - 8);\n\t\t\t\t}\n\n\t\t\t\tlet red;\n\t\t\t\tlet green;\n\t\t\t\tlet blue;\n\n\t\t\t\tif (code >= 232) {\n\t\t\t\t\tred = (((code - 232) * 10) + 8) / 255;\n\t\t\t\t\tgreen = red;\n\t\t\t\t\tblue = red;\n\t\t\t\t} else {\n\t\t\t\t\tcode -= 16;\n\n\t\t\t\t\tconst remainder = code % 36;\n\n\t\t\t\t\tred = Math.floor(code / 36) / 5;\n\t\t\t\t\tgreen = Math.floor(remainder / 6) / 5;\n\t\t\t\t\tblue = (remainder % 6) / 5;\n\t\t\t\t}\n\n\t\t\t\tconst value = Math.max(red, green, blue) * 2;\n\n\t\t\t\tif (value === 0) {\n\t\t\t\t\treturn 30;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tlet result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));\n\n\t\t\t\tif (value === 2) {\n\t\t\t\t\tresult += 60;\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\trgbToAnsi: {\n\t\t\tvalue: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi: {\n\t\t\tvalue: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t});\n\n\treturn styles;\n}\n\nconst ansiStyles = assembleStyles();\n\nexport default ansiStyles;\n"],"x_google_ignoreList":[0],"mappings":";AAAA,MAAM,yBAAyB;AAE/B,MAAM,cAAc,SAAS,OAAM,SAAQ,UAAU,OAAO,OAAO;AAEnE,MAAM,eAAe,SAAS,OAAM,SAAQ,UAAU,KAAK,OAAO,KAAK,KAAK;AAE5E,MAAM,eAAe,SAAS,OAAO,KAAK,OAAO,SAAS,UAAU,KAAK,OAAO,KAAK,IAAI,GAAG,MAAM,GAAG,KAAK;AAE1G,MAAM,SAAS;CACd,UAAU;EACT,OAAO,CAAC,GAAG,EAAE;EAEb,MAAM,CAAC,GAAG,GAAG;EACb,KAAK,CAAC,GAAG,GAAG;EACZ,QAAQ,CAAC,GAAG,GAAG;EACf,WAAW,CAAC,GAAG,GAAG;EAClB,UAAU,CAAC,IAAI,GAAG;EAClB,SAAS,CAAC,GAAG,GAAG;EAChB,QAAQ,CAAC,GAAG,GAAG;EACf,eAAe,CAAC,GAAG,GAAG;EACtB;CACD,OAAO;EACN,OAAO,CAAC,IAAI,GAAG;EACf,KAAK,CAAC,IAAI,GAAG;EACb,OAAO,CAAC,IAAI,GAAG;EACf,QAAQ,CAAC,IAAI,GAAG;EAChB,MAAM,CAAC,IAAI,GAAG;EACd,SAAS,CAAC,IAAI,GAAG;EACjB,MAAM,CAAC,IAAI,GAAG;EACd,O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js";
2
2
  import { i as init_strip_ansi, o as strip_ansi_exports, t as stringWidth } from "./string-width-D78SVDLD.mjs";
3
3
  import { a as _classPrivateFieldInitSpec, i as _assertClassBrand, n as _classPrivateFieldGet2, o as _classPrivateMethodInitSpec, r as _classPrivateFieldSet2, t as cli_cursor_default } from "./cli-cursor-Dab4mDU2.mjs";
4
- import { t as require_token_error } from "./token-error-C0CafU2G.mjs";
4
+ import { n as require_auth_errors, r as require_token_error, t as require_token_util } from "./token-util-DACSFqcB.mjs";
5
5
  import { createRequire } from "node:module";
6
6
  import process$1 from "node:process";
7
7
  import os, { tmpdir } from "node:os";
@@ -15,7 +15,8 @@ import childProcess, { execFile } from "node:child_process";
15
15
  import fs, { constants, writeFile } from "node:fs/promises";
16
16
  import fs$1, { createWriteStream } from "node:fs";
17
17
  import * as Auth from "@vercel/sandbox/dist/auth/index.js";
18
- import { OAuth, getAuth, isOAuthError, pollForToken, updateAuthConfig } from "@vercel/sandbox/dist/auth/index.js";
18
+ import { OAuth, getAuth, pollForToken, updateAuthConfig } from "@vercel/sandbox/dist/auth/index.js";
19
+ import { EOL } from "os";
19
20
  import { z } from "zod/v4";
20
21
  import { z as z$1 } from "zod";
21
22
  import { APIError, Sandbox, Snapshot } from "@vercel/sandbox";
@@ -28,7 +29,6 @@ import assert from "node:assert";
28
29
  import { setTimeout as setTimeout$1 } from "node:timers/promises";
29
30
  import * as tty$1 from "tty";
30
31
  import { format } from "util";
31
- import { EOL } from "os";
32
32
  import { StringDecoder } from "string_decoder";
33
33
  import consume from "node:stream/consumers";
34
34
 
@@ -4426,6 +4426,10 @@ function table(opts) {
4426
4426
  const space = " ";
4427
4427
  return [source_default.bold(titles.map(padded).join(space)), ...data.map((row) => row.map(padded).join(space))].join("\n");
4428
4428
  }
4429
+ function formatRunDuration(d$1) {
4430
+ if (d$1 < 1e3) return `${d$1}ms`;
4431
+ return `${d$1 / 1e3}s`;
4432
+ }
4429
4433
 
4430
4434
  //#endregion
4431
4435
  //#region ../../node_modules/.pnpm/is-docker@3.0.0/node_modules/is-docker/index.js
@@ -7008,8 +7012,8 @@ const login = import_cjs$19.command({
7008
7012
  });
7009
7013
 
7010
7014
  //#endregion
7011
- //#region ../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/get-context.js
7012
- var require_get_context = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/get-context.js": ((exports, module) => {
7015
+ //#region ../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/get-context.js
7016
+ var require_get_context = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/get-context.js": ((exports, module) => {
7013
7017
  var __defProp$2 = Object.defineProperty;
7014
7018
  var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
7015
7019
  var __getOwnPropNames$3 = Object.getOwnPropertyNames;
@@ -7043,8 +7047,8 @@ var require_get_context = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pn
7043
7047
  }) });
7044
7048
 
7045
7049
  //#endregion
7046
- //#region ../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/get-vercel-oidc-token.js
7047
- var require_get_vercel_oidc_token = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/get-vercel-oidc-token.js": ((exports, module) => {
7050
+ //#region ../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/get-vercel-oidc-token.js
7051
+ var require_get_vercel_oidc_token = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/get-vercel-oidc-token.js": ((exports, module) => {
7048
7052
  var __defProp$1 = Object.defineProperty;
7049
7053
  var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
7050
7054
  var __getOwnPropNames$2 = Object.getOwnPropertyNames;
@@ -7073,7 +7077,7 @@ var require_get_vercel_oidc_token = /* @__PURE__ */ __commonJS$1({ "../../node_m
7073
7077
  module.exports = __toCommonJS$1(get_vercel_oidc_token_exports);
7074
7078
  var import_get_context$1 = require_get_context();
7075
7079
  var import_token_error = require_token_error();
7076
- async function getVercelOidcToken$1() {
7080
+ async function getVercelOidcToken$1(options) {
7077
7081
  let token$1 = "";
7078
7082
  let err$1;
7079
7083
  try {
@@ -7082,9 +7086,9 @@ var require_get_vercel_oidc_token = /* @__PURE__ */ __commonJS$1({ "../../node_m
7082
7086
  err$1 = error;
7083
7087
  }
7084
7088
  try {
7085
- const [{ getTokenPayload, isExpired }, { refreshToken: refreshToken$1 }] = await Promise.all([await import("./token-util-CRAtcwBI.mjs").then(__toDynamicImportESM()), await import("./token-Bwtve9Y6.mjs").then(__toDynamicImportESM())]);
7086
- if (!token$1 || isExpired(getTokenPayload(token$1))) {
7087
- await refreshToken$1();
7089
+ const [{ getTokenPayload, isExpired }, { refreshToken }] = await Promise.all([await import("./token-util-B2dwBZRL.mjs").then(__toDynamicImportESM()), await import("./token-CFLlmxRf.mjs").then(__toDynamicImportESM())]);
7090
+ if (!token$1 || isExpired(getTokenPayload(token$1), options?.expirationBufferMs)) {
7091
+ await refreshToken(options);
7088
7092
  token$1 = getVercelOidcTokenSync();
7089
7093
  }
7090
7094
  } catch (error) {
@@ -7104,8 +7108,8 @@ ${error.message}`;
7104
7108
  }) });
7105
7109
 
7106
7110
  //#endregion
7107
- //#region ../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/index.js
7108
- var require_dist = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/@vercel+oidc@3.1.0/node_modules/@vercel/oidc/dist/index.js": ((exports, module) => {
7111
+ //#region ../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/index.js
7112
+ var require_dist = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/index.js": ((exports, module) => {
7109
7113
  var __defProp = Object.defineProperty;
7110
7114
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7111
7115
  var __getOwnPropNames$1 = Object.getOwnPropertyNames;
@@ -7128,13 +7132,18 @@ var require_dist = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/@ver
7128
7132
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7129
7133
  var src_exports = {};
7130
7134
  __export(src_exports, {
7135
+ AccessTokenMissingError: () => import_auth_errors.AccessTokenMissingError,
7136
+ RefreshAccessTokenFailedError: () => import_auth_errors.RefreshAccessTokenFailedError,
7131
7137
  getContext: () => import_get_context.getContext,
7132
7138
  getVercelOidcToken: () => import_get_vercel_oidc_token.getVercelOidcToken,
7133
- getVercelOidcTokenSync: () => import_get_vercel_oidc_token.getVercelOidcTokenSync
7139
+ getVercelOidcTokenSync: () => import_get_vercel_oidc_token.getVercelOidcTokenSync,
7140
+ getVercelToken: () => import_token_util.getVercelToken
7134
7141
  });
7135
7142
  module.exports = __toCommonJS(src_exports);
7136
7143
  var import_get_vercel_oidc_token = require_get_vercel_oidc_token();
7137
7144
  var import_get_context = require_get_context();
7145
+ var import_auth_errors = require_auth_errors();
7146
+ var import_token_util = require_token_util();
7138
7147
  }) });
7139
7148
 
7140
7149
  //#endregion
@@ -7158,51 +7167,28 @@ const token = import_cjs$18.option({
7158
7167
  debug$4(`Failed to get or refresh OIDC token: ${getMessage(cause)}`);
7159
7168
  console.warn(source_default.yellow(`${source_default.bold("warn:")} failed to get or refresh OIDC token, using personal token authentication.`));
7160
7169
  }
7161
- let auth = getAuth();
7162
- if (!auth) {
7163
- await login.handler({});
7164
- auth = getAuth();
7165
- }
7166
- if (auth) {
7167
- const refreshed = await refreshToken(auth);
7168
- if (typeof refreshed === "object") auth = refreshed;
7169
- else if (refreshed === "missing refresh token" || refreshed === "invalid refresh token") {
7170
+ try {
7171
+ return await (0, import_dist.getVercelToken)();
7172
+ } catch (error) {
7173
+ if (error instanceof import_dist.AccessTokenMissingError || error instanceof import_dist.RefreshAccessTokenFailedError) {
7174
+ debug$4(`CLI token unavailable (${error.name}), prompting for login...`);
7170
7175
  console.warn(source_default.yellow(`${source_default.bold("notice:")} Your session has expired. Please log in again.`));
7171
7176
  await login.handler({});
7172
- auth = getAuth();
7177
+ try {
7178
+ return await (0, import_dist.getVercelToken)();
7179
+ } catch (retryError) {
7180
+ throw new Error([
7181
+ `Failed to retrieve authentication token.`,
7182
+ `${source_default.bold("hint:")} Try logging in again with \`sandbox login\`.`,
7183
+ "╰▶ Docs: https://vercel.com/docs/vercel-sandbox/cli-reference#authentication"
7184
+ ].join("\n"));
7185
+ }
7173
7186
  }
7187
+ throw error;
7174
7188
  }
7175
- if (!auth || !auth.token) throw new Error([
7176
- `Failed to retrieve authentication token.`,
7177
- `${source_default.bold("hint:")} Try logging in again with \`sandbox login\`.`,
7178
- "╰▶ Docs: https://vercel.com/docs/vercel-sandbox/cli-reference#authentication"
7179
- ].join("\n"));
7180
- return auth.token;
7181
7189
  }
7182
7190
  }
7183
7191
  });
7184
- async function refreshToken(file) {
7185
- if (!file.expiresAt) return;
7186
- if (file.expiresAt.getTime() > Date.now()) return "not expired";
7187
- if (!file.refreshToken) {
7188
- debug$4(`Token expired, yet refresh token unavailable.`);
7189
- return "missing refresh token";
7190
- }
7191
- debug$4(`Refreshing token (expired at ${file.expiresAt.toISOString()})`);
7192
- const newToken = await (await OAuth()).refreshToken(file.refreshToken).catch((err$1) => {
7193
- if (isOAuthError(err$1)) return null;
7194
- throw err$1;
7195
- });
7196
- if (!newToken) return "invalid refresh token";
7197
- updateAuthConfig({
7198
- expiresAt: new Date(Date.now() + newToken.expires_in * 1e3),
7199
- token: newToken.access_token,
7200
- refreshToken: newToken.refresh_token || file.refreshToken
7201
- });
7202
- const updated = getAuth();
7203
- debug$4(`Token stored. expires at ${updated?.expiresAt?.toISOString()})`);
7204
- return updated;
7205
- }
7206
7192
  function getMessage(error) {
7207
7193
  if (!(error instanceof Error)) return String(error);
7208
7194
  let message = error.message;
@@ -7262,12 +7248,12 @@ async function inferScope({ token: token$1, team: team$1 }) {
7262
7248
  const projectJson = readProjectConfiguration(process.cwd());
7263
7249
  if (projectJson) {
7264
7250
  debug$3("Using scope from project configuration", {
7265
- ownerId: projectJson.orgId,
7266
- projectId: projectJson.projectId
7251
+ owner: projectJson.orgId,
7252
+ project: projectJson.projectId
7267
7253
  });
7268
7254
  return {
7269
- ownerId: projectJson.orgId,
7270
- projectId: projectJson.projectId
7255
+ owner: projectJson.orgId,
7256
+ project: projectJson.projectId
7271
7257
  };
7272
7258
  }
7273
7259
  debug$3("trying to infer scope from API token", {
@@ -7285,8 +7271,8 @@ const JwtSchema = z.object({
7285
7271
  owner: z.string().optional()
7286
7272
  }).transform((data) => {
7287
7273
  return {
7288
- projectId: data.project_id,
7289
- ownerId: data.owner_id,
7274
+ project: data.project_id,
7275
+ owner: data.owner_id,
7290
7276
  projectSlug: data.project,
7291
7277
  ownerSlug: data.owner
7292
7278
  };
@@ -7304,8 +7290,8 @@ async function inferFromToken(token$1, requestedTeam) {
7304
7290
  teamId: requestedTeam
7305
7291
  });
7306
7292
  return {
7307
- ownerId: teamId,
7308
- projectId,
7293
+ owner: teamId,
7294
+ project: projectId,
7309
7295
  ownerSlug: teamId,
7310
7296
  projectSlug: projectId
7311
7297
  };
@@ -7382,8 +7368,8 @@ const scope = {
7382
7368
  token: t.value,
7383
7369
  team: teamId.value
7384
7370
  });
7385
- projectId.value ?? (projectId.value = scope$1.projectId);
7386
- teamId.value ?? (teamId.value = scope$1.ownerId);
7371
+ projectId.value ?? (projectId.value = scope$1.project);
7372
+ teamId.value ?? (teamId.value = scope$1.owner);
7387
7373
  projectSlug = scope$1.projectSlug;
7388
7374
  teamSlug = scope$1.ownerSlug;
7389
7375
  } catch (err$1) {
@@ -7424,7 +7410,7 @@ const scope = {
7424
7410
 
7425
7411
  //#endregion
7426
7412
  //#region package.json
7427
- var version = "2.4.0";
7413
+ var version = "2.5.1";
7428
7414
 
7429
7415
  //#endregion
7430
7416
  //#region src/error.ts
@@ -11915,21 +11901,26 @@ const list = import_cjs$9.command({
11915
11901
  style: "unit",
11916
11902
  unit: "megabyte"
11917
11903
  });
11904
+ const columns = {
11905
+ ID: { value: (s$1) => s$1.id },
11906
+ STATUS: {
11907
+ value: (s$1) => s$1.status,
11908
+ color: (s$1) => SandboxStatusColor[s$1.status] ?? source_default.reset
11909
+ },
11910
+ CREATED: { value: (s$1) => timeAgo(s$1.createdAt) },
11911
+ MEMORY: { value: (s$1) => memoryFormatter.format(s$1.memory) },
11912
+ VCPUS: { value: (s$1) => s$1.vcpus },
11913
+ RUNTIME: { value: (s$1) => s$1.runtime },
11914
+ TIMEOUT: { value: (s$1) => timeAgo(s$1.createdAt + s$1.timeout) },
11915
+ SNAPSHOT: { value: (s$1) => s$1.sourceSnapshotId ?? "-" }
11916
+ };
11917
+ if (all) {
11918
+ columns.CPU = { value: (s$1) => s$1.activeCpuDurationMs ? formatRunDuration(s$1.activeCpuDurationMs) : "-" };
11919
+ columns["NETWORK (OUT/IN)"] = { value: (s$1) => s$1.networkTransfer ? `${formatBytes(s$1.networkTransfer.egress)} / ${formatBytes(s$1.networkTransfer.ingress)}` : "- / -" };
11920
+ }
11918
11921
  console.log(table({
11919
11922
  rows: sandboxes,
11920
- columns: {
11921
- ID: { value: (s$1) => s$1.id },
11922
- STATUS: {
11923
- value: (s$1) => s$1.status,
11924
- color: (s$1) => SandboxStatusColor[s$1.status] ?? source_default.reset
11925
- },
11926
- CREATED: { value: (s$1) => timeAgo(s$1.createdAt) },
11927
- MEMORY: { value: (s$1) => memoryFormatter.format(s$1.memory) },
11928
- VCPUS: { value: (s$1) => s$1.vcpus },
11929
- RUNTIME: { value: (s$1) => s$1.runtime },
11930
- TIMEOUT: { value: (s$1) => timeAgo(s$1.createdAt + s$1.timeout) },
11931
- SNAPSHOT: { value: (s$1) => s$1.sourceSnapshotId ?? "-" }
11932
- }
11923
+ columns
11933
11924
  }));
11934
11925
  }
11935
11926
  });
@@ -13022,9 +13013,9 @@ var DefaultRenderer = (_DefaultRenderer = class DefaultRenderer$1 {
13022
13013
  this.logger.options.color = this.options.color;
13023
13014
  }
13024
13015
  async render() {
13025
- const { createLogUpdate } = await import("./log-update-txb7Or7B.mjs");
13026
- const { default: truncate } = await import("./cli-truncate-DMIDACmY.mjs");
13027
- const { default: wrap } = await import("./wrap-ansi-CEi7ZT5i.mjs");
13016
+ const { createLogUpdate } = await import("./log-update-i5LRJCHc.mjs");
13017
+ const { default: truncate } = await import("./cli-truncate-BM8ZM2fH.mjs");
13018
+ const { default: wrap } = await import("./wrap-ansi-BEIieZPu.mjs");
13028
13019
  this.updater = createLogUpdate(this.logger.process.stdout);
13029
13020
  this.truncate = truncate;
13030
13021
  this.wrap = wrap;
@@ -14719,4 +14710,4 @@ const app = (opts) => (0, import_cjs.subcommands)({
14719
14710
 
14720
14711
  //#endregion
14721
14712
  export { source_exports as a, init_source as i, StyledError as n, require_cjs as r, app as t };
14722
- //# sourceMappingURL=app-uOMbKaBL.mjs.map
14713
+ //# sourceMappingURL=app-DCn8EUEY.mjs.map