@socketsecurity/cli-with-sentry 0.14.67 → 0.14.68

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 (96) hide show
  1. package/dist/blessed/lib/alias.js +521 -0
  2. package/dist/blessed/lib/blessed.js +34 -0
  3. package/dist/blessed/lib/colors.js +492 -0
  4. package/dist/blessed/lib/events.js +197 -0
  5. package/dist/blessed/lib/gpmclient.js +247 -0
  6. package/dist/blessed/lib/helpers.js +172 -0
  7. package/dist/blessed/lib/keys.js +514 -0
  8. package/dist/blessed/lib/program.js +4532 -0
  9. package/dist/blessed/lib/tput.js +3113 -0
  10. package/dist/blessed/lib/unicode.js +914 -0
  11. package/dist/blessed/lib/widget.js +62 -0
  12. package/dist/blessed/lib/widgets/ansiimage.js +175 -0
  13. package/dist/blessed/lib/widgets/bigtext.js +172 -0
  14. package/dist/blessed/lib/widgets/box.js +36 -0
  15. package/dist/blessed/lib/widgets/button.js +64 -0
  16. package/dist/blessed/lib/widgets/checkbox.js +97 -0
  17. package/dist/blessed/lib/widgets/element.js +2873 -0
  18. package/dist/blessed/lib/widgets/filemanager.js +225 -0
  19. package/dist/blessed/lib/widgets/form.js +303 -0
  20. package/dist/blessed/lib/widgets/image.js +73 -0
  21. package/dist/blessed/lib/widgets/input.js +36 -0
  22. package/dist/blessed/lib/widgets/layout.js +251 -0
  23. package/dist/blessed/lib/widgets/line.js +61 -0
  24. package/dist/blessed/lib/widgets/list.js +654 -0
  25. package/dist/blessed/lib/widgets/listbar.js +454 -0
  26. package/dist/blessed/lib/widgets/listtable.js +267 -0
  27. package/dist/blessed/lib/widgets/loading.js +90 -0
  28. package/dist/blessed/lib/widgets/log.js +84 -0
  29. package/dist/blessed/lib/widgets/message.js +147 -0
  30. package/dist/blessed/lib/widgets/node.js +316 -0
  31. package/dist/blessed/lib/widgets/overlayimage.js +796 -0
  32. package/dist/blessed/lib/widgets/progressbar.js +168 -0
  33. package/dist/blessed/lib/widgets/prompt.js +129 -0
  34. package/dist/blessed/lib/widgets/question.js +131 -0
  35. package/dist/blessed/lib/widgets/radiobutton.js +64 -0
  36. package/dist/blessed/lib/widgets/radioset.js +38 -0
  37. package/dist/blessed/lib/widgets/screen.js +2489 -0
  38. package/dist/blessed/lib/widgets/scrollablebox.js +417 -0
  39. package/dist/blessed/lib/widgets/scrollabletext.js +37 -0
  40. package/dist/blessed/lib/widgets/table.js +385 -0
  41. package/dist/blessed/lib/widgets/terminal.js +454 -0
  42. package/dist/blessed/lib/widgets/text.js +37 -0
  43. package/dist/blessed/lib/widgets/textarea.js +378 -0
  44. package/dist/blessed/lib/widgets/textbox.js +81 -0
  45. package/dist/blessed/lib/widgets/video.js +132 -0
  46. package/dist/blessed/usr/fonts/AUTHORS +1 -0
  47. package/dist/blessed/usr/fonts/LICENSE +94 -0
  48. package/dist/blessed/usr/fonts/README +340 -0
  49. package/dist/blessed/usr/fonts/ter-u14b.json +17826 -0
  50. package/dist/blessed/usr/fonts/ter-u14n.json +17826 -0
  51. package/dist/blessed/usr/linux +0 -0
  52. package/dist/blessed/usr/windows-ansi +0 -0
  53. package/dist/blessed/usr/xterm +0 -0
  54. package/dist/blessed/usr/xterm-256color +0 -0
  55. package/dist/blessed/usr/xterm.termcap +243 -0
  56. package/dist/blessed/usr/xterm.terminfo +1977 -0
  57. package/dist/blessed/vendor/tng.js +1878 -0
  58. package/dist/constants.d.ts +271 -207
  59. package/dist/constants.js +271 -227
  60. package/dist/constants.js.map +1 -1
  61. package/dist/instrument-with-sentry.d.ts +1 -1
  62. package/dist/instrument-with-sentry.js +27 -24
  63. package/dist/instrument-with-sentry.js.map +1 -1
  64. package/dist/module-sync/artifact.d.ts +60 -26
  65. package/dist/module-sync/cli.d.ts +1 -1
  66. package/dist/module-sync/cli.js +6624 -4527
  67. package/dist/module-sync/cli.js.map +1 -1
  68. package/dist/module-sync/cmd.d.ts +4 -4
  69. package/dist/module-sync/config.d.ts +30 -17
  70. package/dist/module-sync/edge.d.ts +73 -60
  71. package/dist/module-sync/errors.d.ts +26 -11
  72. package/dist/module-sync/fs.d.ts +61 -0
  73. package/dist/module-sync/index.d.ts +31 -20
  74. package/dist/module-sync/node.d.ts +118 -83
  75. package/dist/module-sync/override-set.d.ts +39 -33
  76. package/dist/module-sync/package-environment.d.ts +83 -52
  77. package/dist/module-sync/path-resolve.d.ts +14 -9
  78. package/dist/module-sync/sdk.d.ts +9 -5
  79. package/dist/module-sync/shadow-bin.d.ts +5 -2
  80. package/dist/module-sync/shadow-bin.js +82 -66
  81. package/dist/module-sync/shadow-bin.js.map +1 -1
  82. package/dist/module-sync/shadow-npm-inject.d.ts +1 -1
  83. package/dist/module-sync/shadow-npm-inject.js +1176 -983
  84. package/dist/module-sync/shadow-npm-inject.js.map +1 -1
  85. package/dist/module-sync/shadow-npm-paths.d.ts +28 -14
  86. package/dist/module-sync/shadow-npm-paths.js +285 -208
  87. package/dist/module-sync/shadow-npm-paths.js.map +1 -1
  88. package/dist/module-sync/socket-package-alert.d.ts +95 -39
  89. package/dist/module-sync/types.d.ts +75 -47
  90. package/dist/module-sync/vendor.js +11181 -0
  91. package/dist/{require → module-sync}/vendor.js.map +1 -1
  92. package/dist/require/cli.d.ts +1 -1
  93. package/dist/require/cli.js +6624 -4525
  94. package/dist/require/cli.js.map +1 -1
  95. package/dist/require/vendor.js +2 -9145
  96. package/package.json +46 -38
