@socketsecurity/cli-with-sentry 0.14.136 → 0.14.138
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blessed/LICENSE +20 -0
- package/dist/blessed/lib/alias.js +519 -0
- package/dist/blessed/lib/blessed.js +32 -0
- package/dist/blessed/lib/colors.js +490 -0
- package/dist/blessed/lib/events.js +195 -0
- package/dist/blessed/lib/gpmclient.js +245 -0
- package/dist/blessed/lib/helpers.js +170 -0
- package/dist/blessed/lib/keys.js +512 -0
- package/dist/blessed/lib/program.js +4530 -0
- package/dist/blessed/lib/tput.js +3111 -0
- package/dist/blessed/lib/unicode.js +912 -0
- package/dist/blessed/lib/widget.js +60 -0
- package/dist/blessed/lib/widgets/ansiimage.js +173 -0
- package/dist/blessed/lib/widgets/bigtext.js +170 -0
- package/dist/blessed/lib/widgets/box.js +34 -0
- package/dist/blessed/lib/widgets/button.js +62 -0
- package/dist/blessed/lib/widgets/checkbox.js +95 -0
- package/dist/blessed/lib/widgets/element.js +2871 -0
- package/dist/blessed/lib/widgets/filemanager.js +223 -0
- package/dist/blessed/lib/widgets/form.js +301 -0
- package/dist/blessed/lib/widgets/image.js +71 -0
- package/dist/blessed/lib/widgets/input.js +34 -0
- package/dist/blessed/lib/widgets/layout.js +249 -0
- package/dist/blessed/lib/widgets/line.js +59 -0
- package/dist/blessed/lib/widgets/list.js +652 -0
- package/dist/blessed/lib/widgets/listbar.js +452 -0
- package/dist/blessed/lib/widgets/listtable.js +265 -0
- package/dist/blessed/lib/widgets/loading.js +88 -0
- package/dist/blessed/lib/widgets/log.js +82 -0
- package/dist/blessed/lib/widgets/message.js +145 -0
- package/dist/blessed/lib/widgets/node.js +314 -0
- package/dist/blessed/lib/widgets/overlayimage.js +794 -0
- package/dist/blessed/lib/widgets/progressbar.js +166 -0
- package/dist/blessed/lib/widgets/prompt.js +127 -0
- package/dist/blessed/lib/widgets/question.js +129 -0
- package/dist/blessed/lib/widgets/radiobutton.js +62 -0
- package/dist/blessed/lib/widgets/radioset.js +36 -0
- package/dist/blessed/lib/widgets/screen.js +2485 -0
- package/dist/blessed/lib/widgets/scrollablebox.js +415 -0
- package/dist/blessed/lib/widgets/scrollabletext.js +35 -0
- package/dist/blessed/lib/widgets/table.js +383 -0
- package/dist/blessed/lib/widgets/terminal.js +452 -0
- package/dist/blessed/lib/widgets/text.js +35 -0
- package/dist/blessed/lib/widgets/textarea.js +376 -0
- package/dist/blessed/lib/widgets/textbox.js +79 -0
- package/dist/blessed/lib/widgets/video.js +130 -0
- package/dist/blessed/usr/fonts/AUTHORS +1 -0
- package/dist/blessed/usr/fonts/LICENSE +94 -0
- package/dist/blessed/usr/fonts/README +340 -0
- package/dist/blessed/usr/fonts/ter-u14b.json +17826 -0
- package/dist/blessed/usr/fonts/ter-u14n.json +17826 -0
- package/dist/blessed/usr/linux +0 -0
- package/dist/blessed/usr/windows-ansi +0 -0
- package/dist/blessed/usr/xterm +0 -0
- package/dist/blessed/usr/xterm-256color +0 -0
- package/dist/blessed/usr/xterm.termcap +243 -0
- package/dist/blessed/usr/xterm.terminfo +1977 -0
- package/dist/blessed/vendor/tng.js +1876 -0
- package/dist/blessed-contrib/LICENSE.md +21 -0
- package/dist/blessed-contrib/lib/layout/carousel.js +82 -0
- package/dist/blessed-contrib/lib/layout/grid.js +46 -0
- package/dist/blessed-contrib/lib/server-utils.js +83 -0
- package/dist/blessed-contrib/lib/utils.js +73 -0
- package/dist/blessed-contrib/lib/widget/canvas.js +52 -0
- package/dist/blessed-contrib/lib/widget/charts/bar.js +99 -0
- package/dist/blessed-contrib/lib/widget/charts/line.js +311 -0
- package/dist/blessed-contrib/lib/widget/charts/stacked-bar.js +245 -0
- package/dist/blessed-contrib/lib/widget/donut.js +183 -0
- package/dist/blessed-contrib/lib/widget/gauge-list.js +111 -0
- package/dist/blessed-contrib/lib/widget/gauge.js +127 -0
- package/dist/blessed-contrib/lib/widget/lcd.js +497 -0
- package/dist/blessed-contrib/lib/widget/log.js +32 -0
- package/dist/blessed-contrib/lib/widget/map.js +97 -0
- package/dist/blessed-contrib/lib/widget/markdown.js +68 -0
- package/dist/blessed-contrib/lib/widget/picture.js +61 -0
- package/dist/blessed-contrib/lib/widget/sparkline.js +66 -0
- package/dist/blessed-contrib/lib/widget/table.js +141 -0
- package/dist/blessed-contrib/lib/widget/tree.js +179 -0
- package/dist/blessed-contrib/node_modules/ansi-regex/index.js +6 -0
- package/dist/blessed-contrib/node_modules/ansi-regex/license +21 -0
- package/dist/blessed-contrib/node_modules/ansi-regex/package.json +64 -0
- package/dist/blessed-contrib/node_modules/ansi-regex/readme.md +39 -0
- package/dist/blessed-contrib/node_modules/ansi-styles/index.js +67 -0
- package/dist/blessed-contrib/node_modules/ansi-styles/license +21 -0
- package/dist/blessed-contrib/node_modules/ansi-styles/package.json +50 -0
- package/dist/blessed-contrib/node_modules/ansi-styles/readme.md +86 -0
- package/dist/blessed-contrib/node_modules/chalk/index.js +118 -0
- package/dist/blessed-contrib/node_modules/chalk/license +21 -0
- package/dist/blessed-contrib/node_modules/chalk/package.json +70 -0
- package/dist/blessed-contrib/node_modules/chalk/readme.md +213 -0
- package/dist/blessed-contrib/node_modules/escape-string-regexp/index.js +13 -0
- package/dist/blessed-contrib/node_modules/escape-string-regexp/license +21 -0
- package/dist/blessed-contrib/node_modules/escape-string-regexp/package.json +41 -0
- package/dist/blessed-contrib/node_modules/escape-string-regexp/readme.md +27 -0
- package/dist/blessed-contrib/node_modules/strip-ansi/index.js +8 -0
- package/dist/blessed-contrib/node_modules/strip-ansi/license +21 -0
- package/dist/blessed-contrib/node_modules/strip-ansi/package.json +57 -0
- package/dist/blessed-contrib/node_modules/strip-ansi/readme.md +33 -0
- package/dist/blessed-contrib/node_modules/supports-color/index.js +52 -0
- package/dist/blessed-contrib/node_modules/supports-color/license +21 -0
- package/dist/blessed-contrib/node_modules/supports-color/package.json +49 -0
- package/dist/blessed-contrib/node_modules/supports-color/readme.md +36 -0
- package/dist/cli.js +9 -8
- package/dist/cli.js.map +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/instrument-with-sentry.js +2 -2
- package/dist/instrument-with-sentry.js.map +1 -1
- package/dist/shadow-npm-inject.js +2 -2
- package/dist/shadow-npm-inject.js.map +1 -1
- package/dist/vendor.js +19 -5
- package/dist/vendor.js.map +1 -1
- package/package.json +7 -8
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* table.js - table element for blessed
|
|
3
|
+
* Copyright (c) 2013-2015, Christopher Jeffrey and contributors (MIT License).
|
|
4
|
+
* https://github.com/chjj/blessed
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Modules
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const Node = require('./node')
|
|
12
|
+
const Box = require('./box')
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Table
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
function Table(options) {
|
|
19
|
+
const self = this
|
|
20
|
+
|
|
21
|
+
if (!(this instanceof Node)) {
|
|
22
|
+
return new Table(options)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
options = options || {}
|
|
26
|
+
options.shrink = true
|
|
27
|
+
options.style = options.style || {}
|
|
28
|
+
options.style.border = options.style.border || {}
|
|
29
|
+
options.style.header = options.style.header || {}
|
|
30
|
+
options.style.cell = options.style.cell || {}
|
|
31
|
+
options.align = options.align || 'center'
|
|
32
|
+
|
|
33
|
+
// Regular tables do not get custom height (this would
|
|
34
|
+
// require extra padding). Maybe add in the future.
|
|
35
|
+
delete options.height
|
|
36
|
+
|
|
37
|
+
Box.call(this, options)
|
|
38
|
+
|
|
39
|
+
this.pad = options.pad != null ? options.pad : 2
|
|
40
|
+
|
|
41
|
+
this.setData(options.rows || options.data)
|
|
42
|
+
|
|
43
|
+
this.on('attach', function () {
|
|
44
|
+
self.setContent('')
|
|
45
|
+
self.setData(self.rows)
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
this.on('resize', function () {
|
|
49
|
+
self.setContent('')
|
|
50
|
+
self.setData(self.rows)
|
|
51
|
+
self.screen.render()
|
|
52
|
+
})
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
Object.setPrototypeOf(Table.prototype, Box.prototype)
|
|
56
|
+
|
|
57
|
+
Table.prototype.type = 'table'
|
|
58
|
+
|
|
59
|
+
Table.prototype._calculateMaxes = function () {
|
|
60
|
+
const self = this
|
|
61
|
+
let maxes = []
|
|
62
|
+
|
|
63
|
+
if (this.detached) {
|
|
64
|
+
return
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
this.rows = this.rows || []
|
|
68
|
+
|
|
69
|
+
this.rows.forEach(function (row) {
|
|
70
|
+
row.forEach(function (cell, i) {
|
|
71
|
+
const clen = self.strWidth(cell)
|
|
72
|
+
if (!maxes[i] || maxes[i] < clen) {
|
|
73
|
+
maxes[i] = clen
|
|
74
|
+
}
|
|
75
|
+
})
|
|
76
|
+
})
|
|
77
|
+
|
|
78
|
+
let total = maxes.reduce(function (total, max) {
|
|
79
|
+
return total + max
|
|
80
|
+
}, 0)
|
|
81
|
+
total += maxes.length + 1
|
|
82
|
+
|
|
83
|
+
// XXX There might be an issue with resizing where on the first resize event
|
|
84
|
+
// width appears to be less than total if it's a percentage or left/right
|
|
85
|
+
// combination.
|
|
86
|
+
if (this.width < total) {
|
|
87
|
+
delete this.position.width
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (this.position.width != null) {
|
|
91
|
+
const missing = this.width - total
|
|
92
|
+
const w = (missing / maxes.length) | 0
|
|
93
|
+
const wr = missing % maxes.length
|
|
94
|
+
maxes = maxes.map(function (max, i) {
|
|
95
|
+
if (i === maxes.length - 1) {
|
|
96
|
+
return max + w + wr
|
|
97
|
+
}
|
|
98
|
+
return max + w
|
|
99
|
+
})
|
|
100
|
+
} else {
|
|
101
|
+
maxes = maxes.map(function (max) {
|
|
102
|
+
return max + self.pad
|
|
103
|
+
})
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return (this._maxes = maxes)
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
Table.prototype.setRows = Table.prototype.setData = function (rows) {
|
|
110
|
+
let self = this,
|
|
111
|
+
text = '',
|
|
112
|
+
align = this.align
|
|
113
|
+
|
|
114
|
+
this.rows = rows || []
|
|
115
|
+
|
|
116
|
+
this._calculateMaxes()
|
|
117
|
+
|
|
118
|
+
if (!this._maxes) {
|
|
119
|
+
return
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
this.rows.forEach(function (row, i) {
|
|
123
|
+
const isFooter = i === self.rows.length - 1
|
|
124
|
+
row.forEach(function (cell, i) {
|
|
125
|
+
const width = self._maxes[i]
|
|
126
|
+
let clen = self.strWidth(cell)
|
|
127
|
+
|
|
128
|
+
if (i !== 0) {
|
|
129
|
+
text += ' '
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
while (clen < width) {
|
|
133
|
+
if (align === 'center') {
|
|
134
|
+
cell = ' ' + cell + ' '
|
|
135
|
+
clen += 2
|
|
136
|
+
} else if (align === 'left') {
|
|
137
|
+
cell = cell + ' '
|
|
138
|
+
clen += 1
|
|
139
|
+
} else if (align === 'right') {
|
|
140
|
+
cell = ' ' + cell
|
|
141
|
+
clen += 1
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
if (clen > width) {
|
|
146
|
+
if (align === 'center') {
|
|
147
|
+
cell = cell.substring(1)
|
|
148
|
+
clen--
|
|
149
|
+
} else if (align === 'left') {
|
|
150
|
+
cell = cell.slice(0, -1)
|
|
151
|
+
clen--
|
|
152
|
+
} else if (align === 'right') {
|
|
153
|
+
cell = cell.substring(1)
|
|
154
|
+
clen--
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
text += cell
|
|
159
|
+
})
|
|
160
|
+
if (!isFooter) {
|
|
161
|
+
text += '\n\n'
|
|
162
|
+
}
|
|
163
|
+
})
|
|
164
|
+
|
|
165
|
+
delete this.align
|
|
166
|
+
this.setContent(text)
|
|
167
|
+
this.align = align
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
Table.prototype.render = function () {
|
|
171
|
+
const self = this
|
|
172
|
+
|
|
173
|
+
const coords = this._render()
|
|
174
|
+
if (!coords) {
|
|
175
|
+
return
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
this._calculateMaxes()
|
|
179
|
+
|
|
180
|
+
if (!this._maxes) {
|
|
181
|
+
return coords
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
let lines = this.screen.lines,
|
|
185
|
+
xi = coords.xi,
|
|
186
|
+
yi = coords.yi,
|
|
187
|
+
rx,
|
|
188
|
+
ry,
|
|
189
|
+
i
|
|
190
|
+
|
|
191
|
+
const dattr = this.sattr(this.style),
|
|
192
|
+
hattr = this.sattr(this.style.header),
|
|
193
|
+
cattr = this.sattr(this.style.cell),
|
|
194
|
+
battr = this.sattr(this.style.border)
|
|
195
|
+
|
|
196
|
+
const width = coords.xl - coords.xi - this.iright,
|
|
197
|
+
height = coords.yl - coords.yi - this.ibottom
|
|
198
|
+
|
|
199
|
+
// Apply attributes to header cells and cells.
|
|
200
|
+
for (let y = this.itop; y < height; y++) {
|
|
201
|
+
if (!lines[yi + y]) {
|
|
202
|
+
break
|
|
203
|
+
}
|
|
204
|
+
for (let x = this.ileft; x < width; x++) {
|
|
205
|
+
if (!lines[yi + y][xi + x]) {
|
|
206
|
+
break
|
|
207
|
+
}
|
|
208
|
+
// Check to see if it's not the default attr. Allows for tags:
|
|
209
|
+
if (lines[yi + y][xi + x][0] !== dattr) {
|
|
210
|
+
continue
|
|
211
|
+
}
|
|
212
|
+
if (y === this.itop) {
|
|
213
|
+
lines[yi + y][xi + x][0] = hattr
|
|
214
|
+
} else {
|
|
215
|
+
lines[yi + y][xi + x][0] = cattr
|
|
216
|
+
}
|
|
217
|
+
lines[yi + y].dirty = true
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
if (!this.border || this.options.noCellBorders) {
|
|
222
|
+
return coords
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// Draw border with correct angles.
|
|
226
|
+
ry = 0
|
|
227
|
+
for (i = 0; i < self.rows.length + 1; i++) {
|
|
228
|
+
if (!lines[yi + ry]) {
|
|
229
|
+
break
|
|
230
|
+
}
|
|
231
|
+
rx = 0
|
|
232
|
+
self._maxes.forEach(function (max, i) {
|
|
233
|
+
rx += max
|
|
234
|
+
if (i === 0) {
|
|
235
|
+
if (!lines[yi + ry][xi + 0]) {
|
|
236
|
+
return
|
|
237
|
+
}
|
|
238
|
+
// left side
|
|
239
|
+
if (ry === 0) {
|
|
240
|
+
// top
|
|
241
|
+
lines[yi + ry][xi + 0][0] = battr
|
|
242
|
+
// lines[yi + ry][xi + 0][1] = '\u250c'; // '┌'
|
|
243
|
+
} else if (ry / 2 === self.rows.length) {
|
|
244
|
+
// bottom
|
|
245
|
+
lines[yi + ry][xi + 0][0] = battr
|
|
246
|
+
// lines[yi + ry][xi + 0][1] = '\u2514'; // '└'
|
|
247
|
+
} else {
|
|
248
|
+
// middle
|
|
249
|
+
lines[yi + ry][xi + 0][0] = battr
|
|
250
|
+
lines[yi + ry][xi + 0][1] = '\u251c' // '├'
|
|
251
|
+
// XXX If we alter iwidth and ileft for no borders - nothing should be written here
|
|
252
|
+
if (!self.border.left) {
|
|
253
|
+
lines[yi + ry][xi + 0][1] = '\u2500' // '─'
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
lines[yi + ry].dirty = true
|
|
257
|
+
} else if (i === self._maxes.length - 1) {
|
|
258
|
+
if (!lines[yi + ry][xi + rx + 1]) {
|
|
259
|
+
return
|
|
260
|
+
}
|
|
261
|
+
// right side
|
|
262
|
+
if (ry === 0) {
|
|
263
|
+
// top
|
|
264
|
+
rx++
|
|
265
|
+
lines[yi + ry][xi + rx][0] = battr
|
|
266
|
+
// lines[yi + ry][xi + rx][1] = '\u2510'; // '┐'
|
|
267
|
+
} else if (ry / 2 === self.rows.length) {
|
|
268
|
+
// bottom
|
|
269
|
+
rx++
|
|
270
|
+
lines[yi + ry][xi + rx][0] = battr
|
|
271
|
+
// lines[yi + ry][xi + rx][1] = '\u2518'; // '┘'
|
|
272
|
+
} else {
|
|
273
|
+
// middle
|
|
274
|
+
rx++
|
|
275
|
+
lines[yi + ry][xi + rx][0] = battr
|
|
276
|
+
lines[yi + ry][xi + rx][1] = '\u2524' // '┤'
|
|
277
|
+
// XXX If we alter iwidth and iright for no borders - nothing should be written here
|
|
278
|
+
if (!self.border.right) {
|
|
279
|
+
lines[yi + ry][xi + rx][1] = '\u2500' // '─'
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
lines[yi + ry].dirty = true
|
|
283
|
+
return
|
|
284
|
+
}
|
|
285
|
+
if (!lines[yi + ry][xi + rx + 1]) {
|
|
286
|
+
return
|
|
287
|
+
}
|
|
288
|
+
// center
|
|
289
|
+
if (ry === 0) {
|
|
290
|
+
// top
|
|
291
|
+
rx++
|
|
292
|
+
lines[yi + ry][xi + rx][0] = battr
|
|
293
|
+
lines[yi + ry][xi + rx][1] = '\u252c' // '┬'
|
|
294
|
+
// XXX If we alter iheight and itop for no borders - nothing should be written here
|
|
295
|
+
if (!self.border.top) {
|
|
296
|
+
lines[yi + ry][xi + rx][1] = '\u2502' // '│'
|
|
297
|
+
}
|
|
298
|
+
} else if (ry / 2 === self.rows.length) {
|
|
299
|
+
// bottom
|
|
300
|
+
rx++
|
|
301
|
+
lines[yi + ry][xi + rx][0] = battr
|
|
302
|
+
lines[yi + ry][xi + rx][1] = '\u2534' // '┴'
|
|
303
|
+
// XXX If we alter iheight and ibottom for no borders - nothing should be written here
|
|
304
|
+
if (!self.border.bottom) {
|
|
305
|
+
lines[yi + ry][xi + rx][1] = '\u2502' // '│'
|
|
306
|
+
}
|
|
307
|
+
} else {
|
|
308
|
+
// middle
|
|
309
|
+
if (self.options.fillCellBorders) {
|
|
310
|
+
const lbg = (ry <= 2 ? hattr : cattr) & 0x1ff
|
|
311
|
+
rx++
|
|
312
|
+
lines[yi + ry][xi + rx][0] = (battr & ~0x1ff) | lbg
|
|
313
|
+
} else {
|
|
314
|
+
rx++
|
|
315
|
+
lines[yi + ry][xi + rx][0] = battr
|
|
316
|
+
}
|
|
317
|
+
lines[yi + ry][xi + rx][1] = '\u253c' // '┼'
|
|
318
|
+
// rx++;
|
|
319
|
+
}
|
|
320
|
+
lines[yi + ry].dirty = true
|
|
321
|
+
})
|
|
322
|
+
ry += 2
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
// Draw internal borders.
|
|
326
|
+
for (ry = 1; ry < self.rows.length * 2; ry++) {
|
|
327
|
+
if (!lines[yi + ry]) {
|
|
328
|
+
break
|
|
329
|
+
}
|
|
330
|
+
rx = 0
|
|
331
|
+
self._maxes.slice(0, -1).forEach(function (max) {
|
|
332
|
+
rx += max
|
|
333
|
+
if (!lines[yi + ry][xi + rx + 1]) {
|
|
334
|
+
return
|
|
335
|
+
}
|
|
336
|
+
if (ry % 2 !== 0) {
|
|
337
|
+
if (self.options.fillCellBorders) {
|
|
338
|
+
const lbg = (ry <= 2 ? hattr : cattr) & 0x1ff
|
|
339
|
+
rx++
|
|
340
|
+
lines[yi + ry][xi + rx][0] = (battr & ~0x1ff) | lbg
|
|
341
|
+
} else {
|
|
342
|
+
rx++
|
|
343
|
+
lines[yi + ry][xi + rx][0] = battr
|
|
344
|
+
}
|
|
345
|
+
lines[yi + ry][xi + rx][1] = '\u2502' // '│'
|
|
346
|
+
lines[yi + ry].dirty = true
|
|
347
|
+
} else {
|
|
348
|
+
rx++
|
|
349
|
+
}
|
|
350
|
+
})
|
|
351
|
+
rx = 1
|
|
352
|
+
self._maxes.forEach(function (max) {
|
|
353
|
+
while (max--) {
|
|
354
|
+
if (ry % 2 === 0) {
|
|
355
|
+
if (!lines[yi + ry]) {
|
|
356
|
+
break
|
|
357
|
+
}
|
|
358
|
+
if (!lines[yi + ry][xi + rx + 1]) {
|
|
359
|
+
break
|
|
360
|
+
}
|
|
361
|
+
if (self.options.fillCellBorders) {
|
|
362
|
+
const lbg = (ry <= 2 ? hattr : cattr) & 0x1ff
|
|
363
|
+
lines[yi + ry][xi + rx][0] = (battr & ~0x1ff) | lbg
|
|
364
|
+
} else {
|
|
365
|
+
lines[yi + ry][xi + rx][0] = battr
|
|
366
|
+
}
|
|
367
|
+
lines[yi + ry][xi + rx][1] = '\u2500' // '─'
|
|
368
|
+
lines[yi + ry].dirty = true
|
|
369
|
+
}
|
|
370
|
+
rx++
|
|
371
|
+
}
|
|
372
|
+
rx++
|
|
373
|
+
})
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
return coords
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Expose
|
|
381
|
+
*/
|
|
382
|
+
|
|
383
|
+
module.exports = Table
|