@countinghouse/ch-local 0.0.0-stage → 1.0.0

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 (262) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +361 -2
  3. package/bin/ch-local.js +472 -0
  4. package/clients/claude-code/.claude-plugin/plugin.json +6 -0
  5. package/clients/claude-code/.mcp.json +11 -0
  6. package/clients/claude-code/bin/launch.js +235 -0
  7. package/clients/claude-code/bin/win-acl.js +420 -0
  8. package/clients/claude-code/skills/ci-failure-triage/SKILL.md +21 -0
  9. package/clients/claude-code/skills/countinghouse-module/SKILL.md +177 -0
  10. package/clients/claude-code/skills/countinghouse-setup/SKILL.md +74 -0
  11. package/lib/allowlist.js +65 -0
  12. package/lib/aside.js +16 -0
  13. package/lib/atomic.js +45 -0
  14. package/lib/auto-apply.js +245 -0
  15. package/lib/auto-upgrade.js +98 -0
  16. package/lib/availability.js +307 -0
  17. package/lib/ceiling.js +280 -0
  18. package/lib/clean-text.js +20 -0
  19. package/lib/cli-change.js +38 -0
  20. package/lib/client-conditions-fixtures.js +143 -0
  21. package/lib/client-conditions.js +656 -0
  22. package/lib/clients.js +179 -0
  23. package/lib/command-line.js +202 -0
  24. package/lib/conditions-command.js +116 -0
  25. package/lib/control.js +134 -0
  26. package/lib/credential-store.js +414 -0
  27. package/lib/credentials-command.js +344 -0
  28. package/lib/daemon-requests.js +137 -0
  29. package/lib/daemon.js +888 -0
  30. package/lib/describe-module.js +137 -0
  31. package/lib/description-check.js +175 -0
  32. package/lib/failed-json.js +43 -0
  33. package/lib/gc.js +274 -0
  34. package/lib/github-token.js +57 -0
  35. package/lib/handoff-io.js +73 -0
  36. package/lib/held-back.js +116 -0
  37. package/lib/hidden-input.js +64 -0
  38. package/lib/history.js +49 -0
  39. package/lib/home.js +372 -0
  40. package/lib/in-place.js +1036 -0
  41. package/lib/install-plan.js +142 -0
  42. package/lib/install.js +846 -0
  43. package/lib/installed-description.js +153 -0
  44. package/lib/integrity.js +7 -0
  45. package/lib/lock.js +456 -0
  46. package/lib/lockfile-rules.js +98 -0
  47. package/lib/machine.js +20 -0
  48. package/lib/module-credentials.js +403 -0
  49. package/lib/module-record.js +298 -0
  50. package/lib/module-roles.js +44 -0
  51. package/lib/module-seams.js +26 -0
  52. package/lib/module-store.js +202 -0
  53. package/lib/module-values.js +334 -0
  54. package/lib/names.js +31 -0
  55. package/lib/next-steps.js +8 -0
  56. package/lib/node-check.js +56 -0
  57. package/lib/npm-fetch.js +123 -0
  58. package/lib/npm-release.js +99 -0
  59. package/lib/npm-upgrade.js +146 -0
  60. package/lib/npm.js +41 -0
  61. package/lib/outside-edits.js +162 -0
  62. package/lib/own-applied.js +175 -0
  63. package/lib/own-command.js +380 -0
  64. package/lib/own-file.js +120 -0
  65. package/lib/own-record.js +96 -0
  66. package/lib/own-tree.js +336 -0
  67. package/lib/pack-table.js +290 -0
  68. package/lib/packs-command.js +570 -0
  69. package/lib/packs.js +219 -0
  70. package/lib/pins.js +64 -0
  71. package/lib/pipe-probe.js +82 -0
  72. package/lib/plain-read.js +63 -0
  73. package/lib/private-file.js +90 -0
  74. package/lib/private-write.js +33 -0
  75. package/lib/provenance.js +234 -0
  76. package/lib/record.js +82 -0
  77. package/lib/registry.js +22 -0
  78. package/lib/release-pins.js +350 -0
  79. package/lib/release-pins.json +4225 -0
  80. package/lib/release-tags.js +12 -0
  81. package/lib/release.js +36 -0
  82. package/lib/restart-command.js +161 -0
  83. package/lib/rollback.js +227 -0
  84. package/lib/run-liveness.js +15 -0
  85. package/lib/runtime-log.js +287 -0
  86. package/lib/sandbox-support.js +17 -0
  87. package/lib/semver-order.js +40 -0
  88. package/lib/session-socket.js +69 -0
  89. package/lib/session-table.js +238 -0
  90. package/lib/session.js +281 -0
  91. package/lib/settings-command.js +82 -0
  92. package/lib/settings.js +564 -0
  93. package/lib/shim-binary.js +152 -0
  94. package/lib/shim-config.js +159 -0
  95. package/lib/shim-install.js +365 -0
  96. package/lib/sigstore/README.md +44 -0
  97. package/lib/sigstore/npm-keys.json +18 -0
  98. package/lib/sigstore/trusted-root.json +126 -0
  99. package/lib/snippets.js +76 -0
  100. package/lib/start.js +721 -0
  101. package/lib/store-files.js +48 -0
  102. package/lib/store-paths.js +33 -0
  103. package/lib/swap-preload.js +38 -0
  104. package/lib/tar.js +220 -0
  105. package/lib/uninstall.js +314 -0
  106. package/lib/unpack.js +41 -0
  107. package/lib/upgrade-stamp.js +63 -0
  108. package/lib/upgrade.js +281 -0
  109. package/lib/watch.js +40 -0
  110. package/lib/win-acl.js +420 -0
  111. package/node_modules/@sigstore/bundle/LICENSE +202 -0
  112. package/node_modules/@sigstore/bundle/README.md +19 -0
  113. package/node_modules/@sigstore/bundle/dist/build.d.ts +18 -0
  114. package/node_modules/@sigstore/bundle/dist/build.js +100 -0
  115. package/node_modules/@sigstore/bundle/dist/bundle.d.ts +74 -0
  116. package/node_modules/@sigstore/bundle/dist/bundle.js +24 -0
  117. package/node_modules/@sigstore/bundle/dist/error.d.ts +4 -0
  118. package/node_modules/@sigstore/bundle/dist/error.js +25 -0
  119. package/node_modules/@sigstore/bundle/dist/index.d.ts +8 -0
  120. package/node_modules/@sigstore/bundle/dist/index.js +43 -0
  121. package/node_modules/@sigstore/bundle/dist/serialized.d.ts +74 -0
  122. package/node_modules/@sigstore/bundle/dist/serialized.js +49 -0
  123. package/node_modules/@sigstore/bundle/dist/utility.d.ts +14 -0
  124. package/node_modules/@sigstore/bundle/dist/utility.js +2 -0
  125. package/node_modules/@sigstore/bundle/dist/validate.d.ts +7 -0
  126. package/node_modules/@sigstore/bundle/dist/validate.js +199 -0
  127. package/node_modules/@sigstore/bundle/package.json +35 -0
  128. package/node_modules/@sigstore/core/LICENSE +202 -0
  129. package/node_modules/@sigstore/core/README.md +10 -0
  130. package/node_modules/@sigstore/core/dist/asn1/error.d.ts +4 -0
  131. package/node_modules/@sigstore/core/dist/asn1/error.js +24 -0
  132. package/node_modules/@sigstore/core/dist/asn1/index.d.ts +1 -0
  133. package/node_modules/@sigstore/core/dist/asn1/index.js +20 -0
  134. package/node_modules/@sigstore/core/dist/asn1/length.d.ts +3 -0
  135. package/node_modules/@sigstore/core/dist/asn1/length.js +62 -0
  136. package/node_modules/@sigstore/core/dist/asn1/obj.d.ts +14 -0
  137. package/node_modules/@sigstore/core/dist/asn1/obj.js +155 -0
  138. package/node_modules/@sigstore/core/dist/asn1/parse.d.ts +6 -0
  139. package/node_modules/@sigstore/core/dist/asn1/parse.js +124 -0
  140. package/node_modules/@sigstore/core/dist/asn1/tag.d.ts +16 -0
  141. package/node_modules/@sigstore/core/dist/asn1/tag.js +89 -0
  142. package/node_modules/@sigstore/core/dist/crypto.d.ts +6 -0
  143. package/node_modules/@sigstore/core/dist/crypto.js +69 -0
  144. package/node_modules/@sigstore/core/dist/dsse.d.ts +1 -0
  145. package/node_modules/@sigstore/core/dist/dsse.js +29 -0
  146. package/node_modules/@sigstore/core/dist/encoding.d.ts +2 -0
  147. package/node_modules/@sigstore/core/dist/encoding.js +27 -0
  148. package/node_modules/@sigstore/core/dist/index.d.ts +9 -0
  149. package/node_modules/@sigstore/core/dist/index.js +66 -0
  150. package/node_modules/@sigstore/core/dist/json.d.ts +1 -0
  151. package/node_modules/@sigstore/core/dist/json.js +60 -0
  152. package/node_modules/@sigstore/core/dist/oid.d.ts +3 -0
  153. package/node_modules/@sigstore/core/dist/oid.js +20 -0
  154. package/node_modules/@sigstore/core/dist/pem.d.ts +2 -0
  155. package/node_modules/@sigstore/core/dist/pem.js +43 -0
  156. package/node_modules/@sigstore/core/dist/rfc3161/error.d.ts +2 -0
  157. package/node_modules/@sigstore/core/dist/rfc3161/error.js +21 -0
  158. package/node_modules/@sigstore/core/dist/rfc3161/index.d.ts +1 -0
  159. package/node_modules/@sigstore/core/dist/rfc3161/index.js +20 -0
  160. package/node_modules/@sigstore/core/dist/rfc3161/timestamp.d.ts +36 -0
  161. package/node_modules/@sigstore/core/dist/rfc3161/timestamp.js +212 -0
  162. package/node_modules/@sigstore/core/dist/rfc3161/tstinfo.d.ts +12 -0
  163. package/node_modules/@sigstore/core/dist/rfc3161/tstinfo.js +72 -0
  164. package/node_modules/@sigstore/core/dist/stream.d.ts +21 -0
  165. package/node_modules/@sigstore/core/dist/stream.js +117 -0
  166. package/node_modules/@sigstore/core/dist/x509/cert.d.ts +43 -0
  167. package/node_modules/@sigstore/core/dist/x509/cert.js +245 -0
  168. package/node_modules/@sigstore/core/dist/x509/ext.d.ts +41 -0
  169. package/node_modules/@sigstore/core/dist/x509/ext.js +146 -0
  170. package/node_modules/@sigstore/core/dist/x509/index.d.ts +2 -0
  171. package/node_modules/@sigstore/core/dist/x509/index.js +23 -0
  172. package/node_modules/@sigstore/core/dist/x509/sct.d.ts +25 -0
  173. package/node_modules/@sigstore/core/dist/x509/sct.js +158 -0
  174. package/node_modules/@sigstore/core/package.json +31 -0
  175. package/node_modules/@sigstore/protobuf-specs/LICENSE +202 -0
  176. package/node_modules/@sigstore/protobuf-specs/README.md +5 -0
  177. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/envelope.d.ts +44 -0
  178. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/envelope.js +59 -0
  179. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/events.d.ts +64 -0
  180. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/events.js +174 -0
  181. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/api/field_behavior.d.ts +74 -0
  182. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/api/field_behavior.js +141 -0
  183. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/any.d.ts +74 -0
  184. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/any.js +35 -0
  185. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/descriptor.d.ts +1309 -0
  186. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/descriptor.js +2191 -0
  187. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/timestamp.d.ts +113 -0
  188. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/timestamp.js +29 -0
  189. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/dsse.d.ts +23 -0
  190. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/dsse.js +55 -0
  191. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/entry.d.ts +43 -0
  192. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/entry.js +81 -0
  193. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/hashedrekord.d.ts +22 -0
  194. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/hashedrekord.js +56 -0
  195. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/verifier.d.ts +35 -0
  196. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/verifier.js +74 -0
  197. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_bundle.d.ts +146 -0
  198. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_bundle.js +103 -0
  199. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_common.d.ts +304 -0
  200. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_common.js +612 -0
  201. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_monitor.d.ts +33 -0
  202. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_monitor.js +55 -0
  203. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_rekor.d.ts +144 -0
  204. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_rekor.js +137 -0
  205. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_trustroot.d.ts +386 -0
  206. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_trustroot.js +284 -0
  207. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_verification.d.ts +191 -0
  208. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_verification.js +281 -0
  209. package/node_modules/@sigstore/protobuf-specs/dist/index.d.ts +6 -0
  210. package/node_modules/@sigstore/protobuf-specs/dist/index.js +37 -0
  211. package/node_modules/@sigstore/protobuf-specs/dist/rekor/v2/index.d.ts +4 -0
  212. package/node_modules/@sigstore/protobuf-specs/dist/rekor/v2/index.js +35 -0
  213. package/node_modules/@sigstore/protobuf-specs/package.json +35 -0
  214. package/node_modules/@sigstore/verify/README.md +9 -0
  215. package/node_modules/@sigstore/verify/dist/bundle/dsse.d.ts +12 -0
  216. package/node_modules/@sigstore/verify/dist/bundle/dsse.js +44 -0
  217. package/node_modules/@sigstore/verify/dist/bundle/index.d.ts +4 -0
  218. package/node_modules/@sigstore/verify/dist/bundle/index.js +59 -0
  219. package/node_modules/@sigstore/verify/dist/bundle/message.d.ts +13 -0
  220. package/node_modules/@sigstore/verify/dist/bundle/message.js +54 -0
  221. package/node_modules/@sigstore/verify/dist/error.d.ts +16 -0
  222. package/node_modules/@sigstore/verify/dist/error.js +34 -0
  223. package/node_modules/@sigstore/verify/dist/index.d.ts +6 -0
  224. package/node_modules/@sigstore/verify/dist/index.js +28 -0
  225. package/node_modules/@sigstore/verify/dist/key/certificate.d.ts +21 -0
  226. package/node_modules/@sigstore/verify/dist/key/certificate.js +216 -0
  227. package/node_modules/@sigstore/verify/dist/key/index.d.ts +10 -0
  228. package/node_modules/@sigstore/verify/dist/key/index.js +75 -0
  229. package/node_modules/@sigstore/verify/dist/key/sct.d.ts +4 -0
  230. package/node_modules/@sigstore/verify/dist/key/sct.js +78 -0
  231. package/node_modules/@sigstore/verify/dist/policy.d.ts +5 -0
  232. package/node_modules/@sigstore/verify/dist/policy.js +50 -0
  233. package/node_modules/@sigstore/verify/dist/shared.types.d.ts +50 -0
  234. package/node_modules/@sigstore/verify/dist/shared.types.js +2 -0
  235. package/node_modules/@sigstore/verify/dist/timestamp/index.d.ts +11 -0
  236. package/node_modules/@sigstore/verify/dist/timestamp/index.js +24 -0
  237. package/node_modules/@sigstore/verify/dist/timestamp/tsa.d.ts +3 -0
  238. package/node_modules/@sigstore/verify/dist/timestamp/tsa.js +63 -0
  239. package/node_modules/@sigstore/verify/dist/tlog/checkpoint.d.ts +11 -0
  240. package/node_modules/@sigstore/verify/dist/tlog/checkpoint.js +154 -0
  241. package/node_modules/@sigstore/verify/dist/tlog/dsse.d.ts +6 -0
  242. package/node_modules/@sigstore/verify/dist/tlog/dsse.js +106 -0
  243. package/node_modules/@sigstore/verify/dist/tlog/hashedrekord.d.ts +6 -0
  244. package/node_modules/@sigstore/verify/dist/tlog/hashedrekord.js +94 -0
  245. package/node_modules/@sigstore/verify/dist/tlog/index.d.ts +5 -0
  246. package/node_modules/@sigstore/verify/dist/tlog/index.js +92 -0
  247. package/node_modules/@sigstore/verify/dist/tlog/intoto.d.ts +3 -0
  248. package/node_modules/@sigstore/verify/dist/tlog/intoto.js +62 -0
  249. package/node_modules/@sigstore/verify/dist/tlog/merkle.d.ts +3 -0
  250. package/node_modules/@sigstore/verify/dist/tlog/merkle.js +104 -0
  251. package/node_modules/@sigstore/verify/dist/tlog/set.d.ts +3 -0
  252. package/node_modules/@sigstore/verify/dist/tlog/set.js +60 -0
  253. package/node_modules/@sigstore/verify/dist/trust/filter.d.ts +8 -0
  254. package/node_modules/@sigstore/verify/dist/trust/filter.js +23 -0
  255. package/node_modules/@sigstore/verify/dist/trust/index.d.ts +5 -0
  256. package/node_modules/@sigstore/verify/dist/trust/index.js +90 -0
  257. package/node_modules/@sigstore/verify/dist/trust/trust.types.d.ts +29 -0
  258. package/node_modules/@sigstore/verify/dist/trust/trust.types.js +2 -0
  259. package/node_modules/@sigstore/verify/dist/verifier.d.ts +31 -0
  260. package/node_modules/@sigstore/verify/dist/verifier.js +160 -0
  261. package/node_modules/@sigstore/verify/package.json +36 -0
  262. package/package.json +37 -4
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.12.0
5
+ // protoc v7.35.1
6
+ // source: google/api/field_behavior.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.FieldBehavior = void 0;
9
+ exports.fieldBehaviorFromJSON = fieldBehaviorFromJSON;
10
+ exports.fieldBehaviorToJSON = fieldBehaviorToJSON;
11
+ /* eslint-disable */
12
+ /**
13
+ * An indicator of the behavior of a given field (for example, that a field
14
+ * is required in requests, or given as output but ignored as input).
15
+ * This **does not** change the behavior in protocol buffers itself; it only
16
+ * denotes the behavior and may affect how API tooling handles the field.
17
+ *
18
+ * Note: This enum **may** receive new values in the future.
19
+ */
20
+ var FieldBehavior;
21
+ (function (FieldBehavior) {
22
+ /** FIELD_BEHAVIOR_UNSPECIFIED - Conventional default for enums. Do not use this. */
23
+ FieldBehavior[FieldBehavior["FIELD_BEHAVIOR_UNSPECIFIED"] = 0] = "FIELD_BEHAVIOR_UNSPECIFIED";
24
+ /**
25
+ * OPTIONAL - Specifically denotes a field as optional.
26
+ * While all fields in protocol buffers are optional, this may be specified
27
+ * for emphasis if appropriate.
28
+ */
29
+ FieldBehavior[FieldBehavior["OPTIONAL"] = 1] = "OPTIONAL";
30
+ /**
31
+ * REQUIRED - Denotes a field as required.
32
+ * This indicates that the field **must** be provided as part of the request,
33
+ * and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
34
+ */
35
+ FieldBehavior[FieldBehavior["REQUIRED"] = 2] = "REQUIRED";
36
+ /**
37
+ * OUTPUT_ONLY - Denotes a field as output only.
38
+ * This indicates that the field is provided in responses, but including the
39
+ * field in a request does nothing (the server *must* ignore it and
40
+ * *must not* throw an error as a result of the field's presence).
41
+ */
42
+ FieldBehavior[FieldBehavior["OUTPUT_ONLY"] = 3] = "OUTPUT_ONLY";
43
+ /**
44
+ * INPUT_ONLY - Denotes a field as input only.
45
+ * This indicates that the field is provided in requests, and the
46
+ * corresponding field is not included in output.
47
+ */
48
+ FieldBehavior[FieldBehavior["INPUT_ONLY"] = 4] = "INPUT_ONLY";
49
+ /**
50
+ * IMMUTABLE - Denotes a field as immutable.
51
+ * This indicates that the field may be set once in a request to create a
52
+ * resource, but may not be changed thereafter.
53
+ */
54
+ FieldBehavior[FieldBehavior["IMMUTABLE"] = 5] = "IMMUTABLE";
55
+ /**
56
+ * UNORDERED_LIST - Denotes that a (repeated) field is an unordered list.
57
+ * This indicates that the service may provide the elements of the list
58
+ * in any arbitrary order, rather than the order the user originally
59
+ * provided. Additionally, the list's order may or may not be stable.
60
+ */
61
+ FieldBehavior[FieldBehavior["UNORDERED_LIST"] = 6] = "UNORDERED_LIST";
62
+ /**
63
+ * NON_EMPTY_DEFAULT - Denotes that this field returns a non-empty default value if not set.
64
+ * This indicates that if the user provides the empty value in a request,
65
+ * a non-empty value will be returned. The user will not be aware of what
66
+ * non-empty value to expect.
67
+ */
68
+ FieldBehavior[FieldBehavior["NON_EMPTY_DEFAULT"] = 7] = "NON_EMPTY_DEFAULT";
69
+ /**
70
+ * IDENTIFIER - Denotes that the field in a resource (a message annotated with
71
+ * google.api.resource) is used in the resource name to uniquely identify the
72
+ * resource. For AIP-compliant APIs, this should only be applied to the
73
+ * `name` field on the resource.
74
+ *
75
+ * This behavior should not be applied to references to other resources within
76
+ * the message.
77
+ *
78
+ * The identifier field of resources often have different field behavior
79
+ * depending on the request it is embedded in (e.g. for Create methods name
80
+ * is optional and unused, while for Update methods it is required). Instead
81
+ * of method-specific annotations, only `IDENTIFIER` is required.
82
+ */
83
+ FieldBehavior[FieldBehavior["IDENTIFIER"] = 8] = "IDENTIFIER";
84
+ })(FieldBehavior || (exports.FieldBehavior = FieldBehavior = {}));
85
+ function fieldBehaviorFromJSON(object) {
86
+ switch (object) {
87
+ case 0:
88
+ case "FIELD_BEHAVIOR_UNSPECIFIED":
89
+ return FieldBehavior.FIELD_BEHAVIOR_UNSPECIFIED;
90
+ case 1:
91
+ case "OPTIONAL":
92
+ return FieldBehavior.OPTIONAL;
93
+ case 2:
94
+ case "REQUIRED":
95
+ return FieldBehavior.REQUIRED;
96
+ case 3:
97
+ case "OUTPUT_ONLY":
98
+ return FieldBehavior.OUTPUT_ONLY;
99
+ case 4:
100
+ case "INPUT_ONLY":
101
+ return FieldBehavior.INPUT_ONLY;
102
+ case 5:
103
+ case "IMMUTABLE":
104
+ return FieldBehavior.IMMUTABLE;
105
+ case 6:
106
+ case "UNORDERED_LIST":
107
+ return FieldBehavior.UNORDERED_LIST;
108
+ case 7:
109
+ case "NON_EMPTY_DEFAULT":
110
+ return FieldBehavior.NON_EMPTY_DEFAULT;
111
+ case 8:
112
+ case "IDENTIFIER":
113
+ return FieldBehavior.IDENTIFIER;
114
+ default:
115
+ throw new globalThis.Error("Unrecognized enum value " + object + " for enum FieldBehavior");
116
+ }
117
+ }
118
+ function fieldBehaviorToJSON(object) {
119
+ switch (object) {
120
+ case FieldBehavior.FIELD_BEHAVIOR_UNSPECIFIED:
121
+ return "FIELD_BEHAVIOR_UNSPECIFIED";
122
+ case FieldBehavior.OPTIONAL:
123
+ return "OPTIONAL";
124
+ case FieldBehavior.REQUIRED:
125
+ return "REQUIRED";
126
+ case FieldBehavior.OUTPUT_ONLY:
127
+ return "OUTPUT_ONLY";
128
+ case FieldBehavior.INPUT_ONLY:
129
+ return "INPUT_ONLY";
130
+ case FieldBehavior.IMMUTABLE:
131
+ return "IMMUTABLE";
132
+ case FieldBehavior.UNORDERED_LIST:
133
+ return "UNORDERED_LIST";
134
+ case FieldBehavior.NON_EMPTY_DEFAULT:
135
+ return "NON_EMPTY_DEFAULT";
136
+ case FieldBehavior.IDENTIFIER:
137
+ return "IDENTIFIER";
138
+ default:
139
+ throw new globalThis.Error("Unrecognized enum value " + object + " for enum FieldBehavior");
140
+ }
141
+ }
@@ -0,0 +1,74 @@
1
+ /**
2
+ * `Any` contains an arbitrary serialized protocol buffer message along with a
3
+ * URL that describes the type of the serialized message.
4
+ *
5
+ * In its binary encoding, an `Any` is an ordinary message; but in other wire
6
+ * forms like JSON, it has a special encoding. The format of the type URL is
7
+ * described on the `type_url` field.
8
+ *
9
+ * Protobuf APIs provide utilities to interact with `Any` values:
10
+ *
11
+ * - A 'pack' operation accepts a message and constructs a generic `Any` wrapper
12
+ * around it.
13
+ * - An 'unpack' operation reads the content of an `Any` message, either into an
14
+ * existing message or a new one. Unpack operations must check the type of the
15
+ * value they unpack against the declared `type_url`.
16
+ * - An 'is' operation decides whether an `Any` contains a message of the given
17
+ * type, i.e. whether it can 'unpack' that type.
18
+ *
19
+ * The JSON format representation of an `Any` follows one of these cases:
20
+ *
21
+ * - For types without special-cased JSON encodings, the JSON format
22
+ * representation of the `Any` is the same as that of the message, with an
23
+ * additional `@type` field which contains the type URL.
24
+ * - For types with special-cased JSON encodings (typically called 'well-known'
25
+ * types, listed in https://protobuf.dev/programming-guides/json/#any), the
26
+ * JSON format representation has a key `@type` which contains the type URL
27
+ * and a key `value` which contains the JSON-serialized value.
28
+ *
29
+ * The text format representation of an `Any` is like a message with one field
30
+ * whose name is the type URL in brackets. For example, an `Any` containing a
31
+ * `foo.Bar` message may be written `[type.googleapis.com/foo.Bar] { a: 2 }`.
32
+ */
33
+ export interface Any {
34
+ /**
35
+ * Identifies the type of the serialized Protobuf message with a URI reference
36
+ * consisting of a prefix ending in a slash and the fully-qualified type name.
37
+ *
38
+ * Example: type.googleapis.com/google.protobuf.StringValue
39
+ *
40
+ * This string must contain at least one `/` character, and the content after
41
+ * the last `/` must be the fully-qualified name of the type in canonical
42
+ * form, without a leading dot. Do not write a scheme on these URI references
43
+ * so that clients do not attempt to contact them.
44
+ *
45
+ * The prefix is arbitrary and Protobuf implementations are expected to
46
+ * simply strip off everything up to and including the last `/` to identify
47
+ * the type. `type.googleapis.com/` is a common default prefix that some
48
+ * legacy implementations require. This prefix does not indicate the origin of
49
+ * the type, and URIs containing it are not expected to respond to any
50
+ * requests.
51
+ *
52
+ * All type URL strings must be legal URI references with the additional
53
+ * restriction (for the text format) that the content of the reference
54
+ * must consist only of alphanumeric characters, percent-encoded escapes, and
55
+ * characters in the following set (not including the outer backticks):
56
+ * `/-.~_!$&()*+,;=`. Despite our allowing percent encodings, implementations
57
+ * should not unescape them to prevent confusion with existing parsers. For
58
+ * example, `type.googleapis.com%2FFoo` should be rejected.
59
+ *
60
+ * In the original design of `Any`, the possibility of launching a type
61
+ * resolution service at these type URLs was considered but Protobuf never
62
+ * implemented one and considers contacting these URLs to be problematic and
63
+ * a potential security issue. Do not attempt to contact type URLs.
64
+ */
65
+ typeUrl: string;
66
+ /** Holds a Protobuf serialization of the type described by type_url. */
67
+ value: Buffer;
68
+ }
69
+ export declare const Any: MessageFns<Any>;
70
+ interface MessageFns<T> {
71
+ fromJSON(object: any): T;
72
+ toJSON(message: T): unknown;
73
+ }
74
+ export {};
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.12.0
5
+ // protoc v7.35.1
6
+ // source: google/protobuf/any.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.Any = void 0;
9
+ exports.Any = {
10
+ fromJSON(object) {
11
+ return {
12
+ typeUrl: isSet(object.typeUrl) ? globalThis.String(object.typeUrl) : "",
13
+ value: isSet(object.value) ? Buffer.from(bytesFromBase64(object.value)) : Buffer.alloc(0),
14
+ };
15
+ },
16
+ toJSON(message) {
17
+ const obj = {};
18
+ if (message.typeUrl !== "") {
19
+ obj.typeUrl = message.typeUrl;
20
+ }
21
+ if (message.value.length !== 0) {
22
+ obj.value = base64FromBytes(message.value);
23
+ }
24
+ return obj;
25
+ },
26
+ };
27
+ function bytesFromBase64(b64) {
28
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
29
+ }
30
+ function base64FromBytes(arr) {
31
+ return globalThis.Buffer.from(arr).toString("base64");
32
+ }
33
+ function isSet(value) {
34
+ return value !== null && value !== undefined;
35
+ }