protobufjs 6.10.2 → 6.11.2

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 (220) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/bin/pbjs +0 -0
  3. package/bin/pbts +0 -0
  4. package/cli/README.md +163 -0
  5. package/cli/node_modules/.package-lock.json +256 -0
  6. package/cli/node_modules/acorn/CHANGELOG.md +620 -0
  7. package/cli/node_modules/acorn/LICENSE +21 -0
  8. package/cli/node_modules/acorn/README.md +269 -0
  9. package/cli/node_modules/acorn/bin/acorn +4 -0
  10. package/cli/node_modules/acorn/dist/acorn.d.ts +209 -0
  11. package/cli/node_modules/acorn/dist/acorn.js +5186 -0
  12. package/cli/node_modules/acorn/dist/acorn.js.map +1 -0
  13. package/cli/node_modules/acorn/dist/acorn.mjs +5155 -0
  14. package/cli/node_modules/acorn/dist/acorn.mjs.d.ts +2 -0
  15. package/cli/node_modules/acorn/dist/acorn.mjs.map +1 -0
  16. package/cli/node_modules/acorn/dist/bin.js +64 -0
  17. package/cli/node_modules/acorn/package.json +35 -0
  18. package/cli/node_modules/acorn-jsx/LICENSE +19 -0
  19. package/cli/node_modules/acorn-jsx/README.md +40 -0
  20. package/cli/node_modules/acorn-jsx/index.js +488 -0
  21. package/cli/node_modules/acorn-jsx/package.json +27 -0
  22. package/cli/node_modules/acorn-jsx/xhtml.js +255 -0
  23. package/cli/node_modules/balanced-match/.npmignore +5 -0
  24. package/cli/node_modules/balanced-match/LICENSE.md +21 -0
  25. package/cli/node_modules/balanced-match/README.md +91 -0
  26. package/cli/node_modules/balanced-match/index.js +59 -0
  27. package/cli/node_modules/balanced-match/package.json +49 -0
  28. package/cli/node_modules/brace-expansion/LICENSE +21 -0
  29. package/cli/node_modules/brace-expansion/README.md +129 -0
  30. package/cli/node_modules/brace-expansion/index.js +201 -0
  31. package/cli/node_modules/brace-expansion/package.json +47 -0
  32. package/cli/node_modules/concat-map/.travis.yml +4 -0
  33. package/cli/node_modules/concat-map/LICENSE +18 -0
  34. package/cli/node_modules/concat-map/README.markdown +62 -0
  35. package/cli/node_modules/concat-map/example/map.js +6 -0
  36. package/cli/node_modules/concat-map/index.js +13 -0
  37. package/cli/node_modules/concat-map/package.json +43 -0
  38. package/cli/node_modules/concat-map/test/map.js +39 -0
  39. package/cli/node_modules/deep-is/.npmignore +1 -0
  40. package/cli/node_modules/deep-is/.travis.yml +6 -0
  41. package/cli/node_modules/deep-is/LICENSE +22 -0
  42. package/cli/node_modules/deep-is/README.markdown +70 -0
  43. package/cli/node_modules/deep-is/example/cmp.js +11 -0
  44. package/cli/node_modules/deep-is/index.js +102 -0
  45. package/cli/node_modules/deep-is/package.json +61 -0
  46. package/cli/node_modules/deep-is/test/NaN.js +16 -0
  47. package/cli/node_modules/deep-is/test/cmp.js +23 -0
  48. package/cli/node_modules/deep-is/test/neg-vs-pos-0.js +15 -0
  49. package/cli/node_modules/escodegen/LICENSE.BSD +21 -0
  50. package/cli/node_modules/escodegen/README.md +84 -0
  51. package/cli/node_modules/escodegen/bin/escodegen.js +77 -0
  52. package/cli/node_modules/escodegen/bin/esgenerate.js +64 -0
  53. package/cli/node_modules/escodegen/escodegen.js +2647 -0
  54. package/cli/node_modules/escodegen/package.json +62 -0
  55. package/cli/node_modules/eslint-visitor-keys/CHANGELOG.md +25 -0
  56. package/cli/node_modules/eslint-visitor-keys/LICENSE +201 -0
  57. package/cli/node_modules/eslint-visitor-keys/README.md +98 -0
  58. package/cli/node_modules/eslint-visitor-keys/lib/index.js +81 -0
  59. package/cli/node_modules/eslint-visitor-keys/lib/visitor-keys.json +284 -0
  60. package/cli/node_modules/eslint-visitor-keys/package.json +40 -0
  61. package/cli/node_modules/espree/CHANGELOG.md +509 -0
  62. package/cli/node_modules/espree/LICENSE +25 -0
  63. package/cli/node_modules/espree/README.md +233 -0
  64. package/cli/node_modules/espree/espree.js +177 -0
  65. package/cli/node_modules/espree/lib/ast-node-types.js +96 -0
  66. package/cli/node_modules/espree/lib/espree.js +286 -0
  67. package/cli/node_modules/espree/lib/features.js +29 -0
  68. package/cli/node_modules/espree/lib/options.js +106 -0
  69. package/cli/node_modules/espree/lib/token-translator.js +263 -0
  70. package/cli/node_modules/espree/lib/visitor-keys.js +123 -0
  71. package/cli/node_modules/espree/package.json +64 -0
  72. package/cli/node_modules/esprima/ChangeLog +235 -0
  73. package/cli/node_modules/esprima/LICENSE.BSD +21 -0
  74. package/cli/node_modules/esprima/README.md +46 -0
  75. package/cli/node_modules/esprima/bin/esparse.js +139 -0
  76. package/cli/node_modules/esprima/bin/esvalidate.js +236 -0
  77. package/cli/node_modules/esprima/dist/esprima.js +6709 -0
  78. package/cli/node_modules/esprima/package.json +112 -0
  79. package/cli/node_modules/estraverse/.jshintrc +16 -0
  80. package/cli/node_modules/estraverse/LICENSE.BSD +19 -0
  81. package/cli/node_modules/estraverse/README.md +153 -0
  82. package/cli/node_modules/estraverse/estraverse.js +801 -0
  83. package/cli/node_modules/estraverse/gulpfile.js +70 -0
  84. package/cli/node_modules/estraverse/package.json +40 -0
  85. package/cli/node_modules/esutils/LICENSE.BSD +19 -0
  86. package/cli/node_modules/esutils/README.md +174 -0
  87. package/cli/node_modules/esutils/lib/ast.js +144 -0
  88. package/cli/node_modules/esutils/lib/code.js +135 -0
  89. package/cli/node_modules/esutils/lib/keyword.js +165 -0
  90. package/cli/node_modules/esutils/lib/utils.js +33 -0
  91. package/cli/node_modules/esutils/package.json +44 -0
  92. package/cli/node_modules/fast-levenshtein/LICENSE.md +25 -0
  93. package/cli/node_modules/fast-levenshtein/README.md +104 -0
  94. package/cli/node_modules/fast-levenshtein/levenshtein.js +136 -0
  95. package/cli/node_modules/fast-levenshtein/package.json +39 -0
  96. package/cli/node_modules/fs.realpath/LICENSE +43 -0
  97. package/cli/node_modules/fs.realpath/README.md +33 -0
  98. package/cli/node_modules/fs.realpath/index.js +66 -0
  99. package/cli/node_modules/fs.realpath/old.js +303 -0
  100. package/cli/node_modules/fs.realpath/package.json +26 -0
  101. package/cli/node_modules/glob/LICENSE +21 -0
  102. package/cli/node_modules/glob/README.md +375 -0
  103. package/cli/node_modules/glob/changelog.md +67 -0
  104. package/cli/node_modules/glob/common.js +240 -0
  105. package/cli/node_modules/glob/glob.js +790 -0
  106. package/cli/node_modules/glob/package.json +46 -0
  107. package/cli/node_modules/glob/sync.js +486 -0
  108. package/cli/node_modules/inflight/LICENSE +15 -0
  109. package/cli/node_modules/inflight/README.md +37 -0
  110. package/cli/node_modules/inflight/inflight.js +54 -0
  111. package/cli/node_modules/inflight/package.json +29 -0
  112. package/cli/node_modules/inherits/LICENSE +16 -0
  113. package/cli/node_modules/inherits/README.md +42 -0
  114. package/cli/node_modules/inherits/inherits.js +9 -0
  115. package/cli/node_modules/inherits/inherits_browser.js +27 -0
  116. package/cli/node_modules/inherits/package.json +29 -0
  117. package/cli/node_modules/levn/LICENSE +22 -0
  118. package/cli/node_modules/levn/README.md +196 -0
  119. package/cli/node_modules/levn/lib/cast.js +298 -0
  120. package/cli/node_modules/levn/lib/coerce.js +285 -0
  121. package/cli/node_modules/levn/lib/index.js +22 -0
  122. package/cli/node_modules/levn/lib/parse-string.js +113 -0
  123. package/cli/node_modules/levn/lib/parse.js +102 -0
  124. package/cli/node_modules/levn/package.json +47 -0
  125. package/cli/node_modules/minimatch/LICENSE +15 -0
  126. package/cli/node_modules/minimatch/README.md +209 -0
  127. package/cli/node_modules/minimatch/minimatch.js +923 -0
  128. package/cli/node_modules/minimatch/package.json +30 -0
  129. package/cli/node_modules/once/LICENSE +15 -0
  130. package/cli/node_modules/once/README.md +79 -0
  131. package/cli/node_modules/once/once.js +42 -0
  132. package/cli/node_modules/once/package.json +33 -0
  133. package/cli/node_modules/optionator/CHANGELOG.md +56 -0
  134. package/cli/node_modules/optionator/LICENSE +22 -0
  135. package/cli/node_modules/optionator/README.md +238 -0
  136. package/cli/node_modules/optionator/lib/help.js +260 -0
  137. package/cli/node_modules/optionator/lib/index.js +465 -0
  138. package/cli/node_modules/optionator/lib/util.js +54 -0
  139. package/cli/node_modules/optionator/package.json +44 -0
  140. package/cli/node_modules/path-is-absolute/index.js +20 -0
  141. package/cli/node_modules/path-is-absolute/license +21 -0
  142. package/cli/node_modules/path-is-absolute/package.json +43 -0
  143. package/cli/node_modules/path-is-absolute/readme.md +59 -0
  144. package/cli/node_modules/prelude-ls/CHANGELOG.md +99 -0
  145. package/cli/node_modules/prelude-ls/LICENSE +22 -0
  146. package/cli/node_modules/prelude-ls/README.md +15 -0
  147. package/cli/node_modules/prelude-ls/lib/Func.js +65 -0
  148. package/cli/node_modules/prelude-ls/lib/List.js +686 -0
  149. package/cli/node_modules/prelude-ls/lib/Num.js +130 -0
  150. package/cli/node_modules/prelude-ls/lib/Obj.js +154 -0
  151. package/cli/node_modules/prelude-ls/lib/Str.js +92 -0
  152. package/cli/node_modules/prelude-ls/lib/index.js +178 -0
  153. package/cli/node_modules/prelude-ls/package.json +52 -0
  154. package/cli/node_modules/rimraf/CHANGELOG.md +65 -0
  155. package/cli/node_modules/rimraf/LICENSE +15 -0
  156. package/cli/node_modules/rimraf/README.md +101 -0
  157. package/cli/node_modules/rimraf/bin.js +68 -0
  158. package/cli/node_modules/rimraf/package.json +32 -0
  159. package/cli/node_modules/rimraf/rimraf.js +360 -0
  160. package/cli/node_modules/source-map/CHANGELOG.md +301 -0
  161. package/cli/node_modules/source-map/LICENSE +28 -0
  162. package/cli/node_modules/source-map/README.md +742 -0
  163. package/cli/node_modules/source-map/dist/source-map.debug.js +3234 -0
  164. package/cli/node_modules/source-map/dist/source-map.js +3233 -0
  165. package/cli/node_modules/source-map/dist/source-map.min.js +2 -0
  166. package/cli/node_modules/source-map/dist/source-map.min.js.map +1 -0
  167. package/cli/node_modules/source-map/lib/array-set.js +121 -0
  168. package/cli/node_modules/source-map/lib/base64-vlq.js +140 -0
  169. package/cli/node_modules/source-map/lib/base64.js +67 -0
  170. package/cli/node_modules/source-map/lib/binary-search.js +111 -0
  171. package/cli/node_modules/source-map/lib/mapping-list.js +79 -0
  172. package/cli/node_modules/source-map/lib/quick-sort.js +114 -0
  173. package/cli/node_modules/source-map/lib/source-map-consumer.js +1145 -0
  174. package/cli/node_modules/source-map/lib/source-map-generator.js +425 -0
  175. package/cli/node_modules/source-map/lib/source-node.js +413 -0
  176. package/cli/node_modules/source-map/lib/util.js +488 -0
  177. package/cli/node_modules/source-map/package.json +73 -0
  178. package/cli/node_modules/source-map/source-map.d.ts +98 -0
  179. package/cli/node_modules/source-map/source-map.js +8 -0
  180. package/cli/node_modules/tmp/CHANGELOG.md +288 -0
  181. package/cli/node_modules/tmp/LICENSE +21 -0
  182. package/cli/node_modules/tmp/README.md +365 -0
  183. package/cli/node_modules/tmp/lib/tmp.js +780 -0
  184. package/cli/node_modules/tmp/package.json +58 -0
  185. package/cli/node_modules/type-check/LICENSE +22 -0
  186. package/cli/node_modules/type-check/README.md +210 -0
  187. package/cli/node_modules/type-check/lib/check.js +126 -0
  188. package/cli/node_modules/type-check/lib/index.js +16 -0
  189. package/cli/node_modules/type-check/lib/parse-type.js +196 -0
  190. package/cli/node_modules/type-check/package.json +40 -0
  191. package/cli/node_modules/word-wrap/LICENSE +21 -0
  192. package/cli/node_modules/word-wrap/README.md +182 -0
  193. package/cli/node_modules/word-wrap/index.d.ts +50 -0
  194. package/cli/node_modules/word-wrap/index.js +46 -0
  195. package/cli/node_modules/word-wrap/package.json +77 -0
  196. package/cli/node_modules/wrappy/LICENSE +15 -0
  197. package/cli/node_modules/wrappy/README.md +36 -0
  198. package/cli/node_modules/wrappy/package.json +29 -0
  199. package/cli/node_modules/wrappy/wrappy.js +33 -0
  200. package/cli/package.json +1 -0
  201. package/cli/pbjs.js +3 -1
  202. package/cli/targets/static.js +7 -1
  203. package/dist/light/protobuf.js +17 -5
  204. package/dist/light/protobuf.js.map +1 -1
  205. package/dist/light/protobuf.min.js +3 -3
  206. package/dist/light/protobuf.min.js.map +1 -1
  207. package/dist/minimal/protobuf.js +2 -2
  208. package/dist/minimal/protobuf.min.js +3 -3
  209. package/dist/minimal/protobuf.min.js.map +1 -1
  210. package/dist/protobuf.js +54 -9
  211. package/dist/protobuf.js.map +1 -1
  212. package/dist/protobuf.min.js +3 -3
  213. package/dist/protobuf.min.js.map +1 -1
  214. package/index.d.ts +11 -1
  215. package/package.json +2 -2
  216. package/src/field.js +3 -0
  217. package/src/namespace.js +2 -1
  218. package/src/parse.js +37 -4
  219. package/package-lock.json +0 -8922
  220. package/scripts/changelog.js +0 -150
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ### [6.11.2](https://www.github.com/protobufjs/protobuf.js/compare/v6.11.1...v6.11.2) (2021-04-30)
4
+
5
+ * regenerated index.d.ts to fix the unintended breaking change in types.
6
+
7
+
8
+ ### [6.11.1](https://www.github.com/protobufjs/protobuf.js/compare/v6.11.0...v6.11.1) (2021-04-29)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * parse.js "parent.add(oneof)“ error (@leon776) ([#1602](https://github.com/protobufjs/protobuf.js/pull/1602))
14
+
15
+ ## [6.11.0](https://www.github.com/protobufjs/protobuf.js/compare/v6.10.2...v6.11.0) (2021-04-28)
16
+
17
+
18
+ ### Features
19
+
20
+ * support for proto3 `optional` fields (@alexander-fenster) ([#1584](https://github.com/protobufjs/protobuf.js/pull/1584))
21
+ * add `--no-service` option for `pbjs` (@mdouglass) ([#1577](https://github.com/protobufjs/protobuf.js/pull/1577))
22
+
23
+ ### Bug Fixes
24
+
25
+ * do not assign `oneof` members to default values, use `null` instead (@alexander-fenster) ([#1597](https://github.com/protobufjs/protobuf.js/pull/1597))
26
+
27
+ ### Dependencies
28
+
29
+ * set `@types/node` to `>= 13.7.0` in dependencies (@indutny) ([#1575](https://github.com/protobufjs/protobuf.js/pull/1575))
30
+
3
31
  ### [6.10.2](https://www.github.com/protobufjs/protobuf.js/compare/v6.10.1...v6.10.2) (2020-11-13)
4
32
 
5
33
 
package/bin/pbjs CHANGED
File without changes
package/bin/pbts CHANGED
File without changes
package/cli/README.md CHANGED
@@ -7,5 +7,168 @@ Command line interface (CLI) for [protobuf.js](https://github.com/dcodeIO/protob
7
7
  * [CLI Documentation](https://github.com/dcodeIO/protobuf.js#command-line)
8
8
 
9
9
  **Note** that moving the CLI to its own package is a work in progress. At the moment, it's still part of the main package.
10
+ * [pbjs for JavaScript](#pbjs-for-javascript)
11
+ * [pbts for TypeScript](#pbts-for-typescript)
12
+ * [Reflection vs. static code](#reflection-vs-static-code)
13
+ * [Command line API](#command-line-api)<br />
14
+
15
+ ### pbjs for JavaScript
16
+
17
+ ```
18
+ Translates between file formats and generates static code.
19
+
20
+ -t, --target Specifies the target format. Also accepts a path to require a custom target.
21
+
22
+ json JSON representation
23
+ json-module JSON representation as a module
24
+ proto2 Protocol Buffers, Version 2
25
+ proto3 Protocol Buffers, Version 3
26
+ static Static code without reflection (non-functional on its own)
27
+ static-module Static code without reflection as a module
28
+
29
+ -p, --path Adds a directory to the include path.
30
+
31
+ -o, --out Saves to a file instead of writing to stdout.
32
+
33
+ --sparse Exports only those types referenced from a main file (experimental).
34
+
35
+ Module targets only:
36
+
37
+ -w, --wrap Specifies the wrapper to use. Also accepts a path to require a custom wrapper.
38
+
39
+ default Default wrapper supporting both CommonJS and AMD
40
+ commonjs CommonJS wrapper
41
+ amd AMD wrapper
42
+ es6 ES6 wrapper (implies --es6)
43
+ closure A closure adding to protobuf.roots where protobuf is a global
44
+
45
+ -r, --root Specifies an alternative protobuf.roots name.
46
+
47
+ -l, --lint Linter configuration. Defaults to protobuf.js-compatible rules:
48
+
49
+ eslint-disable block-scoped-var, no-redeclare, no-control-regex, no-prototype-builtins
50
+
51
+ --es6 Enables ES6 syntax (const/let instead of var)
52
+
53
+ Proto sources only:
54
+
55
+ --keep-case Keeps field casing instead of converting to camel case.
56
+
57
+ Static targets only:
58
+
59
+ --no-create Does not generate create functions used for reflection compatibility.
60
+ --no-encode Does not generate encode functions.
61
+ --no-decode Does not generate decode functions.
62
+ --no-verify Does not generate verify functions.
63
+ --no-convert Does not generate convert functions like from/toObject
64
+ --no-delimited Does not generate delimited encode/decode functions.
65
+ --no-beautify Does not beautify generated code.
66
+ --no-comments Does not output any JSDoc comments.
67
+ --no-service Does not output service classes.
68
+
69
+ --force-long Enforces the use of 'Long' for s-/u-/int64 and s-/fixed64 fields.
70
+ --force-number Enforces the use of 'number' for s-/u-/int64 and s-/fixed64 fields.
71
+ --force-message Enforces the use of message instances instead of plain objects.
72
+
73
+ usage: pbjs [options] file1.proto file2.json ... (or pipe) other | pbjs [options] -
74
+ ```
75
+
76
+ For production environments it is recommended to bundle all your .proto files to a single .json file, which minimizes the number of network requests and avoids any parser overhead (hint: works with just the **light** library):
77
+
78
+ ```
79
+ $> pbjs -t json file1.proto file2.proto > bundle.json
80
+ ```
81
+
82
+ Now, either include this file in your final bundle:
83
+
84
+ ```js
85
+ var root = protobuf.Root.fromJSON(require("./bundle.json"));
86
+ ```
87
+
88
+ or load it the usual way:
89
+
90
+ ```js
91
+ protobuf.load("bundle.json", function(err, root) {
92
+ ...
93
+ });
94
+ ```
95
+
96
+ Generated static code, on the other hand, works with just the **minimal** library. For example
97
+
98
+ ```
99
+ $> pbjs -t static-module -w commonjs -o compiled.js file1.proto file2.proto
100
+ ```
101
+
102
+ will generate static code for definitions within `file1.proto` and `file2.proto` to a CommonJS module `compiled.js`.
103
+
104
+ **ProTip!** Documenting your .proto files with `/** ... */`-blocks or (trailing) `/// ...` lines translates to generated static code.
105
+
106
+
107
+ ### pbts for TypeScript
108
+
109
+ ```
110
+ Generates TypeScript definitions from annotated JavaScript files.
111
+
112
+ -o, --out Saves to a file instead of writing to stdout.
113
+
114
+ -g, --global Name of the global object in browser environments, if any.
115
+
116
+ --no-comments Does not output any JSDoc comments.
117
+
118
+ Internal flags:
119
+
120
+ -n, --name Wraps everything in a module of the specified name.
121
+
122
+ -m, --main Whether building the main library without any imports.
123
+
124
+ usage: pbts [options] file1.js file2.js ... (or) other | pbts [options] -
125
+ ```
126
+
127
+ Picking up on the example above, the following not only generates static code to a CommonJS module `compiled.js` but also its respective TypeScript definitions to `compiled.d.ts`:
128
+
129
+ ```
130
+ $> pbjs -t static-module -w commonjs -o compiled.js file1.proto file2.proto
131
+ $> pbts -o compiled.d.ts compiled.js
132
+ ```
133
+
134
+ Additionally, TypeScript definitions of static modules are compatible with their reflection-based counterparts (i.e. as exported by JSON modules), as long as the following conditions are met:
135
+
136
+ 1. Instead of using `new SomeMessage(...)`, always use `SomeMessage.create(...)` because reflection objects do not provide a constructor.
137
+ 2. Types, services and enums must start with an uppercase letter to become available as properties of the reflected types as well (i.e. to be able to use `MyMessage.MyEnum` instead of `root.lookup("MyMessage.MyEnum")`).
138
+
139
+ For example, the following generates a JSON module `bundle.js` and a `bundle.d.ts`, but no static code:
140
+
141
+ ```
142
+ $> pbjs -t json-module -w commonjs -o bundle.js file1.proto file2.proto
143
+ $> pbjs -t static-module file1.proto file2.proto | pbts -o bundle.d.ts -
144
+ ```
145
+
146
+ ### Reflection vs. static code
147
+
148
+ While using .proto files directly requires the full library respectively pure reflection/JSON the light library, pretty much all code but the relatively short descriptors is shared.
149
+
150
+ Static code, on the other hand, requires just the minimal library, but generates additional source code without any reflection features. This also implies that there is a break-even point where statically generated code becomes larger than descriptor-based code once the amount of code generated exceeds the size of the full respectively light library.
151
+
152
+ There is no significant difference performance-wise as the code generated statically is pretty much the same as generated at runtime and both are largely interchangeable as seen in the previous section.
153
+
154
+ | Source | Library | Advantages | Tradeoffs
155
+ |--------|---------|------------|-----------
156
+ | .proto | full | Easily editable<br />Interoperability with other libraries<br />No compile step | Some parsing and possibly network overhead
157
+ | JSON | light | Easily editable<br />No parsing overhead<br />Single bundle (no network overhead) | protobuf.js specific<br />Has a compile step
158
+ | static | minimal | Works where `eval` access is restricted<br />Fully documented<br />Small footprint for small protos | Can be hard to edit<br />No reflection<br />Has a compile step
159
+
160
+ ### Command line API
161
+
162
+ Both utilities can be used programmatically by providing command line arguments and a callback to their respective `main` functions:
163
+
164
+ ```js
165
+ var pbjs = require("protobufjs-cli/pbjs"); // or require("protobufjs-cli").pbjs / .pbts
166
+
167
+ pbjs.main([ "--target", "json-module", "path/to/myproto.proto" ], function(err, output) {
168
+ if (err)
169
+ throw err;
170
+ // do something with output
171
+ });
172
+ ```
10
173
 
11
174
  **License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause)
@@ -0,0 +1,256 @@
1
+ {
2
+ "name": "cli",
3
+ "version": "6.9.0",
4
+ "lockfileVersion": 2,
5
+ "requires": true,
6
+ "packages": {
7
+ "node_modules/acorn": {
8
+ "version": "7.4.1",
9
+ "license": "MIT",
10
+ "bin": {
11
+ "acorn": "bin/acorn"
12
+ },
13
+ "engines": {
14
+ "node": ">=0.4.0"
15
+ }
16
+ },
17
+ "node_modules/acorn-jsx": {
18
+ "version": "5.3.1",
19
+ "license": "MIT",
20
+ "peerDependencies": {
21
+ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
22
+ }
23
+ },
24
+ "node_modules/balanced-match": {
25
+ "version": "1.0.0",
26
+ "license": "MIT"
27
+ },
28
+ "node_modules/brace-expansion": {
29
+ "version": "1.1.11",
30
+ "license": "MIT",
31
+ "dependencies": {
32
+ "balanced-match": "^1.0.0",
33
+ "concat-map": "0.0.1"
34
+ }
35
+ },
36
+ "node_modules/concat-map": {
37
+ "version": "0.0.1",
38
+ "license": "MIT"
39
+ },
40
+ "node_modules/deep-is": {
41
+ "version": "0.1.3",
42
+ "license": "MIT"
43
+ },
44
+ "node_modules/escodegen": {
45
+ "version": "2.0.0",
46
+ "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz",
47
+ "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==",
48
+ "dependencies": {
49
+ "esprima": "^4.0.1",
50
+ "estraverse": "^5.2.0",
51
+ "esutils": "^2.0.2",
52
+ "optionator": "^0.8.1"
53
+ },
54
+ "bin": {
55
+ "escodegen": "bin/escodegen.js",
56
+ "esgenerate": "bin/esgenerate.js"
57
+ },
58
+ "engines": {
59
+ "node": ">=6.0"
60
+ },
61
+ "optionalDependencies": {
62
+ "source-map": "~0.6.1"
63
+ }
64
+ },
65
+ "node_modules/eslint-visitor-keys": {
66
+ "version": "1.3.0",
67
+ "license": "Apache-2.0",
68
+ "engines": {
69
+ "node": ">=4"
70
+ }
71
+ },
72
+ "node_modules/espree": {
73
+ "version": "7.3.1",
74
+ "license": "BSD-2-Clause",
75
+ "dependencies": {
76
+ "acorn": "^7.4.0",
77
+ "acorn-jsx": "^5.3.1",
78
+ "eslint-visitor-keys": "^1.3.0"
79
+ },
80
+ "engines": {
81
+ "node": "^10.12.0 || >=12.0.0"
82
+ }
83
+ },
84
+ "node_modules/esprima": {
85
+ "version": "4.0.1",
86
+ "license": "BSD-2-Clause",
87
+ "bin": {
88
+ "esparse": "bin/esparse.js",
89
+ "esvalidate": "bin/esvalidate.js"
90
+ },
91
+ "engines": {
92
+ "node": ">=4"
93
+ }
94
+ },
95
+ "node_modules/estraverse": {
96
+ "version": "5.2.0",
97
+ "license": "BSD-2-Clause",
98
+ "engines": {
99
+ "node": ">=4.0"
100
+ }
101
+ },
102
+ "node_modules/esutils": {
103
+ "version": "2.0.3",
104
+ "license": "BSD-2-Clause",
105
+ "engines": {
106
+ "node": ">=0.10.0"
107
+ }
108
+ },
109
+ "node_modules/fast-levenshtein": {
110
+ "version": "2.0.6",
111
+ "license": "MIT"
112
+ },
113
+ "node_modules/fs.realpath": {
114
+ "version": "1.0.0",
115
+ "license": "ISC"
116
+ },
117
+ "node_modules/glob": {
118
+ "version": "7.1.6",
119
+ "license": "ISC",
120
+ "dependencies": {
121
+ "fs.realpath": "^1.0.0",
122
+ "inflight": "^1.0.4",
123
+ "inherits": "2",
124
+ "minimatch": "^3.0.4",
125
+ "once": "^1.3.0",
126
+ "path-is-absolute": "^1.0.0"
127
+ },
128
+ "engines": {
129
+ "node": "*"
130
+ },
131
+ "funding": {
132
+ "url": "https://github.com/sponsors/isaacs"
133
+ }
134
+ },
135
+ "node_modules/inflight": {
136
+ "version": "1.0.6",
137
+ "license": "ISC",
138
+ "dependencies": {
139
+ "once": "^1.3.0",
140
+ "wrappy": "1"
141
+ }
142
+ },
143
+ "node_modules/inherits": {
144
+ "version": "2.0.4",
145
+ "license": "ISC"
146
+ },
147
+ "node_modules/levn": {
148
+ "version": "0.3.0",
149
+ "license": "MIT",
150
+ "dependencies": {
151
+ "prelude-ls": "~1.1.2",
152
+ "type-check": "~0.3.2"
153
+ },
154
+ "engines": {
155
+ "node": ">= 0.8.0"
156
+ }
157
+ },
158
+ "node_modules/minimatch": {
159
+ "version": "3.0.4",
160
+ "license": "ISC",
161
+ "dependencies": {
162
+ "brace-expansion": "^1.1.7"
163
+ },
164
+ "engines": {
165
+ "node": "*"
166
+ }
167
+ },
168
+ "node_modules/once": {
169
+ "version": "1.4.0",
170
+ "license": "ISC",
171
+ "dependencies": {
172
+ "wrappy": "1"
173
+ }
174
+ },
175
+ "node_modules/optionator": {
176
+ "version": "0.8.3",
177
+ "license": "MIT",
178
+ "dependencies": {
179
+ "deep-is": "~0.1.3",
180
+ "fast-levenshtein": "~2.0.6",
181
+ "levn": "~0.3.0",
182
+ "prelude-ls": "~1.1.2",
183
+ "type-check": "~0.3.2",
184
+ "word-wrap": "~1.2.3"
185
+ },
186
+ "engines": {
187
+ "node": ">= 0.8.0"
188
+ }
189
+ },
190
+ "node_modules/path-is-absolute": {
191
+ "version": "1.0.1",
192
+ "license": "MIT",
193
+ "engines": {
194
+ "node": ">=0.10.0"
195
+ }
196
+ },
197
+ "node_modules/prelude-ls": {
198
+ "version": "1.1.2",
199
+ "engines": {
200
+ "node": ">= 0.8.0"
201
+ }
202
+ },
203
+ "node_modules/rimraf": {
204
+ "version": "3.0.2",
205
+ "license": "ISC",
206
+ "dependencies": {
207
+ "glob": "^7.1.3"
208
+ },
209
+ "bin": {
210
+ "rimraf": "bin.js"
211
+ },
212
+ "funding": {
213
+ "url": "https://github.com/sponsors/isaacs"
214
+ }
215
+ },
216
+ "node_modules/source-map": {
217
+ "version": "0.6.1",
218
+ "license": "BSD-3-Clause",
219
+ "optional": true,
220
+ "engines": {
221
+ "node": ">=0.10.0"
222
+ }
223
+ },
224
+ "node_modules/tmp": {
225
+ "version": "0.2.1",
226
+ "license": "MIT",
227
+ "dependencies": {
228
+ "rimraf": "^3.0.0"
229
+ },
230
+ "engines": {
231
+ "node": ">=8.17.0"
232
+ }
233
+ },
234
+ "node_modules/type-check": {
235
+ "version": "0.3.2",
236
+ "license": "MIT",
237
+ "dependencies": {
238
+ "prelude-ls": "~1.1.2"
239
+ },
240
+ "engines": {
241
+ "node": ">= 0.8.0"
242
+ }
243
+ },
244
+ "node_modules/word-wrap": {
245
+ "version": "1.2.3",
246
+ "license": "MIT",
247
+ "engines": {
248
+ "node": ">=0.10.0"
249
+ }
250
+ },
251
+ "node_modules/wrappy": {
252
+ "version": "1.0.2",
253
+ "license": "ISC"
254
+ }
255
+ }
256
+ }