protobufjs 6.11.4 → 6.11.6

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 (118) hide show
  1. package/cli/node_modules/.package-lock.json +86 -32
  2. package/cli/node_modules/@babel/parser/package.json +66 -30
  3. package/cli/node_modules/@types/linkify-it/package.json +65 -36
  4. package/cli/node_modules/@types/markdown-it/package.json +67 -39
  5. package/cli/node_modules/@types/mdurl/package.json +53 -21
  6. package/cli/node_modules/acorn/package.json +48 -17
  7. package/cli/node_modules/acorn-jsx/package.json +42 -11
  8. package/cli/node_modules/argparse/package.json +52 -17
  9. package/cli/node_modules/bluebird/package.json +65 -38
  10. package/cli/node_modules/brace-expansion/index.js +14 -12
  11. package/cli/node_modules/brace-expansion/package.json +4 -1
  12. package/cli/node_modules/catharsis/package.json +44 -10
  13. package/cli/node_modules/deep-is/.travis.yml +5 -0
  14. package/cli/node_modules/deep-is/LICENSE +22 -0
  15. package/cli/node_modules/deep-is/README.markdown +70 -0
  16. package/cli/node_modules/deep-is/example/cmp.js +11 -0
  17. package/cli/node_modules/deep-is/index.js +102 -0
  18. package/cli/node_modules/deep-is/package.json +58 -0
  19. package/cli/node_modules/deep-is/test/NaN.js +16 -0
  20. package/cli/node_modules/deep-is/test/cmp.js +23 -0
  21. package/cli/node_modules/deep-is/test/neg-vs-pos-0.js +15 -0
  22. package/cli/node_modules/entities/package.json +95 -60
  23. package/cli/node_modules/escape-string-regexp/package.json +84 -41
  24. package/cli/node_modules/escodegen/escodegen.js +25 -66
  25. package/cli/node_modules/escodegen/package.json +11 -13
  26. package/cli/node_modules/esprima/package.json +82 -54
  27. package/cli/node_modules/estraverse/estraverse.js +1 -24
  28. package/cli/node_modules/estraverse/package.json +1 -1
  29. package/cli/node_modules/esutils/package.json +52 -21
  30. package/cli/node_modules/fast-levenshtein/LICENSE.md +25 -0
  31. package/cli/node_modules/fast-levenshtein/README.md +104 -0
  32. package/cli/node_modules/fast-levenshtein/levenshtein.js +136 -0
  33. package/cli/node_modules/fast-levenshtein/package.json +39 -0
  34. package/cli/node_modules/fs.realpath/package.json +52 -16
  35. package/cli/node_modules/graceful-fs/package.json +57 -25
  36. package/cli/node_modules/inflight/package.json +44 -15
  37. package/cli/node_modules/inherits/package.json +44 -12
  38. package/cli/node_modules/js2xmlparser/package.json +94 -62
  39. package/cli/node_modules/klaw/package.json +53 -23
  40. package/cli/node_modules/levn/LICENSE +22 -0
  41. package/cli/node_modules/levn/README.md +196 -0
  42. package/cli/node_modules/levn/lib/cast.js +298 -0
  43. package/cli/node_modules/levn/lib/coerce.js +285 -0
  44. package/cli/node_modules/levn/lib/index.js +22 -0
  45. package/cli/node_modules/levn/lib/parse-string.js +113 -0
  46. package/cli/node_modules/levn/lib/parse.js +102 -0
  47. package/cli/node_modules/levn/package.json +47 -0
  48. package/cli/node_modules/linkify-it/package.json +58 -23
  49. package/cli/node_modules/lodash/package.json +61 -10
  50. package/cli/node_modules/markdown-it/package.json +68 -33
  51. package/cli/node_modules/markdown-it-anchor/package.json +72 -30
  52. package/cli/node_modules/marked/package.json +87 -52
  53. package/cli/node_modules/mdurl/package.json +44 -9
  54. package/cli/node_modules/minimatch/README.md +37 -0
  55. package/cli/node_modules/minimatch/minimatch.js +160 -102
  56. package/cli/node_modules/minimatch/package.json +2 -2
  57. package/cli/node_modules/mkdirp/package.json +56 -22
  58. package/cli/node_modules/once/package.json +48 -14
  59. package/cli/node_modules/optionator/CHANGELOG.md +56 -0
  60. package/cli/node_modules/optionator/LICENSE +22 -0
  61. package/cli/node_modules/optionator/README.md +238 -0
  62. package/cli/node_modules/optionator/lib/help.js +260 -0
  63. package/cli/node_modules/optionator/lib/index.js +465 -0
  64. package/cli/node_modules/optionator/lib/util.js +54 -0
  65. package/cli/node_modules/optionator/package.json +44 -0
  66. package/cli/node_modules/prelude-ls/CHANGELOG.md +99 -0
  67. package/cli/node_modules/prelude-ls/LICENSE +22 -0
  68. package/cli/node_modules/prelude-ls/README.md +15 -0
  69. package/cli/node_modules/prelude-ls/lib/Func.js +65 -0
  70. package/cli/node_modules/prelude-ls/lib/List.js +686 -0
  71. package/cli/node_modules/prelude-ls/lib/Num.js +130 -0
  72. package/cli/node_modules/prelude-ls/lib/Obj.js +154 -0
  73. package/cli/node_modules/prelude-ls/lib/Str.js +92 -0
  74. package/cli/node_modules/prelude-ls/lib/index.js +178 -0
  75. package/cli/node_modules/prelude-ls/package.json +52 -0
  76. package/cli/node_modules/requizzle/package.json +52 -21
  77. package/cli/node_modules/source-map/package.json +197 -54
  78. package/cli/node_modules/strip-json-comments/package.json +80 -45
  79. package/cli/node_modules/tmp/README.md +47 -21
  80. package/cli/node_modules/tmp/lib/tmp.js +209 -147
  81. package/cli/node_modules/tmp/package.json +73 -37
  82. package/cli/node_modules/type-check/LICENSE +22 -0
  83. package/cli/node_modules/type-check/README.md +210 -0
  84. package/cli/node_modules/type-check/lib/check.js +126 -0
  85. package/cli/node_modules/type-check/lib/index.js +16 -0
  86. package/cli/node_modules/type-check/lib/parse-type.js +196 -0
  87. package/cli/node_modules/type-check/package.json +40 -0
  88. package/cli/node_modules/uc.micro/package.json +45 -9
  89. package/cli/node_modules/underscore/package.json +95 -61
  90. package/cli/node_modules/word-wrap/LICENSE +21 -0
  91. package/cli/node_modules/word-wrap/README.md +201 -0
  92. package/cli/node_modules/word-wrap/index.d.ts +50 -0
  93. package/cli/node_modules/word-wrap/index.js +61 -0
  94. package/cli/node_modules/word-wrap/package.json +77 -0
  95. package/cli/node_modules/wrappy/package.json +46 -16
  96. package/cli/node_modules/xmlcreate/package.json +87 -55
  97. package/cli/package-lock.json +842 -0
  98. package/cli/package.json +1 -1
  99. package/dist/light/protobuf.js +3 -2
  100. package/dist/light/protobuf.js.map +1 -1
  101. package/dist/light/protobuf.min.js +3 -3
  102. package/dist/light/protobuf.min.js.map +1 -1
  103. package/dist/minimal/protobuf.js +2 -2
  104. package/dist/minimal/protobuf.min.js +3 -3
  105. package/dist/minimal/protobuf.min.js.map +1 -1
  106. package/dist/protobuf.js +3 -2
  107. package/dist/protobuf.js.map +1 -1
  108. package/dist/protobuf.min.js +3 -3
  109. package/dist/protobuf.min.js.map +1 -1
  110. package/package.json +1 -1
  111. package/src/type.js +1 -0
  112. package/cli/node_modules/rimraf/CHANGELOG.md +0 -65
  113. package/cli/node_modules/rimraf/LICENSE +0 -15
  114. package/cli/node_modules/rimraf/README.md +0 -101
  115. package/cli/node_modules/rimraf/bin.js +0 -68
  116. package/cli/node_modules/rimraf/package.json +0 -32
  117. package/cli/node_modules/rimraf/rimraf.js +0 -360
  118. package/cli/node_modules/tmp/CHANGELOG.md +0 -288
