@contrast/agent-bundle 5.39.1 → 5.41.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 (279) hide show
  1. package/node_modules/@contrast/agent/lib/start-agent.js +50 -40
  2. package/node_modules/@contrast/agent/package.json +11 -11
  3. package/node_modules/@contrast/agent-swc-plugin/index.js +9 -3
  4. package/node_modules/@contrast/agent-swc-plugin/methods.js +15 -1
  5. package/node_modules/@contrast/agent-swc-plugin/package.json +5 -8
  6. package/node_modules/@contrast/agent-swc-plugin/rewriter.wasm +0 -0
  7. package/node_modules/@contrast/agentify/lib/index.js +2 -2
  8. package/node_modules/@contrast/agentify/package.json +15 -14
  9. package/node_modules/@contrast/architecture-components/package.json +5 -5
  10. package/node_modules/@contrast/assess/lib/dataflow/propagation/install/string/replace.js +6 -3
  11. package/node_modules/@contrast/assess/lib/dataflow/propagation/install/util-format.js +44 -21
  12. package/node_modules/@contrast/assess/lib/dataflow/sources/index.js +1 -1
  13. package/node_modules/@contrast/assess/lib/dataflow/sources/install/{body-parser1.js → body-parser.js} +2 -2
  14. package/node_modules/@contrast/assess/lib/dataflow/sources/install/koa/koa-bodyparsers.js +3 -1
  15. package/node_modules/@contrast/assess/lib/dataflow/sources/install/qs6.js +5 -5
  16. package/node_modules/@contrast/assess/lib/dataflow/sources/install/querystring.js +2 -1
  17. package/node_modules/@contrast/assess/lib/index.d.ts +0 -1
  18. package/node_modules/@contrast/assess/lib/make-source-context.js +7 -37
  19. package/node_modules/@contrast/assess/lib/sampler/common.js +7 -11
  20. package/node_modules/@contrast/assess/package.json +12 -11
  21. package/node_modules/@contrast/common/lib/constants.d.ts +6 -0
  22. package/node_modules/@contrast/common/lib/constants.js +8 -1
  23. package/node_modules/@contrast/common/lib/types.d.ts +7 -1
  24. package/node_modules/@contrast/common/package.json +1 -1
  25. package/node_modules/@contrast/config/lib/common.js +1 -1
  26. package/node_modules/@contrast/config/lib/config.js +49 -27
  27. package/node_modules/@contrast/config/lib/index.d.ts +3 -2
  28. package/node_modules/@contrast/config/lib/options.js +4 -4
  29. package/node_modules/@contrast/config/package.json +4 -3
  30. package/node_modules/@contrast/core/lib/sensitive-data-masking/protect-listener.js +15 -15
  31. package/node_modules/@contrast/core/package.json +6 -6
  32. package/node_modules/@contrast/deadzones/package.json +5 -5
  33. package/node_modules/@contrast/dep-hooks/package.json +3 -3
  34. package/node_modules/@contrast/esm-hooks/package.json +6 -6
  35. package/node_modules/@contrast/instrumentation/lib/index.js +0 -1
  36. package/node_modules/@contrast/instrumentation/package.json +5 -5
  37. package/node_modules/@contrast/library-analysis/lib/install/library-reporting/dep.json +300 -152
  38. package/node_modules/@contrast/library-analysis/lib/install/library-reporting/index.js +9 -2
  39. package/node_modules/@contrast/library-analysis/lib/install/library-reporting/utils.js +54 -43
  40. package/node_modules/@contrast/library-analysis/package.json +4 -4
  41. package/node_modules/@contrast/logger/lib/serializers.js +2 -2
  42. package/node_modules/@contrast/logger/package.json +3 -3
  43. package/node_modules/@contrast/metrics/package.json +6 -6
  44. package/node_modules/@contrast/patcher/package.json +2 -2
  45. package/node_modules/@contrast/protect/lib/get-source-context.js +3 -1
  46. package/node_modules/@contrast/protect/lib/index.js +6 -1
  47. package/node_modules/@contrast/protect/lib/input-analysis/handlers.js +7 -9
  48. package/node_modules/@contrast/protect/lib/input-analysis/index.js +1 -1
  49. package/node_modules/@contrast/protect/lib/input-analysis/install/{body-parser1.js → body-parser.js} +1 -1
  50. package/node_modules/@contrast/protect/lib/input-analysis/install/http.js +18 -19
  51. package/node_modules/@contrast/protect/lib/input-analysis/install/qs6.js +18 -17
  52. package/node_modules/@contrast/protect/lib/input-analysis/install/universal-cookie4.js +2 -3
  53. package/node_modules/@contrast/protect/lib/make-source-context.js +22 -66
  54. package/node_modules/@contrast/protect/lib/semantic-analysis/handlers.js +73 -72
  55. package/node_modules/@contrast/protect/package.json +11 -11
  56. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/application-activity/index.js +7 -7
  57. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/application-activity/translations.d.ts +3 -3
  58. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/application-activity/translations.js +24 -21
  59. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/routes-observed.js +2 -1
  60. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/index.js +1 -1
  61. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/translations.d.ts +1 -2
  62. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/translations.js +8 -2
  63. package/node_modules/@contrast/reporter/lib/reporters/security-logger/index.d.ts +2 -2
  64. package/node_modules/@contrast/reporter/lib/reporters/security-logger/index.js +22 -20
  65. package/node_modules/@contrast/reporter/package.json +7 -7
  66. package/node_modules/@contrast/rewriter/lib/index.js +2 -2
  67. package/node_modules/@contrast/rewriter/package.json +6 -6
  68. package/node_modules/@contrast/route-coverage/lib/index.d.ts +2 -0
  69. package/node_modules/@contrast/route-coverage/lib/index.js +15 -17
  70. package/node_modules/@contrast/route-coverage/lib/install/express/express5.js +489 -202
  71. package/node_modules/@contrast/route-coverage/package.json +9 -9
  72. package/node_modules/@contrast/scopes/package.json +5 -5
  73. package/node_modules/@contrast/sec-obs/lib/traces/http.js +2 -2
  74. package/node_modules/@contrast/sec-obs/lib/traces/http.test.js +17 -0
  75. package/node_modules/@contrast/sec-obs/lib/traces/outbound-service-call.js +2 -2
  76. package/node_modules/@contrast/sec-obs/lib/traces/outbound-service-call.test.js +17 -0
  77. package/node_modules/@contrast/sec-obs/package.json +9 -9
  78. package/node_modules/@contrast/sources/lib/index.js +109 -0
  79. package/node_modules/@contrast/sources/lib/index.test.js +120 -0
  80. package/node_modules/@contrast/{route-coverage/lib/normalized-url-mapper.js → sources/lib/normalized-uri-mapper.js} +10 -3
  81. package/node_modules/@contrast/sources/lib/normalized-uri-mapper.test.js +59 -0
  82. package/node_modules/@contrast/{sec-obs/node_modules/@contrast/core/lib/sensitive-data-masking/constants.js → sources/lib/req-data.js} +0 -6
  83. package/node_modules/@contrast/sources/lib/source-info.js +183 -0
  84. package/node_modules/@contrast/sources/lib/source-info.test.js +68 -0
  85. package/node_modules/@contrast/sources/package.json +16 -0
  86. package/node_modules/@contrast/telemetry/package.json +6 -6
  87. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.d.ts +2831 -77
  88. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.js +2831 -77
  89. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.js.map +1 -1
  90. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.d.ts +415 -98
  91. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.js +415 -98
  92. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.js.map +1 -1
  93. package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.d.ts +106 -0
  94. package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js +106 -0
  95. package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js.map +1 -1
  96. package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.d.ts +1 -1
  97. package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.js +1 -1
  98. package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.js.map +1 -1
  99. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.d.ts +2831 -77
  100. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.js +2831 -77
  101. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.js.map +1 -1
  102. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.d.ts +415 -98
  103. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.js +415 -98
  104. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.js.map +1 -1
  105. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.d.ts +106 -0
  106. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.js +106 -0
  107. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.js.map +1 -1
  108. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.d.ts +1 -1
  109. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.js +1 -1
  110. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.js.map +1 -1
  111. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.d.ts +2831 -77
  112. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.js +2858 -103
  113. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.js.map +1 -1
  114. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.d.ts +415 -98
  115. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.js +420 -102
  116. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.js.map +1 -1
  117. package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.d.ts +106 -0
  118. package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.js +106 -0
  119. package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.js.map +1 -1
  120. package/node_modules/@opentelemetry/semantic-conventions/build/src/version.d.ts +1 -1
  121. package/node_modules/@opentelemetry/semantic-conventions/build/src/version.js +1 -1
  122. package/node_modules/@opentelemetry/semantic-conventions/build/src/version.js.map +1 -1
  123. package/node_modules/@opentelemetry/semantic-conventions/package.json +3 -3
  124. package/node_modules/@types/node/README.md +2 -2
  125. package/node_modules/@types/node/buffer.d.ts +5 -0
  126. package/node_modules/@types/node/dns/promises.d.ts +11 -10
  127. package/node_modules/@types/node/dns.d.ts +18 -19
  128. package/node_modules/@types/node/fs.d.ts +13 -1
  129. package/node_modules/@types/node/http.d.ts +4 -19
  130. package/node_modules/@types/node/inspector.d.ts +53 -0
  131. package/node_modules/@types/node/package.json +2 -82
  132. package/node_modules/@types/node/stream/web.d.ts +4 -0
  133. package/node_modules/axios/CHANGELOG.md +17 -0
  134. package/node_modules/axios/README.md +1 -4
  135. package/node_modules/axios/dist/axios.js +39 -5
  136. package/node_modules/axios/dist/axios.js.map +1 -1
  137. package/node_modules/axios/dist/axios.min.js +2 -2
  138. package/node_modules/axios/dist/axios.min.js.map +1 -1
  139. package/node_modules/axios/dist/browser/axios.cjs +46 -9
  140. package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
  141. package/node_modules/axios/dist/esm/axios.js +46 -9
  142. package/node_modules/axios/dist/esm/axios.js.map +1 -1
  143. package/node_modules/axios/dist/esm/axios.min.js +2 -2
  144. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  145. package/node_modules/axios/dist/node/axios.cjs +46 -9
  146. package/node_modules/axios/dist/node/axios.cjs.map +1 -1
  147. package/node_modules/axios/index.d.cts +13 -2
  148. package/node_modules/axios/lib/core/Axios.js +2 -2
  149. package/node_modules/axios/lib/core/mergeConfig.js +1 -1
  150. package/node_modules/axios/lib/env/data.js +1 -1
  151. package/node_modules/axios/lib/helpers/throttle.js +1 -1
  152. package/node_modules/axios/lib/helpers/toURLEncodedForm.js +4 -3
  153. package/node_modules/axios/lib/utils.js +36 -0
  154. package/node_modules/axios/package.json +5 -5
  155. package/node_modules/deepmerge/.editorconfig +7 -0
  156. package/node_modules/deepmerge/.eslintcache +1 -0
  157. package/node_modules/deepmerge/changelog.md +167 -0
  158. package/node_modules/deepmerge/dist/cjs.js +133 -0
  159. package/node_modules/deepmerge/dist/umd.js +139 -0
  160. package/node_modules/deepmerge/index.d.ts +20 -0
  161. package/node_modules/deepmerge/index.js +106 -0
  162. package/node_modules/{path-to-regexp/LICENSE → deepmerge/license.txt} +1 -1
  163. package/node_modules/deepmerge/package.json +42 -0
  164. package/node_modules/deepmerge/readme.md +264 -0
  165. package/node_modules/deepmerge/rollup.config.js +22 -0
  166. package/node_modules/follow-redirects/package.json +1 -1
  167. package/node_modules/form-data/CHANGELOG.md +601 -0
  168. package/node_modules/form-data/{Readme.md → README.md} +4 -4
  169. package/node_modules/form-data/lib/form_data.js +2 -6
  170. package/node_modules/form-data/package.json +22 -6
  171. package/node_modules/nan/.github/workflows/ci.yml +8 -10
  172. package/node_modules/nan/.pre-commit-config.yaml +8 -0
  173. package/node_modules/nan/CHANGELOG.md +5 -1
  174. package/node_modules/nan/README.md +4 -4
  175. package/node_modules/nan/nan.h +16 -12
  176. package/node_modules/nan/nan_callbacks.h +13 -0
  177. package/node_modules/nan/nan_callbacks_12_inl.h +16 -2
  178. package/node_modules/nan/nan_callbacks_pre_12_inl.h +6 -2
  179. package/node_modules/nan/nan_maybe_43_inl.h +1 -1
  180. package/node_modules/nan/nan_maybe_pre_43_inl.h +1 -1
  181. package/node_modules/nan/nan_scriptorigin.h +11 -9
  182. package/node_modules/nan/nan_typedarray_contents.h +1 -1
  183. package/node_modules/nan/package.json +2 -2
  184. package/package.json +5 -3
  185. package/node_modules/@contrast/agentify/lib/sources.js +0 -94
  186. package/node_modules/@contrast/route-coverage/lib/install/http.js +0 -44
  187. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/LICENSE +0 -12
  188. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/lib/constants.d.ts +0 -385
  189. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/lib/constants.js +0 -270
  190. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/lib/index.d.ts +0 -40
  191. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/lib/index.js +0 -228
  192. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/lib/primordials.d.ts +0 -65
  193. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/lib/primordials.js +0 -66
  194. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/lib/types.d.ts +0 -383
  195. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/lib/types.js +0 -30
  196. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/package.json +0 -23
  197. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/LICENSE +0 -12
  198. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/README.md +0 -44
  199. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/lib/common.js +0 -131
  200. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/lib/config.js +0 -290
  201. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/lib/index.d.ts +0 -328
  202. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/lib/index.js +0 -29
  203. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/lib/options.js +0 -836
  204. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/lib/validators.js +0 -23
  205. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/package.json +0 -27
  206. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/LICENSE +0 -12
  207. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/README.md +0 -98
  208. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/agent-info.js +0 -36
  209. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/app-info.js +0 -233
  210. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/build-id.js +0 -51
  211. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/capture-stacktrace.js +0 -256
  212. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/contrast-methods.js +0 -155
  213. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/index.d.ts +0 -52
  214. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/ioc/core.js +0 -95
  215. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/is-agent-path.js +0 -37
  216. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/messages.js +0 -28
  217. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/sensitive-data-masking/index.js +0 -63
  218. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/sensitive-data-masking/protect-listener.js +0 -111
  219. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/sensitive-data-masking/server-settings-listener.js +0 -44
  220. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/system-info/cloud-provider-metadata.js +0 -146
  221. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/system-info/index.js +0 -225
  222. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/system-info/linux-os-info.js +0 -137
  223. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/system-info/utils.js +0 -35
  224. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/package.json +0 -33
  225. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/LICENSE +0 -12
  226. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/README.md +0 -94
  227. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/export-handler-registry.d.ts +0 -121
  228. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/export-handler-registry.js +0 -206
  229. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/export-hook-descriptor.d.ts +0 -72
  230. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/export-hook-descriptor.js +0 -88
  231. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/handler-invoker.d.ts +0 -46
  232. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/handler-invoker.js +0 -106
  233. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/helpers.d.ts +0 -28
  234. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/helpers.js +0 -66
  235. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/index.d.ts +0 -115
  236. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/index.js +0 -208
  237. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/package-finder.d.ts +0 -43
  238. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/package-finder.js +0 -79
  239. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/package.json +0 -29
  240. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/LICENSE +0 -12
  241. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/README.md +0 -270
  242. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/lib/index.d.ts +0 -16
  243. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/lib/index.js +0 -132
  244. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/lib/serializers.d.ts +0 -33
  245. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/lib/serializers.js +0 -75
  246. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/lib/utils.d.ts +0 -15
  247. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/lib/utils.js +0 -34
  248. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/package.json +0 -28
  249. package/node_modules/@contrast/sec-obs/node_modules/@contrast/patcher/LICENSE +0 -12
  250. package/node_modules/@contrast/sec-obs/node_modules/@contrast/patcher/README.md +0 -51
  251. package/node_modules/@contrast/sec-obs/node_modules/@contrast/patcher/lib/index.d.ts +0 -101
  252. package/node_modules/@contrast/sec-obs/node_modules/@contrast/patcher/lib/index.js +0 -544
  253. package/node_modules/@contrast/sec-obs/node_modules/@contrast/patcher/package.json +0 -25
  254. package/node_modules/@contrast/sec-obs/node_modules/@contrast/rewriter/LICENSE +0 -12
  255. package/node_modules/@contrast/sec-obs/node_modules/@contrast/rewriter/README.md +0 -6
  256. package/node_modules/@contrast/sec-obs/node_modules/@contrast/rewriter/lib/cache.js +0 -318
  257. package/node_modules/@contrast/sec-obs/node_modules/@contrast/rewriter/lib/index.js +0 -216
  258. package/node_modules/@contrast/sec-obs/node_modules/@contrast/rewriter/lib/rewrite-is-deadzoned.js +0 -143
  259. package/node_modules/@contrast/sec-obs/node_modules/@contrast/rewriter/package.json +0 -30
  260. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/LICENSE +0 -12
  261. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/constants.js +0 -26
  262. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/index.d.ts +0 -46
  263. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/index.js +0 -70
  264. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/install/bluebird.js +0 -128
  265. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/install/index.js +0 -34
  266. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/install/mongodb-core.js +0 -83
  267. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/install/mongodb3.js +0 -89
  268. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/install/mongodb4.js +0 -80
  269. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/install/mongodb6.js +0 -46
  270. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/install/mysql.js +0 -151
  271. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/install/redis.js +0 -79
  272. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/utils.js +0 -35
  273. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/package.json +0 -28
  274. package/node_modules/form-data/README.md.bak +0 -355
  275. package/node_modules/path-to-regexp/Readme.md +0 -216
  276. package/node_modules/path-to-regexp/dist/index.d.ts +0 -136
  277. package/node_modules/path-to-regexp/dist/index.js +0 -403
  278. package/node_modules/path-to-regexp/dist/index.js.map +0 -1
  279. package/node_modules/path-to-regexp/package.json +0 -62
