@routier/core 0.0.1-alpha.1 → 0.0.1-alpha.2

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/dist/assertions/index.d.ts +5 -0
  2. package/dist/assertions/index.js +131 -0
  3. package/dist/assertions/index.js.map +1 -0
  4. package/dist/codegen/SlotPath.d.ts +7 -0
  5. package/dist/codegen/blocks.d.ts +130 -0
  6. package/dist/codegen/handlers/CloneHandlerBuilder.d.ts +4 -0
  7. package/dist/codegen/handlers/CompareHandlerBuilder.d.ts +4 -0
  8. package/dist/codegen/handlers/DeserializeHandlerBuilder.d.ts +4 -0
  9. package/dist/codegen/handlers/EnableChangeTrackingHandlerBuilder.d.ts +4 -0
  10. package/dist/codegen/handlers/EnrichmentHandlerBuilder.d.ts +4 -0
  11. package/dist/codegen/handlers/FreezeHandlerBuilder.d.ts +4 -0
  12. package/dist/codegen/handlers/HashHandlerBuilder.d.ts +4 -0
  13. package/dist/codegen/handlers/HashTypeHandlerBuilder.d.ts +4 -0
  14. package/dist/codegen/handlers/IdSelectorHandlerBuilder.d.ts +4 -0
  15. package/dist/codegen/handlers/MergeHandlerBuilder.d.ts +4 -0
  16. package/dist/codegen/handlers/PrepareHandlerBuilder.d.ts +4 -0
  17. package/dist/codegen/handlers/SerializeHandlerBuilder.d.ts +4 -0
  18. package/dist/codegen/handlers/StripHandlerBuilder.d.ts +4 -0
  19. package/dist/codegen/handlers/clone/CloneObjectHandler.d.ts +6 -0
  20. package/dist/codegen/handlers/clone/CloneValueHandler.d.ts +6 -0
  21. package/dist/codegen/handlers/compare/CompareObjectHandler.d.ts +6 -0
  22. package/dist/codegen/handlers/compare/CompareValueHandler.d.ts +6 -0
  23. package/dist/codegen/handlers/deserialize/DeserializeComputedValueHandler.d.ts +6 -0
  24. package/dist/codegen/handlers/deserialize/DeserializeDateHandler.d.ts +9 -0
  25. package/dist/codegen/handlers/deserialize/DeserializeFunctionHandler.d.ts +6 -0
  26. package/dist/codegen/handlers/deserialize/DeserializeObjectHandler.d.ts +6 -0
  27. package/dist/codegen/handlers/deserialize/DeserializeValueHandler.d.ts +6 -0
  28. package/dist/codegen/handlers/enableChangeTracking/EnableChangeTrackingObjectHandler.d.ts +6 -0
  29. package/dist/codegen/handlers/enableChangeTracking/EnableChangeTrackingPrimitiveValueHandler.d.ts +6 -0
  30. package/dist/codegen/handlers/enrichment/EnrichmentComputedValueHandler.d.ts +6 -0
  31. package/dist/codegen/handlers/enrichment/EnrichmentDefaultFunctionHandler.d.ts +6 -0
  32. package/dist/codegen/handlers/enrichment/EnrichmentDefaultValueHandler.d.ts +6 -0
  33. package/dist/codegen/handlers/enrichment/EnrichmentFunctionHandler.d.ts +6 -0
  34. package/dist/codegen/handlers/enrichment/EnrichmentNullableObjectHandler.d.ts +6 -0
  35. package/dist/codegen/handlers/enrichment/EnrichmentObjectHandler.d.ts +6 -0
  36. package/dist/codegen/handlers/enrichment/EnrichmentObjectIdentityHandler.d.ts +6 -0
  37. package/dist/codegen/handlers/enrichment/EnrichmentPrimitiveHandler.d.ts +6 -0
  38. package/dist/codegen/handlers/enrichment/EnrichmentPrimitiveIdentityHandler.d.ts +6 -0
  39. package/dist/codegen/handlers/freeze/FreezeObjectHandler.d.ts +6 -0
  40. package/dist/codegen/handlers/freeze/FreezePrimitiveValueHandler.d.ts +6 -0
  41. package/dist/codegen/handlers/hash/HashComputedValueHandler.d.ts +6 -0
  42. package/dist/codegen/handlers/hash/HashDateHandler.d.ts +6 -0
  43. package/dist/codegen/handlers/hash/HashFunctionHandler.d.ts +6 -0
  44. package/dist/codegen/handlers/hash/HashIdentityHandler.d.ts +6 -0
  45. package/dist/codegen/handlers/hash/HashKeyHandler.d.ts +6 -0
  46. package/dist/codegen/handlers/hash/HashValueHandler.d.ts +6 -0
  47. package/dist/codegen/handlers/hashType/HashTypeValueHandler.d.ts +6 -0
  48. package/dist/codegen/handlers/idSelector/IdSelectorValueHandler.d.ts +6 -0
  49. package/{src/codegen/handlers/index.ts → dist/codegen/handlers/index.d.ts} +1 -1
  50. package/dist/codegen/handlers/merge/MergeComputedValueHandler.d.ts +6 -0
  51. package/dist/codegen/handlers/merge/MergeDefaultFunctionHandler.d.ts +6 -0
  52. package/dist/codegen/handlers/merge/MergeDefaultValueHandler.d.ts +6 -0
  53. package/dist/codegen/handlers/merge/MergeFunctionHandler.d.ts +6 -0
  54. package/dist/codegen/handlers/merge/MergePrimitiveHandler.d.ts +6 -0
  55. package/dist/codegen/handlers/prepare/PrepareComputedValueHandler.d.ts +6 -0
  56. package/dist/codegen/handlers/prepare/PrepareFunctionHandler.d.ts +6 -0
  57. package/dist/codegen/handlers/prepare/PrepareIdentityHandler.d.ts +6 -0
  58. package/dist/codegen/handlers/prepare/PrepareKeyHandler.d.ts +6 -0
  59. package/dist/codegen/handlers/prepare/PrepareObjectHandler.d.ts +6 -0
  60. package/dist/codegen/handlers/prepare/PrepareValueHandler.d.ts +6 -0
  61. package/dist/codegen/handlers/serialize/SerializeDateHandler.d.ts +9 -0
  62. package/dist/codegen/handlers/serialize/SerializeObjectHandler.d.ts +6 -0
  63. package/dist/codegen/handlers/serialize/SerializeValueHandler.d.ts +6 -0
  64. package/dist/codegen/handlers/strip/StripIdentityHandler.d.ts +6 -0
  65. package/dist/codegen/handlers/strip/StripKeyHandler.d.ts +6 -0
  66. package/dist/codegen/handlers/strip/StripObjectHandler.d.ts +6 -0
  67. package/dist/codegen/handlers/strip/StripValueHandler.d.ts +6 -0
  68. package/dist/codegen/handlers/types.d.ts +18 -0
  69. package/{src/codegen/index.ts → dist/codegen/index.d.ts} +1 -1
  70. package/dist/codegen/types.d.ts +9 -0
  71. package/dist/codegen/utils.d.ts +22 -0
  72. package/dist/collections/Changes.d.ts +51 -0
  73. package/dist/collections/Changes.test.d.ts +1 -0
  74. package/dist/collections/IdSet.d.ts +7 -0
  75. package/dist/collections/MemoryDataCollection.d.ts +22 -0
  76. package/dist/collections/MemoryDataCollection.test.d.ts +1 -0
  77. package/dist/collections/SchemaCollection.d.ts +8 -0
  78. package/dist/collections/TagCollection.d.ts +15 -0
  79. package/dist/collections/TagCollection.test.d.ts +1 -0
  80. package/{src/collections/index.ts → dist/collections/index.d.ts} +1 -1
  81. package/dist/collections/index.js +659 -0
  82. package/dist/collections/index.js.map +1 -0
  83. package/dist/errors/SchemaError.d.ts +3 -0
  84. package/dist/errors/index.d.ts +1 -0
  85. package/dist/errors/index.js +90 -0
  86. package/dist/errors/index.js.map +1 -0
  87. package/{src/expressions/index.ts → dist/expressions/index.d.ts} +1 -1
  88. package/{src/expressions/parser.ts → dist/expressions/index.js} +387 -205
  89. package/dist/expressions/index.js.map +1 -0
  90. package/dist/expressions/parser.d.ts +4 -0
  91. package/dist/expressions/parser.test.d.ts +1 -0
  92. package/{src/expressions/types.ts → dist/expressions/types.d.ts} +42 -99
  93. package/dist/expressions/utils.d.ts +10 -0
  94. package/dist/expressions/utils.test.d.ts +1 -0
  95. package/{src/index.ts → dist/index.d.ts} +1 -1
  96. package/dist/index.js +8434 -0
  97. package/dist/index.js.map +1 -0
  98. package/dist/performance/index.d.ts +5 -0
  99. package/dist/performance/index.js +65 -0
  100. package/dist/performance/index.js.map +1 -0
  101. package/dist/pipeline/SyncronousQueue.d.ts +7 -0
  102. package/dist/pipeline/SyncronousQueue.test.d.ts +1 -0
  103. package/dist/pipeline/TrampolinePipeline.d.ts +36 -0
  104. package/dist/pipeline/TrampolinePipeline.test.d.ts +1 -0
  105. package/dist/pipeline/index.d.ts +2 -0
  106. package/{src/pipeline/TrampolinePipeline.ts → dist/pipeline/index.js} +297 -140
  107. package/dist/pipeline/index.js.map +1 -0
  108. package/dist/plugins/EphemeralDataPlugin.d.ts +13 -0
  109. package/dist/plugins/capabilities/DbPluginCapability.d.ts +23 -0
  110. package/{src/plugins/capabilities/index.ts → dist/plugins/capabilities/index.d.ts} +1 -1
  111. package/dist/plugins/capabilities/logging/DbPluginLoggingCapability.d.ts +28 -0
  112. package/dist/plugins/capabilities/logging/index.d.ts +1 -0
  113. package/{src/plugins/index.ts → dist/plugins/index.d.ts} +1 -1
  114. package/dist/plugins/index.js +2328 -0
  115. package/dist/plugins/index.js.map +1 -0
  116. package/dist/plugins/query/Query.d.ts +13 -0
  117. package/dist/plugins/query/QueryOptionsCollection.d.ts +27 -0
  118. package/dist/plugins/query/QueryOptionsCollection.test.d.ts +1 -0
  119. package/{src/plugins/query/index.ts → dist/plugins/query/index.d.ts} +1 -1
  120. package/{src/plugins/query/types.ts → dist/plugins/query/types.d.ts} +29 -20
  121. package/dist/plugins/replication/OptimisticReplicationDbPlugin.d.ts +21 -0
  122. package/dist/plugins/replication/ReplicationDbPlugin.d.ts +21 -0
  123. package/{src/plugins/replication/index.ts → dist/plugins/replication/index.d.ts} +1 -1
  124. package/{src/plugins/replication/types.ts → dist/plugins/replication/types.d.ts} +1 -2
  125. package/dist/plugins/translators/DataTranslator.d.ts +18 -0
  126. package/dist/plugins/translators/JsonTranslator.d.ts +17 -0
  127. package/dist/plugins/translators/JsonTranslator.test.d.ts +1 -0
  128. package/dist/plugins/translators/SqlTranslator.d.ts +14 -0
  129. package/{src/plugins/translators/index.ts → dist/plugins/translators/index.d.ts} +1 -1
  130. package/{src/plugins/types.ts → dist/plugins/types.d.ts} +11 -26
  131. package/dist/results/Result.d.ts +29 -0
  132. package/{src/results/index.ts → dist/results/index.d.ts} +1 -1
  133. package/dist/results/index.js +192 -0
  134. package/dist/results/index.js.map +1 -0
  135. package/{src/results/types.ts → dist/results/types.d.ts} +18 -7
  136. package/dist/results/utils.d.ts +2 -0
  137. package/dist/schema/PropertyInfo.d.ts +132 -0
  138. package/dist/schema/PropertyInfo.test.d.ts +1 -0
  139. package/dist/schema/SchemaDefinition.d.ts +17 -0
  140. package/dist/schema/builder.d.ts +17 -0
  141. package/{src/schema/index.ts → dist/schema/index.d.ts} +1 -1
  142. package/dist/schema/index.js +4822 -0
  143. package/dist/schema/index.js.map +1 -0
  144. package/dist/schema/property/base/SchemaBase.d.ts +23 -0
  145. package/dist/schema/property/base/index.d.ts +1 -0
  146. package/dist/schema/property/modifiers/SchemaDefault.d.ts +13 -0
  147. package/dist/schema/property/modifiers/SchemaDeserialize.d.ts +11 -0
  148. package/dist/schema/property/modifiers/SchemaDistinct.d.ts +7 -0
  149. package/dist/schema/property/modifiers/SchemaFrom.d.ts +23 -0
  150. package/dist/schema/property/modifiers/SchemaIdentity.d.ts +7 -0
  151. package/dist/schema/property/modifiers/SchemaIndex.d.ts +23 -0
  152. package/dist/schema/property/modifiers/SchemaKey.d.ts +13 -0
  153. package/dist/schema/property/modifiers/SchemaNullable.d.ts +9 -0
  154. package/dist/schema/property/modifiers/SchemaOptional.d.ts +9 -0
  155. package/dist/schema/property/modifiers/SchemaReadonly.d.ts +15 -0
  156. package/dist/schema/property/modifiers/SchemaSerialize.d.ts +9 -0
  157. package/dist/schema/property/modifiers/SchemaTracked.d.ts +7 -0
  158. package/{src/schema/property/modifiers/index.ts → dist/schema/property/modifiers/index.d.ts} +1 -1
  159. package/dist/schema/property/types/SchemaArray.d.ts +23 -0
  160. package/dist/schema/property/types/SchemaBoolean.d.ts +27 -0
  161. package/dist/schema/property/types/SchemaDate.d.ts +27 -0
  162. package/dist/schema/property/types/SchemaNumber.d.ts +31 -0
  163. package/dist/schema/property/types/SchemaObject.d.ts +20 -0
  164. package/dist/schema/property/types/SchemaString.d.ts +31 -0
  165. package/{src/schema/property/types/index.ts → dist/schema/property/types/index.d.ts} +1 -1
  166. package/dist/schema/table/SchemaComputed.d.ts +10 -0
  167. package/dist/schema/table/SchemaFunction.d.ts +8 -0
  168. package/{src/schema/table/index.ts → dist/schema/table/index.d.ts} +1 -1
  169. package/{src/schema/types.ts → dist/schema/types.d.ts} +59 -99
  170. package/{src/types/index.ts → dist/types/index.d.ts} +1 -2
  171. package/dist/types/index.js +25 -0
  172. package/dist/types/index.js.map +1 -0
  173. package/dist/utilities/arrays.d.ts +1 -0
  174. package/dist/utilities/arrays.test.d.ts +1 -0
  175. package/dist/utilities/dates.d.ts +1 -0
  176. package/dist/utilities/dates.test.d.ts +1 -0
  177. package/dist/utilities/dbPluginEventUtils.d.ts +14 -0
  178. package/{src/utilities/index.ts → dist/utilities/index.d.ts} +1 -1
  179. package/dist/utilities/index.js +554 -0
  180. package/dist/utilities/index.js.map +1 -0
  181. package/dist/utilities/objects.d.ts +2 -0
  182. package/dist/utilities/queryOptionsCollection.d.ts +2 -0
  183. package/dist/utilities/replication.d.ts +3 -0
  184. package/dist/utilities/runtime.d.ts +1 -0
  185. package/dist/utilities/strings.d.ts +1 -0
  186. package/dist/utilities/types.d.ts +1 -0
  187. package/dist/utilities/uuid.d.ts +2 -0
  188. package/package.json +6 -1
  189. package/readme.md +95 -0
  190. package/CHANGELOG.md +0 -8
  191. package/rspack.config.mjs +0 -65
  192. package/src/assertions/index.ts +0 -37
  193. package/src/codegen/SlotPath.ts +0 -20
  194. package/src/codegen/blocks.ts +0 -578
  195. package/src/codegen/handlers/CloneHandlerBuilder.ts +0 -13
  196. package/src/codegen/handlers/CompareHandlerBuilder.ts +0 -13
  197. package/src/codegen/handlers/DeserializeHandlerBuilder.ts +0 -20
  198. package/src/codegen/handlers/EnableChangeTrackingHandlerBuilder.ts +0 -13
  199. package/src/codegen/handlers/EnrichmentHandlerBuilder.ts +0 -28
  200. package/src/codegen/handlers/FreezeHandlerBuilder.ts +0 -13
  201. package/src/codegen/handlers/HashHandlerBuilder.ts +0 -25
  202. package/src/codegen/handlers/HashTypeHandlerBuilder.ts +0 -11
  203. package/src/codegen/handlers/IdSelectorHandlerBuilder.ts +0 -10
  204. package/src/codegen/handlers/MergeHandlerBuilder.ts +0 -19
  205. package/src/codegen/handlers/PrepareHandlerBuilder.ts +0 -23
  206. package/src/codegen/handlers/SerializeHandlerBuilder.ts +0 -15
  207. package/src/codegen/handlers/StripHandlerBuilder.ts +0 -18
  208. package/src/codegen/handlers/clone/CloneObjectHandler.ts +0 -29
  209. package/src/codegen/handlers/clone/CloneValueHandler.ts +0 -33
  210. package/src/codegen/handlers/compare/CompareObjectHandler.ts +0 -15
  211. package/src/codegen/handlers/compare/CompareValueHandler.ts +0 -27
  212. package/src/codegen/handlers/deserialize/DeserializeComputedValueHandler.ts +0 -16
  213. package/src/codegen/handlers/deserialize/DeserializeDateHandler.ts +0 -45
  214. package/src/codegen/handlers/deserialize/DeserializeFunctionHandler.ts +0 -16
  215. package/src/codegen/handlers/deserialize/DeserializeObjectHandler.ts +0 -29
  216. package/src/codegen/handlers/deserialize/DeserializeValueHandler.ts +0 -33
  217. package/src/codegen/handlers/enableChangeTracking/EnableChangeTrackingObjectHandler.ts +0 -20
  218. package/src/codegen/handlers/enableChangeTracking/EnableChangeTrackingPrimitiveValueHandler.ts +0 -15
  219. package/src/codegen/handlers/enrichment/EnrichmentComputedValueHandler.ts +0 -37
  220. package/src/codegen/handlers/enrichment/EnrichmentDefaultFunctionHandler.ts +0 -50
  221. package/src/codegen/handlers/enrichment/EnrichmentDefaultValueHandler.ts +0 -18
  222. package/src/codegen/handlers/enrichment/EnrichmentFunctionHandler.ts +0 -38
  223. package/src/codegen/handlers/enrichment/EnrichmentNullableObjectHandler.ts +0 -44
  224. package/src/codegen/handlers/enrichment/EnrichmentObjectHandler.ts +0 -29
  225. package/src/codegen/handlers/enrichment/EnrichmentObjectIdentityHandler.ts +0 -16
  226. package/src/codegen/handlers/enrichment/EnrichmentPrimitiveHandler.ts +0 -13
  227. package/src/codegen/handlers/enrichment/EnrichmentPrimitiveIdentityHandler.ts +0 -21
  228. package/src/codegen/handlers/freeze/FreezeObjectHandler.ts +0 -20
  229. package/src/codegen/handlers/freeze/FreezePrimitiveValueHandler.ts +0 -15
  230. package/src/codegen/handlers/hash/HashComputedValueHandler.ts +0 -15
  231. package/src/codegen/handlers/hash/HashDateHandler.ts +0 -26
  232. package/src/codegen/handlers/hash/HashFunctionHandler.ts +0 -16
  233. package/src/codegen/handlers/hash/HashIdentityHandler.ts +0 -15
  234. package/src/codegen/handlers/hash/HashKeyHandler.ts +0 -26
  235. package/src/codegen/handlers/hash/HashValueHandler.ts +0 -26
  236. package/src/codegen/handlers/hashType/HashTypeValueHandler.ts +0 -20
  237. package/src/codegen/handlers/idSelector/IdSelectorValueHandler.ts +0 -28
  238. package/src/codegen/handlers/merge/MergeComputedValueHandler.ts +0 -37
  239. package/src/codegen/handlers/merge/MergeDefaultFunctionHandler.ts +0 -40
  240. package/src/codegen/handlers/merge/MergeDefaultValueHandler.ts +0 -32
  241. package/src/codegen/handlers/merge/MergeFunctionHandler.ts +0 -16
  242. package/src/codegen/handlers/merge/MergePrimitiveHandler.ts +0 -21
  243. package/src/codegen/handlers/prepare/PrepareComputedValueHandler.ts +0 -16
  244. package/src/codegen/handlers/prepare/PrepareFunctionHandler.ts +0 -16
  245. package/src/codegen/handlers/prepare/PrepareIdentityHandler.ts +0 -21
  246. package/src/codegen/handlers/prepare/PrepareKeyHandler.ts +0 -21
  247. package/src/codegen/handlers/prepare/PrepareObjectHandler.ts +0 -38
  248. package/src/codegen/handlers/prepare/PrepareValueHandler.ts +0 -36
  249. package/src/codegen/handlers/serialize/SerializeDateHandler.ts +0 -45
  250. package/src/codegen/handlers/serialize/SerializeObjectHandler.ts +0 -28
  251. package/src/codegen/handlers/serialize/SerializeValueHandler.ts +0 -33
  252. package/src/codegen/handlers/strip/StripIdentityHandler.ts +0 -15
  253. package/src/codegen/handlers/strip/StripKeyHandler.ts +0 -15
  254. package/src/codegen/handlers/strip/StripObjectHandler.ts +0 -35
  255. package/src/codegen/handlers/strip/StripValueHandler.ts +0 -36
  256. package/src/codegen/handlers/types.ts +0 -119
  257. package/src/codegen/types.ts +0 -2
  258. package/src/codegen/utils.ts +0 -74
  259. package/src/collections/Changes.test.ts +0 -337
  260. package/src/collections/Changes.ts +0 -177
  261. package/src/collections/IdSet.ts +0 -28
  262. package/src/collections/MemoryDataCollection.test.ts +0 -424
  263. package/src/collections/MemoryDataCollection.ts +0 -134
  264. package/src/collections/SchemaCollection.ts +0 -22
  265. package/src/collections/TagCollection.test.ts +0 -443
  266. package/src/collections/TagCollection.ts +0 -62
  267. package/src/errors/SchemaError.ts +0 -6
  268. package/src/errors/index.ts +0 -1
  269. package/src/expressions/parser.test.ts +0 -913
  270. package/src/expressions/utils.test.ts +0 -346
  271. package/src/expressions/utils.ts +0 -59
  272. package/src/performance/index.ts +0 -26
  273. package/src/pipeline/SyncronousQueue.test.ts +0 -269
  274. package/src/pipeline/SyncronousQueue.ts +0 -30
  275. package/src/pipeline/TrampolinePipeline.test.ts +0 -374
  276. package/src/pipeline/index.ts +0 -2
  277. package/src/plugins/EphemeralDataPlugin.ts +0 -132
  278. package/src/plugins/capabilities/DbPluginCapability.ts +0 -111
  279. package/src/plugins/capabilities/logging/DbPluginLoggingCapability.ts +0 -261
  280. package/src/plugins/capabilities/logging/index.ts +0 -1
  281. package/src/plugins/query/Query.ts +0 -67
  282. package/src/plugins/query/QueryOptionsCollection.test.ts +0 -86
  283. package/src/plugins/query/QueryOptionsCollection.ts +0 -154
  284. package/src/plugins/replication/OptimisticReplicationDbPlugin.ts +0 -202
  285. package/src/plugins/replication/ReplicationDbPlugin.ts +0 -137
  286. package/src/plugins/translators/DataTranslator.ts +0 -46
  287. package/src/plugins/translators/JsonTranslator.test.ts +0 -618
  288. package/src/plugins/translators/JsonTranslator.ts +0 -211
  289. package/src/plugins/translators/SqlTranslator.ts +0 -45
  290. package/src/results/Result.ts +0 -91
  291. package/src/results/utils.ts +0 -15
  292. package/src/schema/PropertyInfo.test.ts +0 -479
  293. package/src/schema/PropertyInfo.ts +0 -374
  294. package/src/schema/SchemaDefinition.ts +0 -626
  295. package/src/schema/builder.ts +0 -18
  296. package/src/schema/property/base/SchemaBase.ts +0 -49
  297. package/src/schema/property/base/index.ts +0 -1
  298. package/src/schema/property/modifiers/SchemaDefault.ts +0 -29
  299. package/src/schema/property/modifiers/SchemaDeserialize.ts +0 -23
  300. package/src/schema/property/modifiers/SchemaDistinct.ts +0 -14
  301. package/src/schema/property/modifiers/SchemaFrom.ts +0 -54
  302. package/src/schema/property/modifiers/SchemaIdentity.ts +0 -13
  303. package/src/schema/property/modifiers/SchemaIndex.ts +0 -60
  304. package/src/schema/property/modifiers/SchemaKey.ts +0 -28
  305. package/src/schema/property/modifiers/SchemaNullable.ts +0 -18
  306. package/src/schema/property/modifiers/SchemaOptional.ts +0 -19
  307. package/src/schema/property/modifiers/SchemaReadonly.ts +0 -34
  308. package/src/schema/property/modifiers/SchemaSerialize.ts +0 -18
  309. package/src/schema/property/modifiers/SchemaTracked.ts +0 -14
  310. package/src/schema/property/types/SchemaArray.ts +0 -50
  311. package/src/schema/property/types/SchemaBoolean.ts +0 -59
  312. package/src/schema/property/types/SchemaDate.ts +0 -58
  313. package/src/schema/property/types/SchemaNumber.ts +0 -69
  314. package/src/schema/property/types/SchemaObject.ts +0 -44
  315. package/src/schema/property/types/SchemaString.ts +0 -69
  316. package/src/schema/table/SchemaComputed.ts +0 -20
  317. package/src/schema/table/SchemaFunction.ts +0 -15
  318. package/src/utilities/arrays.test.ts +0 -312
  319. package/src/utilities/arrays.ts +0 -12
  320. package/src/utilities/dates.test.ts +0 -388
  321. package/src/utilities/dates.ts +0 -11
  322. package/src/utilities/dbPluginEventUtils.ts +0 -44
  323. package/src/utilities/objects.ts +0 -7
  324. package/src/utilities/queryOptionsCollection.ts +0 -16
  325. package/src/utilities/replication.ts +0 -23
  326. package/src/utilities/runtime.ts +0 -3
  327. package/src/utilities/strings.ts +0 -18
  328. package/src/utilities/types.ts +0 -1
  329. package/src/utilities/uuid.ts +0 -56
  330. package/tsconfig.json +0 -28
  331. package/vitest.config.ts +0 -11
