@bufbuild/protobuf 1.8.0 → 2.0.0-alpha.1

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 (426) hide show
  1. package/dist/cjs/clone.d.ts +6 -0
  2. package/dist/cjs/clone.js +77 -0
  3. package/dist/cjs/codegenv1/boot.d.ts +63 -0
  4. package/dist/cjs/codegenv1/boot.js +102 -0
  5. package/dist/cjs/codegenv1/embed.d.ts +43 -0
  6. package/dist/cjs/codegenv1/embed.js +238 -0
  7. package/dist/cjs/codegenv1/enum.d.ts +17 -0
  8. package/dist/cjs/codegenv1/enum.js +43 -0
  9. package/dist/cjs/codegenv1/extension.d.ts +9 -0
  10. package/dist/cjs/codegenv1/extension.js +29 -0
  11. package/dist/cjs/codegenv1/file.d.ts +7 -0
  12. package/dist/cjs/codegenv1/file.js +38 -0
  13. package/dist/cjs/codegenv1/index.d.ts +9 -0
  14. package/dist/cjs/codegenv1/index.js +38 -0
  15. package/dist/cjs/codegenv1/message.d.ts +9 -0
  16. package/dist/cjs/codegenv1/message.js +25 -0
  17. package/dist/cjs/codegenv1/restore-json-names.d.ts +2 -0
  18. package/dist/cjs/codegenv1/restore-json-names.js +27 -0
  19. package/dist/cjs/codegenv1/service.d.ts +8 -0
  20. package/dist/cjs/codegenv1/service.js +28 -0
  21. package/dist/cjs/codegenv1/symbols.d.ts +116 -0
  22. package/dist/cjs/codegenv1/symbols.js +58 -0
  23. package/dist/cjs/codegenv1/types.d.ts +19 -0
  24. package/dist/cjs/codegenv1/types.js +21 -0
  25. package/dist/cjs/create.d.ts +9 -0
  26. package/dist/cjs/create.js +242 -0
  27. package/dist/{esm/descriptor-set.d.ts → cjs/desc-types.d.ts} +144 -242
  28. package/dist/cjs/equals.d.ts +9 -0
  29. package/dist/cjs/equals.js +133 -0
  30. package/dist/cjs/{extension-accessor.d.ts → extensions.d.ts} +11 -7
  31. package/dist/cjs/extensions.js +138 -0
  32. package/dist/cjs/fields.d.ts +22 -0
  33. package/dist/cjs/fields.js +39 -0
  34. package/dist/cjs/from-binary.d.ts +34 -0
  35. package/dist/cjs/from-binary.js +221 -0
  36. package/dist/cjs/from-json.d.ts +48 -0
  37. package/dist/cjs/from-json.js +614 -0
  38. package/dist/cjs/index.d.ts +16 -42
  39. package/dist/cjs/index.js +21 -55
  40. package/dist/cjs/is-message.d.ts +5 -20
  41. package/dist/cjs/is-message.js +11 -29
  42. package/dist/cjs/json-value.d.ts +16 -0
  43. package/dist/cjs/proto-int64.js +2 -2
  44. package/dist/cjs/reflect/error.d.ts +9 -0
  45. package/dist/cjs/reflect/error.js +36 -0
  46. package/dist/cjs/reflect/guard.d.ts +20 -0
  47. package/dist/cjs/reflect/guard.js +78 -0
  48. package/dist/cjs/reflect/index.d.ts +8 -0
  49. package/dist/cjs/reflect/index.js +41 -0
  50. package/dist/cjs/reflect/names.d.ts +23 -0
  51. package/dist/cjs/reflect/names.js +112 -0
  52. package/dist/cjs/reflect/nested-types.d.ts +2 -0
  53. package/dist/cjs/reflect/nested-types.js +38 -0
  54. package/dist/cjs/reflect/reflect-check.d.ts +10 -0
  55. package/dist/cjs/reflect/reflect-check.js +150 -0
  56. package/dist/cjs/reflect/reflect-types.d.ts +136 -0
  57. package/dist/cjs/{extension.js → reflect/reflect-types.js} +1 -0
  58. package/dist/cjs/reflect/reflect.d.ts +23 -0
  59. package/dist/cjs/reflect/reflect.js +409 -0
  60. package/dist/cjs/reflect/registry.d.ts +82 -0
  61. package/dist/cjs/reflect/registry.js +870 -0
  62. package/dist/{esm → cjs/reflect}/scalar.d.ts +21 -1
  63. package/dist/cjs/reflect/scalar.js +298 -0
  64. package/dist/cjs/reflect/unsafe.d.ts +58 -0
  65. package/dist/cjs/reflect/unsafe.js +171 -0
  66. package/dist/cjs/to-binary.d.ts +24 -0
  67. package/dist/cjs/to-binary.js +194 -0
  68. package/dist/cjs/to-json.d.ts +50 -0
  69. package/dist/cjs/to-json.js +384 -0
  70. package/dist/cjs/types.d.ts +68 -0
  71. package/dist/cjs/wire/base64-encoding.d.ts +23 -0
  72. package/dist/cjs/wire/base64-encoding.js +156 -0
  73. package/dist/cjs/wire/binary-encoding.d.ts +242 -0
  74. package/dist/cjs/{binary-encoding.js → wire/binary-encoding.js} +11 -10
  75. package/dist/cjs/wire/index.d.ts +5 -0
  76. package/dist/cjs/wire/index.js +34 -0
  77. package/dist/cjs/wire/size-delimited.d.ts +51 -0
  78. package/dist/cjs/wire/size-delimited.js +154 -0
  79. package/dist/cjs/wire/text-encoding.d.ts +26 -0
  80. package/dist/cjs/wire/text-encoding.js +55 -0
  81. package/dist/cjs/wire/text-format.d.ts +14 -0
  82. package/dist/cjs/{private → wire}/text-format.js +12 -2
  83. package/dist/{esm/google → cjs/wire}/varint.d.ts +2 -2
  84. package/dist/cjs/{google → wire}/varint.js +11 -10
  85. package/dist/cjs/wkt/any.d.ts +38 -0
  86. package/dist/cjs/wkt/any.js +76 -0
  87. package/dist/cjs/{google → wkt/gen/google}/protobuf/any_pb.d.ts +6 -27
  88. package/dist/cjs/wkt/gen/google/protobuf/any_pb.js +22 -0
  89. package/dist/cjs/{google → wkt/gen/google}/protobuf/api_pb.d.ts +14 -38
  90. package/dist/cjs/wkt/gen/google/protobuf/api_pb.js +30 -0
  91. package/dist/cjs/{google → wkt/gen/google}/protobuf/compiler/plugin_pb.d.ts +47 -77
  92. package/dist/cjs/wkt/gen/google/protobuf/compiler/plugin_pb.js +55 -0
  93. package/dist/cjs/{google → wkt/gen/google}/protobuf/descriptor_pb.d.ts +384 -533
  94. package/dist/cjs/wkt/gen/google/protobuf/descriptor_pb.js +691 -0
  95. package/dist/{esm → cjs/wkt/gen}/google/protobuf/duration_pb.d.ts +6 -18
  96. package/dist/cjs/wkt/gen/google/protobuf/duration_pb.js +22 -0
  97. package/dist/cjs/wkt/gen/google/protobuf/empty_pb.d.ts +17 -0
  98. package/dist/cjs/wkt/gen/google/protobuf/empty_pb.js +22 -0
  99. package/dist/{esm → cjs/wkt/gen}/google/protobuf/field_mask_pb.d.ts +6 -18
  100. package/dist/cjs/{proto-double.js → wkt/gen/google/protobuf/field_mask_pb.js} +7 -14
  101. package/dist/cjs/wkt/gen/google/protobuf/source_context_pb.d.ts +19 -0
  102. package/dist/cjs/wkt/gen/google/protobuf/source_context_pb.js +22 -0
  103. package/dist/{esm → cjs/wkt/gen}/google/protobuf/struct_pb.d.ts +28 -57
  104. package/dist/cjs/wkt/gen/google/protobuf/struct_pb.js +48 -0
  105. package/dist/{esm → cjs/wkt/gen}/google/protobuf/timestamp_pb.d.ts +6 -21
  106. package/dist/cjs/wkt/gen/google/protobuf/timestamp_pb.js +22 -0
  107. package/dist/{esm → cjs/wkt/gen}/google/protobuf/type_pb.d.ts +47 -82
  108. package/dist/cjs/wkt/gen/google/protobuf/type_pb.js +223 -0
  109. package/dist/cjs/wkt/gen/google/protobuf/wrappers_pb.d.ts +147 -0
  110. package/dist/cjs/wkt/gen/google/protobuf/wrappers_pb.js +46 -0
  111. package/dist/cjs/wkt/index.d.ts +15 -0
  112. package/dist/cjs/wkt/index.js +44 -0
  113. package/dist/cjs/wkt/timestamp.d.ts +21 -0
  114. package/dist/cjs/wkt/timestamp.js +58 -0
  115. package/dist/cjs/wkt/wrappers.d.ts +15 -0
  116. package/dist/cjs/wkt/wrappers.js +43 -0
  117. package/dist/esm/clone.d.ts +6 -0
  118. package/dist/esm/clone.js +73 -0
  119. package/dist/esm/codegenv1/boot.d.ts +63 -0
  120. package/dist/esm/codegenv1/boot.js +97 -0
  121. package/dist/esm/codegenv1/embed.d.ts +43 -0
  122. package/dist/esm/codegenv1/embed.js +232 -0
  123. package/dist/esm/codegenv1/enum.d.ts +17 -0
  124. package/dist/esm/codegenv1/enum.js +38 -0
  125. package/dist/esm/codegenv1/extension.d.ts +9 -0
  126. package/dist/esm/codegenv1/extension.js +25 -0
  127. package/dist/esm/codegenv1/file.d.ts +7 -0
  128. package/dist/esm/codegenv1/file.js +34 -0
  129. package/dist/esm/codegenv1/index.d.ts +9 -0
  130. package/dist/esm/codegenv1/index.js +22 -0
  131. package/dist/esm/codegenv1/message.d.ts +9 -0
  132. package/dist/esm/codegenv1/message.js +21 -0
  133. package/dist/esm/codegenv1/restore-json-names.d.ts +2 -0
  134. package/dist/esm/codegenv1/restore-json-names.js +23 -0
  135. package/dist/esm/codegenv1/service.d.ts +8 -0
  136. package/dist/esm/codegenv1/service.js +24 -0
  137. package/dist/esm/codegenv1/symbols.d.ts +116 -0
  138. package/dist/esm/codegenv1/symbols.js +55 -0
  139. package/dist/esm/codegenv1/types.d.ts +19 -0
  140. package/dist/esm/{field-list.js → codegenv1/types.js} +6 -0
  141. package/dist/esm/create.d.ts +9 -0
  142. package/dist/esm/create.js +239 -0
  143. package/dist/{cjs/descriptor-set.d.ts → esm/desc-types.d.ts} +144 -242
  144. package/dist/esm/equals.d.ts +9 -0
  145. package/dist/esm/equals.js +129 -0
  146. package/dist/esm/{extension-accessor.d.ts → extensions.d.ts} +11 -7
  147. package/dist/esm/extensions.js +130 -0
  148. package/dist/esm/fields.d.ts +22 -0
  149. package/dist/esm/fields.js +34 -0
  150. package/dist/esm/from-binary.d.ts +34 -0
  151. package/dist/esm/from-binary.js +215 -0
  152. package/dist/esm/from-json.d.ts +48 -0
  153. package/dist/esm/from-json.js +607 -0
  154. package/dist/esm/index.d.ts +16 -42
  155. package/dist/esm/index.js +13 -30
  156. package/dist/esm/is-message.d.ts +5 -20
  157. package/dist/esm/is-message.js +11 -29
  158. package/dist/esm/json-value.d.ts +16 -0
  159. package/dist/esm/proto-int64.js +2 -2
  160. package/dist/esm/reflect/error.d.ts +9 -0
  161. package/dist/esm/reflect/error.js +31 -0
  162. package/dist/esm/reflect/guard.d.ts +20 -0
  163. package/dist/esm/reflect/guard.js +70 -0
  164. package/dist/esm/reflect/index.d.ts +8 -0
  165. package/dist/esm/reflect/index.js +21 -0
  166. package/dist/esm/reflect/names.d.ts +23 -0
  167. package/dist/esm/reflect/names.js +106 -0
  168. package/dist/esm/reflect/nested-types.d.ts +2 -0
  169. package/dist/esm/reflect/nested-types.js +34 -0
  170. package/dist/esm/reflect/reflect-check.d.ts +10 -0
  171. package/dist/esm/reflect/reflect-check.js +143 -0
  172. package/dist/esm/reflect/reflect-types.d.ts +136 -0
  173. package/dist/esm/reflect/reflect-types.js +15 -0
  174. package/dist/esm/reflect/reflect.d.ts +23 -0
  175. package/dist/esm/reflect/reflect.js +403 -0
  176. package/dist/esm/reflect/registry.d.ts +82 -0
  177. package/dist/esm/reflect/registry.js +865 -0
  178. package/dist/{cjs → esm/reflect}/scalar.d.ts +21 -1
  179. package/dist/esm/reflect/scalar.js +289 -0
  180. package/dist/esm/reflect/unsafe.d.ts +58 -0
  181. package/dist/esm/reflect/unsafe.js +160 -0
  182. package/dist/esm/to-binary.d.ts +24 -0
  183. package/dist/esm/to-binary.js +189 -0
  184. package/dist/esm/to-json.d.ts +50 -0
  185. package/dist/esm/to-json.js +379 -0
  186. package/dist/esm/types.d.ts +68 -0
  187. package/dist/esm/wire/base64-encoding.d.ts +23 -0
  188. package/dist/esm/wire/base64-encoding.js +151 -0
  189. package/dist/esm/wire/binary-encoding.d.ts +242 -0
  190. package/dist/esm/{binary-encoding.js → wire/binary-encoding.js} +11 -10
  191. package/dist/esm/wire/index.d.ts +5 -0
  192. package/dist/esm/wire/index.js +18 -0
  193. package/dist/esm/wire/size-delimited.d.ts +51 -0
  194. package/dist/esm/wire/size-delimited.js +148 -0
  195. package/dist/esm/wire/text-encoding.d.ts +26 -0
  196. package/dist/esm/wire/text-encoding.js +50 -0
  197. package/dist/esm/wire/text-format.d.ts +14 -0
  198. package/dist/esm/{private → wire}/text-format.js +12 -2
  199. package/dist/{cjs/google → esm/wire}/varint.d.ts +2 -2
  200. package/dist/esm/{google → wire}/varint.js +11 -10
  201. package/dist/esm/wkt/any.d.ts +38 -0
  202. package/dist/esm/wkt/any.js +69 -0
  203. package/dist/esm/{google → wkt/gen/google}/protobuf/any_pb.d.ts +6 -27
  204. package/dist/esm/wkt/gen/google/protobuf/any_pb.js +19 -0
  205. package/dist/esm/{google → wkt/gen/google}/protobuf/api_pb.d.ts +14 -38
  206. package/dist/esm/wkt/gen/google/protobuf/api_pb.js +27 -0
  207. package/dist/esm/{google → wkt/gen/google}/protobuf/compiler/plugin_pb.d.ts +47 -77
  208. package/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.js +52 -0
  209. package/dist/esm/{google → wkt/gen/google}/protobuf/descriptor_pb.d.ts +384 -533
  210. package/dist/esm/wkt/gen/google/protobuf/descriptor_pb.js +687 -0
  211. package/dist/{cjs → esm/wkt/gen}/google/protobuf/duration_pb.d.ts +6 -18
  212. package/dist/esm/wkt/gen/google/protobuf/duration_pb.js +19 -0
  213. package/dist/esm/wkt/gen/google/protobuf/empty_pb.d.ts +17 -0
  214. package/dist/esm/wkt/gen/google/protobuf/empty_pb.js +19 -0
  215. package/dist/{cjs → esm/wkt/gen}/google/protobuf/field_mask_pb.d.ts +6 -18
  216. package/dist/esm/wkt/gen/google/protobuf/field_mask_pb.js +19 -0
  217. package/dist/esm/wkt/gen/google/protobuf/source_context_pb.d.ts +19 -0
  218. package/dist/esm/wkt/gen/google/protobuf/source_context_pb.js +19 -0
  219. package/dist/{cjs → esm/wkt/gen}/google/protobuf/struct_pb.d.ts +28 -57
  220. package/dist/esm/wkt/gen/google/protobuf/struct_pb.js +45 -0
  221. package/dist/{cjs → esm/wkt/gen}/google/protobuf/timestamp_pb.d.ts +6 -21
  222. package/dist/esm/wkt/gen/google/protobuf/timestamp_pb.js +19 -0
  223. package/dist/{cjs → esm/wkt/gen}/google/protobuf/type_pb.d.ts +47 -82
  224. package/dist/esm/wkt/gen/google/protobuf/type_pb.js +220 -0
  225. package/dist/esm/wkt/gen/google/protobuf/wrappers_pb.d.ts +147 -0
  226. package/dist/esm/wkt/gen/google/protobuf/wrappers_pb.js +43 -0
  227. package/dist/esm/wkt/index.d.ts +15 -0
  228. package/dist/esm/wkt/index.js +28 -0
  229. package/dist/esm/wkt/timestamp.d.ts +21 -0
  230. package/dist/esm/wkt/timestamp.js +50 -0
  231. package/dist/esm/wkt/wrappers.d.ts +15 -0
  232. package/dist/esm/wkt/wrappers.js +38 -0
  233. package/package.json +39 -7
  234. package/dist/cjs/binary-encoding.d.ts +0 -420
  235. package/dist/cjs/binary-format.d.ts +0 -113
  236. package/dist/cjs/codegen-info.d.ts +0 -33
  237. package/dist/cjs/codegen-info.js +0 -69
  238. package/dist/cjs/create-descriptor-set.d.ts +0 -36
  239. package/dist/cjs/create-descriptor-set.js +0 -910
  240. package/dist/cjs/create-registry-from-desc.d.ts +0 -15
  241. package/dist/cjs/create-registry-from-desc.js +0 -264
  242. package/dist/cjs/create-registry.d.ts +0 -9
  243. package/dist/cjs/create-registry.js +0 -94
  244. package/dist/cjs/enum.d.ts +0 -35
  245. package/dist/cjs/extension-accessor.js +0 -114
  246. package/dist/cjs/extension.d.ts +0 -24
  247. package/dist/cjs/field-list.d.ts +0 -27
  248. package/dist/cjs/field-list.js +0 -15
  249. package/dist/cjs/field.d.ts +0 -314
  250. package/dist/cjs/field.js +0 -15
  251. package/dist/cjs/google/protobuf/any_pb.js +0 -273
  252. package/dist/cjs/google/protobuf/api_pb.js +0 -316
  253. package/dist/cjs/google/protobuf/compiler/plugin_pb.js +0 -219
  254. package/dist/cjs/google/protobuf/descriptor_pb.js +0 -2034
  255. package/dist/cjs/google/protobuf/duration_pb.js +0 -169
  256. package/dist/cjs/google/protobuf/empty_pb.d.ts +0 -28
  257. package/dist/cjs/google/protobuf/empty_pb.js +0 -52
  258. package/dist/cjs/google/protobuf/field_mask_pb.js +0 -311
  259. package/dist/cjs/google/protobuf/source_context_pb.d.ts +0 -29
  260. package/dist/cjs/google/protobuf/source_context_pb.js +0 -55
  261. package/dist/cjs/google/protobuf/struct_pb.js +0 -240
  262. package/dist/cjs/google/protobuf/timestamp_pb.js +0 -213
  263. package/dist/cjs/google/protobuf/type_pb.js +0 -562
  264. package/dist/cjs/google/protobuf/wrappers_pb.d.ts +0 -267
  265. package/dist/cjs/google/protobuf/wrappers_pb.js +0 -569
  266. package/dist/cjs/json-format.d.ts +0 -111
  267. package/dist/cjs/json-format.js +0 -15
  268. package/dist/cjs/message-type.d.ts +0 -51
  269. package/dist/cjs/message-type.js +0 -15
  270. package/dist/cjs/message.d.ts +0 -130
  271. package/dist/cjs/message.js +0 -128
  272. package/dist/cjs/private/binary-format.d.ts +0 -7
  273. package/dist/cjs/private/binary-format.js +0 -430
  274. package/dist/cjs/private/enum.d.ts +0 -27
  275. package/dist/cjs/private/enum.js +0 -94
  276. package/dist/cjs/private/extensions.d.ts +0 -34
  277. package/dist/cjs/private/extensions.js +0 -86
  278. package/dist/cjs/private/feature-set.d.ts +0 -19
  279. package/dist/cjs/private/feature-set.js +0 -106
  280. package/dist/cjs/private/field-list.d.ts +0 -18
  281. package/dist/cjs/private/field-list.js +0 -76
  282. package/dist/cjs/private/field-normalize.d.ts +0 -9
  283. package/dist/cjs/private/field-normalize.js +0 -69
  284. package/dist/cjs/private/field-wrapper.d.ts +0 -25
  285. package/dist/cjs/private/field-wrapper.js +0 -57
  286. package/dist/cjs/private/field.d.ts +0 -16
  287. package/dist/cjs/private/field.js +0 -45
  288. package/dist/cjs/private/json-format.d.ts +0 -2
  289. package/dist/cjs/private/json-format.js +0 -626
  290. package/dist/cjs/private/message-type.d.ts +0 -18
  291. package/dist/cjs/private/message-type.js +0 -50
  292. package/dist/cjs/private/names.d.ts +0 -43
  293. package/dist/cjs/private/names.js +0 -278
  294. package/dist/cjs/private/options-map.d.ts +0 -7
  295. package/dist/cjs/private/options-map.js +0 -15
  296. package/dist/cjs/private/proto-runtime.d.ts +0 -53
  297. package/dist/cjs/private/proto-runtime.js +0 -41
  298. package/dist/cjs/private/reflect.d.ts +0 -9
  299. package/dist/cjs/private/reflect.js +0 -79
  300. package/dist/cjs/private/reify-wkt.d.ts +0 -102
  301. package/dist/cjs/private/reify-wkt.js +0 -172
  302. package/dist/cjs/private/scalars.d.ts +0 -18
  303. package/dist/cjs/private/scalars.js +0 -105
  304. package/dist/cjs/private/text-format.d.ts +0 -4
  305. package/dist/cjs/private/util-common.d.ts +0 -2
  306. package/dist/cjs/private/util-common.js +0 -234
  307. package/dist/cjs/private/util.d.ts +0 -38
  308. package/dist/cjs/private/util.js +0 -15
  309. package/dist/cjs/proto-base64.d.ts +0 -18
  310. package/dist/cjs/proto-base64.js +0 -128
  311. package/dist/cjs/proto-delimited.d.ts +0 -54
  312. package/dist/cjs/proto-delimited.js +0 -155
  313. package/dist/cjs/proto-double.d.ts +0 -5
  314. package/dist/cjs/proto2.d.ts +0 -4
  315. package/dist/cjs/proto2.js +0 -53
  316. package/dist/cjs/proto3.d.ts +0 -4
  317. package/dist/cjs/proto3.js +0 -56
  318. package/dist/cjs/scalar.js +0 -81
  319. package/dist/cjs/service-type.d.ts +0 -96
  320. package/dist/cjs/service-type.js +0 -53
  321. package/dist/cjs/to-plain-message.d.ts +0 -12
  322. package/dist/cjs/to-plain-message.js +0 -72
  323. package/dist/cjs/type-registry.d.ts +0 -57
  324. package/dist/cjs/type-registry.js +0 -15
  325. package/dist/esm/binary-encoding.d.ts +0 -420
  326. package/dist/esm/binary-format.d.ts +0 -113
  327. package/dist/esm/codegen-info.d.ts +0 -33
  328. package/dist/esm/codegen-info.js +0 -67
  329. package/dist/esm/create-descriptor-set.d.ts +0 -36
  330. package/dist/esm/create-descriptor-set.js +0 -906
  331. package/dist/esm/create-registry-from-desc.d.ts +0 -15
  332. package/dist/esm/create-registry-from-desc.js +0 -261
  333. package/dist/esm/create-registry.d.ts +0 -9
  334. package/dist/esm/create-registry.js +0 -90
  335. package/dist/esm/descriptor-set.js +0 -14
  336. package/dist/esm/enum.d.ts +0 -35
  337. package/dist/esm/extension-accessor.js +0 -107
  338. package/dist/esm/extension.d.ts +0 -24
  339. package/dist/esm/field-list.d.ts +0 -27
  340. package/dist/esm/field.d.ts +0 -314
  341. package/dist/esm/field.js +0 -14
  342. package/dist/esm/google/protobuf/any_pb.js +0 -269
  343. package/dist/esm/google/protobuf/api_pb.js +0 -310
  344. package/dist/esm/google/protobuf/compiler/plugin_pb.js +0 -212
  345. package/dist/esm/google/protobuf/descriptor_pb.js +0 -1999
  346. package/dist/esm/google/protobuf/duration_pb.js +0 -165
  347. package/dist/esm/google/protobuf/empty_pb.d.ts +0 -28
  348. package/dist/esm/google/protobuf/empty_pb.js +0 -48
  349. package/dist/esm/google/protobuf/field_mask_pb.js +0 -307
  350. package/dist/esm/google/protobuf/source_context_pb.d.ts +0 -29
  351. package/dist/esm/google/protobuf/source_context_pb.js +0 -51
  352. package/dist/esm/google/protobuf/struct_pb.js +0 -234
  353. package/dist/esm/google/protobuf/timestamp_pb.js +0 -209
  354. package/dist/esm/google/protobuf/type_pb.js +0 -554
  355. package/dist/esm/google/protobuf/wrappers_pb.d.ts +0 -267
  356. package/dist/esm/google/protobuf/wrappers_pb.js +0 -557
  357. package/dist/esm/json-format.d.ts +0 -111
  358. package/dist/esm/json-format.js +0 -14
  359. package/dist/esm/message-type.d.ts +0 -51
  360. package/dist/esm/message-type.js +0 -14
  361. package/dist/esm/message.d.ts +0 -130
  362. package/dist/esm/message.js +0 -124
  363. package/dist/esm/private/binary-format.d.ts +0 -7
  364. package/dist/esm/private/binary-format.js +0 -426
  365. package/dist/esm/private/enum.d.ts +0 -27
  366. package/dist/esm/private/enum.js +0 -87
  367. package/dist/esm/private/extensions.d.ts +0 -34
  368. package/dist/esm/private/extensions.js +0 -81
  369. package/dist/esm/private/feature-set.d.ts +0 -19
  370. package/dist/esm/private/feature-set.js +0 -102
  371. package/dist/esm/private/field-list.d.ts +0 -18
  372. package/dist/esm/private/field-list.js +0 -72
  373. package/dist/esm/private/field-normalize.d.ts +0 -9
  374. package/dist/esm/private/field-normalize.js +0 -65
  375. package/dist/esm/private/field-wrapper.d.ts +0 -25
  376. package/dist/esm/private/field-wrapper.js +0 -53
  377. package/dist/esm/private/field.d.ts +0 -16
  378. package/dist/esm/private/field.js +0 -41
  379. package/dist/esm/private/json-format.d.ts +0 -2
  380. package/dist/esm/private/json-format.js +0 -623
  381. package/dist/esm/private/message-type.d.ts +0 -18
  382. package/dist/esm/private/message-type.js +0 -46
  383. package/dist/esm/private/names.d.ts +0 -43
  384. package/dist/esm/private/names.js +0 -269
  385. package/dist/esm/private/options-map.d.ts +0 -7
  386. package/dist/esm/private/options-map.js +0 -14
  387. package/dist/esm/private/proto-runtime.d.ts +0 -53
  388. package/dist/esm/private/proto-runtime.js +0 -37
  389. package/dist/esm/private/reflect.d.ts +0 -9
  390. package/dist/esm/private/reflect.js +0 -74
  391. package/dist/esm/private/reify-wkt.d.ts +0 -102
  392. package/dist/esm/private/reify-wkt.js +0 -168
  393. package/dist/esm/private/scalars.d.ts +0 -18
  394. package/dist/esm/private/scalars.js +0 -99
  395. package/dist/esm/private/text-format.d.ts +0 -4
  396. package/dist/esm/private/util-common.d.ts +0 -2
  397. package/dist/esm/private/util-common.js +0 -231
  398. package/dist/esm/private/util.d.ts +0 -38
  399. package/dist/esm/private/util.js +0 -14
  400. package/dist/esm/proto-base64.d.ts +0 -18
  401. package/dist/esm/proto-base64.js +0 -125
  402. package/dist/esm/proto-delimited.d.ts +0 -54
  403. package/dist/esm/proto-delimited.js +0 -152
  404. package/dist/esm/proto-double.d.ts +0 -5
  405. package/dist/esm/proto-double.js +0 -26
  406. package/dist/esm/proto2.d.ts +0 -4
  407. package/dist/esm/proto2.js +0 -50
  408. package/dist/esm/proto3.d.ts +0 -4
  409. package/dist/esm/proto3.js +0 -53
  410. package/dist/esm/scalar.js +0 -78
  411. package/dist/esm/service-type.d.ts +0 -96
  412. package/dist/esm/service-type.js +0 -50
  413. package/dist/esm/to-plain-message.d.ts +0 -12
  414. package/dist/esm/to-plain-message.js +0 -70
  415. package/dist/esm/type-registry.d.ts +0 -57
  416. package/dist/esm/type-registry.js +0 -14
  417. /package/dist/cjs/{binary-format.js → desc-types.js} +0 -0
  418. /package/dist/cjs/{descriptor-set.js → json-value.js} +0 -0
  419. /package/dist/cjs/{private → reflect}/assert.d.ts +0 -0
  420. /package/dist/cjs/{private → reflect}/assert.js +0 -0
  421. /package/dist/cjs/{enum.js → types.js} +0 -0
  422. /package/dist/esm/{binary-format.js → desc-types.js} +0 -0
  423. /package/dist/esm/{enum.js → json-value.js} +0 -0
  424. /package/dist/esm/{private → reflect}/assert.d.ts +0 -0
  425. /package/dist/esm/{private → reflect}/assert.js +0 -0
  426. /package/dist/esm/{extension.js → types.js} +0 -0
