@macula-io/martha 0.0.0 → 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 (1022) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +53 -8
  3. package/bin/martha-install.mjs +54 -0
  4. package/check_the_node_version/check_the_node_version.mjs +19 -0
  5. package/install_a_release/install_a_release.mjs +166 -0
  6. package/keep_the_names_in_one_place/names.mjs +49 -0
  7. package/node_modules/@gar/promise-retry/LICENSE +20 -0
  8. package/node_modules/@gar/promise-retry/README.md +86 -0
  9. package/node_modules/@gar/promise-retry/lib/index.d.ts +114 -0
  10. package/node_modules/@gar/promise-retry/lib/index.js +62 -0
  11. package/node_modules/@gar/promise-retry/lib/retry.js +109 -0
  12. package/node_modules/@gar/promise-retry/package.json +45 -0
  13. package/node_modules/@isaacs/nonrecursive-glob-match/LICENSE.md +55 -0
  14. package/node_modules/@isaacs/nonrecursive-glob-match/README.md +364 -0
  15. package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.d.ts +123 -0
  16. package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.d.ts.map +1 -0
  17. package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.js +778 -0
  18. package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.js.map +1 -0
  19. package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.min.js +3 -0
  20. package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.min.js.map +7 -0
  21. package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/numeric-range.d.ts +15 -0
  22. package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/numeric-range.d.ts.map +1 -0
  23. package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/numeric-range.js +76 -0
  24. package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/numeric-range.js.map +1 -0
  25. package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/package.json +3 -0
  26. package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/parse-class.d.ts +4 -0
  27. package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/parse-class.d.ts.map +1 -0
  28. package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/parse-class.js +142 -0
  29. package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/parse-class.js.map +1 -0
  30. package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.d.ts +123 -0
  31. package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.d.ts.map +1 -0
  32. package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.js +774 -0
  33. package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.js.map +1 -0
  34. package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.min.js +3 -0
  35. package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.min.js.map +7 -0
  36. package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/numeric-range.d.ts +15 -0
  37. package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/numeric-range.d.ts.map +1 -0
  38. package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/numeric-range.js +72 -0
  39. package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/numeric-range.js.map +1 -0
  40. package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/package.json +3 -0
  41. package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/parse-class.d.ts +4 -0
  42. package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/parse-class.d.ts.map +1 -0
  43. package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/parse-class.js +138 -0
  44. package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/parse-class.js.map +1 -0
  45. package/node_modules/@isaacs/nonrecursive-glob-match/package.json +56 -0
  46. package/node_modules/@isaacs/nonrecursive-glob-match/src/index.ts +932 -0
  47. package/node_modules/@isaacs/nonrecursive-glob-match/src/numeric-range.ts +79 -0
  48. package/node_modules/@isaacs/nonrecursive-glob-match/src/parse-class.ts +158 -0
  49. package/node_modules/@npmcli/agent/README.md +40 -0
  50. package/node_modules/@npmcli/agent/lib/agents.js +268 -0
  51. package/node_modules/@npmcli/agent/lib/dns.js +53 -0
  52. package/node_modules/@npmcli/agent/lib/errors.js +61 -0
  53. package/node_modules/@npmcli/agent/lib/index.js +56 -0
  54. package/node_modules/@npmcli/agent/lib/options.js +90 -0
  55. package/node_modules/@npmcli/agent/lib/proxy.js +88 -0
  56. package/node_modules/@npmcli/agent/package.json +61 -0
  57. package/node_modules/@npmcli/fs/LICENSE.md +20 -0
  58. package/node_modules/@npmcli/fs/README.md +97 -0
  59. package/node_modules/@npmcli/fs/lib/common/get-options.js +20 -0
  60. package/node_modules/@npmcli/fs/lib/common/node.js +9 -0
  61. package/node_modules/@npmcli/fs/lib/cp/LICENSE +15 -0
  62. package/node_modules/@npmcli/fs/lib/cp/errors.js +129 -0
  63. package/node_modules/@npmcli/fs/lib/cp/index.js +22 -0
  64. package/node_modules/@npmcli/fs/lib/cp/polyfill.js +428 -0
  65. package/node_modules/@npmcli/fs/lib/index.js +13 -0
  66. package/node_modules/@npmcli/fs/lib/move-file.js +78 -0
  67. package/node_modules/@npmcli/fs/lib/readdir-scoped.js +20 -0
  68. package/node_modules/@npmcli/fs/lib/with-temp-dir.js +39 -0
  69. package/node_modules/@npmcli/fs/package.json +54 -0
  70. package/node_modules/@npmcli/redact/LICENSE +21 -0
  71. package/node_modules/@npmcli/redact/README.md +42 -0
  72. package/node_modules/@npmcli/redact/lib/deep-map.js +71 -0
  73. package/node_modules/@npmcli/redact/lib/error.js +28 -0
  74. package/node_modules/@npmcli/redact/lib/index.js +44 -0
  75. package/node_modules/@npmcli/redact/lib/matchers.js +88 -0
  76. package/node_modules/@npmcli/redact/lib/server.js +59 -0
  77. package/node_modules/@npmcli/redact/lib/utils.js +202 -0
  78. package/node_modules/@npmcli/redact/package.json +52 -0
  79. package/node_modules/@sigstore/bundle/LICENSE +202 -0
  80. package/node_modules/@sigstore/bundle/README.md +19 -0
  81. package/node_modules/@sigstore/bundle/dist/build.d.ts +18 -0
  82. package/node_modules/@sigstore/bundle/dist/build.js +100 -0
  83. package/node_modules/@sigstore/bundle/dist/bundle.d.ts +74 -0
  84. package/node_modules/@sigstore/bundle/dist/bundle.js +24 -0
  85. package/node_modules/@sigstore/bundle/dist/error.d.ts +4 -0
  86. package/node_modules/@sigstore/bundle/dist/error.js +26 -0
  87. package/node_modules/@sigstore/bundle/dist/index.d.ts +8 -0
  88. package/node_modules/@sigstore/bundle/dist/index.js +43 -0
  89. package/node_modules/@sigstore/bundle/dist/serialized.d.ts +74 -0
  90. package/node_modules/@sigstore/bundle/dist/serialized.js +49 -0
  91. package/node_modules/@sigstore/bundle/dist/utility.d.ts +14 -0
  92. package/node_modules/@sigstore/bundle/dist/utility.js +2 -0
  93. package/node_modules/@sigstore/bundle/dist/validate.d.ts +7 -0
  94. package/node_modules/@sigstore/bundle/dist/validate.js +199 -0
  95. package/node_modules/@sigstore/bundle/package.json +35 -0
  96. package/node_modules/@sigstore/core/LICENSE +202 -0
  97. package/node_modules/@sigstore/core/README.md +10 -0
  98. package/node_modules/@sigstore/core/dist/asn1/error.d.ts +4 -0
  99. package/node_modules/@sigstore/core/dist/asn1/error.js +24 -0
  100. package/node_modules/@sigstore/core/dist/asn1/index.d.ts +1 -0
  101. package/node_modules/@sigstore/core/dist/asn1/index.js +20 -0
  102. package/node_modules/@sigstore/core/dist/asn1/length.d.ts +3 -0
  103. package/node_modules/@sigstore/core/dist/asn1/length.js +73 -0
  104. package/node_modules/@sigstore/core/dist/asn1/obj.d.ts +14 -0
  105. package/node_modules/@sigstore/core/dist/asn1/obj.js +173 -0
  106. package/node_modules/@sigstore/core/dist/asn1/parse.d.ts +6 -0
  107. package/node_modules/@sigstore/core/dist/asn1/parse.js +143 -0
  108. package/node_modules/@sigstore/core/dist/asn1/tag.d.ts +16 -0
  109. package/node_modules/@sigstore/core/dist/asn1/tag.js +89 -0
  110. package/node_modules/@sigstore/core/dist/crypto.d.ts +6 -0
  111. package/node_modules/@sigstore/core/dist/crypto.js +69 -0
  112. package/node_modules/@sigstore/core/dist/dsse.d.ts +1 -0
  113. package/node_modules/@sigstore/core/dist/dsse.js +29 -0
  114. package/node_modules/@sigstore/core/dist/encoding.d.ts +2 -0
  115. package/node_modules/@sigstore/core/dist/encoding.js +27 -0
  116. package/node_modules/@sigstore/core/dist/index.d.ts +9 -0
  117. package/node_modules/@sigstore/core/dist/index.js +66 -0
  118. package/node_modules/@sigstore/core/dist/json.d.ts +1 -0
  119. package/node_modules/@sigstore/core/dist/json.js +60 -0
  120. package/node_modules/@sigstore/core/dist/oid.d.ts +3 -0
  121. package/node_modules/@sigstore/core/dist/oid.js +20 -0
  122. package/node_modules/@sigstore/core/dist/pem.d.ts +2 -0
  123. package/node_modules/@sigstore/core/dist/pem.js +43 -0
  124. package/node_modules/@sigstore/core/dist/rfc3161/error.d.ts +2 -0
  125. package/node_modules/@sigstore/core/dist/rfc3161/error.js +21 -0
  126. package/node_modules/@sigstore/core/dist/rfc3161/index.d.ts +1 -0
  127. package/node_modules/@sigstore/core/dist/rfc3161/index.js +20 -0
  128. package/node_modules/@sigstore/core/dist/rfc3161/timestamp.d.ts +36 -0
  129. package/node_modules/@sigstore/core/dist/rfc3161/timestamp.js +212 -0
  130. package/node_modules/@sigstore/core/dist/rfc3161/tstinfo.d.ts +12 -0
  131. package/node_modules/@sigstore/core/dist/rfc3161/tstinfo.js +72 -0
  132. package/node_modules/@sigstore/core/dist/stream.d.ts +21 -0
  133. package/node_modules/@sigstore/core/dist/stream.js +117 -0
  134. package/node_modules/@sigstore/core/dist/x509/cert.d.ts +43 -0
  135. package/node_modules/@sigstore/core/dist/x509/cert.js +245 -0
  136. package/node_modules/@sigstore/core/dist/x509/ext.d.ts +41 -0
  137. package/node_modules/@sigstore/core/dist/x509/ext.js +146 -0
  138. package/node_modules/@sigstore/core/dist/x509/index.d.ts +2 -0
  139. package/node_modules/@sigstore/core/dist/x509/index.js +23 -0
  140. package/node_modules/@sigstore/core/dist/x509/sct.d.ts +25 -0
  141. package/node_modules/@sigstore/core/dist/x509/sct.js +158 -0
  142. package/node_modules/@sigstore/core/package.json +31 -0
  143. package/node_modules/@sigstore/protobuf-specs/LICENSE +202 -0
  144. package/node_modules/@sigstore/protobuf-specs/README.md +5 -0
  145. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/envelope.d.ts +44 -0
  146. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/envelope.js +59 -0
  147. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/events.d.ts +64 -0
  148. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/events.js +174 -0
  149. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/api/field_behavior.d.ts +74 -0
  150. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/api/field_behavior.js +141 -0
  151. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/any.d.ts +74 -0
  152. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/any.js +35 -0
  153. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/descriptor.d.ts +1309 -0
  154. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/descriptor.js +2191 -0
  155. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/timestamp.d.ts +113 -0
  156. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/timestamp.js +29 -0
  157. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/dsse.d.ts +23 -0
  158. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/dsse.js +55 -0
  159. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/entry.d.ts +43 -0
  160. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/entry.js +81 -0
  161. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/hashedrekord.d.ts +22 -0
  162. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/hashedrekord.js +56 -0
  163. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/verifier.d.ts +35 -0
  164. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/verifier.js +74 -0
  165. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_bundle.d.ts +146 -0
  166. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_bundle.js +103 -0
  167. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_common.d.ts +304 -0
  168. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_common.js +612 -0
  169. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_monitor.d.ts +33 -0
  170. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_monitor.js +55 -0
  171. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_rekor.d.ts +144 -0
  172. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_rekor.js +137 -0
  173. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_trustroot.d.ts +386 -0
  174. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_trustroot.js +284 -0
  175. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_verification.d.ts +191 -0
  176. package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_verification.js +281 -0
  177. package/node_modules/@sigstore/protobuf-specs/dist/index.d.ts +6 -0
  178. package/node_modules/@sigstore/protobuf-specs/dist/index.js +37 -0
  179. package/node_modules/@sigstore/protobuf-specs/dist/rekor/v2/index.d.ts +4 -0
  180. package/node_modules/@sigstore/protobuf-specs/dist/rekor/v2/index.js +35 -0
  181. package/node_modules/@sigstore/protobuf-specs/package.json +35 -0
  182. package/node_modules/@sigstore/sign/LICENSE +202 -0
  183. package/node_modules/@sigstore/sign/README.md +185 -0
  184. package/node_modules/@sigstore/sign/dist/bundler/base.d.ts +22 -0
  185. package/node_modules/@sigstore/sign/dist/bundler/base.js +52 -0
  186. package/node_modules/@sigstore/sign/dist/bundler/bundle.d.ts +5 -0
  187. package/node_modules/@sigstore/sign/dist/bundler/bundle.js +81 -0
  188. package/node_modules/@sigstore/sign/dist/bundler/dsse.d.ts +13 -0
  189. package/node_modules/@sigstore/sign/dist/bundler/dsse.js +47 -0
  190. package/node_modules/@sigstore/sign/dist/bundler/index.d.ts +3 -0
  191. package/node_modules/@sigstore/sign/dist/bundler/index.js +7 -0
  192. package/node_modules/@sigstore/sign/dist/bundler/message.d.ts +7 -0
  193. package/node_modules/@sigstore/sign/dist/bundler/message.js +30 -0
  194. package/node_modules/@sigstore/sign/dist/config.d.ts +18 -0
  195. package/node_modules/@sigstore/sign/dist/config.js +143 -0
  196. package/node_modules/@sigstore/sign/dist/error.d.ts +12 -0
  197. package/node_modules/@sigstore/sign/dist/error.js +41 -0
  198. package/node_modules/@sigstore/sign/dist/external/error.d.ts +9 -0
  199. package/node_modules/@sigstore/sign/dist/external/error.js +28 -0
  200. package/node_modules/@sigstore/sign/dist/external/fetch.d.ts +4 -0
  201. package/node_modules/@sigstore/sign/dist/external/fetch.js +98 -0
  202. package/node_modules/@sigstore/sign/dist/external/fulcio.d.ts +37 -0
  203. package/node_modules/@sigstore/sign/dist/external/fulcio.js +42 -0
  204. package/node_modules/@sigstore/sign/dist/external/rekor-v2.d.ts +14 -0
  205. package/node_modules/@sigstore/sign/dist/external/rekor-v2.js +45 -0
  206. package/node_modules/@sigstore/sign/dist/external/rekor.d.ts +28 -0
  207. package/node_modules/@sigstore/sign/dist/external/rekor.js +81 -0
  208. package/node_modules/@sigstore/sign/dist/external/tsa.d.ts +16 -0
  209. package/node_modules/@sigstore/sign/dist/external/tsa.js +44 -0
  210. package/node_modules/@sigstore/sign/dist/identity/ci.d.ts +11 -0
  211. package/node_modules/@sigstore/sign/dist/identity/ci.js +88 -0
  212. package/node_modules/@sigstore/sign/dist/identity/index.d.ts +2 -0
  213. package/node_modules/@sigstore/sign/dist/identity/index.js +20 -0
  214. package/node_modules/@sigstore/sign/dist/identity/provider.d.ts +3 -0
  215. package/node_modules/@sigstore/sign/dist/identity/provider.js +2 -0
  216. package/node_modules/@sigstore/sign/dist/index.d.ts +11 -0
  217. package/node_modules/@sigstore/sign/dist/index.js +19 -0
  218. package/node_modules/@sigstore/sign/dist/signer/fulcio/ca.d.ts +12 -0
  219. package/node_modules/@sigstore/sign/dist/signer/fulcio/ca.js +60 -0
  220. package/node_modules/@sigstore/sign/dist/signer/fulcio/ephemeral.d.ts +6 -0
  221. package/node_modules/@sigstore/sign/dist/signer/fulcio/ephemeral.js +43 -0
  222. package/node_modules/@sigstore/sign/dist/signer/fulcio/index.d.ts +16 -0
  223. package/node_modules/@sigstore/sign/dist/signer/fulcio/index.js +90 -0
  224. package/node_modules/@sigstore/sign/dist/signer/index.d.ts +2 -0
  225. package/node_modules/@sigstore/sign/dist/signer/index.js +22 -0
  226. package/node_modules/@sigstore/sign/dist/signer/signer.d.ts +15 -0
  227. package/node_modules/@sigstore/sign/dist/signer/signer.js +17 -0
  228. package/node_modules/@sigstore/sign/dist/types/fetch.d.ts +6 -0
  229. package/node_modules/@sigstore/sign/dist/types/fetch.js +2 -0
  230. package/node_modules/@sigstore/sign/dist/util/index.d.ts +3 -0
  231. package/node_modules/@sigstore/sign/dist/util/index.js +59 -0
  232. package/node_modules/@sigstore/sign/dist/util/oidc.d.ts +1 -0
  233. package/node_modules/@sigstore/sign/dist/util/oidc.js +35 -0
  234. package/node_modules/@sigstore/sign/dist/util/ua.d.ts +1 -0
  235. package/node_modules/@sigstore/sign/dist/util/ua.js +32 -0
  236. package/node_modules/@sigstore/sign/dist/witness/index.d.ts +3 -0
  237. package/node_modules/@sigstore/sign/dist/witness/index.js +24 -0
  238. package/node_modules/@sigstore/sign/dist/witness/tlog/client.d.ts +29 -0
  239. package/node_modules/@sigstore/sign/dist/witness/tlog/client.js +92 -0
  240. package/node_modules/@sigstore/sign/dist/witness/tlog/entry.d.ts +5 -0
  241. package/node_modules/@sigstore/sign/dist/witness/tlog/entry.js +197 -0
  242. package/node_modules/@sigstore/sign/dist/witness/tlog/index.d.ts +20 -0
  243. package/node_modules/@sigstore/sign/dist/witness/tlog/index.js +97 -0
  244. package/node_modules/@sigstore/sign/dist/witness/tsa/client.d.ts +12 -0
  245. package/node_modules/@sigstore/sign/dist/witness/tsa/client.js +47 -0
  246. package/node_modules/@sigstore/sign/dist/witness/tsa/index.d.ts +13 -0
  247. package/node_modules/@sigstore/sign/dist/witness/tsa/index.js +45 -0
  248. package/node_modules/@sigstore/sign/dist/witness/witness.d.ts +9 -0
  249. package/node_modules/@sigstore/sign/dist/witness/witness.js +2 -0
  250. package/node_modules/@sigstore/sign/package.json +45 -0
  251. package/node_modules/@sigstore/tuf/LICENSE +202 -0
  252. package/node_modules/@sigstore/tuf/README.md +69 -0
  253. package/node_modules/@sigstore/tuf/dist/appdata.d.ts +1 -0
  254. package/node_modules/@sigstore/tuf/dist/appdata.js +43 -0
  255. package/node_modules/@sigstore/tuf/dist/client.d.ts +23 -0
  256. package/node_modules/@sigstore/tuf/dist/client.js +116 -0
  257. package/node_modules/@sigstore/tuf/dist/error.d.ts +11 -0
  258. package/node_modules/@sigstore/tuf/dist/error.js +14 -0
  259. package/node_modules/@sigstore/tuf/dist/index.d.ts +10 -0
  260. package/node_modules/@sigstore/tuf/dist/index.js +56 -0
  261. package/node_modules/@sigstore/tuf/dist/target.d.ts +2 -0
  262. package/node_modules/@sigstore/tuf/dist/target.js +79 -0
  263. package/node_modules/@sigstore/tuf/package.json +41 -0
  264. package/node_modules/@sigstore/tuf/seeds.json +1 -0
  265. package/node_modules/@sigstore/verify/README.md +13 -0
  266. package/node_modules/@sigstore/verify/dist/bundle/dsse.d.ts +13 -0
  267. package/node_modules/@sigstore/verify/dist/bundle/dsse.js +50 -0
  268. package/node_modules/@sigstore/verify/dist/bundle/index.d.ts +4 -0
  269. package/node_modules/@sigstore/verify/dist/bundle/index.js +59 -0
  270. package/node_modules/@sigstore/verify/dist/bundle/message.d.ts +14 -0
  271. package/node_modules/@sigstore/verify/dist/bundle/message.js +59 -0
  272. package/node_modules/@sigstore/verify/dist/error.d.ts +16 -0
  273. package/node_modules/@sigstore/verify/dist/error.js +34 -0
  274. package/node_modules/@sigstore/verify/dist/index.d.ts +6 -0
  275. package/node_modules/@sigstore/verify/dist/index.js +28 -0
  276. package/node_modules/@sigstore/verify/dist/key/certificate.d.ts +21 -0
  277. package/node_modules/@sigstore/verify/dist/key/certificate.js +216 -0
  278. package/node_modules/@sigstore/verify/dist/key/index.d.ts +10 -0
  279. package/node_modules/@sigstore/verify/dist/key/index.js +75 -0
  280. package/node_modules/@sigstore/verify/dist/key/sct.d.ts +4 -0
  281. package/node_modules/@sigstore/verify/dist/key/sct.js +78 -0
  282. package/node_modules/@sigstore/verify/dist/policy.d.ts +5 -0
  283. package/node_modules/@sigstore/verify/dist/policy.js +48 -0
  284. package/node_modules/@sigstore/verify/dist/shared.types.d.ts +55 -0
  285. package/node_modules/@sigstore/verify/dist/shared.types.js +2 -0
  286. package/node_modules/@sigstore/verify/dist/timestamp/index.d.ts +11 -0
  287. package/node_modules/@sigstore/verify/dist/timestamp/index.js +24 -0
  288. package/node_modules/@sigstore/verify/dist/timestamp/tsa.d.ts +3 -0
  289. package/node_modules/@sigstore/verify/dist/timestamp/tsa.js +63 -0
  290. package/node_modules/@sigstore/verify/dist/tlog/checkpoint.d.ts +11 -0
  291. package/node_modules/@sigstore/verify/dist/tlog/checkpoint.js +168 -0
  292. package/node_modules/@sigstore/verify/dist/tlog/dsse.d.ts +6 -0
  293. package/node_modules/@sigstore/verify/dist/tlog/dsse.js +106 -0
  294. package/node_modules/@sigstore/verify/dist/tlog/hashedrekord.d.ts +6 -0
  295. package/node_modules/@sigstore/verify/dist/tlog/hashedrekord.js +94 -0
  296. package/node_modules/@sigstore/verify/dist/tlog/index.d.ts +5 -0
  297. package/node_modules/@sigstore/verify/dist/tlog/index.js +106 -0
  298. package/node_modules/@sigstore/verify/dist/tlog/intoto.d.ts +3 -0
  299. package/node_modules/@sigstore/verify/dist/tlog/intoto.js +62 -0
  300. package/node_modules/@sigstore/verify/dist/tlog/merkle.d.ts +3 -0
  301. package/node_modules/@sigstore/verify/dist/tlog/merkle.js +115 -0
  302. package/node_modules/@sigstore/verify/dist/tlog/set.d.ts +3 -0
  303. package/node_modules/@sigstore/verify/dist/tlog/set.js +60 -0
  304. package/node_modules/@sigstore/verify/dist/trust/filter.d.ts +8 -0
  305. package/node_modules/@sigstore/verify/dist/trust/filter.js +23 -0
  306. package/node_modules/@sigstore/verify/dist/trust/index.d.ts +5 -0
  307. package/node_modules/@sigstore/verify/dist/trust/index.js +90 -0
  308. package/node_modules/@sigstore/verify/dist/trust/trust.types.d.ts +29 -0
  309. package/node_modules/@sigstore/verify/dist/trust/trust.types.js +2 -0
  310. package/node_modules/@sigstore/verify/dist/verifier.d.ts +34 -0
  311. package/node_modules/@sigstore/verify/dist/verifier.js +172 -0
  312. package/node_modules/@sigstore/verify/package.json +36 -0
  313. package/node_modules/@tufjs/canonical-json/LICENSE +21 -0
  314. package/node_modules/@tufjs/canonical-json/README.md +53 -0
  315. package/node_modules/@tufjs/canonical-json/lib/index.d.ts +2 -0
  316. package/node_modules/@tufjs/canonical-json/lib/index.js +64 -0
  317. package/node_modules/@tufjs/canonical-json/package.json +35 -0
  318. package/node_modules/@tufjs/models/LICENSE +21 -0
  319. package/node_modules/@tufjs/models/README.md +3 -0
  320. package/node_modules/@tufjs/models/dist/base.d.ts +37 -0
  321. package/node_modules/@tufjs/models/dist/base.js +99 -0
  322. package/node_modules/@tufjs/models/dist/delegations.d.ts +32 -0
  323. package/node_modules/@tufjs/models/dist/delegations.js +122 -0
  324. package/node_modules/@tufjs/models/dist/error.d.ts +12 -0
  325. package/node_modules/@tufjs/models/dist/error.js +27 -0
  326. package/node_modules/@tufjs/models/dist/file.d.ts +38 -0
  327. package/node_modules/@tufjs/models/dist/file.js +191 -0
  328. package/node_modules/@tufjs/models/dist/index.d.ts +10 -0
  329. package/node_modules/@tufjs/models/dist/index.js +24 -0
  330. package/node_modules/@tufjs/models/dist/key.d.ts +21 -0
  331. package/node_modules/@tufjs/models/dist/key.js +90 -0
  332. package/node_modules/@tufjs/models/dist/metadata.d.ts +47 -0
  333. package/node_modules/@tufjs/models/dist/metadata.js +165 -0
  334. package/node_modules/@tufjs/models/dist/role.d.ts +103 -0
  335. package/node_modules/@tufjs/models/dist/role.js +310 -0
  336. package/node_modules/@tufjs/models/dist/root.d.ts +29 -0
  337. package/node_modules/@tufjs/models/dist/root.js +119 -0
  338. package/node_modules/@tufjs/models/dist/signature.d.ts +20 -0
  339. package/node_modules/@tufjs/models/dist/signature.js +40 -0
  340. package/node_modules/@tufjs/models/dist/snapshot.d.ts +23 -0
  341. package/node_modules/@tufjs/models/dist/snapshot.js +72 -0
  342. package/node_modules/@tufjs/models/dist/targets.d.ts +20 -0
  343. package/node_modules/@tufjs/models/dist/targets.js +94 -0
  344. package/node_modules/@tufjs/models/dist/timestamp.d.ts +21 -0
  345. package/node_modules/@tufjs/models/dist/timestamp.js +59 -0
  346. package/node_modules/@tufjs/models/dist/utils/guard.d.ts +7 -0
  347. package/node_modules/@tufjs/models/dist/utils/guard.js +32 -0
  348. package/node_modules/@tufjs/models/dist/utils/index.d.ts +3 -0
  349. package/node_modules/@tufjs/models/dist/utils/index.js +38 -0
  350. package/node_modules/@tufjs/models/dist/utils/key.d.ts +11 -0
  351. package/node_modules/@tufjs/models/dist/utils/key.js +170 -0
  352. package/node_modules/@tufjs/models/dist/utils/oid.d.ts +1 -0
  353. package/node_modules/@tufjs/models/dist/utils/oid.js +26 -0
  354. package/node_modules/@tufjs/models/dist/utils/types.d.ts +4 -0
  355. package/node_modules/@tufjs/models/dist/utils/types.js +2 -0
  356. package/node_modules/@tufjs/models/dist/utils/verify.d.ts +3 -0
  357. package/node_modules/@tufjs/models/dist/utils/verify.js +13 -0
  358. package/node_modules/@tufjs/models/package.json +37 -0
  359. package/node_modules/agent-base/LICENSE +22 -0
  360. package/node_modules/agent-base/README.md +69 -0
  361. package/node_modules/agent-base/dist/helpers.d.ts +10 -0
  362. package/node_modules/agent-base/dist/helpers.d.ts.map +1 -0
  363. package/node_modules/agent-base/dist/helpers.js +37 -0
  364. package/node_modules/agent-base/dist/helpers.js.map +1 -0
  365. package/node_modules/agent-base/dist/index.d.ts +37 -0
  366. package/node_modules/agent-base/dist/index.d.ts.map +1 -0
  367. package/node_modules/agent-base/dist/index.js +146 -0
  368. package/node_modules/agent-base/dist/index.js.map +1 -0
  369. package/node_modules/agent-base/package.json +46 -0
  370. package/node_modules/balanced-match/LICENSE.md +23 -0
  371. package/node_modules/balanced-match/README.md +57 -0
  372. package/node_modules/balanced-match/dist/commonjs/index.d.ts +9 -0
  373. package/node_modules/balanced-match/dist/commonjs/index.d.ts.map +1 -0
  374. package/node_modules/balanced-match/dist/commonjs/index.js +59 -0
  375. package/node_modules/balanced-match/dist/commonjs/index.js.map +1 -0
  376. package/node_modules/balanced-match/dist/commonjs/package.json +3 -0
  377. package/node_modules/balanced-match/dist/esm/index.d.ts +9 -0
  378. package/node_modules/balanced-match/dist/esm/index.d.ts.map +1 -0
  379. package/node_modules/balanced-match/dist/esm/index.js +54 -0
  380. package/node_modules/balanced-match/dist/esm/index.js.map +1 -0
  381. package/node_modules/balanced-match/dist/esm/package.json +3 -0
  382. package/node_modules/balanced-match/package.json +68 -0
  383. package/node_modules/brace-expansion/LICENSE +23 -0
  384. package/node_modules/brace-expansion/README.md +105 -0
  385. package/node_modules/brace-expansion/dist/commonjs/index.d.ts +12 -0
  386. package/node_modules/brace-expansion/dist/commonjs/index.d.ts.map +1 -0
  387. package/node_modules/brace-expansion/dist/commonjs/index.js +333 -0
  388. package/node_modules/brace-expansion/dist/commonjs/index.js.map +1 -0
  389. package/node_modules/brace-expansion/dist/commonjs/package.json +3 -0
  390. package/node_modules/brace-expansion/dist/esm/index.d.ts +12 -0
  391. package/node_modules/brace-expansion/dist/esm/index.d.ts.map +1 -0
  392. package/node_modules/brace-expansion/dist/esm/index.js +329 -0
  393. package/node_modules/brace-expansion/dist/esm/index.js.map +1 -0
  394. package/node_modules/brace-expansion/dist/esm/package.json +3 -0
  395. package/node_modules/brace-expansion/package.json +65 -0
  396. package/node_modules/cacache/LICENSE.md +16 -0
  397. package/node_modules/cacache/README.md +715 -0
  398. package/node_modules/cacache/lib/content/path.js +29 -0
  399. package/node_modules/cacache/lib/content/read.js +165 -0
  400. package/node_modules/cacache/lib/content/rm.js +18 -0
  401. package/node_modules/cacache/lib/content/write.js +208 -0
  402. package/node_modules/cacache/lib/entry-index.js +339 -0
  403. package/node_modules/cacache/lib/get.js +170 -0
  404. package/node_modules/cacache/lib/index.js +42 -0
  405. package/node_modules/cacache/lib/memoization.js +72 -0
  406. package/node_modules/cacache/lib/put.js +80 -0
  407. package/node_modules/cacache/lib/rm.js +32 -0
  408. package/node_modules/cacache/lib/util/cache-dir.js +29 -0
  409. package/node_modules/cacache/lib/util/glob.js +7 -0
  410. package/node_modules/cacache/lib/util/hash-to-segments.js +7 -0
  411. package/node_modules/cacache/lib/util/tmp.js +36 -0
  412. package/node_modules/cacache/lib/verify.js +258 -0
  413. package/node_modules/cacache/package.json +81 -0
  414. package/node_modules/content-type/LICENSE +22 -0
  415. package/node_modules/content-type/README.md +71 -0
  416. package/node_modules/content-type/dist/index.d.ts +46 -0
  417. package/node_modules/content-type/dist/index.js +176 -0
  418. package/node_modules/content-type/dist/index.js.map +1 -0
  419. package/node_modules/content-type/package.json +52 -0
  420. package/node_modules/debug/LICENSE +20 -0
  421. package/node_modules/debug/README.md +481 -0
  422. package/node_modules/debug/package.json +64 -0
  423. package/node_modules/debug/src/browser.js +272 -0
  424. package/node_modules/debug/src/common.js +292 -0
  425. package/node_modules/debug/src/index.js +10 -0
  426. package/node_modules/debug/src/node.js +263 -0
  427. package/node_modules/fs-minipass/LICENSE +15 -0
  428. package/node_modules/fs-minipass/README.md +70 -0
  429. package/node_modules/fs-minipass/lib/index.js +443 -0
  430. package/node_modules/fs-minipass/package.json +54 -0
  431. package/node_modules/glob/LICENSE.md +63 -0
  432. package/node_modules/glob/README.md +1377 -0
  433. package/node_modules/glob/dist/commonjs/glob.d.ts +405 -0
  434. package/node_modules/glob/dist/commonjs/glob.d.ts.map +1 -0
  435. package/node_modules/glob/dist/commonjs/glob.js +241 -0
  436. package/node_modules/glob/dist/commonjs/glob.js.map +1 -0
  437. package/node_modules/glob/dist/commonjs/has-magic.d.ts +14 -0
  438. package/node_modules/glob/dist/commonjs/has-magic.d.ts.map +1 -0
  439. package/node_modules/glob/dist/commonjs/has-magic.js +24 -0
  440. package/node_modules/glob/dist/commonjs/has-magic.js.map +1 -0
  441. package/node_modules/glob/dist/commonjs/ignore.d.ts +36 -0
  442. package/node_modules/glob/dist/commonjs/ignore.d.ts.map +1 -0
  443. package/node_modules/glob/dist/commonjs/ignore.js +139 -0
  444. package/node_modules/glob/dist/commonjs/ignore.js.map +1 -0
  445. package/node_modules/glob/dist/commonjs/index.d.ts +98 -0
  446. package/node_modules/glob/dist/commonjs/index.d.ts.map +1 -0
  447. package/node_modules/glob/dist/commonjs/index.js +68 -0
  448. package/node_modules/glob/dist/commonjs/index.js.map +1 -0
  449. package/node_modules/glob/dist/commonjs/index.min.js +3 -0
  450. package/node_modules/glob/dist/commonjs/index.min.js.map +7 -0
  451. package/node_modules/glob/dist/commonjs/package.json +3 -0
  452. package/node_modules/glob/dist/commonjs/pattern.d.ts +86 -0
  453. package/node_modules/glob/dist/commonjs/pattern.d.ts.map +1 -0
  454. package/node_modules/glob/dist/commonjs/pattern.js +235 -0
  455. package/node_modules/glob/dist/commonjs/pattern.js.map +1 -0
  456. package/node_modules/glob/dist/commonjs/processor.d.ts +72 -0
  457. package/node_modules/glob/dist/commonjs/processor.d.ts.map +1 -0
  458. package/node_modules/glob/dist/commonjs/processor.js +314 -0
  459. package/node_modules/glob/dist/commonjs/processor.js.map +1 -0
  460. package/node_modules/glob/dist/commonjs/walker.d.ts +99 -0
  461. package/node_modules/glob/dist/commonjs/walker.d.ts.map +1 -0
  462. package/node_modules/glob/dist/commonjs/walker.js +402 -0
  463. package/node_modules/glob/dist/commonjs/walker.js.map +1 -0
  464. package/node_modules/glob/dist/esm/glob.d.ts +405 -0
  465. package/node_modules/glob/dist/esm/glob.d.ts.map +1 -0
  466. package/node_modules/glob/dist/esm/glob.js +237 -0
  467. package/node_modules/glob/dist/esm/glob.js.map +1 -0
  468. package/node_modules/glob/dist/esm/has-magic.d.ts +14 -0
  469. package/node_modules/glob/dist/esm/has-magic.d.ts.map +1 -0
  470. package/node_modules/glob/dist/esm/has-magic.js +20 -0
  471. package/node_modules/glob/dist/esm/has-magic.js.map +1 -0
  472. package/node_modules/glob/dist/esm/ignore.d.ts +36 -0
  473. package/node_modules/glob/dist/esm/ignore.d.ts.map +1 -0
  474. package/node_modules/glob/dist/esm/ignore.js +135 -0
  475. package/node_modules/glob/dist/esm/ignore.js.map +1 -0
  476. package/node_modules/glob/dist/esm/index.d.ts +98 -0
  477. package/node_modules/glob/dist/esm/index.d.ts.map +1 -0
  478. package/node_modules/glob/dist/esm/index.js +55 -0
  479. package/node_modules/glob/dist/esm/index.js.map +1 -0
  480. package/node_modules/glob/dist/esm/index.min.js +3 -0
  481. package/node_modules/glob/dist/esm/index.min.js.map +7 -0
  482. package/node_modules/glob/dist/esm/package.json +3 -0
  483. package/node_modules/glob/dist/esm/pattern.d.ts +86 -0
  484. package/node_modules/glob/dist/esm/pattern.d.ts.map +1 -0
  485. package/node_modules/glob/dist/esm/pattern.js +231 -0
  486. package/node_modules/glob/dist/esm/pattern.js.map +1 -0
  487. package/node_modules/glob/dist/esm/processor.d.ts +72 -0
  488. package/node_modules/glob/dist/esm/processor.d.ts.map +1 -0
  489. package/node_modules/glob/dist/esm/processor.js +307 -0
  490. package/node_modules/glob/dist/esm/processor.js.map +1 -0
  491. package/node_modules/glob/dist/esm/walker.d.ts +99 -0
  492. package/node_modules/glob/dist/esm/walker.d.ts.map +1 -0
  493. package/node_modules/glob/dist/esm/walker.js +396 -0
  494. package/node_modules/glob/dist/esm/walker.js.map +1 -0
  495. package/node_modules/glob/package.json +114 -0
  496. package/node_modules/glob/src/glob.ts +655 -0
  497. package/node_modules/glob/src/has-magic.ts +23 -0
  498. package/node_modules/glob/src/ignore.ts +162 -0
  499. package/node_modules/glob/src/index.ts +225 -0
  500. package/node_modules/glob/src/pattern.ts +286 -0
  501. package/node_modules/glob/src/processor.ts +333 -0
  502. package/node_modules/glob/src/walker.ts +523 -0
  503. package/node_modules/http-cache-semantics/LICENSE +9 -0
  504. package/node_modules/http-cache-semantics/README.md +268 -0
  505. package/node_modules/http-cache-semantics/index.js +951 -0
  506. package/node_modules/http-cache-semantics/package.json +22 -0
  507. package/node_modules/http-proxy-agent/LICENSE +22 -0
  508. package/node_modules/http-proxy-agent/README.md +44 -0
  509. package/node_modules/http-proxy-agent/dist/index.d.ts +47 -0
  510. package/node_modules/http-proxy-agent/dist/index.d.ts.map +1 -0
  511. package/node_modules/http-proxy-agent/dist/index.js +132 -0
  512. package/node_modules/http-proxy-agent/dist/index.js.map +1 -0
  513. package/node_modules/http-proxy-agent/package.json +48 -0
  514. package/node_modules/https-proxy-agent/LICENSE +22 -0
  515. package/node_modules/https-proxy-agent/README.md +70 -0
  516. package/node_modules/https-proxy-agent/dist/index.d.ts +51 -0
  517. package/node_modules/https-proxy-agent/dist/index.d.ts.map +1 -0
  518. package/node_modules/https-proxy-agent/dist/index.js +234 -0
  519. package/node_modules/https-proxy-agent/dist/index.js.map +1 -0
  520. package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +12 -0
  521. package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts.map +1 -0
  522. package/node_modules/https-proxy-agent/dist/parse-proxy-response.js +94 -0
  523. package/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
  524. package/node_modules/https-proxy-agent/package.json +51 -0
  525. package/node_modules/iconv-lite/LICENSE +21 -0
  526. package/node_modules/iconv-lite/README.md +138 -0
  527. package/node_modules/iconv-lite/encodings/dbcs-codec.js +532 -0
  528. package/node_modules/iconv-lite/encodings/dbcs-data.js +185 -0
  529. package/node_modules/iconv-lite/encodings/index.js +23 -0
  530. package/node_modules/iconv-lite/encodings/internal.js +218 -0
  531. package/node_modules/iconv-lite/encodings/sbcs-codec.js +75 -0
  532. package/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
  533. package/node_modules/iconv-lite/encodings/sbcs-data.js +180 -0
  534. package/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
  535. package/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
  536. package/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
  537. package/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
  538. package/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
  539. package/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
  540. package/node_modules/iconv-lite/encodings/tables/gbk-added.json +56 -0
  541. package/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
  542. package/node_modules/iconv-lite/encodings/utf16.js +187 -0
  543. package/node_modules/iconv-lite/encodings/utf32.js +314 -0
  544. package/node_modules/iconv-lite/encodings/utf7.js +283 -0
  545. package/node_modules/iconv-lite/lib/bom-handling.js +48 -0
  546. package/node_modules/iconv-lite/lib/helpers/merge-exports.js +13 -0
  547. package/node_modules/iconv-lite/lib/index.d.ts +129 -0
  548. package/node_modules/iconv-lite/lib/index.js +182 -0
  549. package/node_modules/iconv-lite/lib/streams.js +105 -0
  550. package/node_modules/iconv-lite/package.json +70 -0
  551. package/node_modules/iconv-lite/types/encodings.d.ts +425 -0
  552. package/node_modules/ip-address/LICENSE +19 -0
  553. package/node_modules/ip-address/README.md +308 -0
  554. package/node_modules/ip-address/dist/address-error.d.ts +15 -0
  555. package/node_modules/ip-address/dist/address-error.js +12 -0
  556. package/node_modules/ip-address/dist/address-error.js.map +1 -0
  557. package/node_modules/ip-address/dist/common.d.ts +74 -0
  558. package/node_modules/ip-address/dist/common.js +154 -0
  559. package/node_modules/ip-address/dist/common.js.map +1 -0
  560. package/node_modules/ip-address/dist/ip-address.d.ts +7 -0
  561. package/node_modules/ip-address/dist/ip-address.js +35 -0
  562. package/node_modules/ip-address/dist/ip-address.js.map +1 -0
  563. package/node_modules/ip-address/dist/ipv4.d.ts +347 -0
  564. package/node_modules/ip-address/dist/ipv4.js +602 -0
  565. package/node_modules/ip-address/dist/ipv4.js.map +1 -0
  566. package/node_modules/ip-address/dist/ipv6.d.ts +634 -0
  567. package/node_modules/ip-address/dist/ipv6.js +1461 -0
  568. package/node_modules/ip-address/dist/ipv6.js.map +1 -0
  569. package/node_modules/ip-address/dist/v4/constants.d.ts +16 -0
  570. package/node_modules/ip-address/dist/v4/constants.js +51 -0
  571. package/node_modules/ip-address/dist/v4/constants.js.map +1 -0
  572. package/node_modules/ip-address/dist/v6/constants.d.ts +61 -0
  573. package/node_modules/ip-address/dist/v6/constants.js +131 -0
  574. package/node_modules/ip-address/dist/v6/constants.js.map +1 -0
  575. package/node_modules/ip-address/dist/v6/helpers.d.ts +18 -0
  576. package/node_modules/ip-address/dist/v6/helpers.js +54 -0
  577. package/node_modules/ip-address/dist/v6/helpers.js.map +1 -0
  578. package/node_modules/ip-address/dist/v6/regular-expressions.d.ts +5 -0
  579. package/node_modules/ip-address/dist/v6/regular-expressions.js +95 -0
  580. package/node_modules/ip-address/dist/v6/regular-expressions.js.map +1 -0
  581. package/node_modules/ip-address/package.json +91 -0
  582. package/node_modules/lru-cache/LICENSE.md +55 -0
  583. package/node_modules/lru-cache/README.md +469 -0
  584. package/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel-browser.d.ts.map +1 -0
  585. package/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel-browser.js.map +1 -0
  586. package/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.d.ts +5 -0
  587. package/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.js +7 -0
  588. package/node_modules/lru-cache/dist/commonjs/browser/index.d.ts +1400 -0
  589. package/node_modules/lru-cache/dist/commonjs/browser/index.d.ts.map +1 -0
  590. package/node_modules/lru-cache/dist/commonjs/browser/index.js +1733 -0
  591. package/node_modules/lru-cache/dist/commonjs/browser/index.js.map +1 -0
  592. package/node_modules/lru-cache/dist/commonjs/browser/index.min.js +2 -0
  593. package/node_modules/lru-cache/dist/commonjs/browser/index.min.js.map +7 -0
  594. package/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts +12 -0
  595. package/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts.map +1 -0
  596. package/node_modules/lru-cache/dist/commonjs/browser/perf.js +10 -0
  597. package/node_modules/lru-cache/dist/commonjs/browser/perf.js.map +1 -0
  598. package/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.cjs.map +1 -0
  599. package/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.d.cts.map +1 -0
  600. package/node_modules/lru-cache/dist/commonjs/diagnostics-channel.d.ts +5 -0
  601. package/node_modules/lru-cache/dist/commonjs/diagnostics-channel.js +7 -0
  602. package/node_modules/lru-cache/dist/commonjs/index.d.ts +1400 -0
  603. package/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -0
  604. package/node_modules/lru-cache/dist/commonjs/index.js +1733 -0
  605. package/node_modules/lru-cache/dist/commonjs/index.js.map +1 -0
  606. package/node_modules/lru-cache/dist/commonjs/index.min.js +2 -0
  607. package/node_modules/lru-cache/dist/commonjs/index.min.js.map +7 -0
  608. package/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel-node.d.ts.map +1 -0
  609. package/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel-node.js.map +1 -0
  610. package/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.d.ts +5 -0
  611. package/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.js +9 -0
  612. package/node_modules/lru-cache/dist/commonjs/node/index.d.ts +1400 -0
  613. package/node_modules/lru-cache/dist/commonjs/node/index.d.ts.map +1 -0
  614. package/node_modules/lru-cache/dist/commonjs/node/index.js +1733 -0
  615. package/node_modules/lru-cache/dist/commonjs/node/index.js.map +1 -0
  616. package/node_modules/lru-cache/dist/commonjs/node/index.min.js +2 -0
  617. package/node_modules/lru-cache/dist/commonjs/node/index.min.js.map +7 -0
  618. package/node_modules/lru-cache/dist/commonjs/node/perf.d.ts +12 -0
  619. package/node_modules/lru-cache/dist/commonjs/node/perf.d.ts.map +1 -0
  620. package/node_modules/lru-cache/dist/commonjs/node/perf.js +10 -0
  621. package/node_modules/lru-cache/dist/commonjs/node/perf.js.map +1 -0
  622. package/node_modules/lru-cache/dist/commonjs/package.json +3 -0
  623. package/node_modules/lru-cache/dist/commonjs/perf.d.ts +12 -0
  624. package/node_modules/lru-cache/dist/commonjs/perf.d.ts.map +1 -0
  625. package/node_modules/lru-cache/dist/commonjs/perf.js +10 -0
  626. package/node_modules/lru-cache/dist/commonjs/perf.js.map +1 -0
  627. package/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel-react-native.d.ts.map +1 -0
  628. package/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel-react-native.js.map +1 -0
  629. package/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel.d.ts +5 -0
  630. package/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel.js +7 -0
  631. package/node_modules/lru-cache/dist/commonjs/react-native/index.d.ts +1400 -0
  632. package/node_modules/lru-cache/dist/commonjs/react-native/index.d.ts.map +1 -0
  633. package/node_modules/lru-cache/dist/commonjs/react-native/index.js +1733 -0
  634. package/node_modules/lru-cache/dist/commonjs/react-native/index.js.map +1 -0
  635. package/node_modules/lru-cache/dist/commonjs/react-native/perf.d.ts +12 -0
  636. package/node_modules/lru-cache/dist/commonjs/react-native/perf.d.ts.map +1 -0
  637. package/node_modules/lru-cache/dist/commonjs/react-native/perf.js +10 -0
  638. package/node_modules/lru-cache/dist/commonjs/react-native/perf.js.map +1 -0
  639. package/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.d.ts.map +1 -0
  640. package/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.js.map +1 -0
  641. package/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.d.ts +5 -0
  642. package/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.js +4 -0
  643. package/node_modules/lru-cache/dist/esm/browser/index.d.ts +1400 -0
  644. package/node_modules/lru-cache/dist/esm/browser/index.d.ts.map +1 -0
  645. package/node_modules/lru-cache/dist/esm/browser/index.js +1729 -0
  646. package/node_modules/lru-cache/dist/esm/browser/index.js.map +1 -0
  647. package/node_modules/lru-cache/dist/esm/browser/index.min.js +2 -0
  648. package/node_modules/lru-cache/dist/esm/browser/index.min.js.map +7 -0
  649. package/node_modules/lru-cache/dist/esm/browser/perf.d.ts +12 -0
  650. package/node_modules/lru-cache/dist/esm/browser/perf.d.ts.map +1 -0
  651. package/node_modules/lru-cache/dist/esm/browser/perf.js +7 -0
  652. package/node_modules/lru-cache/dist/esm/browser/perf.js.map +1 -0
  653. package/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.d.mts.map +1 -0
  654. package/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.mjs.map +1 -0
  655. package/node_modules/lru-cache/dist/esm/diagnostics-channel.d.ts +5 -0
  656. package/node_modules/lru-cache/dist/esm/diagnostics-channel.js +19 -0
  657. package/node_modules/lru-cache/dist/esm/index.d.ts +1400 -0
  658. package/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -0
  659. package/node_modules/lru-cache/dist/esm/index.js +1729 -0
  660. package/node_modules/lru-cache/dist/esm/index.js.map +1 -0
  661. package/node_modules/lru-cache/dist/esm/index.min.js +2 -0
  662. package/node_modules/lru-cache/dist/esm/index.min.js.map +7 -0
  663. package/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.d.ts.map +1 -0
  664. package/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.js.map +1 -0
  665. package/node_modules/lru-cache/dist/esm/node/diagnostics-channel.d.ts +5 -0
  666. package/node_modules/lru-cache/dist/esm/node/diagnostics-channel.js +6 -0
  667. package/node_modules/lru-cache/dist/esm/node/index.d.ts +1400 -0
  668. package/node_modules/lru-cache/dist/esm/node/index.d.ts.map +1 -0
  669. package/node_modules/lru-cache/dist/esm/node/index.js +1729 -0
  670. package/node_modules/lru-cache/dist/esm/node/index.js.map +1 -0
  671. package/node_modules/lru-cache/dist/esm/node/index.min.js +2 -0
  672. package/node_modules/lru-cache/dist/esm/node/index.min.js.map +7 -0
  673. package/node_modules/lru-cache/dist/esm/node/perf.d.ts +12 -0
  674. package/node_modules/lru-cache/dist/esm/node/perf.d.ts.map +1 -0
  675. package/node_modules/lru-cache/dist/esm/node/perf.js +7 -0
  676. package/node_modules/lru-cache/dist/esm/node/perf.js.map +1 -0
  677. package/node_modules/lru-cache/dist/esm/package.json +3 -0
  678. package/node_modules/lru-cache/dist/esm/perf.d.ts +12 -0
  679. package/node_modules/lru-cache/dist/esm/perf.d.ts.map +1 -0
  680. package/node_modules/lru-cache/dist/esm/perf.js +7 -0
  681. package/node_modules/lru-cache/dist/esm/perf.js.map +1 -0
  682. package/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel-react-native.d.ts.map +1 -0
  683. package/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel-react-native.js.map +1 -0
  684. package/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel.d.ts +5 -0
  685. package/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel.js +4 -0
  686. package/node_modules/lru-cache/dist/esm/react-native/index.d.ts +1400 -0
  687. package/node_modules/lru-cache/dist/esm/react-native/index.d.ts.map +1 -0
  688. package/node_modules/lru-cache/dist/esm/react-native/index.js +1729 -0
  689. package/node_modules/lru-cache/dist/esm/react-native/index.js.map +1 -0
  690. package/node_modules/lru-cache/dist/esm/react-native/perf.d.ts +12 -0
  691. package/node_modules/lru-cache/dist/esm/react-native/perf.d.ts.map +1 -0
  692. package/node_modules/lru-cache/dist/esm/react-native/perf.js +7 -0
  693. package/node_modules/lru-cache/dist/esm/react-native/perf.js.map +1 -0
  694. package/node_modules/lru-cache/package.json +180 -0
  695. package/node_modules/make-fetch-happen/LICENSE +16 -0
  696. package/node_modules/make-fetch-happen/README.md +364 -0
  697. package/node_modules/make-fetch-happen/lib/cache/entry.js +471 -0
  698. package/node_modules/make-fetch-happen/lib/cache/errors.js +11 -0
  699. package/node_modules/make-fetch-happen/lib/cache/index.js +49 -0
  700. package/node_modules/make-fetch-happen/lib/cache/key.js +17 -0
  701. package/node_modules/make-fetch-happen/lib/cache/policy.js +161 -0
  702. package/node_modules/make-fetch-happen/lib/fetch.js +118 -0
  703. package/node_modules/make-fetch-happen/lib/index.js +41 -0
  704. package/node_modules/make-fetch-happen/lib/options.js +59 -0
  705. package/node_modules/make-fetch-happen/lib/pipeline.js +41 -0
  706. package/node_modules/make-fetch-happen/lib/remote.js +134 -0
  707. package/node_modules/make-fetch-happen/package.json +75 -0
  708. package/node_modules/minimatch/LICENSE.md +55 -0
  709. package/node_modules/minimatch/README.md +556 -0
  710. package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts +2 -0
  711. package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map +1 -0
  712. package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
  713. package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map +1 -0
  714. package/node_modules/minimatch/dist/commonjs/escape.d.ts +15 -0
  715. package/node_modules/minimatch/dist/commonjs/escape.d.ts.map +1 -0
  716. package/node_modules/minimatch/dist/commonjs/escape.js +30 -0
  717. package/node_modules/minimatch/dist/commonjs/escape.js.map +1 -0
  718. package/node_modules/minimatch/dist/commonjs/index.d.ts +188 -0
  719. package/node_modules/minimatch/dist/commonjs/index.d.ts.map +1 -0
  720. package/node_modules/minimatch/dist/commonjs/index.js +1600 -0
  721. package/node_modules/minimatch/dist/commonjs/index.js.map +1 -0
  722. package/node_modules/minimatch/dist/commonjs/package.json +3 -0
  723. package/node_modules/minimatch/dist/commonjs/unescape.d.ts +22 -0
  724. package/node_modules/minimatch/dist/commonjs/unescape.d.ts.map +1 -0
  725. package/node_modules/minimatch/dist/commonjs/unescape.js +38 -0
  726. package/node_modules/minimatch/dist/commonjs/unescape.js.map +1 -0
  727. package/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts +2 -0
  728. package/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map +1 -0
  729. package/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
  730. package/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map +1 -0
  731. package/node_modules/minimatch/dist/esm/escape.d.ts +15 -0
  732. package/node_modules/minimatch/dist/esm/escape.d.ts.map +1 -0
  733. package/node_modules/minimatch/dist/esm/escape.js +26 -0
  734. package/node_modules/minimatch/dist/esm/escape.js.map +1 -0
  735. package/node_modules/minimatch/dist/esm/index.d.ts +188 -0
  736. package/node_modules/minimatch/dist/esm/index.d.ts.map +1 -0
  737. package/node_modules/minimatch/dist/esm/index.js +1589 -0
  738. package/node_modules/minimatch/dist/esm/index.js.map +1 -0
  739. package/node_modules/minimatch/dist/esm/package.json +3 -0
  740. package/node_modules/minimatch/dist/esm/unescape.d.ts +22 -0
  741. package/node_modules/minimatch/dist/esm/unescape.d.ts.map +1 -0
  742. package/node_modules/minimatch/dist/esm/unescape.js +34 -0
  743. package/node_modules/minimatch/dist/esm/unescape.js.map +1 -0
  744. package/node_modules/minimatch/package.json +74 -0
  745. package/node_modules/minipass/LICENSE.md +55 -0
  746. package/node_modules/minipass/README.md +825 -0
  747. package/node_modules/minipass/dist/commonjs/index.d.ts +545 -0
  748. package/node_modules/minipass/dist/commonjs/index.d.ts.map +1 -0
  749. package/node_modules/minipass/dist/commonjs/index.js +1038 -0
  750. package/node_modules/minipass/dist/commonjs/index.js.map +1 -0
  751. package/node_modules/minipass/dist/commonjs/package.json +3 -0
  752. package/node_modules/minipass/dist/esm/index.d.ts +545 -0
  753. package/node_modules/minipass/dist/esm/index.d.ts.map +1 -0
  754. package/node_modules/minipass/dist/esm/index.js +1020 -0
  755. package/node_modules/minipass/dist/esm/index.js.map +1 -0
  756. package/node_modules/minipass/dist/esm/package.json +3 -0
  757. package/node_modules/minipass/package.json +77 -0
  758. package/node_modules/minipass-collect/LICENSE +15 -0
  759. package/node_modules/minipass-collect/README.md +48 -0
  760. package/node_modules/minipass-collect/index.js +71 -0
  761. package/node_modules/minipass-collect/package.json +30 -0
  762. package/node_modules/minipass-fetch/LICENSE +28 -0
  763. package/node_modules/minipass-fetch/README.md +29 -0
  764. package/node_modules/minipass-fetch/lib/abort-error.js +17 -0
  765. package/node_modules/minipass-fetch/lib/blob.js +97 -0
  766. package/node_modules/minipass-fetch/lib/body.js +360 -0
  767. package/node_modules/minipass-fetch/lib/fetch-error.js +32 -0
  768. package/node_modules/minipass-fetch/lib/headers.js +267 -0
  769. package/node_modules/minipass-fetch/lib/index.js +376 -0
  770. package/node_modules/minipass-fetch/lib/request.js +282 -0
  771. package/node_modules/minipass-fetch/lib/response.js +90 -0
  772. package/node_modules/minipass-fetch/package.json +70 -0
  773. package/node_modules/minipass-flush/LICENSE.md +55 -0
  774. package/node_modules/minipass-flush/README.md +47 -0
  775. package/node_modules/minipass-flush/index.js +39 -0
  776. package/node_modules/minipass-flush/node_modules/minipass/LICENSE +15 -0
  777. package/node_modules/minipass-flush/node_modules/minipass/README.md +728 -0
  778. package/node_modules/minipass-flush/node_modules/minipass/index.d.ts +155 -0
  779. package/node_modules/minipass-flush/node_modules/minipass/index.js +649 -0
  780. package/node_modules/minipass-flush/node_modules/minipass/package.json +56 -0
  781. package/node_modules/minipass-flush/package.json +42 -0
  782. package/node_modules/minipass-pipeline/LICENSE +15 -0
  783. package/node_modules/minipass-pipeline/README.md +69 -0
  784. package/node_modules/minipass-pipeline/index.js +128 -0
  785. package/node_modules/minipass-pipeline/node_modules/minipass/LICENSE +15 -0
  786. package/node_modules/minipass-pipeline/node_modules/minipass/README.md +728 -0
  787. package/node_modules/minipass-pipeline/node_modules/minipass/index.d.ts +155 -0
  788. package/node_modules/minipass-pipeline/node_modules/minipass/index.js +649 -0
  789. package/node_modules/minipass-pipeline/node_modules/minipass/package.json +56 -0
  790. package/node_modules/minipass-pipeline/package.json +29 -0
  791. package/node_modules/minipass-sized/LICENSE +15 -0
  792. package/node_modules/minipass-sized/README.md +30 -0
  793. package/node_modules/minipass-sized/dist/commonjs/index.d.ts +21 -0
  794. package/node_modules/minipass-sized/dist/commonjs/index.d.ts.map +1 -0
  795. package/node_modules/minipass-sized/dist/commonjs/index.js +69 -0
  796. package/node_modules/minipass-sized/dist/commonjs/index.js.map +1 -0
  797. package/node_modules/minipass-sized/dist/commonjs/package.json +3 -0
  798. package/node_modules/minipass-sized/dist/esm/index.d.ts +21 -0
  799. package/node_modules/minipass-sized/dist/esm/index.d.ts.map +1 -0
  800. package/node_modules/minipass-sized/dist/esm/index.js +64 -0
  801. package/node_modules/minipass-sized/dist/esm/index.js.map +1 -0
  802. package/node_modules/minipass-sized/dist/esm/package.json +3 -0
  803. package/node_modules/minipass-sized/package.json +69 -0
  804. package/node_modules/minizlib/LICENSE +26 -0
  805. package/node_modules/minizlib/README.md +64 -0
  806. package/node_modules/minizlib/dist/commonjs/constants.d.ts +2 -0
  807. package/node_modules/minizlib/dist/commonjs/constants.d.ts.map +1 -0
  808. package/node_modules/minizlib/dist/commonjs/constants.js +123 -0
  809. package/node_modules/minizlib/dist/commonjs/constants.js.map +1 -0
  810. package/node_modules/minizlib/dist/commonjs/index.d.ts +99 -0
  811. package/node_modules/minizlib/dist/commonjs/index.d.ts.map +1 -0
  812. package/node_modules/minizlib/dist/commonjs/index.js +416 -0
  813. package/node_modules/minizlib/dist/commonjs/index.js.map +1 -0
  814. package/node_modules/minizlib/dist/commonjs/package.json +3 -0
  815. package/node_modules/minizlib/dist/esm/constants.d.ts +2 -0
  816. package/node_modules/minizlib/dist/esm/constants.d.ts.map +1 -0
  817. package/node_modules/minizlib/dist/esm/constants.js +117 -0
  818. package/node_modules/minizlib/dist/esm/constants.js.map +1 -0
  819. package/node_modules/minizlib/dist/esm/index.d.ts +99 -0
  820. package/node_modules/minizlib/dist/esm/index.d.ts.map +1 -0
  821. package/node_modules/minizlib/dist/esm/index.js +363 -0
  822. package/node_modules/minizlib/dist/esm/index.js.map +1 -0
  823. package/node_modules/minizlib/dist/esm/package.json +3 -0
  824. package/node_modules/minizlib/package.json +80 -0
  825. package/node_modules/ms/index.js +162 -0
  826. package/node_modules/ms/license.md +21 -0
  827. package/node_modules/ms/package.json +38 -0
  828. package/node_modules/ms/readme.md +59 -0
  829. package/node_modules/negotiator/LICENSE +24 -0
  830. package/node_modules/negotiator/README.md +212 -0
  831. package/node_modules/negotiator/index.js +83 -0
  832. package/node_modules/negotiator/lib/accept.js +54 -0
  833. package/node_modules/negotiator/lib/charset.js +145 -0
  834. package/node_modules/negotiator/lib/encoding.js +184 -0
  835. package/node_modules/negotiator/lib/language.js +158 -0
  836. package/node_modules/negotiator/lib/mediaType.js +176 -0
  837. package/node_modules/negotiator/package.json +49 -0
  838. package/node_modules/p-map/index.d.ts +392 -0
  839. package/node_modules/p-map/index.js +663 -0
  840. package/node_modules/p-map/license +9 -0
  841. package/node_modules/p-map/package.json +57 -0
  842. package/node_modules/p-map/readme.md +404 -0
  843. package/node_modules/path-scurry/LICENSE.md +55 -0
  844. package/node_modules/path-scurry/README.md +635 -0
  845. package/node_modules/path-scurry/dist/commonjs/index.d.ts +1122 -0
  846. package/node_modules/path-scurry/dist/commonjs/index.d.ts.map +1 -0
  847. package/node_modules/path-scurry/dist/commonjs/index.js +2056 -0
  848. package/node_modules/path-scurry/dist/commonjs/index.js.map +1 -0
  849. package/node_modules/path-scurry/dist/commonjs/package.json +3 -0
  850. package/node_modules/path-scurry/dist/esm/index.d.ts +1122 -0
  851. package/node_modules/path-scurry/dist/esm/index.d.ts.map +1 -0
  852. package/node_modules/path-scurry/dist/esm/index.js +2011 -0
  853. package/node_modules/path-scurry/dist/esm/index.js.map +1 -0
  854. package/node_modules/path-scurry/dist/esm/package.json +3 -0
  855. package/node_modules/path-scurry/package.json +72 -0
  856. package/node_modules/proc-log/LICENSE +15 -0
  857. package/node_modules/proc-log/README.md +226 -0
  858. package/node_modules/proc-log/lib/index.js +158 -0
  859. package/node_modules/proc-log/package.json +46 -0
  860. package/node_modules/proxy-agent-negotiate/dist/index.d.ts +14 -0
  861. package/node_modules/proxy-agent-negotiate/dist/index.d.ts.map +1 -0
  862. package/node_modules/proxy-agent-negotiate/dist/index.js +35 -0
  863. package/node_modules/proxy-agent-negotiate/dist/index.js.map +1 -0
  864. package/node_modules/proxy-agent-negotiate/package.json +47 -0
  865. package/node_modules/safer-buffer/LICENSE +21 -0
  866. package/node_modules/safer-buffer/Porting-Buffer.md +268 -0
  867. package/node_modules/safer-buffer/Readme.md +156 -0
  868. package/node_modules/safer-buffer/dangerous.js +58 -0
  869. package/node_modules/safer-buffer/package.json +34 -0
  870. package/node_modules/safer-buffer/safer.js +77 -0
  871. package/node_modules/safer-buffer/tests.js +406 -0
  872. package/node_modules/semver/LICENSE +15 -0
  873. package/node_modules/semver/README.md +680 -0
  874. package/node_modules/semver/bin/semver.js +195 -0
  875. package/node_modules/semver/classes/comparator.js +143 -0
  876. package/node_modules/semver/classes/index.js +7 -0
  877. package/node_modules/semver/classes/range.js +577 -0
  878. package/node_modules/semver/classes/semver.js +350 -0
  879. package/node_modules/semver/functions/clean.js +8 -0
  880. package/node_modules/semver/functions/cmp.js +54 -0
  881. package/node_modules/semver/functions/coerce.js +62 -0
  882. package/node_modules/semver/functions/compare-build.js +9 -0
  883. package/node_modules/semver/functions/compare-loose.js +5 -0
  884. package/node_modules/semver/functions/compare.js +7 -0
  885. package/node_modules/semver/functions/diff.js +60 -0
  886. package/node_modules/semver/functions/eq.js +5 -0
  887. package/node_modules/semver/functions/gt.js +5 -0
  888. package/node_modules/semver/functions/gte.js +5 -0
  889. package/node_modules/semver/functions/inc.js +21 -0
  890. package/node_modules/semver/functions/lt.js +5 -0
  891. package/node_modules/semver/functions/lte.js +5 -0
  892. package/node_modules/semver/functions/major.js +5 -0
  893. package/node_modules/semver/functions/minor.js +5 -0
  894. package/node_modules/semver/functions/neq.js +5 -0
  895. package/node_modules/semver/functions/parse.js +18 -0
  896. package/node_modules/semver/functions/patch.js +5 -0
  897. package/node_modules/semver/functions/prerelease.js +8 -0
  898. package/node_modules/semver/functions/rcompare.js +5 -0
  899. package/node_modules/semver/functions/rsort.js +5 -0
  900. package/node_modules/semver/functions/satisfies.js +12 -0
  901. package/node_modules/semver/functions/sort.js +5 -0
  902. package/node_modules/semver/functions/truncate.js +48 -0
  903. package/node_modules/semver/functions/valid.js +8 -0
  904. package/node_modules/semver/index.js +93 -0
  905. package/node_modules/semver/internal/constants.js +67 -0
  906. package/node_modules/semver/internal/debug.js +11 -0
  907. package/node_modules/semver/internal/identifiers.js +29 -0
  908. package/node_modules/semver/internal/lrucache.js +42 -0
  909. package/node_modules/semver/internal/parse-options.js +17 -0
  910. package/node_modules/semver/internal/re.js +223 -0
  911. package/node_modules/semver/internal/trim-comparator-whitespace.js +438 -0
  912. package/node_modules/semver/package.json +78 -0
  913. package/node_modules/semver/preload.js +4 -0
  914. package/node_modules/semver/range.bnf +17 -0
  915. package/node_modules/semver/ranges/gtr.js +6 -0
  916. package/node_modules/semver/ranges/intersects.js +9 -0
  917. package/node_modules/semver/ranges/ltr.js +6 -0
  918. package/node_modules/semver/ranges/max-satisfying.js +27 -0
  919. package/node_modules/semver/ranges/min-satisfying.js +26 -0
  920. package/node_modules/semver/ranges/min-version.js +63 -0
  921. package/node_modules/semver/ranges/outside.js +82 -0
  922. package/node_modules/semver/ranges/simplify.js +49 -0
  923. package/node_modules/semver/ranges/subset.js +249 -0
  924. package/node_modules/semver/ranges/to-comparators.js +10 -0
  925. package/node_modules/semver/ranges/valid.js +13 -0
  926. package/node_modules/sigstore/LICENSE +202 -0
  927. package/node_modules/sigstore/README.md +219 -0
  928. package/node_modules/sigstore/dist/config.d.ts +38 -0
  929. package/node_modules/sigstore/dist/config.js +126 -0
  930. package/node_modules/sigstore/dist/index.d.ts +9 -0
  931. package/node_modules/sigstore/dist/index.js +34 -0
  932. package/node_modules/sigstore/dist/sigstore.d.ts +11 -0
  933. package/node_modules/sigstore/dist/sigstore.js +112 -0
  934. package/node_modules/sigstore/package.json +47 -0
  935. package/node_modules/smart-buffer/.prettierrc.yaml +5 -0
  936. package/node_modules/smart-buffer/.travis.yml +13 -0
  937. package/node_modules/smart-buffer/LICENSE +20 -0
  938. package/node_modules/smart-buffer/README.md +633 -0
  939. package/node_modules/smart-buffer/build/smartbuffer.js +1233 -0
  940. package/node_modules/smart-buffer/build/smartbuffer.js.map +1 -0
  941. package/node_modules/smart-buffer/build/utils.js +108 -0
  942. package/node_modules/smart-buffer/build/utils.js.map +1 -0
  943. package/node_modules/smart-buffer/docs/CHANGELOG.md +70 -0
  944. package/node_modules/smart-buffer/docs/README_v3.md +367 -0
  945. package/node_modules/smart-buffer/docs/ROADMAP.md +0 -0
  946. package/node_modules/smart-buffer/package.json +79 -0
  947. package/node_modules/smart-buffer/typings/smartbuffer.d.ts +755 -0
  948. package/node_modules/smart-buffer/typings/utils.d.ts +66 -0
  949. package/node_modules/socks/.prettierrc.yaml +7 -0
  950. package/node_modules/socks/LICENSE +20 -0
  951. package/node_modules/socks/README.md +686 -0
  952. package/node_modules/socks/build/client/socksclient.js +793 -0
  953. package/node_modules/socks/build/client/socksclient.js.map +1 -0
  954. package/node_modules/socks/build/common/constants.js +108 -0
  955. package/node_modules/socks/build/common/constants.js.map +1 -0
  956. package/node_modules/socks/build/common/helpers.js +166 -0
  957. package/node_modules/socks/build/common/helpers.js.map +1 -0
  958. package/node_modules/socks/build/common/receivebuffer.js +43 -0
  959. package/node_modules/socks/build/common/receivebuffer.js.map +1 -0
  960. package/node_modules/socks/build/common/util.js +25 -0
  961. package/node_modules/socks/build/common/util.js.map +1 -0
  962. package/node_modules/socks/build/index.js +18 -0
  963. package/node_modules/socks/build/index.js.map +1 -0
  964. package/node_modules/socks/docs/examples/index.md +17 -0
  965. package/node_modules/socks/docs/examples/javascript/associateExample.md +90 -0
  966. package/node_modules/socks/docs/examples/javascript/bindExample.md +83 -0
  967. package/node_modules/socks/docs/examples/javascript/connectExample.md +258 -0
  968. package/node_modules/socks/docs/examples/typescript/associateExample.md +93 -0
  969. package/node_modules/socks/docs/examples/typescript/bindExample.md +86 -0
  970. package/node_modules/socks/docs/examples/typescript/connectExample.md +265 -0
  971. package/node_modules/socks/docs/index.md +5 -0
  972. package/node_modules/socks/docs/migratingFromV1.md +86 -0
  973. package/node_modules/socks/package.json +58 -0
  974. package/node_modules/socks/typings/client/socksclient.d.ts +162 -0
  975. package/node_modules/socks/typings/common/constants.d.ts +151 -0
  976. package/node_modules/socks/typings/common/helpers.d.ts +17 -0
  977. package/node_modules/socks/typings/common/receiveBuffer.d.ts +12 -0
  978. package/node_modules/socks/typings/common/util.d.ts +14 -0
  979. package/node_modules/socks/typings/index.d.ts +1 -0
  980. package/node_modules/socks-proxy-agent/LICENSE +22 -0
  981. package/node_modules/socks-proxy-agent/README.md +50 -0
  982. package/node_modules/socks-proxy-agent/dist/index.d.ts +25 -0
  983. package/node_modules/socks-proxy-agent/dist/index.d.ts.map +1 -0
  984. package/node_modules/socks-proxy-agent/dist/index.js +169 -0
  985. package/node_modules/socks-proxy-agent/dist/index.js.map +1 -0
  986. package/node_modules/socks-proxy-agent/package.json +142 -0
  987. package/node_modules/ssri/LICENSE.md +16 -0
  988. package/node_modules/ssri/README.md +528 -0
  989. package/node_modules/ssri/lib/index.js +550 -0
  990. package/node_modules/ssri/package.json +66 -0
  991. package/node_modules/tuf-js/LICENSE +21 -0
  992. package/node_modules/tuf-js/README.md +3 -0
  993. package/node_modules/tuf-js/dist/config.d.ts +15 -0
  994. package/node_modules/tuf-js/dist/config.js +16 -0
  995. package/node_modules/tuf-js/dist/error.d.ts +22 -0
  996. package/node_modules/tuf-js/dist/error.js +49 -0
  997. package/node_modules/tuf-js/dist/fetcher.d.ts +25 -0
  998. package/node_modules/tuf-js/dist/fetcher.js +131 -0
  999. package/node_modules/tuf-js/dist/index.d.ts +6 -0
  1000. package/node_modules/tuf-js/dist/index.js +9 -0
  1001. package/node_modules/tuf-js/dist/store.d.ts +18 -0
  1002. package/node_modules/tuf-js/dist/store.js +219 -0
  1003. package/node_modules/tuf-js/dist/updater.d.ts +35 -0
  1004. package/node_modules/tuf-js/dist/updater.js +379 -0
  1005. package/node_modules/tuf-js/dist/utils/tmpfile.d.ts +3 -0
  1006. package/node_modules/tuf-js/dist/utils/tmpfile.js +25 -0
  1007. package/node_modules/tuf-js/dist/utils/url.d.ts +1 -0
  1008. package/node_modules/tuf-js/dist/utils/url.js +13 -0
  1009. package/node_modules/tuf-js/package.json +43 -0
  1010. package/node_modules/yallist/LICENSE +15 -0
  1011. package/node_modules/yallist/README.md +204 -0
  1012. package/node_modules/yallist/iterator.js +8 -0
  1013. package/node_modules/yallist/package.json +29 -0
  1014. package/node_modules/yallist/yallist.js +426 -0
  1015. package/npm-shrinkwrap.json +771 -0
  1016. package/package.json +56 -2
  1017. package/place_the_release/place_the_release.mjs +132 -0
  1018. package/read_the_release_registry/read_the_release_registry.mjs +255 -0
  1019. package/refuse_in_words/refuse_in_words.mjs +31 -0
  1020. package/signers.txt +11 -0
  1021. package/unpack_the_release_layer/unpack_the_release_layer.mjs +286 -0
  1022. package/verify_the_release_signature/verify_the_release_signature.mjs +174 -0
