@outfoxx/sunday 1.1.0-beta.8 → 1.1.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 (423) hide show
  1. package/README.md +2 -0
  2. package/build/date-time-types.d.ts +35 -0
  3. package/build/date-time-types.js +699 -0
  4. package/build/date-time-types.js.map +1 -0
  5. package/build/{esm/event-parser.d.ts → event-parser.d.ts} +1 -1
  6. package/build/{esm/event-parser.js → event-parser.js} +10 -12
  7. package/build/event-parser.js.map +1 -0
  8. package/build/{esm/fetch-event-source.d.ts → fetch-event-source.d.ts} +26 -18
  9. package/build/fetch-event-source.js +365 -0
  10. package/build/fetch-event-source.js.map +1 -0
  11. package/build/{esnext/fetch-request-factory.d.ts → fetch-request-factory.d.ts} +18 -20
  12. package/build/fetch-request-factory.js +316 -0
  13. package/build/fetch-request-factory.js.map +1 -0
  14. package/build/fetch.d.ts +9 -0
  15. package/build/fetch.js +140 -0
  16. package/build/fetch.js.map +1 -0
  17. package/build/{esnext/header-parameters.js → header-parameters.js} +31 -2
  18. package/build/header-parameters.js.map +1 -0
  19. package/build/index.d.ts +26 -0
  20. package/build/index.js +41 -0
  21. package/build/index.js.map +1 -0
  22. package/build/{main/logger.d.ts → logger.d.ts} +9 -0
  23. package/build/logger.js +36 -0
  24. package/build/logger.js.map +1 -0
  25. package/build/media-type-codecs/any-text-decoder.d.ts +7 -0
  26. package/build/{esnext/media-type-codecs/binary-encoder.js → media-type-codecs/any-text-decoder.js} +13 -10
  27. package/build/media-type-codecs/any-text-decoder.js.map +1 -0
  28. package/build/media-type-codecs/any-text-encoder.d.ts +6 -0
  29. package/build/{esm/media-type-codecs → media-type-codecs}/any-text-encoder.js +9 -5
  30. package/build/media-type-codecs/any-text-encoder.js.map +1 -0
  31. package/build/media-type-codecs/binary-decoder.d.ts +7 -0
  32. package/build/media-type-codecs/binary-decoder.js +33 -0
  33. package/build/media-type-codecs/binary-decoder.js.map +1 -0
  34. package/build/media-type-codecs/binary-encoder.d.ts +6 -0
  35. package/build/{esm/media-type-codecs → media-type-codecs}/binary-encoder.js +12 -8
  36. package/build/media-type-codecs/binary-encoder.js.map +1 -0
  37. package/build/media-type-codecs/cbor-decoder.d.ts +13 -0
  38. package/build/media-type-codecs/cbor-decoder.js +38 -0
  39. package/build/media-type-codecs/cbor-decoder.js.map +1 -0
  40. package/build/media-type-codecs/cbor-encoder.d.ts +12 -0
  41. package/build/media-type-codecs/cbor-encoder.js +36 -0
  42. package/build/media-type-codecs/cbor-encoder.js.map +1 -0
  43. package/build/{esm/media-type-codecs → media-type-codecs}/cbor-tags.d.ts +2 -0
  44. package/build/{esnext/media-type-codecs → media-type-codecs}/cbor-tags.js +2 -0
  45. package/build/media-type-codecs/cbor-tags.js.map +1 -0
  46. package/build/media-type-codecs/default-policies.d.ts +3 -0
  47. package/build/media-type-codecs/default-policies.js +33 -0
  48. package/build/media-type-codecs/default-policies.js.map +1 -0
  49. package/build/media-type-codecs/json-decoder.d.ts +14 -0
  50. package/build/media-type-codecs/json-decoder.js +40 -0
  51. package/build/media-type-codecs/json-decoder.js.map +1 -0
  52. package/build/media-type-codecs/json-encoder.d.ts +13 -0
  53. package/build/media-type-codecs/json-encoder.js +43 -0
  54. package/build/media-type-codecs/json-encoder.js.map +1 -0
  55. package/build/media-type-codecs/media-type-decoder.d.ts +14 -0
  56. package/build/{esm/media-type-codecs → media-type-codecs}/media-type-decoder.js +1 -2
  57. package/build/media-type-codecs/media-type-decoder.js.map +1 -0
  58. package/build/{main/media-type-codecs → media-type-codecs}/media-type-decoders.d.ts +6 -8
  59. package/build/media-type-codecs/media-type-decoders.js +63 -0
  60. package/build/media-type-codecs/media-type-decoders.js.map +1 -0
  61. package/build/{main/media-type-codecs → media-type-codecs}/media-type-encoder.d.ts +3 -3
  62. package/build/{esnext/media-type-codecs → media-type-codecs}/media-type-encoder.js +2 -4
  63. package/build/media-type-codecs/media-type-encoder.js.map +1 -0
  64. package/build/{esnext/media-type-codecs → media-type-codecs}/media-type-encoders.d.ts +6 -8
  65. package/build/media-type-codecs/media-type-encoders.js +65 -0
  66. package/build/media-type-codecs/media-type-encoders.js.map +1 -0
  67. package/build/media-type-codecs/www-form-url-encoder.d.ts +31 -0
  68. package/build/media-type-codecs/www-form-url-encoder.js +281 -0
  69. package/build/media-type-codecs/www-form-url-encoder.js.map +1 -0
  70. package/build/{esm/media-type.js → media-type.js} +23 -23
  71. package/build/media-type.js.map +1 -0
  72. package/build/problem.d.ts +35 -0
  73. package/build/problem.js +122 -0
  74. package/build/problem.js.map +1 -0
  75. package/build/request-adapters.d.ts +23 -0
  76. package/build/request-adapters.js +53 -0
  77. package/build/request-adapters.js.map +1 -0
  78. package/build/request-factory.d.ts +39 -0
  79. package/build/request-factory.js.map +1 -0
  80. package/build/result-response.js.map +1 -0
  81. package/build/schema-builtins.d.ts +21 -0
  82. package/build/schema-builtins.js +201 -0
  83. package/build/schema-builtins.js.map +1 -0
  84. package/build/schema-policy.d.ts +31 -0
  85. package/build/schema-policy.js +41 -0
  86. package/build/schema-policy.js.map +1 -0
  87. package/build/schema-runtime.d.ts +25 -0
  88. package/build/schema-runtime.js +77 -0
  89. package/build/schema-runtime.js.map +1 -0
  90. package/build/{esnext/sunday-error.d.ts → sunday-error.d.ts} +2 -3
  91. package/build/sunday-error.js +36 -0
  92. package/build/sunday-error.js.map +1 -0
  93. package/build/{esm/url-template.js → url-template.js} +5 -3
  94. package/build/url-template.js.map +1 -0
  95. package/build/util/async-iterables.d.ts +15 -0
  96. package/build/util/async-iterables.js +179 -0
  97. package/build/util/async-iterables.js.map +1 -0
  98. package/build/util/errors.js +65 -0
  99. package/build/util/errors.js.map +1 -0
  100. package/build/util/nullify.d.ts +5 -0
  101. package/build/util/nullify.js +37 -0
  102. package/build/util/nullify.js.map +1 -0
  103. package/build/util/numbers.d.ts +11 -0
  104. package/build/{esm/util/temporal.js → util/numbers.js} +14 -4
  105. package/build/util/numbers.js.map +1 -0
  106. package/build/util/subscriptions.d.ts +16 -0
  107. package/build/util/subscriptions.js +78 -0
  108. package/build/util/subscriptions.js.map +1 -0
  109. package/build/{esm/util/any.js → util/unknowns.js} +2 -3
  110. package/build/util/unknowns.js.map +1 -0
  111. package/package.json +58 -56
  112. package/build/esm/any-type.d.ts +0 -4
  113. package/build/esm/any-type.js +0 -15
  114. package/build/esm/any-type.js.map +0 -1
  115. package/build/esm/class-type.d.ts +0 -2
  116. package/build/esm/class-type.js +0 -15
  117. package/build/esm/class-type.js.map +0 -1
  118. package/build/esm/date-time-types.d.ts +0 -2
  119. package/build/esm/date-time-types.js +0 -16
  120. package/build/esm/date-time-types.js.map +0 -1
  121. package/build/esm/event-parser.js.map +0 -1
  122. package/build/esm/fetch-event-source.js +0 -290
  123. package/build/esm/fetch-event-source.js.map +0 -1
  124. package/build/esm/fetch-request-factory.d.ts +0 -34
  125. package/build/esm/fetch-request-factory.js +0 -190
  126. package/build/esm/fetch-request-factory.js.map +0 -1
  127. package/build/esm/fetch.d.ts +0 -7
  128. package/build/esm/fetch.js +0 -103
  129. package/build/esm/fetch.js.map +0 -1
  130. package/build/esm/header-parameters.js +0 -53
  131. package/build/esm/header-parameters.js.map +0 -1
  132. package/build/esm/index.d.ts +0 -26
  133. package/build/esm/index.js +0 -40
  134. package/build/esm/index.js.map +0 -1
  135. package/build/esm/logger.d.ts +0 -8
  136. package/build/esm/logger.js +0 -15
  137. package/build/esm/logger.js.map +0 -1
  138. package/build/esm/media-type-codecs/any-text-decoder.d.ts +0 -7
  139. package/build/esm/media-type-codecs/any-text-decoder.js +0 -40
  140. package/build/esm/media-type-codecs/any-text-decoder.js.map +0 -1
  141. package/build/esm/media-type-codecs/any-text-encoder.d.ts +0 -5
  142. package/build/esm/media-type-codecs/any-text-encoder.js.map +0 -1
  143. package/build/esm/media-type-codecs/binary-decoder.d.ts +0 -6
  144. package/build/esm/media-type-codecs/binary-decoder.js +0 -40
  145. package/build/esm/media-type-codecs/binary-decoder.js.map +0 -1
  146. package/build/esm/media-type-codecs/binary-encoder.d.ts +0 -5
  147. package/build/esm/media-type-codecs/binary-encoder.js.map +0 -1
  148. package/build/esm/media-type-codecs/cbor-decoder.d.ts +0 -39
  149. package/build/esm/media-type-codecs/cbor-decoder.js +0 -437
  150. package/build/esm/media-type-codecs/cbor-decoder.js.map +0 -1
  151. package/build/esm/media-type-codecs/cbor-encoder.d.ts +0 -43
  152. package/build/esm/media-type-codecs/cbor-encoder.js +0 -236
  153. package/build/esm/media-type-codecs/cbor-encoder.js.map +0 -1
  154. package/build/esm/media-type-codecs/cbor-tags.js +0 -18
  155. package/build/esm/media-type-codecs/cbor-tags.js.map +0 -1
  156. package/build/esm/media-type-codecs/json-decoder.d.ts +0 -39
  157. package/build/esm/media-type-codecs/json-decoder.js +0 -391
  158. package/build/esm/media-type-codecs/json-decoder.js.map +0 -1
  159. package/build/esm/media-type-codecs/json-encoder.d.ts +0 -44
  160. package/build/esm/media-type-codecs/json-encoder.js +0 -273
  161. package/build/esm/media-type-codecs/json-encoder.js.map +0 -1
  162. package/build/esm/media-type-codecs/media-type-decoder.d.ts +0 -11
  163. package/build/esm/media-type-codecs/media-type-decoder.js.map +0 -1
  164. package/build/esm/media-type-codecs/media-type-decoders.d.ts +0 -18
  165. package/build/esm/media-type-codecs/media-type-decoders.js +0 -58
  166. package/build/esm/media-type-codecs/media-type-decoders.js.map +0 -1
  167. package/build/esm/media-type-codecs/media-type-encoder.d.ts +0 -12
  168. package/build/esm/media-type-codecs/media-type-encoder.js +0 -24
  169. package/build/esm/media-type-codecs/media-type-encoder.js.map +0 -1
  170. package/build/esm/media-type-codecs/media-type-encoders.d.ts +0 -18
  171. package/build/esm/media-type-codecs/media-type-encoders.js +0 -60
  172. package/build/esm/media-type-codecs/media-type-encoders.js.map +0 -1
  173. package/build/esm/media-type-codecs/www-form-url-encoder.d.ts +0 -59
  174. package/build/esm/media-type-codecs/www-form-url-encoder.js +0 -192
  175. package/build/esm/media-type-codecs/www-form-url-encoder.js.map +0 -1
  176. package/build/esm/media-type.js.map +0 -1
  177. package/build/esm/problem.d.ts +0 -31
  178. package/build/esm/problem.js +0 -169
  179. package/build/esm/problem.js.map +0 -1
  180. package/build/esm/request-factory.d.ts +0 -44
  181. package/build/esm/request-factory.js.map +0 -1
  182. package/build/esm/result-response.js.map +0 -1
  183. package/build/esm/sunday-error.d.ts +0 -11
  184. package/build/esm/sunday-error.js +0 -42
  185. package/build/esm/sunday-error.js.map +0 -1
  186. package/build/esm/url-template.js.map +0 -1
  187. package/build/esm/util/any.js.map +0 -1
  188. package/build/esm/util/base64.d.ts +0 -5
  189. package/build/esm/util/base64.js +0 -77
  190. package/build/esm/util/base64.js.map +0 -1
  191. package/build/esm/util/error.js +0 -26
  192. package/build/esm/util/error.js.map +0 -1
  193. package/build/esm/util/hex.d.ts +0 -4
  194. package/build/esm/util/hex.js +0 -32
  195. package/build/esm/util/hex.js.map +0 -1
  196. package/build/esm/util/rxjs.d.ts +0 -5
  197. package/build/esm/util/rxjs.js +0 -31
  198. package/build/esm/util/rxjs.js.map +0 -1
  199. package/build/esm/util/stream-rxjs.d.ts +0 -2
  200. package/build/esm/util/stream-rxjs.js +0 -50
  201. package/build/esm/util/stream-rxjs.js.map +0 -1
  202. package/build/esm/util/temporal.d.ts +0 -2
  203. package/build/esm/util/temporal.js.map +0 -1
  204. package/build/esnext/any-type.d.ts +0 -4
  205. package/build/esnext/any-type.js +0 -15
  206. package/build/esnext/any-type.js.map +0 -1
  207. package/build/esnext/class-type.d.ts +0 -2
  208. package/build/esnext/class-type.js +0 -15
  209. package/build/esnext/class-type.js.map +0 -1
  210. package/build/esnext/date-time-types.d.ts +0 -2
  211. package/build/esnext/date-time-types.js +0 -16
  212. package/build/esnext/date-time-types.js.map +0 -1
  213. package/build/esnext/event-parser.d.ts +0 -17
  214. package/build/esnext/event-parser.js +0 -153
  215. package/build/esnext/event-parser.js.map +0 -1
  216. package/build/esnext/fetch-event-source.d.ts +0 -58
  217. package/build/esnext/fetch-event-source.js +0 -290
  218. package/build/esnext/fetch-event-source.js.map +0 -1
  219. package/build/esnext/fetch-request-factory.js +0 -190
  220. package/build/esnext/fetch-request-factory.js.map +0 -1
  221. package/build/esnext/fetch.d.ts +0 -7
  222. package/build/esnext/fetch.js +0 -103
  223. package/build/esnext/fetch.js.map +0 -1
  224. package/build/esnext/header-parameters.d.ts +0 -3
  225. package/build/esnext/header-parameters.js.map +0 -1
  226. package/build/esnext/index.d.ts +0 -26
  227. package/build/esnext/index.js +0 -40
  228. package/build/esnext/index.js.map +0 -1
  229. package/build/esnext/logger.d.ts +0 -8
  230. package/build/esnext/logger.js +0 -15
  231. package/build/esnext/logger.js.map +0 -1
  232. package/build/esnext/media-type-codecs/any-text-decoder.d.ts +0 -7
  233. package/build/esnext/media-type-codecs/any-text-decoder.js +0 -40
  234. package/build/esnext/media-type-codecs/any-text-decoder.js.map +0 -1
  235. package/build/esnext/media-type-codecs/any-text-encoder.d.ts +0 -5
  236. package/build/esnext/media-type-codecs/any-text-encoder.js +0 -23
  237. package/build/esnext/media-type-codecs/any-text-encoder.js.map +0 -1
  238. package/build/esnext/media-type-codecs/binary-decoder.d.ts +0 -6
  239. package/build/esnext/media-type-codecs/binary-decoder.js +0 -40
  240. package/build/esnext/media-type-codecs/binary-decoder.js.map +0 -1
  241. package/build/esnext/media-type-codecs/binary-encoder.d.ts +0 -5
  242. package/build/esnext/media-type-codecs/binary-encoder.js.map +0 -1
  243. package/build/esnext/media-type-codecs/cbor-decoder.d.ts +0 -39
  244. package/build/esnext/media-type-codecs/cbor-decoder.js +0 -437
  245. package/build/esnext/media-type-codecs/cbor-decoder.js.map +0 -1
  246. package/build/esnext/media-type-codecs/cbor-encoder.d.ts +0 -43
  247. package/build/esnext/media-type-codecs/cbor-encoder.js +0 -236
  248. package/build/esnext/media-type-codecs/cbor-encoder.js.map +0 -1
  249. package/build/esnext/media-type-codecs/cbor-tags.d.ts +0 -4
  250. package/build/esnext/media-type-codecs/cbor-tags.js.map +0 -1
  251. package/build/esnext/media-type-codecs/json-decoder.d.ts +0 -39
  252. package/build/esnext/media-type-codecs/json-decoder.js +0 -391
  253. package/build/esnext/media-type-codecs/json-decoder.js.map +0 -1
  254. package/build/esnext/media-type-codecs/json-encoder.d.ts +0 -44
  255. package/build/esnext/media-type-codecs/json-encoder.js +0 -273
  256. package/build/esnext/media-type-codecs/json-encoder.js.map +0 -1
  257. package/build/esnext/media-type-codecs/media-type-decoder.d.ts +0 -11
  258. package/build/esnext/media-type-codecs/media-type-decoder.js +0 -19
  259. package/build/esnext/media-type-codecs/media-type-decoder.js.map +0 -1
  260. package/build/esnext/media-type-codecs/media-type-decoders.d.ts +0 -18
  261. package/build/esnext/media-type-codecs/media-type-decoders.js +0 -58
  262. package/build/esnext/media-type-codecs/media-type-decoders.js.map +0 -1
  263. package/build/esnext/media-type-codecs/media-type-encoder.d.ts +0 -12
  264. package/build/esnext/media-type-codecs/media-type-encoder.js.map +0 -1
  265. package/build/esnext/media-type-codecs/media-type-encoders.js +0 -60
  266. package/build/esnext/media-type-codecs/media-type-encoders.js.map +0 -1
  267. package/build/esnext/media-type-codecs/www-form-url-encoder.d.ts +0 -59
  268. package/build/esnext/media-type-codecs/www-form-url-encoder.js +0 -192
  269. package/build/esnext/media-type-codecs/www-form-url-encoder.js.map +0 -1
  270. package/build/esnext/media-type.d.ts +0 -94
  271. package/build/esnext/media-type.js +0 -305
  272. package/build/esnext/media-type.js.map +0 -1
  273. package/build/esnext/problem.d.ts +0 -31
  274. package/build/esnext/problem.js +0 -169
  275. package/build/esnext/problem.js.map +0 -1
  276. package/build/esnext/request-factory.d.ts +0 -44
  277. package/build/esnext/request-factory.js +0 -15
  278. package/build/esnext/request-factory.js.map +0 -1
  279. package/build/esnext/result-response.d.ts +0 -4
  280. package/build/esnext/result-response.js +0 -15
  281. package/build/esnext/result-response.js.map +0 -1
  282. package/build/esnext/sunday-error.js +0 -42
  283. package/build/esnext/sunday-error.js.map +0 -1
  284. package/build/esnext/url-template.d.ts +0 -6
  285. package/build/esnext/url-template.js +0 -31
  286. package/build/esnext/url-template.js.map +0 -1
  287. package/build/esnext/util/any.d.ts +0 -2
  288. package/build/esnext/util/any.js +0 -24
  289. package/build/esnext/util/any.js.map +0 -1
  290. package/build/esnext/util/base64.d.ts +0 -5
  291. package/build/esnext/util/base64.js +0 -77
  292. package/build/esnext/util/base64.js.map +0 -1
  293. package/build/esnext/util/error.d.ts +0 -2
  294. package/build/esnext/util/error.js +0 -26
  295. package/build/esnext/util/error.js.map +0 -1
  296. package/build/esnext/util/hex.d.ts +0 -4
  297. package/build/esnext/util/hex.js +0 -32
  298. package/build/esnext/util/hex.js.map +0 -1
  299. package/build/esnext/util/rxjs.d.ts +0 -5
  300. package/build/esnext/util/rxjs.js +0 -31
  301. package/build/esnext/util/rxjs.js.map +0 -1
  302. package/build/esnext/util/stream-rxjs.d.ts +0 -2
  303. package/build/esnext/util/stream-rxjs.js +0 -50
  304. package/build/esnext/util/stream-rxjs.js.map +0 -1
  305. package/build/esnext/util/temporal.d.ts +0 -2
  306. package/build/esnext/util/temporal.js +0 -31
  307. package/build/esnext/util/temporal.js.map +0 -1
  308. package/build/main/any-type.d.ts +0 -4
  309. package/build/main/any-type.js +0 -16
  310. package/build/main/any-type.js.map +0 -1
  311. package/build/main/class-type.d.ts +0 -2
  312. package/build/main/class-type.js +0 -16
  313. package/build/main/class-type.js.map +0 -1
  314. package/build/main/date-time-types.d.ts +0 -2
  315. package/build/main/date-time-types.js +0 -27
  316. package/build/main/date-time-types.js.map +0 -1
  317. package/build/main/event-parser.d.ts +0 -17
  318. package/build/main/event-parser.js +0 -157
  319. package/build/main/event-parser.js.map +0 -1
  320. package/build/main/fetch-event-source.d.ts +0 -58
  321. package/build/main/fetch-event-source.js +0 -294
  322. package/build/main/fetch-event-source.js.map +0 -1
  323. package/build/main/fetch-request-factory.d.ts +0 -34
  324. package/build/main/fetch-request-factory.js +0 -194
  325. package/build/main/fetch-request-factory.js.map +0 -1
  326. package/build/main/fetch.d.ts +0 -7
  327. package/build/main/fetch.js +0 -107
  328. package/build/main/fetch.js.map +0 -1
  329. package/build/main/header-parameters.d.ts +0 -3
  330. package/build/main/header-parameters.js +0 -56
  331. package/build/main/header-parameters.js.map +0 -1
  332. package/build/main/index.d.ts +0 -26
  333. package/build/main/index.js +0 -52
  334. package/build/main/index.js.map +0 -1
  335. package/build/main/logger.js +0 -16
  336. package/build/main/logger.js.map +0 -1
  337. package/build/main/media-type-codecs/any-text-decoder.d.ts +0 -7
  338. package/build/main/media-type-codecs/any-text-decoder.js +0 -44
  339. package/build/main/media-type-codecs/any-text-decoder.js.map +0 -1
  340. package/build/main/media-type-codecs/any-text-encoder.d.ts +0 -5
  341. package/build/main/media-type-codecs/any-text-encoder.js +0 -27
  342. package/build/main/media-type-codecs/any-text-encoder.js.map +0 -1
  343. package/build/main/media-type-codecs/binary-decoder.d.ts +0 -6
  344. package/build/main/media-type-codecs/binary-decoder.js +0 -44
  345. package/build/main/media-type-codecs/binary-decoder.js.map +0 -1
  346. package/build/main/media-type-codecs/binary-encoder.d.ts +0 -5
  347. package/build/main/media-type-codecs/binary-encoder.js +0 -30
  348. package/build/main/media-type-codecs/binary-encoder.js.map +0 -1
  349. package/build/main/media-type-codecs/cbor-decoder.d.ts +0 -39
  350. package/build/main/media-type-codecs/cbor-decoder.js +0 -441
  351. package/build/main/media-type-codecs/cbor-decoder.js.map +0 -1
  352. package/build/main/media-type-codecs/cbor-encoder.d.ts +0 -43
  353. package/build/main/media-type-codecs/cbor-encoder.js +0 -240
  354. package/build/main/media-type-codecs/cbor-encoder.js.map +0 -1
  355. package/build/main/media-type-codecs/cbor-tags.d.ts +0 -4
  356. package/build/main/media-type-codecs/cbor-tags.js +0 -21
  357. package/build/main/media-type-codecs/cbor-tags.js.map +0 -1
  358. package/build/main/media-type-codecs/json-decoder.d.ts +0 -39
  359. package/build/main/media-type-codecs/json-decoder.js +0 -395
  360. package/build/main/media-type-codecs/json-decoder.js.map +0 -1
  361. package/build/main/media-type-codecs/json-encoder.d.ts +0 -44
  362. package/build/main/media-type-codecs/json-encoder.js +0 -277
  363. package/build/main/media-type-codecs/json-encoder.js.map +0 -1
  364. package/build/main/media-type-codecs/media-type-decoder.d.ts +0 -11
  365. package/build/main/media-type-codecs/media-type-decoder.js +0 -23
  366. package/build/main/media-type-codecs/media-type-decoder.js.map +0 -1
  367. package/build/main/media-type-codecs/media-type-decoders.js +0 -62
  368. package/build/main/media-type-codecs/media-type-decoders.js.map +0 -1
  369. package/build/main/media-type-codecs/media-type-encoder.js +0 -29
  370. package/build/main/media-type-codecs/media-type-encoder.js.map +0 -1
  371. package/build/main/media-type-codecs/media-type-encoders.d.ts +0 -18
  372. package/build/main/media-type-codecs/media-type-encoders.js +0 -64
  373. package/build/main/media-type-codecs/media-type-encoders.js.map +0 -1
  374. package/build/main/media-type-codecs/www-form-url-encoder.d.ts +0 -59
  375. package/build/main/media-type-codecs/www-form-url-encoder.js +0 -196
  376. package/build/main/media-type-codecs/www-form-url-encoder.js.map +0 -1
  377. package/build/main/media-type.d.ts +0 -94
  378. package/build/main/media-type.js +0 -309
  379. package/build/main/media-type.js.map +0 -1
  380. package/build/main/problem.d.ts +0 -31
  381. package/build/main/problem.js +0 -172
  382. package/build/main/problem.js.map +0 -1
  383. package/build/main/request-factory.d.ts +0 -44
  384. package/build/main/request-factory.js +0 -16
  385. package/build/main/request-factory.js.map +0 -1
  386. package/build/main/result-response.d.ts +0 -4
  387. package/build/main/result-response.js +0 -16
  388. package/build/main/result-response.js.map +0 -1
  389. package/build/main/sunday-error.d.ts +0 -11
  390. package/build/main/sunday-error.js +0 -46
  391. package/build/main/sunday-error.js.map +0 -1
  392. package/build/main/url-template.d.ts +0 -6
  393. package/build/main/url-template.js +0 -35
  394. package/build/main/url-template.js.map +0 -1
  395. package/build/main/util/any.d.ts +0 -2
  396. package/build/main/util/any.js +0 -29
  397. package/build/main/util/any.js.map +0 -1
  398. package/build/main/util/base64.d.ts +0 -5
  399. package/build/main/util/base64.js +0 -80
  400. package/build/main/util/base64.js.map +0 -1
  401. package/build/main/util/error.d.ts +0 -2
  402. package/build/main/util/error.js +0 -31
  403. package/build/main/util/error.js.map +0 -1
  404. package/build/main/util/hex.d.ts +0 -4
  405. package/build/main/util/hex.js +0 -35
  406. package/build/main/util/hex.js.map +0 -1
  407. package/build/main/util/rxjs.d.ts +0 -5
  408. package/build/main/util/rxjs.js +0 -36
  409. package/build/main/util/rxjs.js.map +0 -1
  410. package/build/main/util/stream-rxjs.d.ts +0 -2
  411. package/build/main/util/stream-rxjs.js +0 -54
  412. package/build/main/util/stream-rxjs.js.map +0 -1
  413. package/build/main/util/temporal.d.ts +0 -2
  414. package/build/main/util/temporal.js +0 -36
  415. package/build/main/util/temporal.js.map +0 -1
  416. /package/build/{esm/header-parameters.d.ts → header-parameters.d.ts} +0 -0
  417. /package/build/{esm/media-type.d.ts → media-type.d.ts} +0 -0
  418. /package/build/{esm/request-factory.js → request-factory.js} +0 -0
  419. /package/build/{esm/result-response.d.ts → result-response.d.ts} +0 -0
  420. /package/build/{esm/result-response.js → result-response.js} +0 -0
  421. /package/build/{esm/url-template.d.ts → url-template.d.ts} +0 -0
  422. /package/build/{esm/util/error.d.ts → util/errors.d.ts} +0 -0
  423. /package/build/{esm/util/any.d.ts → util/unknowns.d.ts} +0 -0
