xshell 1.2.25 → 1.2.26

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 (2) hide show
  1. package/package.json +1 -1
  2. package/prototype.js +13 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xshell",
3
- "version": "1.2.25",
3
+ "version": "1.2.26",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "bin": {
package/prototype.js CHANGED
@@ -379,10 +379,19 @@ if (!globalThis.my_prototype_defined) {
379
379
  const style = color.endsWith('_') ? `${color.slice(0, -1)}Bright` : color;
380
380
  return [color, {
381
381
  configurable: true,
382
- get() {
383
- // @ts-ignore
384
- return util.styleText(style, this, { validateStream: false });
385
- }
382
+ ...util.styleText ?
383
+ {
384
+ get() {
385
+ // @ts-ignore
386
+ return util.styleText(style, this, { validateStream: false });
387
+ }
388
+ }
389
+ :
390
+ {
391
+ get() {
392
+ return this;
393
+ }
394
+ }
386
395
  }];
387
396
  })),
388
397
  // ------------ 文件路径操作