@socketsecurity/cli-with-sentry 0.14.66 → 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 (97) 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 -205
  59. package/dist/constants.js +273 -221
  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 +6991 -4413
  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 +32 -0
  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 +1209 -1006
  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 +286 -209
  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 +6991 -4411
  94. package/dist/require/cli.js.map +1 -1
  95. package/dist/require/vendor.js +2 -9145
  96. package/package.json +49 -41
  97. package/dist/module-sync/settings.d.ts +0 -15
@@ -0,0 +1,225 @@
1
+ 'use strict'
2
+
3
+ /**
4
+ * filemanager.js - file manager 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 path = require('node:path'),
14
+ fs = require('node:fs')
15
+
16
+ const helpers = require('../helpers')
17
+
18
+ const Node = require('./node')
19
+ const List = require('./list')
20
+
21
+ /**
22
+ * FileManager
23
+ */
24
+
25
+ function FileManager(options) {
26
+ const self = this
27
+
28
+ if (!(this instanceof Node)) {
29
+ return new FileManager(options)
30
+ }
31
+
32
+ options = options || {}
33
+ options.parseTags = true
34
+ // options.label = ' {blue-fg}%path{/blue-fg} ';
35
+
36
+ List.call(this, options)
37
+
38
+ this.cwd = options.cwd || process.cwd()
39
+ this.file = this.cwd
40
+ this.value = this.cwd
41
+
42
+ if (options.label && ~options.label.indexOf('%path')) {
43
+ this._label.setContent(options.label.replace('%path', this.cwd))
44
+ }
45
+
46
+ this.on('select', function (item) {
47
+ const value = item.content.replace(/\{[^{}]+\}/g, '').replace(/@$/, ''),
48
+ file = path.resolve(self.cwd, value)
49
+
50
+ return fs.stat(file, function (err, stat) {
51
+ if (err) {
52
+ return self.emit('error', err, file)
53
+ }
54
+ self.file = file
55
+ self.value = file
56
+ if (stat.isDirectory()) {
57
+ self.emit('cd', file, self.cwd)
58
+ self.cwd = file
59
+ if (options.label && ~options.label.indexOf('%path')) {
60
+ self._label.setContent(options.label.replace('%path', file))
61
+ }
62
+ self.refresh()
63
+ } else {
64
+ self.emit('file', file)
65
+ }
66
+ })
67
+ })
68
+ }
69
+
70
+ Object.setPrototypeOf(FileManager.prototype, List.prototype)
71
+
72
+ FileManager.prototype.type = 'file-manager'
73
+
74
+ FileManager.prototype.refresh = function (cwd, callback) {
75
+ if (!callback) {
76
+ callback = cwd
77
+ cwd = null
78
+ }
79
+
80
+ const self = this
81
+
82
+ if (cwd) {
83
+ this.cwd = cwd
84
+ } else {
85
+ cwd = this.cwd
86
+ }
87
+
88
+ return fs.readdir(cwd, function (err, list) {
89
+ if (err && err.code === 'ENOENT') {
90
+ self.cwd = cwd !== process.env.HOME ? process.env.HOME : '/'
91
+ return self.refresh(callback)
92
+ }
93
+
94
+ if (err) {
95
+ if (callback) {
96
+ return callback(err)
97
+ }
98
+ return self.emit('error', err, cwd)
99
+ }
100
+
101
+ let dirs = [],
102
+ files = []
103
+
104
+ list.unshift('..')
105
+
106
+ list.forEach(function (name) {
107
+ let f = path.resolve(cwd, name),
108
+ stat
109
+
110
+ try {
111
+ stat = fs.lstatSync(f)
112
+ } catch (e) {}
113
+
114
+ if ((stat && stat.isDirectory()) || name === '..') {
115
+ dirs.push({
116
+ name: name,
117
+ text: '{light-blue-fg}' + name + '{/light-blue-fg}/',
118
+ dir: true
119
+ })
120
+ } else if (stat && stat.isSymbolicLink()) {
121
+ files.push({
122
+ name: name,
123
+ text: '{light-cyan-fg}' + name + '{/light-cyan-fg}@',
124
+ dir: false
125
+ })
126
+ } else {
127
+ files.push({
128
+ name: name,
129
+ text: name,
130
+ dir: false
131
+ })
132
+ }
133
+ })
134
+
135
+ dirs = helpers.asort(dirs)
136
+ files = helpers.asort(files)
137
+
138
+ list = dirs.concat(files).map(function (data) {
139
+ return data.text
140
+ })
141
+
142
+ self.setItems(list)
143
+ self.select(0)
144
+ self.screen.render()
145
+
146
+ self.emit('refresh')
147
+
148
+ if (callback) {
149
+ callback()
150
+ }
151
+ })
152
+ }
153
+
154
+ FileManager.prototype.pick = function (cwd, callback) {
155
+ if (!callback) {
156
+ callback = cwd
157
+ cwd = null
158
+ }
159
+
160
+ let self = this,
161
+ focused = this.screen.focused === this,
162
+ hidden = this.hidden,
163
+ onfile,
164
+ oncancel
165
+
166
+ function resume() {
167
+ self.removeListener('file', onfile)
168
+ self.removeListener('cancel', oncancel)
169
+ if (hidden) {
170
+ self.hide()
171
+ }
172
+ if (!focused) {
173
+ self.screen.restoreFocus()
174
+ }
175
+ self.screen.render()
176
+ }
177
+
178
+ this.on(
179
+ 'file',
180
+ (onfile = function (file) {
181
+ resume()
182
+ return callback(null, file)
183
+ })
184
+ )
185
+
186
+ this.on(
187
+ 'cancel',
188
+ (oncancel = function () {
189
+ resume()
190
+ return callback()
191
+ })
192
+ )
193
+
194
+ this.refresh(cwd, function (err) {
195
+ if (err) {
196
+ return callback(err)
197
+ }
198
+
199
+ if (hidden) {
200
+ self.show()
201
+ }
202
+
203
+ if (!focused) {
204
+ self.screen.saveFocus()
205
+ self.focus()
206
+ }
207
+
208
+ self.screen.render()
209
+ })
210
+ }
211
+
212
+ FileManager.prototype.reset = function (cwd, callback) {
213
+ if (!callback) {
214
+ callback = cwd
215
+ cwd = null
216
+ }
217
+ this.cwd = cwd || this.options.cwd
218
+ this.refresh(callback)
219
+ }
220
+
221
+ /**
222
+ * Expose
223
+ */
224
+
225
+ module.exports = FileManager
@@ -0,0 +1,303 @@
1
+ 'use strict'
2
+
3
+ /**
4
+ * form.js - form 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
+ * Form
18
+ */
19
+
20
+ function Form(options) {
21
+ const self = this
22
+
23
+ if (!(this instanceof Node)) {
24
+ return new Form(options)
25
+ }
26
+
27
+ options = options || {}
28
+
29
+ options.ignoreKeys = true
30
+ Box.call(this, options)
31
+
32
+ if (options.keys) {
33
+ this.screen._listenKeys(this)
34
+ this.on('element keypress', function (el, ch, key) {
35
+ if (
36
+ (key.name === 'tab' && !key.shift) ||
37
+ (el.type === 'textbox' && options.autoNext && key.name === 'enter') ||
38
+ key.name === 'down' ||
39
+ (options.vi && key.name === 'j')
40
+ ) {
41
+ if (el.type === 'textbox' || el.type === 'textarea') {
42
+ if (key.name === 'j') {
43
+ return
44
+ }
45
+ if (key.name === 'tab') {
46
+ // Workaround, since we can't stop the tab from being added.
47
+ el.emit('keypress', null, { name: 'backspace' })
48
+ }
49
+ el.emit('keypress', '\x1b', { name: 'escape' })
50
+ }
51
+ self.focusNext()
52
+ return
53
+ }
54
+
55
+ if (
56
+ (key.name === 'tab' && key.shift) ||
57
+ key.name === 'up' ||
58
+ (options.vi && key.name === 'k')
59
+ ) {
60
+ if (el.type === 'textbox' || el.type === 'textarea') {
61
+ if (key.name === 'k') {
62
+ return
63
+ }
64
+ el.emit('keypress', '\x1b', { name: 'escape' })
65
+ }
66
+ self.focusPrevious()
67
+ return
68
+ }
69
+
70
+ if (key.name === 'escape') {
71
+ self.focus()
72
+ return
73
+ }
74
+ })
75
+ }
76
+ }
77
+
78
+ Object.setPrototypeOf(Form.prototype, Box.prototype)
79
+
80
+ Form.prototype.type = 'form'
81
+
82
+ Form.prototype._refresh = function () {
83
+ // XXX Possibly remove this if statement and refresh on every focus.
84
+ // Also potentially only include *visible* focusable elements.
85
+ // This would remove the need to check for _selected.visible in previous()
86
+ // and next().
87
+ if (!this._children) {
88
+ const out = []
89
+
90
+ this.children.forEach(function fn(el) {
91
+ if (el.keyable) {
92
+ out.push(el)
93
+ }
94
+ el.children.forEach(fn)
95
+ })
96
+
97
+ this._children = out
98
+ }
99
+ }
100
+
101
+ Form.prototype._visible = function () {
102
+ return !!this._children.filter(function (el) {
103
+ return el.visible
104
+ }).length
105
+ }
106
+
107
+ Form.prototype.next = function () {
108
+ this._refresh()
109
+
110
+ if (!this._visible()) {
111
+ return
112
+ }
113
+
114
+ if (!this._selected) {
115
+ this._selected = this._children[0]
116
+ if (!this._selected.visible) {
117
+ return this.next()
118
+ }
119
+ if (this.screen.focused !== this._selected) {
120
+ return this._selected
121
+ }
122
+ }
123
+
124
+ const i = this._children.indexOf(this._selected)
125
+ if (!~i || !this._children[i + 1]) {
126
+ this._selected = this._children[0]
127
+ if (!this._selected.visible) {
128
+ return this.next()
129
+ }
130
+ return this._selected
131
+ }
132
+
133
+ this._selected = this._children[i + 1]
134
+ if (!this._selected.visible) {
135
+ return this.next()
136
+ }
137
+ return this._selected
138
+ }
139
+
140
+ Form.prototype.previous = function () {
141
+ this._refresh()
142
+
143
+ if (!this._visible()) {
144
+ return
145
+ }
146
+
147
+ if (!this._selected) {
148
+ this._selected = this._children[this._children.length - 1]
149
+ if (!this._selected.visible) {
150
+ return this.previous()
151
+ }
152
+ if (this.screen.focused !== this._selected) {
153
+ return this._selected
154
+ }
155
+ }
156
+
157
+ const i = this._children.indexOf(this._selected)
158
+ if (!~i || !this._children[i - 1]) {
159
+ this._selected = this._children[this._children.length - 1]
160
+ if (!this._selected.visible) {
161
+ return this.previous()
162
+ }
163
+ return this._selected
164
+ }
165
+
166
+ this._selected = this._children[i - 1]
167
+ if (!this._selected.visible) {
168
+ return this.previous()
169
+ }
170
+ return this._selected
171
+ }
172
+
173
+ Form.prototype.focusNext = function () {
174
+ const next = this.next()
175
+ if (next) {
176
+ next.focus()
177
+ }
178
+ }
179
+
180
+ Form.prototype.focusPrevious = function () {
181
+ const previous = this.previous()
182
+ if (previous) {
183
+ previous.focus()
184
+ }
185
+ }
186
+
187
+ Form.prototype.resetSelected = function () {
188
+ this._selected = null
189
+ }
190
+
191
+ Form.prototype.focusFirst = function () {
192
+ this.resetSelected()
193
+ this.focusNext()
194
+ }
195
+
196
+ Form.prototype.focusLast = function () {
197
+ this.resetSelected()
198
+ this.focusPrevious()
199
+ }
200
+
201
+ Form.prototype.submit = function () {
202
+ const out = {}
203
+
204
+ this.children.forEach(function fn(el) {
205
+ if (el.value != null) {
206
+ const name = el.name || el.type
207
+ if (Array.isArray(out[name])) {
208
+ out[name].push(el.value)
209
+ } else if (out[name]) {
210
+ out[name] = [out[name], el.value]
211
+ } else {
212
+ out[name] = el.value
213
+ }
214
+ }
215
+ el.children.forEach(fn)
216
+ })
217
+
218
+ this.emit('submit', out)
219
+
220
+ return (this.submission = out)
221
+ }
222
+
223
+ Form.prototype.cancel = function () {
224
+ this.emit('cancel')
225
+ }
226
+
227
+ Form.prototype.reset = function () {
228
+ this.children.forEach(function fn(el) {
229
+ switch (el.type) {
230
+ case 'screen':
231
+ break
232
+ case 'box':
233
+ break
234
+ case 'text':
235
+ break
236
+ case 'line':
237
+ break
238
+ case 'scrollable-box':
239
+ break
240
+ case 'list':
241
+ el.select(0)
242
+ return
243
+ case 'form':
244
+ break
245
+ case 'input':
246
+ break
247
+ case 'textbox':
248
+ el.clearInput()
249
+ return
250
+ case 'textarea':
251
+ el.clearInput()
252
+ return
253
+ case 'button':
254
+ delete el.value
255
+ break
256
+ case 'progress-bar':
257
+ el.setProgress(0)
258
+ break
259
+ case 'file-manager':
260
+ el.refresh(el.options.cwd)
261
+ return
262
+ case 'checkbox':
263
+ el.uncheck()
264
+ return
265
+ case 'radio-set':
266
+ break
267
+ case 'radio-button':
268
+ el.uncheck()
269
+ return
270
+ case 'prompt':
271
+ break
272
+ case 'question':
273
+ break
274
+ case 'message':
275
+ break
276
+ case 'info':
277
+ break
278
+ case 'loading':
279
+ break
280
+ case 'list-bar':
281
+ //el.select(0);
282
+ break
283
+ case 'dir-manager':
284
+ el.refresh(el.options.cwd)
285
+ return
286
+ case 'terminal':
287
+ el.write('')
288
+ return
289
+ case 'image':
290
+ //el.clearImage();
291
+ return
292
+ }
293
+ el.children.forEach(fn)
294
+ })
295
+
296
+ this.emit('reset')
297
+ }
298
+
299
+ /**
300
+ * Expose
301
+ */
302
+
303
+ module.exports = Form
@@ -0,0 +1,73 @@
1
+ 'use strict'
2
+
3
+ /**
4
+ * image.js - image 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
+ * Image
18
+ */
19
+
20
+ function Image(options) {
21
+ if (!(this instanceof Node)) {
22
+ return new Image(options)
23
+ }
24
+
25
+ options = options || {}
26
+ options.type = options.itype || options.type || 'ansi'
27
+
28
+ Box.call(this, options)
29
+
30
+ if (options.type === 'ansi' && this.type !== 'ansiimage') {
31
+ const ANSIImage = require('./ansiimage')
32
+ Object.getOwnPropertyNames(ANSIImage.prototype).forEach(function (key) {
33
+ if (key === 'type') {
34
+ return
35
+ }
36
+ Object.defineProperty(
37
+ this,
38
+ key,
39
+ Object.getOwnPropertyDescriptor(ANSIImage.prototype, key)
40
+ )
41
+ }, this)
42
+ ANSIImage.call(this, options)
43
+ return this
44
+ }
45
+
46
+ if (options.type === 'overlay' && this.type !== 'overlayimage') {
47
+ const OverlayImage = require('./overlayimage')
48
+ Object.getOwnPropertyNames(OverlayImage.prototype).forEach(function (key) {
49
+ if (key === 'type') {
50
+ return
51
+ }
52
+ Object.defineProperty(
53
+ this,
54
+ key,
55
+ Object.getOwnPropertyDescriptor(OverlayImage.prototype, key)
56
+ )
57
+ }, this)
58
+ OverlayImage.call(this, options)
59
+ return this
60
+ }
61
+
62
+ throw new Error('`type` must either be `ansi` or `overlay`.')
63
+ }
64
+
65
+ Object.setPrototypeOf(Image.prototype, Box.prototype)
66
+
67
+ Image.prototype.type = 'image'
68
+
69
+ /**
70
+ * Expose
71
+ */
72
+
73
+ module.exports = Image
@@ -0,0 +1,36 @@
1
+ 'use strict'
2
+
3
+ /**
4
+ * input.js - abstract input 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
+ * Input
18
+ */
19
+
20
+ function Input(options) {
21
+ if (!(this instanceof Node)) {
22
+ return new Input(options)
23
+ }
24
+ options = options || {}
25
+ Box.call(this, options)
26
+ }
27
+
28
+ Object.setPrototypeOf(Input.prototype, Box.prototype)
29
+
30
+ Input.prototype.type = 'input'
31
+
32
+ /**
33
+ * Expose
34
+ */
35
+
36
+ module.exports = Input