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

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 (334) 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/ReadonlySchemaCollection.d.ts +17 -0
  78. package/dist/collections/SchemaCollection.d.ts +10 -0
  79. package/dist/collections/TagCollection.d.ts +15 -0
  80. package/dist/collections/TagCollection.test.d.ts +1 -0
  81. package/{src/collections/index.ts → dist/collections/index.d.ts} +2 -1
  82. package/dist/collections/index.js +717 -0
  83. package/dist/collections/index.js.map +1 -0
  84. package/dist/errors/SchemaError.d.ts +3 -0
  85. package/dist/errors/index.d.ts +1 -0
  86. package/dist/errors/index.js +90 -0
  87. package/dist/errors/index.js.map +1 -0
  88. package/{src/expressions/index.ts → dist/expressions/index.d.ts} +1 -1
  89. package/{src/expressions/parser.ts → dist/expressions/index.js} +387 -205
  90. package/dist/expressions/index.js.map +1 -0
  91. package/dist/expressions/parser.d.ts +4 -0
  92. package/dist/expressions/parser.test.d.ts +1 -0
  93. package/{src/expressions/types.ts → dist/expressions/types.d.ts} +42 -99
  94. package/dist/expressions/utils.d.ts +10 -0
  95. package/dist/expressions/utils.test.d.ts +1 -0
  96. package/{src/index.ts → dist/index.d.ts} +1 -1
  97. package/dist/index.js +8589 -0
  98. package/dist/index.js.map +1 -0
  99. package/dist/performance/index.d.ts +5 -0
  100. package/dist/performance/index.js +65 -0
  101. package/dist/performance/index.js.map +1 -0
  102. package/dist/pipeline/SyncronousQueue.d.ts +7 -0
  103. package/dist/pipeline/SyncronousQueue.test.d.ts +1 -0
  104. package/dist/pipeline/TrampolinePipeline.d.ts +36 -0
  105. package/dist/pipeline/TrampolinePipeline.test.d.ts +1 -0
  106. package/dist/pipeline/index.d.ts +2 -0
  107. package/{src/pipeline/TrampolinePipeline.ts → dist/pipeline/index.js} +297 -140
  108. package/dist/pipeline/index.js.map +1 -0
  109. package/dist/plugins/EphemeralDataPlugin.d.ts +13 -0
  110. package/dist/plugins/capabilities/DbPluginCapability.d.ts +23 -0
  111. package/{src/plugins/capabilities/index.ts → dist/plugins/capabilities/index.d.ts} +1 -1
  112. package/dist/plugins/capabilities/logging/DbPluginLoggingCapability.d.ts +28 -0
  113. package/dist/plugins/capabilities/logging/index.d.ts +1 -0
  114. package/{src/plugins/index.ts → dist/plugins/index.d.ts} +1 -1
  115. package/dist/plugins/index.js +2332 -0
  116. package/dist/plugins/index.js.map +1 -0
  117. package/dist/plugins/query/Query.d.ts +13 -0
  118. package/dist/plugins/query/QueryOptionsCollection.d.ts +27 -0
  119. package/dist/plugins/query/QueryOptionsCollection.test.d.ts +1 -0
  120. package/{src/plugins/query/index.ts → dist/plugins/query/index.d.ts} +1 -1
  121. package/{src/plugins/query/types.ts → dist/plugins/query/types.d.ts} +29 -20
  122. package/dist/plugins/replication/OptimisticReplicationDbPlugin.d.ts +21 -0
  123. package/dist/plugins/replication/ReplicationDbPlugin.d.ts +21 -0
  124. package/{src/plugins/replication/index.ts → dist/plugins/replication/index.d.ts} +1 -1
  125. package/{src/plugins/replication/types.ts → dist/plugins/replication/types.d.ts} +1 -2
  126. package/dist/plugins/translators/DataTranslator.d.ts +18 -0
  127. package/dist/plugins/translators/JsonTranslator.d.ts +17 -0
  128. package/dist/plugins/translators/JsonTranslator.test.d.ts +1 -0
  129. package/dist/plugins/translators/SqlTranslator.d.ts +14 -0
  130. package/{src/plugins/translators/index.ts → dist/plugins/translators/index.d.ts} +1 -1
  131. package/{src/plugins/types.ts → dist/plugins/types.d.ts} +13 -26
  132. package/dist/results/Result.d.ts +29 -0
  133. package/{src/results/index.ts → dist/results/index.d.ts} +1 -1
  134. package/dist/results/index.js +192 -0
  135. package/dist/results/index.js.map +1 -0
  136. package/{src/results/types.ts → dist/results/types.d.ts} +18 -7
  137. package/dist/results/utils.d.ts +2 -0
  138. package/dist/schema/PropertyInfo.d.ts +132 -0
  139. package/dist/schema/PropertyInfo.test.d.ts +1 -0
  140. package/dist/schema/SchemaDefinition.d.ts +17 -0
  141. package/dist/schema/builder.d.ts +17 -0
  142. package/dist/schema/communication/broadcast.d.ts +11 -0
  143. package/{src/schema/index.ts → dist/schema/index.d.ts} +1 -1
  144. package/dist/schema/index.js +4929 -0
  145. package/dist/schema/index.js.map +1 -0
  146. package/dist/schema/property/base/SchemaBase.d.ts +23 -0
  147. package/dist/schema/property/base/index.d.ts +1 -0
  148. package/dist/schema/property/modifiers/SchemaDefault.d.ts +13 -0
  149. package/dist/schema/property/modifiers/SchemaDeserialize.d.ts +11 -0
  150. package/dist/schema/property/modifiers/SchemaDistinct.d.ts +7 -0
  151. package/dist/schema/property/modifiers/SchemaFrom.d.ts +23 -0
  152. package/dist/schema/property/modifiers/SchemaIdentity.d.ts +7 -0
  153. package/dist/schema/property/modifiers/SchemaIndex.d.ts +23 -0
  154. package/dist/schema/property/modifiers/SchemaKey.d.ts +13 -0
  155. package/dist/schema/property/modifiers/SchemaNullable.d.ts +9 -0
  156. package/dist/schema/property/modifiers/SchemaOptional.d.ts +9 -0
  157. package/dist/schema/property/modifiers/SchemaReadonly.d.ts +15 -0
  158. package/dist/schema/property/modifiers/SchemaSerialize.d.ts +9 -0
  159. package/dist/schema/property/modifiers/SchemaTracked.d.ts +7 -0
  160. package/{src/schema/property/modifiers/index.ts → dist/schema/property/modifiers/index.d.ts} +1 -1
  161. package/dist/schema/property/types/SchemaArray.d.ts +23 -0
  162. package/dist/schema/property/types/SchemaBoolean.d.ts +27 -0
  163. package/dist/schema/property/types/SchemaDate.d.ts +27 -0
  164. package/dist/schema/property/types/SchemaNumber.d.ts +31 -0
  165. package/dist/schema/property/types/SchemaObject.d.ts +20 -0
  166. package/dist/schema/property/types/SchemaString.d.ts +31 -0
  167. package/{src/schema/property/types/index.ts → dist/schema/property/types/index.d.ts} +1 -1
  168. package/dist/schema/table/SchemaComputed.d.ts +10 -0
  169. package/dist/schema/table/SchemaFunction.d.ts +8 -0
  170. package/{src/schema/table/index.ts → dist/schema/table/index.d.ts} +1 -1
  171. package/{src/schema/types.ts → dist/schema/types.d.ts} +61 -101
  172. package/{src/types/index.ts → dist/types/index.d.ts} +1 -2
  173. package/dist/types/index.js +25 -0
  174. package/dist/types/index.js.map +1 -0
  175. package/dist/utilities/arrays.d.ts +1 -0
  176. package/dist/utilities/arrays.test.d.ts +1 -0
  177. package/dist/utilities/dates.d.ts +1 -0
  178. package/dist/utilities/dates.test.d.ts +1 -0
  179. package/dist/utilities/dbPluginEventUtils.d.ts +14 -0
  180. package/dist/utilities/functions.d.ts +1 -0
  181. package/{src/utilities/index.ts → dist/utilities/index.d.ts} +2 -1
  182. package/dist/utilities/index.js +571 -0
  183. package/dist/utilities/index.js.map +1 -0
  184. package/dist/utilities/objects.d.ts +2 -0
  185. package/dist/utilities/queryOptionsCollection.d.ts +2 -0
  186. package/dist/utilities/replication.d.ts +3 -0
  187. package/dist/utilities/runtime.d.ts +1 -0
  188. package/dist/utilities/strings.d.ts +1 -0
  189. package/dist/utilities/types.d.ts +4 -0
  190. package/dist/utilities/uuid.d.ts +2 -0
  191. package/package.json +6 -1
  192. package/readme.md +95 -0
  193. package/CHANGELOG.md +0 -8
  194. package/rspack.config.mjs +0 -65
  195. package/src/assertions/index.ts +0 -37
  196. package/src/codegen/SlotPath.ts +0 -20
  197. package/src/codegen/blocks.ts +0 -578
  198. package/src/codegen/handlers/CloneHandlerBuilder.ts +0 -13
  199. package/src/codegen/handlers/CompareHandlerBuilder.ts +0 -13
  200. package/src/codegen/handlers/DeserializeHandlerBuilder.ts +0 -20
  201. package/src/codegen/handlers/EnableChangeTrackingHandlerBuilder.ts +0 -13
  202. package/src/codegen/handlers/EnrichmentHandlerBuilder.ts +0 -28
  203. package/src/codegen/handlers/FreezeHandlerBuilder.ts +0 -13
  204. package/src/codegen/handlers/HashHandlerBuilder.ts +0 -25
  205. package/src/codegen/handlers/HashTypeHandlerBuilder.ts +0 -11
  206. package/src/codegen/handlers/IdSelectorHandlerBuilder.ts +0 -10
  207. package/src/codegen/handlers/MergeHandlerBuilder.ts +0 -19
  208. package/src/codegen/handlers/PrepareHandlerBuilder.ts +0 -23
  209. package/src/codegen/handlers/SerializeHandlerBuilder.ts +0 -15
  210. package/src/codegen/handlers/StripHandlerBuilder.ts +0 -18
  211. package/src/codegen/handlers/clone/CloneObjectHandler.ts +0 -29
  212. package/src/codegen/handlers/clone/CloneValueHandler.ts +0 -33
  213. package/src/codegen/handlers/compare/CompareObjectHandler.ts +0 -15
  214. package/src/codegen/handlers/compare/CompareValueHandler.ts +0 -27
  215. package/src/codegen/handlers/deserialize/DeserializeComputedValueHandler.ts +0 -16
  216. package/src/codegen/handlers/deserialize/DeserializeDateHandler.ts +0 -45
  217. package/src/codegen/handlers/deserialize/DeserializeFunctionHandler.ts +0 -16
  218. package/src/codegen/handlers/deserialize/DeserializeObjectHandler.ts +0 -29
  219. package/src/codegen/handlers/deserialize/DeserializeValueHandler.ts +0 -33
  220. package/src/codegen/handlers/enableChangeTracking/EnableChangeTrackingObjectHandler.ts +0 -20
  221. package/src/codegen/handlers/enableChangeTracking/EnableChangeTrackingPrimitiveValueHandler.ts +0 -15
  222. package/src/codegen/handlers/enrichment/EnrichmentComputedValueHandler.ts +0 -37
  223. package/src/codegen/handlers/enrichment/EnrichmentDefaultFunctionHandler.ts +0 -50
  224. package/src/codegen/handlers/enrichment/EnrichmentDefaultValueHandler.ts +0 -18
  225. package/src/codegen/handlers/enrichment/EnrichmentFunctionHandler.ts +0 -38
  226. package/src/codegen/handlers/enrichment/EnrichmentNullableObjectHandler.ts +0 -44
  227. package/src/codegen/handlers/enrichment/EnrichmentObjectHandler.ts +0 -29
  228. package/src/codegen/handlers/enrichment/EnrichmentObjectIdentityHandler.ts +0 -16
  229. package/src/codegen/handlers/enrichment/EnrichmentPrimitiveHandler.ts +0 -13
  230. package/src/codegen/handlers/enrichment/EnrichmentPrimitiveIdentityHandler.ts +0 -21
  231. package/src/codegen/handlers/freeze/FreezeObjectHandler.ts +0 -20
  232. package/src/codegen/handlers/freeze/FreezePrimitiveValueHandler.ts +0 -15
  233. package/src/codegen/handlers/hash/HashComputedValueHandler.ts +0 -15
  234. package/src/codegen/handlers/hash/HashDateHandler.ts +0 -26
  235. package/src/codegen/handlers/hash/HashFunctionHandler.ts +0 -16
  236. package/src/codegen/handlers/hash/HashIdentityHandler.ts +0 -15
  237. package/src/codegen/handlers/hash/HashKeyHandler.ts +0 -26
  238. package/src/codegen/handlers/hash/HashValueHandler.ts +0 -26
  239. package/src/codegen/handlers/hashType/HashTypeValueHandler.ts +0 -20
  240. package/src/codegen/handlers/idSelector/IdSelectorValueHandler.ts +0 -28
  241. package/src/codegen/handlers/merge/MergeComputedValueHandler.ts +0 -37
  242. package/src/codegen/handlers/merge/MergeDefaultFunctionHandler.ts +0 -40
  243. package/src/codegen/handlers/merge/MergeDefaultValueHandler.ts +0 -32
  244. package/src/codegen/handlers/merge/MergeFunctionHandler.ts +0 -16
  245. package/src/codegen/handlers/merge/MergePrimitiveHandler.ts +0 -21
  246. package/src/codegen/handlers/prepare/PrepareComputedValueHandler.ts +0 -16
  247. package/src/codegen/handlers/prepare/PrepareFunctionHandler.ts +0 -16
  248. package/src/codegen/handlers/prepare/PrepareIdentityHandler.ts +0 -21
  249. package/src/codegen/handlers/prepare/PrepareKeyHandler.ts +0 -21
  250. package/src/codegen/handlers/prepare/PrepareObjectHandler.ts +0 -38
  251. package/src/codegen/handlers/prepare/PrepareValueHandler.ts +0 -36
  252. package/src/codegen/handlers/serialize/SerializeDateHandler.ts +0 -45
  253. package/src/codegen/handlers/serialize/SerializeObjectHandler.ts +0 -28
  254. package/src/codegen/handlers/serialize/SerializeValueHandler.ts +0 -33
  255. package/src/codegen/handlers/strip/StripIdentityHandler.ts +0 -15
  256. package/src/codegen/handlers/strip/StripKeyHandler.ts +0 -15
  257. package/src/codegen/handlers/strip/StripObjectHandler.ts +0 -35
  258. package/src/codegen/handlers/strip/StripValueHandler.ts +0 -36
  259. package/src/codegen/handlers/types.ts +0 -119
  260. package/src/codegen/types.ts +0 -2
  261. package/src/codegen/utils.ts +0 -74
  262. package/src/collections/Changes.test.ts +0 -337
  263. package/src/collections/Changes.ts +0 -177
  264. package/src/collections/IdSet.ts +0 -28
  265. package/src/collections/MemoryDataCollection.test.ts +0 -424
  266. package/src/collections/MemoryDataCollection.ts +0 -134
  267. package/src/collections/SchemaCollection.ts +0 -22
  268. package/src/collections/TagCollection.test.ts +0 -443
  269. package/src/collections/TagCollection.ts +0 -62
  270. package/src/errors/SchemaError.ts +0 -6
  271. package/src/errors/index.ts +0 -1
  272. package/src/expressions/parser.test.ts +0 -913
  273. package/src/expressions/utils.test.ts +0 -346
  274. package/src/expressions/utils.ts +0 -59
  275. package/src/performance/index.ts +0 -26
  276. package/src/pipeline/SyncronousQueue.test.ts +0 -269
  277. package/src/pipeline/SyncronousQueue.ts +0 -30
  278. package/src/pipeline/TrampolinePipeline.test.ts +0 -374
  279. package/src/pipeline/index.ts +0 -2
  280. package/src/plugins/EphemeralDataPlugin.ts +0 -132
  281. package/src/plugins/capabilities/DbPluginCapability.ts +0 -111
  282. package/src/plugins/capabilities/logging/DbPluginLoggingCapability.ts +0 -261
  283. package/src/plugins/capabilities/logging/index.ts +0 -1
  284. package/src/plugins/query/Query.ts +0 -67
  285. package/src/plugins/query/QueryOptionsCollection.test.ts +0 -86
  286. package/src/plugins/query/QueryOptionsCollection.ts +0 -154
  287. package/src/plugins/replication/OptimisticReplicationDbPlugin.ts +0 -202
  288. package/src/plugins/replication/ReplicationDbPlugin.ts +0 -137
  289. package/src/plugins/translators/DataTranslator.ts +0 -46
  290. package/src/plugins/translators/JsonTranslator.test.ts +0 -618
  291. package/src/plugins/translators/JsonTranslator.ts +0 -211
  292. package/src/plugins/translators/SqlTranslator.ts +0 -45
  293. package/src/results/Result.ts +0 -91
  294. package/src/results/utils.ts +0 -15
  295. package/src/schema/PropertyInfo.test.ts +0 -479
  296. package/src/schema/PropertyInfo.ts +0 -374
  297. package/src/schema/SchemaDefinition.ts +0 -626
  298. package/src/schema/builder.ts +0 -18
  299. package/src/schema/property/base/SchemaBase.ts +0 -49
  300. package/src/schema/property/base/index.ts +0 -1
  301. package/src/schema/property/modifiers/SchemaDefault.ts +0 -29
  302. package/src/schema/property/modifiers/SchemaDeserialize.ts +0 -23
  303. package/src/schema/property/modifiers/SchemaDistinct.ts +0 -14
  304. package/src/schema/property/modifiers/SchemaFrom.ts +0 -54
  305. package/src/schema/property/modifiers/SchemaIdentity.ts +0 -13
  306. package/src/schema/property/modifiers/SchemaIndex.ts +0 -60
  307. package/src/schema/property/modifiers/SchemaKey.ts +0 -28
  308. package/src/schema/property/modifiers/SchemaNullable.ts +0 -18
  309. package/src/schema/property/modifiers/SchemaOptional.ts +0 -19
  310. package/src/schema/property/modifiers/SchemaReadonly.ts +0 -34
  311. package/src/schema/property/modifiers/SchemaSerialize.ts +0 -18
  312. package/src/schema/property/modifiers/SchemaTracked.ts +0 -14
  313. package/src/schema/property/types/SchemaArray.ts +0 -50
  314. package/src/schema/property/types/SchemaBoolean.ts +0 -59
  315. package/src/schema/property/types/SchemaDate.ts +0 -58
  316. package/src/schema/property/types/SchemaNumber.ts +0 -69
  317. package/src/schema/property/types/SchemaObject.ts +0 -44
  318. package/src/schema/property/types/SchemaString.ts +0 -69
  319. package/src/schema/table/SchemaComputed.ts +0 -20
  320. package/src/schema/table/SchemaFunction.ts +0 -15
  321. package/src/utilities/arrays.test.ts +0 -312
  322. package/src/utilities/arrays.ts +0 -12
  323. package/src/utilities/dates.test.ts +0 -388
  324. package/src/utilities/dates.ts +0 -11
  325. package/src/utilities/dbPluginEventUtils.ts +0 -44
  326. package/src/utilities/objects.ts +0 -7
  327. package/src/utilities/queryOptionsCollection.ts +0 -16
  328. package/src/utilities/replication.ts +0 -23
  329. package/src/utilities/runtime.ts +0 -3
  330. package/src/utilities/strings.ts +0 -18
  331. package/src/utilities/types.ts +0 -1
  332. package/src/utilities/uuid.ts +0 -56
  333. package/tsconfig.json +0 -28
  334. package/vitest.config.ts +0 -11