@@ -1,56 +1,83 @@
1
- import { CallbackResult, Result, ResultType } from "../results";
2
-
3
- /**
4
- * Type definition for an asynchronous function that takes data and a callback.
5
- * TIn: The input data type.
6
- * TOut: The output data type (passed to the callback).
7
- */
8
- export type Processor<TIn, TOut> = (data: TIn, callback: (result: TOut, error?: any) => void) => void;
9
-
10
- // Return type for a step execution: Either the next step function or null if waiting/done.
11
- type StepResult<TData> = TrampolineStep<TData> | null;
12
- type TrampolineStep<TData> = () => StepResult<TData>;
13
-
14
- export class TrampolinePipeline<TInitial, TCurrent = TInitial> {
15
- private _list: Processor<any, any>[] = [];
16
- private _hasErrored: boolean = false; // Flag to prevent calling done on error
1
+ var __webpack_modules__ = ({
2
+ "./src/pipeline/SyncronousQueue.ts":
3
+ /*!*****************************************!*\
4
+ !*** ./src/pipeline/SyncronousQueue.ts ***!
5
+ \*****************************************/
6
+ (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
7
+ __webpack_require__.r(__webpack_exports__);
8
+ __webpack_require__.d(__webpack_exports__, {
9
+ SyncronousQueue: () => (SyncronousQueue)
10
+ });
11
+ class SyncronousQueue {
12
+ _queue = [];
13
+ _current = null;
14
+ enqueue(unitOfWork) {
15
+ this._queue.push(unitOfWork);
16
+ this._next();
17
+ }
18
+ _next() {
19
+ if (this._current != null || this._queue.length === 0) {
20
+ return;
21
+ }
22
+ // Take first item
23
+ this._current = this._queue.shift() ?? null;
24
+ if (this._current == null) {
25
+ return;
26
+ }
27
+ this._current(() => {
28
+ this._current = null;
29
+ this._next();
30
+ });
31
+ }
32
+ }
17
33
 
18
- filter<TFinal>(initialData: TInitial, done: (data: TFinal, error?: any) => void) {
19
34
 
35
+ }),
36
+ "./src/pipeline/TrampolinePipeline.ts":
37
+ /*!********************************************!*\
38
+ !*** ./src/pipeline/TrampolinePipeline.ts ***!
39
+ \********************************************/
40
+ (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
41
+ __webpack_require__.r(__webpack_exports__);
42
+ __webpack_require__.d(__webpack_exports__, {
43
+ AsyncPipeline: () => (AsyncPipeline),
44
+ TrampolinePipeline: () => (TrampolinePipeline),
45
+ WorkPipeline: () => (WorkPipeline)
46
+ });
47
+ /* ESM import */var _results__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../results */ "./src/results/Result.ts");
48
+
49
+ class TrampolinePipeline {
50
+ _list = [];
51
+ _hasErrored = false; // Flag to prevent calling done on error
52
+ filter(initialData, done) {
20
53
  this._hasErrored = false; // Reset error flag on new execution
21
-
22
54
  if (this._list.length === 0) {
23
- queueMicrotask(() => done(initialData as any as TFinal));
55
+ queueMicrotask(() => done(initialData));
24
56
  return;
25
57
  }
26
-
27
58
  let index = 0;
28
- let currentData: any = initialData;
59
+ let currentData = initialData;
29
60
  let isRunning = false; // Guard against overlapping trampoline calls
30
-
31
61
  try {
32
62
  // --- Revised Completion Logic --- (Moved up for clarity)
33
- const finalStepSentinel = (): StepResult<any> => { // A special step function for the very end
63
+ const finalStepSentinel = () => {
34
64
  // Only call done if no error has occurred
35
65
  if (!this._hasErrored) {
36
- queueMicrotask(() => done(currentData as TFinal));
66
+ queueMicrotask(() => done(currentData));
37
67
  }
38
68
  return null; // Stop the trampoline
39
69
  };
40
-
41
- const createStepRevised = (idx: number): TrampolineStep<any> => {
70
+ const createStepRevised = (idx) => {
42
71
  return () => {
43
- if (this._hasErrored) return null; // Stop if an error occurred elsewhere
44
-
72
+ if (this._hasErrored)
73
+ return null; // Stop if an error occurred elsewhere
45
74
  if (idx >= this._list.length) {
46
75
  return finalStepSentinel(); // Execute the dedicated final step
47
76
  }
48
-
49
77
  const processor = this._list[idx];
50
78
  // Initialize syncCallbackResult to null to satisfy StepResult type
51
- let syncCallbackResult: StepResult<any> = null;
79
+ let syncCallbackResult = null;
52
80
  let calledSync = false;
53
-
54
81
  try {
55
82
  processor(currentData, (result, error) => {
56
83
  // --- Error Handling ---
@@ -61,22 +88,22 @@ export class TrampolinePipeline<TInitial, TCurrent = TInitial> {
61
88
  throw error;
62
89
  }
63
90
  // --- /Error Handling ---
64
-
65
91
  // If no error, proceed as before
66
92
  currentData = result;
67
93
  index = idx + 1; // Update index for the next step
68
94
  const nextStep = createStepRevised(index); // Use updated index
69
-
70
95
  if (isRunning) {
71
96
  // Callback was synchronous
72
97
  syncCallbackResult = nextStep; // Store next step function
73
98
  calledSync = true;
74
- } else {
99
+ }
100
+ else {
75
101
  // Callback was asynchronous, restart trampoline
76
102
  trampoline(nextStep);
77
103
  }
78
104
  });
79
- } catch (error) {
105
+ }
106
+ catch (error) {
80
107
  if (!this._hasErrored) { // Check flag to avoid double logging if error was from callback
81
108
  console.error(`Error thrown by processor at index ${idx} or its callback:`, error);
82
109
  this._hasErrored = true;
@@ -84,27 +111,23 @@ export class TrampolinePipeline<TInitial, TCurrent = TInitial> {
84
111
  // Rethrow to be caught by the trampoline's catch block
85
112
  throw error;
86
113
  }
87
-
88
114
  if (calledSync) {
89
115
  // Return the next step function for the sync loop
90
116
  return syncCallbackResult;
91
- } else {
117
+ }
118
+ else {
92
119
  // Pause trampoline for async, loop will stop as step returns null
93
120
  return null;
94
121
  }
95
122
  };
96
123
  };
97
-
98
124
  // The trampoline loop
99
- const trampoline = (step: TrampolineStep<any> | null) => {
100
-
125
+ const trampoline = (step) => {
101
126
  if (isRunning) {
102
127
  return;
103
128
  }
104
-
105
129
  isRunning = true;
106
130
  let currentStep = step;
107
-
108
131
  while (typeof currentStep === 'function') {
109
132
  try {
110
133
  // Stop immediately if an error was flagged elsewhere
@@ -113,7 +136,8 @@ export class TrampolinePipeline<TInitial, TCurrent = TInitial> {
113
136
  break;
114
137
  }
115
138
  currentStep = currentStep(); // Execute step, get next step or null
116
- } catch (trampolineError) {
139
+ }
140
+ catch (trampolineError) {
117
141
  // Catch errors propagated from step execution (processor or callback errors)
118
142
  if (!this._hasErrored) { // Avoid double logging
119
143
  console.error("Error during trampoline step execution:", trampolineError);
@@ -127,102 +151,87 @@ export class TrampolinePipeline<TInitial, TCurrent = TInitial> {
127
151
  }
128
152
  // Loop ends when currentStep is null or loop is broken by error
129
153
  isRunning = false;
130
-
131
154
  // Completion check is now handled by finalStepSentinel ensuring `done` isn't called on error.
132
155
  };
133
-
134
156
  // --- Start the process ---
135
157
  index = 0; // Reset index
136
158
  currentData = initialData; // Reset data
137
159
  trampoline(createStepRevised(0)); // Start with the revised step creator
138
- } catch (error: any) {
160
+ }
161
+ catch (error) {
139
162
  done(currentData, error);
140
163
  }
141
164
  }
142
-
143
- pipe<TNext>(processor: Processor<TCurrent, TNext>) {
165
+ pipe(processor) {
144
166
  this._list.push(processor);
145
- return this as unknown as TrampolinePipeline<TInitial, TNext>;
167
+ return this;
146
168
  }
147
-
148
- pipeEach(items: TCurrent[], fn: (payload: ResultType<TCurrent>, done: CallbackResult<TCurrent>) => void, map: (previous: ResultType<TCurrent>, current: ResultType<TCurrent>) => ResultType<TCurrent>) {
169
+ pipeEach(items, fn, map) {
149
170
  for (let i = 0, length = items.length; i < length; i++) {
150
-
151
- this.pipe<ResultType<TCurrent>>((previous, done) => {
152
-
153
- fn(map(previous as ResultType<TCurrent>, Result.success(items[i])), done);
171
+ this.pipe((previous, done) => {
172
+ fn(map(previous, _results__WEBPACK_IMPORTED_MODULE_0__.Result.success(items[i])), done);
154
173
  });
155
174
  }
156
175
  }
157
176
  }
158
-
159
- export type AsyncUnitOfWork<TData, TResult> = (payload: TData, done: CallbackResult<TResult>) => void;
160
- export class AsyncPipeline<TData, TResult> {
161
- private _list: [TData, AsyncUnitOfWork<TData, TResult>][] = [];
162
- private _hasErrored: boolean = false; // Flag to prevent calling done on error
163
-
164
- filter(done: CallbackResult<TResult[]>) {
165
-
177
+ class AsyncPipeline {
178
+ _list = [];
179
+ _hasErrored = false; // Flag to prevent calling done on error
180
+ filter(done) {
166
181
  this._hasErrored = false; // Reset error flag on new execution
167
- let currentData: TResult[] = [];
168
-
182
+ let currentData = [];
169
183
  if (this._list.length === 0) {
170
- queueMicrotask(() => done(Result.success()));
184
+ queueMicrotask(() => done(_results__WEBPACK_IMPORTED_MODULE_0__.Result.success()));
171
185
  return;
172
186
  }
173
-
174
187
  let index = 0;
175
188
  let isRunning = false; // Guard against overlapping trampoline calls
176
-
177
189
  try {
178
190
  // --- Revised Completion Logic --- (Moved up for clarity)
179
- const finalStepSentinel = (): StepResult<any> => { // A special step function for the very end
191
+ const finalStepSentinel = () => {
180
192
  // Only call done if no error has occurred
181
193
  if (!this._hasErrored) {
182
- queueMicrotask(() => done(Result.success(currentData)));
194
+ queueMicrotask(() => done(_results__WEBPACK_IMPORTED_MODULE_0__.Result.success(currentData)));
183
195
  }
184
196
  return null; // Stop the trampoline
185
197
  };
186
-
187
- const createStepRevised = (idx: number): TrampolineStep<any> => {
198
+ const createStepRevised = (idx) => {
188
199
  return () => {
189
- if (this._hasErrored) return null; // Stop if an error occurred elsewhere
190
-
200
+ if (this._hasErrored)
201
+ return null; // Stop if an error occurred elsewhere
191
202
  if (idx >= this._list.length) {
192
203
  return finalStepSentinel(); // Execute the dedicated final step
193
204
  }
194
-
195
205
  const [payload, processor] = this._list[idx];
196
206
  // Initialize syncCallbackResult to null to satisfy StepResult type
197
- let syncCallbackResult: StepResult<any> = null;
207
+ let syncCallbackResult = null;
198
208
  let calledSync = false;
199
-
200
209
  try {
201
210
  processor(payload, (result) => {
202
211
  // --- Error Handling ---
203
- if (result.ok === Result.ERROR) {
212
+ if (result.ok === _results__WEBPACK_IMPORTED_MODULE_0__.Result.ERROR) {
204
213
  console.error(`Error reported by AsyncPipeline at index ${idx}:`, result.error);
205
214
  this._hasErrored = true; // Set flag
206
215
  // Throw the error to be caught by outer try...catch blocks
207
216
  throw result.error;
208
217
  }
209
218
  // --- /Error Handling ---
210
-
211
219
  // If no error, proceed as before
212
220
  currentData.push(result.data);
213
221
  index = idx + 1; // Update index for the next step
214
222
  const nextStep = createStepRevised(index); // Use updated index
215
-
216
223
  if (isRunning) {
217
224
  // Callback was synchronous
218
225
  syncCallbackResult = nextStep; // Store next step function
219
226
  calledSync = true;
220
- } else {
227
+ }
228
+ else {
221
229
  // Callback was asynchronous, restart trampoline
222
230
  trampoline(nextStep);
223
231
  }
224
232
  });
225
- } catch (error) {
233
+ }
234
+ catch (error) {
226
235
  if (!this._hasErrored) { // Check flag to avoid double logging if error was from callback
227
236
  console.error(`Error thrown by processor at index ${idx} or its callback:`, error);
228
237
  this._hasErrored = true;
@@ -230,27 +239,23 @@ export class AsyncPipeline<TData, TResult> {
230
239
  // Rethrow to be caught by the trampoline's catch block
231
240
  throw error;
232
241
  }
233
-
234
242
  if (calledSync) {
235
243
  // Return the next step function for the sync loop
236
244
  return syncCallbackResult;
237
- } else {
245
+ }
246
+ else {
238
247
  // Pause trampoline for async, loop will stop as step returns null
239
248
  return null;
240
249
  }
241
250
  };
242
251
  };
243
-
244
252
  // The trampoline loop
245
- const trampoline = (step: TrampolineStep<any> | null) => {
246
-
253
+ const trampoline = (step) => {
247
254
  if (isRunning) {
248
255
  return;
249
256
  }
250
-
251
257
  isRunning = true;
252
258
  let currentStep = step;
253
-
254
259
  while (typeof currentStep === 'function') {
255
260
  try {
256
261
  // Stop immediately if an error was flagged elsewhere
@@ -259,7 +264,8 @@ export class AsyncPipeline<TData, TResult> {
259
264
  break;
260
265
  }
261
266
  currentStep = currentStep(); // Execute step, get next step or null
262
- } catch (trampolineError) {
267
+ }
268
+ catch (trampolineError) {
263
269
  // Catch errors propagated from step execution (processor or callback errors)
264
270
  if (!this._hasErrored) { // Avoid double logging
265
271
  console.error("Error during trampoline step execution:", trampolineError);
@@ -273,102 +279,88 @@ export class AsyncPipeline<TData, TResult> {
273
279
  }
274
280
  // Loop ends when currentStep is null or loop is broken by error
275
281
  isRunning = false;
276
-
277
282
  // Completion check is now handled by finalStepSentinel ensuring `done` isn't called on error.
278
283
  };
279
-
280
284
  // --- Start the process ---
281
285
  index = 0; // Reset index
282
286
  trampoline(createStepRevised(0)); // Start with the revised step creator
283
- } catch (error: any) {
284
- done(Result.error(error));
287
+ }
288
+ catch (error) {
289
+ done(_results__WEBPACK_IMPORTED_MODULE_0__.Result.error(error));
285
290
  }
286
291
  }
287
-
288
- pipe(data: TData, processor: AsyncUnitOfWork<TData, TResult>) {
292
+ pipe(data, processor) {
289
293
  this._list.push([data, processor]);
290
294
  }
291
-
292
- pipeEach(items: TData[], processor: AsyncUnitOfWork<TData, TResult>) {
295
+ pipeEach(items, processor) {
293
296
  for (let i = 0, length = items.length; i < length; i++) {
294
297
  this.pipe(items[i], processor);
295
298
  }
296
299
  }
297
300
  }
298
-
299
- export type UnitOfWork = (done: CallbackResult<never>) => void;
300
-
301
301
  /**
302
302
  * Processes functions with callbacks asynchronously.
303
- *
303
+ *
304
304
  * This pipeline handles work items that contain callback functions,
305
305
  * executing them in an asynchronous manner while maintaining proper
306
306
  * flow control and error handling.
307
307
  */
308
- export class WorkPipeline {
309
- private unitsOfWork: UnitOfWork[] = [];
310
- private _hasErrored: boolean = false; // Flag to prevent calling done on error
311
-
312
- filter(done: CallbackResult<never>) {
313
-
308
+ class WorkPipeline {
309
+ unitsOfWork = [];
310
+ _hasErrored = false; // Flag to prevent calling done on error
311
+ filter(done) {
314
312
  this._hasErrored = false; // Reset error flag on new execution
315
-
316
313
  if (this.unitsOfWork.length === 0) {
317
- queueMicrotask(() => done(Result.success()));
314
+ queueMicrotask(() => done(_results__WEBPACK_IMPORTED_MODULE_0__.Result.success()));
318
315
  return;
319
316
  }
320
-
321
317
  let index = 0;
322
318
  let isRunning = false; // Guard against overlapping trampoline calls
323
-
324
319
  try {
325
320
  // --- Revised Completion Logic --- (Moved up for clarity)
326
- const finalStepSentinel = (): StepResult<never> => { // A special step function for the very end
321
+ const finalStepSentinel = () => {
327
322
  // Only call done if no error has occurred
328
323
  if (!this._hasErrored) {
329
- queueMicrotask(() => done(Result.success()));
324
+ queueMicrotask(() => done(_results__WEBPACK_IMPORTED_MODULE_0__.Result.success()));
330
325
  }
331
326
  return null; // Stop the trampoline
332
327
  };
333
-
334
- const createStepRevised = (idx: number): TrampolineStep<any> => {
328
+ const createStepRevised = (idx) => {
335
329
  return () => {
336
- if (this._hasErrored) return null; // Stop if an error occurred elsewhere
337
-
330
+ if (this._hasErrored)
331
+ return null; // Stop if an error occurred elsewhere
338
332
  if (idx >= this.unitsOfWork.length) {
339
333
  return finalStepSentinel(); // Execute the dedicated final step
340
334
  }
341
-
342
335
  const processor = this.unitsOfWork[idx];
343
336
  // Initialize syncCallbackResult to null to satisfy StepResult type
344
- let syncCallbackResult: StepResult<any> = null;
337
+ let syncCallbackResult = null;
345
338
  let calledSync = false;
346
-
347
339
  try {
348
340
  processor((result) => {
349
341
  // --- Error Handling ---
350
- if (result.ok === Result.ERROR) {
342
+ if (result.ok === _results__WEBPACK_IMPORTED_MODULE_0__.Result.ERROR) {
351
343
  console.error(`Error reported by AsyncPipeline at index ${idx}:`, result.error);
352
344
  this._hasErrored = true; // Set flag
353
345
  // Throw the error to be caught by outer try...catch blocks
354
346
  throw result.error;
355
347
  }
356
348
  // --- /Error Handling ---
357
-
358
349
  // If no error, proceed as before
359
350
  index = idx + 1; // Update index for the next step
360
351
  const nextStep = createStepRevised(index); // Use updated index
361
-
362
352
  if (isRunning) {
363
353
  // Callback was synchronous
364
354
  syncCallbackResult = nextStep; // Store next step function
365
355
  calledSync = true;
366
- } else {
356
+ }
357
+ else {
367
358
  // Callback was asynchronous, restart trampoline
368
359
  trampoline(nextStep);
369
360
  }
370
361
  });
371
- } catch (error) {
362
+ }
363
+ catch (error) {
372
364
  if (!this._hasErrored) { // Check flag to avoid double logging if error was from callback
373
365
  console.error(`Error thrown by processor at index ${idx} or its callback:`, error);
374
366
  this._hasErrored = true;
@@ -376,27 +368,23 @@ export class WorkPipeline {
376
368
  // Rethrow to be caught by the trampoline's catch block
377
369
  throw error;
378
370
  }
379
-
380
371
  if (calledSync) {
381
372
  // Return the next step function for the sync loop
382
373
  return syncCallbackResult;
383
- } else {
374
+ }
375
+ else {
384
376
  // Pause trampoline for async, loop will stop as step returns null
385
377
  return null;
386
378
  }
387
379
  };
388
380
  };
389
-
390
381
  // The trampoline loop
391
- const trampoline = (step: TrampolineStep<any> | null) => {
392
-
382
+ const trampoline = (step) => {
393
383
  if (isRunning) {
394
384
  return;
395
385
  }
396
-
397
386
  isRunning = true;
398
387
  let currentStep = step;
399
-
400
388
  while (typeof currentStep === 'function') {
401
389
  try {
402
390
  // Stop immediately if an error was flagged elsewhere
@@ -405,7 +393,8 @@ export class WorkPipeline {
405
393
  break;
406
394
  }
407
395
  currentStep = currentStep(); // Execute step, get next step or null
408
- } catch (trampolineError) {
396
+ }
397
+ catch (trampolineError) {
409
398
  // Catch errors propagated from step execution (processor or callback errors)
410
399
  if (!this._hasErrored) { // Avoid double logging
411
400
  console.error("Error during trampoline step execution:", trampolineError);
@@ -419,19 +408,187 @@ export class WorkPipeline {
419
408
  }
420
409
  // Loop ends when currentStep is null or loop is broken by error
421
410
  isRunning = false;
422
-
423
411
  // Completion check is now handled by finalStepSentinel ensuring `done` isn't called on error.
424
412
  };
425
-
426
413
  // --- Start the process ---
427
414
  index = 0; // Reset index
428
415
  trampoline(createStepRevised(0)); // Start with the revised step creator
429
- } catch (error: any) {
430
- done(Result.error(error));
416
+ }
417
+ catch (error) {
418
+ done(_results__WEBPACK_IMPORTED_MODULE_0__.Result.error(error));
431
419
  }
432
420
  }
433
-
434
- pipe(work: UnitOfWork) {
421
+ pipe(work) {
435
422
  this.unitsOfWork.push(work);
436
423
  }
437
424
  }
425
+
426
+
427
+ }),
428
+ "./src/results/Result.ts":
429
+ /*!*******************************!*\
430
+ !*** ./src/results/Result.ts ***!
431
+ \*******************************/
432
+ (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
433
+ __webpack_require__.r(__webpack_exports__);
434
+ __webpack_require__.d(__webpack_exports__, {
435
+ PluginEventResult: () => (PluginEventResult),
436
+ Result: () => (Result)
437
+ });
438
+ class BaseResult {
439
+ static ERROR = "error";
440
+ static SUCCESS = "success";
441
+ static PARTIAL = "partial";
442
+ static resolve(result, resolve, reject) {
443
+ if (result.ok === BaseResult.SUCCESS) {
444
+ resolve(result.data);
445
+ return;
446
+ }
447
+ if (result.ok === BaseResult.PARTIAL) {
448
+ reject({
449
+ partial: result.data,
450
+ error: result.error
451
+ });
452
+ return;
453
+ }
454
+ reject(result.error);
455
+ }
456
+ static assertSuccess(result) {
457
+ if (result.ok !== BaseResult.SUCCESS) {
458
+ throw new Error(`Expected success result, but got ${result.ok}: ${result.error}`);
459
+ }
460
+ }
461
+ }
462
+ class Result extends BaseResult {
463
+ static success(data) {
464
+ return {
465
+ ok: Result.SUCCESS,
466
+ data
467
+ };
468
+ }
469
+ static error(error) {
470
+ return {
471
+ ok: Result.ERROR,
472
+ error
473
+ };
474
+ }
475
+ static partial(data, error) {
476
+ return {
477
+ ok: Result.PARTIAL,
478
+ data,
479
+ error
480
+ };
481
+ }
482
+ }
483
+ class PluginEventResult extends BaseResult {
484
+ static success(id, data) {
485
+ return {
486
+ id,
487
+ ok: Result.SUCCESS,
488
+ data
489
+ };
490
+ }
491
+ static error(id, error) {
492
+ return {
493
+ id,
494
+ ok: Result.ERROR,
495
+ error
496
+ };
497
+ }
498
+ static partial(id, data, error) {
499
+ return {
500
+ id,
501
+ ok: Result.PARTIAL,
502
+ data,
503
+ error
504
+ };
505
+ }
506
+ static assertSuccess(result) {
507
+ if (result.ok !== Result.SUCCESS) {
508
+ throw new Error(`Expected success result, but got ${result.ok}: ${result.error}`);
509
+ }
510
+ }
511
+ }
512
+
513
+
514
+ }),
515
+
516
+ });
517
+ /************************************************************************/
518
+ // The module cache
519
+ var __webpack_module_cache__ = {};
520
+
521
+ // The require function
522
+ function __webpack_require__(moduleId) {
523
+
524
+ // Check if module is in cache
525
+ var cachedModule = __webpack_module_cache__[moduleId];
526
+ if (cachedModule !== undefined) {
527
+ return cachedModule.exports;
528
+ }
529
+ // Create a new module (and put it into the cache)
530
+ var module = (__webpack_module_cache__[moduleId] = {
531
+ exports: {}
532
+ });
533
+ // Execute the module function
534
+ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
535
+
536
+ // Return the exports of the module
537
+ return module.exports;
538
+
539
+ }
540
+
541
+ /************************************************************************/
542
+ // webpack/runtime/define_property_getters
543
+ (() => {
544
+ __webpack_require__.d = (exports, definition) => {
545
+ for(var key in definition) {
546
+ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
547
+ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
548
+ }
549
+ }
550
+ };
551
+ })();
552
+ // webpack/runtime/has_own_property
553
+ (() => {
554
+ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
555
+ })();
556
+ // webpack/runtime/make_namespace_object
557
+ (() => {
558
+ // define __esModule on exports
559
+ __webpack_require__.r = (exports) => {
560
+ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
561
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
562
+ }
563
+ Object.defineProperty(exports, '__esModule', { value: true });
564
+ };
565
+ })();
566
+ /************************************************************************/
567
+ var __webpack_exports__ = {};
568
+ // This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
569
+ (() => {
570
+
571
+ /*!*******************************!*\
572
+ !*** ./src/pipeline/index.ts ***!
573
+ \*******************************/
574
+ __webpack_require__.r(__webpack_exports__);
575
+ __webpack_require__.d(__webpack_exports__, {
576
+ AsyncPipeline: () => (/* reexport safe */ _TrampolinePipeline__WEBPACK_IMPORTED_MODULE_1__.AsyncPipeline),
577
+ SyncronousQueue: () => (/* reexport safe */ _SyncronousQueue__WEBPACK_IMPORTED_MODULE_0__.SyncronousQueue),
578
+ TrampolinePipeline: () => (/* reexport safe */ _TrampolinePipeline__WEBPACK_IMPORTED_MODULE_1__.TrampolinePipeline),
579
+ WorkPipeline: () => (/* reexport safe */ _TrampolinePipeline__WEBPACK_IMPORTED_MODULE_1__.WorkPipeline)
580
+ });
581
+ /* ESM import */var _SyncronousQueue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SyncronousQueue */ "./src/pipeline/SyncronousQueue.ts");
582
+ /* ESM import */var _TrampolinePipeline__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./TrampolinePipeline */ "./src/pipeline/TrampolinePipeline.ts");
583
+
584
+
585
+
586
+ })();
587
+
588
+ var __webpack_exports__AsyncPipeline = __webpack_exports__.AsyncPipeline;
589
+ var __webpack_exports__SyncronousQueue = __webpack_exports__.SyncronousQueue;
590
+ var __webpack_exports__TrampolinePipeline = __webpack_exports__.TrampolinePipeline;
591
+ var __webpack_exports__WorkPipeline = __webpack_exports__.WorkPipeline;
592
+ export { __webpack_exports__AsyncPipeline as AsyncPipeline, __webpack_exports__SyncronousQueue as SyncronousQueue, __webpack_exports__TrampolinePipeline as TrampolinePipeline, __webpack_exports__WorkPipeline as WorkPipeline };
593
+
594
+ //# sourceMappingURL=index.js.map