@uploadista/core 0.0.2 → 0.0.4

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 (331) hide show
  1. package/README.md +6 -20
  2. package/dist/checksum-C5qE-5eg.js +2 -0
  3. package/dist/checksum-C5qE-5eg.js.map +1 -0
  4. package/dist/checksum-wSBuXX84.cjs +1 -0
  5. package/dist/errors/index.cjs +1 -1
  6. package/dist/errors/index.d.cts +2 -2
  7. package/dist/errors/index.d.ts +3 -3
  8. package/dist/errors/index.js +1 -2
  9. package/dist/flow/index.cjs +1 -1
  10. package/dist/flow/index.d.cts +5 -5
  11. package/dist/flow/index.d.ts +6 -24
  12. package/dist/flow/index.js +1 -24
  13. package/dist/flow-B0mMJM5Y.js +2 -0
  14. package/dist/flow-B0mMJM5Y.js.map +1 -0
  15. package/dist/flow-s5bgJsdb.cjs +1 -0
  16. package/dist/index-B46hb7yB.d.cts +36 -0
  17. package/dist/index-B46hb7yB.d.cts.map +1 -0
  18. package/dist/index-BnGZO47X.d.ts +3952 -0
  19. package/dist/index-BnGZO47X.d.ts.map +1 -0
  20. package/dist/{streams/stream-limiter.d.cts → index-C1mxuUxK.d.ts} +3 -3
  21. package/dist/index-C1mxuUxK.d.ts.map +1 -0
  22. package/dist/index-DM69UMgG.d.cts +4132 -0
  23. package/dist/index-DM69UMgG.d.cts.map +1 -0
  24. package/dist/index-DMJv8Tvo.d.ts +168 -0
  25. package/dist/index-DMJv8Tvo.d.ts.map +1 -0
  26. package/dist/index-GLPiXqj4.d.cts +168 -0
  27. package/dist/index-GLPiXqj4.d.cts.map +1 -0
  28. package/dist/index.cjs +1 -1
  29. package/dist/index.d.cts +5 -5
  30. package/dist/index.d.ts +6 -5
  31. package/dist/index.js +1 -5
  32. package/dist/stream-limiter-CTuiXkcq.js +2 -0
  33. package/dist/{stream-limiter-CoWKv39w.js.map → stream-limiter-CTuiXkcq.js.map} +1 -1
  34. package/dist/stream-limiter-DYGG4t9f.cjs +1 -0
  35. package/dist/streams/index.cjs +1 -0
  36. package/dist/streams/index.d.cts +3 -0
  37. package/dist/streams/index.d.ts +3 -0
  38. package/dist/streams/index.js +1 -0
  39. package/dist/streams-BiD_pOPH.cjs +0 -0
  40. package/dist/streams-Bs3GDNKJ.js +1 -0
  41. package/dist/types/index.cjs +1 -1
  42. package/dist/types/index.d.cts +5 -5
  43. package/dist/types/index.d.ts +6 -10
  44. package/dist/types/index.js +1 -9
  45. package/dist/types-Dj9g8ocl.cjs +1 -0
  46. package/dist/types-m26wrG-Z.js +2 -0
  47. package/dist/types-m26wrG-Z.js.map +1 -0
  48. package/dist/upload/index.cjs +1 -1
  49. package/dist/upload/index.d.cts +5 -5
  50. package/dist/upload/index.d.ts +6 -4
  51. package/dist/upload/index.js +1 -3
  52. package/dist/upload-BzU7ifyH.js +2 -0
  53. package/dist/upload-BzU7ifyH.js.map +1 -0
  54. package/dist/upload-DvLp6TXO.cjs +1 -0
  55. package/dist/uploadista-error-CAtkQiAv.d.cts +221 -0
  56. package/dist/uploadista-error-CAtkQiAv.d.cts.map +1 -0
  57. package/dist/{uploadista-error-BVsVxqvz.js → uploadista-error-CjfcFnVa.js} +9 -2
  58. package/dist/uploadista-error-CjfcFnVa.js.map +1 -0
  59. package/dist/uploadista-error-D9SONF9K.d.ts +221 -0
  60. package/dist/uploadista-error-D9SONF9K.d.ts.map +1 -0
  61. package/dist/{uploadista-error-BB-Wdiz9.cjs → uploadista-error-DdTP-Rjx.cjs} +9 -2
  62. package/dist/utils/index.cjs +1 -0
  63. package/dist/utils/index.d.cts +3 -0
  64. package/dist/utils/index.d.ts +3 -0
  65. package/dist/utils/index.js +1 -0
  66. package/dist/utils-BILytQlb.js +2 -0
  67. package/dist/utils-BILytQlb.js.map +1 -0
  68. package/dist/utils-BLsIUd8c.cjs +1 -0
  69. package/package.json +13 -17
  70. package/src/index.ts +2 -0
  71. package/src/streams/index.ts +1 -0
  72. package/src/utils/index.ts +5 -0
  73. package/tsdown.config.ts +2 -10
  74. package/.turbo/turbo-build.log +0 -5
  75. package/.turbo/turbo-check.log +0 -231
  76. package/.turbo/turbo-format.log +0 -5
  77. package/dist/chunk-CUT6urMc.cjs +0 -1
  78. package/dist/debounce-C2SeqcxD.js +0 -2
  79. package/dist/debounce-C2SeqcxD.js.map +0 -1
  80. package/dist/debounce-LZK7yS7Z.cjs +0 -1
  81. package/dist/errors/index.d.ts.map +0 -1
  82. package/dist/errors/uploadista-error.d.ts +0 -209
  83. package/dist/errors/uploadista-error.d.ts.map +0 -1
  84. package/dist/errors/uploadista-error.js +0 -322
  85. package/dist/flow/edge.d.ts +0 -47
  86. package/dist/flow/edge.d.ts.map +0 -1
  87. package/dist/flow/edge.js +0 -40
  88. package/dist/flow/event.d.ts +0 -206
  89. package/dist/flow/event.d.ts.map +0 -1
  90. package/dist/flow/event.js +0 -53
  91. package/dist/flow/flow-server.d.ts +0 -223
  92. package/dist/flow/flow-server.d.ts.map +0 -1
  93. package/dist/flow/flow-server.js +0 -614
  94. package/dist/flow/flow.d.ts +0 -238
  95. package/dist/flow/flow.d.ts.map +0 -1
  96. package/dist/flow/flow.js +0 -629
  97. package/dist/flow/index.d.ts.map +0 -1
  98. package/dist/flow/node.d.ts +0 -136
  99. package/dist/flow/node.d.ts.map +0 -1
  100. package/dist/flow/node.js +0 -153
  101. package/dist/flow/nodes/index.d.ts +0 -8
  102. package/dist/flow/nodes/index.d.ts.map +0 -1
  103. package/dist/flow/nodes/index.js +0 -7
  104. package/dist/flow/nodes/input-node.d.ts +0 -78
  105. package/dist/flow/nodes/input-node.d.ts.map +0 -1
  106. package/dist/flow/nodes/input-node.js +0 -233
  107. package/dist/flow/nodes/storage-node.d.ts +0 -67
  108. package/dist/flow/nodes/storage-node.d.ts.map +0 -1
  109. package/dist/flow/nodes/storage-node.js +0 -94
  110. package/dist/flow/nodes/streaming-input-node.d.ts +0 -69
  111. package/dist/flow/nodes/streaming-input-node.d.ts.map +0 -1
  112. package/dist/flow/nodes/streaming-input-node.js +0 -156
  113. package/dist/flow/nodes/transform-node.d.ts +0 -85
  114. package/dist/flow/nodes/transform-node.d.ts.map +0 -1
  115. package/dist/flow/nodes/transform-node.js +0 -107
  116. package/dist/flow/parallel-scheduler.d.ts +0 -175
  117. package/dist/flow/parallel-scheduler.d.ts.map +0 -1
  118. package/dist/flow/parallel-scheduler.js +0 -193
  119. package/dist/flow/plugins/credential-provider.d.ts +0 -47
  120. package/dist/flow/plugins/credential-provider.d.ts.map +0 -1
  121. package/dist/flow/plugins/credential-provider.js +0 -24
  122. package/dist/flow/plugins/image-ai-plugin.d.ts +0 -61
  123. package/dist/flow/plugins/image-ai-plugin.d.ts.map +0 -1
  124. package/dist/flow/plugins/image-ai-plugin.js +0 -21
  125. package/dist/flow/plugins/image-plugin.d.ts +0 -52
  126. package/dist/flow/plugins/image-plugin.d.ts.map +0 -1
  127. package/dist/flow/plugins/image-plugin.js +0 -22
  128. package/dist/flow/plugins/types/describe-image-node.d.ts +0 -16
  129. package/dist/flow/plugins/types/describe-image-node.d.ts.map +0 -1
  130. package/dist/flow/plugins/types/describe-image-node.js +0 -9
  131. package/dist/flow/plugins/types/index.d.ts +0 -9
  132. package/dist/flow/plugins/types/index.d.ts.map +0 -1
  133. package/dist/flow/plugins/types/index.js +0 -8
  134. package/dist/flow/plugins/types/optimize-node.d.ts +0 -20
  135. package/dist/flow/plugins/types/optimize-node.d.ts.map +0 -1
  136. package/dist/flow/plugins/types/optimize-node.js +0 -11
  137. package/dist/flow/plugins/types/remove-background-node.d.ts +0 -16
  138. package/dist/flow/plugins/types/remove-background-node.d.ts.map +0 -1
  139. package/dist/flow/plugins/types/remove-background-node.js +0 -9
  140. package/dist/flow/plugins/types/resize-node.d.ts +0 -21
  141. package/dist/flow/plugins/types/resize-node.d.ts.map +0 -1
  142. package/dist/flow/plugins/types/resize-node.js +0 -16
  143. package/dist/flow/plugins/zip-plugin.d.ts +0 -62
  144. package/dist/flow/plugins/zip-plugin.d.ts.map +0 -1
  145. package/dist/flow/plugins/zip-plugin.js +0 -21
  146. package/dist/flow/typed-flow.d.ts +0 -90
  147. package/dist/flow/typed-flow.d.ts.map +0 -1
  148. package/dist/flow/typed-flow.js +0 -59
  149. package/dist/flow/types/flow-file.d.ts +0 -45
  150. package/dist/flow/types/flow-file.d.ts.map +0 -1
  151. package/dist/flow/types/flow-file.js +0 -27
  152. package/dist/flow/types/flow-job.d.ts +0 -118
  153. package/dist/flow/types/flow-job.d.ts.map +0 -1
  154. package/dist/flow/types/flow-job.js +0 -11
  155. package/dist/flow/types/flow-types.d.ts +0 -321
  156. package/dist/flow/types/flow-types.d.ts.map +0 -1
  157. package/dist/flow/types/flow-types.js +0 -52
  158. package/dist/flow/types/index.d.ts +0 -4
  159. package/dist/flow/types/index.d.ts.map +0 -1
  160. package/dist/flow/types/index.js +0 -3
  161. package/dist/flow/types/run-args.d.ts +0 -38
  162. package/dist/flow/types/run-args.d.ts.map +0 -1
  163. package/dist/flow/types/run-args.js +0 -30
  164. package/dist/flow/types/type-validator.d.ts +0 -26
  165. package/dist/flow/types/type-validator.d.ts.map +0 -1
  166. package/dist/flow/types/type-validator.js +0 -134
  167. package/dist/flow/utils/resolve-upload-metadata.d.ts +0 -11
  168. package/dist/flow/utils/resolve-upload-metadata.d.ts.map +0 -1
  169. package/dist/flow/utils/resolve-upload-metadata.js +0 -28
  170. package/dist/flow-2zXnEiWL.cjs +0 -1
  171. package/dist/flow-CRaKy7Vj.js +0 -2
  172. package/dist/flow-CRaKy7Vj.js.map +0 -1
  173. package/dist/generate-id-Dm-Vboxq.d.ts +0 -34
  174. package/dist/generate-id-Dm-Vboxq.d.ts.map +0 -1
  175. package/dist/generate-id-LjJRLD6N.d.cts +0 -34
  176. package/dist/generate-id-LjJRLD6N.d.cts.map +0 -1
  177. package/dist/generate-id-xHp_Z7Cl.cjs +0 -1
  178. package/dist/generate-id-yohS1ZDk.js +0 -2
  179. package/dist/generate-id-yohS1ZDk.js.map +0 -1
  180. package/dist/index-BO8GZlbD.d.cts +0 -1040
  181. package/dist/index-BO8GZlbD.d.cts.map +0 -1
  182. package/dist/index-D-CoVpkZ.d.ts +0 -1004
  183. package/dist/index-D-CoVpkZ.d.ts.map +0 -1
  184. package/dist/index.d.ts.map +0 -1
  185. package/dist/logger/logger.cjs +0 -1
  186. package/dist/logger/logger.d.cts +0 -8
  187. package/dist/logger/logger.d.cts.map +0 -1
  188. package/dist/logger/logger.d.ts +0 -5
  189. package/dist/logger/logger.d.ts.map +0 -1
  190. package/dist/logger/logger.js +0 -10
  191. package/dist/logger/logger.js.map +0 -1
  192. package/dist/semaphore-0ZwjVpyF.js +0 -2
  193. package/dist/semaphore-0ZwjVpyF.js.map +0 -1
  194. package/dist/semaphore-BHprIjFI.d.cts +0 -37
  195. package/dist/semaphore-BHprIjFI.d.cts.map +0 -1
  196. package/dist/semaphore-DThupBkc.d.ts +0 -37
  197. package/dist/semaphore-DThupBkc.d.ts.map +0 -1
  198. package/dist/semaphore-DVrONiAV.cjs +0 -1
  199. package/dist/stream-limiter-CoWKv39w.js +0 -2
  200. package/dist/stream-limiter-JgOwmkMa.cjs +0 -1
  201. package/dist/streams/multi-stream.cjs +0 -1
  202. package/dist/streams/multi-stream.d.cts +0 -91
  203. package/dist/streams/multi-stream.d.cts.map +0 -1
  204. package/dist/streams/multi-stream.d.ts +0 -86
  205. package/dist/streams/multi-stream.d.ts.map +0 -1
  206. package/dist/streams/multi-stream.js +0 -149
  207. package/dist/streams/multi-stream.js.map +0 -1
  208. package/dist/streams/stream-limiter.cjs +0 -1
  209. package/dist/streams/stream-limiter.d.cts.map +0 -1
  210. package/dist/streams/stream-limiter.d.ts +0 -27
  211. package/dist/streams/stream-limiter.d.ts.map +0 -1
  212. package/dist/streams/stream-limiter.js +0 -49
  213. package/dist/streams/stream-splitter.cjs +0 -1
  214. package/dist/streams/stream-splitter.d.cts +0 -68
  215. package/dist/streams/stream-splitter.d.cts.map +0 -1
  216. package/dist/streams/stream-splitter.d.ts +0 -51
  217. package/dist/streams/stream-splitter.d.ts.map +0 -1
  218. package/dist/streams/stream-splitter.js +0 -175
  219. package/dist/streams/stream-splitter.js.map +0 -1
  220. package/dist/types/data-store-registry.d.ts +0 -13
  221. package/dist/types/data-store-registry.d.ts.map +0 -1
  222. package/dist/types/data-store-registry.js +0 -4
  223. package/dist/types/data-store.d.ts +0 -316
  224. package/dist/types/data-store.d.ts.map +0 -1
  225. package/dist/types/data-store.js +0 -157
  226. package/dist/types/event-broadcaster.d.ts +0 -28
  227. package/dist/types/event-broadcaster.d.ts.map +0 -1
  228. package/dist/types/event-broadcaster.js +0 -6
  229. package/dist/types/event-emitter.d.ts +0 -378
  230. package/dist/types/event-emitter.d.ts.map +0 -1
  231. package/dist/types/event-emitter.js +0 -223
  232. package/dist/types/index.d.ts.map +0 -1
  233. package/dist/types/input-file.d.ts +0 -104
  234. package/dist/types/input-file.d.ts.map +0 -1
  235. package/dist/types/input-file.js +0 -27
  236. package/dist/types/kv-store.d.ts +0 -281
  237. package/dist/types/kv-store.d.ts.map +0 -1
  238. package/dist/types/kv-store.js +0 -234
  239. package/dist/types/middleware.d.ts +0 -17
  240. package/dist/types/middleware.d.ts.map +0 -1
  241. package/dist/types/middleware.js +0 -21
  242. package/dist/types/upload-event.d.ts +0 -105
  243. package/dist/types/upload-event.d.ts.map +0 -1
  244. package/dist/types/upload-event.js +0 -71
  245. package/dist/types/upload-file.d.ts +0 -136
  246. package/dist/types/upload-file.d.ts.map +0 -1
  247. package/dist/types/upload-file.js +0 -34
  248. package/dist/types/websocket.d.ts +0 -144
  249. package/dist/types/websocket.d.ts.map +0 -1
  250. package/dist/types/websocket.js +0 -40
  251. package/dist/types-BT-cvi7T.cjs +0 -1
  252. package/dist/types-DhU2j-XF.js +0 -2
  253. package/dist/types-DhU2j-XF.js.map +0 -1
  254. package/dist/upload/convert-to-stream.d.ts +0 -38
  255. package/dist/upload/convert-to-stream.d.ts.map +0 -1
  256. package/dist/upload/convert-to-stream.js +0 -43
  257. package/dist/upload/convert-upload-to-flow-file.d.ts +0 -14
  258. package/dist/upload/convert-upload-to-flow-file.d.ts.map +0 -1
  259. package/dist/upload/convert-upload-to-flow-file.js +0 -21
  260. package/dist/upload/create-upload.d.ts +0 -68
  261. package/dist/upload/create-upload.d.ts.map +0 -1
  262. package/dist/upload/create-upload.js +0 -157
  263. package/dist/upload/index.d.ts.map +0 -1
  264. package/dist/upload/mime.d.ts +0 -24
  265. package/dist/upload/mime.d.ts.map +0 -1
  266. package/dist/upload/mime.js +0 -351
  267. package/dist/upload/upload-chunk.d.ts +0 -58
  268. package/dist/upload/upload-chunk.d.ts.map +0 -1
  269. package/dist/upload/upload-chunk.js +0 -277
  270. package/dist/upload/upload-server.d.ts +0 -221
  271. package/dist/upload/upload-server.d.ts.map +0 -1
  272. package/dist/upload/upload-server.js +0 -181
  273. package/dist/upload/upload-strategy-negotiator.d.ts +0 -148
  274. package/dist/upload/upload-strategy-negotiator.d.ts.map +0 -1
  275. package/dist/upload/upload-strategy-negotiator.js +0 -217
  276. package/dist/upload/upload-url.d.ts +0 -68
  277. package/dist/upload/upload-url.d.ts.map +0 -1
  278. package/dist/upload/upload-url.js +0 -142
  279. package/dist/upload/write-to-store.d.ts +0 -77
  280. package/dist/upload/write-to-store.d.ts.map +0 -1
  281. package/dist/upload/write-to-store.js +0 -147
  282. package/dist/upload-DLuICjpP.cjs +0 -1
  283. package/dist/upload-DaXO34dE.js +0 -2
  284. package/dist/upload-DaXO34dE.js.map +0 -1
  285. package/dist/uploadista-error-BVsVxqvz.js.map +0 -1
  286. package/dist/uploadista-error-CwxYs4EB.d.ts +0 -52
  287. package/dist/uploadista-error-CwxYs4EB.d.ts.map +0 -1
  288. package/dist/uploadista-error-kKlhLRhY.d.cts +0 -52
  289. package/dist/uploadista-error-kKlhLRhY.d.cts.map +0 -1
  290. package/dist/utils/checksum.d.ts +0 -22
  291. package/dist/utils/checksum.d.ts.map +0 -1
  292. package/dist/utils/checksum.js +0 -49
  293. package/dist/utils/debounce.cjs +0 -1
  294. package/dist/utils/debounce.d.cts +0 -38
  295. package/dist/utils/debounce.d.cts.map +0 -1
  296. package/dist/utils/debounce.d.ts +0 -36
  297. package/dist/utils/debounce.d.ts.map +0 -1
  298. package/dist/utils/debounce.js +0 -73
  299. package/dist/utils/generate-id.cjs +0 -1
  300. package/dist/utils/generate-id.d.cts +0 -2
  301. package/dist/utils/generate-id.d.ts +0 -32
  302. package/dist/utils/generate-id.d.ts.map +0 -1
  303. package/dist/utils/generate-id.js +0 -23
  304. package/dist/utils/md5.cjs +0 -1
  305. package/dist/utils/md5.d.cts +0 -73
  306. package/dist/utils/md5.d.cts.map +0 -1
  307. package/dist/utils/md5.d.ts +0 -71
  308. package/dist/utils/md5.d.ts.map +0 -1
  309. package/dist/utils/md5.js +0 -417
  310. package/dist/utils/md5.js.map +0 -1
  311. package/dist/utils/once.cjs +0 -1
  312. package/dist/utils/once.d.cts +0 -25
  313. package/dist/utils/once.d.cts.map +0 -1
  314. package/dist/utils/once.d.ts +0 -21
  315. package/dist/utils/once.d.ts.map +0 -1
  316. package/dist/utils/once.js +0 -54
  317. package/dist/utils/once.js.map +0 -1
  318. package/dist/utils/semaphore.cjs +0 -1
  319. package/dist/utils/semaphore.d.cts +0 -3
  320. package/dist/utils/semaphore.d.ts +0 -78
  321. package/dist/utils/semaphore.d.ts.map +0 -1
  322. package/dist/utils/semaphore.js +0 -134
  323. package/dist/utils/throttle.cjs +0 -1
  324. package/dist/utils/throttle.d.cts +0 -24
  325. package/dist/utils/throttle.d.cts.map +0 -1
  326. package/dist/utils/throttle.d.ts +0 -18
  327. package/dist/utils/throttle.d.ts.map +0 -1
  328. package/dist/utils/throttle.js +0 -20
  329. package/dist/utils/throttle.js.map +0 -1
  330. package/src/logger/logger.ts +0 -14
  331. /package/dist/{errors-CRm1FHHT.cjs → errors-D-K-vxsP.cjs} +0 -0