@@ -0,0 +1,90 @@
1
+ 'use strict'
2
+
3
+ /**
4
+ * loading.js - loading element for blessed
5
+ * Copyright (c) 2013-2015, Christopher Jeffrey and contributors (MIT License).
6
+ * https://github.com/chjj/blessed
7
+ */
8
+
9
+ /**
10
+ * Modules
11
+ */
12
+
13
+ const Node = require('./node')
14
+ const Box = require('./box')
15
+ const Text = require('./text')
16
+
17
+ /**
18
+ * Loading
19
+ */
20
+
21
+ function Loading(options) {
22
+ if (!(this instanceof Node)) {
23
+ return new Loading(options)
24
+ }
25
+
26
+ options = options || {}
27
+
28
+ Box.call(this, options)
29
+
30
+ this._.icon = new Text({
31
+ parent: this,
32
+ align: 'center',
33
+ top: 2,
34
+ left: 1,
35
+ right: 1,
36
+ height: 1,
37
+ content: '|'
38
+ })
39
+ }
40
+
41
+ Object.setPrototypeOf(Loading.prototype, Box.prototype)
42
+
43
+ Loading.prototype.type = 'loading'
44
+
45
+ Loading.prototype.load = function (text) {
46
+ const self = this
47
+
48
+ // XXX Keep above:
49
+ // var parent = this.parent;
50
+ // this.detach();
51
+ // parent.append(this);
52
+
53
+ this.show()
54
+ this.setContent(text)
55
+
56
+ if (this._.timer) {
57
+ this.stop()
58
+ }
59
+
60
+ this.screen.lockKeys = true
61
+
62
+ this._.timer = setInterval(function () {
63
+ if (self._.icon.content === '|') {
64
+ self._.icon.setContent('/')
65
+ } else if (self._.icon.content === '/') {
66
+ self._.icon.setContent('-')
67
+ } else if (self._.icon.content === '-') {
68
+ self._.icon.setContent('\\')
69
+ } else if (self._.icon.content === '\\') {
70
+ self._.icon.setContent('|')
71
+ }
72
+ self.screen.render()
73
+ }, 200)
74
+ }
75
+
76
+ Loading.prototype.stop = function () {
77
+ this.screen.lockKeys = false
78
+ this.hide()
79
+ if (this._.timer) {
80
+ clearInterval(this._.timer)
81
+ delete this._.timer
82
+ }
83
+ this.screen.render()
84
+ }
85
+
86
+ /**
87
+ * Expose
88
+ */
89
+
90
+ module.exports = Loading
@@ -0,0 +1,84 @@
1
+ 'use strict'
2
+
3
+ /**
4
+ * log.js - log element for blessed
5
+ * Copyright (c) 2013-2015, Christopher Jeffrey and contributors (MIT License).
6
+ * https://github.com/chjj/blessed
7
+ */
8
+
9
+ /**
10
+ * Modules
11
+ */
12
+
13
+ const util = require('node:util')
14
+
15
+ const nextTick = global.setImmediate || process.nextTick.bind(process)
16
+
17
+ const Node = require('./node')
18
+ const ScrollableText = require('./scrollabletext')
19
+
20
+ /**
21
+ * Log
22
+ */
23
+
24
+ function Log(options) {
25
+ const self = this
26
+
27
+ if (!(this instanceof Node)) {
28
+ return new Log(options)
29
+ }
30
+
31
+ options = options || {}
32
+
33
+ ScrollableText.call(this, options)
34
+
35
+ this.scrollback = options.scrollback != null ? options.scrollback : Infinity
36
+ this.scrollOnInput = options.scrollOnInput
37
+
38
+ this.on('set content', function () {
39
+ if (!self._userScrolled || self.scrollOnInput) {
40
+ nextTick(function () {
41
+ self.setScrollPerc(100)
42
+ self._userScrolled = false
43
+ self.screen.render()
44
+ })
45
+ }
46
+ })
47
+ }
48
+
49
+ Object.setPrototypeOf(Log.prototype, ScrollableText.prototype)
50
+
51
+ Log.prototype.type = 'log'
52
+
53
+ Log.prototype.log = Log.prototype.add = function () {
54
+ const args = Array.prototype.slice.call(arguments)
55
+ if (typeof args[0] === 'object') {
56
+ args[0] = util.inspect(args[0], true, 20, true)
57
+ }
58
+ const text = util.format.apply(util, args)
59
+ this.emit('log', text)
60
+ const ret = this.pushLine(text)
61
+ if (this._clines.fake.length > this.scrollback) {
62
+ this.shiftLine(0, (this.scrollback / 3) | 0)
63
+ }
64
+ return ret
65
+ }
66
+
67
+ Log.prototype._scroll = Log.prototype.scroll
68
+ Log.prototype.scroll = function (offset, always) {
69
+ if (offset === 0) {
70
+ return this._scroll(offset, always)
71
+ }
72
+ this._userScrolled = true
73
+ const ret = this._scroll(offset, always)
74
+ if (this.getScrollPerc() === 100) {
75
+ this._userScrolled = false
76
+ }
77
+ return ret
78
+ }
79
+
80
+ /**
81
+ * Expose
82
+ */
83
+
84
+ module.exports = Log
@@ -0,0 +1,147 @@
1
+ 'use strict'
2
+
3
+ /**
4
+ * message.js - message element for blessed
5
+ * Copyright (c) 2013-2015, Christopher Jeffrey and contributors (MIT License).
6
+ * https://github.com/chjj/blessed
7
+ */
8
+
9
+ /**
10
+ * Modules
11
+ */
12
+
13
+ const Node = require('./node')
14
+ const Box = require('./box')
15
+
16
+ /**
17
+ * Message / Error
18
+ */
19
+
20
+ function Message(options) {
21
+ if (!(this instanceof Node)) {
22
+ return new Message(options)
23
+ }
24
+
25
+ options = options || {}
26
+ options.tags = true
27
+
28
+ Box.call(this, options)
29
+ }
30
+
31
+ Object.setPrototypeOf(Message.prototype, Box.prototype)
32
+
33
+ Message.prototype.type = 'message'
34
+
35
+ Message.prototype.log = Message.prototype.display = function (
36
+ text,
37
+ time,
38
+ callback
39
+ ) {
40
+ const self = this
41
+
42
+ if (typeof time === 'function') {
43
+ callback = time
44
+ time = null
45
+ }
46
+
47
+ if (time == null) {
48
+ time = 3
49
+ }
50
+
51
+ // Keep above:
52
+ // var parent = this.parent;
53
+ // this.detach();
54
+ // parent.append(this);
55
+
56
+ if (this.scrollable) {
57
+ this.screen.saveFocus()
58
+ this.focus()
59
+ this.scrollTo(0)
60
+ }
61
+
62
+ this.show()
63
+ this.setContent(text)
64
+ this.screen.render()
65
+
66
+ if (time === Infinity || time === -1 || time === 0) {
67
+ const end = function () {
68
+ if (end.done) {
69
+ return
70
+ }
71
+ end.done = true
72
+ if (self.scrollable) {
73
+ try {
74
+ self.screen.restoreFocus()
75
+ } catch (e) {}
76
+ }
77
+ self.hide()
78
+ self.screen.render()
79
+ if (callback) {
80
+ callback()
81
+ }
82
+ }
83
+
84
+ setTimeout(function () {
85
+ self.onScreenEvent('keypress', function fn(ch, key) {
86
+ if (key.name === 'mouse') {
87
+ return
88
+ }
89
+ if (self.scrollable) {
90
+ if (
91
+ key.name === 'up' ||
92
+ (self.options.vi && key.name === 'k') ||
93
+ key.name === 'down' ||
94
+ (self.options.vi && key.name === 'j') ||
95
+ (self.options.vi && key.name === 'u' && key.ctrl) ||
96
+ (self.options.vi && key.name === 'd' && key.ctrl) ||
97
+ (self.options.vi && key.name === 'b' && key.ctrl) ||
98
+ (self.options.vi && key.name === 'f' && key.ctrl) ||
99
+ (self.options.vi && key.name === 'g' && !key.shift) ||
100
+ (self.options.vi && key.name === 'g' && key.shift)
101
+ ) {
102
+ return
103
+ }
104
+ }
105
+ if (
106
+ self.options.ignoreKeys &&
107
+ ~self.options.ignoreKeys.indexOf(key.name)
108
+ ) {
109
+ return
110
+ }
111
+ self.removeScreenEvent('keypress', fn)
112
+ end()
113
+ })
114
+ // XXX May be affected by new element.options.mouse option.
115
+ if (!self.options.mouse) {
116
+ return
117
+ }
118
+ self.onScreenEvent('mouse', function fn(data) {
119
+ if (data.action === 'mousemove') {
120
+ return
121
+ }
122
+ self.removeScreenEvent('mouse', fn)
123
+ end()
124
+ })
125
+ }, 10)
126
+
127
+ return
128
+ }
129
+
130
+ setTimeout(function () {
131
+ self.hide()
132
+ self.screen.render()
133
+ if (callback) {
134
+ callback()
135
+ }
136
+ }, time * 1000)
137
+ }
138
+
139
+ Message.prototype.error = function (text, time, callback) {
140
+ return this.display('{red-fg}Error: ' + text + '{/red-fg}', time, callback)
141
+ }
142
+
143
+ /**
144
+ * Expose
145
+ */
146
+
147
+ module.exports = Message
@@ -0,0 +1,316 @@
1
+ 'use strict'
2
+
3
+ /**
4
+ * node.js - base abstract node for blessed
5
+ * Copyright (c) 2013-2015, Christopher Jeffrey and contributors (MIT License).
6
+ * https://github.com/chjj/blessed
7
+ */
8
+
9
+ /**
10
+ * Modules
11
+ */
12
+
13
+ const EventEmitter = require('../events').EventEmitter
14
+
15
+ /**
16
+ * Node
17
+ */
18
+
19
+ function Node(options) {
20
+ const self = this
21
+ const Screen = require('./screen')
22
+
23
+ if (!(this instanceof Node)) {
24
+ return new Node(options)
25
+ }
26
+
27
+ EventEmitter.call(this)
28
+
29
+ options = options || {}
30
+ this.options = options
31
+
32
+ this.screen = this.screen || options.screen
33
+
34
+ if (!this.screen) {
35
+ if (this.type === 'screen') {
36
+ this.screen = this
37
+ } else if (Screen.total === 1) {
38
+ this.screen = Screen.global
39
+ } else if (options.parent) {
40
+ this.screen = options.parent
41
+ while (this.screen && this.screen.type !== 'screen') {
42
+ this.screen = this.screen.parent
43
+ }
44
+ } else if (Screen.total) {
45
+ // This _should_ work in most cases as long as the element is appended
46
+ // synchronously after the screen's creation. Throw error if not.
47
+ this.screen = Screen.instances[Screen.instances.length - 1]
48
+ process.nextTick(function () {
49
+ if (!self.parent) {
50
+ throw new Error(
51
+ 'Element (' +
52
+ self.type +
53
+ ')' +
54
+ ' was not appended synchronously after the' +
55
+ " screen's creation. Please set a `parent`" +
56
+ " or `screen` option in the element's constructor" +
57
+ ' if you are going to use multiple screens and' +
58
+ ' append the element later.'
59
+ )
60
+ }
61
+ })
62
+ } else {
63
+ throw new Error('No active screen.')
64
+ }
65
+ }
66
+
67
+ this.parent = options.parent || null
68
+ this.children = []
69
+ this.$ = this._ = this.data = {}
70
+ this.uid = Node.uid++
71
+ this.index = this.index != null ? this.index : -1
72
+
73
+ if (this.type !== 'screen') {
74
+ this.detached = true
75
+ }
76
+
77
+ if (this.parent) {
78
+ this.parent.append(this)
79
+ }
80
+
81
+ ;(options.children || []).forEach(this.append.bind(this))
82
+ }
83
+
84
+ Node.uid = 0
85
+
86
+ Object.setPrototypeOf(Node.prototype, EventEmitter.prototype)
87
+
88
+ Node.prototype.type = 'node'
89
+
90
+ Node.prototype.insert = function (element, i) {
91
+ const self = this
92
+
93
+ if (element.screen && element.screen !== this.screen) {
94
+ throw new Error("Cannot switch a node's screen.")
95
+ }
96
+
97
+ element.detach()
98
+ element.parent = this
99
+ element.screen = this.screen
100
+
101
+ if (i === 0) {
102
+ this.children.unshift(element)
103
+ } else if (i === this.children.length) {
104
+ this.children.push(element)
105
+ } else {
106
+ this.children.splice(i, 0, element)
107
+ }
108
+
109
+ element.emit('reparent', this)
110
+ this.emit('adopt', element)
111
+
112
+ ;(function emit(el) {
113
+ const n = el.detached !== self.detached
114
+ el.detached = self.detached
115
+ if (n) {
116
+ el.emit('attach')
117
+ }
118
+ el.children.forEach(emit)
119
+ })(element)
120
+
121
+ if (!this.screen.focused) {
122
+ this.screen.focused = element
123
+ }
124
+ }
125
+
126
+ Node.prototype.prepend = function (element) {
127
+ this.insert(element, 0)
128
+ }
129
+
130
+ Node.prototype.append = function (element) {
131
+ this.insert(element, this.children.length)
132
+ }
133
+
134
+ Node.prototype.insertBefore = function (element, other) {
135
+ const i = this.children.indexOf(other)
136
+ if (~i) {
137
+ this.insert(element, i)
138
+ }
139
+ }
140
+
141
+ Node.prototype.insertAfter = function (element, other) {
142
+ const i = this.children.indexOf(other)
143
+ if (~i) {
144
+ this.insert(element, i + 1)
145
+ }
146
+ }
147
+
148
+ Node.prototype.remove = function (element) {
149
+ if (element.parent !== this) {
150
+ return
151
+ }
152
+
153
+ let i = this.children.indexOf(element)
154
+ if (!~i) {
155
+ return
156
+ }
157
+
158
+ element.clearPos()
159
+
160
+ element.parent = null
161
+
162
+ this.children.splice(i, 1)
163
+
164
+ i = this.screen.clickable.indexOf(element)
165
+ if (~i) {
166
+ this.screen.clickable.splice(i, 1)
167
+ }
168
+ i = this.screen.keyable.indexOf(element)
169
+ if (~i) {
170
+ this.screen.keyable.splice(i, 1)
171
+ }
172
+
173
+ element.emit('reparent', null)
174
+ this.emit('remove', element)
175
+
176
+ ;(function emit(el) {
177
+ const n = el.detached !== true
178
+ el.detached = true
179
+ if (n) {
180
+ el.emit('detach')
181
+ }
182
+ el.children.forEach(emit)
183
+ })(element)
184
+
185
+ if (this.screen.focused === element) {
186
+ this.screen.rewindFocus()
187
+ }
188
+ }
189
+
190
+ Node.prototype.detach = function () {
191
+ if (this.parent) {
192
+ this.parent.remove(this)
193
+ }
194
+ }
195
+
196
+ Node.prototype.free = function () {
197
+ return
198
+ }
199
+
200
+ Node.prototype.destroy = function () {
201
+ this.detach()
202
+ this.forDescendants(function (el) {
203
+ el.free()
204
+ el.destroyed = true
205
+ el.emit('destroy')
206
+ }, this)
207
+ }
208
+
209
+ Node.prototype.forDescendants = function (iter, s) {
210
+ if (s) {
211
+ iter(this)
212
+ }
213
+ this.children.forEach(function emit(el) {
214
+ iter(el)
215
+ el.children.forEach(emit)
216
+ })
217
+ }
218
+
219
+ Node.prototype.forAncestors = function (iter, s) {
220
+ let el = this
221
+ if (s) {
222
+ iter(this)
223
+ }
224
+ while ((el = el.parent)) {
225
+ iter(el)
226
+ }
227
+ }
228
+
229
+ Node.prototype.collectDescendants = function (s) {
230
+ const out = []
231
+ this.forDescendants(function (el) {
232
+ out.push(el)
233
+ }, s)
234
+ return out
235
+ }
236
+
237
+ Node.prototype.collectAncestors = function (s) {
238
+ const out = []
239
+ this.forAncestors(function (el) {
240
+ out.push(el)
241
+ }, s)
242
+ return out
243
+ }
244
+
245
+ Node.prototype.emitDescendants = function () {
246
+ let args = Array.prototype.slice(arguments),
247
+ iter
248
+
249
+ if (typeof args[args.length - 1] === 'function') {
250
+ iter = args.pop()
251
+ }
252
+
253
+ return this.forDescendants(function (el) {
254
+ if (iter) {
255
+ iter(el)
256
+ }
257
+ el.emit.apply(el, args)
258
+ }, true)
259
+ }
260
+
261
+ Node.prototype.emitAncestors = function () {
262
+ let args = Array.prototype.slice(arguments),
263
+ iter
264
+
265
+ if (typeof args[args.length - 1] === 'function') {
266
+ iter = args.pop()
267
+ }
268
+
269
+ return this.forAncestors(function (el) {
270
+ if (iter) {
271
+ iter(el)
272
+ }
273
+ el.emit.apply(el, args)
274
+ }, true)
275
+ }
276
+
277
+ Node.prototype.hasDescendant = function (target) {
278
+ return (function find(el) {
279
+ for (let i = 0; i < el.children.length; i++) {
280
+ if (el.children[i] === target) {
281
+ return true
282
+ }
283
+ if (find(el.children[i]) === true) {
284
+ return true
285
+ }
286
+ }
287
+ return false
288
+ })(this)
289
+ }
290
+
291
+ Node.prototype.hasAncestor = function (target) {
292
+ let el = this
293
+ while ((el = el.parent)) {
294
+ if (el === target) {
295
+ return true
296
+ }
297
+ }
298
+ return false
299
+ }
300
+
301
+ Node.prototype.get = function (name, value) {
302
+ if (this.data.hasOwnProperty(name)) {
303
+ return this.data[name]
304
+ }
305
+ return value
306
+ }
307
+
308
+ Node.prototype.set = function (name, value) {
309
+ return (this.data[name] = value)
310
+ }
311
+
312
+ /**
313
+ * Expose
314
+ */
315
+
316
+ module.exports = Node