@@ -0,0 +1,1461 @@
1
+ "use strict";
2
+ /* eslint-disable prefer-destructuring */
3
+ /* eslint-disable no-param-reassign */
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
16
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
17
+ }) : function(o, v) {
18
+ o["default"] = v;
19
+ });
20
+ var __importStar = (this && this.__importStar) || function (mod) {
21
+ if (mod && mod.__esModule) return mod;
22
+ var result = {};
23
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
24
+ __setModuleDefault(result, mod);
25
+ return result;
26
+ };
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ exports.Address6 = void 0;
29
+ const common = __importStar(require("./common"));
30
+ const constants4 = __importStar(require("./v4/constants"));
31
+ const constants6 = __importStar(require("./v6/constants"));
32
+ const helpers = __importStar(require("./v6/helpers"));
33
+ const ipv4_1 = require("./ipv4");
34
+ const regular_expressions_1 = require("./v6/regular-expressions");
35
+ const address_error_1 = require("./address-error");
36
+ const common_1 = require("./common");
37
+ const isCorrect6 = common.isCorrect(constants6.BITS);
38
+ function assert(condition) {
39
+ if (!condition) {
40
+ throw new Error('Assertion failed.');
41
+ }
42
+ }
43
+ function addCommas(number) {
44
+ const r = /(\d+)(\d{3})/;
45
+ while (r.test(number)) {
46
+ number = number.replace(r, '$1,$2');
47
+ }
48
+ return number;
49
+ }
50
+ function spanLeadingZeroes4(n) {
51
+ n = n.replace(/^(0{1,})([1-9]+)$/, '<span class="parse-error">$1</span>$2');
52
+ n = n.replace(/^(0{1,})(0)$/, '<span class="parse-error">$1</span>$2');
53
+ return n;
54
+ }
55
+ /*
56
+ * A helper function to compact an array
57
+ */
58
+ function compact(address, slice) {
59
+ const s1 = [];
60
+ const s2 = [];
61
+ let i;
62
+ for (i = 0; i < address.length; i++) {
63
+ if (i < slice[0]) {
64
+ s1.push(address[i]);
65
+ }
66
+ else if (i > slice[1]) {
67
+ s2.push(address[i]);
68
+ }
69
+ }
70
+ return s1.concat(['compact']).concat(s2);
71
+ }
72
+ function paddedHex(octet) {
73
+ return parseInt(octet, 16).toString(16).padStart(4, '0');
74
+ }
75
+ function unsignByte(b) {
76
+ return b & 0xff;
77
+ }
78
+ /**
79
+ * Represents an IPv6 address
80
+ * @param {string} address - An IPv6 address string
81
+ * @param {number} [groups=8] - How many octets to parse
82
+ * @example
83
+ * var address = new Address6('2001::/32');
84
+ */
85
+ class Address6 {
86
+ constructor(address, optionalGroups) {
87
+ this.addressMinusSuffix = '';
88
+ this.parsedSubnet = '';
89
+ this.subnet = '/128';
90
+ this.subnetMask = 128;
91
+ this.v4 = false;
92
+ this.zone = '';
93
+ // #region Attributes
94
+ /**
95
+ * Returns true if the given address is in the subnet of the current address.
96
+ * An `Address4` is never in the subnet of an `Address6`; convert with
97
+ * `Address6.fromAddress4()` or `to4()` to compare across families.
98
+ * @returns {boolean}
99
+ */
100
+ this.isInSubnet = common.isInSubnet;
101
+ /**
102
+ * Returns true if this address's host bits fall inside the given subnet,
103
+ * ignoring this address's own subnet mask. Prefer this over `isInSubnet`
104
+ * when classifying a single address, so the answer doesn't change with the
105
+ * CIDR suffix the caller happened to write — notably when the address came
106
+ * from untrusted input and the result backs a trust-boundary decision.
107
+ * An `Address4` is never in the subnet of an `Address6`; convert with
108
+ * `Address6.fromAddress4()` or `to4()` to compare across families.
109
+ * @returns {boolean}
110
+ */
111
+ this.isHostInSubnet = common.isHostInSubnet;
112
+ /**
113
+ * Returns true if the address is correct, false otherwise
114
+ * @returns {boolean}
115
+ */
116
+ this.isCorrect = isCorrect6;
117
+ if (optionalGroups === undefined) {
118
+ this.groups = constants6.GROUPS;
119
+ }
120
+ else {
121
+ this.groups = optionalGroups;
122
+ }
123
+ this.address = address;
124
+ const subnet = constants6.RE_SUBNET_STRING.exec(address);
125
+ if (subnet) {
126
+ this.parsedSubnet = subnet[0].replace('/', '');
127
+ this.subnetMask = parseInt(this.parsedSubnet, 10);
128
+ this.subnet = `/${this.subnetMask}`;
129
+ if (Number.isNaN(this.subnetMask) ||
130
+ this.subnetMask < 0 ||
131
+ this.subnetMask > constants6.BITS) {
132
+ throw new address_error_1.AddressError('Invalid subnet mask.');
133
+ }
134
+ address = address.replace(constants6.RE_SUBNET_STRING, '');
135
+ }
136
+ // RE_SUBNET_STRING anchors on the end of the address, so it strips only
137
+ // the trailing suffix. A second one left behind (`::/0/1`) is malformed
138
+ // and must be rejected rather than parsed as an address group.
139
+ if (/\//.test(address)) {
140
+ throw new address_error_1.AddressError('Invalid subnet mask.');
141
+ }
142
+ // A zone runs from the first `%` to the end of the input and holds no line
143
+ // terminator. Finding it by index reads the input once, where matching
144
+ // RE_ZONE_STRING retries from every `%` that a line terminator disqualifies.
145
+ const zoneStart = address.indexOf('%');
146
+ if (zoneStart !== -1 && /^.*$/.test(address.slice(zoneStart))) {
147
+ this.zone = address.slice(zoneStart);
148
+ address = address.slice(0, zoneStart);
149
+ }
150
+ // The longest well-formed address is all but the last two groups written
151
+ // as four hex digits with their colons, then a 15-character dotted quad:
152
+ // 5 * (groups - 2) + 15, which is 45 for eight groups, the same line
153
+ // CPython's ipaddress module draws. Rejecting longer input here keeps the
154
+ // parse diagnostics, which wrap every offending character in a span,
155
+ // proportional to an address rather than to whatever was passed in.
156
+ const longest = this.groups * 5 + 5;
157
+ if (address.length > longest) {
158
+ throw new address_error_1.AddressError(`IPv6 addresses are at most ${longest} characters.`);
159
+ }
160
+ this.addressMinusSuffix = address;
161
+ this.parsedAddress = this.parse(this.addressMinusSuffix);
162
+ }
163
+ /**
164
+ * Returns true if the given string is a valid IPv6 address (with optional
165
+ * CIDR subnet and zone identifier), false otherwise. Host bits in the
166
+ * subnet portion are allowed (e.g. `2001:db8::1/32` is valid); for strict
167
+ * network-address validation compare `correctForm()` to
168
+ * `startAddress().correctForm()`, or use `networkForm()`.
169
+ */
170
+ static isValid(address) {
171
+ try {
172
+ // eslint-disable-next-line no-new
173
+ new Address6(address);
174
+ return true;
175
+ }
176
+ catch {
177
+ return false;
178
+ }
179
+ }
180
+ /**
181
+ * Convert a BigInt to a v6 address object. The value must be in the
182
+ * range `[0, 2**128 - 1]`; otherwise `AddressError` is thrown.
183
+ * @param {bigint} bigInt - a BigInt to convert
184
+ * @returns {Address6}
185
+ * @example
186
+ * var bigInt = BigInt('1000000000000');
187
+ * var address = Address6.fromBigInt(bigInt);
188
+ * address.correctForm(); // '::e8:d4a5:1000'
189
+ */
190
+ static fromBigInt(bigInt) {
191
+ if (bigInt < BigInt(0) || bigInt > (BigInt(1) << BigInt(constants6.BITS)) - BigInt(1)) {
192
+ throw new address_error_1.AddressError('IPv6 BigInt must be in the range 0 to 2**128 - 1');
193
+ }
194
+ const hex = bigInt.toString(16).padStart(32, '0');
195
+ const groups = [];
196
+ for (let i = 0; i < constants6.GROUPS; i++) {
197
+ groups.push(hex.slice(i * 4, (i + 1) * 4));
198
+ }
199
+ return new Address6(groups.join(':'));
200
+ }
201
+ /**
202
+ * Parse a URL (with optional bracketed host and port) into an address and
203
+ * port. Returns either `{ address, port }` on success or
204
+ * `{ error, address: null, port: null }` if the URL could not be parsed.
205
+ * Ports are returned as numbers (or `null` if absent or out of range).
206
+ * @example
207
+ * var addressAndPort = Address6.fromURL('http://[ffff::]:8080/foo/');
208
+ * addressAndPort.address.correctForm(); // 'ffff::'
209
+ * addressAndPort.port; // 8080
210
+ */
211
+ static fromURL(url) {
212
+ var _a;
213
+ let host;
214
+ let port = null;
215
+ let result;
216
+ let error;
217
+ // Remove the protocol prefix, if any
218
+ const stripped = url.replace(/^[a-z][a-z0-9+.-]*:\/\//i, '');
219
+ // If we have brackets parse them and find a port
220
+ if (stripped.indexOf('[') !== -1 && stripped.indexOf(']:') !== -1) {
221
+ error = 'failed to parse address with port';
222
+ result = constants6.RE_URL_WITH_PORT.exec(stripped);
223
+ if (result === null) {
224
+ return { error, address: null, port: null };
225
+ }
226
+ host = result[1];
227
+ port = result[2];
228
+ }
229
+ else {
230
+ error = 'failed to parse address from URL';
231
+ result = constants6.RE_URL.exec(stripped);
232
+ if (result === null) {
233
+ return { error, address: null, port: null };
234
+ }
235
+ host = (_a = result[1]) !== null && _a !== void 0 ? _a : result[2];
236
+ }
237
+ // If there's a port convert it to an integer
238
+ if (port) {
239
+ port = parseInt(port, 10);
240
+ // squelch out of range ports (valid ports are 0-65535)
241
+ if (port < 0 || port > 65535) {
242
+ port = null;
243
+ }
244
+ }
245
+ else {
246
+ // Standardize `undefined` to `null`
247
+ port = null;
248
+ }
249
+ // The URL character class is a superset of valid IPv6, so a host the
250
+ // regex accepted (an IPv4 literal, bare punctuation, too many groups)
251
+ // can still be rejected by the parser
252
+ let address;
253
+ try {
254
+ address = new Address6(host);
255
+ }
256
+ catch {
257
+ return { error, address: null, port: null };
258
+ }
259
+ return { address, port };
260
+ }
261
+ /**
262
+ * Construct an `Address6` from an address and a hex subnet mask given as
263
+ * separate strings (e.g. as returned by Node's `os.networkInterfaces()`).
264
+ * Throws `AddressError` if the mask is non-contiguous (e.g.
265
+ * `ffff::ffff`).
266
+ * @example
267
+ * var address = Address6.fromAddressAndMask('fe80::1', 'ffff:ffff:ffff:ffff::');
268
+ * address.subnetMask; // 64
269
+ */
270
+ static fromAddressAndMask(address, mask) {
271
+ const bits = common.prefixLengthFromMask(new Address6(mask).bigInt(), constants6.BITS);
272
+ return new Address6(`${address}/${bits}`);
273
+ }
274
+ /**
275
+ * Construct an `Address6` from an address and a Cisco-style wildcard mask
276
+ * given as separate strings (e.g. `::ffff:ffff:ffff:ffff` for a `/64`).
277
+ * The wildcard mask is the bitwise inverse of the subnet mask. Throws
278
+ * `AddressError` if the mask is non-contiguous.
279
+ * @example
280
+ * var address = Address6.fromAddressAndWildcardMask('fe80::1', '::ffff:ffff:ffff:ffff');
281
+ * address.subnetMask; // 64
282
+ */
283
+ static fromAddressAndWildcardMask(address, wildcardMask) {
284
+ const wildcard = new Address6(wildcardMask).bigInt();
285
+ const allOnes = (BigInt(1) << BigInt(constants6.BITS)) - BigInt(1);
286
+ const mask = wildcard ^ allOnes;
287
+ const bits = common.prefixLengthFromMask(mask, constants6.BITS);
288
+ return new Address6(`${address}/${bits}`);
289
+ }
290
+ /**
291
+ * Construct an `Address6` from a wildcard pattern with trailing `*`
292
+ * groups. The number of trailing wildcards determines the prefix
293
+ * length: each `*` represents 16 bits. `::` is expanded to zero groups
294
+ * (not wildcards) before evaluating trailing wildcards.
295
+ *
296
+ * Only trailing whole-group wildcards are supported. Partial-group
297
+ * wildcards (e.g. `2001:db8::0*`) and interior wildcards (e.g.
298
+ * `*::1`) throw `AddressError`.
299
+ * @example
300
+ * Address6.fromWildcard('2001:db8:*:*:*:*:*:*').subnet; // '/32'
301
+ * Address6.fromWildcard('2001:db8::*').subnet; // '/112'
302
+ * Address6.fromWildcard('*:*:*:*:*:*:*:*').subnet; // '/0'
303
+ */
304
+ static fromWildcard(input) {
305
+ if (input.includes('%') || input.includes('/')) {
306
+ throw new address_error_1.AddressError('Wildcard pattern must not include a zone or CIDR suffix');
307
+ }
308
+ const halves = input.split('::');
309
+ if (halves.length > 2) {
310
+ throw new address_error_1.AddressError("Wildcard pattern cannot contain more than one '::'");
311
+ }
312
+ let groups;
313
+ if (halves.length === 2) {
314
+ const left = halves[0] === '' ? [] : halves[0].split(':');
315
+ const right = halves[1] === '' ? [] : halves[1].split(':');
316
+ const remaining = constants6.GROUPS - left.length - right.length;
317
+ if (remaining < 1) {
318
+ throw new address_error_1.AddressError("Wildcard pattern with '::' has too many groups");
319
+ }
320
+ groups = [...left, ...new Array(remaining).fill('0'), ...right];
321
+ }
322
+ else {
323
+ groups = input.split(':');
324
+ }
325
+ if (groups.length !== constants6.GROUPS) {
326
+ throw new address_error_1.AddressError('Wildcard pattern must have 8 groups');
327
+ }
328
+ let firstWildcard = -1;
329
+ for (let i = 0; i < groups.length; i++) {
330
+ if (groups[i] === '*') {
331
+ if (firstWildcard === -1) {
332
+ firstWildcard = i;
333
+ }
334
+ }
335
+ else if (firstWildcard !== -1) {
336
+ throw new address_error_1.AddressError('Wildcard `*` must only appear in trailing groups (e.g. `2001:db8:*:*:*:*:*:*`)');
337
+ }
338
+ }
339
+ const trailing = firstWildcard === -1 ? 0 : groups.length - firstWildcard;
340
+ const replaced = groups.map((g) => (g === '*' ? '0' : g));
341
+ const subnetBits = constants6.BITS - trailing * 16;
342
+ return new Address6(`${replaced.join(':')}/${subnetBits}`);
343
+ }
344
+ /**
345
+ * Create an IPv6-mapped address given an IPv4 address
346
+ * @param {string} address - An IPv4 address string
347
+ * @returns {Address6}
348
+ * @example
349
+ * var address = Address6.fromAddress4('192.168.0.1');
350
+ * address.correctForm(); // '::ffff:c0a8:1'
351
+ * address.to4in6(); // '::ffff:192.168.0.1'
352
+ */
353
+ static fromAddress4(address) {
354
+ const address4 = new ipv4_1.Address4(address);
355
+ const mask6 = constants6.BITS - (constants4.BITS - address4.subnetMask);
356
+ return new Address6(`::ffff:${address4.correctForm()}/${mask6}`);
357
+ }
358
+ /**
359
+ * Return an address from ip6.arpa form. A full 32-nibble name gives a /128
360
+ * address; a shorter name, as used for a delegated reverse zone, gives the
361
+ * network it covers, with a subnet mask of four bits per nibble, so
362
+ * `fromArpa(x.reverseForm())` round-trips {@link reverseForm} for any prefix.
363
+ * @param {string} arpaFormAddress - an 'ip6.arpa' form address
364
+ * @returns {Adress6}
365
+ * @example
366
+ * var address = Address6.fromArpa(e.f.f.f.3.c.2.6.f.f.f.e.6.6.8.e.1.0.6.7.9.4.e.c.0.0.0.0.1.0.0.2.ip6.arpa.)
367
+ * address.correctForm(); // '2001:0:ce49:7601:e866:efff:62c3:fffe'
368
+ * Address6.fromArpa('8.b.d.0.1.0.0.2.ip6.arpa.').networkForm(); // '2001:db8::/32'
369
+ */
370
+ static fromArpa(arpaFormAddress) {
371
+ // remove an ending ".ip6.arpa", in any case and with or without the root
372
+ // dot
373
+ const nibbles = arpaFormAddress.replace(/(\.ip6\.arpa)?\.?$/i, '');
374
+ if (!/^[0-9a-f](\.[0-9a-f]){0,31}$/i.test(nibbles)) {
375
+ throw new address_error_1.AddressError("Invalid 'ip6.arpa' form.");
376
+ }
377
+ const reversed = nibbles.split('.').reverse();
378
+ const subnetMask = reversed.length * 4;
379
+ const hex = reversed.join('').padEnd(32, '0');
380
+ const groups = [];
381
+ for (let i = 0; i < constants6.GROUPS; i++) {
382
+ groups.push(hex.slice(i * 4, (i + 1) * 4));
383
+ }
384
+ return new Address6(`${groups.join(':')}/${subnetMask}`);
385
+ }
386
+ /**
387
+ * Return the Microsoft UNC transcription of the address
388
+ * @returns {String} the Microsoft UNC transcription of the address
389
+ */
390
+ microsoftTranscription() {
391
+ return `${this.correctForm().replace(/:/g, '-')}.ipv6-literal.net`;
392
+ }
393
+ /**
394
+ * Return the first n bits of the address, defaulting to the subnet mask
395
+ * @param {number} [mask=subnet] - the number of bits to mask
396
+ * @returns {String} the first n bits of the address as a string
397
+ */
398
+ mask(mask = this.subnetMask) {
399
+ return this.getBitsBase2(0, mask);
400
+ }
401
+ /**
402
+ * Return the number of possible subnets of a given size in the address
403
+ * @param {number} [subnetSize=128] - the subnet size
404
+ * @returns {String}
405
+ */
406
+ // TODO: probably useful to have a numeric version of this too
407
+ possibleSubnets(subnetSize = 128) {
408
+ const availableBits = constants6.BITS - this.subnetMask;
409
+ const subnetBits = Math.abs(subnetSize - constants6.BITS);
410
+ const subnetPowers = availableBits - subnetBits;
411
+ if (subnetPowers < 0) {
412
+ return '0';
413
+ }
414
+ return addCommas((BigInt('2') ** BigInt(subnetPowers)).toString(10));
415
+ }
416
+ /**
417
+ * Helper function getting start address.
418
+ * @returns {bigint}
419
+ */
420
+ _startAddress() {
421
+ return BigInt(`0b${this.mask() + '0'.repeat(constants6.BITS - this.subnetMask)}`);
422
+ }
423
+ /**
424
+ * The first address in the range given by this address' subnet
425
+ * Often referred to as the Network Address.
426
+ * @returns {Address6}
427
+ */
428
+ startAddress() {
429
+ return Address6.fromBigInt(this._startAddress());
430
+ }
431
+ /**
432
+ * The first host address in the range given by this address's subnet ie
433
+ * the first address after the Network Address
434
+ * @returns {Address6}
435
+ */
436
+ startAddressExclusive() {
437
+ const adjust = BigInt('1');
438
+ return Address6.fromBigInt(this._startAddress() + adjust);
439
+ }
440
+ /**
441
+ * Helper function getting end address.
442
+ * @returns {bigint}
443
+ */
444
+ _endAddress() {
445
+ return BigInt(`0b${this.mask() + '1'.repeat(constants6.BITS - this.subnetMask)}`);
446
+ }
447
+ /**
448
+ * The last address in the range given by this address's subnet. IPv6 has
449
+ * no broadcast address, so this is an ordinary assignable address (in a
450
+ * 64-bit-interface-identifier subnet it falls inside the reserved
451
+ * subnet-anycast block of [RFC 2526](https://datatracker.ietf.org/doc/html/rfc2526)).
452
+ * @returns {Address6}
453
+ */
454
+ endAddress() {
455
+ return Address6.fromBigInt(this._endAddress());
456
+ }
457
+ /**
458
+ * The address one before {@link endAddress}. This is the IPv6 counterpart
459
+ * of the IPv4 method that skips the broadcast address; IPv6 has no broadcast,
460
+ * so it drops exactly one address and does not model the 128 reserved
461
+ * subnet-anycast identifiers of [RFC 2526](https://datatracker.ietf.org/doc/html/rfc2526).
462
+ * @returns {Address6}
463
+ */
464
+ endAddressExclusive() {
465
+ const adjust = BigInt('1');
466
+ return Address6.fromBigInt(this._endAddress() - adjust);
467
+ }
468
+ /**
469
+ * Returns the address `n` addresses after this one (or before, when `n` is
470
+ * negative), keeping this address's subnet mask. Throws `AddressError` when
471
+ * the result would fall outside the IPv6 address space or `n` is not an
472
+ * integer.
473
+ * @param {number | bigint} n
474
+ * @returns {Address6}
475
+ * @example
476
+ * new Address6('2001:db8::/64').offset(1).correctForm(); // '2001:db8::1'
477
+ */
478
+ offset(n) {
479
+ return Address6.fromBigInt(common.offsetBigInt(this.bigInt(), n, constants6.BITS, 'IPv6')).withSubnetMask(this.subnetMask);
480
+ }
481
+ /**
482
+ * Returns the network that follows this address's network: the address after
483
+ * {@link endAddress}, with the same subnet mask. Throws `AddressError` when
484
+ * this network is the last one in the address space.
485
+ * @returns {Address6}
486
+ * @example
487
+ * new Address6('2001:db8::/64').nextNetwork().networkForm(); // '2001:db8:0:1::/64'
488
+ */
489
+ nextNetwork() {
490
+ return Address6.fromBigInt(common.offsetBigInt(this._endAddress(), 1, constants6.BITS, 'IPv6')).withSubnetMask(this.subnetMask);
491
+ }
492
+ withSubnetMask(subnetMask) {
493
+ return new Address6(`${this.correctForm()}/${subnetMask}`);
494
+ }
495
+ /**
496
+ * The hex form of the subnet mask, e.g. `ffff:ffff:ffff:ffff::` for a
497
+ * `/64`. Returns an `Address6`; call `.correctForm()` for the string.
498
+ * @returns {Address6}
499
+ */
500
+ subnetMaskAddress() {
501
+ return Address6.fromBigInt(BigInt(`0b${'1'.repeat(this.subnetMask)}${'0'.repeat(constants6.BITS - this.subnetMask)}`));
502
+ }
503
+ /**
504
+ * The Cisco-style wildcard mask, e.g. `::ffff:ffff:ffff:ffff` for a
505
+ * `/64`. This is the bitwise inverse of `subnetMaskAddress()`. Returns
506
+ * an `Address6`; call `.correctForm()` for the string.
507
+ * @returns {Address6}
508
+ */
509
+ wildcardMask() {
510
+ return Address6.fromBigInt(BigInt(`0b${'0'.repeat(this.subnetMask)}${'1'.repeat(constants6.BITS - this.subnetMask)}`));
511
+ }
512
+ /**
513
+ * The network address in CIDR string form, e.g. `2001:db8::/32` for
514
+ * `2001:db8::1/32`. For an address with no explicit subnet the prefix
515
+ * is `/128`, e.g. `networkForm()` on `2001:db8::1` returns
516
+ * `2001:db8::1/128`.
517
+ * @returns {string}
518
+ */
519
+ networkForm() {
520
+ return `${this.startAddress().correctForm()}/${this.subnetMask}`;
521
+ }
522
+ /**
523
+ * Return the scope of the address. The 4-bit scope field
524
+ * ([RFC 4291 §2.7](https://datatracker.ietf.org/doc/html/rfc4291#section-2.7))
525
+ * is only defined for multicast addresses; for unicast addresses the scope
526
+ * is derived from the address type per
527
+ * [RFC 4007 §6](https://datatracker.ietf.org/doc/html/rfc4007#section-6).
528
+ * @returns {String}
529
+ */
530
+ getScope() {
531
+ const type = this.getType();
532
+ if (type === 'Multicast' || type.startsWith('Multicast ')) {
533
+ const scope = constants6.SCOPES[parseInt(this.getBits(12, 16).toString(10), 10)];
534
+ return scope || 'Unknown';
535
+ }
536
+ // RFC 4291 §2.5.3: the loopback address is treated as having Link-Local
537
+ // scope. (Multicast scope 1, "Interface-Local", is a different concept
538
+ // used only for loopback transmission of multicast.)
539
+ if (type === 'Link-local unicast' || type === 'Loopback') {
540
+ return 'Link local';
541
+ }
542
+ // RFC 4007 §6: the unspecified address has no scope.
543
+ if (type === 'Unspecified') {
544
+ return 'Unknown';
545
+ }
546
+ return 'Global';
547
+ }
548
+ /**
549
+ * Return the type of the address
550
+ * @returns {String}
551
+ */
552
+ getType() {
553
+ for (let i = 0; i < TYPE_SUBNETS.length; i++) {
554
+ const entry = TYPE_SUBNETS[i];
555
+ if (this.isHostInSubnet(entry[0])) {
556
+ return entry[1];
557
+ }
558
+ }
559
+ return 'Global unicast';
560
+ }
561
+ /**
562
+ * Return the bits in the given range as a BigInt
563
+ * @returns {bigint}
564
+ */
565
+ getBits(start, end) {
566
+ return BigInt(`0b${this.getBitsBase2(start, end)}`);
567
+ }
568
+ /**
569
+ * Return the bits in the given range as a base-2 string
570
+ * @returns {String}
571
+ */
572
+ getBitsBase2(start, end) {
573
+ return this.binaryZeroPad().slice(start, end);
574
+ }
575
+ /**
576
+ * Return the bits in the given range as a base-16 string
577
+ * @returns {String}
578
+ */
579
+ getBitsBase16(start, end) {
580
+ const length = end - start;
581
+ if (length % 4 !== 0) {
582
+ throw new Error('Length of bits to retrieve must be divisible by four');
583
+ }
584
+ return this.getBits(start, end)
585
+ .toString(16)
586
+ .padStart(length / 4, '0');
587
+ }
588
+ /**
589
+ * Return the bits that are set past the subnet mask length
590
+ * @returns {String}
591
+ */
592
+ getBitsPastSubnet() {
593
+ return this.getBitsBase2(this.subnetMask, constants6.BITS);
594
+ }
595
+ /**
596
+ * Return the reversed ip6.arpa form of the address
597
+ * @param {Object} options
598
+ * @param {boolean} options.omitSuffix - omit the "ip6.arpa" suffix
599
+ * @returns {String}
600
+ */
601
+ reverseForm(options) {
602
+ if (!options) {
603
+ options = {};
604
+ }
605
+ const characters = Math.floor(this.subnetMask / 4);
606
+ const reversed = this.canonicalForm()
607
+ .replace(/:/g, '')
608
+ .split('')
609
+ .slice(0, characters)
610
+ .reverse()
611
+ .join('.');
612
+ if (characters > 0) {
613
+ if (options.omitSuffix) {
614
+ return reversed;
615
+ }
616
+ return `${reversed}.ip6.arpa.`;
617
+ }
618
+ if (options.omitSuffix) {
619
+ return '';
620
+ }
621
+ return 'ip6.arpa.';
622
+ }
623
+ /**
624
+ * Returns the address in correct form, per
625
+ * [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952): leading zeros
626
+ * stripped, the longest run of zero groups collapsed to `::`, and hex digits
627
+ * lowercased (e.g. `2001:db8::1`). This is the recommended form for display.
628
+ */
629
+ correctForm() {
630
+ let i;
631
+ let groups = [];
632
+ let zeroCounter = 0;
633
+ const zeroes = [];
634
+ for (i = 0; i < this.parsedAddress.length; i++) {
635
+ const value = parseInt(this.parsedAddress[i], 16);
636
+ if (value === 0) {
637
+ zeroCounter++;
638
+ }
639
+ if (value !== 0 && zeroCounter > 0) {
640
+ if (zeroCounter > 1) {
641
+ zeroes.push([i - zeroCounter, i - 1]);
642
+ }
643
+ zeroCounter = 0;
644
+ }
645
+ }
646
+ // Do we end with a string of zeroes?
647
+ if (zeroCounter > 1) {
648
+ zeroes.push([this.parsedAddress.length - zeroCounter, this.parsedAddress.length - 1]);
649
+ }
650
+ const zeroLengths = zeroes.map((n) => n[1] - n[0] + 1);
651
+ if (zeroes.length > 0) {
652
+ const index = zeroLengths.indexOf(Math.max(...zeroLengths));
653
+ groups = compact(this.parsedAddress, zeroes[index]);
654
+ }
655
+ else {
656
+ groups = this.parsedAddress;
657
+ }
658
+ for (i = 0; i < groups.length; i++) {
659
+ if (groups[i] !== 'compact') {
660
+ groups[i] = parseInt(groups[i], 16).toString(16);
661
+ }
662
+ }
663
+ let correct = groups.join(':');
664
+ correct = correct.replace(/^compact$/, '::');
665
+ correct = correct.replace(/(^compact)|(compact$)/, ':');
666
+ correct = correct.replace(/compact/, '');
667
+ return correct;
668
+ }
669
+ /**
670
+ * Return a zero-padded base-2 string representation of the address
671
+ * @returns {String}
672
+ * @example
673
+ * var address = new Address6('2001:4860:4001:803::1011');
674
+ * address.binaryZeroPad();
675
+ * // '0010000000000001010010000110000001000000000000010000100000000011
676
+ * // 0000000000000000000000000000000000000000000000000001000000010001'
677
+ */
678
+ binaryZeroPad() {
679
+ if (this._binaryZeroPad === undefined) {
680
+ this._binaryZeroPad = this.bigInt().toString(2).padStart(constants6.BITS, '0');
681
+ }
682
+ return this._binaryZeroPad;
683
+ }
684
+ /**
685
+ * Parses a v4-in-v6 string (e.g. `::ffff:192.168.0.1`) by extracting the
686
+ * trailing IPv4 address into `this.address4` / `this.parsedAddress4` and
687
+ * returning the address with the v4 portion converted to two v6 groups.
688
+ * Used internally by `parse()`.
689
+ */
690
+ // TODO: Improve the semantics of this helper function
691
+ parse4in6(address) {
692
+ if (address.indexOf('.') === -1) {
693
+ return address;
694
+ }
695
+ const groups = address.split(':');
696
+ const lastGroup = groups.slice(-1)[0];
697
+ // RE_ADDRESS rejects octets with a leading zero, so a dotted-quad tail is
698
+ // matched permissively first: that way this notation still gets its own
699
+ // message with the offending octet highlighted, rather than falling
700
+ // through as an unrecognized group.
701
+ const v4Octets = lastGroup.split('.');
702
+ if (v4Octets.length === constants4.GROUPS &&
703
+ v4Octets.every((octet) => /^\d{1,3}$/.test(octet))) {
704
+ if (v4Octets.some((octet) => /^0\d/.test(octet))) {
705
+ // The prefix groups haven't been through the bad-character check
706
+ // yet, so escape them before including in the error HTML.
707
+ const highlighted = v4Octets.map(spanLeadingZeroes4).join('.');
708
+ const prefix = groups.slice(0, -1).map(helpers.escapeHtml).join(':');
709
+ const separator = groups.length > 1 ? ':' : '';
710
+ throw new address_error_1.AddressError("IPv4 addresses can't have leading zeroes.", `${prefix}${separator}${highlighted}`);
711
+ }
712
+ }
713
+ const address4 = lastGroup.match(constants4.RE_ADDRESS);
714
+ if (address4) {
715
+ this.parsedAddress4 = address4[0];
716
+ const v4Suffix = this.subnetMask >= 96 ? `/${this.subnetMask - 96}` : '';
717
+ this.address4 = new ipv4_1.Address4(`${this.parsedAddress4}${v4Suffix}`);
718
+ this.v4 = true;
719
+ groups[groups.length - 1] = this.address4.toGroup6();
720
+ address = groups.join(':');
721
+ }
722
+ return address;
723
+ }
724
+ /**
725
+ * Parses an IPv6 address string into its 8 hexadecimal groups (expanding
726
+ * any `::` elision and any trailing v4-in-v6 portion) and stores the result
727
+ * on `this.parsedAddress`. Called automatically by the constructor; you
728
+ * typically don't need to call it directly. Throws `AddressError` if the
729
+ * input is malformed.
730
+ */
731
+ // TODO: Make private?
732
+ parse(address) {
733
+ address = this.parse4in6(address);
734
+ const badCharacters = address.match(constants6.RE_BAD_CHARACTERS);
735
+ if (badCharacters) {
736
+ throw new address_error_1.AddressError(`Bad character${badCharacters.length > 1 ? 's' : ''} detected in address: ${badCharacters.join('')}`, address.replace(constants6.RE_BAD_CHARACTERS, (character) => `<span class="parse-error">${helpers.escapeHtml(character)}</span>`));
737
+ }
738
+ const badAddress = address.match(constants6.RE_BAD_ADDRESS);
739
+ if (badAddress) {
740
+ throw new address_error_1.AddressError(`Address failed regex: ${badAddress.join('')}`, address.replace(constants6.RE_BAD_ADDRESS, '<span class="parse-error">$1</span>'));
741
+ }
742
+ let groups = [];
743
+ const halves = address.split('::');
744
+ if (halves.length === 2) {
745
+ let first = halves[0].split(':');
746
+ let last = halves[1].split(':');
747
+ if (first.length === 1 && first[0] === '') {
748
+ first = [];
749
+ }
750
+ if (last.length === 1 && last[0] === '') {
751
+ last = [];
752
+ }
753
+ const remaining = this.groups - (first.length + last.length);
754
+ if (!remaining) {
755
+ throw new address_error_1.AddressError('Error parsing groups');
756
+ }
757
+ this.elidedGroups = remaining;
758
+ this.elisionBegin = first.length;
759
+ this.elisionEnd = first.length + this.elidedGroups;
760
+ groups = groups.concat(first);
761
+ for (let i = 0; i < remaining; i++) {
762
+ groups.push('0');
763
+ }
764
+ groups = groups.concat(last);
765
+ }
766
+ else if (halves.length === 1) {
767
+ groups = address.split(':');
768
+ this.elidedGroups = 0;
769
+ }
770
+ else {
771
+ throw new address_error_1.AddressError('Too many :: groups found');
772
+ }
773
+ groups = groups.map((group) => parseInt(group, 16).toString(16));
774
+ if (groups.length !== this.groups) {
775
+ throw new address_error_1.AddressError('Incorrect number of groups found');
776
+ }
777
+ return groups;
778
+ }
779
+ /**
780
+ * Returns the canonical (fully expanded) form of the address: all 8 groups,
781
+ * each padded to 4 hex digits, with no `::` collapsing
782
+ * (e.g. `2001:0db8:0000:0000:0000:0000:0000:0001`). Useful for sorting and
783
+ * byte-exact comparison.
784
+ */
785
+ canonicalForm() {
786
+ return this.parsedAddress.map(paddedHex).join(':');
787
+ }
788
+ /**
789
+ * Return the decimal form of the address
790
+ * @returns {String}
791
+ */
792
+ decimal() {
793
+ return this.parsedAddress.map((n) => parseInt(n, 16).toString(10).padStart(5, '0')).join(':');
794
+ }
795
+ /**
796
+ * Return the address as a BigInt
797
+ * @returns {bigint}
798
+ */
799
+ bigInt() {
800
+ return BigInt(`0x${this.parsedAddress.map(paddedHex).join('')}`);
801
+ }
802
+ /**
803
+ * Return the last two groups of this address as an IPv4 address string.
804
+ * If this address carries a CIDR prefix that covers the trailing 32 bits
805
+ * (i.e. `subnetMask >= 96`), the resulting `Address4` inherits the
806
+ * corresponding v4 prefix (`subnetMask - 96`); otherwise it defaults to
807
+ * `/32`.
808
+ * @returns {Address4}
809
+ * @example
810
+ * var address = new Address6('2001:4860:4001::1825:bf11');
811
+ * address.to4().correctForm(); // '24.37.191.17'
812
+ */
813
+ to4() {
814
+ const binary = this.binaryZeroPad().split('');
815
+ const hex = BigInt(`0b${binary.slice(96, 128).join('')}`)
816
+ .toString(16)
817
+ .padStart(8, '0');
818
+ if (this.subnetMask >= 96) {
819
+ const v4Mask = this.subnetMask - 96;
820
+ const groups = [];
821
+ for (let i = 0; i < 8; i += 2) {
822
+ groups.push(parseInt(hex.slice(i, i + 2), 16));
823
+ }
824
+ return new ipv4_1.Address4(`${groups.join('.')}/${v4Mask}`);
825
+ }
826
+ return ipv4_1.Address4.fromHex(hex);
827
+ }
828
+ /**
829
+ * Return the v4-in-v6 form of the address
830
+ * @returns {String}
831
+ */
832
+ to4in6() {
833
+ const address4 = this.to4();
834
+ const address6 = new Address6(this.parsedAddress.slice(0, 6).join(':'), 6);
835
+ const correct = address6.correctForm();
836
+ let infix = '';
837
+ if (!/:$/.test(correct)) {
838
+ infix = ':';
839
+ }
840
+ return correct + infix + address4.correctForm();
841
+ }
842
+ /**
843
+ * Decodes the Teredo tunneling fields embedded in this address. Returns the
844
+ * Teredo prefix, server IPv4, client IPv4, raw flag bits, cone-NAT flag,
845
+ * UDP port, and Microsoft-format flag breakdown (reserved, universal/local,
846
+ * group/individual, nonce). Only meaningful for addresses in `2001::/32`.
847
+ */
848
+ inspectTeredo() {
849
+ /*
850
+ - Bits 0 to 31 are set to the Teredo prefix (normally 2001:0000::/32).
851
+ - Bits 32 to 63 embed the primary IPv4 address of the Teredo server that
852
+ is used.
853
+ - Bits 64 to 79 can be used to define some flags. Currently only the
854
+ higher order bit is used; it is set to 1 if the Teredo client is
855
+ located behind a cone NAT, 0 otherwise. For Microsoft's Windows Vista
856
+ and Windows Server 2008 implementations, more bits are used. In those
857
+ implementations, the format for these 16 bits is "CRAAAAUG AAAAAAAA",
858
+ where "C" remains the "Cone" flag. The "R" bit is reserved for future
859
+ use. The "U" bit is for the Universal/Local flag (set to 0). The "G" bit
860
+ is Individual/Group flag (set to 0). The A bits are set to a 12-bit
861
+ randomly generated number chosen by the Teredo client to introduce
862
+ additional protection for the Teredo node against IPv6-based scanning
863
+ attacks.
864
+ - Bits 80 to 95 contains the obfuscated UDP port number. This is the
865
+ port number that is mapped by the NAT to the Teredo client with all
866
+ bits inverted.
867
+ - Bits 96 to 127 contains the obfuscated IPv4 address. This is the
868
+ public IPv4 address of the NAT with all bits inverted.
869
+ */
870
+ const prefix = this.getBitsBase16(0, 32);
871
+ const bitsForUdpPort = this.getBits(80, 96);
872
+ const udpPort = (bitsForUdpPort ^ BigInt('0xffff')).toString();
873
+ const server4 = ipv4_1.Address4.fromHex(this.getBitsBase16(32, 64));
874
+ const bitsForClient4 = this.getBits(96, 128);
875
+ const client4 = ipv4_1.Address4.fromHex((bitsForClient4 ^ BigInt('0xffffffff')).toString(16).padStart(8, '0'));
876
+ const flagsBase2 = this.getBitsBase2(64, 80);
877
+ const coneNat = (0, common_1.testBit)(flagsBase2, 15);
878
+ const reserved = (0, common_1.testBit)(flagsBase2, 14);
879
+ const groupIndividual = (0, common_1.testBit)(flagsBase2, 8);
880
+ const universalLocal = (0, common_1.testBit)(flagsBase2, 9);
881
+ const nonce = BigInt(`0b${flagsBase2.slice(2, 6) + flagsBase2.slice(8, 16)}`).toString(10);
882
+ return {
883
+ prefix: `${prefix.slice(0, 4)}:${prefix.slice(4, 8)}`,
884
+ server4: server4.address,
885
+ client4: client4.address,
886
+ flags: flagsBase2,
887
+ coneNat,
888
+ microsoft: {
889
+ reserved,
890
+ universalLocal,
891
+ groupIndividual,
892
+ nonce,
893
+ },
894
+ udpPort,
895
+ };
896
+ }
897
+ /**
898
+ * Decodes the 6to4 tunneling fields embedded in this address. Returns the
899
+ * 6to4 prefix and the embedded IPv4 gateway address. Only meaningful for
900
+ * addresses in `2002::/16`.
901
+ */
902
+ inspect6to4() {
903
+ /*
904
+ - Bits 0 to 15 are set to the 6to4 prefix (2002::/16).
905
+ - Bits 16 to 48 embed the IPv4 address of the 6to4 gateway that is used.
906
+ */
907
+ const prefix = this.getBitsBase16(0, 16);
908
+ const gateway = ipv4_1.Address4.fromHex(this.getBitsBase16(16, 48));
909
+ return {
910
+ prefix: prefix.slice(0, 4),
911
+ gateway: gateway.address,
912
+ };
913
+ }
914
+ /**
915
+ * Return a v6 6to4 address from a v6 v4inv6 address
916
+ * @returns {Address6}
917
+ */
918
+ to6to4() {
919
+ if (!this.is4()) {
920
+ return null;
921
+ }
922
+ const addr6to4 = [
923
+ '2002',
924
+ this.getBitsBase16(96, 112),
925
+ this.getBitsBase16(112, 128),
926
+ '',
927
+ '/16',
928
+ ].join(':');
929
+ return new Address6(addr6to4);
930
+ }
931
+ /**
932
+ * Embed an IPv4 address into a NAT64 IPv6 address using the encoding
933
+ * defined by [RFC 6052](https://datatracker.ietf.org/doc/html/rfc6052).
934
+ * The default prefix is the well-known prefix `64:ff9b::/96`. The prefix
935
+ * length must be one of 32, 40, 48, 56, 64, or 96; for prefixes shorter
936
+ * than /64 the IPv4 octets are split around the reserved bits 64–71.
937
+ * @example
938
+ * Address6.fromAddress4Nat64('192.0.2.33').correctForm(); // '64:ff9b::c000:221'
939
+ * Address6.fromAddress4Nat64('192.0.2.33', '2001:db8::/32').correctForm(); // '2001:db8:c000:221::'
940
+ */
941
+ static fromAddress4Nat64(address, prefix = '64:ff9b::/96') {
942
+ const v4 = new ipv4_1.Address4(address);
943
+ const prefix6 = new Address6(prefix);
944
+ const pl = prefix6.subnetMask;
945
+ if (pl !== 32 && pl !== 40 && pl !== 48 && pl !== 56 && pl !== 64 && pl !== 96) {
946
+ throw new address_error_1.AddressError('NAT64 prefix length must be 32, 40, 48, 56, 64, or 96');
947
+ }
948
+ const prefixBits = prefix6.binaryZeroPad();
949
+ const v4Bits = v4.binaryZeroPad();
950
+ let bits;
951
+ if (pl === 96) {
952
+ bits = prefixBits.slice(0, 96) + v4Bits;
953
+ }
954
+ else {
955
+ const beforeU = 64 - pl;
956
+ bits = [
957
+ prefixBits.slice(0, pl),
958
+ v4Bits.slice(0, beforeU),
959
+ // Bits 64 to 71 are the reserved u octet and are always zero.
960
+ '00000000',
961
+ v4Bits.slice(beforeU),
962
+ '0'.repeat(128 - 72 - (32 - beforeU)),
963
+ ].join('');
964
+ }
965
+ const hex = BigInt(`0b${bits}`).toString(16).padStart(32, '0');
966
+ const groups = [];
967
+ for (let i = 0; i < 8; i++) {
968
+ groups.push(hex.slice(i * 4, (i + 1) * 4));
969
+ }
970
+ return new Address6(groups.join(':'));
971
+ }
972
+ /**
973
+ * Extract the embedded IPv4 address from a NAT64 IPv6 address using the
974
+ * encoding defined by [RFC 6052](https://datatracker.ietf.org/doc/html/rfc6052).
975
+ * The default prefix is the well-known prefix `64:ff9b::/96`. Returns
976
+ * `null` if this address is not contained within the given prefix.
977
+ * @example
978
+ * new Address6('64:ff9b::c000:221').toAddress4Nat64()!.correctForm(); // '192.0.2.33'
979
+ */
980
+ toAddress4Nat64(prefix = '64:ff9b::/96') {
981
+ const prefix6 = new Address6(prefix);
982
+ const pl = prefix6.subnetMask;
983
+ if (pl !== 32 && pl !== 40 && pl !== 48 && pl !== 56 && pl !== 64 && pl !== 96) {
984
+ throw new address_error_1.AddressError('NAT64 prefix length must be 32, 40, 48, 56, 64, or 96');
985
+ }
986
+ if (!this.isHostInSubnet(prefix6)) {
987
+ return null;
988
+ }
989
+ const bits = this.binaryZeroPad();
990
+ let v4Bits;
991
+ if (pl === 96) {
992
+ v4Bits = bits.slice(96, 128);
993
+ }
994
+ else {
995
+ const beforeU = 64 - pl;
996
+ v4Bits = bits.slice(pl, pl + beforeU) + bits.slice(72, 72 + (32 - beforeU));
997
+ }
998
+ const octets = [];
999
+ for (let i = 0; i < 4; i++) {
1000
+ octets.push(parseInt(v4Bits.slice(i * 8, (i + 1) * 8), 2).toString());
1001
+ }
1002
+ return new ipv4_1.Address4(octets.join('.'));
1003
+ }
1004
+ /**
1005
+ * Return a byte array.
1006
+ *
1007
+ * To get a Node.js `Buffer`, wrap the result: `Buffer.from(address.toByteArray())`.
1008
+ * @returns {Array}
1009
+ */
1010
+ toByteArray() {
1011
+ const value = this.bigInt()
1012
+ .toString(16)
1013
+ .padStart(constants6.BITS / 4, '0');
1014
+ const bytes = [];
1015
+ for (let i = 0, length = value.length; i < length; i += 2) {
1016
+ bytes.push(parseInt(value.substring(i, i + 2), 16));
1017
+ }
1018
+ return bytes;
1019
+ }
1020
+ /**
1021
+ * Return an unsigned byte array.
1022
+ *
1023
+ * To get a Node.js `Buffer`, wrap the result: `Buffer.from(address.toUnsignedByteArray())`.
1024
+ * @returns {Array}
1025
+ */
1026
+ toUnsignedByteArray() {
1027
+ // toByteArray() emits 0 to 255, so unsigning it is an identity mapping and
1028
+ // the two methods return equal arrays. 11.0.0 keeps one of them and makes
1029
+ // this a deprecated alias; test/common-test.ts fails at that version.
1030
+ return this.toByteArray().map(unsignByte);
1031
+ }
1032
+ /**
1033
+ * Convert a byte array to an Address6 object.
1034
+ *
1035
+ * Accepts unsigned bytes (0 to 255) or signed bytes (-128 to 127, as an
1036
+ * `Int8Array` or a Java `byte[]` holds them), folding signed values to their
1037
+ * unsigned equivalent. Throws `AddressError` unless given exactly 16
1038
+ * integers from -128 to 255.
1039
+ *
1040
+ * To convert from a Node.js `Buffer`, spread it: `Address6.fromByteArray([...buf])`.
1041
+ * @returns {Address6}
1042
+ */
1043
+ static fromByteArray(bytes) {
1044
+ // Address4.fromByteArray takes unsigned bytes only. 11.0.0 aligns this
1045
+ // method with it, at which point the -128 floor here, unsignByte, and the
1046
+ // mapping below all go; test/common-test.ts fails at that version.
1047
+ common.assertByteArray(bytes, 16, 'IPv6', -128);
1048
+ return this.fromUnsignedByteArray(bytes.map(unsignByte));
1049
+ }
1050
+ /**
1051
+ * Convert an unsigned byte array to an Address6 object.
1052
+ *
1053
+ * Throws `AddressError` unless given exactly 16 integers from 0 to 255.
1054
+ *
1055
+ * To convert from a Node.js `Buffer`, spread it: `Address6.fromUnsignedByteArray([...buf])`.
1056
+ * @returns {Address6}
1057
+ */
1058
+ static fromUnsignedByteArray(bytes) {
1059
+ common.assertByteArray(bytes, 16, 'IPv6', 0);
1060
+ const BYTE_MAX = BigInt('256');
1061
+ let result = BigInt('0');
1062
+ let multiplier = BigInt('1');
1063
+ for (let i = bytes.length - 1; i >= 0; i--) {
1064
+ result += multiplier * BigInt(bytes[i].toString(10));
1065
+ multiplier *= BYTE_MAX;
1066
+ }
1067
+ return Address6.fromBigInt(result);
1068
+ }
1069
+ /**
1070
+ * Returns true if the address is in the canonical form, false otherwise
1071
+ * @returns {boolean}
1072
+ */
1073
+ isCanonical() {
1074
+ return this.addressMinusSuffix === this.canonicalForm();
1075
+ }
1076
+ /**
1077
+ * Returns true if the address is a link-local unicast address in `fe80::/10`
1078
+ * ([RFC 4291 §2.4](https://datatracker.ietf.org/doc/html/rfc4291#section-2.4))
1079
+ * or an IPv4-mapped / NAT64 address whose embedded IPv4 address is link-local
1080
+ * (`169.254.0.0/16`, e.g. `::ffff:169.254.169.254`), false otherwise.
1081
+ * @returns {boolean}
1082
+ */
1083
+ isLinkLocal() {
1084
+ const embedded = this.embeddedIPv4();
1085
+ if (embedded) {
1086
+ return embedded.isLinkLocal();
1087
+ }
1088
+ return this.isHostInSubnet(LINK_LOCAL_SUBNET);
1089
+ }
1090
+ /**
1091
+ * Returns true if the address is a multicast address, false otherwise
1092
+ * @returns {boolean}
1093
+ */
1094
+ isMulticast() {
1095
+ const embedded = this.embeddedIPv4();
1096
+ if (embedded) {
1097
+ return embedded.isMulticast();
1098
+ }
1099
+ const type = this.getType();
1100
+ return type === 'Multicast' || type.startsWith('Multicast ');
1101
+ }
1102
+ /**
1103
+ * Returns true if the address was written in v4-in-v6 dotted-quad notation
1104
+ * (e.g. `::ffff:127.0.0.1`), false otherwise. This is a notation-level flag
1105
+ * and does not reflect whether the address bits lie in the IPv4-mapped
1106
+ * (`::ffff:0:0/96`) subnet — for that, see {@link isMapped4}.
1107
+ * @returns {boolean}
1108
+ */
1109
+ is4() {
1110
+ return this.v4;
1111
+ }
1112
+ /**
1113
+ * Returns true if the address is an IPv4-mapped IPv6 address in
1114
+ * `::ffff:0:0/96` ([RFC 4291 §2.5.5.2](https://datatracker.ietf.org/doc/html/rfc4291#section-2.5.5.2)),
1115
+ * false otherwise. Unlike {@link is4}, this checks the underlying address
1116
+ * bits rather than the textual notation, so `::ffff:127.0.0.1` and
1117
+ * `::ffff:7f00:1` both return true.
1118
+ * @returns {boolean}
1119
+ */
1120
+ isMapped4() {
1121
+ return this.isHostInSubnet(IPV4_MAPPED_SUBNET);
1122
+ }
1123
+ /**
1124
+ * If this address embeds a routable IPv4 address — i.e. it is IPv4-mapped
1125
+ * (`::ffff:0:0/96`) or sits in the NAT64 well-known prefix (`64:ff9b::/96`,
1126
+ * [RFC 6052](https://datatracker.ietf.org/doc/html/rfc6052)) — return that
1127
+ * embedded address as an {@link Address4}; otherwise return null.
1128
+ *
1129
+ * The special-property checks (`isLoopback`, `isLinkLocal`, `isMulticast`,
1130
+ * `isUnspecified`, `isPrivate`, `isCGNAT`, `isBroadcast`) call this first and
1131
+ * delegate to the embedded {@link Address4} when present, so a literal such as
1132
+ * `::ffff:127.0.0.1` is classified by what it actually reaches (loopback)
1133
+ * rather than by its IPv6 wrapper (which `getType()` reports as IPv4-mapped).
1134
+ * This matters wherever the checks back a trust-boundary decision (e.g. an
1135
+ * SSRF allow/deny filter): without normalization, `::ffff:10.0.0.1`,
1136
+ * `::ffff:169.254.169.254`, `64:ff9b::7f00:1`, etc. would all read as
1137
+ * non-internal.
1138
+ * @returns {Address4 | null}
1139
+ */
1140
+ embeddedIPv4() {
1141
+ if (this.isMapped4() || this.isHostInSubnet(NAT64_WELL_KNOWN_SUBNET)) {
1142
+ return this.to4();
1143
+ }
1144
+ return null;
1145
+ }
1146
+ /**
1147
+ * Returns true if the address is a Teredo address, false otherwise
1148
+ * @returns {boolean}
1149
+ */
1150
+ isTeredo() {
1151
+ return this.isHostInSubnet(TEREDO_SUBNET);
1152
+ }
1153
+ /**
1154
+ * Returns true if the address is a 6to4 address, false otherwise
1155
+ * @returns {boolean}
1156
+ */
1157
+ is6to4() {
1158
+ return this.isHostInSubnet(SIX_TO_FOUR_SUBNET);
1159
+ }
1160
+ /**
1161
+ * Returns true if the address is a loopback address, false otherwise
1162
+ * @returns {boolean}
1163
+ */
1164
+ isLoopback() {
1165
+ const embedded = this.embeddedIPv4();
1166
+ if (embedded) {
1167
+ return embedded.isLoopback();
1168
+ }
1169
+ return this.getType() === 'Loopback';
1170
+ }
1171
+ /**
1172
+ * Returns true if the address is a Unique Local Address in `fc00::/7` ([RFC 4193](https://datatracker.ietf.org/doc/html/rfc4193)). ULAs are the IPv6 equivalent of IPv4 [RFC 1918](https://datatracker.ietf.org/doc/html/rfc1918) private addresses.
1173
+ * @returns {boolean}
1174
+ */
1175
+ isULA() {
1176
+ return this.isHostInSubnet(ULA_SUBNET);
1177
+ }
1178
+ /**
1179
+ * Returns true if the address is private, i.e. a Unique Local Address in
1180
+ * `fc00::/7` ([RFC 4193](https://datatracker.ietf.org/doc/html/rfc4193)), an
1181
+ * address in the NAT64 local-use range `64:ff9b:1::/48`
1182
+ * ([RFC 8215](https://datatracker.ietf.org/doc/html/rfc8215)), or an
1183
+ * IPv4-mapped / NAT64 well-known address whose embedded IPv4 address is in
1184
+ * one of the [RFC 1918](https://datatracker.ietf.org/doc/html/rfc1918)
1185
+ * private ranges (e.g. `::ffff:10.0.0.1`). This is the IPv6 counterpart to
1186
+ * {@link Address4.isPrivate}; use it instead of {@link isULA} when you need to
1187
+ * catch mapped RFC 1918 addresses as well as native ULAs.
1188
+ *
1189
+ * The local-use NAT64 range is reported private as a whole rather than by
1190
+ * its embedded IPv4 address: an operator may carve a prefix of any RFC 6052
1191
+ * length out of `64:ff9b:1::/48`, so the same bits decode to different IPv4
1192
+ * addresses under different deployments and no single decoding is correct.
1193
+ * Use {@link toAddress4Nat64} with the deployment's prefix to decode one.
1194
+ * @returns {boolean}
1195
+ */
1196
+ isPrivate() {
1197
+ const embedded = this.embeddedIPv4();
1198
+ if (embedded) {
1199
+ return embedded.isPrivate();
1200
+ }
1201
+ return this.isULA() || this.isHostInSubnet(NAT64_LOCAL_USE_SUBNET);
1202
+ }
1203
+ /**
1204
+ * Returns true if the address is an IPv4-mapped / NAT64 address whose embedded
1205
+ * IPv4 address is in the carrier-grade NAT range `100.64.0.0/10`
1206
+ * ([RFC 6598](https://datatracker.ietf.org/doc/html/rfc6598)), false
1207
+ * otherwise. There is no native IPv6 CGNAT range, so this only ever returns
1208
+ * true for an embedded IPv4 address (e.g. `::ffff:100.64.0.1`).
1209
+ * @returns {boolean}
1210
+ */
1211
+ isCGNAT() {
1212
+ const embedded = this.embeddedIPv4();
1213
+ if (embedded) {
1214
+ return embedded.isCGNAT();
1215
+ }
1216
+ return false;
1217
+ }
1218
+ /**
1219
+ * Returns true if the address is an IPv4-mapped / NAT64 address whose embedded
1220
+ * IPv4 address is the limited broadcast address `255.255.255.255`
1221
+ * ([RFC 919](https://datatracker.ietf.org/doc/html/rfc919)), false otherwise.
1222
+ * There is no IPv6 broadcast, so this only ever returns true for an embedded
1223
+ * IPv4 address (e.g. `::ffff:255.255.255.255`).
1224
+ * @returns {boolean}
1225
+ */
1226
+ isBroadcast() {
1227
+ const embedded = this.embeddedIPv4();
1228
+ if (embedded) {
1229
+ return embedded.isBroadcast();
1230
+ }
1231
+ return false;
1232
+ }
1233
+ /**
1234
+ * Returns true if the address is the unspecified address `::`.
1235
+ * @returns {boolean}
1236
+ */
1237
+ isUnspecified() {
1238
+ const embedded = this.embeddedIPv4();
1239
+ if (embedded) {
1240
+ return embedded.isUnspecified();
1241
+ }
1242
+ return this.getType() === 'Unspecified';
1243
+ }
1244
+ /**
1245
+ * Returns true if the address is in the documentation prefix `2001:db8::/32` ([RFC 3849](https://datatracker.ietf.org/doc/html/rfc3849)).
1246
+ * @returns {boolean}
1247
+ */
1248
+ isDocumentation() {
1249
+ return DOCUMENTATION_SUBNETS.some((subnet) => this.isHostInSubnet(subnet));
1250
+ }
1251
+ /**
1252
+ * Returns true if the address is in the benchmarking range `2001:2::/48`
1253
+ * ([RFC 5180](https://datatracker.ietf.org/doc/html/rfc5180)) or is an
1254
+ * IPv4-mapped / NAT64 address whose embedded IPv4 address is in
1255
+ * `198.18.0.0/15`, false otherwise.
1256
+ * @returns {boolean}
1257
+ */
1258
+ isBenchmarking() {
1259
+ const embedded = this.embeddedIPv4();
1260
+ if (embedded) {
1261
+ return embedded.isBenchmarking();
1262
+ }
1263
+ return this.isHostInSubnet(BENCHMARKING_SUBNET);
1264
+ }
1265
+ /**
1266
+ * Returns true if the address is globally reachable: inside the global
1267
+ * unicast allocation `2000::/3` (the only range the [IANA IPv6 Address Space
1268
+ * Registry](https://www.iana.org/assignments/ipv6-address-space/) assigns
1269
+ * for global unicast; everything else is reserved, ULA, link-local, or
1270
+ * multicast) and not in any block the [IANA IPv6 Special-Purpose Address Registry](https://www.iana.org/assignments/iana-ipv6-special-registry/)
1271
+ * marks as not globally reachable. An IPv4-mapped or NAT64 well-known
1272
+ * address answers for its embedded IPv4 address, so `::ffff:10.0.0.1` and
1273
+ * `64:ff9b::7f00:1` are not global. Teredo (`2001::/32`) and 6to4
1274
+ * (`2002::/16`) are not global either: the registry lists them as N/A and a
1275
+ * packet to one needs a relay.
1276
+ *
1277
+ * This covers everything the individual classifiers name and the blocks they
1278
+ * do not: the discard-only prefix `100::/64`, the IETF protocol assignments
1279
+ * in `2001::/23`, the deprecated site-local `fec0::/10` and IPv4-compatible
1280
+ * `::/96` ranges, and unallocated space such as `4000::/3`. It is the single
1281
+ * predicate to use where a request must not reach an internal or
1282
+ * special-purpose destination; see SECURITY.md.
1283
+ * @returns {boolean}
1284
+ */
1285
+ isGlobal() {
1286
+ const embedded = this.embeddedIPv4();
1287
+ if (embedded) {
1288
+ return embedded.isGlobal();
1289
+ }
1290
+ return (this.isHostInSubnet(GLOBAL_UNICAST_SUBNET) &&
1291
+ common.isGloballyReachable.call(this, SPECIAL_PURPOSE_V6));
1292
+ }
1293
+ // #endregion
1294
+ // #region HTML
1295
+ /**
1296
+ * Returns the address as an HTTP URL with the host bracketed, e.g.
1297
+ * `http://[2001:db8::1]/`. If `optionalPort` is provided it is appended,
1298
+ * e.g. `http://[2001:db8::1]:8080/`.
1299
+ */
1300
+ href(optionalPort) {
1301
+ if (optionalPort === undefined) {
1302
+ optionalPort = '';
1303
+ }
1304
+ else {
1305
+ optionalPort = `:${optionalPort}`;
1306
+ }
1307
+ return `http://[${this.correctForm()}]${optionalPort}/`;
1308
+ }
1309
+ /**
1310
+ * Returns an HTML `<a>` element whose `href` encodes the address in a URL
1311
+ * hash fragment (default prefix `/#address=`). Useful for linking between
1312
+ * pages of an address-inspector UI.
1313
+ * @param options.className - CSS class for the rendered `<a>` element
1314
+ * @param options.prefix - hash prefix prepended to the address (default `/#address=`)
1315
+ * @param options.v4 - when true, render the address in v4-in-v6 form
1316
+ */
1317
+ link(options) {
1318
+ if (!options) {
1319
+ options = {};
1320
+ }
1321
+ if (options.className === undefined) {
1322
+ options.className = '';
1323
+ }
1324
+ if (options.prefix === undefined) {
1325
+ options.prefix = '/#address=';
1326
+ }
1327
+ if (options.v4 === undefined) {
1328
+ options.v4 = false;
1329
+ }
1330
+ let formFunction = this.correctForm;
1331
+ if (options.v4) {
1332
+ formFunction = this.to4in6;
1333
+ }
1334
+ const form = formFunction.call(this);
1335
+ const safeHref = helpers.escapeHtml(`${options.prefix}${form}`);
1336
+ const safeForm = helpers.escapeHtml(form);
1337
+ if (options.className) {
1338
+ const safeClass = helpers.escapeHtml(options.className);
1339
+ return `<a href="${safeHref}" class="${safeClass}">${safeForm}</a>`;
1340
+ }
1341
+ return `<a href="${safeHref}">${safeForm}</a>`;
1342
+ }
1343
+ /**
1344
+ * Groups an address.
1345
+ *
1346
+ * Returns an HTML fragment: each group is wrapped in a `<span>` carrying
1347
+ * the group classes an address-inspector UI hovers on. The address content
1348
+ * is HTML-escaped; anything you concatenate around it is your
1349
+ * responsibility.
1350
+ * @returns {String}
1351
+ */
1352
+ group() {
1353
+ if (this.elidedGroups === 0) {
1354
+ // The simple case
1355
+ return helpers.simpleGroup(this.addressMinusSuffix).join(':');
1356
+ }
1357
+ assert(typeof this.elidedGroups === 'number');
1358
+ assert(typeof this.elisionBegin === 'number');
1359
+ // The elided case
1360
+ const output = [];
1361
+ const [left, right] = this.addressMinusSuffix.split('::');
1362
+ if (left.length) {
1363
+ output.push(...helpers.simpleGroup(left));
1364
+ }
1365
+ else {
1366
+ output.push('');
1367
+ }
1368
+ const classes = ['hover-group'];
1369
+ for (let i = this.elisionBegin; i < this.elisionBegin + this.elidedGroups; i++) {
1370
+ classes.push(`group-${i}`);
1371
+ }
1372
+ output.push(`<span class="${classes.join(' ')}"></span>`);
1373
+ if (right.length) {
1374
+ output.push(...helpers.simpleGroup(right, this.elisionEnd));
1375
+ }
1376
+ else {
1377
+ output.push('');
1378
+ }
1379
+ if (this.is4()) {
1380
+ assert(this.address4 instanceof ipv4_1.Address4);
1381
+ output.pop();
1382
+ output.push(this.address4.groupForV6());
1383
+ }
1384
+ return output.join(':');
1385
+ }
1386
+ // #endregion
1387
+ // #region Regular expressions
1388
+ /**
1389
+ * Generate a regular expression string that can be used to find or validate
1390
+ * all variations of this address
1391
+ * @param {boolean} substringSearch
1392
+ * @returns {string}
1393
+ */
1394
+ regularExpressionString(substringSearch = false) {
1395
+ let output = [];
1396
+ // TODO: revisit why this is necessary
1397
+ const address6 = new Address6(this.correctForm());
1398
+ if (address6.elidedGroups === 0) {
1399
+ // The simple case
1400
+ output.push((0, regular_expressions_1.simpleRegularExpression)(address6.parsedAddress));
1401
+ }
1402
+ else if (address6.elidedGroups === constants6.GROUPS) {
1403
+ // A completely elided address
1404
+ output.push((0, regular_expressions_1.possibleElisions)(constants6.GROUPS));
1405
+ }
1406
+ else {
1407
+ // A partially elided address
1408
+ const halves = address6.address.split('::');
1409
+ if (halves[0].length) {
1410
+ output.push((0, regular_expressions_1.simpleRegularExpression)(halves[0].split(':')));
1411
+ }
1412
+ assert(typeof address6.elidedGroups === 'number');
1413
+ output.push((0, regular_expressions_1.possibleElisions)(address6.elidedGroups, halves[0].length !== 0, halves[1].length !== 0));
1414
+ if (halves[1].length) {
1415
+ output.push((0, regular_expressions_1.simpleRegularExpression)(halves[1].split(':')));
1416
+ }
1417
+ output = [output.join(':')];
1418
+ }
1419
+ if (!substringSearch) {
1420
+ output = [
1421
+ '(?=^|',
1422
+ regular_expressions_1.ADDRESS_BOUNDARY,
1423
+ '|[^\\w\\:])(',
1424
+ ...output,
1425
+ ')(?=[^\\w\\:]|',
1426
+ regular_expressions_1.ADDRESS_BOUNDARY,
1427
+ '|$)',
1428
+ ];
1429
+ }
1430
+ return output.join('');
1431
+ }
1432
+ /**
1433
+ * Generate a regular expression that can be used to find or validate all
1434
+ * variations of this address.
1435
+ * @param {boolean} substringSearch
1436
+ * @returns {RegExp}
1437
+ */
1438
+ regularExpression(substringSearch = false) {
1439
+ return new RegExp(this.regularExpressionString(substringSearch), 'i');
1440
+ }
1441
+ }
1442
+ exports.Address6 = Address6;
1443
+ const TYPE_SUBNETS = Object.keys(constants6.TYPES).map((subnet) => [
1444
+ new Address6(subnet),
1445
+ constants6.TYPES[subnet],
1446
+ ]);
1447
+ const TEREDO_SUBNET = new Address6('2001::/32');
1448
+ const SIX_TO_FOUR_SUBNET = new Address6('2002::/16');
1449
+ const ULA_SUBNET = new Address6('fc00::/7');
1450
+ const LINK_LOCAL_SUBNET = new Address6('fe80::/10');
1451
+ const DOCUMENTATION_SUBNETS = [new Address6('2001:db8::/32'), new Address6('3fff::/20')];
1452
+ const BENCHMARKING_SUBNET = new Address6('2001:2::/48');
1453
+ const GLOBAL_UNICAST_SUBNET = new Address6('2000::/3');
1454
+ const SPECIAL_PURPOSE_V6 = constants6.SPECIAL_PURPOSE.map(([cidr, , reachable]) => ({
1455
+ subnet: new Address6(cidr),
1456
+ reachable,
1457
+ }));
1458
+ const IPV4_MAPPED_SUBNET = new Address6('::ffff:0:0/96');
1459
+ const NAT64_WELL_KNOWN_SUBNET = new Address6('64:ff9b::/96');
1460
+ const NAT64_LOCAL_USE_SUBNET = new Address6('64:ff9b:1::/48');
1461
+ //# sourceMappingURL=ipv6.js.map