@socketsecurity/cli-with-sentry 0.14.94 → 0.14.96

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 +178 -159
  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 +160 -140
  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,247 +0,0 @@
1
- 'use strict'
2
-
3
- /**
4
- * gpmclient.js - support the gpm mouse protocol
5
- * Copyright (c) 2013-2015, Christopher Jeffrey and contributors (MIT License).
6
- * https://github.com/chjj/blessed
7
- */
8
-
9
- const net = require('node:net')
10
- const fs = require('node:fs')
11
- const EventEmitter = require('node:events').EventEmitter
12
-
13
- const GPM_USE_MAGIC = false
14
-
15
- const GPM_MOVE = 1,
16
- GPM_DRAG = 2,
17
- GPM_DOWN = 4,
18
- GPM_UP = 8
19
-
20
- const GPM_DOUBLE = 32,
21
- GPM_MFLAG = 128
22
-
23
- const GPM_REQ_NOPASTE = 3,
24
- GPM_HARD = 256
25
-
26
- const GPM_MAGIC = 0x47706d4c
27
- const GPM_SOCKET = '/dev/gpmctl'
28
-
29
- // typedef struct Gpm_Connect {
30
- // unsigned short eventMask, defaultMask;
31
- // unsigned short minMod, maxMod;
32
- // int pid;
33
- // int vc;
34
- // } Gpm_Connect;
35
-
36
- function send_config(socket, Gpm_Connect, callback) {
37
- let buffer
38
- if (GPM_USE_MAGIC) {
39
- buffer = new Buffer(20)
40
- buffer.writeUInt32LE(GPM_MAGIC, 0)
41
- buffer.writeUInt16LE(Gpm_Connect.eventMask, 4)
42
- buffer.writeUInt16LE(Gpm_Connect.defaultMask, 6)
43
- buffer.writeUInt16LE(Gpm_Connect.minMod, 8)
44
- buffer.writeUInt16LE(Gpm_Connect.maxMod, 10)
45
- buffer.writeInt16LE(process.pid, 12)
46
- buffer.writeInt16LE(Gpm_Connect.vc, 16)
47
- } else {
48
- buffer = new Buffer(16)
49
- buffer.writeUInt16LE(Gpm_Connect.eventMask, 0)
50
- buffer.writeUInt16LE(Gpm_Connect.defaultMask, 2)
51
- buffer.writeUInt16LE(Gpm_Connect.minMod, 4)
52
- buffer.writeUInt16LE(Gpm_Connect.maxMod, 6)
53
- buffer.writeInt16LE(Gpm_Connect.pid, 8)
54
- buffer.writeInt16LE(Gpm_Connect.vc, 12)
55
- }
56
- socket.write(buffer, function () {
57
- if (callback) {
58
- callback()
59
- }
60
- })
61
- }
62
-
63
- // typedef struct Gpm_Event {
64
- // unsigned char buttons, modifiers; // try to be a multiple of 4
65
- // unsigned short vc;
66
- // short dx, dy, x, y; // displacement x,y for this event, and absolute x,y
67
- // enum Gpm_Etype type;
68
- // // clicks e.g. double click are determined by time-based processing
69
- // int clicks;
70
- // enum Gpm_Margin margin;
71
- // // wdx/y: displacement of wheels in this event. Absolute values are not
72
- // // required, because wheel movement is typically used for scrolling
73
- // // or selecting fields, not for cursor positioning. The application
74
- // // can determine when the end of file or form is reached, and not
75
- // // go any further.
76
- // // A single mouse will use wdy, "vertical scroll" wheel.
77
- // short wdx, wdy;
78
- // } Gpm_Event;
79
-
80
- function parseEvent(raw) {
81
- const evnt = {}
82
- evnt.buttons = raw[0]
83
- evnt.modifiers = raw[1]
84
- evnt.vc = raw.readUInt16LE(2)
85
- evnt.dx = raw.readInt16LE(4)
86
- evnt.dy = raw.readInt16LE(6)
87
- evnt.x = raw.readInt16LE(8)
88
- evnt.y = raw.readInt16LE(10)
89
- evnt.type = raw.readInt16LE(12)
90
- evnt.clicks = raw.readInt32LE(16)
91
- evnt.margin = raw.readInt32LE(20)
92
- evnt.wdx = raw.readInt16LE(24)
93
- evnt.wdy = raw.readInt16LE(26)
94
- return evnt
95
- }
96
-
97
- function GpmClient(options) {
98
- if (!(this instanceof GpmClient)) {
99
- return new GpmClient(options)
100
- }
101
-
102
- EventEmitter.call(this)
103
-
104
- const pid = process.pid
105
-
106
- // check tty for /dev/tty[n]
107
- let path
108
- try {
109
- path = fs.readlinkSync('/proc/' + pid + '/fd/0')
110
- } catch (e) {}
111
- let tty = /tty[0-9]+$/.exec(path)
112
- if (tty === null) {
113
- // TODO: should also check for /dev/input/..
114
- }
115
-
116
- let vc
117
- if (tty) {
118
- tty = tty[0]
119
- vc = +/[0-9]+$/.exec(tty)[0]
120
- }
121
-
122
- const self = this
123
-
124
- if (tty) {
125
- fs.stat(GPM_SOCKET, function (err, stat) {
126
- if (err || !stat.isSocket()) {
127
- return
128
- }
129
-
130
- const conf = {
131
- eventMask: 0xffff,
132
- defaultMask: GPM_MOVE | GPM_HARD,
133
- minMod: 0,
134
- maxMod: 0xffff,
135
- pid: pid,
136
- vc: vc
137
- }
138
-
139
- const gpm = net.createConnection(GPM_SOCKET)
140
- this.gpm = gpm
141
-
142
- gpm.on('connect', function () {
143
- send_config(gpm, conf, function () {
144
- conf.pid = 0
145
- conf.vc = GPM_REQ_NOPASTE
146
- //send_config(gpm, conf);
147
- })
148
- })
149
-
150
- gpm.on('data', function (packet) {
151
- const evnt = parseEvent(packet)
152
- switch (evnt.type & 15) {
153
- case GPM_MOVE:
154
- if (evnt.dx || evnt.dy) {
155
- self.emit('move', evnt.buttons, evnt.modifiers, evnt.x, evnt.y)
156
- }
157
- if (evnt.wdx || evnt.wdy) {
158
- self.emit(
159
- 'mousewheel',
160
- evnt.buttons,
161
- evnt.modifiers,
162
- evnt.x,
163
- evnt.y,
164
- evnt.wdx,
165
- evnt.wdy
166
- )
167
- }
168
- break
169
- case GPM_DRAG:
170
- if (evnt.dx || evnt.dy) {
171
- self.emit('drag', evnt.buttons, evnt.modifiers, evnt.x, evnt.y)
172
- }
173
- if (evnt.wdx || evnt.wdy) {
174
- self.emit(
175
- 'mousewheel',
176
- evnt.buttons,
177
- evnt.modifiers,
178
- evnt.x,
179
- evnt.y,
180
- evnt.wdx,
181
- evnt.wdy
182
- )
183
- }
184
- break
185
- case GPM_DOWN:
186
- self.emit('btndown', evnt.buttons, evnt.modifiers, evnt.x, evnt.y)
187
- if (evnt.type & GPM_DOUBLE) {
188
- self.emit(
189
- 'dblclick',
190
- evnt.buttons,
191
- evnt.modifiers,
192
- evnt.x,
193
- evnt.y
194
- )
195
- }
196
- break
197
- case GPM_UP:
198
- self.emit('btnup', evnt.buttons, evnt.modifiers, evnt.x, evnt.y)
199
- if (!(evnt.type & GPM_MFLAG)) {
200
- self.emit('click', evnt.buttons, evnt.modifiers, evnt.x, evnt.y)
201
- }
202
- break
203
- }
204
- })
205
-
206
- gpm.on('error', function () {
207
- self.stop()
208
- })
209
- })
210
- }
211
- }
212
-
213
- Object.setPrototypeOf(GpmClient.prototype, EventEmitter.prototype)
214
-
215
- GpmClient.prototype.stop = function () {
216
- if (this.gpm) {
217
- this.gpm.end()
218
- }
219
- delete this.gpm
220
- }
221
-
222
- GpmClient.prototype.ButtonName = function (btn) {
223
- if (btn & 4) {
224
- return 'left'
225
- }
226
- if (btn & 2) {
227
- return 'middle'
228
- }
229
- if (btn & 1) {
230
- return 'right'
231
- }
232
- return ''
233
- }
234
-
235
- GpmClient.prototype.hasShiftKey = function (mod) {
236
- return mod & 1 ? true : false
237
- }
238
-
239
- GpmClient.prototype.hasCtrlKey = function (mod) {
240
- return mod & 4 ? true : false
241
- }
242
-
243
- GpmClient.prototype.hasMetaKey = function (mod) {
244
- return mod & 8 ? true : false
245
- }
246
-
247
- module.exports = GpmClient
@@ -1,172 +0,0 @@
1
- 'use strict'
2
-
3
- /**
4
- * helpers.js - helpers 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 fs = require('node:fs')
14
-
15
- const unicode = require('./unicode')
16
-
17
- /**
18
- * Helpers
19
- */
20
-
21
- const helpers = exports
22
-
23
- helpers.merge = function (a, b) {
24
- Object.keys(b).forEach(function (key) {
25
- a[key] = b[key]
26
- })
27
- return a
28
- }
29
-
30
- helpers.asort = function (obj) {
31
- return obj.sort(function (a, b) {
32
- a = a.name.toLowerCase()
33
- b = b.name.toLowerCase()
34
-
35
- if (a[0] === '.' && b[0] === '.') {
36
- a = a[1]
37
- b = b[1]
38
- } else {
39
- a = a[0]
40
- b = b[0]
41
- }
42
-
43
- return a > b ? 1 : a < b ? -1 : 0
44
- })
45
- }
46
-
47
- helpers.hsort = function (obj) {
48
- return obj.sort(function (a, b) {
49
- return b.index - a.index
50
- })
51
- }
52
-
53
- helpers.findFile = function (start, target) {
54
- return (function read(dir) {
55
- let files, file, stat, out
56
-
57
- if (dir === '/dev' || dir === '/sys' || dir === '/proc' || dir === '/net') {
58
- return null
59
- }
60
-
61
- try {
62
- files = fs.readdirSync(dir)
63
- } catch (e) {
64
- files = []
65
- }
66
-
67
- for (let i = 0; i < files.length; i++) {
68
- file = files[i]
69
-
70
- if (file === target) {
71
- return (dir === '/' ? '' : dir) + '/' + file
72
- }
73
-
74
- try {
75
- stat = fs.lstatSync((dir === '/' ? '' : dir) + '/' + file)
76
- } catch (e) {
77
- stat = null
78
- }
79
-
80
- if (stat && stat.isDirectory() && !stat.isSymbolicLink()) {
81
- out = read((dir === '/' ? '' : dir) + '/' + file)
82
- if (out) {
83
- return out
84
- }
85
- }
86
- }
87
-
88
- return null
89
- })(start)
90
- }
91
-
92
- // Escape text for tag-enabled elements.
93
- helpers.escape = function (text) {
94
- return text.replace(/[{}]/g, function (ch) {
95
- return ch === '{' ? '{open}' : '{close}'
96
- })
97
- }
98
-
99
- helpers.parseTags = function (text, screen) {
100
- return helpers.Element.prototype._parseTags.call(
101
- { parseTags: true, screen: screen || helpers.Screen.global },
102
- text
103
- )
104
- }
105
-
106
- helpers.generateTags = function (style, text) {
107
- let open = '',
108
- close = ''
109
-
110
- Object.keys(style || {}).forEach(function (key) {
111
- let val = style[key]
112
- if (typeof val === 'string') {
113
- val = val.replace(/^light(?!-)/, 'light-')
114
- val = val.replace(/^bright(?!-)/, 'bright-')
115
- open = '{' + val + '-' + key + '}' + open
116
- close += '{/' + val + '-' + key + '}'
117
- } else {
118
- if (val === true) {
119
- open = '{' + key + '}' + open
120
- close += '{/' + key + '}'
121
- }
122
- }
123
- })
124
-
125
- if (text != null) {
126
- return open + text + close
127
- }
128
-
129
- return {
130
- open: open,
131
- close: close
132
- }
133
- }
134
-
135
- helpers.attrToBinary = function (style, element) {
136
- return helpers.Element.prototype.sattr.call(element || {}, style)
137
- }
138
-
139
- helpers.stripTags = function (text) {
140
- if (!text) {
141
- return ''
142
- }
143
- return text.replace(/{(\/?)([\w\-,;!#]*)}/g, '').replace(/\x1b\[[\d;]*m/g, '')
144
- }
145
-
146
- helpers.cleanTags = function (text) {
147
- return helpers.stripTags(text).trim()
148
- }
149
-
150
- helpers.dropUnicode = function (text) {
151
- if (!text) {
152
- return ''
153
- }
154
- return text
155
- .replace(unicode.chars.all, '??')
156
- .replace(unicode.chars.combining, '')
157
- .replace(unicode.chars.surrogate, '?')
158
- }
159
-
160
- helpers.__defineGetter__('Screen', function () {
161
- if (!helpers._screen) {
162
- helpers._screen = require('./widgets/screen')
163
- }
164
- return helpers._screen
165
- })
166
-
167
- helpers.__defineGetter__('Element', function () {
168
- if (!helpers._element) {
169
- helpers._element = require('./widgets/element')
170
- }
171
- return helpers._element
172
- })