@@ -1,136 +0,0 @@
1
- /**
2
- * Encode a string into another string.
3
- */
4
- export type Encode = (value: string) => string;
5
- /**
6
- * Decode a string into another string.
7
- */
8
- export type Decode = (value: string) => string;
9
- export interface ParseOptions {
10
- /**
11
- * A function for encoding input strings.
12
- */
13
- encodePath?: Encode;
14
- }
15
- export interface PathToRegexpOptions {
16
- /**
17
- * Matches the path completely without trailing characters. (default: `true`)
18
- */
19
- end?: boolean;
20
- /**
21
- * Allows optional trailing delimiter to match. (default: `true`)
22
- */
23
- trailing?: boolean;
24
- /**
25
- * Match will be case sensitive. (default: `false`)
26
- */
27
- sensitive?: boolean;
28
- /**
29
- * The default delimiter for segments. (default: `'/'`)
30
- */
31
- delimiter?: string;
32
- }
33
- export interface MatchOptions extends PathToRegexpOptions {
34
- /**
35
- * Function for decoding strings for params, or `false` to disable entirely. (default: `decodeURIComponent`)
36
- */
37
- decode?: Decode | false;
38
- }
39
- export interface CompileOptions {
40
- /**
41
- * Function for encoding input strings for output into the path, or `false` to disable entirely. (default: `encodeURIComponent`)
42
- */
43
- encode?: Encode | false;
44
- /**
45
- * The default delimiter for segments. (default: `'/'`)
46
- */
47
- delimiter?: string;
48
- }
49
- /**
50
- * Plain text.
51
- */
52
- export interface Text {
53
- type: "text";
54
- value: string;
55
- }
56
- /**
57
- * A parameter designed to match arbitrary text within a segment.
58
- */
59
- export interface Parameter {
60
- type: "param";
61
- name: string;
62
- }
63
- /**
64
- * A wildcard parameter designed to match multiple segments.
65
- */
66
- export interface Wildcard {
67
- type: "wildcard";
68
- name: string;
69
- }
70
- /**
71
- * A set of possible tokens to expand when matching.
72
- */
73
- export interface Group {
74
- type: "group";
75
- tokens: Token[];
76
- }
77
- /**
78
- * A token that corresponds with a regexp capture.
79
- */
80
- export type Key = Parameter | Wildcard;
81
- /**
82
- * A sequence of `path-to-regexp` keys that match capturing groups.
83
- */
84
- export type Keys = Array<Key>;
85
- /**
86
- * A sequence of path match characters.
87
- */
88
- export type Token = Text | Parameter | Wildcard | Group;
89
- /**
90
- * Tokenized path instance.
91
- */
92
- export declare class TokenData {
93
- readonly tokens: Token[];
94
- constructor(tokens: Token[]);
95
- }
96
- /**
97
- * Parse a string for the raw tokens.
98
- */
99
- export declare function parse(str: string, options?: ParseOptions): TokenData;
100
- /**
101
- * Compile a string to a template function for the path.
102
- */
103
- export declare function compile<P extends ParamData = ParamData>(path: Path, options?: CompileOptions & ParseOptions): (data?: P) => string;
104
- export type ParamData = Partial<Record<string, string | string[]>>;
105
- export type PathFunction<P extends ParamData> = (data?: P) => string;
106
- /**
107
- * A match result contains data about the path match.
108
- */
109
- export interface MatchResult<P extends ParamData> {
110
- path: string;
111
- params: P;
112
- }
113
- /**
114
- * A match is either `false` (no match) or a match result.
115
- */
116
- export type Match<P extends ParamData> = false | MatchResult<P>;
117
- /**
118
- * The match function takes a string and returns whether it matched the path.
119
- */
120
- export type MatchFunction<P extends ParamData> = (path: string) => Match<P>;
121
- /**
122
- * Supported path types.
123
- */
124
- export type Path = string | TokenData;
125
- /**
126
- * Transform a path into a match function.
127
- */
128
- export declare function match<P extends ParamData>(path: Path | Path[], options?: MatchOptions & ParseOptions): MatchFunction<P>;
129
- export declare function pathToRegexp(path: Path | Path[], options?: PathToRegexpOptions & ParseOptions): {
130
- regexp: RegExp;
131
- keys: Keys;
132
- };
133
- /**
134
- * Stringify token data into a path string.
135
- */
136
- export declare function stringify(data: TokenData): string;
@@ -1,403 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TokenData = void 0;
4
- exports.parse = parse;
5
- exports.compile = compile;
6
- exports.match = match;
7
- exports.pathToRegexp = pathToRegexp;
8
- exports.stringify = stringify;
9
- const DEFAULT_DELIMITER = "/";
10
- const NOOP_VALUE = (value) => value;
11
- const ID_START = /^[$_\p{ID_Start}]$/u;
12
- const ID_CONTINUE = /^[$\u200c\u200d\p{ID_Continue}]$/u;
13
- const DEBUG_URL = "https://git.new/pathToRegexpError";
14
- const SIMPLE_TOKENS = {
15
- // Groups.
16
- "{": "{",
17
- "}": "}",
18
- // Reserved.
19
- "(": "(",
20
- ")": ")",
21
- "[": "[",
22
- "]": "]",
23
- "+": "+",
24
- "?": "?",
25
- "!": "!",
26
- };
27
- /**
28
- * Escape text for stringify to path.
29
- */
30
- function escapeText(str) {
31
- return str.replace(/[{}()\[\]+?!:*]/g, "\\$&");
32
- }
33
- /**
34
- * Escape a regular expression string.
35
- */
36
- function escape(str) {
37
- return str.replace(/[.+*?^${}()[\]|/\\]/g, "\\$&");
38
- }
39
- /**
40
- * Tokenize input string.
41
- */
42
- function* lexer(str) {
43
- const chars = [...str];
44
- let i = 0;
45
- function name() {
46
- let value = "";
47
- if (ID_START.test(chars[++i])) {
48
- value += chars[i];
49
- while (ID_CONTINUE.test(chars[++i])) {
50
- value += chars[i];
51
- }
52
- }
53
- else if (chars[i] === '"') {
54
- let pos = i;
55
- while (i < chars.length) {
56
- if (chars[++i] === '"') {
57
- i++;
58
- pos = 0;
59
- break;
60
- }
61
- if (chars[i] === "\\") {
62
- value += chars[++i];
63
- }
64
- else {
65
- value += chars[i];
66
- }
67
- }
68
- if (pos) {
69
- throw new TypeError(`Unterminated quote at ${pos}: ${DEBUG_URL}`);
70
- }
71
- }
72
- if (!value) {
73
- throw new TypeError(`Missing parameter name at ${i}: ${DEBUG_URL}`);
74
- }
75
- return value;
76
- }
77
- while (i < chars.length) {
78
- const value = chars[i];
79
- const type = SIMPLE_TOKENS[value];
80
- if (type) {
81
- yield { type, index: i++, value };
82
- }
83
- else if (value === "\\") {
84
- yield { type: "ESCAPED", index: i++, value: chars[i++] };
85
- }
86
- else if (value === ":") {
87
- const value = name();
88
- yield { type: "PARAM", index: i, value };
89
- }
90
- else if (value === "*") {
91
- const value = name();
92
- yield { type: "WILDCARD", index: i, value };
93
- }
94
- else {
95
- yield { type: "CHAR", index: i, value: chars[i++] };
96
- }
97
- }
98
- return { type: "END", index: i, value: "" };
99
- }
100
- class Iter {
101
- constructor(tokens) {
102
- this.tokens = tokens;
103
- }
104
- peek() {
105
- if (!this._peek) {
106
- const next = this.tokens.next();
107
- this._peek = next.value;
108
- }
109
- return this._peek;
110
- }
111
- tryConsume(type) {
112
- const token = this.peek();
113
- if (token.type !== type)
114
- return;
115
- this._peek = undefined; // Reset after consumed.
116
- return token.value;
117
- }
118
- consume(type) {
119
- const value = this.tryConsume(type);
120
- if (value !== undefined)
121
- return value;
122
- const { type: nextType, index } = this.peek();
123
- throw new TypeError(`Unexpected ${nextType} at ${index}, expected ${type}: ${DEBUG_URL}`);
124
- }
125
- text() {
126
- let result = "";
127
- let value;
128
- while ((value = this.tryConsume("CHAR") || this.tryConsume("ESCAPED"))) {
129
- result += value;
130
- }
131
- return result;
132
- }
133
- }
134
- /**
135
- * Tokenized path instance.
136
- */
137
- class TokenData {
138
- constructor(tokens) {
139
- this.tokens = tokens;
140
- }
141
- }
142
- exports.TokenData = TokenData;
143
- /**
144
- * Parse a string for the raw tokens.
145
- */
146
- function parse(str, options = {}) {
147
- const { encodePath = NOOP_VALUE } = options;
148
- const it = new Iter(lexer(str));
149
- function consume(endType) {
150
- const tokens = [];
151
- while (true) {
152
- const path = it.text();
153
- if (path)
154
- tokens.push({ type: "text", value: encodePath(path) });
155
- const param = it.tryConsume("PARAM");
156
- if (param) {
157
- tokens.push({
158
- type: "param",
159
- name: param,
160
- });
161
- continue;
162
- }
163
- const wildcard = it.tryConsume("WILDCARD");
164
- if (wildcard) {
165
- tokens.push({
166
- type: "wildcard",
167
- name: wildcard,
168
- });
169
- continue;
170
- }
171
- const open = it.tryConsume("{");
172
- if (open) {
173
- tokens.push({
174
- type: "group",
175
- tokens: consume("}"),
176
- });
177
- continue;
178
- }
179
- it.consume(endType);
180
- return tokens;
181
- }
182
- }
183
- const tokens = consume("END");
184
- return new TokenData(tokens);
185
- }
186
- /**
187
- * Compile a string to a template function for the path.
188
- */
189
- function compile(path, options = {}) {
190
- const { encode = encodeURIComponent, delimiter = DEFAULT_DELIMITER } = options;
191
- const data = path instanceof TokenData ? path : parse(path, options);
192
- const fn = tokensToFunction(data.tokens, delimiter, encode);
193
- return function path(data = {}) {
194
- const [path, ...missing] = fn(data);
195
- if (missing.length) {
196
- throw new TypeError(`Missing parameters: ${missing.join(", ")}`);
197
- }
198
- return path;
199
- };
200
- }
201
- function tokensToFunction(tokens, delimiter, encode) {
202
- const encoders = tokens.map((token) => tokenToFunction(token, delimiter, encode));
203
- return (data) => {
204
- const result = [""];
205
- for (const encoder of encoders) {
206
- const [value, ...extras] = encoder(data);
207
- result[0] += value;
208
- result.push(...extras);
209
- }
210
- return result;
211
- };
212
- }
213
- /**
214
- * Convert a single token into a path building function.
215
- */
216
- function tokenToFunction(token, delimiter, encode) {
217
- if (token.type === "text")
218
- return () => [token.value];
219
- if (token.type === "group") {
220
- const fn = tokensToFunction(token.tokens, delimiter, encode);
221
- return (data) => {
222
- const [value, ...missing] = fn(data);
223
- if (!missing.length)
224
- return [value];
225
- return [""];
226
- };
227
- }
228
- const encodeValue = encode || NOOP_VALUE;
229
- if (token.type === "wildcard" && encode !== false) {
230
- return (data) => {
231
- const value = data[token.name];
232
- if (value == null)
233
- return ["", token.name];
234
- if (!Array.isArray(value) || value.length === 0) {
235
- throw new TypeError(`Expected "${token.name}" to be a non-empty array`);
236
- }
237
- return [
238
- value
239
- .map((value, index) => {
240
- if (typeof value !== "string") {
241
- throw new TypeError(`Expected "${token.name}/${index}" to be a string`);
242
- }
243
- return encodeValue(value);
244
- })
245
- .join(delimiter),
246
- ];
247
- };
248
- }
249
- return (data) => {
250
- const value = data[token.name];
251
- if (value == null)
252
- return ["", token.name];
253
- if (typeof value !== "string") {
254
- throw new TypeError(`Expected "${token.name}" to be a string`);
255
- }
256
- return [encodeValue(value)];
257
- };
258
- }
259
- /**
260
- * Transform a path into a match function.
261
- */
262
- function match(path, options = {}) {
263
- const { decode = decodeURIComponent, delimiter = DEFAULT_DELIMITER } = options;
264
- const { regexp, keys } = pathToRegexp(path, options);
265
- const decoders = keys.map((key) => {
266
- if (decode === false)
267
- return NOOP_VALUE;
268
- if (key.type === "param")
269
- return decode;
270
- return (value) => value.split(delimiter).map(decode);
271
- });
272
- return function match(input) {
273
- const m = regexp.exec(input);
274
- if (!m)
275
- return false;
276
- const path = m[0];
277
- const params = Object.create(null);
278
- for (let i = 1; i < m.length; i++) {
279
- if (m[i] === undefined)
280
- continue;
281
- const key = keys[i - 1];
282
- const decoder = decoders[i - 1];
283
- params[key.name] = decoder(m[i]);
284
- }
285
- return { path, params };
286
- };
287
- }
288
- function pathToRegexp(path, options = {}) {
289
- const { delimiter = DEFAULT_DELIMITER, end = true, sensitive = false, trailing = true, } = options;
290
- const keys = [];
291
- const sources = [];
292
- const flags = sensitive ? "" : "i";
293
- const paths = Array.isArray(path) ? path : [path];
294
- const items = paths.map((path) => path instanceof TokenData ? path : parse(path, options));
295
- for (const { tokens } of items) {
296
- for (const seq of flatten(tokens, 0, [])) {
297
- const regexp = sequenceToRegExp(seq, delimiter, keys);
298
- sources.push(regexp);
299
- }
300
- }
301
- let pattern = `^(?:${sources.join("|")})`;
302
- if (trailing)
303
- pattern += `(?:${escape(delimiter)}$)?`;
304
- pattern += end ? "$" : `(?=${escape(delimiter)}|$)`;
305
- const regexp = new RegExp(pattern, flags);
306
- return { regexp, keys };
307
- }
308
- /**
309
- * Generate a flat list of sequence tokens from the given tokens.
310
- */
311
- function* flatten(tokens, index, init) {
312
- if (index === tokens.length) {
313
- return yield init;
314
- }
315
- const token = tokens[index];
316
- if (token.type === "group") {
317
- const fork = init.slice();
318
- for (const seq of flatten(token.tokens, 0, fork)) {
319
- yield* flatten(tokens, index + 1, seq);
320
- }
321
- }
322
- else {
323
- init.push(token);
324
- }
325
- yield* flatten(tokens, index + 1, init);
326
- }
327
- /**
328
- * Transform a flat sequence of tokens into a regular expression.
329
- */
330
- function sequenceToRegExp(tokens, delimiter, keys) {
331
- let result = "";
332
- let backtrack = "";
333
- let isSafeSegmentParam = true;
334
- for (let i = 0; i < tokens.length; i++) {
335
- const token = tokens[i];
336
- if (token.type === "text") {
337
- result += escape(token.value);
338
- backtrack += token.value;
339
- isSafeSegmentParam || (isSafeSegmentParam = token.value.includes(delimiter));
340
- continue;
341
- }
342
- if (token.type === "param" || token.type === "wildcard") {
343
- if (!isSafeSegmentParam && !backtrack) {
344
- throw new TypeError(`Missing text after "${token.name}": ${DEBUG_URL}`);
345
- }
346
- if (token.type === "param") {
347
- result += `(${negate(delimiter, isSafeSegmentParam ? "" : backtrack)}+)`;
348
- }
349
- else {
350
- result += `([\\s\\S]+)`;
351
- }
352
- keys.push(token);
353
- backtrack = "";
354
- isSafeSegmentParam = false;
355
- continue;
356
- }
357
- }
358
- return result;
359
- }
360
- function negate(delimiter, backtrack) {
361
- if (backtrack.length < 2) {
362
- if (delimiter.length < 2)
363
- return `[^${escape(delimiter + backtrack)}]`;
364
- return `(?:(?!${escape(delimiter)})[^${escape(backtrack)}])`;
365
- }
366
- if (delimiter.length < 2) {
367
- return `(?:(?!${escape(backtrack)})[^${escape(delimiter)}])`;
368
- }
369
- return `(?:(?!${escape(backtrack)}|${escape(delimiter)})[\\s\\S])`;
370
- }
371
- /**
372
- * Stringify token data into a path string.
373
- */
374
- function stringify(data) {
375
- return data.tokens
376
- .map(function stringifyToken(token, index, tokens) {
377
- if (token.type === "text")
378
- return escapeText(token.value);
379
- if (token.type === "group") {
380
- return `{${token.tokens.map(stringifyToken).join("")}}`;
381
- }
382
- const isSafe = isNameSafe(token.name) && isNextNameSafe(tokens[index + 1]);
383
- const key = isSafe ? token.name : JSON.stringify(token.name);
384
- if (token.type === "param")
385
- return `:${key}`;
386
- if (token.type === "wildcard")
387
- return `*${key}`;
388
- throw new TypeError(`Unexpected token: ${token}`);
389
- })
390
- .join("");
391
- }
392
- function isNameSafe(name) {
393
- const [first, ...rest] = name;
394
- if (!ID_START.test(first))
395
- return false;
396
- return rest.every((char) => ID_CONTINUE.test(char));
397
- }
398
- function isNextNameSafe(token) {
399
- if ((token === null || token === void 0 ? void 0 : token.type) !== "text")
400
- return true;
401
- return !ID_CONTINUE.test(token.value[0]);
402
- }
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}]$/u;\nconst DEBUG_URL = \"https://git.new/pathToRegexpError\";\n\n/**\n * Encode a string into another string.\n */\nexport type Encode = (value: string) => string;\n\n/**\n * Decode a string into another string.\n */\nexport type Decode = (value: string) => string;\n\nexport interface ParseOptions {\n /**\n * A function for encoding input strings.\n */\n encodePath?: Encode;\n}\n\nexport interface PathToRegexpOptions {\n /**\n * Matches the path completely without trailing characters. (default: `true`)\n */\n end?: boolean;\n /**\n * Allows optional trailing delimiter to match. (default: `true`)\n */\n trailing?: boolean;\n /**\n * Match will be case sensitive. (default: `false`)\n */\n sensitive?: boolean;\n /**\n * The default delimiter for segments. (default: `'/'`)\n */\n delimiter?: string;\n}\n\nexport interface MatchOptions extends PathToRegexpOptions {\n /**\n * Function for decoding strings for params, or `false` to disable entirely. (default: `decodeURIComponent`)\n */\n decode?: Decode | false;\n}\n\nexport interface CompileOptions {\n /**\n * Function for encoding input strings for output into the path, or `false` to disable entirely. (default: `encodeURIComponent`)\n */\n encode?: Encode | false;\n /**\n * The default delimiter for segments. (default: `'/'`)\n */\n delimiter?: string;\n}\n\ntype TokenType =\n | \"{\"\n | \"}\"\n | \"WILDCARD\"\n | \"PARAM\"\n | \"CHAR\"\n | \"ESCAPED\"\n | \"END\"\n // Reserved for use or ambiguous due to past use.\n | \"(\"\n | \")\"\n | \"[\"\n | \"]\"\n | \"+\"\n | \"?\"\n | \"!\";\n\n/**\n * Tokenizer results.\n */\ninterface LexToken {\n type: TokenType;\n index: number;\n value: string;\n}\n\nconst SIMPLE_TOKENS: Record<string, TokenType> = {\n // Groups.\n \"{\": \"{\",\n \"}\": \"}\",\n // Reserved.\n \"(\": \"(\",\n \")\": \")\",\n \"[\": \"[\",\n \"]\": \"]\",\n \"+\": \"+\",\n \"?\": \"?\",\n \"!\": \"!\",\n};\n\n/**\n * Escape text for stringify to path.\n */\nfunction escapeText(str: string) {\n return str.replace(/[{}()\\[\\]+?!:*]/g, \"\\\\$&\");\n}\n\n/**\n * Escape a regular expression string.\n */\nfunction escape(str: string) {\n return str.replace(/[.+*?^${}()[\\]|/\\\\]/g, \"\\\\$&\");\n}\n\n/**\n * Tokenize input string.\n */\nfunction* lexer(str: string): Generator<LexToken, LexToken> {\n const chars = [...str];\n let i = 0;\n\n function name() {\n let value = \"\";\n\n if (ID_START.test(chars[++i])) {\n value += chars[i];\n while (ID_CONTINUE.test(chars[++i])) {\n value += chars[i];\n }\n } else if (chars[i] === '\"') {\n let pos = i;\n\n while (i < chars.length) {\n if (chars[++i] === '\"') {\n i++;\n pos = 0;\n break;\n }\n\n if (chars[i] === \"\\\\\") {\n value += chars[++i];\n } else {\n value += chars[i];\n }\n }\n\n if (pos) {\n throw new TypeError(`Unterminated quote at ${pos}: ${DEBUG_URL}`);\n }\n }\n\n if (!value) {\n throw new TypeError(`Missing parameter name at ${i}: ${DEBUG_URL}`);\n }\n\n return value;\n }\n\n while (i < chars.length) {\n const value = chars[i];\n const type = SIMPLE_TOKENS[value];\n\n if (type) {\n yield { type, index: i++, value };\n } else if (value === \"\\\\\") {\n yield { type: \"ESCAPED\", index: i++, value: chars[i++] };\n } else if (value === \":\") {\n const value = name();\n yield { type: \"PARAM\", index: i, value };\n } else if (value === \"*\") {\n const value = name();\n yield { type: \"WILDCARD\", index: i, value };\n } else {\n yield { type: \"CHAR\", index: i, value: chars[i++] };\n }\n }\n\n return { type: \"END\", index: i, value: \"\" };\n}\n\nclass Iter {\n private _peek?: LexToken;\n\n constructor(private tokens: Generator<LexToken, LexToken>) {}\n\n peek(): LexToken {\n if (!this._peek) {\n const next = this.tokens.next();\n this._peek = next.value;\n }\n return this._peek;\n }\n\n tryConsume(type: TokenType): string | undefined {\n const token = this.peek();\n if (token.type !== type) return;\n this._peek = undefined; // Reset after consumed.\n return token.value;\n }\n\n consume(type: TokenType): string {\n const value = this.tryConsume(type);\n if (value !== undefined) return value;\n const { type: nextType, index } = this.peek();\n throw new TypeError(\n `Unexpected ${nextType} at ${index}, expected ${type}: ${DEBUG_URL}`,\n );\n }\n\n text(): string {\n let result = \"\";\n let value: string | undefined;\n while ((value = this.tryConsume(\"CHAR\") || this.tryConsume(\"ESCAPED\"))) {\n result += value;\n }\n return result;\n }\n}\n\n/**\n * Plain text.\n */\nexport interface Text {\n type: \"text\";\n value: string;\n}\n\n/**\n * A parameter designed to match arbitrary text within a segment.\n */\nexport interface Parameter {\n type: \"param\";\n name: string;\n}\n\n/**\n * A wildcard parameter designed to match multiple segments.\n */\nexport interface Wildcard {\n type: \"wildcard\";\n name: string;\n}\n\n/**\n * A set of possible tokens to expand when matching.\n */\nexport interface Group {\n type: \"group\";\n tokens: Token[];\n}\n\n/**\n * A token that corresponds with a regexp capture.\n */\nexport type Key = Parameter | Wildcard;\n\n/**\n * A sequence of `path-to-regexp` keys that match capturing groups.\n */\nexport type Keys = Array<Key>;\n\n/**\n * A sequence of path match characters.\n */\nexport type Token = Text | Parameter | Wildcard | Group;\n\n/**\n * Tokenized path instance.\n */\nexport class TokenData {\n constructor(public readonly tokens: Token[]) {}\n}\n\n/**\n * Parse a string for the raw tokens.\n */\nexport function parse(str: string, options: ParseOptions = {}): TokenData {\n const { encodePath = NOOP_VALUE } = options;\n const it = new Iter(lexer(str));\n\n function consume(endType: TokenType): Token[] {\n const tokens: Token[] = [];\n\n while (true) {\n const path = it.text();\n if (path) tokens.push({ type: \"text\", value: encodePath(path) });\n\n const param = it.tryConsume(\"PARAM\");\n if (param) {\n tokens.push({\n type: \"param\",\n name: param,\n });\n continue;\n }\n\n const wildcard = it.tryConsume(\"WILDCARD\");\n if (wildcard) {\n tokens.push({\n type: \"wildcard\",\n name: wildcard,\n });\n continue;\n }\n\n const open = it.tryConsume(\"{\");\n if (open) {\n tokens.push({\n type: \"group\",\n tokens: consume(\"}\"),\n });\n continue;\n }\n\n it.consume(endType);\n return tokens;\n }\n }\n\n const tokens = consume(\"END\");\n return new TokenData(tokens);\n}\n\n/**\n * Compile a string to a template function for the path.\n */\nexport function compile<P extends ParamData = ParamData>(\n path: Path,\n options: CompileOptions & ParseOptions = {},\n) {\n const { encode = encodeURIComponent, delimiter = DEFAULT_DELIMITER } =\n options;\n const data = path instanceof TokenData ? path : parse(path, options);\n const fn = tokensToFunction(data.tokens, delimiter, encode);\n\n return function path(data: P = {} as P) {\n const [path, ...missing] = fn(data);\n if (missing.length) {\n throw new TypeError(`Missing parameters: ${missing.join(\", \")}`);\n }\n return path;\n };\n}\n\nexport type ParamData = Partial<Record<string, string | string[]>>;\nexport type PathFunction<P extends ParamData> = (data?: P) => string;\n\nfunction tokensToFunction(\n tokens: Token[],\n delimiter: string,\n encode: Encode | false,\n) {\n const encoders = tokens.map((token) =>\n tokenToFunction(token, delimiter, encode),\n );\n\n return (data: ParamData) => {\n const result: string[] = [\"\"];\n\n for (const encoder of encoders) {\n const [value, ...extras] = encoder(data);\n result[0] += value;\n result.push(...extras);\n }\n\n return result;\n };\n}\n\n/**\n * Convert a single token into a path building function.\n */\nfunction tokenToFunction(\n token: Token,\n delimiter: string,\n encode: Encode | false,\n): (data: ParamData) => string[] {\n if (token.type === \"text\") return () => [token.value];\n\n if (token.type === \"group\") {\n const fn = tokensToFunction(token.tokens, delimiter, encode);\n\n return (data) => {\n const [value, ...missing] = fn(data);\n if (!missing.length) return [value];\n return [\"\"];\n };\n }\n\n const encodeValue = encode || NOOP_VALUE;\n\n if (token.type === \"wildcard\" && encode !== false) {\n return (data) => {\n const value = data[token.name];\n if (value == null) return [\"\", token.name];\n\n if (!Array.isArray(value) || value.length === 0) {\n throw new TypeError(`Expected \"${token.name}\" to be a non-empty array`);\n }\n\n return [\n value\n .map((value, index) => {\n if (typeof value !== \"string\") {\n throw new TypeError(\n `Expected \"${token.name}/${index}\" to be a string`,\n );\n }\n\n return encodeValue(value);\n })\n .join(delimiter),\n ];\n };\n }\n\n return (data) => {\n const value = data[token.name];\n if (value == null) return [\"\", token.name];\n\n if (typeof value !== \"string\") {\n throw new TypeError(`Expected \"${token.name}\" to be a string`);\n }\n\n return [encodeValue(value)];\n };\n}\n\n/**\n * A match result contains data about the path match.\n */\nexport interface MatchResult<P extends ParamData> {\n path: string;\n params: P;\n}\n\n/**\n * A match is either `false` (no match) or a match result.\n */\nexport type Match<P extends ParamData> = false | MatchResult<P>;\n\n/**\n * The match function takes a string and returns whether it matched the path.\n */\nexport type MatchFunction<P extends ParamData> = (path: string) => Match<P>;\n\n/**\n * Supported path types.\n */\nexport type Path = string | TokenData;\n\n/**\n * Transform a path into a match function.\n */\nexport function match<P extends ParamData>(\n path: Path | Path[],\n options: MatchOptions & ParseOptions = {},\n): MatchFunction<P> {\n const { decode = decodeURIComponent, delimiter = DEFAULT_DELIMITER } =\n options;\n const { regexp, keys } = pathToRegexp(path, options);\n\n const decoders = keys.map((key) => {\n if (decode === false) return NOOP_VALUE;\n if (key.type === \"param\") return decode;\n return (value: string) => value.split(delimiter).map(decode);\n });\n\n return function match(input: string) {\n const m = regexp.exec(input);\n if (!m) return false;\n\n const path = m[0];\n const params = Object.create(null);\n\n for (let i = 1; i < m.length; i++) {\n if (m[i] === undefined) continue;\n\n const key = keys[i - 1];\n const decoder = decoders[i - 1];\n params[key.name] = decoder(m[i]);\n }\n\n return { path, params };\n };\n}\n\nexport function pathToRegexp(\n path: Path | Path[],\n options: PathToRegexpOptions & ParseOptions = {},\n) {\n const {\n delimiter = DEFAULT_DELIMITER,\n end = true,\n sensitive = false,\n trailing = true,\n } = options;\n const keys: Keys = [];\n const sources: string[] = [];\n const flags = sensitive ? \"\" : \"i\";\n const paths = Array.isArray(path) ? path : [path];\n const items = paths.map((path) =>\n path instanceof TokenData ? path : parse(path, options),\n );\n\n for (const { tokens } of items) {\n for (const seq of flatten(tokens, 0, [])) {\n const regexp = sequenceToRegExp(seq, delimiter, keys);\n sources.push(regexp);\n }\n }\n\n let pattern = `^(?:${sources.join(\"|\")})`;\n if (trailing) pattern += `(?:${escape(delimiter)}$)?`;\n pattern += end ? \"$\" : `(?=${escape(delimiter)}|$)`;\n\n const regexp = new RegExp(pattern, flags);\n return { regexp, keys };\n}\n\n/**\n * Flattened token set.\n */\ntype Flattened = Text | Parameter | Wildcard;\n\n/**\n * Generate a flat list of sequence tokens from the given tokens.\n */\nfunction* flatten(\n tokens: Token[],\n index: number,\n init: Flattened[],\n): Generator<Flattened[]> {\n if (index === tokens.length) {\n return yield init;\n }\n\n const token = tokens[index];\n\n if (token.type === \"group\") {\n const fork = init.slice();\n for (const seq of flatten(token.tokens, 0, fork)) {\n yield* flatten(tokens, index + 1, seq);\n }\n } else {\n init.push(token);\n }\n\n yield* flatten(tokens, index + 1, init);\n}\n\n/**\n * Transform a flat sequence of tokens into a regular expression.\n */\nfunction sequenceToRegExp(tokens: Flattened[], delimiter: string, keys: Keys) {\n let result = \"\";\n let backtrack = \"\";\n let isSafeSegmentParam = true;\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (token.type === \"text\") {\n result += escape(token.value);\n backtrack += token.value;\n isSafeSegmentParam ||= token.value.includes(delimiter);\n continue;\n }\n\n if (token.type === \"param\" || token.type === \"wildcard\") {\n if (!isSafeSegmentParam && !backtrack) {\n throw new TypeError(`Missing text after \"${token.name}\": ${DEBUG_URL}`);\n }\n\n if (token.type === \"param\") {\n result += `(${negate(delimiter, isSafeSegmentParam ? \"\" : backtrack)}+)`;\n } else {\n result += `([\\\\s\\\\S]+)`;\n }\n\n keys.push(token);\n backtrack = \"\";\n isSafeSegmentParam = false;\n continue;\n }\n }\n\n return result;\n}\n\nfunction negate(delimiter: string, backtrack: string) {\n if (backtrack.length < 2) {\n if (delimiter.length < 2) return `[^${escape(delimiter + backtrack)}]`;\n return `(?:(?!${escape(delimiter)})[^${escape(backtrack)}])`;\n }\n if (delimiter.length < 2) {\n return `(?:(?!${escape(backtrack)})[^${escape(delimiter)}])`;\n }\n return `(?:(?!${escape(backtrack)}|${escape(delimiter)})[\\\\s\\\\S])`;\n}\n\n/**\n * Stringify token data into a path string.\n */\nexport function stringify(data: TokenData) {\n return data.tokens\n .map(function stringifyToken(token, index, tokens): string {\n if (token.type === \"text\") return escapeText(token.value);\n if (token.type === \"group\") {\n return `{${token.tokens.map(stringifyToken).join(\"\")}}`;\n }\n\n const isSafe =\n isNameSafe(token.name) && isNextNameSafe(tokens[index + 1]);\n const key = isSafe ? token.name : JSON.stringify(token.name);\n\n if (token.type === \"param\") return `:${key}`;\n if (token.type === \"wildcard\") return `*${key}`;\n throw new TypeError(`Unexpected token: ${token}`);\n })\n .join(\"\");\n}\n\nfunction isNameSafe(name: string) {\n const [first, ...rest] = name;\n if (!ID_START.test(first)) return false;\n return rest.every((char) => ID_CONTINUE.test(char));\n}\n\nfunction isNextNameSafe(token: Token | undefined) {\n if (token?.type !== \"text\") return true;\n return !ID_CONTINUE.test(token.value[0]);\n}\n"]}
@@ -1,62 +0,0 @@
1
- {
2
- "name": "path-to-regexp",
3
- "version": "8.2.0",
4
- "description": "Express style path to RegExp utility",
5
- "keywords": [
6
- "express",
7
- "regexp",
8
- "route",
9
- "routing"
10
- ],
11
- "repository": {
12
- "type": "git",
13
- "url": "https://github.com/pillarjs/path-to-regexp.git"
14
- },
15
- "license": "MIT",
16
- "exports": "./dist/index.js",
17
- "main": "dist/index.js",
18
- "typings": "dist/index.d.ts",
19
- "files": [
20
- "dist/"
21
- ],
22
- "scripts": {
23
- "bench": "vitest bench",
24
- "build": "ts-scripts build",
25
- "format": "ts-scripts format",
26
- "lint": "ts-scripts lint",
27
- "prepare": "ts-scripts install && npm run build",
28
- "size": "size-limit",
29
- "specs": "ts-scripts specs",
30
- "test": "ts-scripts test && npm run size"
31
- },
32
- "devDependencies": {
33
- "@borderless/ts-scripts": "^0.15.0",
34
- "@size-limit/preset-small-lib": "^11.1.2",
35
- "@types/node": "^22.7.2",
36
- "@types/semver": "^7.3.1",
37
- "@vitest/coverage-v8": "^2.1.1",
38
- "recheck": "^4.4.5",
39
- "size-limit": "^11.1.2",
40
- "typescript": "^5.5.3"
41
- },
42
- "engines": {
43
- "node": ">=16"
44
- },
45
- "publishConfig": {
46
- "access": "public"
47
- },
48
- "size-limit": [
49
- {
50
- "path": "dist/index.js",
51
- "limit": "2.2 kB"
52
- }
53
- ],
54
- "ts-scripts": {
55
- "dist": [
56
- "dist"
57
- ],
58
- "project": [
59
- "tsconfig.build.json"
60
- ]
61
- }
62
- }