@@ -1,209 +0,0 @@
1
- import { Effect } from "effect";
2
- /**
3
- * Union type of all possible error codes in the Uploadista system.
4
- *
5
- * Each error code corresponds to a specific error condition with predefined
6
- * HTTP status codes and messages in the ERROR_CATALOG.
7
- */
8
- export type UploadistaErrorCode = "MISSING_OFFSET" | "ABORTED" | "INVALID_TERMINATION" | "ERR_LOCK_TIMEOUT" | "INVALID_CONTENT_TYPE" | "FLOW_STRUCTURE_ERROR" | "FLOW_CYCLE_ERROR" | "FLOW_NODE_NOT_FOUND" | "FLOW_NODE_ERROR" | "FLOW_NOT_AUTHORIZED" | "FLOW_NOT_FOUND" | "FILE_READ_ERROR" | "FLOW_JOB_NOT_FOUND" | "FLOW_JOB_ERROR" | "DATASTORE_NOT_FOUND" | "FILE_NOT_FOUND" | "INVALID_OFFSET" | "FILE_NO_LONGER_EXISTS" | "ERR_SIZE_EXCEEDED" | "ERR_MAX_SIZE_EXCEEDED" | "INVALID_LENGTH" | "INVALID_METADATA" | "VALIDATION_ERROR" | "STORAGE_NOT_AUTHORIZED" | "UNKNOWN_ERROR" | "FILE_WRITE_ERROR" | "UPLOAD_ID_NOT_FOUND" | "FLOW_OUTPUT_VALIDATION_ERROR" | "FLOW_INPUT_VALIDATION_ERROR" | "CHECKSUM_MISMATCH" | "MIMETYPE_MISMATCH" | "UNSUPPORTED_CHECKSUM_ALGORITHM";
9
- /**
10
- * Catalog of all predefined errors in the Uploadista system.
11
- *
12
- * Maps error codes to their HTTP status codes and default error messages.
13
- * This centralized catalog ensures consistent error handling across all
14
- * Uploadista packages and adapters.
15
- *
16
- * Each error entry contains:
17
- * - `status`: HTTP status code (400-500 range)
18
- * - `body`: Human-readable error message
19
- *
20
- * @example
21
- * ```typescript
22
- * // Access a specific error definition
23
- * const fileNotFound = ERROR_CATALOG.FILE_NOT_FOUND;
24
- * console.log(fileNotFound.status); // 404
25
- * console.log(fileNotFound.body); // "The file for this url was not found\n"
26
- *
27
- * // Use with UploadistaError
28
- * const error = UploadistaError.fromCode("FILE_NOT_FOUND");
29
- * ```
30
- */
31
- export declare const ERROR_CATALOG: Readonly<Record<UploadistaErrorCode, {
32
- status: number;
33
- body: string;
34
- }>>;
35
- declare const UploadistaError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
36
- readonly _tag: "UploadistaError";
37
- } & Readonly<A>;
38
- /**
39
- * Standard error class for all Uploadista operations.
40
- *
41
- * UploadistaError provides a consistent error handling approach across the entire
42
- * Uploadista ecosystem. Each error has:
43
- * - A typed error code from the ERROR_CATALOG
44
- * - An HTTP-compatible status code
45
- * - A human-readable error message (body)
46
- * - Optional additional details and cause information
47
- *
48
- * This class integrates with Effect-TS for functional error handling and can be
49
- * easily converted to an Effect that fails.
50
- *
51
- * @example
52
- * ```typescript
53
- * // Create from error code
54
- * const error = UploadistaError.fromCode("FILE_NOT_FOUND");
55
- *
56
- * // Create with custom details
57
- * const customError = UploadistaError.fromCode("FLOW_NODE_ERROR", {
58
- * body: "Failed to process image",
59
- * cause: originalError,
60
- * details: { nodeId: "resize-1", fileId: "abc123" }
61
- * });
62
- *
63
- * // Use with Effect
64
- * const effect = customError.toEffect<void>();
65
- *
66
- * // In an Effect pipeline
67
- * return Effect.gen(function* () {
68
- * const file = yield* getFile(id);
69
- * if (!file) {
70
- * return yield* UploadistaError.fromCode("FILE_NOT_FOUND").toEffect();
71
- * }
72
- * return file;
73
- * });
74
- * ```
75
- */
76
- export declare class UploadistaError extends UploadistaError_base {
77
- readonly code: string;
78
- readonly status: number;
79
- readonly status_code: number;
80
- readonly body: string;
81
- readonly details?: unknown;
82
- constructor({ code, status, body, cause, details, }: {
83
- code: UploadistaErrorCode | string;
84
- status: number;
85
- body: string;
86
- cause?: unknown;
87
- details?: unknown;
88
- });
89
- /**
90
- * Creates an UploadistaError from a predefined error code.
91
- *
92
- * This is the primary way to create errors in the Uploadista system. Each error code
93
- * has a default status and message defined in ERROR_CATALOG, but these can be overridden
94
- * for specific use cases.
95
- *
96
- * @param code - One of the predefined error codes from UploadistaErrorCode
97
- * @param overrides - Optional overrides for the default error properties
98
- * @param overrides.status - Custom HTTP status code (overrides the default)
99
- * @param overrides.body - Custom error message (overrides the default)
100
- * @param overrides.details - Additional structured data about the error
101
- * @param overrides.cause - The underlying error that caused this error (for error chaining)
102
- *
103
- * @returns A new UploadistaError instance
104
- *
105
- * @example
106
- * ```typescript
107
- * // Use default error
108
- * const error = UploadistaError.fromCode("FILE_NOT_FOUND");
109
- *
110
- * // Override message
111
- * const customError = UploadistaError.fromCode("FILE_NOT_FOUND", {
112
- * body: `File with ID ${fileId} was not found in storage`
113
- * });
114
- *
115
- * // Include cause and details
116
- * const detailedError = UploadistaError.fromCode("DATASTORE_NOT_FOUND", {
117
- * cause: storageException,
118
- * details: { storageId: "s3-prod", region: "us-east-1" }
119
- * });
120
- * ```
121
- */
122
- static fromCode(code: UploadistaErrorCode, overrides?: Partial<Pick<UploadistaError, "status" | "body">> & {
123
- details?: unknown;
124
- cause?: unknown;
125
- }): UploadistaError;
126
- /**
127
- * Converts this error to an Effect that immediately fails.
128
- *
129
- * This method integrates UploadistaError with Effect-TS's error handling system,
130
- * allowing errors to be used in Effect pipelines with proper type checking.
131
- *
132
- * @template T - The success type of the Effect (defaults to never since it always fails)
133
- * @returns An Effect that fails with this UploadistaError
134
- *
135
- * @example
136
- * ```typescript
137
- * const error = UploadistaError.fromCode("FILE_NOT_FOUND");
138
- *
139
- * // Use in an Effect pipeline
140
- * return Effect.gen(function* () {
141
- * const file = yield* kvStore.get(fileId);
142
- * if (!file) {
143
- * return yield* error.toEffect();
144
- * }
145
- * return file;
146
- * });
147
- * ```
148
- */
149
- toEffect<T = never>(): Effect.Effect<T, UploadistaError>;
150
- }
151
- /**
152
- * Type guard to check if an unknown value is an UploadistaError.
153
- *
154
- * Useful for error handling when catching errors that might be from
155
- * different sources or libraries.
156
- *
157
- * @param error - The value to check
158
- * @returns True if the value is an UploadistaError instance
159
- *
160
- * @example
161
- * ```typescript
162
- * try {
163
- * await someOperation();
164
- * } catch (error) {
165
- * if (isUploadistaError(error)) {
166
- * console.log(`Uploadista error: ${error.code} (${error.status})`);
167
- * console.log(error.body);
168
- * } else {
169
- * console.error("Unknown error:", error);
170
- * }
171
- * }
172
- * ```
173
- */
174
- export declare function isUploadistaError(error: unknown): error is UploadistaError;
175
- /**
176
- * Creates an Effect that immediately fails with an UploadistaError.
177
- *
178
- * This is a convenience function that combines error creation with Effect conversion.
179
- * It's equivalent to calling `UploadistaError.fromCode(code, overrides).toEffect()`.
180
- *
181
- * @param code - One of the predefined error codes from UploadistaErrorCode
182
- * @param overrides - Optional overrides for the default error properties
183
- * @param overrides.status - Custom HTTP status code
184
- * @param overrides.body - Custom error message
185
- * @param overrides.details - Additional structured data about the error
186
- * @param overrides.cause - The underlying error that caused this error
187
- *
188
- * @returns An Effect that immediately fails with the created UploadistaError
189
- *
190
- * @example
191
- * ```typescript
192
- * // In an Effect pipeline
193
- * return Effect.gen(function* () {
194
- * const file = yield* kvStore.get(fileId);
195
- * if (!file) {
196
- * return yield* httpFailure("FILE_NOT_FOUND", {
197
- * details: { fileId }
198
- * });
199
- * }
200
- * return file;
201
- * });
202
- * ```
203
- */
204
- export declare function httpFailure(code: UploadistaErrorCode, overrides?: Partial<Pick<UploadistaError, "status" | "body">> & {
205
- details?: unknown;
206
- cause?: unknown;
207
- }): Effect.Effect<never, UploadistaError>;
208
- export {};
209
- //# sourceMappingURL=uploadista-error.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uploadista-error.d.ts","sourceRoot":"","sources":["../../src/errors/uploadista-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAC3B,gBAAgB,GAChB,SAAS,GACT,qBAAqB,GACrB,kBAAkB,GAClB,sBAAsB,GACtB,sBAAsB,GACtB,kBAAkB,GAClB,qBAAqB,GACrB,iBAAiB,GACjB,qBAAqB,GACrB,gBAAgB,GAChB,iBAAiB,GACjB,oBAAoB,GACpB,gBAAgB,GAChB,qBAAqB,GACrB,gBAAgB,GAChB,gBAAgB,GAChB,uBAAuB,GACvB,mBAAmB,GACnB,uBAAuB,GACvB,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,GAClB,wBAAwB,GACxB,eAAe,GACf,kBAAkB,GAClB,qBAAqB,GACrB,8BAA8B,GAC9B,6BAA6B,GAC7B,mBAAmB,GACnB,mBAAmB,GACnB,gCAAgC,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,aAAa,EAAE,QAAQ,CAClC,MAAM,CAAC,mBAAmB,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAmHrD,CAAC;;;;AAEX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,qBAAa,eAAgB,SAAQ,oBAAmC;IACtE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;gBAEf,EACV,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,OAAO,GACR,EAAE;QACD,IAAI,EAAE,mBAAmB,GAAG,MAAM,CAAC;QACnC,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB;IAWD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACH,MAAM,CAAC,QAAQ,CACb,IAAI,EAAE,mBAAmB,EACzB,SAAS,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,QAAQ,GAAG,MAAM,CAAC,CAAC,GAAG;QAC9D,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB,GACA,eAAe;IAWlB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,QAAQ,CAAC,CAAC,GAAG,KAAK,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,eAAe,CAAC;CAGzD;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAE1E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,mBAAmB,EACzB,SAAS,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,QAAQ,GAAG,MAAM,CAAC,CAAC,GAAG;IAC9D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,GACA,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,eAAe,CAAC,CAEvC"}
@@ -1,322 +0,0 @@
1
- import { Data, Effect } from "effect";
2
- /**
3
- * Catalog of all predefined errors in the Uploadista system.
4
- *
5
- * Maps error codes to their HTTP status codes and default error messages.
6
- * This centralized catalog ensures consistent error handling across all
7
- * Uploadista packages and adapters.
8
- *
9
- * Each error entry contains:
10
- * - `status`: HTTP status code (400-500 range)
11
- * - `body`: Human-readable error message
12
- *
13
- * @example
14
- * ```typescript
15
- * // Access a specific error definition
16
- * const fileNotFound = ERROR_CATALOG.FILE_NOT_FOUND;
17
- * console.log(fileNotFound.status); // 404
18
- * console.log(fileNotFound.body); // "The file for this url was not found\n"
19
- *
20
- * // Use with UploadistaError
21
- * const error = UploadistaError.fromCode("FILE_NOT_FOUND");
22
- * ```
23
- */
24
- export const ERROR_CATALOG = {
25
- MISSING_OFFSET: { status: 403, body: "Upload-Offset header required\n" },
26
- ABORTED: { status: 400, body: "Request aborted due to lock acquired" },
27
- INVALID_TERMINATION: {
28
- status: 400,
29
- body: "Cannot terminate an already completed upload",
30
- },
31
- ERR_LOCK_TIMEOUT: {
32
- status: 500,
33
- body: "failed to acquire lock before timeout",
34
- },
35
- INVALID_CONTENT_TYPE: {
36
- status: 403,
37
- body: "Content-Type header required\n",
38
- },
39
- DATASTORE_NOT_FOUND: {
40
- status: 500,
41
- body: "The datastore was not found\n",
42
- },
43
- UPLOAD_ID_NOT_FOUND: {
44
- status: 500,
45
- body: "The upload id was not found\n",
46
- },
47
- FILE_NOT_FOUND: {
48
- status: 404,
49
- body: "The file for this url was not found\n",
50
- },
51
- FLOW_NOT_AUTHORIZED: {
52
- status: 401,
53
- body: "The flow is not authorized\n",
54
- },
55
- FLOW_NOT_FOUND: {
56
- status: 404,
57
- body: "The flow was not found\n",
58
- },
59
- FLOW_STRUCTURE_ERROR: {
60
- status: 500,
61
- body: "The flow structure is invalid\n",
62
- },
63
- FLOW_CYCLE_ERROR: {
64
- status: 500,
65
- body: "The flow contains a cycle\n",
66
- },
67
- FLOW_NODE_NOT_FOUND: {
68
- status: 500,
69
- body: "The flow node was not found\n",
70
- },
71
- FLOW_NODE_ERROR: {
72
- status: 500,
73
- body: "The flow node failed\n",
74
- },
75
- FLOW_JOB_NOT_FOUND: {
76
- status: 404,
77
- body: "The flow job was not found\n",
78
- },
79
- FLOW_JOB_ERROR: {
80
- status: 500,
81
- body: "The flow job failed\n",
82
- },
83
- FLOW_INPUT_VALIDATION_ERROR: {
84
- status: 500,
85
- body: "The flow input validation failed\n",
86
- },
87
- FLOW_OUTPUT_VALIDATION_ERROR: {
88
- status: 500,
89
- body: "The flow output validation failed\n",
90
- },
91
- INVALID_OFFSET: { status: 409, body: "Upload-Offset conflict\n" },
92
- FILE_NO_LONGER_EXISTS: {
93
- status: 410,
94
- body: "The file for this url no longer exists\n",
95
- },
96
- FILE_READ_ERROR: {
97
- status: 500,
98
- body: "Something went wrong reading the file\n",
99
- },
100
- ERR_SIZE_EXCEEDED: { status: 413, body: "upload's size exceeded\n" },
101
- ERR_MAX_SIZE_EXCEEDED: { status: 413, body: "Maximum size exceeded\n" },
102
- INVALID_LENGTH: {
103
- status: 400,
104
- body: "Upload-Length or Upload-Defer-Length header required\n",
105
- },
106
- INVALID_METADATA: {
107
- status: 400,
108
- body: "Upload-Metadata is invalid. It MUST consist of one or more comma-separated key-value pairs. The key and value MUST be separated by a space. The key MUST NOT contain spaces and commas and MUST NOT be empty. The key SHOULD be ASCII encoded and the value MUST be Base64 encoded. All keys MUST be unique",
109
- },
110
- VALIDATION_ERROR: {
111
- status: 400,
112
- body: "Validation failed\n",
113
- },
114
- STORAGE_NOT_AUTHORIZED: {
115
- status: 401,
116
- body: "The storage is not authorized\n",
117
- },
118
- UNKNOWN_ERROR: {
119
- status: 500,
120
- body: "Something went wrong with that request\n",
121
- },
122
- FILE_WRITE_ERROR: {
123
- status: 500,
124
- body: "Something went wrong receiving the file\n",
125
- },
126
- CHECKSUM_MISMATCH: {
127
- status: 400,
128
- body: "The file checksum does not match the provided checksum\n",
129
- },
130
- MIMETYPE_MISMATCH: {
131
- status: 400,
132
- body: "The file MIME type does not match the declared type\n",
133
- },
134
- UNSUPPORTED_CHECKSUM_ALGORITHM: {
135
- status: 400,
136
- body: "The specified checksum algorithm is not supported\n",
137
- },
138
- };
139
- /**
140
- * Standard error class for all Uploadista operations.
141
- *
142
- * UploadistaError provides a consistent error handling approach across the entire
143
- * Uploadista ecosystem. Each error has:
144
- * - A typed error code from the ERROR_CATALOG
145
- * - An HTTP-compatible status code
146
- * - A human-readable error message (body)
147
- * - Optional additional details and cause information
148
- *
149
- * This class integrates with Effect-TS for functional error handling and can be
150
- * easily converted to an Effect that fails.
151
- *
152
- * @example
153
- * ```typescript
154
- * // Create from error code
155
- * const error = UploadistaError.fromCode("FILE_NOT_FOUND");
156
- *
157
- * // Create with custom details
158
- * const customError = UploadistaError.fromCode("FLOW_NODE_ERROR", {
159
- * body: "Failed to process image",
160
- * cause: originalError,
161
- * details: { nodeId: "resize-1", fileId: "abc123" }
162
- * });
163
- *
164
- * // Use with Effect
165
- * const effect = customError.toEffect<void>();
166
- *
167
- * // In an Effect pipeline
168
- * return Effect.gen(function* () {
169
- * const file = yield* getFile(id);
170
- * if (!file) {
171
- * return yield* UploadistaError.fromCode("FILE_NOT_FOUND").toEffect();
172
- * }
173
- * return file;
174
- * });
175
- * ```
176
- */
177
- export class UploadistaError extends Data.TaggedError("UploadistaError") {
178
- code;
179
- status;
180
- // Keep legacy property names for backward compatibility
181
- status_code;
182
- body;
183
- details;
184
- constructor({ code, status, body, cause, details, }) {
185
- super();
186
- this.name = "UploadistaError";
187
- this.code = code;
188
- this.status = status;
189
- this.status_code = status; // legacy alias
190
- this.body = body;
191
- this.details = details;
192
- if (cause)
193
- this.cause = cause;
194
- }
195
- /**
196
- * Creates an UploadistaError from a predefined error code.
197
- *
198
- * This is the primary way to create errors in the Uploadista system. Each error code
199
- * has a default status and message defined in ERROR_CATALOG, but these can be overridden
200
- * for specific use cases.
201
- *
202
- * @param code - One of the predefined error codes from UploadistaErrorCode
203
- * @param overrides - Optional overrides for the default error properties
204
- * @param overrides.status - Custom HTTP status code (overrides the default)
205
- * @param overrides.body - Custom error message (overrides the default)
206
- * @param overrides.details - Additional structured data about the error
207
- * @param overrides.cause - The underlying error that caused this error (for error chaining)
208
- *
209
- * @returns A new UploadistaError instance
210
- *
211
- * @example
212
- * ```typescript
213
- * // Use default error
214
- * const error = UploadistaError.fromCode("FILE_NOT_FOUND");
215
- *
216
- * // Override message
217
- * const customError = UploadistaError.fromCode("FILE_NOT_FOUND", {
218
- * body: `File with ID ${fileId} was not found in storage`
219
- * });
220
- *
221
- * // Include cause and details
222
- * const detailedError = UploadistaError.fromCode("DATASTORE_NOT_FOUND", {
223
- * cause: storageException,
224
- * details: { storageId: "s3-prod", region: "us-east-1" }
225
- * });
226
- * ```
227
- */
228
- static fromCode(code, overrides) {
229
- const base = ERROR_CATALOG[code];
230
- return new UploadistaError({
231
- code,
232
- status: overrides?.status ?? base.status,
233
- body: overrides?.body ?? base.body,
234
- details: overrides?.details,
235
- cause: overrides?.cause,
236
- });
237
- }
238
- /**
239
- * Converts this error to an Effect that immediately fails.
240
- *
241
- * This method integrates UploadistaError with Effect-TS's error handling system,
242
- * allowing errors to be used in Effect pipelines with proper type checking.
243
- *
244
- * @template T - The success type of the Effect (defaults to never since it always fails)
245
- * @returns An Effect that fails with this UploadistaError
246
- *
247
- * @example
248
- * ```typescript
249
- * const error = UploadistaError.fromCode("FILE_NOT_FOUND");
250
- *
251
- * // Use in an Effect pipeline
252
- * return Effect.gen(function* () {
253
- * const file = yield* kvStore.get(fileId);
254
- * if (!file) {
255
- * return yield* error.toEffect();
256
- * }
257
- * return file;
258
- * });
259
- * ```
260
- */
261
- toEffect() {
262
- return Effect.fail(this);
263
- }
264
- }
265
- /**
266
- * Type guard to check if an unknown value is an UploadistaError.
267
- *
268
- * Useful for error handling when catching errors that might be from
269
- * different sources or libraries.
270
- *
271
- * @param error - The value to check
272
- * @returns True if the value is an UploadistaError instance
273
- *
274
- * @example
275
- * ```typescript
276
- * try {
277
- * await someOperation();
278
- * } catch (error) {
279
- * if (isUploadistaError(error)) {
280
- * console.log(`Uploadista error: ${error.code} (${error.status})`);
281
- * console.log(error.body);
282
- * } else {
283
- * console.error("Unknown error:", error);
284
- * }
285
- * }
286
- * ```
287
- */
288
- export function isUploadistaError(error) {
289
- return error instanceof UploadistaError;
290
- }
291
- /**
292
- * Creates an Effect that immediately fails with an UploadistaError.
293
- *
294
- * This is a convenience function that combines error creation with Effect conversion.
295
- * It's equivalent to calling `UploadistaError.fromCode(code, overrides).toEffect()`.
296
- *
297
- * @param code - One of the predefined error codes from UploadistaErrorCode
298
- * @param overrides - Optional overrides for the default error properties
299
- * @param overrides.status - Custom HTTP status code
300
- * @param overrides.body - Custom error message
301
- * @param overrides.details - Additional structured data about the error
302
- * @param overrides.cause - The underlying error that caused this error
303
- *
304
- * @returns An Effect that immediately fails with the created UploadistaError
305
- *
306
- * @example
307
- * ```typescript
308
- * // In an Effect pipeline
309
- * return Effect.gen(function* () {
310
- * const file = yield* kvStore.get(fileId);
311
- * if (!file) {
312
- * return yield* httpFailure("FILE_NOT_FOUND", {
313
- * details: { fileId }
314
- * });
315
- * }
316
- * return file;
317
- * });
318
- * ```
319
- */
320
- export function httpFailure(code, overrides) {
321
- return UploadistaError.fromCode(code, overrides).toEffect();
322
- }
@@ -1,47 +0,0 @@
1
- import type { FlowEdge as EnhancedFlowEdge } from "./types/flow-types";
2
- /**
3
- * Represents a connection between two nodes in a flow, defining the data flow direction.
4
- *
5
- * Edges connect the output of a source node to the input of a target node,
6
- * enabling data to flow through the processing pipeline in a directed acyclic graph (DAG).
7
- */
8
- export type FlowEdge = EnhancedFlowEdge;
9
- /**
10
- * Creates a flow edge connecting two nodes in a processing pipeline.
11
- *
12
- * Edges define how data flows between nodes. The data output from the source node
13
- * becomes the input for the target node. For nodes with multiple inputs/outputs,
14
- * ports can be specified to route data to specific connections.
15
- *
16
- * @param config - Edge configuration
17
- * @param config.source - ID of the source node (data originates here)
18
- * @param config.target - ID of the target node (data flows to here)
19
- * @param config.sourcePort - Optional port name on the source node for multi-output nodes
20
- * @param config.targetPort - Optional port name on the target node for multi-input nodes
21
- *
22
- * @returns A FlowEdge object representing the connection
23
- *
24
- * @example
25
- * ```typescript
26
- * // Simple edge connecting two nodes
27
- * const edge = createFlowEdge({
28
- * source: "input-1",
29
- * target: "process-1"
30
- * });
31
- *
32
- * // Edge with ports for multi-input/output nodes
33
- * const portEdge = createFlowEdge({
34
- * source: "multiplex-1",
35
- * target: "merge-1",
36
- * sourcePort: "out-a",
37
- * targetPort: "in-1"
38
- * });
39
- * ```
40
- */
41
- export declare function createFlowEdge({ source, target, sourcePort, targetPort, }: {
42
- source: string;
43
- target: string;
44
- sourcePort?: string;
45
- targetPort?: string;
46
- }): FlowEdge;
47
- //# sourceMappingURL=edge.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"edge.d.ts","sourceRoot":"","sources":["../../src/flow/edge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEvE;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG,gBAAgB,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,MAAM,EACN,UAAU,EACV,UAAU,GACX,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,QAAQ,CAOX"}
package/dist/flow/edge.js DELETED
@@ -1,40 +0,0 @@
1
- /**
2
- * Creates a flow edge connecting two nodes in a processing pipeline.
3
- *
4
- * Edges define how data flows between nodes. The data output from the source node
5
- * becomes the input for the target node. For nodes with multiple inputs/outputs,
6
- * ports can be specified to route data to specific connections.
7
- *
8
- * @param config - Edge configuration
9
- * @param config.source - ID of the source node (data originates here)
10
- * @param config.target - ID of the target node (data flows to here)
11
- * @param config.sourcePort - Optional port name on the source node for multi-output nodes
12
- * @param config.targetPort - Optional port name on the target node for multi-input nodes
13
- *
14
- * @returns A FlowEdge object representing the connection
15
- *
16
- * @example
17
- * ```typescript
18
- * // Simple edge connecting two nodes
19
- * const edge = createFlowEdge({
20
- * source: "input-1",
21
- * target: "process-1"
22
- * });
23
- *
24
- * // Edge with ports for multi-input/output nodes
25
- * const portEdge = createFlowEdge({
26
- * source: "multiplex-1",
27
- * target: "merge-1",
28
- * sourcePort: "out-a",
29
- * targetPort: "in-1"
30
- * });
31
- * ```
32
- */
33
- export function createFlowEdge({ source, target, sourcePort, targetPort, }) {
34
- return {
35
- source,
36
- target,
37
- sourcePort,
38
- targetPort,
39
- };
40
- }