@@ -1,26 +0,0 @@
1
- // Copyright 2020 Outfox, Inc.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
- export function isError(value) {
15
- return value instanceof Error;
16
- }
17
- export function errorToMessage(value, defMsg) {
18
- return isError(value) ? value.message : defMsg !== null && defMsg !== void 0 ? defMsg : `${fmtMsg(value)}`;
19
- }
20
- function fmtMsg(value) {
21
- if (value instanceof Object) {
22
- return JSON.stringify(value);
23
- }
24
- return `${value}`;
25
- }
26
- //# sourceMappingURL=error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error.js","sourceRoot":"","sources":["../../../src/util/error.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,MAAM,UAAU,OAAO,CAAC,KAAc;IACpC,OAAO,KAAK,YAAY,KAAK,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,KAAc,EAAE,MAAe;IAC5D,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;AACvE,CAAC;AAED,SAAS,MAAM,CAAC,KAAc;IAC5B,IAAI,KAAK,YAAY,MAAM,EAAE;QAC3B,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;KAC9B;IACD,OAAO,GAAG,KAAK,EAAE,CAAC;AACpB,CAAC"}
@@ -1,4 +0,0 @@
1
- export declare namespace Hex {
2
- function decode(hex: string): ArrayBuffer;
3
- function encode(buffer: ArrayBuffer, separator?: string): string;
4
- }
@@ -1,32 +0,0 @@
1
- // Copyright 2020 Outfox, Inc.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
- export var Hex;
15
- (function (Hex) {
16
- function decode(hex) {
17
- hex = hex.replace(/^0x/, '').replace(/\s/g, '');
18
- const values = hex.match(/[\da-f]{2}/gi);
19
- if (!values || values.length != hex.length / 2) {
20
- throw Error(`Invalid hex string`);
21
- }
22
- return new Uint8Array(values.map((b) => parseInt(b, 16))).buffer;
23
- }
24
- Hex.decode = decode;
25
- function encode(buffer, separator = '') {
26
- return Array.from(new Uint8Array(buffer))
27
- .map((value) => value.toString(16).padStart(2, '0'))
28
- .join(separator);
29
- }
30
- Hex.encode = encode;
31
- })(Hex || (Hex = {}));
32
- //# sourceMappingURL=hex.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hex.js","sourceRoot":"","sources":["../../../src/util/hex.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,MAAM,KAAW,GAAG,CAenB;AAfD,WAAiB,GAAG;IAClB,SAAgB,MAAM,CAAC,GAAW;QAChC,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAChD,MAAM,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QACzC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE;YAC9C,MAAM,KAAK,CAAC,oBAAoB,CAAC,CAAC;SACnC;QACD,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IACnE,CAAC;IAPe,UAAM,SAOrB,CAAA;IAED,SAAgB,MAAM,CAAC,MAAmB,EAAE,SAAS,GAAG,EAAE;QACxD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;aACtC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;aACnD,IAAI,CAAC,SAAS,CAAC,CAAC;IACrB,CAAC;IAJe,UAAM,SAIrB,CAAA;AACH,CAAC,EAfgB,GAAG,KAAH,GAAG,QAenB"}
@@ -1,5 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { ClassType } from '../class-type';
3
- import { Problem } from '../problem';
4
- export declare function nullifyNotFound<T>(): (source: Observable<T>) => Observable<T | null>;
5
- export declare function nullifyResponse<T>(statuses: number[], problemTypes: ClassType<Problem>[]): (source: Observable<T>) => Observable<T | null>;
@@ -1,31 +0,0 @@
1
- // Copyright 2020 Outfox, Inc.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
- import { catchError, from, throwError } from 'rxjs';
15
- import { Problem } from '../problem';
16
- export function nullifyNotFound() {
17
- return nullifyResponse([404], []);
18
- }
19
- export function nullifyResponse(statuses, problemTypes) {
20
- return function (source) {
21
- return source.pipe(catchError((error) => {
22
- const errorType = error.constructor;
23
- if (error instanceof Problem &&
24
- (statuses.includes(error.status) || problemTypes.includes(errorType))) {
25
- return from([null]);
26
- }
27
- return throwError(() => error);
28
- }));
29
- };
30
- }
31
- //# sourceMappingURL=rxjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rxjs.js","sourceRoot":"","sources":["../../../src/util/rxjs.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAc,UAAU,EAAE,MAAM,MAAM,CAAC;AAEhE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,MAAM,UAAU,eAAe;IAG7B,OAAO,eAAe,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,eAAe,CAC7B,QAAkB,EAClB,YAAkC;IAElC,OAAO,UAAa,MAAqB;QACvC,OAAO,MAAM,CAAC,IAAI,CAChB,UAAU,CAAC,CAAC,KAAK,EAAE,EAAE;YACnB,MAAM,SAAS,GAAG,KAAK,CAAC,WAAiC,CAAC;YAC1D,IACE,KAAK,YAAY,OAAO;gBACxB,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,EACrE;gBACA,OAAO,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;aACrB;YACD,OAAO,UAAU,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
@@ -1,2 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- export declare function fromStream(stream: ReadableStream<Uint8Array>): Observable<ArrayBuffer>;
@@ -1,50 +0,0 @@
1
- // Copyright 2020 Outfox, Inc.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
- import { Observable } from 'rxjs';
24
- export function fromStream(stream) {
25
- return new Observable((subscriber) => {
26
- let reader;
27
- (function readLoop() {
28
- return __awaiter(this, void 0, void 0, function* () {
29
- try {
30
- reader = stream.getReader();
31
- while (true) {
32
- const { done, value } = yield reader.read();
33
- if (value !== undefined) {
34
- subscriber.next(value);
35
- }
36
- if (done) {
37
- subscriber.complete();
38
- return;
39
- }
40
- }
41
- }
42
- catch (e) {
43
- subscriber.error(e);
44
- }
45
- });
46
- })();
47
- return () => reader === null || reader === void 0 ? void 0 : reader.cancel();
48
- });
49
- }
50
- //# sourceMappingURL=stream-rxjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stream-rxjs.js","sourceRoot":"","sources":["../../../src/util/stream-rxjs.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;;;;;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,MAAM,UAAU,UAAU,CACxB,MAAkC;IAElC,OAAO,IAAI,UAAU,CAAC,CAAC,UAAU,EAAE,EAAE;QACnC,IAAI,MAA+C,CAAC;QACpD,CAAC,SAAe,QAAQ;;gBACtB,IAAI;oBACF,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;oBAC5B,OAAO,IAAI,EAAE;wBACX,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;wBAC5C,IAAI,KAAK,KAAK,SAAS,EAAE;4BACvB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;yBACxB;wBAED,IAAI,IAAI,EAAE;4BACR,UAAU,CAAC,QAAQ,EAAE,CAAC;4BACtB,OAAO;yBACR;qBACF;iBACF;gBAAC,OAAO,CAAC,EAAE;oBACV,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;iBACrB;YACH,CAAC;SAAA,CAAC,EAAE,CAAC;QACL,OAAO,GAAG,EAAE,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,EAAE,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare function secondsToNumber(seconds: number, nanos: number): number;
2
- export declare function encodeSeconds(seconds: number, fraction: number): unknown[];
@@ -1 +0,0 @@
1
- {"version":3,"file":"temporal.js","sourceRoot":"","sources":["../../../src/util/temporal.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,MAAM,UAAU,eAAe,CAAC,OAAe,EAAE,KAAa;IAC5D,IAAI,KAAK,IAAI,CAAC,EAAE;QACd,OAAO,OAAO,CAAC;KAChB;IACD,MAAM,OAAO,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;IACjC,OAAO,UAAU,CAAC,GAAG,OAAO,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,KAAK,EAAE,CAAC,CAAC;AAC5E,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,OAAe,EAAE,QAAgB;IAC7D,MAAM,MAAM,GAAG,EAAE,CAAC;IAClB,IAAI,OAAO,IAAI,CAAC,IAAI,QAAQ,IAAI,CAAC,EAAE;QACjC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACrB,IAAI,QAAQ,IAAI,CAAC,EAAE;YACjB,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACvB;KACF;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,4 +0,0 @@
1
- import { ClassList, ClassType } from '@outfoxx/jackson-js/dist/@types';
2
- import { ConstructableClassType } from './class-type';
3
- export declare type AnyType = ClassList<ClassType<any>>;
4
- export declare type AnyConstructableType = ClassList<ConstructableClassType<any>>;
@@ -1,15 +0,0 @@
1
- // Copyright 2020 Outfox, Inc.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
- export {};
15
- //# sourceMappingURL=any-type.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"any-type.js","sourceRoot":"","sources":["../../src/any-type.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC"}
@@ -1,2 +0,0 @@
1
- export declare type ClassType<T> = (abstract new () => T) | (abstract new (...args: any[]) => T);
2
- export declare type ConstructableClassType<T> = (new () => T) | (new (...args: any[]) => T);
@@ -1,15 +0,0 @@
1
- // Copyright 2020 Outfox, Inc.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
- export {};
15
- //# sourceMappingURL=class-type.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"class-type.js","sourceRoot":"","sources":["../../src/class-type.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC"}
@@ -1,2 +0,0 @@
1
- import { Duration, Instant, LocalDate, LocalDateTime, LocalTime, OffsetDateTime, OffsetTime, Period, ZonedDateTime } from '@js-joda/core';
2
- export { Duration, Instant, LocalDate, LocalTime, LocalDateTime, OffsetDateTime, OffsetTime, Period, ZonedDateTime, };
@@ -1,16 +0,0 @@
1
- // Copyright 2020 Outfox, Inc.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
- import { Duration, Instant, LocalDate, LocalDateTime, LocalTime, OffsetDateTime, OffsetTime, Period, ZonedDateTime, } from '@js-joda/core';
15
- export { Duration, Instant, LocalDate, LocalTime, LocalDateTime, OffsetDateTime, OffsetTime, Period, ZonedDateTime, };
16
- //# sourceMappingURL=date-time-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"date-time-types.js","sourceRoot":"","sources":["../../src/date-time-types.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAO,EACL,QAAQ,EACR,OAAO,EACP,SAAS,EACT,aAAa,EACb,SAAS,EACT,cAAc,EACd,UAAU,EACV,MAAM,EACN,aAAa,GACd,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,QAAQ,EACR,OAAO,EACP,SAAS,EACT,SAAS,EACT,aAAa,EACb,cAAc,EACd,UAAU,EACV,MAAM,EACN,aAAa,GACd,CAAC"}
@@ -1,17 +0,0 @@
1
- export interface EventInfo {
2
- id?: string;
3
- event?: string;
4
- data?: string;
5
- retry?: string;
6
- }
7
- export declare class EventParser {
8
- private decoder;
9
- private unprocessedBuffer?;
10
- process(buffer: ArrayBuffer, dispatcher: (eventInfo: EventInfo) => void): void;
11
- private buildAvailableBuffer;
12
- private extractEventStringsFromBuffer;
13
- private static findEventSeparator;
14
- private static parseAndDispatchEvents;
15
- private static parseEvent;
16
- private static trimFieldValue;
17
- }
@@ -1,153 +0,0 @@
1
- // Copyright 2020 Outfox, Inc.
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
- export class EventParser {
15
- constructor() {
16
- this.decoder = new TextDecoder('utf-8');
17
- }
18
- process(buffer, dispatcher) {
19
- const availableBuffer = this.buildAvailableBuffer(buffer);
20
- if (!availableBuffer) {
21
- return;
22
- }
23
- const eventStrings = this.extractEventStringsFromBuffer(availableBuffer);
24
- if (!eventStrings.length) {
25
- return;
26
- }
27
- EventParser.parseAndDispatchEvents(eventStrings, dispatcher);
28
- }
29
- buildAvailableBuffer(buffer) {
30
- const unprocessedBuffer = this.unprocessedBuffer;
31
- this.unprocessedBuffer = undefined;
32
- if (!buffer.byteLength) {
33
- return unprocessedBuffer;
34
- }
35
- else if (!(unprocessedBuffer === null || unprocessedBuffer === void 0 ? void 0 : unprocessedBuffer.byteLength)) {
36
- return buffer;
37
- }
38
- const newBuffer = new Uint8Array(unprocessedBuffer.byteLength + buffer.byteLength);
39
- newBuffer.set(new Uint8Array(unprocessedBuffer), 0);
40
- newBuffer.set(new Uint8Array(buffer), unprocessedBuffer.byteLength);
41
- return newBuffer.buffer;
42
- }
43
- extractEventStringsFromBuffer(buffer) {
44
- const eventStrings = [];
45
- while (buffer.byteLength) {
46
- // Find end of next event separator in buffer, exiting if none found.
47
- const eventSeparator = EventParser.findEventSeparator(buffer);
48
- if (!eventSeparator) {
49
- // Save unprocessed data
50
- this.unprocessedBuffer = buffer;
51
- break;
52
- }
53
- const [endOfCurrentEventIdx, startOfNextEventIdx] = eventSeparator;
54
- const eventBuffer = buffer.slice(0, endOfCurrentEventIdx);
55
- buffer = buffer.slice(startOfNextEventIdx);
56
- const eventString = this.decoder.decode(eventBuffer, {
57
- stream: true,
58
- });
59
- eventStrings.push(eventString);
60
- }
61
- return eventStrings;
62
- }
63
- static findEventSeparator(buffer) {
64
- const bytes = new Uint8Array(buffer);
65
- for (let idx = 0; idx < bytes.length; ++idx) {
66
- const byte = bytes[idx];
67
- switch (byte) {
68
- // line-feed
69
- case 0xa: {
70
- // if next byte is same,
71
- // we found a separator
72
- if (bytes[idx + 1] == 0xa) {
73
- return [idx, idx + 2];
74
- }
75
- break;
76
- }
77
- // carriage-return
78
- case 0xd: {
79
- // if next byte is same,
80
- // we found a separator
81
- if (bytes[idx + 1] == 0xd) {
82
- return [idx, idx + 2];
83
- }
84
- // if next is line-feed, and pattern
85
- // repeats, we found a separator.
86
- if (bytes[idx + 1] == 0xa &&
87
- bytes[idx + 2] == 0xd &&
88
- bytes[idx + 3] == 0xa) {
89
- return [idx, idx + 4];
90
- }
91
- break;
92
- }
93
- default:
94
- }
95
- }
96
- return undefined;
97
- }
98
- static parseAndDispatchEvents(eventStrings, dispatcher) {
99
- for (const eventString of eventStrings) {
100
- if (!eventString.length) {
101
- continue;
102
- }
103
- const parsedEvent = EventParser.parseEvent(eventString);
104
- dispatcher(parsedEvent);
105
- }
106
- }
107
- static parseEvent(eventString) {
108
- var _a, _b, _c;
109
- const event = {};
110
- for (const line of eventString.split(lineSeparatorsRegEx)) {
111
- const keyValueSeparatorIdx = line.indexOf(':');
112
- let key;
113
- let value;
114
- if (keyValueSeparatorIdx != -1) {
115
- key = line.slice(0, keyValueSeparatorIdx);
116
- value = line.slice(keyValueSeparatorIdx + 1);
117
- }
118
- else {
119
- key = line;
120
- value = '';
121
- }
122
- switch (key) {
123
- case 'retry':
124
- event.retry = EventParser.trimFieldValue(value);
125
- break;
126
- case 'data': {
127
- const data = (_a = event.data) !== null && _a !== void 0 ? _a : '';
128
- event.data = `${data}${EventParser.trimFieldValue(value)}\n`;
129
- break;
130
- }
131
- case '':
132
- // comment do nothing
133
- break;
134
- default: {
135
- event[key] =
136
- EventParser.trimFieldValue(value);
137
- }
138
- }
139
- }
140
- if (((_b = event.data) === null || _b === void 0 ? void 0 : _b[((_c = event.data) === null || _c === void 0 ? void 0 : _c.length) - 1]) == '\n') {
141
- event.data = event.data.slice(0, -1);
142
- }
143
- return event;
144
- }
145
- static trimFieldValue(value) {
146
- if (value[0] != ' ') {
147
- return value;
148
- }
149
- return value.slice(1);
150
- }
151
- }
152
- const lineSeparatorsRegEx = /\r\n|\r|\n/;
153
- //# sourceMappingURL=event-parser.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"event-parser.js","sourceRoot":"","sources":["../../src/event-parser.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AASjC,MAAM,OAAO,WAAW;IAAxB;QACU,YAAO,GAAgB,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC;IAmL1D,CAAC;IAhLC,OAAO,CACL,MAAmB,EACnB,UAA0C;QAE1C,MAAM,eAAe,GAAG,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;QAC1D,IAAI,CAAC,eAAe,EAAE;YACpB,OAAO;SACR;QAED,MAAM,YAAY,GAAG,IAAI,CAAC,6BAA6B,CAAC,eAAe,CAAC,CAAC;QAEzE,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE;YACxB,OAAO;SACR;QAED,WAAW,CAAC,sBAAsB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;IAC/D,CAAC;IAEO,oBAAoB,CAAC,MAAmB;QAC9C,MAAM,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC;QACjD,IAAI,CAAC,iBA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,IAAI,0CAAG,CAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,MAAM,IAAG,CAAC,CAAC,KAAI,IAAI,EAAE;YAChD,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;SACtC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IAEO,MAAM,CAAC,cAAc,CAAC,KAAa;QACzC,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,EAAE;YACnB,OAAO,KAAK,CAAC;SACd;QACD,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACxB,CAAC;CACF;AAED,MAAM,mBAAmB,GAAG,YAAY,CAAC"}
@@ -1,58 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { Logger } from './logger';
3
- import { ExtEventSource } from './request-factory';
4
- export interface FetchEventSource {
5
- addEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
6
- removeEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
7
- }
8
- export declare class FetchEventSource extends EventTarget implements ExtEventSource {
9
- private static LAST_EVENT_ID_HEADER;
10
- private static MAX_RETRY_TIME_MULTIPLE;
11
- private static EVENT_TIMEOUT_DEFAULT;
12
- private static EVENT_TIMEOUT_CHECK_INTERVAL;
13
- CONNECTING: number;
14
- OPEN: number;
15
- CLOSED: number;
16
- readyState: number;
17
- url: string;
18
- withCredentials: boolean;
19
- onerror: ((this: EventSource, ev: Event) => unknown) | null;
20
- onmessage: ((this: EventSource, ev: MessageEvent) => unknown) | null;
21
- onopen: ((this: EventSource, ev: Event) => unknown) | null;
22
- get retryTime(): number;
23
- private adapter;
24
- private connectionSubscription?;
25
- private internalRetryTime;
26
- private retryAttempt;
27
- private connectionAttemptTime;
28
- private connectionOrigin?;
29
- private reconnectTimeoutHandle?;
30
- private lastEventId?;
31
- private logger?;
32
- private readonly eventTimeout?;
33
- private eventTimeoutCheckHandle?;
34
- private lastEventReceivedTime;
35
- private eventParser;
36
- private readonly externalAbortController?;
37
- constructor(url: string, eventSourceInit?: EventSourceInit & {
38
- adapter?: (url: string, requestInit: RequestInit) => Observable<Request>;
39
- eventTimeout?: number;
40
- logger?: Logger;
41
- abortController?: AbortController;
42
- });
43
- connect(): void;
44
- private internalConnect;
45
- close(): void;
46
- private internalClose;
47
- private startEventTimeoutCheck;
48
- private stopEventTimeoutCheck;
49
- private checkEventTimeout;
50
- private receivedHeaders;
51
- private receivedData;
52
- private receivedError;
53
- private receivedComplete;
54
- private scheduleReconnect;
55
- private clearReconnect;
56
- private dispatchParsedEvent;
57
- fireErrorEvent(error: unknown): void;
58
- }