@socketsecurity/cli-with-sentry 0.15.55 → 0.15.57

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 (58) hide show
  1. package/bin/cli.js +2 -2
  2. package/dist/cli.js +82 -55
  3. package/dist/cli.js.map +1 -1
  4. package/dist/constants.js +49 -29
  5. package/dist/constants.js.map +1 -1
  6. package/dist/{shadow-bin.js → shadow-npm-bin.js} +6 -6
  7. package/dist/shadow-npm-bin.js.map +1 -0
  8. package/dist/{shadow-inject.js → shadow-npm-inject.js} +1 -1
  9. package/dist/shadow-npm-inject.js.map +1 -0
  10. package/dist/types/commands/scan/handle-reach-scan.d.mts +1 -1
  11. package/dist/types/commands/scan/handle-reach-scan.d.mts.map +1 -1
  12. package/dist/types/commands/scan/scan-reachability.d.mts +1 -1
  13. package/dist/types/commands/scan/scan-reachability.d.mts.map +1 -1
  14. package/dist/types/commands/threat-feed/cmd-threat-feed.d.mts.map +1 -1
  15. package/dist/types/commands/threat-feed/fetch-threat-feed.d.mts +4 -1
  16. package/dist/types/commands/threat-feed/fetch-threat-feed.d.mts.map +1 -1
  17. package/dist/types/commands/threat-feed/handle-threat-feed.d.mts +4 -1
  18. package/dist/types/commands/threat-feed/handle-threat-feed.d.mts.map +1 -1
  19. package/dist/types/constants.d.mts +9 -5
  20. package/dist/types/constants.d.mts.map +1 -1
  21. package/dist/utils.js +5 -5
  22. package/dist/utils.js.map +1 -1
  23. package/dist/vendor.js +21 -21
  24. package/external/@coana-tech/cli/cli.mjs +123 -8
  25. package/external/@socketsecurity/registry/external/@npmcli/package-json/index.js +9 -4
  26. package/external/@socketsecurity/registry/external/@socketregistry/yocto-spinner.js +115 -132
  27. package/external/@socketsecurity/registry/external/@yarnpkg/extensions.js +18 -0
  28. package/external/@socketsecurity/registry/external/browserslist.js +662 -658
  29. package/external/@socketsecurity/registry/external/cacache.js +5 -3
  30. package/external/@socketsecurity/registry/external/libnpmpack.js +9 -4
  31. package/external/@socketsecurity/registry/external/make-fetch-happen.js +5 -3
  32. package/external/@socketsecurity/registry/external/npm-package-arg.js +4 -1
  33. package/external/@socketsecurity/registry/external/pacote.js +9 -4
  34. package/external/@socketsecurity/registry/external/validate-npm-package-name.js +4 -1
  35. package/external/@socketsecurity/registry/manifest.json +4 -4
  36. package/external/blessed-contrib/lib/layout/grid.js +400 -32
  37. package/external/blessed-contrib/lib/widget/charts/bar.js +8338 -67
  38. package/external/blessed-contrib/lib/widget/charts/line.js +17861 -196
  39. package/external/blessed-contrib/lib/widget/table.js +140 -121
  40. package/package.json +17 -16
  41. package/dist/shadow-bin.js.map +0 -1
  42. package/dist/shadow-inject.js.map +0 -1
  43. package/external/blessed-contrib/index.js +0 -28
  44. package/external/blessed-contrib/lib/layout/carousel.js +0 -74
  45. package/external/blessed-contrib/lib/server-utils.js +0 -73
  46. package/external/blessed-contrib/lib/utils.js +0 -73
  47. package/external/blessed-contrib/lib/widget/canvas.js +0 -51
  48. package/external/blessed-contrib/lib/widget/charts/stacked-bar.js +0 -218
  49. package/external/blessed-contrib/lib/widget/donut.js +0 -149
  50. package/external/blessed-contrib/lib/widget/gauge-list.js +0 -106
  51. package/external/blessed-contrib/lib/widget/gauge.js +0 -125
  52. package/external/blessed-contrib/lib/widget/lcd.js +0 -451
  53. package/external/blessed-contrib/lib/widget/log.js +0 -33
  54. package/external/blessed-contrib/lib/widget/map.js +0 -86
  55. package/external/blessed-contrib/lib/widget/markdown.js +0 -64
  56. package/external/blessed-contrib/lib/widget/picture.js +0 -66
  57. package/external/blessed-contrib/lib/widget/sparkline.js +0 -58
  58. package/external/blessed-contrib/lib/widget/tree.js +0 -167