package/package.json CHANGED
@@ -1,12 +1,17 @@
1
1
  {
2
2
  "name": "@routier/core",
3
- "version": "0.0.1-alpha.1",
3
+ "version": "0.0.1-alpha.3",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "source": "./src/index.ts",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
10
+ "files": [
11
+ "dist/**/*",
12
+ "README.md",
13
+ "LICENSE"
14
+ ],
10
15
  "exports": {
11
16
  ".": "./dist/index.js",
12
17
  "./utilities": "./dist/utilities/index.js",
package/readme.md ADDED
@@ -0,0 +1,95 @@
1
+ # Routier
2
+
3
+ <p align="center">
4
+ <img src="docs/assets/routier.svg" alt="Routier" width="140" height="140" />
5
+ </p>
6
+
7
+ > **⚠️ Alpha Release** - This project is currently in alpha. APIs may change between versions. Use with caution in production.
8
+
9
+ A reactive data toolkit for building fast, local-first apps. Define schemas, create collections, use live queries, and make optimistic mutations with a plugin model for any storage.
10
+
11
+ **[📖 View Full Documentation](https://agrejus.github.io/routier/)** - Complete guides, API reference, and tutorials
12
+
13
+ ## Features
14
+
15
+ - **Schema-first**: Type-safe entity definitions with indexes and modifiers
16
+ - **Live queries**: Reactive queries across one or more collections
17
+ - **Optimistic mutations**: Instant UI updates with automatic rollback
18
+ - **Pluggable storage**: Memory, Local Storage, Dexie, SQLite, PouchDB, File System, and more
19
+ - **Change tracking**: Automatic tracking of entity modifications
20
+ - **Performance**: Database-backed filters when possible, in-memory for computed properties
21
+
22
+ ## Quick Start
23
+
24
+ ```bash
25
+ npm install @routier/core @routier/datastore @routier/memory-plugin
26
+ ```
27
+
28
+ ```ts
29
+ import { DataStore } from "@routier/datastore";
30
+ import { MemoryPlugin } from "@routier/memory-plugin";
31
+ import { s } from "@routier/core/schema";
32
+
33
+ // Define a schema
34
+ const userSchema = s
35
+ .define("users", {
36
+ id: s.string().key().identity(),
37
+ name: s.string(),
38
+ email: s.string().distinct(),
39
+ })
40
+ .compile();
41
+
42
+ // Create a datastore with a plugin
43
+ class AppContext extends DataStore {
44
+ constructor() {
45
+ super(new MemoryPlugin("routier-app"));
46
+ }
47
+ users = this.collection(userSchema).create();
48
+ }
49
+
50
+ const ctx = new AppContext();
51
+
52
+ // Add data
53
+ await ctx.users.addAsync({ name: "Ada", email: "ada@example.com" });
54
+ await ctx.saveChangesAsync();
55
+
56
+ // Query with live updates
57
+ ctx.users
58
+ .subscribe()
59
+ .where((u) => u.name.startsWith("A"))
60
+ .toArray((result) => {
61
+ console.log("Live query result:", result);
62
+ });
63
+ ```
64
+
65
+ ## Why Routier?
66
+
67
+ Choosing storage for local-first apps is hard—and the landscape moves fast. Routier separates your domain model from persistence through a small plugin interface:
68
+
69
+ - **Swap storage backends** without changing schemas, queries, or UI
70
+ - **Use any framework/ORM/data store** you want via plugins
71
+ - **Experiment safely**: try a new store by writing a plugin
72
+ - **Fill ORM gaps**: feature-rich and easily extended
73
+
74
+ ## Built-in Plugins
75
+
76
+ - **Memory**: In-memory storage for development and testing
77
+ - **Local Storage**: Browser localStorage/sessionStorage
78
+ - **Dexie**: IndexedDB with Dexie.js
79
+ - **PouchDB**: CouchDB sync and replication
80
+ - **SQLite**: Node.js SQLite integration
81
+ - **File System**: Node.js file-based storage
82
+
83
+ ## Examples
84
+
85
+ - **[Basic Examples](examples/)** - Vite, Rspack, Node.js setups
86
+ - **[Performance Benchmarks](docs/demos/performance-benchmarks/)** - Speed comparisons
87
+ - **[Real-world Apps](docs/examples/real-world/)** - Complete applications
88
+
89
+ ## Contributing
90
+
91
+ Issues and PRs welcome! Please see our [Contributing Guide](docs/CONTRIBUTING.md) or open an issue to discuss changes.
92
+
93
+ ## License
94
+
95
+ MIT
package/CHANGELOG.md DELETED
@@ -1,8 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- ## 0.0.1-alpha.1 (2025-09-18)
7
-
8
- **Note:** Version bump only for package @routier/core
package/rspack.config.mjs DELETED
@@ -1,65 +0,0 @@
1
- import { dirname, resolve } from "node:path";
2
- import { fileURLToPath } from "node:url";
3
- import { defineConfig } from "@rspack/cli";
4
-
5
- const __dirname = dirname(fileURLToPath(import.meta.url));
6
-
7
- export default defineConfig({
8
- entry: {
9
- index: "./src/index.ts",
10
- "utilities/index": "./src/utilities/index.ts",
11
- "results/index": "./src/results/index.ts",
12
- "schema/index": "./src/schema/index.ts",
13
- "pipeline/index": "./src/pipeline/index.ts",
14
- "collections/index": "./src/collections/index.ts",
15
- "assertions/index": "./src/assertions/index.ts",
16
- "plugins/index": "./src/plugins/index.ts",
17
- "expressions/index": "./src/expressions/index.ts",
18
- "errors/index": "./src/errors/index.ts",
19
- "performance/index": "./src/performance/index.ts",
20
- "types/index": "./src/types/index.ts"
21
- },
22
- output: {
23
- path: resolve(__dirname, "dist"),
24
- filename: "[name].js",
25
- library: {
26
- type: "module"
27
- },
28
- globalObject: "this", // Ensures compatibility with both browser and Node.js
29
- clean: true, // Cleans the output directory before each build
30
- },
31
- experiments: {
32
- outputModule: true
33
- },
34
- module: {
35
- rules: [
36
- {
37
- test: /\.ts$/, // Match TypeScript files
38
- use: {
39
- loader: "ts-loader",
40
- options: {
41
- transpileOnly: false, // Ensure type-checking is performed
42
- },
43
- },
44
- exclude: [
45
- /node_modules/,
46
- /\.test\.ts$/, // Exclude test files
47
- ],
48
- },
49
- ],
50
- },
51
- resolve: {
52
- extensions: [".ts", ".js"], // Resolve TypeScript and JavaScript files
53
- fallback: {
54
- "perf_hooks": false
55
- }
56
- },
57
- target: "web", // Compile for both browser and Node.js
58
- externals: {
59
- // Define external dependencies to avoid bundling them
60
- // e.g., for lodash: "lodash": "lodash"
61
- "perf_hooks": "perf_hooks"
62
- },
63
- mode: "development", // Set production mode
64
- devtool: "source-map"
65
- });
@@ -1,37 +0,0 @@
1
- import { isDate } from "../utilities";
2
-
3
- export function assertDate(data: unknown): asserts data is Date {
4
- if (isDate(data) === false) {
5
- throw new TypeError('Value is not a Date');
6
- }
7
- }
8
-
9
- export function assertIsNotNull<T>(data: T | null | undefined, message?: string): asserts data is NonNullable<T> {
10
- if (data == null) {
11
- throw new TypeError(message ?? 'Assertion failed, data is null');
12
- }
13
- }
14
-
15
- export function assertIsArray<T>(data: unknown, message?: string): asserts data is T[] {
16
- if (!Array.isArray(data)) {
17
- throw new TypeError(message ?? 'Assertion failed, data is not of type Array');
18
- }
19
- }
20
-
21
- export function assertString(data: unknown, message?: string): asserts data is string {
22
- if (typeof data !== "string") {
23
- throw new TypeError(message ?? 'Assertion failed, data is not of type String');
24
- }
25
- }
26
-
27
- export function assertInstanceOf<T extends new (...args: any[]) => any>(value: unknown, Instance: T): asserts value is T {
28
- if (value instanceof Instance) {
29
- return;
30
- }
31
-
32
- if (value != null && typeof value === "object" && "constructor" in value) {
33
- throw new TypeError(`Value is not instance of type. Type: ${value.constructor.name}`);
34
- }
35
-
36
- throw new TypeError(`Value is not instance of type`);
37
- }
@@ -1,20 +0,0 @@
1
- export class SlotPath {
2
-
3
- private _path: string[];
4
-
5
- get path() {
6
- return [...this._path]
7
- }
8
-
9
- constructor(...pathLike: string[]) {
10
- this._path = pathLike;
11
- }
12
-
13
- push(...pathLike: string[]) {
14
- this._path.push(...pathLike);
15
- }
16
-
17
- get(up: number = 0) {
18
- return this._path.slice(0, this._path.length - up).join(".")
19
- }
20
- }