@typetron/framework 0.5.22 → 0.5.25

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 (882) hide show
  1. package/build/Cache/Cache.d.ts +9 -0
  2. package/build/Cache/Cache.d.ts.map +1 -0
  3. package/build/Cache/Cache.js +7 -0
  4. package/build/Cache/Cache.js.map +1 -0
  5. package/build/Cache/Stores/DatabaseStore.d.ts +16 -0
  6. package/build/Cache/Stores/DatabaseStore.d.ts.map +1 -0
  7. package/build/Cache/Stores/DatabaseStore.js +105 -0
  8. package/build/Cache/Stores/DatabaseStore.js.map +1 -0
  9. package/build/Cache/Stores/FileStore.d.ts +16 -0
  10. package/build/Cache/Stores/FileStore.d.ts.map +1 -0
  11. package/build/Cache/Stores/FileStore.js +65 -0
  12. package/build/Cache/Stores/FileStore.js.map +1 -0
  13. package/build/Cache/Stores/MemoryStore.d.ts +13 -0
  14. package/build/Cache/Stores/MemoryStore.d.ts.map +1 -0
  15. package/build/Cache/Stores/MemoryStore.js +57 -0
  16. package/build/Cache/Stores/MemoryStore.js.map +1 -0
  17. package/build/Cache/index.d.ts +6 -0
  18. package/build/Cache/index.d.ts.map +1 -0
  19. package/build/Cache/index.js +22 -0
  20. package/build/Cache/index.js.map +1 -0
  21. package/build/Cache/types.d.ts +5 -0
  22. package/build/Cache/types.d.ts.map +1 -0
  23. package/build/Cache/types.js +3 -0
  24. package/build/Cache/types.js.map +1 -0
  25. package/build/Container/ClassResolver.d.ts +9 -0
  26. package/build/Container/ClassResolver.d.ts.map +1 -0
  27. package/build/Container/ClassResolver.js +93 -0
  28. package/build/Container/ClassResolver.js.map +1 -0
  29. package/build/Container/Container.d.ts +26 -0
  30. package/build/Container/Container.d.ts.map +1 -0
  31. package/build/Container/Container.js +132 -0
  32. package/build/Container/Container.js.map +1 -0
  33. package/build/Container/Contracts.d.ts +3 -0
  34. package/build/Container/Contracts.d.ts.map +1 -0
  35. package/build/Container/Contracts.js +3 -0
  36. package/build/Container/Contracts.js.map +1 -0
  37. package/build/Container/Decorators.d.ts +5 -0
  38. package/build/Container/Decorators.d.ts.map +1 -0
  39. package/build/Container/Decorators.js +21 -0
  40. package/build/Container/Decorators.js.map +1 -0
  41. package/build/Container/Metadata.d.ts +22 -0
  42. package/build/Container/Metadata.d.ts.map +1 -0
  43. package/build/Container/Metadata.js +18 -0
  44. package/build/Container/Metadata.js.map +1 -0
  45. package/build/Container/Resolver.d.ts +19 -0
  46. package/build/Container/Resolver.d.ts.map +1 -0
  47. package/build/Container/Resolver.js +17 -0
  48. package/build/Container/Resolver.js.map +1 -0
  49. package/build/Container/index.d.ts +6 -0
  50. package/build/Container/index.d.ts.map +1 -0
  51. package/build/Container/index.js +22 -0
  52. package/build/Container/index.js.map +1 -0
  53. package/build/Database/Clauses/Where.d.ts +1 -0
  54. package/build/Database/Clauses/Where.d.ts.map +1 -0
  55. package/build/Database/Clauses/Where.js +2 -0
  56. package/build/Database/Clauses/Where.js.map +1 -0
  57. package/build/Database/Connection.d.ts +21 -0
  58. package/build/Database/Connection.d.ts.map +1 -0
  59. package/build/Database/Connection.js +44 -0
  60. package/build/Database/Connection.js.map +1 -0
  61. package/build/Database/Decorators.d.ts +36 -0
  62. package/build/Database/Decorators.d.ts.map +1 -0
  63. package/build/Database/Decorators.js +116 -0
  64. package/build/Database/Decorators.js.map +1 -0
  65. package/build/Database/Drivers/DatabaseDriver.d.ts +29 -0
  66. package/build/Database/Drivers/DatabaseDriver.d.ts.map +1 -0
  67. package/build/Database/Drivers/DatabaseDriver.js +7 -0
  68. package/build/Database/Drivers/DatabaseDriver.js.map +1 -0
  69. package/build/Database/Drivers/MySQL/Alter/index.d.ts +34 -0
  70. package/build/Database/Drivers/MySQL/Alter/index.d.ts.map +1 -0
  71. package/build/Database/Drivers/MySQL/Alter/index.js +70 -0
  72. package/build/Database/Drivers/MySQL/Alter/index.js.map +1 -0
  73. package/build/Database/Drivers/MySQL/ColumnDefinition.d.ts +7 -0
  74. package/build/Database/Drivers/MySQL/ColumnDefinition.d.ts.map +1 -0
  75. package/build/Database/Drivers/MySQL/ColumnDefinition.js +19 -0
  76. package/build/Database/Drivers/MySQL/ColumnDefinition.js.map +1 -0
  77. package/build/Database/Drivers/MySQL/Create.d.ts +10 -0
  78. package/build/Database/Drivers/MySQL/Create.d.ts.map +1 -0
  79. package/build/Database/Drivers/MySQL/Create.js +44 -0
  80. package/build/Database/Drivers/MySQL/Create.js.map +1 -0
  81. package/build/Database/Drivers/MySQL/MysqlDriver.d.ts +42 -0
  82. package/build/Database/Drivers/MySQL/MysqlDriver.d.ts.map +1 -0
  83. package/build/Database/Drivers/MySQL/MysqlDriver.js +93 -0
  84. package/build/Database/Drivers/MySQL/MysqlDriver.js.map +1 -0
  85. package/build/Database/Drivers/MySQL/Schema.d.ts +16 -0
  86. package/build/Database/Drivers/MySQL/Schema.d.ts.map +1 -0
  87. package/build/Database/Drivers/MySQL/Schema.js +67 -0
  88. package/build/Database/Drivers/MySQL/Schema.js.map +1 -0
  89. package/build/Database/Drivers/MySQL/index.d.ts +2 -0
  90. package/build/Database/Drivers/MySQL/index.d.ts.map +1 -0
  91. package/build/Database/Drivers/MySQL/index.js +16 -0
  92. package/build/Database/Drivers/MySQL/index.js.map +1 -0
  93. package/build/Database/Drivers/SQL/Schema.d.ts +7 -0
  94. package/build/Database/Drivers/SQL/Schema.d.ts.map +1 -0
  95. package/build/Database/Drivers/SQL/Schema.js +58 -0
  96. package/build/Database/Drivers/SQL/Schema.js.map +1 -0
  97. package/build/Database/Drivers/SQL/Statements/Alter.d.ts +8 -0
  98. package/build/Database/Drivers/SQL/Statements/Alter.d.ts.map +1 -0
  99. package/build/Database/Drivers/SQL/Statements/Alter.js +22 -0
  100. package/build/Database/Drivers/SQL/Statements/Alter.js.map +1 -0
  101. package/build/Database/Drivers/SQL/Statements/BaseStatement.d.ts +13 -0
  102. package/build/Database/Drivers/SQL/Statements/BaseStatement.d.ts.map +1 -0
  103. package/build/Database/Drivers/SQL/Statements/BaseStatement.js +46 -0
  104. package/build/Database/Drivers/SQL/Statements/BaseStatement.js.map +1 -0
  105. package/build/Database/Drivers/SQL/Statements/Delete.d.ts +6 -0
  106. package/build/Database/Drivers/SQL/Statements/Delete.d.ts.map +1 -0
  107. package/build/Database/Drivers/SQL/Statements/Delete.js +20 -0
  108. package/build/Database/Drivers/SQL/Statements/Delete.js.map +1 -0
  109. package/build/Database/Drivers/SQL/Statements/Insert.d.ts +7 -0
  110. package/build/Database/Drivers/SQL/Statements/Insert.d.ts.map +1 -0
  111. package/build/Database/Drivers/SQL/Statements/Insert.js +24 -0
  112. package/build/Database/Drivers/SQL/Statements/Insert.js.map +1 -0
  113. package/build/Database/Drivers/SQL/Statements/Select.d.ts +8 -0
  114. package/build/Database/Drivers/SQL/Statements/Select.d.ts.map +1 -0
  115. package/build/Database/Drivers/SQL/Statements/Select.js +51 -0
  116. package/build/Database/Drivers/SQL/Statements/Select.js.map +1 -0
  117. package/build/Database/Drivers/SQL/Statements/Update.d.ts +7 -0
  118. package/build/Database/Drivers/SQL/Statements/Update.d.ts.map +1 -0
  119. package/build/Database/Drivers/SQL/Statements/Update.js +33 -0
  120. package/build/Database/Drivers/SQL/Statements/Update.js.map +1 -0
  121. package/build/Database/Drivers/SQL/index.d.ts +9 -0
  122. package/build/Database/Drivers/SQL/index.d.ts.map +1 -0
  123. package/build/Database/Drivers/SQL/index.js +3 -0
  124. package/build/Database/Drivers/SQL/index.js.map +1 -0
  125. package/build/Database/Drivers/SQLite/Create.d.ts +10 -0
  126. package/build/Database/Drivers/SQLite/Create.d.ts.map +1 -0
  127. package/build/Database/Drivers/SQLite/Create.js +43 -0
  128. package/build/Database/Drivers/SQLite/Create.js.map +1 -0
  129. package/build/Database/Drivers/SQLite/Schema.d.ts +16 -0
  130. package/build/Database/Drivers/SQLite/Schema.d.ts.map +1 -0
  131. package/build/Database/Drivers/SQLite/Schema.js +49 -0
  132. package/build/Database/Drivers/SQLite/Schema.js.map +1 -0
  133. package/build/Database/Drivers/SQLite/SqliteDriver.d.ts +43 -0
  134. package/build/Database/Drivers/SQLite/SqliteDriver.d.ts.map +1 -0
  135. package/build/Database/Drivers/SQLite/SqliteDriver.js +115 -0
  136. package/build/Database/Drivers/SQLite/SqliteDriver.js.map +1 -0
  137. package/build/Database/Drivers/SQLite/index.d.ts +3 -0
  138. package/build/Database/Drivers/SQLite/index.d.ts.map +1 -0
  139. package/build/Database/Drivers/SQLite/index.js +31 -0
  140. package/build/Database/Drivers/SQLite/index.js.map +1 -0
  141. package/build/Database/Drivers/SchemaContract.d.ts +9 -0
  142. package/build/Database/Drivers/SchemaContract.d.ts.map +1 -0
  143. package/build/Database/Drivers/SchemaContract.js +11 -0
  144. package/build/Database/Drivers/SchemaContract.js.map +1 -0
  145. package/build/Database/Drivers/Statement.d.ts +10 -0
  146. package/build/Database/Drivers/Statement.d.ts.map +1 -0
  147. package/build/Database/Drivers/Statement.js +17 -0
  148. package/build/Database/Drivers/Statement.js.map +1 -0
  149. package/build/Database/Drivers/index.d.ts +5 -0
  150. package/build/Database/Drivers/index.d.ts.map +1 -0
  151. package/build/Database/Drivers/index.js +21 -0
  152. package/build/Database/Drivers/index.js.map +1 -0
  153. package/build/Database/Entity.d.ts +64 -0
  154. package/build/Database/Entity.d.ts.map +1 -0
  155. package/build/Database/Entity.js +243 -0
  156. package/build/Database/Entity.js.map +1 -0
  157. package/build/Database/EntityNotFoundError.d.ts +6 -0
  158. package/build/Database/EntityNotFoundError.d.ts.map +1 -0
  159. package/build/Database/EntityNotFoundError.js +12 -0
  160. package/build/Database/EntityNotFoundError.js.map +1 -0
  161. package/build/Database/EntityProxyHandler.d.ts +6 -0
  162. package/build/Database/EntityProxyHandler.d.ts.map +1 -0
  163. package/build/Database/EntityProxyHandler.js +40 -0
  164. package/build/Database/EntityProxyHandler.js.map +1 -0
  165. package/build/Database/EntityQuery.d.ts +29 -0
  166. package/build/Database/EntityQuery.d.ts.map +1 -0
  167. package/build/Database/EntityQuery.js +158 -0
  168. package/build/Database/EntityQuery.js.map +1 -0
  169. package/build/Database/Expression.d.ts +4 -0
  170. package/build/Database/Expression.d.ts.map +1 -0
  171. package/build/Database/Expression.js +7 -0
  172. package/build/Database/Expression.js.map +1 -0
  173. package/build/Database/Fields.d.ts +156 -0
  174. package/build/Database/Fields.d.ts.map +1 -0
  175. package/build/Database/Fields.js +564 -0
  176. package/build/Database/Fields.js.map +1 -0
  177. package/build/Database/Helpers.d.ts +2 -0
  178. package/build/Database/Helpers.d.ts.map +1 -0
  179. package/build/Database/Helpers.js +16 -0
  180. package/build/Database/Helpers.js.map +1 -0
  181. package/build/Database/List.d.ts +24 -0
  182. package/build/Database/List.d.ts.map +1 -0
  183. package/build/Database/List.js +48 -0
  184. package/build/Database/List.js.map +1 -0
  185. package/build/Database/Migrations/Migration.d.ts +8 -0
  186. package/build/Database/Migrations/Migration.d.ts.map +1 -0
  187. package/build/Database/Migrations/Migration.js +11 -0
  188. package/build/Database/Migrations/Migration.js.map +1 -0
  189. package/build/Database/Migrations/MigrationHistory.d.ts +9 -0
  190. package/build/Database/Migrations/MigrationHistory.d.ts.map +1 -0
  191. package/build/Database/Migrations/MigrationHistory.js +43 -0
  192. package/build/Database/Migrations/MigrationHistory.js.map +1 -0
  193. package/build/Database/Migrations/Migrator.d.ts +21 -0
  194. package/build/Database/Migrations/Migrator.d.ts.map +1 -0
  195. package/build/Database/Migrations/Migrator.js +135 -0
  196. package/build/Database/Migrations/Migrator.js.map +1 -0
  197. package/build/Database/Migrations/index.d.ts +4 -0
  198. package/build/Database/Migrations/index.d.ts.map +1 -0
  199. package/build/Database/Migrations/index.js +20 -0
  200. package/build/Database/Migrations/index.js.map +1 -0
  201. package/build/Database/ORM/BaseRelationship.d.ts +8 -0
  202. package/build/Database/ORM/BaseRelationship.d.ts.map +1 -0
  203. package/build/Database/ORM/BaseRelationship.js +13 -0
  204. package/build/Database/ORM/BaseRelationship.js.map +1 -0
  205. package/build/Database/Query.d.ts +63 -0
  206. package/build/Database/Query.d.ts.map +1 -0
  207. package/build/Database/Query.js +264 -0
  208. package/build/Database/Query.js.map +1 -0
  209. package/build/Database/Seeders/Seeder.d.ts +4 -0
  210. package/build/Database/Seeders/Seeder.d.ts.map +1 -0
  211. package/build/Database/Seeders/Seeder.js +7 -0
  212. package/build/Database/Seeders/Seeder.js.map +1 -0
  213. package/build/Database/Seeders/SeederManager.d.ts +9 -0
  214. package/build/Database/Seeders/SeederManager.d.ts.map +1 -0
  215. package/build/Database/Seeders/SeederManager.js +27 -0
  216. package/build/Database/Seeders/SeederManager.js.map +1 -0
  217. package/build/Database/Seeders/index.d.ts +3 -0
  218. package/build/Database/Seeders/index.d.ts.map +1 -0
  219. package/build/Database/Seeders/index.js +19 -0
  220. package/build/Database/Seeders/index.js.map +1 -0
  221. package/build/Database/StringExpression.d.ts +7 -0
  222. package/build/Database/StringExpression.d.ts.map +1 -0
  223. package/build/Database/StringExpression.js +16 -0
  224. package/build/Database/StringExpression.js.map +1 -0
  225. package/build/Database/Types.d.ts +118 -0
  226. package/build/Database/Types.d.ts.map +1 -0
  227. package/build/Database/Types.js +106 -0
  228. package/build/Database/Types.js.map +1 -0
  229. package/build/Database/index.d.ts +21 -0
  230. package/build/Database/index.d.ts.map +1 -0
  231. package/build/Database/index.js +25 -0
  232. package/build/Database/index.js.map +1 -0
  233. package/build/Encryption/index.d.ts +15 -0
  234. package/build/Encryption/index.d.ts.map +1 -0
  235. package/build/Encryption/index.js +68 -0
  236. package/build/Encryption/index.js.map +1 -0
  237. package/build/Forms/Decorators.d.ts +7 -0
  238. package/build/Forms/Decorators.d.ts.map +1 -0
  239. package/build/Forms/Decorators.js +29 -0
  240. package/build/Forms/Decorators.js.map +1 -0
  241. package/build/Forms/Form.d.ts +18 -0
  242. package/build/Forms/Form.d.ts.map +1 -0
  243. package/build/Forms/Form.js +68 -0
  244. package/build/Forms/Form.js.map +1 -0
  245. package/build/Forms/FormFields.d.ts +10 -0
  246. package/build/Forms/FormFields.d.ts.map +1 -0
  247. package/build/Forms/FormFields.js +39 -0
  248. package/build/Forms/FormFields.js.map +1 -0
  249. package/build/Forms/index.d.ts +4 -0
  250. package/build/Forms/index.d.ts.map +1 -0
  251. package/build/Forms/index.js +20 -0
  252. package/build/Forms/index.js.map +1 -0
  253. package/build/Framework/App.d.ts +7 -0
  254. package/build/Framework/App.d.ts.map +1 -0
  255. package/build/Framework/App.js +11 -0
  256. package/build/Framework/App.js.map +1 -0
  257. package/build/Framework/Application.d.ts +17 -0
  258. package/build/Framework/Application.d.ts.map +1 -0
  259. package/build/Framework/Application.js +94 -0
  260. package/build/Framework/Application.js.map +1 -0
  261. package/build/Framework/Auth/Auth.d.ts +24 -0
  262. package/build/Framework/Auth/Auth.d.ts.map +1 -0
  263. package/build/Framework/Auth/Auth.js +116 -0
  264. package/build/Framework/Auth/Auth.js.map +1 -0
  265. package/build/Framework/Auth/Authenticatable.d.ts +7 -0
  266. package/build/Framework/Auth/Authenticatable.d.ts.map +1 -0
  267. package/build/Framework/Auth/Authenticatable.js +3 -0
  268. package/build/Framework/Auth/Authenticatable.js.map +1 -0
  269. package/build/Framework/Auth/User.d.ts +11 -0
  270. package/build/Framework/Auth/User.d.ts.map +1 -0
  271. package/build/Framework/Auth/User.js +41 -0
  272. package/build/Framework/Auth/User.js.map +1 -0
  273. package/build/Framework/Auth/index.d.ts +6 -0
  274. package/build/Framework/Auth/index.d.ts.map +1 -0
  275. package/build/Framework/Auth/index.js +44 -0
  276. package/build/Framework/Auth/index.js.map +1 -0
  277. package/build/Framework/Config/AppConfig.d.ts +26 -0
  278. package/build/Framework/Config/AppConfig.d.ts.map +1 -0
  279. package/build/Framework/Config/AppConfig.js +20 -0
  280. package/build/Framework/Config/AppConfig.js.map +1 -0
  281. package/build/Framework/Config/AuthConfig.d.ts +11 -0
  282. package/build/Framework/Config/AuthConfig.d.ts.map +1 -0
  283. package/build/Framework/Config/AuthConfig.js +13 -0
  284. package/build/Framework/Config/AuthConfig.js.map +1 -0
  285. package/build/Framework/Config/BaseConfig.d.ts +7 -0
  286. package/build/Framework/Config/BaseConfig.d.ts.map +1 -0
  287. package/build/Framework/Config/BaseConfig.js +14 -0
  288. package/build/Framework/Config/BaseConfig.js.map +1 -0
  289. package/build/Framework/Config/CacheConfig.d.ts +16 -0
  290. package/build/Framework/Config/CacheConfig.d.ts.map +1 -0
  291. package/build/Framework/Config/CacheConfig.js +37 -0
  292. package/build/Framework/Config/CacheConfig.js.map +1 -0
  293. package/build/Framework/Config/DatabaseConfig.d.ts +11 -0
  294. package/build/Framework/Config/DatabaseConfig.d.ts.map +1 -0
  295. package/build/Framework/Config/DatabaseConfig.js +23 -0
  296. package/build/Framework/Config/DatabaseConfig.js.map +1 -0
  297. package/build/Framework/Config/MailConfig.d.ts +19 -0
  298. package/build/Framework/Config/MailConfig.d.ts.map +1 -0
  299. package/build/Framework/Config/MailConfig.js +11 -0
  300. package/build/Framework/Config/MailConfig.js.map +1 -0
  301. package/build/Framework/Config/index.d.ts +7 -0
  302. package/build/Framework/Config/index.d.ts.map +1 -0
  303. package/build/Framework/Config/index.js +23 -0
  304. package/build/Framework/Config/index.js.map +1 -0
  305. package/build/Framework/Middleware/AuthMiddleware.d.ts +9 -0
  306. package/build/Framework/Middleware/AuthMiddleware.d.ts.map +1 -0
  307. package/build/Framework/Middleware/AuthMiddleware.js +78 -0
  308. package/build/Framework/Middleware/AuthMiddleware.js.map +1 -0
  309. package/build/Framework/Middleware/CorsMiddleware.d.ts +8 -0
  310. package/build/Framework/Middleware/CorsMiddleware.d.ts.map +1 -0
  311. package/build/Framework/Middleware/CorsMiddleware.js +47 -0
  312. package/build/Framework/Middleware/CorsMiddleware.js.map +1 -0
  313. package/build/Framework/Middleware/StaticAssetsMiddleware.d.ts +16 -0
  314. package/build/Framework/Middleware/StaticAssetsMiddleware.d.ts.map +1 -0
  315. package/build/Framework/Middleware/StaticAssetsMiddleware.js +120 -0
  316. package/build/Framework/Middleware/StaticAssetsMiddleware.js.map +1 -0
  317. package/build/Framework/Middleware/index.d.ts +3 -0
  318. package/build/Framework/Middleware/index.d.ts.map +1 -0
  319. package/build/Framework/Middleware/index.js +19 -0
  320. package/build/Framework/Middleware/index.js.map +1 -0
  321. package/build/Framework/Provider.d.ts +6 -0
  322. package/build/Framework/Provider.d.ts.map +1 -0
  323. package/build/Framework/Provider.js +22 -0
  324. package/build/Framework/Provider.js.map +1 -0
  325. package/build/Framework/Providers/CacheProvider.d.ts +7 -0
  326. package/build/Framework/Providers/CacheProvider.d.ts.map +1 -0
  327. package/build/Framework/Providers/CacheProvider.js +40 -0
  328. package/build/Framework/Providers/CacheProvider.js.map +1 -0
  329. package/build/Framework/Providers/DatabaseProvider.d.ts +10 -0
  330. package/build/Framework/Providers/DatabaseProvider.d.ts.map +1 -0
  331. package/build/Framework/Providers/DatabaseProvider.js +80 -0
  332. package/build/Framework/Providers/DatabaseProvider.js.map +1 -0
  333. package/build/Framework/Providers/MailProvider.d.ts +7 -0
  334. package/build/Framework/Providers/MailProvider.d.ts.map +1 -0
  335. package/build/Framework/Providers/MailProvider.js +41 -0
  336. package/build/Framework/Providers/MailProvider.js.map +1 -0
  337. package/build/Framework/Providers/WebsocketsProvider.d.ts +12 -0
  338. package/build/Framework/Providers/WebsocketsProvider.d.ts.map +1 -0
  339. package/build/Framework/Providers/WebsocketsProvider.js +144 -0
  340. package/build/Framework/Providers/WebsocketsProvider.js.map +1 -0
  341. package/build/Framework/Resolvers/AuthResolver.d.ts +6 -0
  342. package/build/Framework/Resolvers/AuthResolver.d.ts.map +1 -0
  343. package/build/Framework/Resolvers/AuthResolver.js +19 -0
  344. package/build/Framework/Resolvers/AuthResolver.js.map +1 -0
  345. package/build/Framework/Resolvers/EntityResolver.d.ts +10 -0
  346. package/build/Framework/Resolvers/EntityResolver.d.ts.map +1 -0
  347. package/build/Framework/Resolvers/EntityResolver.js +40 -0
  348. package/build/Framework/Resolvers/EntityResolver.js.map +1 -0
  349. package/build/Framework/Resolvers/FormResolver.d.ts +10 -0
  350. package/build/Framework/Resolvers/FormResolver.d.ts.map +1 -0
  351. package/build/Framework/Resolvers/FormResolver.js +34 -0
  352. package/build/Framework/Resolvers/FormResolver.js.map +1 -0
  353. package/build/Framework/RootDir.d.ts +3 -0
  354. package/build/Framework/RootDir.d.ts.map +1 -0
  355. package/build/Framework/RootDir.js +7 -0
  356. package/build/Framework/RootDir.js.map +1 -0
  357. package/build/Framework/index.d.ts +9 -0
  358. package/build/Framework/index.d.ts.map +1 -0
  359. package/build/Framework/index.js +25 -0
  360. package/build/Framework/index.js.map +1 -0
  361. package/build/Mail/MailAddress.d.ts +5 -0
  362. package/build/Mail/MailAddress.d.ts.map +1 -0
  363. package/build/Mail/MailAddress.js +3 -0
  364. package/build/Mail/MailAddress.js.map +1 -0
  365. package/build/Mail/MailTransport.d.ts +6 -0
  366. package/build/Mail/MailTransport.d.ts.map +1 -0
  367. package/build/Mail/MailTransport.js +7 -0
  368. package/build/Mail/MailTransport.js.map +1 -0
  369. package/build/Mail/Mailable.d.ts +18 -0
  370. package/build/Mail/Mailable.d.ts.map +1 -0
  371. package/build/Mail/Mailable.js +17 -0
  372. package/build/Mail/Mailable.js.map +1 -0
  373. package/build/Mail/Mailer.d.ts +12 -0
  374. package/build/Mail/Mailer.d.ts.map +1 -0
  375. package/build/Mail/Mailer.js +27 -0
  376. package/build/Mail/Mailer.js.map +1 -0
  377. package/build/Mail/PendingMail.d.ts +30 -0
  378. package/build/Mail/PendingMail.d.ts.map +1 -0
  379. package/build/Mail/PendingMail.js +54 -0
  380. package/build/Mail/PendingMail.js.map +1 -0
  381. package/build/Mail/SentMessage.d.ts +16 -0
  382. package/build/Mail/SentMessage.d.ts.map +1 -0
  383. package/build/Mail/SentMessage.js +20 -0
  384. package/build/Mail/SentMessage.js.map +1 -0
  385. package/build/Mail/Transports/MemoryTransport.d.ts +8 -0
  386. package/build/Mail/Transports/MemoryTransport.d.ts.map +1 -0
  387. package/build/Mail/Transports/MemoryTransport.js +15 -0
  388. package/build/Mail/Transports/MemoryTransport.js.map +1 -0
  389. package/build/Mail/Transports/SendGridTransport.d.ts +11 -0
  390. package/build/Mail/Transports/SendGridTransport.d.ts.map +1 -0
  391. package/build/Mail/Transports/SendGridTransport.js +106 -0
  392. package/build/Mail/Transports/SendGridTransport.js.map +1 -0
  393. package/build/Mail/index.d.ts +4 -0
  394. package/build/Mail/index.d.ts.map +1 -0
  395. package/build/Mail/index.js +20 -0
  396. package/build/Mail/index.js.map +1 -0
  397. package/build/Models/Model.d.ts +10 -0
  398. package/build/Models/Model.d.ts.map +1 -0
  399. package/build/Models/Model.js +36 -0
  400. package/build/Models/Model.js.map +1 -0
  401. package/build/Models/index.d.ts +22 -0
  402. package/build/Models/index.d.ts.map +1 -0
  403. package/build/Models/index.js +64 -0
  404. package/build/Models/index.js.map +1 -0
  405. package/build/Router/BaseController.d.ts +5 -0
  406. package/build/Router/BaseController.d.ts.map +1 -0
  407. package/build/Router/BaseController.js +22 -0
  408. package/build/Router/BaseController.js.map +1 -0
  409. package/build/Router/Decorators.d.ts +19 -0
  410. package/build/Router/Decorators.d.ts.map +1 -0
  411. package/build/Router/Decorators.js +175 -0
  412. package/build/Router/Decorators.js.map +1 -0
  413. package/build/Router/Guard.d.ts +5 -0
  414. package/build/Router/Guard.d.ts.map +1 -0
  415. package/build/Router/Guard.js +11 -0
  416. package/build/Router/Guard.js.map +1 -0
  417. package/build/Router/Http/Contracts.d.ts +4 -0
  418. package/build/Router/Http/Contracts.d.ts.map +1 -0
  419. package/build/Router/Http/Contracts.js +3 -0
  420. package/build/Router/Http/Contracts.js.map +1 -0
  421. package/build/Router/Http/ErrorHandler.d.ts +10 -0
  422. package/build/Router/Http/ErrorHandler.d.ts.map +1 -0
  423. package/build/Router/Http/ErrorHandler.js +53 -0
  424. package/build/Router/Http/ErrorHandler.js.map +1 -0
  425. package/build/Router/Http/ErrorHandlerInterface.d.ts +6 -0
  426. package/build/Router/Http/ErrorHandlerInterface.d.ts.map +1 -0
  427. package/build/Router/Http/ErrorHandlerInterface.js +8 -0
  428. package/build/Router/Http/ErrorHandlerInterface.js.map +1 -0
  429. package/build/Router/Http/Errors/HttpError.d.ts +8 -0
  430. package/build/Router/Http/Errors/HttpError.d.ts.map +1 -0
  431. package/build/Router/Http/Errors/HttpError.js +18 -0
  432. package/build/Router/Http/Errors/HttpError.js.map +1 -0
  433. package/build/Router/Http/Handler.d.ts +19 -0
  434. package/build/Router/Http/Handler.d.ts.map +1 -0
  435. package/build/Router/Http/Handler.js +164 -0
  436. package/build/Router/Http/Handler.js.map +1 -0
  437. package/build/Router/Http/HttpRoute.d.ts +25 -0
  438. package/build/Router/Http/HttpRoute.d.ts.map +1 -0
  439. package/build/Router/Http/HttpRoute.js +97 -0
  440. package/build/Router/Http/HttpRoute.js.map +1 -0
  441. package/build/Router/Http/Middleware.d.ts +7 -0
  442. package/build/Router/Http/Middleware.d.ts.map +1 -0
  443. package/build/Router/Http/Middleware.js +8 -0
  444. package/build/Router/Http/Middleware.js.map +1 -0
  445. package/build/Router/Http/Request.d.ts +38 -0
  446. package/build/Router/Http/Request.d.ts.map +1 -0
  447. package/build/Router/Http/Request.js +211 -0
  448. package/build/Router/Http/Request.js.map +1 -0
  449. package/build/Router/Http/Response.d.ts +14 -0
  450. package/build/Router/Http/Response.d.ts.map +1 -0
  451. package/build/Router/Http/Response.js +31 -0
  452. package/build/Router/Http/Response.js.map +1 -0
  453. package/build/Router/Http/index.d.ts +84 -0
  454. package/build/Router/Http/index.d.ts.map +1 -0
  455. package/build/Router/Http/index.js +104 -0
  456. package/build/Router/Http/index.js.map +1 -0
  457. package/build/Router/Metadata.d.ts +41 -0
  458. package/build/Router/Metadata.d.ts.map +1 -0
  459. package/build/Router/Metadata.js +33 -0
  460. package/build/Router/Metadata.js.map +1 -0
  461. package/build/Router/Middleware.d.ts +13 -0
  462. package/build/Router/Middleware.d.ts.map +1 -0
  463. package/build/Router/Middleware.js +7 -0
  464. package/build/Router/Middleware.js.map +1 -0
  465. package/build/Router/Request.d.ts +24 -0
  466. package/build/Router/Request.d.ts.map +1 -0
  467. package/build/Router/Request.js +44 -0
  468. package/build/Router/Request.js.map +1 -0
  469. package/build/Router/Route.d.ts +13 -0
  470. package/build/Router/Route.d.ts.map +1 -0
  471. package/build/Router/Route.js +20 -0
  472. package/build/Router/Route.js.map +1 -0
  473. package/build/Router/RouteNotFoundError.d.ts +4 -0
  474. package/build/Router/RouteNotFoundError.d.ts.map +1 -0
  475. package/build/Router/RouteNotFoundError.js +10 -0
  476. package/build/Router/RouteNotFoundError.js.map +1 -0
  477. package/build/Router/Router.d.ts +19 -0
  478. package/build/Router/Router.d.ts.map +1 -0
  479. package/build/Router/Router.js +36 -0
  480. package/build/Router/Router.js.map +1 -0
  481. package/build/Router/Servers/index.d.ts +5 -0
  482. package/build/Router/Servers/index.d.ts.map +1 -0
  483. package/build/Router/Servers/index.js +19 -0
  484. package/build/Router/Servers/index.js.map +1 -0
  485. package/build/Router/Servers/node.d.ts +3 -0
  486. package/build/Router/Servers/node.d.ts.map +1 -0
  487. package/build/Router/Servers/node.js +41 -0
  488. package/build/Router/Servers/node.js.map +1 -0
  489. package/build/Router/Servers/uNetworking.d.ts +3 -0
  490. package/build/Router/Servers/uNetworking.d.ts.map +1 -0
  491. package/build/Router/Servers/uNetworking.js +172 -0
  492. package/build/Router/Servers/uNetworking.js.map +1 -0
  493. package/build/Router/Websockets/Handler.d.ts +15 -0
  494. package/build/Router/Websockets/Handler.d.ts.map +1 -0
  495. package/build/Router/Websockets/Handler.js +70 -0
  496. package/build/Router/Websockets/Handler.js.map +1 -0
  497. package/build/Router/Websockets/Middleware.d.ts +7 -0
  498. package/build/Router/Websockets/Middleware.d.ts.map +1 -0
  499. package/build/Router/Websockets/Middleware.js +8 -0
  500. package/build/Router/Websockets/Middleware.js.map +1 -0
  501. package/build/Router/Websockets/Request.d.ts +4 -0
  502. package/build/Router/Websockets/Request.d.ts.map +1 -0
  503. package/build/Router/Websockets/Request.js +8 -0
  504. package/build/Router/Websockets/Request.js.map +1 -0
  505. package/build/Router/Websockets/WebsocketRoute.d.ts +7 -0
  506. package/build/Router/Websockets/WebsocketRoute.d.ts.map +1 -0
  507. package/build/Router/Websockets/WebsocketRoute.js +47 -0
  508. package/build/Router/Websockets/WebsocketRoute.js.map +1 -0
  509. package/build/Router/Websockets/index.d.ts +19 -0
  510. package/build/Router/Websockets/index.d.ts.map +1 -0
  511. package/build/Router/Websockets/index.js +68 -0
  512. package/build/Router/Websockets/index.js.map +1 -0
  513. package/build/Router/Websockets/types.d.ts +22 -0
  514. package/build/Router/Websockets/types.d.ts.map +1 -0
  515. package/build/Router/Websockets/types.js +9 -0
  516. package/build/Router/Websockets/types.js.map +1 -0
  517. package/build/Router/index.d.ts +7 -0
  518. package/build/Router/index.d.ts.map +1 -0
  519. package/build/Router/index.js +23 -0
  520. package/build/Router/index.js.map +1 -0
  521. package/build/Storage/File.d.ts +12 -0
  522. package/build/Storage/File.d.ts.map +1 -0
  523. package/build/Storage/File.js +65 -0
  524. package/build/Storage/File.js.map +1 -0
  525. package/build/Storage/Image.d.ts +4 -0
  526. package/build/Storage/Image.d.ts.map +1 -0
  527. package/build/Storage/Image.js +8 -0
  528. package/build/Storage/Image.js.map +1 -0
  529. package/build/Storage/InvalidImage.d.ts +4 -0
  530. package/build/Storage/InvalidImage.d.ts.map +1 -0
  531. package/build/Storage/InvalidImage.js +8 -0
  532. package/build/Storage/InvalidImage.js.map +1 -0
  533. package/build/Storage/Storage.d.ts +13 -0
  534. package/build/Storage/Storage.d.ts.map +1 -0
  535. package/build/Storage/Storage.js +120 -0
  536. package/build/Storage/Storage.js.map +1 -0
  537. package/build/Storage/index.d.ts +5 -0
  538. package/build/Storage/index.d.ts.map +1 -0
  539. package/build/Storage/index.js +21 -0
  540. package/build/Storage/index.js.map +1 -0
  541. package/build/Storage/utils.d.ts +5 -0
  542. package/build/Storage/utils.d.ts.map +1 -0
  543. package/build/Storage/utils.js +20 -0
  544. package/build/Storage/utils.js.map +1 -0
  545. package/build/Support/Array.d.ts +29 -0
  546. package/build/Support/Array.d.ts.map +1 -0
  547. package/build/Support/Array.js +112 -0
  548. package/build/Support/Array.js.map +1 -0
  549. package/build/Support/Math.d.ts +7 -0
  550. package/build/Support/Math.d.ts.map +1 -0
  551. package/build/Support/Math.js +8 -0
  552. package/build/Support/Math.js.map +1 -0
  553. package/build/Support/Metadata.d.ts +16 -0
  554. package/build/Support/Metadata.d.ts.map +1 -0
  555. package/build/Support/Metadata.js +33 -0
  556. package/build/Support/Metadata.js.map +1 -0
  557. package/build/Support/String.d.ts +12 -0
  558. package/build/Support/String.d.ts.map +1 -0
  559. package/build/Support/String.js +24 -0
  560. package/build/Support/String.js.map +1 -0
  561. package/build/Support/index.d.ts +16 -0
  562. package/build/Support/index.d.ts.map +1 -0
  563. package/build/Support/index.js +7 -0
  564. package/build/Support/index.js.map +1 -0
  565. package/build/Support/utils.d.ts +2 -0
  566. package/build/Support/utils.d.ts.map +1 -0
  567. package/build/Support/utils.js +12 -0
  568. package/build/Support/utils.js.map +1 -0
  569. package/build/Testing/TestCase.d.ts +33 -0
  570. package/build/Testing/TestCase.d.ts.map +1 -0
  571. package/build/Testing/TestCase.js +138 -0
  572. package/build/Testing/TestCase.js.map +1 -0
  573. package/build/Validation/Rule.d.ts +7 -0
  574. package/build/Validation/Rule.d.ts.map +1 -0
  575. package/build/Validation/Rule.js +7 -0
  576. package/build/Validation/Rule.js.map +1 -0
  577. package/build/Validation/RuleInterface.d.ts +7 -0
  578. package/build/Validation/RuleInterface.d.ts.map +1 -0
  579. package/build/Validation/RuleInterface.js +3 -0
  580. package/build/Validation/RuleInterface.js.map +1 -0
  581. package/build/Validation/Rules/Email.d.ts +4 -0
  582. package/build/Validation/Rules/Email.d.ts.map +1 -0
  583. package/build/Validation/Rules/Email.js +17 -0
  584. package/build/Validation/Rules/Email.js.map +1 -0
  585. package/build/Validation/Rules/FileExtension.d.ts +4 -0
  586. package/build/Validation/Rules/FileExtension.d.ts.map +1 -0
  587. package/build/Validation/Rules/FileExtension.js +19 -0
  588. package/build/Validation/Rules/FileExtension.js.map +1 -0
  589. package/build/Validation/Rules/MaxLength.d.ts +4 -0
  590. package/build/Validation/Rules/MaxLength.d.ts.map +1 -0
  591. package/build/Validation/Rules/MaxLength.js +16 -0
  592. package/build/Validation/Rules/MaxLength.js.map +1 -0
  593. package/build/Validation/Rules/MinLength.d.ts +4 -0
  594. package/build/Validation/Rules/MinLength.d.ts.map +1 -0
  595. package/build/Validation/Rules/MinLength.js +16 -0
  596. package/build/Validation/Rules/MinLength.js.map +1 -0
  597. package/build/Validation/Rules/Optional.d.ts +4 -0
  598. package/build/Validation/Rules/Optional.d.ts.map +1 -0
  599. package/build/Validation/Rules/Optional.js +16 -0
  600. package/build/Validation/Rules/Optional.js.map +1 -0
  601. package/build/Validation/Rules/Required.d.ts +4 -0
  602. package/build/Validation/Rules/Required.d.ts.map +1 -0
  603. package/build/Validation/Rules/Required.js +24 -0
  604. package/build/Validation/Rules/Required.js.map +1 -0
  605. package/build/Validation/Validator.d.ts +12 -0
  606. package/build/Validation/Validator.d.ts.map +1 -0
  607. package/build/Validation/Validator.js +13 -0
  608. package/build/Validation/Validator.js.map +1 -0
  609. package/build/Validation/index.d.ts +11 -0
  610. package/build/Validation/index.d.ts.map +1 -0
  611. package/build/Validation/index.js +27 -0
  612. package/build/Validation/index.js.map +1 -0
  613. package/package.json +10 -15
  614. package/.automaker/app_spec.txt +0 -440
  615. package/.automaker/categories.json +0 -1
  616. package/.automaker/features/a-b-testing-framework/feature.json +0 -14
  617. package/.automaker/features/account-lockout-protection/feature.json +0 -14
  618. package/.automaker/features/api-versioning/feature.json +0 -14
  619. package/.automaker/features/background-job-processing/feature.json +0 -12
  620. package/.automaker/features/cloud-storage-integration/feature.json +0 -14
  621. package/.automaker/features/compression-middleware/feature.json +0 -14
  622. package/.automaker/features/cors-and-security-headers/feature.json +0 -14
  623. package/.automaker/features/currency-and-timezone/feature.json +0 -14
  624. package/.automaker/features/database-backup-restore/feature.json +0 -14
  625. package/.automaker/features/database-query-logging/feature.json +0 -15
  626. package/.automaker/features/database-transaction-support/feature.json +0 -14
  627. package/.automaker/features/discord-notifications-channel/feature.json +0 -14
  628. package/.automaker/features/eager-loading-optimization/feature.json +0 -14
  629. package/.automaker/features/email-notifications-channel/feature.json +0 -14
  630. package/.automaker/features/error-tracking-integration/feature.json +0 -14
  631. package/.automaker/features/feature-flags/feature.json +0 -12
  632. package/.automaker/features/file-upload-handling/feature.json +0 -14
  633. package/.automaker/features/form-builder/feature.json +0 -14
  634. package/.automaker/features/full-text-search/feature.json +0 -14
  635. package/.automaker/features/graphql-api-support/feature.json +0 -14
  636. package/.automaker/features/graphql-documentation/feature.json +0 -14
  637. package/.automaker/features/graphql-subscriptions/feature.json +0 -15
  638. package/.automaker/features/html-view-rendering/feature.json +0 -14
  639. package/.automaker/features/http2-support/feature.json +0 -14
  640. package/.automaker/features/http3-quic-support/feature.json +0 -14
  641. package/.automaker/features/image-processing/feature.json +0 -14
  642. package/.automaker/features/internationalization-i18n/feature.json +0 -12
  643. package/.automaker/features/job-retries-and-failures/feature.json +0 -14
  644. package/.automaker/features/job-scheduling/feature.json +0 -14
  645. package/.automaker/features/locale-detection/feature.json +0 -14
  646. package/.automaker/features/log-rotation/feature.json +0 -14
  647. package/.automaker/features/logging-system/feature.json +0 -12
  648. package/.automaker/features/oauth-authentication/feature.json +0 -14
  649. package/.automaker/features/pagination-component/feature.json +0 -14
  650. package/.automaker/features/password-reset-flow/feature.json +0 -14
  651. package/.automaker/features/performance-monitoring/feature.json +0 -14
  652. package/.automaker/features/permission-management/feature.json +0 -14
  653. package/.automaker/features/policy-based-authorization/feature.json +0 -14
  654. package/.automaker/features/polymorphic-relationships/feature.json +0 -14
  655. package/.automaker/features/query-scopes/feature.json +0 -14
  656. package/.automaker/features/rate-limiting/feature.json +0 -14
  657. package/.automaker/features/request-validation-middleware/feature.json +0 -14
  658. package/.automaker/features/response-caching-headers/feature.json +0 -14
  659. package/.automaker/features/rest-api-documentation/feature.json +0 -14
  660. package/.automaker/features/role-based-access-control/feature.json +0 -14
  661. package/.automaker/features/session-management/feature.json +0 -14
  662. package/.automaker/features/session-middleware/feature.json +0 -14
  663. package/.automaker/features/slack-notifications-channel/feature.json +0 -14
  664. package/.automaker/features/sms-notifications-channel/feature.json +0 -14
  665. package/.automaker/features/soft-deletes/feature.json +0 -14
  666. package/.automaker/features/structured-logging/feature.json +0 -14
  667. package/.automaker/features/timestamps-and-auditing/feature.json +0 -14
  668. package/.automaker/features/two-factor-authentication/feature.json +0 -14
  669. package/.automaker/features/view-helpers-utilities/feature.json +0 -14
  670. package/.automaker/features/webhook-notifications/feature.json +0 -14
  671. package/.claude/settings.local.json +0 -10
  672. package/.editorconfig +0 -11
  673. package/.mocharc.json +0 -13
  674. package/CONTRIBUTING.md +0 -9
  675. package/Cache/Cache.ts +0 -13
  676. package/Cache/Stores/DatabaseStore.ts +0 -120
  677. package/Cache/Stores/FileStore.ts +0 -69
  678. package/Cache/Stores/MemoryStore.ts +0 -71
  679. package/Cache/index.ts +0 -5
  680. package/Cache/types.ts +0 -4
  681. package/Container/ClassResolver.ts +0 -106
  682. package/Container/Container.ts +0 -144
  683. package/Container/Contracts.ts +0 -3
  684. package/Container/Decorators.ts +0 -20
  685. package/Container/Metadata.ts +0 -16
  686. package/Container/Resolver.ts +0 -27
  687. package/Container/index.ts +0 -5
  688. package/Database/Clauses/Where.ts +0 -0
  689. package/Database/Connection.ts +0 -52
  690. package/Database/Decorators.ts +0 -142
  691. package/Database/Drivers/DatabaseDriver.ts +0 -37
  692. package/Database/Drivers/MySQL/Alter/index.ts +0 -55
  693. package/Database/Drivers/MySQL/ColumnDefinition.ts +0 -16
  694. package/Database/Drivers/MySQL/Create.ts +0 -47
  695. package/Database/Drivers/MySQL/MysqlDriver.ts +0 -123
  696. package/Database/Drivers/MySQL/Schema.ts +0 -82
  697. package/Database/Drivers/MySQL/index.ts +0 -13
  698. package/Database/Drivers/SQL/Schema.ts +0 -73
  699. package/Database/Drivers/SQL/Statements/Alter.ts +0 -22
  700. package/Database/Drivers/SQL/Statements/BaseStatement.ts +0 -55
  701. package/Database/Drivers/SQL/Statements/Delete.ts +0 -20
  702. package/Database/Drivers/SQL/Statements/Insert.ts +0 -24
  703. package/Database/Drivers/SQL/Statements/Select.ts +0 -55
  704. package/Database/Drivers/SQL/Statements/Update.ts +0 -33
  705. package/Database/Drivers/SQL/index.ts +0 -8
  706. package/Database/Drivers/SQLite/Create.ts +0 -45
  707. package/Database/Drivers/SQLite/Schema.ts +0 -54
  708. package/Database/Drivers/SQLite/SqliteDriver.ts +0 -144
  709. package/Database/Drivers/SQLite/index.ts +0 -15
  710. package/Database/Drivers/SchemaContract.ts +0 -11
  711. package/Database/Drivers/Statement.ts +0 -16
  712. package/Database/Drivers/index.ts +0 -4
  713. package/Database/Entity.ts +0 -377
  714. package/Database/EntityNotFoundError.ts +0 -5
  715. package/Database/EntityProxyHandler.ts +0 -43
  716. package/Database/EntityQuery.ts +0 -197
  717. package/Database/Expression.ts +0 -3
  718. package/Database/Fields.ts +0 -816
  719. package/Database/Helpers.ts +0 -12
  720. package/Database/List.ts +0 -71
  721. package/Database/Migrations/Migration.ts +0 -10
  722. package/Database/Migrations/MigrationHistory.ts +0 -20
  723. package/Database/Migrations/Migrator.ts +0 -122
  724. package/Database/Migrations/index.ts +0 -3
  725. package/Database/ORM/BaseRelationship.ts +0 -10
  726. package/Database/Query.ts +0 -374
  727. package/Database/Seeders/Seeder.ts +0 -3
  728. package/Database/Seeders/SeederManager.ts +0 -27
  729. package/Database/Seeders/index.ts +0 -2
  730. package/Database/StringExpression.ts +0 -9
  731. package/Database/Types.ts +0 -165
  732. package/Database/index.ts +0 -23
  733. package/Encryption/index.ts +0 -51
  734. package/Forms/Decorators.ts +0 -29
  735. package/Forms/Form.ts +0 -70
  736. package/Forms/FormFields.ts +0 -36
  737. package/Forms/index.ts +0 -3
  738. package/Framework/App.ts +0 -10
  739. package/Framework/Application.ts +0 -118
  740. package/Framework/Auth/Auth.ts +0 -122
  741. package/Framework/Auth/Authenticatable.ts +0 -9
  742. package/Framework/Auth/User.ts +0 -27
  743. package/Framework/Auth/index.ts +0 -29
  744. package/Framework/Config/AppConfig.ts +0 -25
  745. package/Framework/Config/AuthConfig.ts +0 -11
  746. package/Framework/Config/BaseConfig.ts +0 -9
  747. package/Framework/Config/CacheConfig.ts +0 -38
  748. package/Framework/Config/DatabaseConfig.ts +0 -21
  749. package/Framework/Config/MailConfig.ts +0 -30
  750. package/Framework/Config/index.ts +0 -6
  751. package/Framework/Middleware/AuthMiddleware.ts +0 -31
  752. package/Framework/Middleware/CorsMiddleware.ts +0 -32
  753. package/Framework/Middleware/StaticAssetsMiddleware.ts +0 -76
  754. package/Framework/Middleware/index.ts +0 -2
  755. package/Framework/Provider.ts +0 -9
  756. package/Framework/Providers/CacheProvider.ts +0 -28
  757. package/Framework/Providers/DatabaseProvider.ts +0 -36
  758. package/Framework/Providers/MailProvider.ts +0 -31
  759. package/Framework/Providers/WebsocketsProvider.ts +0 -141
  760. package/Framework/Resolvers/AuthResolver.ts +0 -23
  761. package/Framework/Resolvers/EntityResolver.ts +0 -41
  762. package/Framework/Resolvers/FormResolver.ts +0 -37
  763. package/Framework/RootDir.ts +0 -1
  764. package/Framework/index.ts +0 -8
  765. package/Frontend/Angular/Readme.md +0 -7
  766. package/Frontend/Angular/index.ts +0 -24
  767. package/Frontend/Angular/package-lock.json +0 -2767
  768. package/Frontend/Angular/package.json +0 -38
  769. package/Frontend/Angular/tsconfig.json +0 -20
  770. package/Frontend/Websockets/Readme.md +0 -86
  771. package/Frontend/Websockets/index.ts +0 -99
  772. package/Frontend/Websockets/package-lock.json +0 -4371
  773. package/Frontend/Websockets/package.json +0 -45
  774. package/Frontend/Websockets/tsc-alias.config.json +0 -7
  775. package/Frontend/Websockets/tsconfig.json +0 -20
  776. package/Mail/MailAddress.ts +0 -4
  777. package/Mail/MailTransport.ts +0 -6
  778. package/Mail/Mailable.ts +0 -16
  779. package/Mail/Mailer.ts +0 -27
  780. package/Mail/PendingMail.ts +0 -68
  781. package/Mail/SentMessage.ts +0 -20
  782. package/Mail/Transports/MemoryTransport.ts +0 -13
  783. package/Mail/Transports/SendGridTransport.ts +0 -95
  784. package/Mail/index.ts +0 -3
  785. package/Models/Model.ts +0 -41
  786. package/Models/index.ts +0 -54
  787. package/Router/BaseController.ts +0 -7
  788. package/Router/Decorators.ts +0 -224
  789. package/Router/Guard.ts +0 -10
  790. package/Router/Http/Contracts.ts +0 -4
  791. package/Router/Http/ErrorHandler.ts +0 -45
  792. package/Router/Http/ErrorHandlerInterface.ts +0 -6
  793. package/Router/Http/Errors/HttpError.ts +0 -15
  794. package/Router/Http/Handler.ts +0 -183
  795. package/Router/Http/HttpRoute.ts +0 -110
  796. package/Router/Http/Middleware.ts +0 -7
  797. package/Router/Http/Request.ts +0 -225
  798. package/Router/Http/Response.ts +0 -35
  799. package/Router/Http/index.ts +0 -85
  800. package/Router/Metadata.ts +0 -34
  801. package/Router/Middleware.ts +0 -16
  802. package/Router/Request.ts +0 -65
  803. package/Router/Route.ts +0 -16
  804. package/Router/RouteNotFoundError.ts +0 -5
  805. package/Router/Router.ts +0 -35
  806. package/Router/Servers/index.ts +0 -6
  807. package/Router/Servers/node.ts +0 -49
  808. package/Router/Servers/uNetworking.ts +0 -151
  809. package/Router/Websockets/Handler.ts +0 -82
  810. package/Router/Websockets/Middleware.ts +0 -7
  811. package/Router/Websockets/Request.ts +0 -3
  812. package/Router/Websockets/WebsocketRoute.ts +0 -61
  813. package/Router/Websockets/index.ts +0 -59
  814. package/Router/Websockets/types.ts +0 -24
  815. package/Router/index.ts +0 -6
  816. package/Storage/File.ts +0 -30
  817. package/Storage/Image.ts +0 -19
  818. package/Storage/InvalidImage.ts +0 -3
  819. package/Storage/Storage.ts +0 -98
  820. package/Storage/index.ts +0 -4
  821. package/Storage/utils.ts +0 -18
  822. package/Support/Array.ts +0 -184
  823. package/Support/Math.ts +0 -12
  824. package/Support/Metadata.ts +0 -31
  825. package/Support/String.ts +0 -38
  826. package/Support/index.ts +0 -19
  827. package/Support/utils.ts +0 -7
  828. package/Testing/TestCase.ts +0 -193
  829. package/Validation/Rule.ts +0 -9
  830. package/Validation/RuleInterface.ts +0 -10
  831. package/Validation/Rules/Email.ts +0 -20
  832. package/Validation/Rules/FileExtension.ts +0 -21
  833. package/Validation/Rules/MaxLength.ts +0 -17
  834. package/Validation/Rules/MinLength.ts +0 -18
  835. package/Validation/Rules/Optional.ts +0 -18
  836. package/Validation/Rules/Required.ts +0 -29
  837. package/Validation/Validator.ts +0 -7
  838. package/Validation/index.ts +0 -12
  839. package/benchmark.ts +0 -47
  840. package/eslint.config.mjs +0 -78
  841. package/tests/.nycrc.json +0 -19
  842. package/tests/Cache/DatabaseStoreTest.ts +0 -110
  843. package/tests/Cache/FileStoreTest.ts +0 -93
  844. package/tests/Cache/MemoryStoreTest.ts +0 -92
  845. package/tests/Container/ContainerTest.ts +0 -336
  846. package/tests/Database/Drivers/MySQL/AlterTest.ts +0 -100
  847. package/tests/Database/Drivers/MySQL/CreateTest.ts +0 -39
  848. package/tests/Database/Drivers/MysqlDriverTest.ts +0 -140
  849. package/tests/Database/Drivers/SqliteDriverTest.ts +0 -126
  850. package/tests/Database/Entities/Article.ts +0 -21
  851. package/tests/Database/Entities/Profile.ts +0 -21
  852. package/tests/Database/Entities/Role.ts +0 -15
  853. package/tests/Database/Entities/User.ts +0 -35
  854. package/tests/Database/EntityRelationshipsTest.ts +0 -475
  855. package/tests/Database/EntityTest.ts +0 -202
  856. package/tests/Database/Migrations/RunnerTest.ts +0 -96
  857. package/tests/Database/Migrations/migrations/1.createUserTable.ts +0 -12
  858. package/tests/Database/Migrations/migrations/2.createArticlesTable.ts +0 -12
  859. package/tests/Database/QueryTest.ts +0 -573
  860. package/tests/Database/SchemaTest.ts +0 -32
  861. package/tests/Database/Seeders/RunnerTest.ts +0 -30
  862. package/tests/Database/Seeders/seeders/RandomSeeder.ts +0 -10
  863. package/tests/Database/utils.ts +0 -16
  864. package/tests/Forms/FormsTest.ts +0 -59
  865. package/tests/Framework/Middleware/StaticAssetsMiddlewareTest.ts +0 -129
  866. package/tests/Framework/Middleware/articles/my-article.html +0 -1
  867. package/tests/Framework/Middleware/articles/some-directory/index.html +0 -1
  868. package/tests/Framework/Middleware/assets/styles.css +0 -3
  869. package/tests/Framework/Resolvers/EntityResolverTest.ts +0 -48
  870. package/tests/Framework/Router/RouterTest.ts +0 -33
  871. package/tests/Mail/MailerTest.ts +0 -76
  872. package/tests/Model/ModelTest.ts +0 -183
  873. package/tests/Router/HttpHandlerTest.ts +0 -72
  874. package/tests/Router/RequestTest.ts +0 -77
  875. package/tests/Router/WebSocketsHandlerTest.ts +0 -51
  876. package/tests/Storage/StorageTest.ts +0 -97
  877. package/tests/Support/ArrayTest.ts +0 -167
  878. package/tests/Support/StringTest.ts +0 -18
  879. package/tests/Validation/RulesTest.ts +0 -54
  880. package/tests/tsconfig.json +0 -5
  881. package/tsconfig.json +0 -53
  882. package/types.d.ts +0 -8