@@ -0,0 +1,260 @@
1
+ // Generated by LiveScript 1.6.0
2
+ (function(){
3
+ var ref$, id, find, sort, min, max, map, unlines, nameToRaw, dasherize, naturalJoin, wordWrap, wordwrap, getPreText, setHelpStyleDefaults, generateHelpForOption, generateHelp;
4
+ ref$ = require('prelude-ls'), id = ref$.id, find = ref$.find, sort = ref$.sort, min = ref$.min, max = ref$.max, map = ref$.map, unlines = ref$.unlines;
5
+ ref$ = require('./util'), nameToRaw = ref$.nameToRaw, dasherize = ref$.dasherize, naturalJoin = ref$.naturalJoin;
6
+ wordWrap = require('word-wrap');
7
+ wordwrap = function(a, b){
8
+ var ref$, indent, width;
9
+ ref$ = b === undefined
10
+ ? ['', a - 1]
11
+ : [repeatString$(' ', a), b - a - 1], indent = ref$[0], width = ref$[1];
12
+ return function(text){
13
+ return wordWrap(text, {
14
+ indent: indent,
15
+ width: width,
16
+ trim: true
17
+ });
18
+ };
19
+ };
20
+ getPreText = function(option, arg$, maxWidth){
21
+ var mainName, shortNames, ref$, longNames, type, description, aliasSeparator, typeSeparator, initialIndent, names, namesString, namesStringLen, typeSeparatorString, typeSeparatorStringLen, wrap;
22
+ mainName = option.option, shortNames = (ref$ = option.shortNames) != null
23
+ ? ref$
24
+ : [], longNames = (ref$ = option.longNames) != null
25
+ ? ref$
26
+ : [], type = option.type, description = option.description;
27
+ aliasSeparator = arg$.aliasSeparator, typeSeparator = arg$.typeSeparator, initialIndent = arg$.initialIndent;
28
+ if (option.negateName) {
29
+ mainName = "no-" + mainName;
30
+ if (longNames) {
31
+ longNames = map(function(it){
32
+ return "no-" + it;
33
+ }, longNames);
34
+ }
35
+ }
36
+ names = mainName.length === 1
37
+ ? [mainName].concat(shortNames, longNames)
38
+ : shortNames.concat([mainName], longNames);
39
+ namesString = map(nameToRaw, names).join(aliasSeparator);
40
+ namesStringLen = namesString.length;
41
+ typeSeparatorString = mainName === 'NUM' ? '::' : typeSeparator;
42
+ typeSeparatorStringLen = typeSeparatorString.length;
43
+ if (maxWidth != null && !option.boolean && initialIndent + namesStringLen + typeSeparatorStringLen + type.length > maxWidth) {
44
+ wrap = wordwrap(initialIndent + namesStringLen + typeSeparatorStringLen, maxWidth);
45
+ return namesString + "" + typeSeparatorString + wrap(type).replace(/^\s+/, '');
46
+ } else {
47
+ return namesString + "" + (option.boolean
48
+ ? ''
49
+ : typeSeparatorString + "" + type);
50
+ }
51
+ };
52
+ setHelpStyleDefaults = function(helpStyle){
53
+ helpStyle.aliasSeparator == null && (helpStyle.aliasSeparator = ', ');
54
+ helpStyle.typeSeparator == null && (helpStyle.typeSeparator = ' ');
55
+ helpStyle.descriptionSeparator == null && (helpStyle.descriptionSeparator = ' ');
56
+ helpStyle.initialIndent == null && (helpStyle.initialIndent = 2);
57
+ helpStyle.secondaryIndent == null && (helpStyle.secondaryIndent = 4);
58
+ helpStyle.maxPadFactor == null && (helpStyle.maxPadFactor = 1.5);
59
+ };
60
+ generateHelpForOption = function(getOption, arg$){
61
+ var stdout, helpStyle, ref$;
62
+ stdout = arg$.stdout, helpStyle = (ref$ = arg$.helpStyle) != null
63
+ ? ref$
64
+ : {};
65
+ setHelpStyleDefaults(helpStyle);
66
+ return function(optionName){
67
+ var maxWidth, wrap, option, e, pre, defaultString, restPositionalString, description, fullDescription, that, preDescription, descriptionString, exampleString, examples, seperator;
68
+ maxWidth = stdout != null && stdout.isTTY ? stdout.columns - 1 : null;
69
+ wrap = maxWidth ? wordwrap(maxWidth) : id;
70
+ try {
71
+ option = getOption(dasherize(optionName));
72
+ } catch (e$) {
73
+ e = e$;
74
+ return e.message;
75
+ }
76
+ pre = getPreText(option, helpStyle);
77
+ defaultString = option['default'] && !option.negateName ? "\ndefault: " + option['default'] : '';
78
+ restPositionalString = option.restPositional ? 'Everything after this option is considered a positional argument, even if it looks like an option.' : '';
79
+ description = option.longDescription || option.description && sentencize(option.description);
80
+ fullDescription = description && restPositionalString
81
+ ? description + " " + restPositionalString
82
+ : (that = description || restPositionalString) ? that : '';
83
+ preDescription = 'description:';
84
+ descriptionString = !fullDescription
85
+ ? ''
86
+ : maxWidth && fullDescription.length - 1 - preDescription.length > maxWidth
87
+ ? "\n" + preDescription + "\n" + wrap(fullDescription)
88
+ : "\n" + preDescription + " " + fullDescription;
89
+ exampleString = (that = option.example) ? (examples = [].concat(that), examples.length > 1
90
+ ? "\nexamples:\n" + unlines(examples)
91
+ : "\nexample: " + examples[0]) : '';
92
+ seperator = defaultString || descriptionString || exampleString ? "\n" + repeatString$('=', pre.length) : '';
93
+ return pre + "" + seperator + defaultString + descriptionString + exampleString;
94
+ };
95
+ };
96
+ generateHelp = function(arg$){
97
+ var options, prepend, append, helpStyle, ref$, stdout, aliasSeparator, typeSeparator, descriptionSeparator, maxPadFactor, initialIndent, secondaryIndent;
98
+ options = arg$.options, prepend = arg$.prepend, append = arg$.append, helpStyle = (ref$ = arg$.helpStyle) != null
99
+ ? ref$
100
+ : {}, stdout = arg$.stdout;
101
+ setHelpStyleDefaults(helpStyle);
102
+ aliasSeparator = helpStyle.aliasSeparator, typeSeparator = helpStyle.typeSeparator, descriptionSeparator = helpStyle.descriptionSeparator, maxPadFactor = helpStyle.maxPadFactor, initialIndent = helpStyle.initialIndent, secondaryIndent = helpStyle.secondaryIndent;
103
+ return function(arg$){
104
+ var ref$, showHidden, interpolate, maxWidth, output, out, data, optionCount, totalPreLen, preLens, i$, len$, item, that, pre, descParts, desc, preLen, sortedPreLens, maxPreLen, preLenMean, x, padAmount, descSepLen, fullWrapCount, partialWrapCount, descLen, totalLen, initialSpace, wrapAllFull, i, wrap;
105
+ ref$ = arg$ != null
106
+ ? arg$
107
+ : {}, showHidden = ref$.showHidden, interpolate = ref$.interpolate;
108
+ maxWidth = stdout != null && stdout.isTTY ? stdout.columns - 1 : null;
109
+ output = [];
110
+ out = function(it){
111
+ return output.push(it != null ? it : '');
112
+ };
113
+ if (prepend) {
114
+ out(interpolate ? interp(prepend, interpolate) : prepend);
115
+ out();
116
+ }
117
+ data = [];
118
+ optionCount = 0;
119
+ totalPreLen = 0;
120
+ preLens = [];
121
+ for (i$ = 0, len$ = (ref$ = options).length; i$ < len$; ++i$) {
122
+ item = ref$[i$];
123
+ if (showHidden || !item.hidden) {
124
+ if (that = item.heading) {
125
+ data.push({
126
+ type: 'heading',
127
+ value: that
128
+ });
129
+ } else {
130
+ pre = getPreText(item, helpStyle, maxWidth);
131
+ descParts = [];
132
+ if ((that = item.description) != null) {
133
+ descParts.push(that);
134
+ }
135
+ if (that = item['enum']) {
136
+ descParts.push("either: " + naturalJoin(that));
137
+ }
138
+ if (item['default'] && !item.negateName) {
139
+ descParts.push("default: " + item['default']);
140
+ }
141
+ desc = descParts.join(' - ');
142
+ data.push({
143
+ type: 'option',
144
+ pre: pre,
145
+ desc: desc,
146
+ descLen: desc.length
147
+ });
148
+ preLen = pre.length;
149
+ optionCount++;
150
+ totalPreLen += preLen;
151
+ preLens.push(preLen);
152
+ }
153
+ }
154
+ }
155
+ sortedPreLens = sort(preLens);
156
+ maxPreLen = sortedPreLens[sortedPreLens.length - 1];
157
+ preLenMean = initialIndent + totalPreLen / optionCount;
158
+ x = optionCount > 2 ? min(preLenMean * maxPadFactor, maxPreLen) : maxPreLen;
159
+ for (i$ = sortedPreLens.length - 1; i$ >= 0; --i$) {
160
+ preLen = sortedPreLens[i$];
161
+ if (preLen <= x) {
162
+ padAmount = preLen;
163
+ break;
164
+ }
165
+ }
166
+ descSepLen = descriptionSeparator.length;
167
+ if (maxWidth != null) {
168
+ fullWrapCount = 0;
169
+ partialWrapCount = 0;
170
+ for (i$ = 0, len$ = data.length; i$ < len$; ++i$) {
171
+ item = data[i$];
172
+ if (item.type === 'option') {
173
+ pre = item.pre, desc = item.desc, descLen = item.descLen;
174
+ if (descLen === 0) {
175
+ item.wrap = 'none';
176
+ } else {
177
+ preLen = max(padAmount, pre.length) + initialIndent + descSepLen;
178
+ totalLen = preLen + descLen;
179
+ if (totalLen > maxWidth) {
180
+ if (descLen / 2.5 > maxWidth - preLen) {
181
+ fullWrapCount++;
182
+ item.wrap = 'full';
183
+ } else {
184
+ partialWrapCount++;
185
+ item.wrap = 'partial';
186
+ }
187
+ } else {
188
+ item.wrap = 'none';
189
+ }
190
+ }
191
+ }
192
+ }
193
+ }
194
+ initialSpace = repeatString$(' ', initialIndent);
195
+ wrapAllFull = optionCount > 1 && fullWrapCount + partialWrapCount * 0.5 > optionCount * 0.5;
196
+ for (i$ = 0, len$ = data.length; i$ < len$; ++i$) {
197
+ i = i$;
198
+ item = data[i$];
199
+ if (item.type === 'heading') {
200
+ if (i !== 0) {
201
+ out();
202
+ }
203
+ out(item.value + ":");
204
+ } else {
205
+ pre = item.pre, desc = item.desc, descLen = item.descLen, wrap = item.wrap;
206
+ if (maxWidth != null) {
207
+ if (wrapAllFull || wrap === 'full') {
208
+ wrap = wordwrap(initialIndent + secondaryIndent, maxWidth);
209
+ out(initialSpace + "" + pre + "\n" + wrap(desc));
210
+ continue;
211
+ } else if (wrap === 'partial') {
212
+ wrap = wordwrap(initialIndent + descSepLen + max(padAmount, pre.length), maxWidth);
213
+ out(initialSpace + "" + pad(pre, padAmount) + descriptionSeparator + wrap(desc).replace(/^\s+/, ''));
214
+ continue;
215
+ }
216
+ }
217
+ if (descLen === 0) {
218
+ out(initialSpace + "" + pre);
219
+ } else {
220
+ out(initialSpace + "" + pad(pre, padAmount) + descriptionSeparator + desc);
221
+ }
222
+ }
223
+ }
224
+ if (append) {
225
+ out();
226
+ out(interpolate ? interp(append, interpolate) : append);
227
+ }
228
+ return unlines(output);
229
+ };
230
+ };
231
+ function pad(str, num){
232
+ var len, padAmount;
233
+ len = str.length;
234
+ padAmount = num - len;
235
+ return str + "" + repeatString$(' ', padAmount > 0 ? padAmount : 0);
236
+ }
237
+ function sentencize(str){
238
+ var first, rest, period;
239
+ first = str.charAt(0).toUpperCase();
240
+ rest = str.slice(1);
241
+ period = /[\.!\?]$/.test(str) ? '' : '.';
242
+ return first + "" + rest + period;
243
+ }
244
+ function interp(string, object){
245
+ return string.replace(/{{([a-zA-Z$_][a-zA-Z$_0-9]*)}}/g, function(arg$, key){
246
+ var ref$;
247
+ return (ref$ = object[key]) != null
248
+ ? ref$
249
+ : "{{" + key + "}}";
250
+ });
251
+ }
252
+ module.exports = {
253
+ generateHelp: generateHelp,
254
+ generateHelpForOption: generateHelpForOption
255
+ };
256
+ function repeatString$(str, n){
257
+ for (var r = ''; n > 0; (n >>= 1) && (str += str)) if (n & 1) r += str;
258
+ return r;
259
+ }
260
+ }).call(this);