@@ -1,64 +0,0 @@
1
- 'use strict';
2
-
3
- var Box = require('../../../blessed/lib/widgets/box')
4
- , marked = require('marked')
5
- , TerminalRenderer = require('marked-terminal')
6
- , chalk = require('chalk');
7
-
8
-
9
- function Markdown(options) {
10
- if (!(this instanceof Box)) {
11
- return new Markdown(options);
12
- }
13
-
14
- options = options || {};
15
-
16
- const markdownOptions = {
17
- style: options.markdownStyle
18
- };
19
-
20
- this.evalStyles(markdownOptions);
21
-
22
- this.setOptions(markdownOptions.style);
23
-
24
- this.options = options;
25
- Box.call(this, options);
26
-
27
- if (options.markdown) this.setMarkdown(options.markdown);
28
- }
29
-
30
- Markdown.prototype = Object.create(Box.prototype);
31
-
32
- Markdown.prototype.setMarkdown = function(str) {
33
- this.setContent(marked.parse(str));
34
- };
35
-
36
- Markdown.prototype.setOptions = function(style) {
37
- marked.setOptions({
38
- renderer: new TerminalRenderer(style)
39
- });
40
- };
41
-
42
- Markdown.prototype.evalStyles = function(options) {
43
- if (!options.style) return;
44
- for (var st in options.style) {
45
- if (typeof(options.style[st])!='string') continue;
46
-
47
- var tokens = options.style[st].split('.');
48
- options.style[st] = chalk;
49
- for (var j=1; j<tokens.length; j++) {
50
- options.style[st] = options.style[st][tokens[j]];
51
- }
52
- }
53
- };
54
-
55
- Markdown.prototype.getOptionsPrototype = function() {
56
- return {
57
- markdown: 'string',
58
- markdownStyle: 'object'
59
- };
60
- };
61
-
62
- Markdown.prototype.type = 'markdown';
63
-
64
- module.exports = Markdown;
@@ -1,66 +0,0 @@
1
- 'use strict';
2
-
3
- var Box = require('../../../blessed/lib/widgets/box')
4
- , Node = require('../../../blessed/lib/widgets/node')
5
- , pictureTube = require('picture-tuber')
6
- , fs = require('fs')
7
- , streams = require('memory-streams')
8
- , MemoryStream = require('memorystream');
9
-
10
- function Picture(options) {
11
- if (!(this instanceof Node)) {
12
- return new Picture(options);
13
- }
14
-
15
- options = options || {};
16
- options.cols = options.cols || 50;
17
- this.options = options;
18
-
19
- if (options.file || options.base64) {
20
- this.setImage(options);
21
- }
22
-
23
- Box.call(this, options);
24
- }
25
-
26
- Picture.prototype = Object.create(Box.prototype);
27
-
28
- Picture.prototype.setImage = function(options) {
29
-
30
- var tube = pictureTube( { cols: options.cols } );
31
-
32
- if (options.file) fs.createReadStream(options.file).pipe(tube);
33
- else if (options.base64) {
34
- var memStream = new MemoryStream();
35
- memStream.pipe(tube);
36
- var buf = new Buffer(options.base64, 'base64');
37
- memStream.write(buf);
38
- memStream.end();
39
- }
40
-
41
- this.writer = new streams.WritableStream();
42
- tube.pipe(this.writer);
43
-
44
- tube.on('end', function() {
45
- if (options.onReady) {
46
- options.onReady();
47
- }
48
- });
49
-
50
- };
51
-
52
- Picture.prototype.render = function() {
53
- this.setContent(this.writer.toString());
54
- return this._render();
55
- };
56
-
57
- Picture.prototype.getOptionsPrototype = function() {
58
-
59
- return { base64:'AAAA'
60
- , cols: 1 };
61
-
62
- };
63
-
64
- Picture.prototype.type = 'picture';
65
-
66
- module.exports = Picture;
@@ -1,58 +0,0 @@
1
- 'use strict';
2
-
3
- var Box = require('../../../blessed/lib/widgets/box')
4
- , Node = require('../../../blessed/lib/widgets/node')
5
- , sparkline = require('sparkline');
6
-
7
- function Sparkline(options) {
8
-
9
- var self = this;
10
-
11
- if (!(this instanceof Node)) {
12
- return new Sparkline(options);
13
- }
14
-
15
- options = options || {};
16
- options.bufferLength = options.bufferLength || 30;
17
- options.style = options.style || {};
18
- options.style.titleFg = options.style.titleFg || 'white';
19
- this.options = options;
20
- Box.call(this, options);
21
-
22
-
23
- this.on('attach', function() {
24
- if (self.options.data) {
25
- self.setData(self.options.data.titles, self.options.data.data);
26
- }
27
- });
28
- }
29
-
30
- Sparkline.prototype = Object.create(Box.prototype);
31
-
32
- Sparkline.prototype.setData = function(titles, datasets) {
33
- var res = '\r\n';
34
- for (var i=0; i<titles.length; i++) {
35
- res += '{bold}{'+this.options.style.titleFg+'-fg}' + titles[i]+':{/'+this.options.style.titleFg+'-fg}{/bold}\r\n';
36
- res += sparkline(datasets[i].slice(0, this.width-2)) + '\r\n\r\n';
37
- }
38
-
39
- this.setContent(res);
40
- };
41
-
42
- Sparkline.prototype.getOptionsPrototype = function() {
43
- return { label: 'Sparkline'
44
- , tags: true
45
- , border: {type: 'line', fg: 'cyan'}
46
- , width: '50%'
47
- , height: '50%'
48
- , style: { fg: 'blue' }
49
- , data: { titles: [ 'Sparkline1', 'Sparkline2'],
50
- data: [ [10, 20, 30, 20, 50, 70, 60, 30, 35, 38]
51
- , [40, 10, 40, 50, 20, 30, 20, 20, 19, 40] ]
52
- }
53
- };
54
- };
55
-
56
- Sparkline.prototype.type = 'sparkline';
57
-
58
- module.exports = Sparkline;
@@ -1,167 +0,0 @@
1
- 'use strict';
2
-
3
- var Box = require('../../../blessed/lib/widgets/box')
4
- , List = require('../../../blessed/lib/widgets/list')
5
- , Node = require('../../../blessed/lib/widgets/node');
6
-
7
- function Tree(options) {
8
- if (!(this instanceof Node)) {
9
- return new Tree(options);
10
- }
11
-
12
- var self = this;
13
- options = options || {};
14
- options.bold = true;
15
- this.options = options;
16
- this.data = {};
17
- this.nodeLines = [];
18
- this.lineNbr = 0;
19
- Box.call(this, options);
20
-
21
- options.extended = options.extended || false;
22
- options.keys = options.keys || ['+', 'space', 'enter'];
23
-
24
- options.template = options.template || {};
25
- options.template.extend = options.template.extend || ' [+]';
26
- options.template.retract = options.template.retract || ' [-]';
27
- options.template.lines = options.template.lines || false;
28
-
29
- // Do not set height, since this create a bug where the first line is not always displayed
30
- this.rows = new List({
31
- top: 1,
32
- width: 0,
33
- left: 1,
34
- style: options.style,
35
- padding: options.padding,
36
- keys: true,
37
- tags: options.tags,
38
- input: options.input,
39
- vi: options.vi,
40
- ignoreKeys: options.ignoreKeys,
41
- scrollable: options.scrollable,
42
- mouse: options.mouse,
43
- selectedBg: options.selectedBg || 'blue',
44
- selectedFg: options.selectedFg || 'black',
45
- });
46
-
47
- this.append(this.rows);
48
-
49
- this.rows.key(options.keys, function() {
50
- var selectedNode = self.nodeLines[this.getItemIndex(this.selected)];
51
- if (selectedNode.children) {
52
- selectedNode.extended = !selectedNode.extended;
53
- self.setData(self.data);
54
- self.screen.render();
55
- }
56
-
57
- self.emit('select', selectedNode, this.getItemIndex(this.selected));
58
- });
59
-
60
- }
61
-
62
- Tree.prototype = Object.create(Box.prototype);
63
-
64
- Tree.prototype.walk = function(node, treeDepth) {
65
-
66
- var lines = [];
67
-
68
- if (!node.parent) {
69
- // root level
70
- this.lineNbr = 0;
71
- this.nodeLines.length = 0;
72
- node.parent = null;
73
- }
74
-
75
- if (treeDepth === '' && node.name) {
76
- this.lineNbr = 0;
77
- this.nodeLines[this.lineNbr++] = node;
78
- lines.push(node.name);
79
- treeDepth = ' ';
80
- }
81
-
82
- node.depth = treeDepth.length - 1;
83
-
84
- if (node.children && node.extended) {
85
-
86
- var i = 0;
87
-
88
- if (typeof node.children === 'function')
89
- node.childrenContent = node.children(node);
90
-
91
- if (!node.childrenContent)
92
- node.childrenContent = node.children;
93
-
94
- for (var child in node.childrenContent) {
95
-
96
- if (!node.childrenContent[child].name)
97
- node.childrenContent[child].name = child;
98
-
99
- child = node.childrenContent[child];
100
- child.parent = node;
101
- child.position = i++;
102
-
103
- if (typeof child.extended === 'undefined')
104
- child.extended = this.options.extended;
105
-
106
- if (typeof child.children === 'function')
107
- child.childrenContent = child.children(child);
108
- else
109
- child.childrenContent = child.children;
110
-
111
- var isLastChild = child.position === Object.keys(child.parent.childrenContent).length - 1;
112
- var treePrefix;
113
- var suffix = '';
114
- if (isLastChild)
115
- treePrefix = '└';
116
- else
117
- treePrefix = '├';
118
-
119
- if (!child.childrenContent || Object.keys(child.childrenContent).length === 0) {
120
- treePrefix += '─';
121
- } else if (child.extended) {
122
- treePrefix += '┬';
123
- suffix = this.options.template.retract;
124
- } else {
125
- treePrefix += '─';
126
- suffix = this.options.template.extend;
127
- }
128
-
129
- if (!this.options.template.lines) treePrefix = '|-';
130
- if (this.options.template.spaces) treePrefix = ' ';
131
-
132
- lines.push(treeDepth + treePrefix + child.name + suffix);
133
-
134
- this.nodeLines[this.lineNbr++] = child;
135
-
136
- var parentTree;
137
- if (isLastChild || !this.options.template.lines)
138
- parentTree = treeDepth + ' ';
139
- else
140
- parentTree = treeDepth + '│';
141
-
142
- lines = lines.concat(this.walk(child, parentTree));
143
- }
144
- }
145
- return lines;
146
- };
147
-
148
- Tree.prototype.focus = function() {
149
- this.rows.focus();
150
- };
151
-
152
- Tree.prototype.render = function() {
153
- if (this.screen.focused === this.rows) this.rows.focus();
154
-
155
- this.rows.width = this.width - 3;
156
- this.rows.height = this.height - 3;
157
- Box.prototype.render.call(this);
158
- };
159
-
160
- Tree.prototype.setData = function(nodes) {
161
- this.data = nodes;
162
- this.rows.setItems(this.walk(nodes, ''));
163
- };
164
-
165
- Tree.prototype.type = 'tree';
166
-
167
- module.exports = Tree;