@@ -1,169 +0,0 @@
1
- "use strict";
2
- // Copyright 2021-2024 Buf Technologies, Inc.
3
- //
4
- // Licensed under the Apache License, Version 2.0 (the "License");
5
- // you may not use this file except in compliance with the License.
6
- // You may obtain a copy of the License at
7
- //
8
- // http://www.apache.org/licenses/LICENSE-2.0
9
- //
10
- // Unless required by applicable law or agreed to in writing, software
11
- // distributed under the License is distributed on an "AS IS" BASIS,
12
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- // See the License for the specific language governing permissions and
14
- // limitations under the License.
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.Duration = void 0;
17
- const message_js_1 = require("../../message.js");
18
- const proto_int64_js_1 = require("../../proto-int64.js");
19
- const proto3_js_1 = require("../../proto3.js");
20
- /**
21
- * A Duration represents a signed, fixed-length span of time represented
22
- * as a count of seconds and fractions of seconds at nanosecond
23
- * resolution. It is independent of any calendar and concepts like "day"
24
- * or "month". It is related to Timestamp in that the difference between
25
- * two Timestamp values is a Duration and it can be added or subtracted
26
- * from a Timestamp. Range is approximately +-10,000 years.
27
- *
28
- * # Examples
29
- *
30
- * Example 1: Compute Duration from two Timestamps in pseudo code.
31
- *
32
- * Timestamp start = ...;
33
- * Timestamp end = ...;
34
- * Duration duration = ...;
35
- *
36
- * duration.seconds = end.seconds - start.seconds;
37
- * duration.nanos = end.nanos - start.nanos;
38
- *
39
- * if (duration.seconds < 0 && duration.nanos > 0) {
40
- * duration.seconds += 1;
41
- * duration.nanos -= 1000000000;
42
- * } else if (duration.seconds > 0 && duration.nanos < 0) {
43
- * duration.seconds -= 1;
44
- * duration.nanos += 1000000000;
45
- * }
46
- *
47
- * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
48
- *
49
- * Timestamp start = ...;
50
- * Duration duration = ...;
51
- * Timestamp end = ...;
52
- *
53
- * end.seconds = start.seconds + duration.seconds;
54
- * end.nanos = start.nanos + duration.nanos;
55
- *
56
- * if (end.nanos < 0) {
57
- * end.seconds -= 1;
58
- * end.nanos += 1000000000;
59
- * } else if (end.nanos >= 1000000000) {
60
- * end.seconds += 1;
61
- * end.nanos -= 1000000000;
62
- * }
63
- *
64
- * Example 3: Compute Duration from datetime.timedelta in Python.
65
- *
66
- * td = datetime.timedelta(days=3, minutes=10)
67
- * duration = Duration()
68
- * duration.FromTimedelta(td)
69
- *
70
- * # JSON Mapping
71
- *
72
- * In JSON format, the Duration type is encoded as a string rather than an
73
- * object, where the string ends in the suffix "s" (indicating seconds) and
74
- * is preceded by the number of seconds, with nanoseconds expressed as
75
- * fractional seconds. For example, 3 seconds with 0 nanoseconds should be
76
- * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
77
- * be expressed in JSON format as "3.000000001s", and 3 seconds and 1
78
- * microsecond should be expressed in JSON format as "3.000001s".
79
- *
80
- *
81
- * @generated from message google.protobuf.Duration
82
- */
83
- class Duration extends message_js_1.Message {
84
- constructor(data) {
85
- super();
86
- /**
87
- * Signed seconds of the span of time. Must be from -315,576,000,000
88
- * to +315,576,000,000 inclusive. Note: these bounds are computed from:
89
- * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
90
- *
91
- * @generated from field: int64 seconds = 1;
92
- */
93
- this.seconds = proto_int64_js_1.protoInt64.zero;
94
- /**
95
- * Signed fractions of a second at nanosecond resolution of the span
96
- * of time. Durations less than one second are represented with a 0
97
- * `seconds` field and a positive or negative `nanos` field. For durations
98
- * of one second or more, a non-zero value for the `nanos` field must be
99
- * of the same sign as the `seconds` field. Must be from -999,999,999
100
- * to +999,999,999 inclusive.
101
- *
102
- * @generated from field: int32 nanos = 2;
103
- */
104
- this.nanos = 0;
105
- proto3_js_1.proto3.util.initPartial(data, this);
106
- }
107
- fromJson(json, options) {
108
- if (typeof json !== "string") {
109
- throw new Error(`cannot decode google.protobuf.Duration from JSON: ${proto3_js_1.proto3.json.debug(json)}`);
110
- }
111
- const match = json.match(/^(-?[0-9]+)(?:\.([0-9]+))?s/);
112
- if (match === null) {
113
- throw new Error(`cannot decode google.protobuf.Duration from JSON: ${proto3_js_1.proto3.json.debug(json)}`);
114
- }
115
- const longSeconds = Number(match[1]);
116
- if (longSeconds > 315576000000 || longSeconds < -315576000000) {
117
- throw new Error(`cannot decode google.protobuf.Duration from JSON: ${proto3_js_1.proto3.json.debug(json)}`);
118
- }
119
- this.seconds = proto_int64_js_1.protoInt64.parse(longSeconds);
120
- if (typeof match[2] == "string") {
121
- const nanosStr = match[2] + "0".repeat(9 - match[2].length);
122
- this.nanos = parseInt(nanosStr);
123
- if (longSeconds < 0 || Object.is(longSeconds, -0)) {
124
- this.nanos = -this.nanos;
125
- }
126
- }
127
- return this;
128
- }
129
- toJson(options) {
130
- if (Number(this.seconds) > 315576000000 || Number(this.seconds) < -315576000000) {
131
- throw new Error(`cannot encode google.protobuf.Duration to JSON: value out of range`);
132
- }
133
- let text = this.seconds.toString();
134
- if (this.nanos !== 0) {
135
- let nanosStr = Math.abs(this.nanos).toString();
136
- nanosStr = "0".repeat(9 - nanosStr.length) + nanosStr;
137
- if (nanosStr.substring(3) === "000000") {
138
- nanosStr = nanosStr.substring(0, 3);
139
- }
140
- else if (nanosStr.substring(6) === "000") {
141
- nanosStr = nanosStr.substring(0, 6);
142
- }
143
- text += "." + nanosStr;
144
- if (this.nanos < 0 && Number(this.seconds) == 0) {
145
- text = "-" + text;
146
- }
147
- }
148
- return text + "s";
149
- }
150
- static fromBinary(bytes, options) {
151
- return new Duration().fromBinary(bytes, options);
152
- }
153
- static fromJson(jsonValue, options) {
154
- return new Duration().fromJson(jsonValue, options);
155
- }
156
- static fromJsonString(jsonString, options) {
157
- return new Duration().fromJsonString(jsonString, options);
158
- }
159
- static equals(a, b) {
160
- return proto3_js_1.proto3.util.equals(Duration, a, b);
161
- }
162
- }
163
- exports.Duration = Duration;
164
- Duration.runtime = proto3_js_1.proto3;
165
- Duration.typeName = "google.protobuf.Duration";
166
- Duration.fields = proto3_js_1.proto3.util.newFieldList(() => [
167
- { no: 1, name: "seconds", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
168
- { no: 2, name: "nanos", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
169
- ]);
@@ -1,28 +0,0 @@
1
- import type { PartialMessage, PlainMessage } from "../../message.js";
2
- import { Message } from "../../message.js";
3
- import { proto3 } from "../../proto3.js";
4
- import type { FieldList } from "../../field-list.js";
5
- import type { BinaryReadOptions } from "../../binary-format.js";
6
- import type { JsonReadOptions, JsonValue } from "../../json-format.js";
7
- /**
8
- * A generic empty message that you can re-use to avoid defining duplicated
9
- * empty messages in your APIs. A typical example is to use it as the request
10
- * or the response type of an API method. For instance:
11
- *
12
- * service Foo {
13
- * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
14
- * }
15
- *
16
- *
17
- * @generated from message google.protobuf.Empty
18
- */
19
- export declare class Empty extends Message<Empty> {
20
- constructor(data?: PartialMessage<Empty>);
21
- static readonly runtime: typeof proto3;
22
- static readonly typeName = "google.protobuf.Empty";
23
- static readonly fields: FieldList;
24
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Empty;
25
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Empty;
26
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Empty;
27
- static equals(a: Empty | PlainMessage<Empty> | undefined, b: Empty | PlainMessage<Empty> | undefined): boolean;
28
- }
@@ -1,52 +0,0 @@
1
- "use strict";
2
- // Copyright 2021-2024 Buf Technologies, Inc.
3
- //
4
- // Licensed under the Apache License, Version 2.0 (the "License");
5
- // you may not use this file except in compliance with the License.
6
- // You may obtain a copy of the License at
7
- //
8
- // http://www.apache.org/licenses/LICENSE-2.0
9
- //
10
- // Unless required by applicable law or agreed to in writing, software
11
- // distributed under the License is distributed on an "AS IS" BASIS,
12
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- // See the License for the specific language governing permissions and
14
- // limitations under the License.
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.Empty = void 0;
17
- const message_js_1 = require("../../message.js");
18
- const proto3_js_1 = require("../../proto3.js");
19
- /**
20
- * A generic empty message that you can re-use to avoid defining duplicated
21
- * empty messages in your APIs. A typical example is to use it as the request
22
- * or the response type of an API method. For instance:
23
- *
24
- * service Foo {
25
- * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
26
- * }
27
- *
28
- *
29
- * @generated from message google.protobuf.Empty
30
- */
31
- class Empty extends message_js_1.Message {
32
- constructor(data) {
33
- super();
34
- proto3_js_1.proto3.util.initPartial(data, this);
35
- }
36
- static fromBinary(bytes, options) {
37
- return new Empty().fromBinary(bytes, options);
38
- }
39
- static fromJson(jsonValue, options) {
40
- return new Empty().fromJson(jsonValue, options);
41
- }
42
- static fromJsonString(jsonString, options) {
43
- return new Empty().fromJsonString(jsonString, options);
44
- }
45
- static equals(a, b) {
46
- return proto3_js_1.proto3.util.equals(Empty, a, b);
47
- }
48
- }
49
- exports.Empty = Empty;
50
- Empty.runtime = proto3_js_1.proto3;
51
- Empty.typeName = "google.protobuf.Empty";
52
- Empty.fields = proto3_js_1.proto3.util.newFieldList(() => []);
@@ -1,311 +0,0 @@
1
- "use strict";
2
- // Copyright 2021-2024 Buf Technologies, Inc.
3
- //
4
- // Licensed under the Apache License, Version 2.0 (the "License");
5
- // you may not use this file except in compliance with the License.
6
- // You may obtain a copy of the License at
7
- //
8
- // http://www.apache.org/licenses/LICENSE-2.0
9
- //
10
- // Unless required by applicable law or agreed to in writing, software
11
- // distributed under the License is distributed on an "AS IS" BASIS,
12
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- // See the License for the specific language governing permissions and
14
- // limitations under the License.
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.FieldMask = void 0;
17
- const message_js_1 = require("../../message.js");
18
- const proto3_js_1 = require("../../proto3.js");
19
- /**
20
- * `FieldMask` represents a set of symbolic field paths, for example:
21
- *
22
- * paths: "f.a"
23
- * paths: "f.b.d"
24
- *
25
- * Here `f` represents a field in some root message, `a` and `b`
26
- * fields in the message found in `f`, and `d` a field found in the
27
- * message in `f.b`.
28
- *
29
- * Field masks are used to specify a subset of fields that should be
30
- * returned by a get operation or modified by an update operation.
31
- * Field masks also have a custom JSON encoding (see below).
32
- *
33
- * # Field Masks in Projections
34
- *
35
- * When used in the context of a projection, a response message or
36
- * sub-message is filtered by the API to only contain those fields as
37
- * specified in the mask. For example, if the mask in the previous
38
- * example is applied to a response message as follows:
39
- *
40
- * f {
41
- * a : 22
42
- * b {
43
- * d : 1
44
- * x : 2
45
- * }
46
- * y : 13
47
- * }
48
- * z: 8
49
- *
50
- * The result will not contain specific values for fields x,y and z
51
- * (their value will be set to the default, and omitted in proto text
52
- * output):
53
- *
54
- *
55
- * f {
56
- * a : 22
57
- * b {
58
- * d : 1
59
- * }
60
- * }
61
- *
62
- * A repeated field is not allowed except at the last position of a
63
- * paths string.
64
- *
65
- * If a FieldMask object is not present in a get operation, the
66
- * operation applies to all fields (as if a FieldMask of all fields
67
- * had been specified).
68
- *
69
- * Note that a field mask does not necessarily apply to the
70
- * top-level response message. In case of a REST get operation, the
71
- * field mask applies directly to the response, but in case of a REST
72
- * list operation, the mask instead applies to each individual message
73
- * in the returned resource list. In case of a REST custom method,
74
- * other definitions may be used. Where the mask applies will be
75
- * clearly documented together with its declaration in the API. In
76
- * any case, the effect on the returned resource/resources is required
77
- * behavior for APIs.
78
- *
79
- * # Field Masks in Update Operations
80
- *
81
- * A field mask in update operations specifies which fields of the
82
- * targeted resource are going to be updated. The API is required
83
- * to only change the values of the fields as specified in the mask
84
- * and leave the others untouched. If a resource is passed in to
85
- * describe the updated values, the API ignores the values of all
86
- * fields not covered by the mask.
87
- *
88
- * If a repeated field is specified for an update operation, new values will
89
- * be appended to the existing repeated field in the target resource. Note that
90
- * a repeated field is only allowed in the last position of a `paths` string.
91
- *
92
- * If a sub-message is specified in the last position of the field mask for an
93
- * update operation, then new value will be merged into the existing sub-message
94
- * in the target resource.
95
- *
96
- * For example, given the target message:
97
- *
98
- * f {
99
- * b {
100
- * d: 1
101
- * x: 2
102
- * }
103
- * c: [1]
104
- * }
105
- *
106
- * And an update message:
107
- *
108
- * f {
109
- * b {
110
- * d: 10
111
- * }
112
- * c: [2]
113
- * }
114
- *
115
- * then if the field mask is:
116
- *
117
- * paths: ["f.b", "f.c"]
118
- *
119
- * then the result will be:
120
- *
121
- * f {
122
- * b {
123
- * d: 10
124
- * x: 2
125
- * }
126
- * c: [1, 2]
127
- * }
128
- *
129
- * An implementation may provide options to override this default behavior for
130
- * repeated and message fields.
131
- *
132
- * In order to reset a field's value to the default, the field must
133
- * be in the mask and set to the default value in the provided resource.
134
- * Hence, in order to reset all fields of a resource, provide a default
135
- * instance of the resource and set all fields in the mask, or do
136
- * not provide a mask as described below.
137
- *
138
- * If a field mask is not present on update, the operation applies to
139
- * all fields (as if a field mask of all fields has been specified).
140
- * Note that in the presence of schema evolution, this may mean that
141
- * fields the client does not know and has therefore not filled into
142
- * the request will be reset to their default. If this is unwanted
143
- * behavior, a specific service may require a client to always specify
144
- * a field mask, producing an error if not.
145
- *
146
- * As with get operations, the location of the resource which
147
- * describes the updated values in the request message depends on the
148
- * operation kind. In any case, the effect of the field mask is
149
- * required to be honored by the API.
150
- *
151
- * ## Considerations for HTTP REST
152
- *
153
- * The HTTP kind of an update operation which uses a field mask must
154
- * be set to PATCH instead of PUT in order to satisfy HTTP semantics
155
- * (PUT must only be used for full updates).
156
- *
157
- * # JSON Encoding of Field Masks
158
- *
159
- * In JSON, a field mask is encoded as a single string where paths are
160
- * separated by a comma. Fields name in each path are converted
161
- * to/from lower-camel naming conventions.
162
- *
163
- * As an example, consider the following message declarations:
164
- *
165
- * message Profile {
166
- * User user = 1;
167
- * Photo photo = 2;
168
- * }
169
- * message User {
170
- * string display_name = 1;
171
- * string address = 2;
172
- * }
173
- *
174
- * In proto a field mask for `Profile` may look as such:
175
- *
176
- * mask {
177
- * paths: "user.display_name"
178
- * paths: "photo"
179
- * }
180
- *
181
- * In JSON, the same mask is represented as below:
182
- *
183
- * {
184
- * mask: "user.displayName,photo"
185
- * }
186
- *
187
- * # Field Masks and Oneof Fields
188
- *
189
- * Field masks treat fields in oneofs just as regular fields. Consider the
190
- * following message:
191
- *
192
- * message SampleMessage {
193
- * oneof test_oneof {
194
- * string name = 4;
195
- * SubMessage sub_message = 9;
196
- * }
197
- * }
198
- *
199
- * The field mask can be:
200
- *
201
- * mask {
202
- * paths: "name"
203
- * }
204
- *
205
- * Or:
206
- *
207
- * mask {
208
- * paths: "sub_message"
209
- * }
210
- *
211
- * Note that oneof type names ("test_oneof" in this case) cannot be used in
212
- * paths.
213
- *
214
- * ## Field Mask Verification
215
- *
216
- * The implementation of any API method which has a FieldMask type field in the
217
- * request should verify the included field paths, and return an
218
- * `INVALID_ARGUMENT` error if any path is unmappable.
219
- *
220
- * @generated from message google.protobuf.FieldMask
221
- */
222
- class FieldMask extends message_js_1.Message {
223
- constructor(data) {
224
- super();
225
- /**
226
- * The set of field mask paths.
227
- *
228
- * @generated from field: repeated string paths = 1;
229
- */
230
- this.paths = [];
231
- proto3_js_1.proto3.util.initPartial(data, this);
232
- }
233
- toJson(options) {
234
- // Converts snake_case to protoCamelCase according to the convention
235
- // used by protoc to convert a field name to a JSON name.
236
- function protoCamelCase(snakeCase) {
237
- let capNext = false;
238
- const b = [];
239
- for (let i = 0; i < snakeCase.length; i++) {
240
- let c = snakeCase.charAt(i);
241
- switch (c) {
242
- case '_':
243
- capNext = true;
244
- break;
245
- case '0':
246
- case '1':
247
- case '2':
248
- case '3':
249
- case '4':
250
- case '5':
251
- case '6':
252
- case '7':
253
- case '8':
254
- case '9':
255
- b.push(c);
256
- capNext = false;
257
- break;
258
- default:
259
- if (capNext) {
260
- capNext = false;
261
- c = c.toUpperCase();
262
- }
263
- b.push(c);
264
- break;
265
- }
266
- }
267
- return b.join('');
268
- }
269
- return this.paths.map(p => {
270
- if (p.match(/_[0-9]?_/g) || p.match(/[A-Z]/g)) {
271
- throw new Error("cannot encode google.protobuf.FieldMask to JSON: lowerCamelCase of path name \"" + p + "\" is irreversible");
272
- }
273
- return protoCamelCase(p);
274
- }).join(",");
275
- }
276
- fromJson(json, options) {
277
- if (typeof json !== "string") {
278
- throw new Error("cannot decode google.protobuf.FieldMask from JSON: " + proto3_js_1.proto3.json.debug(json));
279
- }
280
- if (json === "") {
281
- return this;
282
- }
283
- function camelToSnake(str) {
284
- if (str.includes("_")) {
285
- throw new Error("cannot decode google.protobuf.FieldMask from JSON: path names must be lowerCamelCase");
286
- }
287
- const sc = str.replace(/[A-Z]/g, letter => "_" + letter.toLowerCase());
288
- return (sc[0] === "_") ? sc.substring(1) : sc;
289
- }
290
- this.paths = json.split(",").map(camelToSnake);
291
- return this;
292
- }
293
- static fromBinary(bytes, options) {
294
- return new FieldMask().fromBinary(bytes, options);
295
- }
296
- static fromJson(jsonValue, options) {
297
- return new FieldMask().fromJson(jsonValue, options);
298
- }
299
- static fromJsonString(jsonString, options) {
300
- return new FieldMask().fromJsonString(jsonString, options);
301
- }
302
- static equals(a, b) {
303
- return proto3_js_1.proto3.util.equals(FieldMask, a, b);
304
- }
305
- }
306
- exports.FieldMask = FieldMask;
307
- FieldMask.runtime = proto3_js_1.proto3;
308
- FieldMask.typeName = "google.protobuf.FieldMask";
309
- FieldMask.fields = proto3_js_1.proto3.util.newFieldList(() => [
310
- { no: 1, name: "paths", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
311
- ]);
@@ -1,29 +0,0 @@
1
- import type { PartialMessage, PlainMessage } from "../../message.js";
2
- import { Message } from "../../message.js";
3
- import { proto3 } from "../../proto3.js";
4
- import type { FieldList } from "../../field-list.js";
5
- import type { BinaryReadOptions } from "../../binary-format.js";
6
- import type { JsonReadOptions, JsonValue } from "../../json-format.js";
7
- /**
8
- * `SourceContext` represents information about the source of a
9
- * protobuf element, like the file in which it is defined.
10
- *
11
- * @generated from message google.protobuf.SourceContext
12
- */
13
- export declare class SourceContext extends Message<SourceContext> {
14
- /**
15
- * The path-qualified name of the .proto file that contained the associated
16
- * protobuf element. For example: `"google/protobuf/source_context.proto"`.
17
- *
18
- * @generated from field: string file_name = 1;
19
- */
20
- fileName: string;
21
- constructor(data?: PartialMessage<SourceContext>);
22
- static readonly runtime: typeof proto3;
23
- static readonly typeName = "google.protobuf.SourceContext";
24
- static readonly fields: FieldList;
25
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SourceContext;
26
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SourceContext;
27
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SourceContext;
28
- static equals(a: SourceContext | PlainMessage<SourceContext> | undefined, b: SourceContext | PlainMessage<SourceContext> | undefined): boolean;
29
- }
@@ -1,55 +0,0 @@
1
- "use strict";
2
- // Copyright 2021-2024 Buf Technologies, Inc.
3
- //
4
- // Licensed under the Apache License, Version 2.0 (the "License");
5
- // you may not use this file except in compliance with the License.
6
- // You may obtain a copy of the License at
7
- //
8
- // http://www.apache.org/licenses/LICENSE-2.0
9
- //
10
- // Unless required by applicable law or agreed to in writing, software
11
- // distributed under the License is distributed on an "AS IS" BASIS,
12
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- // See the License for the specific language governing permissions and
14
- // limitations under the License.
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.SourceContext = void 0;
17
- const message_js_1 = require("../../message.js");
18
- const proto3_js_1 = require("../../proto3.js");
19
- /**
20
- * `SourceContext` represents information about the source of a
21
- * protobuf element, like the file in which it is defined.
22
- *
23
- * @generated from message google.protobuf.SourceContext
24
- */
25
- class SourceContext extends message_js_1.Message {
26
- constructor(data) {
27
- super();
28
- /**
29
- * The path-qualified name of the .proto file that contained the associated
30
- * protobuf element. For example: `"google/protobuf/source_context.proto"`.
31
- *
32
- * @generated from field: string file_name = 1;
33
- */
34
- this.fileName = "";
35
- proto3_js_1.proto3.util.initPartial(data, this);
36
- }
37
- static fromBinary(bytes, options) {
38
- return new SourceContext().fromBinary(bytes, options);
39
- }
40
- static fromJson(jsonValue, options) {
41
- return new SourceContext().fromJson(jsonValue, options);
42
- }
43
- static fromJsonString(jsonString, options) {
44
- return new SourceContext().fromJsonString(jsonString, options);
45
- }
46
- static equals(a, b) {
47
- return proto3_js_1.proto3.util.equals(SourceContext, a, b);
48
- }
49
- }
50
- exports.SourceContext = SourceContext;
51
- SourceContext.runtime = proto3_js_1.proto3;
52
- SourceContext.typeName = "google.protobuf.SourceContext";
53
- SourceContext.fields = proto3_js_1.proto3.util.newFieldList(() => [
54
- { no: 1, name: "file_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
55
- ]);