@@ -1,96 +0,0 @@
1
- import { suite, test } from '@testdeck/mocha'
2
- import { expect } from 'chai'
3
- import { File, Storage } from '../../../Storage'
4
- import { Connection, Query, SqliteDriver } from '../../../Database'
5
- import { MigrationHistory, Migrator } from '../../../Database/Migrations'
6
- import { anything, instance, mock, when } from 'ts-mockito'
7
-
8
- @suite
9
- class RunnerTest {
10
- private runner: Migrator
11
- private migrationsPath = './tests/Database/Migrations/migrations'
12
- private migrationFiles = ['1.createUserTable.ts', '2.createArticlesTable.ts']
13
- private tableNames = ['migration_test_users', 'migration_test_articles']
14
-
15
- async before() {
16
- Query.connection = new Connection(new SqliteDriver(':memory:'))
17
- // Query.connection = new Connection(new MysqlDriver({
18
- // host: 'localhost', user: 'root', password: 'root', database: 'typetron_test'
19
- // }))
20
- this.runner = new Migrator(new Storage(), Query.connection, this.migrationsPath)
21
- }
22
-
23
- async after() {
24
- if (await Query.connection.tableExists(MigrationHistory.getTable())) {
25
- await this.runner.reset()
26
- await Query.connection.runRaw(`DROP TABLE IF EXISTS ${MigrationHistory.getTable()}`)
27
- }
28
- }
29
-
30
- @test
31
- async getFilesByPath() {
32
- const migrationFiles = await this.runner.files()
33
-
34
- expect(migrationFiles).to.have.length(2)
35
- }
36
-
37
- @test
38
- async shouldMigrate() {
39
- const migrated = await this.runner.migrate()
40
-
41
- expect(migrated).equals(true)
42
-
43
- const tables = await Query.connection.tables()
44
-
45
- expect(tables.pluck('name')).to.include.members(this.tableNames)
46
- }
47
-
48
- @test
49
- async shouldRollbackOnce() {
50
- await this.migrateInBatches()
51
-
52
- const rollback = await this.runner.rollback()
53
-
54
- expect(rollback).equals(true)
55
-
56
- const tables = await Query.connection.tables()
57
-
58
- expect(tables.pluck('name')).to.include(this.tableNames[0])
59
- expect(tables.pluck('name')).to.not.include(this.tableNames[1])
60
- }
61
-
62
- @test
63
- async shouldRollbackBySteps() {
64
- await this.migrateInBatches()
65
- const rollback = await this.runner.rollback(2)
66
-
67
- expect(rollback).equals(true)
68
-
69
- const tables = await Query.connection.tables()
70
-
71
- expect(tables.pluck('name')).to.not.include.members(this.tableNames)
72
- }
73
-
74
- @test
75
- async shouldReset() {
76
- await this.migrateInBatches()
77
- const rollback = await this.runner.reset()
78
-
79
- expect(rollback).equals(true)
80
-
81
- const tables = await Query.connection.tables()
82
-
83
- expect(tables.pluck('name')).to.not.include.members(this.tableNames)
84
- }
85
-
86
- private async migrateInBatches() {
87
- const mockStorage = mock(Storage)
88
- when(mockStorage.files(anything(), anything()))
89
- .thenReturn([new File(this.migrationFiles[0], this.migrationsPath)])
90
- .thenReturn([new File(this.migrationFiles[1], this.migrationsPath)])
91
-
92
- this.runner.storage = instance(mockStorage)
93
- await this.runner.migrate()
94
- await this.runner.migrate()
95
- }
96
- }
@@ -1,12 +0,0 @@
1
- import { Migration } from '../../../../Database/Migrations'
2
-
3
- export class CreateUserTable extends Migration {
4
-
5
- async up() {
6
- await this.connection.runRaw('CREATE TABLE migration_test_users (id INTEGER PRIMARY KEY, name TEXT, password TEXT)')
7
- }
8
-
9
- async down() {
10
- await this.connection.runRaw('DROP TABLE migration_test_users')
11
- }
12
- }
@@ -1,12 +0,0 @@
1
- import { Migration } from '../../../../Database/Migrations'
2
-
3
- export class CreateArticlesTable extends Migration {
4
-
5
- async up() {
6
- await this.connection.runRaw('CREATE TABLE migration_test_articles (id INTEGER PRIMARY KEY, title TEXT, content TEXT)')
7
- }
8
-
9
- async down() {
10
- await this.connection.runRaw('DROP TABLE migration_test_articles')
11
- }
12
- }
@@ -1,573 +0,0 @@
1
- import { expect } from 'chai'
2
- import { suite, test } from '@testdeck/mocha'
3
- import { Connection, Query } from '../../Database'
4
- import { anyOfClass, instance, mock, when } from 'ts-mockito'
5
- import { SqliteDriver } from '@Typetron/Database/Drivers'
6
- import { expectQuery, trimSQL } from '@Typetron/tests/Database/utils'
7
-
8
- @suite
9
- class QueryTest {
10
- connection: Connection
11
- private query: Query<User>
12
-
13
- before() {
14
- this.connection = mock(Connection)
15
- Query.connection = instance(this.connection)
16
- Query.connection.driver = new SqliteDriver(':memory:')
17
- when(this.connection.get(anyOfClass(Query))).thenCall((query: Query) => {
18
- return query.toSQL()
19
- })
20
- this.query = new Query()
21
- }
22
-
23
- async expect() {
24
- return expect(trimSQL(await this.query.toSQL()))
25
- }
26
-
27
- expectBindings() {
28
- return expect(this.query.getBindings())
29
- }
30
-
31
- @test
32
- async selectsEverything() {
33
- expectQuery(Query.table('users')).toEqual('SELECT * FROM users')
34
- }
35
-
36
- @test
37
- async selectSpecificColumns() {
38
- expectQuery(
39
- Query.table('users').select('name', 'email')
40
- ).toEqual(
41
- 'SELECT name, email FROM users'
42
- )
43
- }
44
-
45
- @test
46
- async addColumns() {
47
- expectQuery(
48
- Query.table('users').addSelect('name', 'email')
49
- ).toEqual(
50
- 'SELECT name, email FROM users'
51
- )
52
- }
53
-
54
- @test
55
- async selectDistinct() {
56
- expectQuery(
57
- Query.table('users').distinct().select('name', 'email')
58
- ).toEqual(
59
- 'SELECT DISTINCT name, email FROM users'
60
- )
61
- }
62
-
63
- @test
64
- async first() {
65
- when(this.connection.first(anyOfClass(Query))).thenResolve({name: 'John'})
66
- const user = await this.query.table('users').first('name');
67
-
68
- (await this.expect()).to.equal(
69
- 'SELECT name FROM users'
70
- )
71
- expect(user).to.deep.equal({name: 'John'})
72
- }
73
-
74
- @test
75
- async where() {
76
- const query = Query.table('users').where('name', '=', 'John')
77
-
78
- expectQuery(
79
- query
80
- ).toEqual(
81
- 'SELECT * FROM users WHERE name = ?'
82
- )
83
-
84
- expect(
85
- query.getBindings()
86
- ).to.deep.equal(
87
- ['John']
88
- )
89
- }
90
-
91
- @test
92
- async whereWithDefaultOperator() {
93
- const query = Query.table('users').where('name', 'John')
94
-
95
- expectQuery(
96
- query
97
- ).toEqual(
98
- 'SELECT * FROM users WHERE name = ?'
99
- )
100
- expect(
101
- query.getBindings()
102
- ).to.deep.equal(
103
- ['John']
104
- )
105
- }
106
-
107
- // @test
108
- // async whereWithObject() {
109
- // Query.table('users').where({name: 'John', age: 21});
110
- //
111
- // (await this.expectSql()).to.equal('SELECT * FROM users WHERE name = ? AND age = ?');
112
- // this.expectBindings().to.deep.equal(['John', 21]);
113
- // }
114
-
115
- // @test
116
- // async whereWithArray() {
117
- // Query.table('users').where([
118
- // ['name', '=', 'John'],
119
- // ['age', '=', 21]
120
- // ]);
121
- //
122
- // (await this.expectSql()).to.equal('SELECT * FROM users WHERE name = ? AND age = ?');
123
- // this.expectBindings().to.deep.equal(['John', 21]);
124
- // }
125
-
126
- @test
127
- async whereOrOperator() {
128
- this.query.table('users').where('name', 'John').orWhere('age', 21);
129
-
130
- (await this.expect()).to.equal(
131
- 'SELECT * FROM users WHERE name = ? OR age = ?'
132
- )
133
- this.expectBindings().to.deep.equal(['John', 21])
134
- }
135
-
136
- @test
137
- async whereBetween() {
138
- this.query.table('users').whereBetween('age', [18, 25]);
139
-
140
- (await this.expect()).to.equal(
141
- 'SELECT * FROM users WHERE age BETWEEN ? AND ?'
142
- )
143
- this.expectBindings().to.deep.equal([18, 25])
144
- }
145
-
146
- @test
147
- async whereNotBetween() {
148
- this.query.table('users').whereNotBetween('age', [18, 25]);
149
-
150
- (await this.expect()).to.equal(
151
- 'SELECT * FROM users WHERE age NOT BETWEEN ? AND ?'
152
- )
153
- this.expectBindings().to.deep.equal([18, 25])
154
- }
155
-
156
- @test
157
- async orWhereBetween() {
158
- this.query.table('users').where('name', 'John').orWhereBetween('age', [18, 25]);
159
-
160
- (await this.expect()).to.equal(
161
- 'SELECT * FROM users WHERE name = ? OR age BETWEEN ? AND ?'
162
- )
163
- this.expectBindings().to.deep.equal(['John', 18, 25])
164
- }
165
-
166
- @test
167
- async orWhereNotBetween() {
168
- this.query.table('users').where('name', 'John').orWhereNotBetween('age', [18, 25]);
169
-
170
- (await this.expect()).to.equal(
171
- 'SELECT * FROM users WHERE name = ? OR age NOT BETWEEN ? AND ?'
172
- )
173
- this.expectBindings().to.deep.equal(['John', 18, 25])
174
- }
175
-
176
- @test
177
- async whereIn() {
178
- this.query.table('users').whereIn('age', [18, 25]);
179
-
180
- (await this.expect()).to.equal(
181
- 'SELECT * FROM users WHERE age IN (?, ?)'
182
- )
183
- this.expectBindings().to.deep.equal([18, 25])
184
- }
185
-
186
- @test
187
- async whereNotIn() {
188
- this.query.table('users').whereNotIn('age', [18, 25]);
189
-
190
- (await this.expect()).to.equal(
191
- 'SELECT * FROM users WHERE age NOT IN (?, ?)'
192
- )
193
- this.expectBindings().to.deep.equal([18, 25])
194
- }
195
-
196
- @test
197
- async orWhereIn() {
198
- this.query.table('users').where('name', 'John').orWhereIn('age', [18, 25]);
199
-
200
- (await this.expect()).to.equal(
201
- 'SELECT * FROM users WHERE name = ? OR age IN (?, ?)'
202
- )
203
- this.expectBindings().to.deep.equal(['John', 18, 25])
204
- }
205
-
206
- @test
207
- async orWhereNotIn() {
208
- this.query.table('users').where('name', 'John').orWhereNotIn('age', [18, 25]);
209
-
210
- (await this.expect()).to.equal(
211
- 'SELECT * FROM users WHERE name = ? OR age NOT IN (?, ?)'
212
- )
213
- this.expectBindings().to.deep.equal(['John', 18, 25])
214
- }
215
-
216
- @test
217
- async whereNull() {
218
- this.query.table('users').whereNull('age');
219
-
220
- (await this.expect()).to.equal(
221
- 'SELECT * FROM users WHERE age IS NULL'
222
- )
223
- this.expectBindings().to.deep.equal([])
224
- }
225
-
226
- @test
227
- async andWhereNull() {
228
- this.query.table('users').andWhereNull('age');
229
-
230
- (await this.expect()).to.equal(
231
- 'SELECT * FROM users WHERE age IS NULL'
232
- )
233
- this.expectBindings().to.deep.equal([])
234
- }
235
-
236
- @test
237
- async whereNotNull() {
238
- this.query.table('users').whereNotNull('age');
239
-
240
- (await this.expect()).to.equal(
241
- 'SELECT * FROM users WHERE age IS NOT NULL'
242
- )
243
- this.expectBindings().to.deep.equal([])
244
- }
245
-
246
- @test
247
- async andWhereNotNull() {
248
- this.query.table('users').andWhereNotNull('age');
249
-
250
- (await this.expect()).to.equal(
251
- 'SELECT * FROM users WHERE age IS NOT NULL'
252
- )
253
- this.expectBindings().to.deep.equal([])
254
- }
255
-
256
- @test
257
- async orWhereNull() {
258
- this.query.table('users').where('name', 'John').orWhereNull('age');
259
-
260
- (await this.expect()).to.equal(
261
- 'SELECT * FROM users WHERE name = ? OR age IS NULL'
262
- )
263
- this.expectBindings().to.deep.equal(['John'])
264
- }
265
-
266
- @test
267
- async orWhereNotNull() {
268
- this.query.table('users').where('name', 'John').orWhereNotNull('age');
269
-
270
- (await this.expect()).to.equal(
271
- 'SELECT * FROM users WHERE name = ? OR age IS NOT NULL'
272
- )
273
- this.expectBindings().to.deep.equal(['John'])
274
- }
275
-
276
- @test
277
- async orWhereLike() {
278
- this.query.table('users').where('age', 18).orWhereLike('name', '%John');
279
-
280
- (await this.expect()).to.equal(
281
- 'SELECT * FROM users WHERE age = ? OR name LIKE ?'
282
- )
283
- this.expectBindings().to.deep.equal([18, '%John'])
284
- }
285
-
286
- @test
287
- async orWhereNotLike() {
288
- this.query.table('users').where('age', 18).orWhereNotLike('name', '%John');
289
-
290
- (await this.expect()).to.equal(
291
- 'SELECT * FROM users WHERE age = ? OR name NOT LIKE ?'
292
- )
293
- this.expectBindings().to.deep.equal([18, '%John'])
294
- }
295
-
296
- @test
297
- async andWhereIn() {
298
- this.query.table('users').where('age', 18).andWhereIn('name', ['John', 'Doe']);
299
-
300
- (await this.expect()).to.equal(
301
- 'SELECT * FROM users WHERE age = ? AND name IN (?, ?)'
302
- )
303
- this.expectBindings().to.deep.equal([18, 'John', 'Doe'])
304
- }
305
-
306
- @test
307
- async andWhereNotIn() {
308
- this.query.table('users').where('age', 18).andWhereNotIn('name', ['John', 'Doe']);
309
-
310
- (await this.expect()).to.equal(
311
- 'SELECT * FROM users WHERE age = ? AND name NOT IN (?, ?)'
312
- )
313
- this.expectBindings().to.deep.equal([18, 'John', 'Doe'])
314
- }
315
-
316
- @test
317
- async whereLike() {
318
- this.query.table('users').whereLike('name', '%John');
319
-
320
- (await this.expect()).to.equal(
321
- 'SELECT * FROM users WHERE name LIKE ?'
322
- )
323
- this.expectBindings().to.deep.equal(['%John'])
324
- }
325
-
326
- @test
327
- async andWhere() {
328
- this.query.table('users').where('name', 'John').andWhere('age', 18);
329
-
330
- (await this.expect()).to.equal(
331
- 'SELECT * FROM users WHERE name = ? AND age = ?'
332
- )
333
- this.expectBindings().to.deep.equal(['John', 18])
334
- }
335
-
336
- // @test
337
- // async whereParameterGrouping() {
338
- // this.query.table('users')
339
- // .where('name', 'John')
340
- // .where(query => query.where('age', 21).orWhere('role', 'Admin'));
341
- //
342
- // (await this.expectSql()).to.equal('SELECT * FROM users WHERE name = ? and (age = ? or role = ?)');
343
- // this.expectBindings().to.deep.equal(['john', 21, 'Admin']);
344
- // }
345
-
346
- @test
347
- async orderBys() {
348
- this.query.table('users').orderBy('age');
349
- (await this.expect()).to.equal(
350
- 'SELECT * FROM users ORDER BY age DESC'
351
- )
352
-
353
- this.query.table('users').orderBy('age', 'ASC');
354
- (await this.expect()).to.equal(
355
- 'SELECT * FROM users ORDER BY age ASC'
356
- )
357
-
358
- this.query.table('users').orderBy([['age', 'DESC'], ['email', 'ASC']]);
359
- (await this.expect()).to.equal(
360
- 'SELECT * FROM users ORDER BY age DESC, email ASC'
361
- )
362
- }
363
-
364
- @test
365
- async groupBy() {
366
- this.query.table('users').groupBy('name');
367
- (await this.expect()).to.equal(
368
- 'SELECT * FROM users GROUP BY name'
369
- )
370
-
371
- this.query.table('users').groupBy('city', 'country');
372
- (await this.expect()).to.equal(
373
- 'SELECT * FROM users GROUP BY city, country'
374
- )
375
- }
376
-
377
- @test
378
- async aggregateSelectCount() {
379
- const query = await this.query.table('users').selectCount().get() as unknown as string
380
- expectQuery(query).toEqual('SELECT COUNT(*) as aggregate FROM users')
381
- }
382
-
383
- @test
384
- async aggregateCount() {
385
- when(this.connection.first(anyOfClass(Query))).thenCall((query: Query) => {
386
- return {aggregate: trimSQL(query.toSQL())}
387
- })
388
-
389
- expect(await this.query.table('users').count()).to.equal('SELECT COUNT(*) as aggregate FROM users')
390
- }
391
-
392
- @test
393
- async aggregateMax() {
394
- const query = await this.query.table('users').max('age') as unknown as string
395
- expectQuery(query).toEqual('SELECT MAX(age) as aggregate FROM users')
396
- }
397
-
398
- @test
399
- async limit() {
400
- const query = await this.query.table('users').limit(10, 20).get() as unknown as string
401
- expectQuery(
402
- query
403
- ).toEqual(
404
- 'SELECT * FROM users LIMIT 10, 20'
405
- )
406
- }
407
-
408
- //
409
- // @test
410
- // async aggregateMax() {
411
- // this.query.table('users').max('age');
412
- // (await this.expectSql()).to.equal('SELECT MAX(age) as aggregate FROM users');
413
- // }
414
-
415
- @test
416
- async defaultJoin() {
417
- this.query.table('users').join('pets', 'pets.user_id', '=', 'users.id');
418
- (await this.expect()).to.equal(
419
- 'SELECT * FROM users INNER JOIN pets ON pets.user_id = users.id'
420
- )
421
-
422
- // this.new.query.table('users')
423
- // .join('pets', 'pets.user_id', '=', 'users.id')
424
- // .leftJoin('pet_types', 'pet_types.id', '=', 'pets.type_id');
425
- // (await this.expectSql()).to
426
- // .equal('SELECT * FROM users INNER JOIN pets ON pets.user_id = users.id LEFT JOIN pet_types ON pet_types.id = pets.type_id');
427
- }
428
-
429
- @test
430
- async innerJoin() {
431
- this.query.table('users').innerJoin('pets', 'pets.user_id', '=', 'users.id');
432
- (await this.expect()).to.equal(
433
- 'SELECT * FROM users INNER JOIN pets ON pets.user_id = users.id'
434
- )
435
- }
436
-
437
- @test
438
- async leftJoin() {
439
- this.query.table('users').leftJoin('pets', 'pets.user_id', '=', 'users.id');
440
- (await this.expect()).to.equal(
441
- 'SELECT * FROM users LEFT JOIN pets ON pets.user_id = users.id'
442
- )
443
- }
444
-
445
- @test
446
- async rightJoin() {
447
- this.query.table('users').rightJoin('pets', 'pets.user_id', '=', 'users.id');
448
- (await this.expect()).to.equal(
449
- 'SELECT * FROM users RIGHT JOIN pets ON pets.user_id = users.id'
450
- )
451
- }
452
-
453
- @test
454
- async insertOneRow() {
455
- this.query.table('users').insert({
456
- name: 'John',
457
- email: 'john@example.com'
458
- });
459
- (await this.expect()).to.equal(
460
- 'INSERT INTO users (name, email) VALUES (?, ?)'
461
- )
462
- this.expectBindings().to.deep.equal(['John', 'john@example.com'])
463
- }
464
-
465
- @test
466
- async insertManyRow() {
467
- this.query.table('users').insert([
468
- {
469
- name: 'John',
470
- email: 'john@example.com'
471
- },
472
- {
473
- name: 'Chris',
474
- email: 'chris@example.com'
475
- }
476
- ]);
477
- (await this.expect()).to.equal(
478
- 'INSERT INTO users (name, email) VALUES (?, ?), (?, ?)'
479
- )
480
- this.expectBindings().to.deep.equal(['John', 'john@example.com', 'Chris', 'chris@example.com'])
481
- }
482
-
483
- @test
484
- async delete() {
485
- this.query.table('users').delete();
486
-
487
- (await this.expect()).to.equal(
488
- 'DELETE FROM users'
489
- )
490
- }
491
-
492
- @test
493
- async deletesWithCondition() {
494
- this.query.table('users').where('name', 'John').delete();
495
-
496
- (await this.expect()).to.equal(
497
- 'DELETE FROM users WHERE name = ?'
498
- )
499
- this.expectBindings().to.deep.equal(['John'])
500
- }
501
-
502
- @test
503
- async update() {
504
- this.query.table('users').update('name', 'John');
505
-
506
- (await this.expect()).to.equal(
507
- 'UPDATE users SET name = ?'
508
- )
509
- this.expectBindings().to.deep.equal(['John'])
510
- }
511
-
512
- @test
513
- async updateMultipleColumns() {
514
- this.query.table('users').update({
515
- name: 'John',
516
- age: 21,
517
- });
518
-
519
- (await this.expect()).to.equal(
520
- 'UPDATE users SET name = ?, age = ?'
521
- )
522
- this.expectBindings().to.deep.equal(['John', 21])
523
- }
524
-
525
- @test
526
- async updateWithCondition() {
527
- this.query.table('users').where('name', 'John').update('name', 'Doe');
528
- (await this.expect()).to.equal(
529
- 'UPDATE users SET name = ? WHERE name = ?'
530
- )
531
- this.expectBindings().to.deep.equal(['Doe', 'John'])
532
- }
533
-
534
- @test
535
- async subSelectWhereWithFunction() {
536
- const query = Query.table('users').where('id', q => {
537
- q.select('userId').from('roles').where('id', 1)
538
- })
539
- expect(trimSQL(query.toSQL())).to.equal('SELECT * FROM users WHERE id = (SELECT userId FROM roles WHERE id = ?)')
540
- expect(query.getBindings()).to.deep.equal([1])
541
- }
542
-
543
- @test
544
- async subSelectWhereWithDirectQuery() {
545
- const query = Query.table('users').where('id', new Query().select('userId').from('roles').where('id', 1))
546
- expect(trimSQL(query.toSQL())).to.equal('SELECT * FROM users WHERE id = (SELECT userId FROM roles WHERE id = ?)')
547
- expect(query.getBindings()).to.deep.equal([1])
548
- }
549
-
550
- @test
551
- async subSelectWhereInWithFunction() {
552
- const query = Query.table('users').whereIn('id', q => {
553
- q.select('userId').from('roles').where('id', 1)
554
- })
555
- expect(trimSQL(query.toSQL())).to.equal('SELECT * FROM users WHERE id IN (SELECT userId FROM roles WHERE id = ?)')
556
- expect(query.getBindings()).to.deep.equal([1])
557
- }
558
-
559
- @test
560
- async subSelectWhereInWithDirectQuery() {
561
- const query = Query.table('users').whereIn('id', new Query().select('userId').from('roles').where('id', 1))
562
- expect(trimSQL(query.toSQL())).to.equal('SELECT * FROM users WHERE id IN (SELECT userId FROM roles WHERE id = ?)')
563
- expect(query.getBindings()).to.deep.equal([1])
564
- }
565
- }
566
-
567
- interface User {
568
- id: number;
569
- age: number;
570
- email: string;
571
- name: string;
572
- dateOfBirth: Date;
573
- }