@socketsecurity/cli-with-sentry 0.14.137 → 0.14.139
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/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/package.json +4 -4
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* layout.js - layout 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 Element = require('./element')
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Layout
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
function Layout(options) {
|
|
19
|
+
if (!(this instanceof Node)) {
|
|
20
|
+
return new Layout(options)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
options = options || {}
|
|
24
|
+
|
|
25
|
+
if (
|
|
26
|
+
(options.width == null && options.left == null && options.right == null) ||
|
|
27
|
+
(options.height == null && options.top == null && options.bottom == null)
|
|
28
|
+
) {
|
|
29
|
+
throw new Error('`Layout` must have a width and height!')
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
options.layout = options.layout || 'inline'
|
|
33
|
+
|
|
34
|
+
Element.call(this, options)
|
|
35
|
+
|
|
36
|
+
if (options.renderer) {
|
|
37
|
+
this.renderer = options.renderer
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
Object.setPrototypeOf(Layout.prototype, Element.prototype)
|
|
42
|
+
|
|
43
|
+
Layout.prototype.type = 'layout'
|
|
44
|
+
|
|
45
|
+
Layout.prototype.isRendered = function (el) {
|
|
46
|
+
if (!el.lpos) {
|
|
47
|
+
return false
|
|
48
|
+
}
|
|
49
|
+
return el.lpos.xl - el.lpos.xi > 0 && el.lpos.yl - el.lpos.yi > 0
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
Layout.prototype.getLast = function (i) {
|
|
53
|
+
while (this.children[--i]) {
|
|
54
|
+
const el = this.children[i]
|
|
55
|
+
if (this.isRendered(el)) {
|
|
56
|
+
return el
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
Layout.prototype.getLastCoords = function (i) {
|
|
62
|
+
const last = this.getLast(i)
|
|
63
|
+
if (last) {
|
|
64
|
+
return last.lpos
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
Layout.prototype._renderCoords = function () {
|
|
69
|
+
const coords = this._getCoords(true)
|
|
70
|
+
const children = this.children
|
|
71
|
+
this.children = []
|
|
72
|
+
this._render()
|
|
73
|
+
this.children = children
|
|
74
|
+
return coords
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
Layout.prototype.renderer = function (coords) {
|
|
78
|
+
const self = this
|
|
79
|
+
|
|
80
|
+
// The coordinates of the layout element
|
|
81
|
+
const width = coords.xl - coords.xi,
|
|
82
|
+
height = coords.yl - coords.yi,
|
|
83
|
+
xi = coords.xi,
|
|
84
|
+
yi = coords.yi
|
|
85
|
+
|
|
86
|
+
// The current row offset in cells (which row are we on?)
|
|
87
|
+
let rowOffset = 0
|
|
88
|
+
|
|
89
|
+
// The index of the first child in the row
|
|
90
|
+
let rowIndex = 0
|
|
91
|
+
let lastRowIndex = 0
|
|
92
|
+
|
|
93
|
+
// Figure out the highest width child
|
|
94
|
+
if (this.options.layout === 'grid') {
|
|
95
|
+
const highWidth = this.children.reduce(function (out, el) {
|
|
96
|
+
out = Math.max(out, el.width)
|
|
97
|
+
return out
|
|
98
|
+
}, 0)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return function iterator(el, i) {
|
|
102
|
+
// Make our children shrinkable. If they don't have a height, for
|
|
103
|
+
// example, calculate it for them.
|
|
104
|
+
el.shrink = true
|
|
105
|
+
|
|
106
|
+
// Find the previous rendered child's coordinates
|
|
107
|
+
const last = self.getLast(i)
|
|
108
|
+
|
|
109
|
+
// If there is no previously rendered element, we are on the first child.
|
|
110
|
+
if (!last) {
|
|
111
|
+
el.position.left = 0
|
|
112
|
+
el.position.top = 0
|
|
113
|
+
} else {
|
|
114
|
+
// Otherwise, figure out where to place this child. We'll start by
|
|
115
|
+
// setting it's `left`/`x` coordinate to right after the previous
|
|
116
|
+
// rendered element. This child will end up directly to the right of it.
|
|
117
|
+
el.position.left = last.lpos.xl - xi
|
|
118
|
+
|
|
119
|
+
// Make sure the position matches the highest width element
|
|
120
|
+
if (self.options.layout === 'grid') {
|
|
121
|
+
// Compensate with width:
|
|
122
|
+
// el.position.width = el.width + (highWidth - el.width);
|
|
123
|
+
// Compensate with position:
|
|
124
|
+
el.position.left += highWidth - (last.lpos.xl - last.lpos.xi)
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// If our child does not overlap the right side of the Layout, set it's
|
|
128
|
+
// `top`/`y` to the current `rowOffset` (the coordinate for the current
|
|
129
|
+
// row).
|
|
130
|
+
if (el.position.left + el.width <= width) {
|
|
131
|
+
el.position.top = rowOffset
|
|
132
|
+
} else {
|
|
133
|
+
// Otherwise we need to start a new row and calculate a new
|
|
134
|
+
// `rowOffset` and `rowIndex` (the index of the child on the current
|
|
135
|
+
// row).
|
|
136
|
+
rowOffset += self.children.slice(rowIndex, i).reduce(function (
|
|
137
|
+
out,
|
|
138
|
+
el
|
|
139
|
+
) {
|
|
140
|
+
if (!self.isRendered(el)) {
|
|
141
|
+
return out
|
|
142
|
+
}
|
|
143
|
+
out = Math.max(out, el.lpos.yl - el.lpos.yi)
|
|
144
|
+
return out
|
|
145
|
+
}, 0)
|
|
146
|
+
lastRowIndex = rowIndex
|
|
147
|
+
rowIndex = i
|
|
148
|
+
el.position.left = 0
|
|
149
|
+
el.position.top = rowOffset
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// Make sure the elements on lower rows graviatate up as much as possible
|
|
154
|
+
if (self.options.layout === 'inline') {
|
|
155
|
+
let above = null
|
|
156
|
+
let abovea = Infinity
|
|
157
|
+
for (let j = lastRowIndex; j < rowIndex; j++) {
|
|
158
|
+
const l = self.children[j]
|
|
159
|
+
if (!self.isRendered(l)) {
|
|
160
|
+
continue
|
|
161
|
+
}
|
|
162
|
+
const abs = Math.abs(el.position.left - (l.lpos.xi - xi))
|
|
163
|
+
// if (abs < abovea && (l.lpos.xl - l.lpos.xi) <= el.width) {
|
|
164
|
+
if (abs < abovea) {
|
|
165
|
+
above = l
|
|
166
|
+
abovea = abs
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
if (above) {
|
|
170
|
+
el.position.top = above.lpos.yl - yi
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// If our child overflows the Layout, do not render it!
|
|
175
|
+
// Disable this feature for now.
|
|
176
|
+
if (el.position.top + el.height > height) {
|
|
177
|
+
// Returning false tells blessed to ignore this child.
|
|
178
|
+
// return false;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
Layout.prototype.render = function () {
|
|
184
|
+
this._emit('prerender')
|
|
185
|
+
|
|
186
|
+
const coords = this._renderCoords()
|
|
187
|
+
if (!coords) {
|
|
188
|
+
delete this.lpos
|
|
189
|
+
return
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
if (coords.xl - coords.xi <= 0) {
|
|
193
|
+
coords.xl = Math.max(coords.xl, coords.xi)
|
|
194
|
+
return
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
if (coords.yl - coords.yi <= 0) {
|
|
198
|
+
coords.yl = Math.max(coords.yl, coords.yi)
|
|
199
|
+
return
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
this.lpos = coords
|
|
203
|
+
|
|
204
|
+
if (this.border) {
|
|
205
|
+
coords.xi++, coords.xl--, coords.yi++, coords.yl--
|
|
206
|
+
}
|
|
207
|
+
if (this.tpadding) {
|
|
208
|
+
;(coords.xi += this.padding.left), (coords.xl -= this.padding.right)
|
|
209
|
+
;(coords.yi += this.padding.top), (coords.yl -= this.padding.bottom)
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
const iterator = this.renderer(coords)
|
|
213
|
+
|
|
214
|
+
if (this.border) {
|
|
215
|
+
coords.xi--, coords.xl++, coords.yi--, coords.yl++
|
|
216
|
+
}
|
|
217
|
+
if (this.tpadding) {
|
|
218
|
+
;(coords.xi -= this.padding.left), (coords.xl += this.padding.right)
|
|
219
|
+
;(coords.yi -= this.padding.top), (coords.yl += this.padding.bottom)
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
this.children.forEach(function (el, i) {
|
|
223
|
+
if (el.screen._ci !== -1) {
|
|
224
|
+
el.index = el.screen._ci++
|
|
225
|
+
}
|
|
226
|
+
const rendered = iterator(el, i)
|
|
227
|
+
if (rendered === false) {
|
|
228
|
+
delete el.lpos
|
|
229
|
+
return
|
|
230
|
+
}
|
|
231
|
+
// if (el.screen._rendering) {
|
|
232
|
+
// el._rendering = true;
|
|
233
|
+
// }
|
|
234
|
+
el.render()
|
|
235
|
+
// if (el.screen._rendering) {
|
|
236
|
+
// el._rendering = false;
|
|
237
|
+
// }
|
|
238
|
+
})
|
|
239
|
+
|
|
240
|
+
this._emit('render', [coords])
|
|
241
|
+
|
|
242
|
+
return coords
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Expose
|
|
247
|
+
*/
|
|
248
|
+
|
|
249
|
+
module.exports = Layout
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* line.js - line 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
|
+
* Line
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
function Line(options) {
|
|
19
|
+
if (!(this instanceof Node)) {
|
|
20
|
+
return new Line(options)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
options = options || {}
|
|
24
|
+
|
|
25
|
+
const orientation = options.orientation || 'vertical'
|
|
26
|
+
delete options.orientation
|
|
27
|
+
|
|
28
|
+
if (orientation === 'vertical') {
|
|
29
|
+
options.width = 1
|
|
30
|
+
} else {
|
|
31
|
+
options.height = 1
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
Box.call(this, options)
|
|
35
|
+
|
|
36
|
+
this.ch =
|
|
37
|
+
!options.type || options.type === 'line'
|
|
38
|
+
? orientation === 'horizontal'
|
|
39
|
+
? '─'
|
|
40
|
+
: '│'
|
|
41
|
+
: options.ch || ' '
|
|
42
|
+
|
|
43
|
+
this.border = {
|
|
44
|
+
type: 'bg',
|
|
45
|
+
__proto__: this
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
this.style.border = this.style
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
Object.setPrototypeOf(Line.prototype, Box.prototype)
|
|
52
|
+
|
|
53
|
+
Line.prototype.type = 'line'
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Expose
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
module.exports = Line
|