@socketsecurity/cli-with-sentry 0.14.94 → 0.14.95

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 (84) hide show
  1. package/dist/constants.js +3 -3
  2. package/dist/constants.js.map +1 -1
  3. package/dist/instrument-with-sentry.js +2 -2
  4. package/dist/instrument-with-sentry.js.map +1 -1
  5. package/dist/module-sync/cli.js +176 -156
  6. package/dist/module-sync/cli.js.map +1 -1
  7. package/dist/module-sync/shadow-bin.js +3 -14
  8. package/dist/module-sync/shadow-bin.js.map +1 -1
  9. package/dist/module-sync/shadow-npm-inject.js +68 -59
  10. package/dist/module-sync/shadow-npm-inject.js.map +1 -1
  11. package/dist/module-sync/shadow-npm-paths.js +16 -29
  12. package/dist/module-sync/shadow-npm-paths.js.map +1 -1
  13. package/dist/module-sync/vendor.d.ts +0 -0
  14. package/dist/module-sync/vendor.js +85829 -12598
  15. package/dist/module-sync/vendor.js.map +1 -1
  16. package/dist/require/cli.js +158 -137
  17. package/dist/require/cli.js.map +1 -1
  18. package/dist/require/shadow-bin.d.ts +5 -0
  19. package/dist/require/shadow-bin.js +108 -1
  20. package/dist/require/shadow-bin.js.map +1 -0
  21. package/dist/require/shadow-npm-inject.d.ts +1 -0
  22. package/dist/require/shadow-npm-inject.js +2335 -1
  23. package/dist/require/shadow-npm-inject.js.map +1 -0
  24. package/dist/require/shadow-npm-paths.d.ts +29 -0
  25. package/dist/require/shadow-npm-paths.js +454 -1
  26. package/dist/require/shadow-npm-paths.js.map +1 -0
  27. package/package.json +29 -29
  28. package/dist/blessed/lib/alias.js +0 -521
  29. package/dist/blessed/lib/blessed.js +0 -34
  30. package/dist/blessed/lib/colors.js +0 -492
  31. package/dist/blessed/lib/events.js +0 -197
  32. package/dist/blessed/lib/gpmclient.js +0 -247
  33. package/dist/blessed/lib/helpers.js +0 -172
  34. package/dist/blessed/lib/keys.js +0 -514
  35. package/dist/blessed/lib/program.js +0 -4532
  36. package/dist/blessed/lib/tput.js +0 -3113
  37. package/dist/blessed/lib/unicode.js +0 -914
  38. package/dist/blessed/lib/widget.js +0 -62
  39. package/dist/blessed/lib/widgets/ansiimage.js +0 -175
  40. package/dist/blessed/lib/widgets/bigtext.js +0 -172
  41. package/dist/blessed/lib/widgets/box.js +0 -36
  42. package/dist/blessed/lib/widgets/button.js +0 -64
  43. package/dist/blessed/lib/widgets/checkbox.js +0 -97
  44. package/dist/blessed/lib/widgets/element.js +0 -2873
  45. package/dist/blessed/lib/widgets/filemanager.js +0 -225
  46. package/dist/blessed/lib/widgets/form.js +0 -303
  47. package/dist/blessed/lib/widgets/image.js +0 -73
  48. package/dist/blessed/lib/widgets/input.js +0 -36
  49. package/dist/blessed/lib/widgets/layout.js +0 -251
  50. package/dist/blessed/lib/widgets/line.js +0 -61
  51. package/dist/blessed/lib/widgets/list.js +0 -654
  52. package/dist/blessed/lib/widgets/listbar.js +0 -454
  53. package/dist/blessed/lib/widgets/listtable.js +0 -267
  54. package/dist/blessed/lib/widgets/loading.js +0 -90
  55. package/dist/blessed/lib/widgets/log.js +0 -84
  56. package/dist/blessed/lib/widgets/message.js +0 -147
  57. package/dist/blessed/lib/widgets/node.js +0 -315
  58. package/dist/blessed/lib/widgets/overlayimage.js +0 -796
  59. package/dist/blessed/lib/widgets/progressbar.js +0 -168
  60. package/dist/blessed/lib/widgets/prompt.js +0 -129
  61. package/dist/blessed/lib/widgets/question.js +0 -131
  62. package/dist/blessed/lib/widgets/radiobutton.js +0 -64
  63. package/dist/blessed/lib/widgets/radioset.js +0 -38
  64. package/dist/blessed/lib/widgets/screen.js +0 -2487
  65. package/dist/blessed/lib/widgets/scrollablebox.js +0 -417
  66. package/dist/blessed/lib/widgets/scrollabletext.js +0 -37
  67. package/dist/blessed/lib/widgets/table.js +0 -385
  68. package/dist/blessed/lib/widgets/terminal.js +0 -454
  69. package/dist/blessed/lib/widgets/text.js +0 -37
  70. package/dist/blessed/lib/widgets/textarea.js +0 -378
  71. package/dist/blessed/lib/widgets/textbox.js +0 -81
  72. package/dist/blessed/lib/widgets/video.js +0 -132
  73. package/dist/blessed/usr/fonts/AUTHORS +0 -1
  74. package/dist/blessed/usr/fonts/LICENSE +0 -94
  75. package/dist/blessed/usr/fonts/README +0 -340
  76. package/dist/blessed/usr/fonts/ter-u14b.json +0 -17826
  77. package/dist/blessed/usr/fonts/ter-u14n.json +0 -17826
  78. package/dist/blessed/usr/linux +0 -0
  79. package/dist/blessed/usr/windows-ansi +0 -0
  80. package/dist/blessed/usr/xterm +0 -0
  81. package/dist/blessed/usr/xterm-256color +0 -0
  82. package/dist/blessed/usr/xterm.termcap +0 -243
  83. package/dist/blessed/usr/xterm.terminfo +0 -1977
  84. package/dist/blessed/vendor/tng.js +0 -1878
@@ -1,225 +0,0 @@
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
@@ -1,303 +0,0 @@
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
@@ -1,73 +0,0 @@
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
@@ -1,36 +0,0 @@
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