@typetron/framework 0.5.6 → 0.5.8

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 (809) hide show
  1. package/package.json +1 -2
  2. package/.eslintrc-old.js +0 -208
  3. package/Cache/Cache.ts +0 -13
  4. package/Cache/Stores/DatabaseStore.ts +0 -120
  5. package/Cache/Stores/FileStore.ts +0 -69
  6. package/Cache/Stores/MemoryStore.ts +0 -71
  7. package/Cache/index.ts +0 -5
  8. package/Cache/types.ts +0 -4
  9. package/Container/ClassResolver.ts +0 -106
  10. package/Container/Container.ts +0 -144
  11. package/Container/Contracts.ts +0 -3
  12. package/Container/Decorators.ts +0 -20
  13. package/Container/Metadata.ts +0 -16
  14. package/Container/Resolver.ts +0 -27
  15. package/Container/index.ts +0 -5
  16. package/Database/Clauses/Where.ts +0 -0
  17. package/Database/Connection.ts +0 -52
  18. package/Database/Decorators.ts +0 -142
  19. package/Database/Drivers/DatabaseDriver.ts +0 -37
  20. package/Database/Drivers/MySQL/Alter/index.ts +0 -55
  21. package/Database/Drivers/MySQL/ColumnDefinition.ts +0 -16
  22. package/Database/Drivers/MySQL/Create.ts +0 -47
  23. package/Database/Drivers/MySQL/MysqlDriver.ts +0 -123
  24. package/Database/Drivers/MySQL/Schema.ts +0 -82
  25. package/Database/Drivers/MySQL/index.ts +0 -13
  26. package/Database/Drivers/SQL/Schema.ts +0 -73
  27. package/Database/Drivers/SQL/Statements/Alter.ts +0 -22
  28. package/Database/Drivers/SQL/Statements/BaseStatement.ts +0 -55
  29. package/Database/Drivers/SQL/Statements/Delete.ts +0 -20
  30. package/Database/Drivers/SQL/Statements/Insert.ts +0 -24
  31. package/Database/Drivers/SQL/Statements/Select.ts +0 -55
  32. package/Database/Drivers/SQL/Statements/Update.ts +0 -33
  33. package/Database/Drivers/SQL/index.ts +0 -8
  34. package/Database/Drivers/SQLite/Create.ts +0 -45
  35. package/Database/Drivers/SQLite/Schema.ts +0 -54
  36. package/Database/Drivers/SQLite/SqliteDriver.ts +0 -144
  37. package/Database/Drivers/SQLite/index.ts +0 -15
  38. package/Database/Drivers/SchemaContract.ts +0 -11
  39. package/Database/Drivers/Statement.ts +0 -16
  40. package/Database/Drivers/index.ts +0 -4
  41. package/Database/Entity.ts +0 -377
  42. package/Database/EntityNotFoundError.ts +0 -5
  43. package/Database/EntityProxyHandler.ts +0 -43
  44. package/Database/EntityQuery.ts +0 -197
  45. package/Database/Expression.ts +0 -3
  46. package/Database/Fields.ts +0 -816
  47. package/Database/Helpers.ts +0 -12
  48. package/Database/List.ts +0 -71
  49. package/Database/Migrations/Migration.ts +0 -10
  50. package/Database/Migrations/MigrationHistory.ts +0 -20
  51. package/Database/Migrations/Migrator.ts +0 -122
  52. package/Database/Migrations/index.ts +0 -3
  53. package/Database/ORM/BaseRelationship.ts +0 -10
  54. package/Database/Query.ts +0 -374
  55. package/Database/Seeders/Seeder.ts +0 -3
  56. package/Database/Seeders/SeederManager.ts +0 -27
  57. package/Database/Seeders/index.ts +0 -2
  58. package/Database/StringExpression.ts +0 -9
  59. package/Database/Types.ts +0 -165
  60. package/Database/index.ts +0 -23
  61. package/Encryption/index.ts +0 -51
  62. package/Forms/Decorators.ts +0 -29
  63. package/Forms/Form.ts +0 -70
  64. package/Forms/FormFields.ts +0 -36
  65. package/Forms/index.ts +0 -3
  66. package/Framework/App.ts +0 -10
  67. package/Framework/Application.ts +0 -118
  68. package/Framework/Auth/Auth.ts +0 -122
  69. package/Framework/Auth/Authenticatable.ts +0 -9
  70. package/Framework/Auth/User.ts +0 -27
  71. package/Framework/Auth/index.ts +0 -29
  72. package/Framework/Config/AppConfig.ts +0 -25
  73. package/Framework/Config/AuthConfig.ts +0 -9
  74. package/Framework/Config/BaseConfig.ts +0 -9
  75. package/Framework/Config/CacheConfig.ts +0 -38
  76. package/Framework/Config/DatabaseConfig.ts +0 -21
  77. package/Framework/Config/MailConfig.ts +0 -30
  78. package/Framework/Config/index.ts +0 -6
  79. package/Framework/Middleware/AuthMiddleware.ts +0 -31
  80. package/Framework/Middleware/CorsMiddleware.ts +0 -32
  81. package/Framework/Middleware/StaticAssetsMiddleware.ts +0 -76
  82. package/Framework/Middleware/index.ts +0 -2
  83. package/Framework/Provider.ts +0 -9
  84. package/Framework/Providers/CacheProvider.ts +0 -28
  85. package/Framework/Providers/DatabaseProvider.ts +0 -36
  86. package/Framework/Providers/MailProvider.ts +0 -31
  87. package/Framework/Providers/WebsocketsProvider.ts +0 -120
  88. package/Framework/Resolvers/AuthResolver.ts +0 -23
  89. package/Framework/Resolvers/EntityResolver.ts +0 -41
  90. package/Framework/Resolvers/FormResolver.ts +0 -37
  91. package/Framework/RootDir.ts +0 -1
  92. package/Framework/index.ts +0 -8
  93. package/Frontend/Angular/index.ts +0 -24
  94. package/Frontend/Websockets/index.ts +0 -86
  95. package/LICENSE.md +0 -21
  96. package/Mail/MailAddress.ts +0 -4
  97. package/Mail/MailTransport.ts +0 -6
  98. package/Mail/Mailable.ts +0 -16
  99. package/Mail/Mailer.ts +0 -27
  100. package/Mail/PendingMail.ts +0 -68
  101. package/Mail/SentMessage.ts +0 -20
  102. package/Mail/Transports/MemoryTransport.ts +0 -13
  103. package/Mail/Transports/SendGridTransport.ts +0 -95
  104. package/Mail/index.ts +0 -3
  105. package/Models/Model.ts +0 -41
  106. package/Models/index.ts +0 -54
  107. package/Readme.md +0 -123
  108. package/Router/BaseController.ts +0 -7
  109. package/Router/Decorators.ts +0 -224
  110. package/Router/Guard.ts +0 -10
  111. package/Router/Http/Contracts.ts +0 -4
  112. package/Router/Http/ErrorHandler.ts +0 -45
  113. package/Router/Http/ErrorHandlerInterface.ts +0 -6
  114. package/Router/Http/Errors/HttpError.ts +0 -15
  115. package/Router/Http/Handler.ts +0 -183
  116. package/Router/Http/HttpRoute.ts +0 -110
  117. package/Router/Http/Middleware.ts +0 -7
  118. package/Router/Http/Request.ts +0 -225
  119. package/Router/Http/Response.ts +0 -35
  120. package/Router/Http/index.ts +0 -85
  121. package/Router/Metadata.ts +0 -34
  122. package/Router/Middleware.ts +0 -16
  123. package/Router/Request.ts +0 -65
  124. package/Router/Route.ts +0 -16
  125. package/Router/RouteNotFoundError.ts +0 -5
  126. package/Router/Router.ts +0 -35
  127. package/Router/Servers/index.ts +0 -6
  128. package/Router/Servers/node.ts +0 -49
  129. package/Router/Servers/uNetworking.ts +0 -151
  130. package/Router/Websockets/Handler.ts +0 -82
  131. package/Router/Websockets/Middleware.ts +0 -7
  132. package/Router/Websockets/Request.ts +0 -3
  133. package/Router/Websockets/WebsocketRoute.ts +0 -61
  134. package/Router/Websockets/index.ts +0 -57
  135. package/Router/Websockets/types.ts +0 -23
  136. package/Router/index.ts +0 -6
  137. package/Storage/File.ts +0 -30
  138. package/Storage/Image.ts +0 -19
  139. package/Storage/InvalidImage.ts +0 -3
  140. package/Storage/Storage.ts +0 -98
  141. package/Storage/index.ts +0 -4
  142. package/Storage/utils.ts +0 -18
  143. package/Support/Array.ts +0 -184
  144. package/Support/Math.ts +0 -12
  145. package/Support/Metadata.ts +0 -31
  146. package/Support/String.ts +0 -38
  147. package/Support/index.ts +0 -19
  148. package/Support/utils.ts +0 -7
  149. package/Testing/TestCase.ts +0 -193
  150. package/Validation/Rule.ts +0 -9
  151. package/Validation/RuleInterface.ts +0 -10
  152. package/Validation/Rules/Email.ts +0 -20
  153. package/Validation/Rules/FileExtension.ts +0 -21
  154. package/Validation/Rules/MaxLength.ts +0 -17
  155. package/Validation/Rules/MinLength.ts +0 -18
  156. package/Validation/Rules/Optional.ts +0 -18
  157. package/Validation/Rules/Required.ts +0 -29
  158. package/Validation/Validator.ts +0 -7
  159. package/Validation/index.ts +0 -12
  160. package/benchmark-index.js +0 -20
  161. package/benchmark.ts +0 -47
  162. package/tests/Cache/DatabaseStoreTest.ts +0 -110
  163. package/tests/Cache/FileStoreTest.ts +0 -93
  164. package/tests/Cache/MemoryStoreTest.ts +0 -92
  165. package/tests/Container/ContainerTest.ts +0 -336
  166. package/tests/Database/Drivers/MySQL/AlterTest.ts +0 -100
  167. package/tests/Database/Drivers/MySQL/CreateTest.ts +0 -39
  168. package/tests/Database/Drivers/MysqlDriverTest.ts +0 -140
  169. package/tests/Database/Drivers/SqliteDriverTest.ts +0 -126
  170. package/tests/Database/Entities/Article.ts +0 -21
  171. package/tests/Database/Entities/Profile.ts +0 -21
  172. package/tests/Database/Entities/Role.ts +0 -15
  173. package/tests/Database/Entities/User.ts +0 -35
  174. package/tests/Database/EntityRelationshipsTest.ts +0 -475
  175. package/tests/Database/EntityTest.ts +0 -202
  176. package/tests/Database/Migrations/RunnerTest.ts +0 -96
  177. package/tests/Database/Migrations/migrations/1.createUserTable.ts +0 -12
  178. package/tests/Database/Migrations/migrations/2.createArticlesTable.ts +0 -12
  179. package/tests/Database/QueryTest.ts +0 -573
  180. package/tests/Database/SchemaTest.ts +0 -32
  181. package/tests/Database/Seeders/RunnerTest.ts +0 -30
  182. package/tests/Database/Seeders/seeders/RandomSeeder.ts +0 -10
  183. package/tests/Database/utils.ts +0 -16
  184. package/tests/Forms/FormsTest.ts +0 -59
  185. package/tests/Framework/Middleware/StaticAssetsMiddlewareTest.ts +0 -129
  186. package/tests/Framework/Resolvers/EntityResolverTest.ts +0 -48
  187. package/tests/Framework/Router/RouterTest.ts +0 -33
  188. package/tests/Mail/MailerTest.ts +0 -76
  189. package/tests/Model/ModelTest.ts +0 -183
  190. package/tests/Router/HttpHandlerTest.ts +0 -72
  191. package/tests/Router/RequestTest.ts +0 -77
  192. package/tests/Router/WebSocketsHandlerTest.ts +0 -51
  193. package/tests/Storage/StorageTest.ts +0 -97
  194. package/tests/Support/ArrayTest.ts +0 -167
  195. package/tests/Support/StringTest.ts +0 -18
  196. package/tests/Validation/RulesTest.ts +0 -54
  197. package/types.d.ts +0 -8
  198. /package/{build/Cache → Cache}/Cache.d.ts +0 -0
  199. /package/{build/Cache → Cache}/Cache.d.ts.map +0 -0
  200. /package/{build/Cache → Cache}/Cache.js +0 -0
  201. /package/{build/Cache → Cache}/Cache.js.map +0 -0
  202. /package/{build/Cache → Cache}/Stores/DatabaseStore.d.ts +0 -0
  203. /package/{build/Cache → Cache}/Stores/DatabaseStore.d.ts.map +0 -0
  204. /package/{build/Cache → Cache}/Stores/DatabaseStore.js +0 -0
  205. /package/{build/Cache → Cache}/Stores/DatabaseStore.js.map +0 -0
  206. /package/{build/Cache → Cache}/Stores/FileStore.d.ts +0 -0
  207. /package/{build/Cache → Cache}/Stores/FileStore.d.ts.map +0 -0
  208. /package/{build/Cache → Cache}/Stores/FileStore.js +0 -0
  209. /package/{build/Cache → Cache}/Stores/FileStore.js.map +0 -0
  210. /package/{build/Cache → Cache}/Stores/MemoryStore.d.ts +0 -0
  211. /package/{build/Cache → Cache}/Stores/MemoryStore.d.ts.map +0 -0
  212. /package/{build/Cache → Cache}/Stores/MemoryStore.js +0 -0
  213. /package/{build/Cache → Cache}/Stores/MemoryStore.js.map +0 -0
  214. /package/{build/Cache → Cache}/index.d.ts +0 -0
  215. /package/{build/Cache → Cache}/index.d.ts.map +0 -0
  216. /package/{build/Cache → Cache}/index.js +0 -0
  217. /package/{build/Cache → Cache}/index.js.map +0 -0
  218. /package/{build/Cache → Cache}/types.d.ts +0 -0
  219. /package/{build/Cache → Cache}/types.d.ts.map +0 -0
  220. /package/{build/Cache → Cache}/types.js +0 -0
  221. /package/{build/Cache → Cache}/types.js.map +0 -0
  222. /package/{build/Container → Container}/ClassResolver.d.ts +0 -0
  223. /package/{build/Container → Container}/ClassResolver.d.ts.map +0 -0
  224. /package/{build/Container → Container}/ClassResolver.js +0 -0
  225. /package/{build/Container → Container}/ClassResolver.js.map +0 -0
  226. /package/{build/Container → Container}/Container.d.ts +0 -0
  227. /package/{build/Container → Container}/Container.d.ts.map +0 -0
  228. /package/{build/Container → Container}/Container.js +0 -0
  229. /package/{build/Container → Container}/Container.js.map +0 -0
  230. /package/{build/Container → Container}/Contracts.d.ts +0 -0
  231. /package/{build/Container → Container}/Contracts.d.ts.map +0 -0
  232. /package/{build/Container → Container}/Contracts.js +0 -0
  233. /package/{build/Container → Container}/Contracts.js.map +0 -0
  234. /package/{build/Container → Container}/Decorators.d.ts +0 -0
  235. /package/{build/Container → Container}/Decorators.d.ts.map +0 -0
  236. /package/{build/Container → Container}/Decorators.js +0 -0
  237. /package/{build/Container → Container}/Decorators.js.map +0 -0
  238. /package/{build/Container → Container}/Metadata.d.ts +0 -0
  239. /package/{build/Container → Container}/Metadata.d.ts.map +0 -0
  240. /package/{build/Container → Container}/Metadata.js +0 -0
  241. /package/{build/Container → Container}/Metadata.js.map +0 -0
  242. /package/{build/Container → Container}/Resolver.d.ts +0 -0
  243. /package/{build/Container → Container}/Resolver.d.ts.map +0 -0
  244. /package/{build/Container → Container}/Resolver.js +0 -0
  245. /package/{build/Container → Container}/Resolver.js.map +0 -0
  246. /package/{build/Container → Container}/index.d.ts +0 -0
  247. /package/{build/Container → Container}/index.d.ts.map +0 -0
  248. /package/{build/Container → Container}/index.js +0 -0
  249. /package/{build/Container → Container}/index.js.map +0 -0
  250. /package/{build/Database → Database}/Clauses/Where.d.ts +0 -0
  251. /package/{build/Database → Database}/Clauses/Where.d.ts.map +0 -0
  252. /package/{build/Database → Database}/Clauses/Where.js +0 -0
  253. /package/{build/Database → Database}/Clauses/Where.js.map +0 -0
  254. /package/{build/Database → Database}/Connection.d.ts +0 -0
  255. /package/{build/Database → Database}/Connection.d.ts.map +0 -0
  256. /package/{build/Database → Database}/Connection.js +0 -0
  257. /package/{build/Database → Database}/Connection.js.map +0 -0
  258. /package/{build/Database → Database}/Decorators.d.ts +0 -0
  259. /package/{build/Database → Database}/Decorators.d.ts.map +0 -0
  260. /package/{build/Database → Database}/Decorators.js +0 -0
  261. /package/{build/Database → Database}/Decorators.js.map +0 -0
  262. /package/{build/Database → Database}/Drivers/DatabaseDriver.d.ts +0 -0
  263. /package/{build/Database → Database}/Drivers/DatabaseDriver.d.ts.map +0 -0
  264. /package/{build/Database → Database}/Drivers/DatabaseDriver.js +0 -0
  265. /package/{build/Database → Database}/Drivers/DatabaseDriver.js.map +0 -0
  266. /package/{build/Database → Database}/Drivers/MySQL/Alter/index.d.ts +0 -0
  267. /package/{build/Database → Database}/Drivers/MySQL/Alter/index.d.ts.map +0 -0
  268. /package/{build/Database → Database}/Drivers/MySQL/Alter/index.js +0 -0
  269. /package/{build/Database → Database}/Drivers/MySQL/Alter/index.js.map +0 -0
  270. /package/{build/Database → Database}/Drivers/MySQL/ColumnDefinition.d.ts +0 -0
  271. /package/{build/Database → Database}/Drivers/MySQL/ColumnDefinition.d.ts.map +0 -0
  272. /package/{build/Database → Database}/Drivers/MySQL/ColumnDefinition.js +0 -0
  273. /package/{build/Database → Database}/Drivers/MySQL/ColumnDefinition.js.map +0 -0
  274. /package/{build/Database → Database}/Drivers/MySQL/Create.d.ts +0 -0
  275. /package/{build/Database → Database}/Drivers/MySQL/Create.d.ts.map +0 -0
  276. /package/{build/Database → Database}/Drivers/MySQL/Create.js +0 -0
  277. /package/{build/Database → Database}/Drivers/MySQL/Create.js.map +0 -0
  278. /package/{build/Database → Database}/Drivers/MySQL/MysqlDriver.d.ts +0 -0
  279. /package/{build/Database → Database}/Drivers/MySQL/MysqlDriver.d.ts.map +0 -0
  280. /package/{build/Database → Database}/Drivers/MySQL/MysqlDriver.js +0 -0
  281. /package/{build/Database → Database}/Drivers/MySQL/MysqlDriver.js.map +0 -0
  282. /package/{build/Database → Database}/Drivers/MySQL/Schema.d.ts +0 -0
  283. /package/{build/Database → Database}/Drivers/MySQL/Schema.d.ts.map +0 -0
  284. /package/{build/Database → Database}/Drivers/MySQL/Schema.js +0 -0
  285. /package/{build/Database → Database}/Drivers/MySQL/Schema.js.map +0 -0
  286. /package/{build/Database → Database}/Drivers/MySQL/index.d.ts +0 -0
  287. /package/{build/Database → Database}/Drivers/MySQL/index.d.ts.map +0 -0
  288. /package/{build/Database → Database}/Drivers/MySQL/index.js +0 -0
  289. /package/{build/Database → Database}/Drivers/MySQL/index.js.map +0 -0
  290. /package/{build/Database → Database}/Drivers/SQL/Schema.d.ts +0 -0
  291. /package/{build/Database → Database}/Drivers/SQL/Schema.d.ts.map +0 -0
  292. /package/{build/Database → Database}/Drivers/SQL/Schema.js +0 -0
  293. /package/{build/Database → Database}/Drivers/SQL/Schema.js.map +0 -0
  294. /package/{build/Database → Database}/Drivers/SQL/Statements/Alter.d.ts +0 -0
  295. /package/{build/Database → Database}/Drivers/SQL/Statements/Alter.d.ts.map +0 -0
  296. /package/{build/Database → Database}/Drivers/SQL/Statements/Alter.js +0 -0
  297. /package/{build/Database → Database}/Drivers/SQL/Statements/Alter.js.map +0 -0
  298. /package/{build/Database → Database}/Drivers/SQL/Statements/BaseStatement.d.ts +0 -0
  299. /package/{build/Database → Database}/Drivers/SQL/Statements/BaseStatement.d.ts.map +0 -0
  300. /package/{build/Database → Database}/Drivers/SQL/Statements/BaseStatement.js +0 -0
  301. /package/{build/Database → Database}/Drivers/SQL/Statements/BaseStatement.js.map +0 -0
  302. /package/{build/Database → Database}/Drivers/SQL/Statements/Delete.d.ts +0 -0
  303. /package/{build/Database → Database}/Drivers/SQL/Statements/Delete.d.ts.map +0 -0
  304. /package/{build/Database → Database}/Drivers/SQL/Statements/Delete.js +0 -0
  305. /package/{build/Database → Database}/Drivers/SQL/Statements/Delete.js.map +0 -0
  306. /package/{build/Database → Database}/Drivers/SQL/Statements/Insert.d.ts +0 -0
  307. /package/{build/Database → Database}/Drivers/SQL/Statements/Insert.d.ts.map +0 -0
  308. /package/{build/Database → Database}/Drivers/SQL/Statements/Insert.js +0 -0
  309. /package/{build/Database → Database}/Drivers/SQL/Statements/Insert.js.map +0 -0
  310. /package/{build/Database → Database}/Drivers/SQL/Statements/Select.d.ts +0 -0
  311. /package/{build/Database → Database}/Drivers/SQL/Statements/Select.d.ts.map +0 -0
  312. /package/{build/Database → Database}/Drivers/SQL/Statements/Select.js +0 -0
  313. /package/{build/Database → Database}/Drivers/SQL/Statements/Select.js.map +0 -0
  314. /package/{build/Database → Database}/Drivers/SQL/Statements/Update.d.ts +0 -0
  315. /package/{build/Database → Database}/Drivers/SQL/Statements/Update.d.ts.map +0 -0
  316. /package/{build/Database → Database}/Drivers/SQL/Statements/Update.js +0 -0
  317. /package/{build/Database → Database}/Drivers/SQL/Statements/Update.js.map +0 -0
  318. /package/{build/Database → Database}/Drivers/SQL/index.d.ts +0 -0
  319. /package/{build/Database → Database}/Drivers/SQL/index.d.ts.map +0 -0
  320. /package/{build/Database → Database}/Drivers/SQL/index.js +0 -0
  321. /package/{build/Database → Database}/Drivers/SQL/index.js.map +0 -0
  322. /package/{build/Database → Database}/Drivers/SQLite/Create.d.ts +0 -0
  323. /package/{build/Database → Database}/Drivers/SQLite/Create.d.ts.map +0 -0
  324. /package/{build/Database → Database}/Drivers/SQLite/Create.js +0 -0
  325. /package/{build/Database → Database}/Drivers/SQLite/Create.js.map +0 -0
  326. /package/{build/Database → Database}/Drivers/SQLite/Schema.d.ts +0 -0
  327. /package/{build/Database → Database}/Drivers/SQLite/Schema.d.ts.map +0 -0
  328. /package/{build/Database → Database}/Drivers/SQLite/Schema.js +0 -0
  329. /package/{build/Database → Database}/Drivers/SQLite/Schema.js.map +0 -0
  330. /package/{build/Database → Database}/Drivers/SQLite/SqliteDriver.d.ts +0 -0
  331. /package/{build/Database → Database}/Drivers/SQLite/SqliteDriver.d.ts.map +0 -0
  332. /package/{build/Database → Database}/Drivers/SQLite/SqliteDriver.js +0 -0
  333. /package/{build/Database → Database}/Drivers/SQLite/SqliteDriver.js.map +0 -0
  334. /package/{build/Database → Database}/Drivers/SQLite/index.d.ts +0 -0
  335. /package/{build/Database → Database}/Drivers/SQLite/index.d.ts.map +0 -0
  336. /package/{build/Database → Database}/Drivers/SQLite/index.js +0 -0
  337. /package/{build/Database → Database}/Drivers/SQLite/index.js.map +0 -0
  338. /package/{build/Database → Database}/Drivers/SchemaContract.d.ts +0 -0
  339. /package/{build/Database → Database}/Drivers/SchemaContract.d.ts.map +0 -0
  340. /package/{build/Database → Database}/Drivers/SchemaContract.js +0 -0
  341. /package/{build/Database → Database}/Drivers/SchemaContract.js.map +0 -0
  342. /package/{build/Database → Database}/Drivers/Statement.d.ts +0 -0
  343. /package/{build/Database → Database}/Drivers/Statement.d.ts.map +0 -0
  344. /package/{build/Database → Database}/Drivers/Statement.js +0 -0
  345. /package/{build/Database → Database}/Drivers/Statement.js.map +0 -0
  346. /package/{build/Database → Database}/Drivers/index.d.ts +0 -0
  347. /package/{build/Database → Database}/Drivers/index.d.ts.map +0 -0
  348. /package/{build/Database → Database}/Drivers/index.js +0 -0
  349. /package/{build/Database → Database}/Drivers/index.js.map +0 -0
  350. /package/{build/Database → Database}/Entity.d.ts +0 -0
  351. /package/{build/Database → Database}/Entity.d.ts.map +0 -0
  352. /package/{build/Database → Database}/Entity.js +0 -0
  353. /package/{build/Database → Database}/Entity.js.map +0 -0
  354. /package/{build/Database → Database}/EntityNotFoundError.d.ts +0 -0
  355. /package/{build/Database → Database}/EntityNotFoundError.d.ts.map +0 -0
  356. /package/{build/Database → Database}/EntityNotFoundError.js +0 -0
  357. /package/{build/Database → Database}/EntityNotFoundError.js.map +0 -0
  358. /package/{build/Database → Database}/EntityProxyHandler.d.ts +0 -0
  359. /package/{build/Database → Database}/EntityProxyHandler.d.ts.map +0 -0
  360. /package/{build/Database → Database}/EntityProxyHandler.js +0 -0
  361. /package/{build/Database → Database}/EntityProxyHandler.js.map +0 -0
  362. /package/{build/Database → Database}/EntityQuery.d.ts +0 -0
  363. /package/{build/Database → Database}/EntityQuery.d.ts.map +0 -0
  364. /package/{build/Database → Database}/EntityQuery.js +0 -0
  365. /package/{build/Database → Database}/EntityQuery.js.map +0 -0
  366. /package/{build/Database → Database}/Expression.d.ts +0 -0
  367. /package/{build/Database → Database}/Expression.d.ts.map +0 -0
  368. /package/{build/Database → Database}/Expression.js +0 -0
  369. /package/{build/Database → Database}/Expression.js.map +0 -0
  370. /package/{build/Database → Database}/Fields.d.ts +0 -0
  371. /package/{build/Database → Database}/Fields.d.ts.map +0 -0
  372. /package/{build/Database → Database}/Fields.js +0 -0
  373. /package/{build/Database → Database}/Fields.js.map +0 -0
  374. /package/{build/Database → Database}/Helpers.d.ts +0 -0
  375. /package/{build/Database → Database}/Helpers.d.ts.map +0 -0
  376. /package/{build/Database → Database}/Helpers.js +0 -0
  377. /package/{build/Database → Database}/Helpers.js.map +0 -0
  378. /package/{build/Database → Database}/List.d.ts +0 -0
  379. /package/{build/Database → Database}/List.d.ts.map +0 -0
  380. /package/{build/Database → Database}/List.js +0 -0
  381. /package/{build/Database → Database}/List.js.map +0 -0
  382. /package/{build/Database → Database}/Migrations/Migration.d.ts +0 -0
  383. /package/{build/Database → Database}/Migrations/Migration.d.ts.map +0 -0
  384. /package/{build/Database → Database}/Migrations/Migration.js +0 -0
  385. /package/{build/Database → Database}/Migrations/Migration.js.map +0 -0
  386. /package/{build/Database → Database}/Migrations/MigrationHistory.d.ts +0 -0
  387. /package/{build/Database → Database}/Migrations/MigrationHistory.d.ts.map +0 -0
  388. /package/{build/Database → Database}/Migrations/MigrationHistory.js +0 -0
  389. /package/{build/Database → Database}/Migrations/MigrationHistory.js.map +0 -0
  390. /package/{build/Database → Database}/Migrations/Migrator.d.ts +0 -0
  391. /package/{build/Database → Database}/Migrations/Migrator.d.ts.map +0 -0
  392. /package/{build/Database → Database}/Migrations/Migrator.js +0 -0
  393. /package/{build/Database → Database}/Migrations/Migrator.js.map +0 -0
  394. /package/{build/Database → Database}/Migrations/index.d.ts +0 -0
  395. /package/{build/Database → Database}/Migrations/index.d.ts.map +0 -0
  396. /package/{build/Database → Database}/Migrations/index.js +0 -0
  397. /package/{build/Database → Database}/Migrations/index.js.map +0 -0
  398. /package/{build/Database → Database}/ORM/BaseRelationship.d.ts +0 -0
  399. /package/{build/Database → Database}/ORM/BaseRelationship.d.ts.map +0 -0
  400. /package/{build/Database → Database}/ORM/BaseRelationship.js +0 -0
  401. /package/{build/Database → Database}/ORM/BaseRelationship.js.map +0 -0
  402. /package/{build/Database → Database}/Query.d.ts +0 -0
  403. /package/{build/Database → Database}/Query.d.ts.map +0 -0
  404. /package/{build/Database → Database}/Query.js +0 -0
  405. /package/{build/Database → Database}/Query.js.map +0 -0
  406. /package/{build/Database → Database}/Seeders/Seeder.d.ts +0 -0
  407. /package/{build/Database → Database}/Seeders/Seeder.d.ts.map +0 -0
  408. /package/{build/Database → Database}/Seeders/Seeder.js +0 -0
  409. /package/{build/Database → Database}/Seeders/Seeder.js.map +0 -0
  410. /package/{build/Database → Database}/Seeders/SeederManager.d.ts +0 -0
  411. /package/{build/Database → Database}/Seeders/SeederManager.d.ts.map +0 -0
  412. /package/{build/Database → Database}/Seeders/SeederManager.js +0 -0
  413. /package/{build/Database → Database}/Seeders/SeederManager.js.map +0 -0
  414. /package/{build/Database → Database}/Seeders/index.d.ts +0 -0
  415. /package/{build/Database → Database}/Seeders/index.d.ts.map +0 -0
  416. /package/{build/Database → Database}/Seeders/index.js +0 -0
  417. /package/{build/Database → Database}/Seeders/index.js.map +0 -0
  418. /package/{build/Database → Database}/StringExpression.d.ts +0 -0
  419. /package/{build/Database → Database}/StringExpression.d.ts.map +0 -0
  420. /package/{build/Database → Database}/StringExpression.js +0 -0
  421. /package/{build/Database → Database}/StringExpression.js.map +0 -0
  422. /package/{build/Database → Database}/Types.d.ts +0 -0
  423. /package/{build/Database → Database}/Types.d.ts.map +0 -0
  424. /package/{build/Database → Database}/Types.js +0 -0
  425. /package/{build/Database → Database}/Types.js.map +0 -0
  426. /package/{build/Database → Database}/index.d.ts +0 -0
  427. /package/{build/Database → Database}/index.d.ts.map +0 -0
  428. /package/{build/Database → Database}/index.js +0 -0
  429. /package/{build/Database → Database}/index.js.map +0 -0
  430. /package/{build/Encryption → Encryption}/index.d.ts +0 -0
  431. /package/{build/Encryption → Encryption}/index.d.ts.map +0 -0
  432. /package/{build/Encryption → Encryption}/index.js +0 -0
  433. /package/{build/Encryption → Encryption}/index.js.map +0 -0
  434. /package/{build/Forms → Forms}/Decorators.d.ts +0 -0
  435. /package/{build/Forms → Forms}/Decorators.d.ts.map +0 -0
  436. /package/{build/Forms → Forms}/Decorators.js +0 -0
  437. /package/{build/Forms → Forms}/Decorators.js.map +0 -0
  438. /package/{build/Forms → Forms}/Form.d.ts +0 -0
  439. /package/{build/Forms → Forms}/Form.d.ts.map +0 -0
  440. /package/{build/Forms → Forms}/Form.js +0 -0
  441. /package/{build/Forms → Forms}/Form.js.map +0 -0
  442. /package/{build/Forms → Forms}/FormFields.d.ts +0 -0
  443. /package/{build/Forms → Forms}/FormFields.d.ts.map +0 -0
  444. /package/{build/Forms → Forms}/FormFields.js +0 -0
  445. /package/{build/Forms → Forms}/FormFields.js.map +0 -0
  446. /package/{build/Forms → Forms}/index.d.ts +0 -0
  447. /package/{build/Forms → Forms}/index.d.ts.map +0 -0
  448. /package/{build/Forms → Forms}/index.js +0 -0
  449. /package/{build/Forms → Forms}/index.js.map +0 -0
  450. /package/{build/Framework → Framework}/App.d.ts +0 -0
  451. /package/{build/Framework → Framework}/App.d.ts.map +0 -0
  452. /package/{build/Framework → Framework}/App.js +0 -0
  453. /package/{build/Framework → Framework}/App.js.map +0 -0
  454. /package/{build/Framework → Framework}/Application.d.ts +0 -0
  455. /package/{build/Framework → Framework}/Application.d.ts.map +0 -0
  456. /package/{build/Framework → Framework}/Application.js +0 -0
  457. /package/{build/Framework → Framework}/Application.js.map +0 -0
  458. /package/{build/Framework → Framework}/Auth/Auth.d.ts +0 -0
  459. /package/{build/Framework → Framework}/Auth/Auth.d.ts.map +0 -0
  460. /package/{build/Framework → Framework}/Auth/Auth.js +0 -0
  461. /package/{build/Framework → Framework}/Auth/Auth.js.map +0 -0
  462. /package/{build/Framework → Framework}/Auth/Authenticatable.d.ts +0 -0
  463. /package/{build/Framework → Framework}/Auth/Authenticatable.d.ts.map +0 -0
  464. /package/{build/Framework → Framework}/Auth/Authenticatable.js +0 -0
  465. /package/{build/Framework → Framework}/Auth/Authenticatable.js.map +0 -0
  466. /package/{build/Framework → Framework}/Auth/User.d.ts +0 -0
  467. /package/{build/Framework → Framework}/Auth/User.d.ts.map +0 -0
  468. /package/{build/Framework → Framework}/Auth/User.js +0 -0
  469. /package/{build/Framework → Framework}/Auth/User.js.map +0 -0
  470. /package/{build/Framework → Framework}/Auth/index.d.ts +0 -0
  471. /package/{build/Framework → Framework}/Auth/index.d.ts.map +0 -0
  472. /package/{build/Framework → Framework}/Auth/index.js +0 -0
  473. /package/{build/Framework → Framework}/Auth/index.js.map +0 -0
  474. /package/{build/Framework → Framework}/Config/AppConfig.d.ts +0 -0
  475. /package/{build/Framework → Framework}/Config/AppConfig.d.ts.map +0 -0
  476. /package/{build/Framework → Framework}/Config/AppConfig.js +0 -0
  477. /package/{build/Framework → Framework}/Config/AppConfig.js.map +0 -0
  478. /package/{build/Framework → Framework}/Config/AuthConfig.d.ts +0 -0
  479. /package/{build/Framework → Framework}/Config/AuthConfig.d.ts.map +0 -0
  480. /package/{build/Framework → Framework}/Config/AuthConfig.js +0 -0
  481. /package/{build/Framework → Framework}/Config/AuthConfig.js.map +0 -0
  482. /package/{build/Framework → Framework}/Config/BaseConfig.d.ts +0 -0
  483. /package/{build/Framework → Framework}/Config/BaseConfig.d.ts.map +0 -0
  484. /package/{build/Framework → Framework}/Config/BaseConfig.js +0 -0
  485. /package/{build/Framework → Framework}/Config/BaseConfig.js.map +0 -0
  486. /package/{build/Framework → Framework}/Config/CacheConfig.d.ts +0 -0
  487. /package/{build/Framework → Framework}/Config/CacheConfig.d.ts.map +0 -0
  488. /package/{build/Framework → Framework}/Config/CacheConfig.js +0 -0
  489. /package/{build/Framework → Framework}/Config/CacheConfig.js.map +0 -0
  490. /package/{build/Framework → Framework}/Config/DatabaseConfig.d.ts +0 -0
  491. /package/{build/Framework → Framework}/Config/DatabaseConfig.d.ts.map +0 -0
  492. /package/{build/Framework → Framework}/Config/DatabaseConfig.js +0 -0
  493. /package/{build/Framework → Framework}/Config/DatabaseConfig.js.map +0 -0
  494. /package/{build/Framework → Framework}/Config/MailConfig.d.ts +0 -0
  495. /package/{build/Framework → Framework}/Config/MailConfig.d.ts.map +0 -0
  496. /package/{build/Framework → Framework}/Config/MailConfig.js +0 -0
  497. /package/{build/Framework → Framework}/Config/MailConfig.js.map +0 -0
  498. /package/{build/Framework → Framework}/Config/index.d.ts +0 -0
  499. /package/{build/Framework → Framework}/Config/index.d.ts.map +0 -0
  500. /package/{build/Framework → Framework}/Config/index.js +0 -0
  501. /package/{build/Framework → Framework}/Config/index.js.map +0 -0
  502. /package/{build/Framework → Framework}/Middleware/AuthMiddleware.d.ts +0 -0
  503. /package/{build/Framework → Framework}/Middleware/AuthMiddleware.d.ts.map +0 -0
  504. /package/{build/Framework → Framework}/Middleware/AuthMiddleware.js +0 -0
  505. /package/{build/Framework → Framework}/Middleware/AuthMiddleware.js.map +0 -0
  506. /package/{build/Framework → Framework}/Middleware/CorsMiddleware.d.ts +0 -0
  507. /package/{build/Framework → Framework}/Middleware/CorsMiddleware.d.ts.map +0 -0
  508. /package/{build/Framework → Framework}/Middleware/CorsMiddleware.js +0 -0
  509. /package/{build/Framework → Framework}/Middleware/CorsMiddleware.js.map +0 -0
  510. /package/{build/Framework → Framework}/Middleware/StaticAssetsMiddleware.d.ts +0 -0
  511. /package/{build/Framework → Framework}/Middleware/StaticAssetsMiddleware.d.ts.map +0 -0
  512. /package/{build/Framework → Framework}/Middleware/StaticAssetsMiddleware.js +0 -0
  513. /package/{build/Framework → Framework}/Middleware/StaticAssetsMiddleware.js.map +0 -0
  514. /package/{build/Framework → Framework}/Middleware/index.d.ts +0 -0
  515. /package/{build/Framework → Framework}/Middleware/index.d.ts.map +0 -0
  516. /package/{build/Framework → Framework}/Middleware/index.js +0 -0
  517. /package/{build/Framework → Framework}/Middleware/index.js.map +0 -0
  518. /package/{build/Framework → Framework}/Provider.d.ts +0 -0
  519. /package/{build/Framework → Framework}/Provider.d.ts.map +0 -0
  520. /package/{build/Framework → Framework}/Provider.js +0 -0
  521. /package/{build/Framework → Framework}/Provider.js.map +0 -0
  522. /package/{build/Framework → Framework}/Providers/CacheProvider.d.ts +0 -0
  523. /package/{build/Framework → Framework}/Providers/CacheProvider.d.ts.map +0 -0
  524. /package/{build/Framework → Framework}/Providers/CacheProvider.js +0 -0
  525. /package/{build/Framework → Framework}/Providers/CacheProvider.js.map +0 -0
  526. /package/{build/Framework → Framework}/Providers/DatabaseProvider.d.ts +0 -0
  527. /package/{build/Framework → Framework}/Providers/DatabaseProvider.d.ts.map +0 -0
  528. /package/{build/Framework → Framework}/Providers/DatabaseProvider.js +0 -0
  529. /package/{build/Framework → Framework}/Providers/DatabaseProvider.js.map +0 -0
  530. /package/{build/Framework → Framework}/Providers/MailProvider.d.ts +0 -0
  531. /package/{build/Framework → Framework}/Providers/MailProvider.d.ts.map +0 -0
  532. /package/{build/Framework → Framework}/Providers/MailProvider.js +0 -0
  533. /package/{build/Framework → Framework}/Providers/MailProvider.js.map +0 -0
  534. /package/{build/Framework → Framework}/Providers/WebsocketsProvider.d.ts +0 -0
  535. /package/{build/Framework → Framework}/Providers/WebsocketsProvider.d.ts.map +0 -0
  536. /package/{build/Framework → Framework}/Providers/WebsocketsProvider.js +0 -0
  537. /package/{build/Framework → Framework}/Providers/WebsocketsProvider.js.map +0 -0
  538. /package/{build/Framework → Framework}/Resolvers/AuthResolver.d.ts +0 -0
  539. /package/{build/Framework → Framework}/Resolvers/AuthResolver.d.ts.map +0 -0
  540. /package/{build/Framework → Framework}/Resolvers/AuthResolver.js +0 -0
  541. /package/{build/Framework → Framework}/Resolvers/AuthResolver.js.map +0 -0
  542. /package/{build/Framework → Framework}/Resolvers/EntityResolver.d.ts +0 -0
  543. /package/{build/Framework → Framework}/Resolvers/EntityResolver.d.ts.map +0 -0
  544. /package/{build/Framework → Framework}/Resolvers/EntityResolver.js +0 -0
  545. /package/{build/Framework → Framework}/Resolvers/EntityResolver.js.map +0 -0
  546. /package/{build/Framework → Framework}/Resolvers/FormResolver.d.ts +0 -0
  547. /package/{build/Framework → Framework}/Resolvers/FormResolver.d.ts.map +0 -0
  548. /package/{build/Framework → Framework}/Resolvers/FormResolver.js +0 -0
  549. /package/{build/Framework → Framework}/Resolvers/FormResolver.js.map +0 -0
  550. /package/{build/Framework → Framework}/RootDir.d.ts +0 -0
  551. /package/{build/Framework → Framework}/RootDir.d.ts.map +0 -0
  552. /package/{build/Framework → Framework}/RootDir.js +0 -0
  553. /package/{build/Framework → Framework}/RootDir.js.map +0 -0
  554. /package/{build/Framework → Framework}/index.d.ts +0 -0
  555. /package/{build/Framework → Framework}/index.d.ts.map +0 -0
  556. /package/{build/Framework → Framework}/index.js +0 -0
  557. /package/{build/Framework → Framework}/index.js.map +0 -0
  558. /package/{build/Mail → Mail}/MailAddress.d.ts +0 -0
  559. /package/{build/Mail → Mail}/MailAddress.d.ts.map +0 -0
  560. /package/{build/Mail → Mail}/MailAddress.js +0 -0
  561. /package/{build/Mail → Mail}/MailAddress.js.map +0 -0
  562. /package/{build/Mail → Mail}/MailTransport.d.ts +0 -0
  563. /package/{build/Mail → Mail}/MailTransport.d.ts.map +0 -0
  564. /package/{build/Mail → Mail}/MailTransport.js +0 -0
  565. /package/{build/Mail → Mail}/MailTransport.js.map +0 -0
  566. /package/{build/Mail → Mail}/Mailable.d.ts +0 -0
  567. /package/{build/Mail → Mail}/Mailable.d.ts.map +0 -0
  568. /package/{build/Mail → Mail}/Mailable.js +0 -0
  569. /package/{build/Mail → Mail}/Mailable.js.map +0 -0
  570. /package/{build/Mail → Mail}/Mailer.d.ts +0 -0
  571. /package/{build/Mail → Mail}/Mailer.d.ts.map +0 -0
  572. /package/{build/Mail → Mail}/Mailer.js +0 -0
  573. /package/{build/Mail → Mail}/Mailer.js.map +0 -0
  574. /package/{build/Mail → Mail}/PendingMail.d.ts +0 -0
  575. /package/{build/Mail → Mail}/PendingMail.d.ts.map +0 -0
  576. /package/{build/Mail → Mail}/PendingMail.js +0 -0
  577. /package/{build/Mail → Mail}/PendingMail.js.map +0 -0
  578. /package/{build/Mail → Mail}/SentMessage.d.ts +0 -0
  579. /package/{build/Mail → Mail}/SentMessage.d.ts.map +0 -0
  580. /package/{build/Mail → Mail}/SentMessage.js +0 -0
  581. /package/{build/Mail → Mail}/SentMessage.js.map +0 -0
  582. /package/{build/Mail → Mail}/Transports/MemoryTransport.d.ts +0 -0
  583. /package/{build/Mail → Mail}/Transports/MemoryTransport.d.ts.map +0 -0
  584. /package/{build/Mail → Mail}/Transports/MemoryTransport.js +0 -0
  585. /package/{build/Mail → Mail}/Transports/MemoryTransport.js.map +0 -0
  586. /package/{build/Mail → Mail}/Transports/SendGridTransport.d.ts +0 -0
  587. /package/{build/Mail → Mail}/Transports/SendGridTransport.d.ts.map +0 -0
  588. /package/{build/Mail → Mail}/Transports/SendGridTransport.js +0 -0
  589. /package/{build/Mail → Mail}/Transports/SendGridTransport.js.map +0 -0
  590. /package/{build/Mail → Mail}/index.d.ts +0 -0
  591. /package/{build/Mail → Mail}/index.d.ts.map +0 -0
  592. /package/{build/Mail → Mail}/index.js +0 -0
  593. /package/{build/Mail → Mail}/index.js.map +0 -0
  594. /package/{build/Models → Models}/Model.d.ts +0 -0
  595. /package/{build/Models → Models}/Model.d.ts.map +0 -0
  596. /package/{build/Models → Models}/Model.js +0 -0
  597. /package/{build/Models → Models}/Model.js.map +0 -0
  598. /package/{build/Models → Models}/index.d.ts +0 -0
  599. /package/{build/Models → Models}/index.d.ts.map +0 -0
  600. /package/{build/Models → Models}/index.js +0 -0
  601. /package/{build/Models → Models}/index.js.map +0 -0
  602. /package/{build/Router → Router}/BaseController.d.ts +0 -0
  603. /package/{build/Router → Router}/BaseController.d.ts.map +0 -0
  604. /package/{build/Router → Router}/BaseController.js +0 -0
  605. /package/{build/Router → Router}/BaseController.js.map +0 -0
  606. /package/{build/Router → Router}/Decorators.d.ts +0 -0
  607. /package/{build/Router → Router}/Decorators.d.ts.map +0 -0
  608. /package/{build/Router → Router}/Decorators.js +0 -0
  609. /package/{build/Router → Router}/Decorators.js.map +0 -0
  610. /package/{build/Router → Router}/Guard.d.ts +0 -0
  611. /package/{build/Router → Router}/Guard.d.ts.map +0 -0
  612. /package/{build/Router → Router}/Guard.js +0 -0
  613. /package/{build/Router → Router}/Guard.js.map +0 -0
  614. /package/{build/Router → Router}/Http/Contracts.d.ts +0 -0
  615. /package/{build/Router → Router}/Http/Contracts.d.ts.map +0 -0
  616. /package/{build/Router → Router}/Http/Contracts.js +0 -0
  617. /package/{build/Router → Router}/Http/Contracts.js.map +0 -0
  618. /package/{build/Router → Router}/Http/ErrorHandler.d.ts +0 -0
  619. /package/{build/Router → Router}/Http/ErrorHandler.d.ts.map +0 -0
  620. /package/{build/Router → Router}/Http/ErrorHandler.js +0 -0
  621. /package/{build/Router → Router}/Http/ErrorHandler.js.map +0 -0
  622. /package/{build/Router → Router}/Http/ErrorHandlerInterface.d.ts +0 -0
  623. /package/{build/Router → Router}/Http/ErrorHandlerInterface.d.ts.map +0 -0
  624. /package/{build/Router → Router}/Http/ErrorHandlerInterface.js +0 -0
  625. /package/{build/Router → Router}/Http/ErrorHandlerInterface.js.map +0 -0
  626. /package/{build/Router → Router}/Http/Errors/HttpError.d.ts +0 -0
  627. /package/{build/Router → Router}/Http/Errors/HttpError.d.ts.map +0 -0
  628. /package/{build/Router → Router}/Http/Errors/HttpError.js +0 -0
  629. /package/{build/Router → Router}/Http/Errors/HttpError.js.map +0 -0
  630. /package/{build/Router → Router}/Http/Handler.d.ts +0 -0
  631. /package/{build/Router → Router}/Http/Handler.d.ts.map +0 -0
  632. /package/{build/Router → Router}/Http/Handler.js +0 -0
  633. /package/{build/Router → Router}/Http/Handler.js.map +0 -0
  634. /package/{build/Router → Router}/Http/HttpRoute.d.ts +0 -0
  635. /package/{build/Router → Router}/Http/HttpRoute.d.ts.map +0 -0
  636. /package/{build/Router → Router}/Http/HttpRoute.js +0 -0
  637. /package/{build/Router → Router}/Http/HttpRoute.js.map +0 -0
  638. /package/{build/Router → Router}/Http/Middleware.d.ts +0 -0
  639. /package/{build/Router → Router}/Http/Middleware.d.ts.map +0 -0
  640. /package/{build/Router → Router}/Http/Middleware.js +0 -0
  641. /package/{build/Router → Router}/Http/Middleware.js.map +0 -0
  642. /package/{build/Router → Router}/Http/Request.d.ts +0 -0
  643. /package/{build/Router → Router}/Http/Request.d.ts.map +0 -0
  644. /package/{build/Router → Router}/Http/Request.js +0 -0
  645. /package/{build/Router → Router}/Http/Request.js.map +0 -0
  646. /package/{build/Router → Router}/Http/Response.d.ts +0 -0
  647. /package/{build/Router → Router}/Http/Response.d.ts.map +0 -0
  648. /package/{build/Router → Router}/Http/Response.js +0 -0
  649. /package/{build/Router → Router}/Http/Response.js.map +0 -0
  650. /package/{build/Router → Router}/Http/index.d.ts +0 -0
  651. /package/{build/Router → Router}/Http/index.d.ts.map +0 -0
  652. /package/{build/Router → Router}/Http/index.js +0 -0
  653. /package/{build/Router → Router}/Http/index.js.map +0 -0
  654. /package/{build/Router → Router}/Metadata.d.ts +0 -0
  655. /package/{build/Router → Router}/Metadata.d.ts.map +0 -0
  656. /package/{build/Router → Router}/Metadata.js +0 -0
  657. /package/{build/Router → Router}/Metadata.js.map +0 -0
  658. /package/{build/Router → Router}/Middleware.d.ts +0 -0
  659. /package/{build/Router → Router}/Middleware.d.ts.map +0 -0
  660. /package/{build/Router → Router}/Middleware.js +0 -0
  661. /package/{build/Router → Router}/Middleware.js.map +0 -0
  662. /package/{build/Router → Router}/Request.d.ts +0 -0
  663. /package/{build/Router → Router}/Request.d.ts.map +0 -0
  664. /package/{build/Router → Router}/Request.js +0 -0
  665. /package/{build/Router → Router}/Request.js.map +0 -0
  666. /package/{build/Router → Router}/Route.d.ts +0 -0
  667. /package/{build/Router → Router}/Route.d.ts.map +0 -0
  668. /package/{build/Router → Router}/Route.js +0 -0
  669. /package/{build/Router → Router}/Route.js.map +0 -0
  670. /package/{build/Router → Router}/RouteNotFoundError.d.ts +0 -0
  671. /package/{build/Router → Router}/RouteNotFoundError.d.ts.map +0 -0
  672. /package/{build/Router → Router}/RouteNotFoundError.js +0 -0
  673. /package/{build/Router → Router}/RouteNotFoundError.js.map +0 -0
  674. /package/{build/Router → Router}/Router.d.ts +0 -0
  675. /package/{build/Router → Router}/Router.d.ts.map +0 -0
  676. /package/{build/Router → Router}/Router.js +0 -0
  677. /package/{build/Router → Router}/Router.js.map +0 -0
  678. /package/{build/Router → Router}/Servers/index.d.ts +0 -0
  679. /package/{build/Router → Router}/Servers/index.d.ts.map +0 -0
  680. /package/{build/Router → Router}/Servers/index.js +0 -0
  681. /package/{build/Router → Router}/Servers/index.js.map +0 -0
  682. /package/{build/Router → Router}/Servers/node.d.ts +0 -0
  683. /package/{build/Router → Router}/Servers/node.d.ts.map +0 -0
  684. /package/{build/Router → Router}/Servers/node.js +0 -0
  685. /package/{build/Router → Router}/Servers/node.js.map +0 -0
  686. /package/{build/Router → Router}/Servers/uNetworking.d.ts +0 -0
  687. /package/{build/Router → Router}/Servers/uNetworking.d.ts.map +0 -0
  688. /package/{build/Router → Router}/Servers/uNetworking.js +0 -0
  689. /package/{build/Router → Router}/Servers/uNetworking.js.map +0 -0
  690. /package/{build/Router → Router}/Websockets/Handler.d.ts +0 -0
  691. /package/{build/Router → Router}/Websockets/Handler.d.ts.map +0 -0
  692. /package/{build/Router → Router}/Websockets/Handler.js +0 -0
  693. /package/{build/Router → Router}/Websockets/Handler.js.map +0 -0
  694. /package/{build/Router → Router}/Websockets/Middleware.d.ts +0 -0
  695. /package/{build/Router → Router}/Websockets/Middleware.d.ts.map +0 -0
  696. /package/{build/Router → Router}/Websockets/Middleware.js +0 -0
  697. /package/{build/Router → Router}/Websockets/Middleware.js.map +0 -0
  698. /package/{build/Router → Router}/Websockets/Request.d.ts +0 -0
  699. /package/{build/Router → Router}/Websockets/Request.d.ts.map +0 -0
  700. /package/{build/Router → Router}/Websockets/Request.js +0 -0
  701. /package/{build/Router → Router}/Websockets/Request.js.map +0 -0
  702. /package/{build/Router → Router}/Websockets/WebsocketRoute.d.ts +0 -0
  703. /package/{build/Router → Router}/Websockets/WebsocketRoute.d.ts.map +0 -0
  704. /package/{build/Router → Router}/Websockets/WebsocketRoute.js +0 -0
  705. /package/{build/Router → Router}/Websockets/WebsocketRoute.js.map +0 -0
  706. /package/{build/Router → Router}/Websockets/index.d.ts +0 -0
  707. /package/{build/Router → Router}/Websockets/index.d.ts.map +0 -0
  708. /package/{build/Router → Router}/Websockets/index.js +0 -0
  709. /package/{build/Router → Router}/Websockets/index.js.map +0 -0
  710. /package/{build/Router → Router}/Websockets/types.d.ts +0 -0
  711. /package/{build/Router → Router}/Websockets/types.d.ts.map +0 -0
  712. /package/{build/Router → Router}/Websockets/types.js +0 -0
  713. /package/{build/Router → Router}/Websockets/types.js.map +0 -0
  714. /package/{build/Router → Router}/index.d.ts +0 -0
  715. /package/{build/Router → Router}/index.d.ts.map +0 -0
  716. /package/{build/Router → Router}/index.js +0 -0
  717. /package/{build/Router → Router}/index.js.map +0 -0
  718. /package/{build/Storage → Storage}/File.d.ts +0 -0
  719. /package/{build/Storage → Storage}/File.d.ts.map +0 -0
  720. /package/{build/Storage → Storage}/File.js +0 -0
  721. /package/{build/Storage → Storage}/File.js.map +0 -0
  722. /package/{build/Storage → Storage}/Image.d.ts +0 -0
  723. /package/{build/Storage → Storage}/Image.d.ts.map +0 -0
  724. /package/{build/Storage → Storage}/Image.js +0 -0
  725. /package/{build/Storage → Storage}/Image.js.map +0 -0
  726. /package/{build/Storage → Storage}/InvalidImage.d.ts +0 -0
  727. /package/{build/Storage → Storage}/InvalidImage.d.ts.map +0 -0
  728. /package/{build/Storage → Storage}/InvalidImage.js +0 -0
  729. /package/{build/Storage → Storage}/InvalidImage.js.map +0 -0
  730. /package/{build/Storage → Storage}/Storage.d.ts +0 -0
  731. /package/{build/Storage → Storage}/Storage.d.ts.map +0 -0
  732. /package/{build/Storage → Storage}/Storage.js +0 -0
  733. /package/{build/Storage → Storage}/Storage.js.map +0 -0
  734. /package/{build/Storage → Storage}/index.d.ts +0 -0
  735. /package/{build/Storage → Storage}/index.d.ts.map +0 -0
  736. /package/{build/Storage → Storage}/index.js +0 -0
  737. /package/{build/Storage → Storage}/index.js.map +0 -0
  738. /package/{build/Storage → Storage}/utils.d.ts +0 -0
  739. /package/{build/Storage → Storage}/utils.d.ts.map +0 -0
  740. /package/{build/Storage → Storage}/utils.js +0 -0
  741. /package/{build/Storage → Storage}/utils.js.map +0 -0
  742. /package/{build/Support → Support}/Array.d.ts +0 -0
  743. /package/{build/Support → Support}/Array.d.ts.map +0 -0
  744. /package/{build/Support → Support}/Array.js +0 -0
  745. /package/{build/Support → Support}/Array.js.map +0 -0
  746. /package/{build/Support → Support}/Math.d.ts +0 -0
  747. /package/{build/Support → Support}/Math.d.ts.map +0 -0
  748. /package/{build/Support → Support}/Math.js +0 -0
  749. /package/{build/Support → Support}/Math.js.map +0 -0
  750. /package/{build/Support → Support}/Metadata.d.ts +0 -0
  751. /package/{build/Support → Support}/Metadata.d.ts.map +0 -0
  752. /package/{build/Support → Support}/Metadata.js +0 -0
  753. /package/{build/Support → Support}/Metadata.js.map +0 -0
  754. /package/{build/Support → Support}/String.d.ts +0 -0
  755. /package/{build/Support → Support}/String.d.ts.map +0 -0
  756. /package/{build/Support → Support}/String.js +0 -0
  757. /package/{build/Support → Support}/String.js.map +0 -0
  758. /package/{build/Support → Support}/index.d.ts +0 -0
  759. /package/{build/Support → Support}/index.d.ts.map +0 -0
  760. /package/{build/Support → Support}/index.js +0 -0
  761. /package/{build/Support → Support}/index.js.map +0 -0
  762. /package/{build/Support → Support}/utils.d.ts +0 -0
  763. /package/{build/Support → Support}/utils.d.ts.map +0 -0
  764. /package/{build/Support → Support}/utils.js +0 -0
  765. /package/{build/Support → Support}/utils.js.map +0 -0
  766. /package/{build/Testing → Testing}/TestCase.d.ts +0 -0
  767. /package/{build/Testing → Testing}/TestCase.d.ts.map +0 -0
  768. /package/{build/Testing → Testing}/TestCase.js +0 -0
  769. /package/{build/Testing → Testing}/TestCase.js.map +0 -0
  770. /package/{build/Validation → Validation}/Rule.d.ts +0 -0
  771. /package/{build/Validation → Validation}/Rule.d.ts.map +0 -0
  772. /package/{build/Validation → Validation}/Rule.js +0 -0
  773. /package/{build/Validation → Validation}/Rule.js.map +0 -0
  774. /package/{build/Validation → Validation}/RuleInterface.d.ts +0 -0
  775. /package/{build/Validation → Validation}/RuleInterface.d.ts.map +0 -0
  776. /package/{build/Validation → Validation}/RuleInterface.js +0 -0
  777. /package/{build/Validation → Validation}/RuleInterface.js.map +0 -0
  778. /package/{build/Validation → Validation}/Rules/Email.d.ts +0 -0
  779. /package/{build/Validation → Validation}/Rules/Email.d.ts.map +0 -0
  780. /package/{build/Validation → Validation}/Rules/Email.js +0 -0
  781. /package/{build/Validation → Validation}/Rules/Email.js.map +0 -0
  782. /package/{build/Validation → Validation}/Rules/FileExtension.d.ts +0 -0
  783. /package/{build/Validation → Validation}/Rules/FileExtension.d.ts.map +0 -0
  784. /package/{build/Validation → Validation}/Rules/FileExtension.js +0 -0
  785. /package/{build/Validation → Validation}/Rules/FileExtension.js.map +0 -0
  786. /package/{build/Validation → Validation}/Rules/MaxLength.d.ts +0 -0
  787. /package/{build/Validation → Validation}/Rules/MaxLength.d.ts.map +0 -0
  788. /package/{build/Validation → Validation}/Rules/MaxLength.js +0 -0
  789. /package/{build/Validation → Validation}/Rules/MaxLength.js.map +0 -0
  790. /package/{build/Validation → Validation}/Rules/MinLength.d.ts +0 -0
  791. /package/{build/Validation → Validation}/Rules/MinLength.d.ts.map +0 -0
  792. /package/{build/Validation → Validation}/Rules/MinLength.js +0 -0
  793. /package/{build/Validation → Validation}/Rules/MinLength.js.map +0 -0
  794. /package/{build/Validation → Validation}/Rules/Optional.d.ts +0 -0
  795. /package/{build/Validation → Validation}/Rules/Optional.d.ts.map +0 -0
  796. /package/{build/Validation → Validation}/Rules/Optional.js +0 -0
  797. /package/{build/Validation → Validation}/Rules/Optional.js.map +0 -0
  798. /package/{build/Validation → Validation}/Rules/Required.d.ts +0 -0
  799. /package/{build/Validation → Validation}/Rules/Required.d.ts.map +0 -0
  800. /package/{build/Validation → Validation}/Rules/Required.js +0 -0
  801. /package/{build/Validation → Validation}/Rules/Required.js.map +0 -0
  802. /package/{build/Validation → Validation}/Validator.d.ts +0 -0
  803. /package/{build/Validation → Validation}/Validator.d.ts.map +0 -0
  804. /package/{build/Validation → Validation}/Validator.js +0 -0
  805. /package/{build/Validation → Validation}/Validator.js.map +0 -0
  806. /package/{build/Validation → Validation}/index.d.ts +0 -0
  807. /package/{build/Validation → Validation}/index.d.ts.map +0 -0
  808. /package/{build/Validation → Validation}/index.js +0 -0
  809. /package/{build/Validation → Validation}/index.js.map +0 -0
@@ -1,12 +0,0 @@
1
- export function wrap(strings: string | string[]) {
2
- if (typeof strings === 'string') {
3
- strings = [strings]
4
- }
5
- return strings.map(column => {
6
- // // Only add backticks for columns that contain characters outside the following set
7
- // if (/^[0-9,a-z,A-Z$_]+$/.test(column)) {
8
- // return column
9
- // }
10
- return '`' + column + '`'
11
- }).join(', ')
12
- }
package/Database/List.ts DELETED
@@ -1,71 +0,0 @@
1
- import { Entity } from './Entity'
2
- import { EntityKeys } from './index'
3
- import { EntityQuery } from './EntityQuery'
4
- import { BooleanOperator, Operator, WhereValue } from './Types'
5
- import { BelongsToManyField, HasManyField } from './Fields'
6
- import { BaseRelationship as Relationship } from './ORM/BaseRelationship'
7
-
8
- export abstract class List<E extends Entity, P extends Entity = Entity> extends Relationship<E, P> implements Iterable<E>, ArrayLike<E> {
9
-
10
- items: E[] = []
11
-
12
- declare public relationship: HasManyField<P, E> | BelongsToManyField<P, E>
13
-
14
- protected constructor(
15
- relationship: HasManyField<P, E> | BelongsToManyField<P, E>,
16
- parent: P
17
- ) {
18
- super(relationship, parent)
19
- return new Proxy(this, new ListProxyHandler())
20
- }
21
-
22
- get length() {
23
- return this.items.length
24
- }
25
-
26
- [Symbol.iterator]() {
27
- return this.items[Symbol.iterator]()
28
- }
29
-
30
- readonly [n: number]: E;
31
-
32
- async load() {
33
- await this.parent.load(this.relationship.property)
34
- return this
35
- }
36
-
37
- async get() {
38
- await this.load()
39
- return this.items
40
- }
41
-
42
- newQuery(): EntityQuery<E> {
43
- return this.relationship.getQuery(this.parent)
44
- }
45
-
46
- where<K extends EntityKeys<E>>(
47
- column: EntityKeys<E>,
48
- operator: Operator | WhereValue | E[K],
49
- value?: WhereValue | E[K],
50
- boolean?: BooleanOperator
51
- ): EntityQuery<E> {
52
- return this.relationship.getQuery(this.parent).where(column, operator, value, boolean)
53
- }
54
-
55
- findWhere(name: string, value: string): E | undefined {
56
- return undefined
57
- }
58
-
59
- toJSON() {
60
- return this.items
61
- }
62
- }
63
-
64
- export class ListProxyHandler<E extends Entity, P extends Entity> {
65
- get(target: List<E, P>, property: string | symbol) {
66
- if (Number.isInteger(Number(property.toString()))) {
67
- return target.items[property as unknown as number]
68
- }
69
- return target[property as keyof List<E, P>]
70
- }
71
- }
@@ -1,10 +0,0 @@
1
- import { Connection } from '../Connection'
2
-
3
- export abstract class Migration {
4
-
5
- constructor(protected connection: Connection) {}
6
-
7
- abstract up(): void | Promise<void>;
8
-
9
- abstract down(): void | Promise<void>;
10
- }
@@ -1,20 +0,0 @@
1
- import { Column, CreatedAt, ID, Options, PrimaryColumn } from '../Decorators'
2
- import { Entity } from '../Entity'
3
-
4
- @Options({
5
- table: 'migration_history'
6
- })
7
- export class MigrationHistory extends Entity {
8
-
9
- @PrimaryColumn()
10
- id: ID
11
-
12
- @Column()
13
- name: string
14
-
15
- @Column()
16
- batch: number
17
-
18
- @CreatedAt()
19
- createdAt: Date
20
- }
@@ -1,122 +0,0 @@
1
- import { MigrationHistory } from './MigrationHistory'
2
- import { Migration } from './Migration'
3
- import * as path from 'path'
4
- import { File, Storage } from '@Typetron/Storage'
5
- import { Connection } from '..'
6
- import { Constructor } from '@Typetron/Support'
7
-
8
- interface MigrateOptions {
9
- fresh?: boolean;
10
- }
11
-
12
- export class Migrator {
13
-
14
- constructor(
15
- public storage: Storage,
16
- public connection: Connection,
17
- public directory: string
18
- ) {}
19
-
20
- async files(): Promise<File[]> {
21
- return this.storage.files(this.directory, true).where('extension', 'ts')
22
- }
23
-
24
- public async migrate(options?: MigrateOptions): Promise<boolean> {
25
- await this.createMigrationTable()
26
-
27
- if (options?.fresh) {
28
- await this.clearTable()
29
- }
30
-
31
- const files = await this.files()
32
- const migrates = await MigrationHistory.whereIn('name', files.pluck('name')).get()
33
- const filesToMigrate = files.filter(file => !migrates.findWhere('name', file.name))
34
-
35
- if (!filesToMigrate.length) {
36
- console.log('Nothing to migrate')
37
- return true
38
- }
39
-
40
- const lastBatch = await this.getLastBatchId()
41
- for await(const file of filesToMigrate) {
42
- const migration = this.getMigration(file.path)
43
- const migrationName = migration.constructor.name
44
-
45
- console.log(`Migrating '${migrationName}'`)
46
- try {
47
- await migration.up()
48
- await MigrationHistory.create({
49
- name: file,
50
- batch: lastBatch + 1,
51
- createdAt: new Date()
52
- })
53
- console.log(`Migrated '${migrationName}'`)
54
- } catch (error) {
55
- console.error(`Failed to run the migration from '${migrationName}'`, (error as Error).message)
56
- return false
57
- }
58
- }
59
- return true
60
- }
61
-
62
- public async rollback(steps = 0) {
63
- await this.createMigrationTable()
64
-
65
- const lastMigration = await MigrationHistory.newQuery().orderBy('batch', 'DESC').first()
66
- if (!lastMigration) {
67
- throw new Error('Can not find any migration to rollback.')
68
- }
69
- const migrations = await MigrationHistory
70
- .where('batch', '>=', Math.max(0, lastMigration.batch - steps))
71
- .orderBy('batch', 'DESC')
72
- .get()
73
-
74
- for (const migrationEntity of migrations) {
75
- const migration = this.getMigration(path.join(this.directory, migrationEntity.name))
76
- const migrationName = migration.constructor.name
77
-
78
- console.log(`Rolling back the '${migrationName}' migration.`)
79
- try {
80
- await migration.down()
81
- console.log(`Reverted '${migrationName}' migration.`)
82
- await migrationEntity.delete()
83
- } catch (error) {
84
- console.error(`Failed to run the migration '${migrationName}'`, error)
85
- return false
86
- }
87
- }
88
-
89
- return true
90
- }
91
-
92
- protected async getLastBatchId(): Promise<number> {
93
- const lastMigration = await MigrationHistory.orderBy('batch', 'DESC').first()
94
- return lastMigration?.batch ?? 0
95
- }
96
-
97
- public async reset() {
98
- await this.createMigrationTable()
99
-
100
- const lastMigration = await MigrationHistory.newQuery().orderBy('batch', 'DESC').first()
101
-
102
- if (!lastMigration) {
103
- return true
104
- }
105
-
106
- return this.rollback(lastMigration?.batch)
107
- }
108
-
109
- private getMigration(migrationFilePath: string): Migration {
110
- const migrationModule: Record<string, Constructor<Migration>> = require(migrationFilePath)
111
- const MigrationClass = Object.values(migrationModule)[0]
112
- return new MigrationClass(this.connection)
113
- }
114
-
115
- protected async createMigrationTable(): Promise<void> {
116
- await this.connection.driver.schema.synchronize([MigrationHistory].pluck('metadata'))
117
- }
118
-
119
- protected async clearTable(): Promise<unknown> {
120
- return MigrationHistory.truncate()
121
- }
122
- }
@@ -1,3 +0,0 @@
1
- export * from './Migrator'
2
- export * from './Migration'
3
- export * from './MigrationHistory'
@@ -1,10 +0,0 @@
1
- import { Entity } from '../Entity'
2
- import { InverseRelationship, RelationshipField } from '../Fields'
3
-
4
- export abstract class BaseRelationship<E extends Entity, P extends Entity = Entity> {
5
- constructor(
6
- public relationship: RelationshipField<P, E> | InverseRelationship<P, E>,
7
- public parent: P
8
- ) {
9
- }
10
- }
package/Database/Query.ts DELETED
@@ -1,374 +0,0 @@
1
- import {
2
- BooleanOperator,
3
- Components,
4
- Direction,
5
- JoinType,
6
- Operator,
7
- SqlValue,
8
- SqlValueMap,
9
- Where,
10
- WhereBetween,
11
- WhereFunction,
12
- WhereIn,
13
- WhereLike,
14
- WhereNull,
15
- WhereSubSelect,
16
- WhereValue
17
- } from './Types'
18
- import { Connection } from './Connection'
19
- import { StringExpression } from './StringExpression'
20
- import { Statement } from './Drivers/Statement'
21
- import { Constructor } from '@Typetron/Support'
22
- import { Expression } from './Expression'
23
-
24
- export class Query<T = {}> extends Expression {
25
- static connection: Connection
26
-
27
- private statementType: Constructor<Statement> = Query.connection.driver.statements.select
28
-
29
- private useDistinct = false
30
-
31
- private components: Components = {
32
- table: '',
33
- distinct: false,
34
- columns: [],
35
- joins: [],
36
- wheres: [],
37
- groups: [],
38
- orders: [],
39
- having: [],
40
- }
41
-
42
- get statement(): Statement {
43
- return new this.statementType(this.components)
44
- }
45
-
46
- static table<T = object>(table: string): Query<T> {
47
- return (new this() as Query<T>).table(table)
48
- }
49
-
50
- static from<T = {}>(table: string) {
51
- return Query.table<T>(table)
52
- }
53
-
54
- static truncate(table: string) {
55
- return Query.connection.truncate(table)
56
- }
57
-
58
- truncate() {
59
- return Query.truncate(this.components.table)
60
- }
61
-
62
- getBindings() {
63
- const statement = this.statement
64
- statement.toSQL()
65
- return statement.bindings
66
- }
67
-
68
- toSQL() {
69
- return this.statement.toSQL().replace(/\s{2,}/g, ' ').trim()
70
- }
71
-
72
- async get<K extends keyof T>(...columns: (K | string | StringExpression)[]): Promise<T[]> {
73
- return Query.connection.get(this.select(...(columns.length ? columns : this.components.columns)))
74
- }
75
-
76
- async run<K extends keyof T>(): Promise<void> {
77
- await Query.connection.run(this as Query<{}>)
78
- }
79
-
80
- table(table: string) {
81
- this.components.table = table
82
-
83
- return this
84
- }
85
-
86
- from(table: string) {
87
- return this.table(table)
88
- }
89
-
90
- async first<K extends keyof T>(...columns: (K | string | StringExpression)[]): Promise<T | undefined> {
91
- return Query.connection.first(this.select(...(columns.length ? columns : this.components.columns)))
92
- }
93
-
94
- select<K extends keyof T>(...columns: (K | string | StringExpression)[]) {
95
- this.statementType = Query.connection.driver.statements.select
96
- this.components.columns = columns as string[]
97
-
98
- return this
99
- }
100
-
101
- where<K extends keyof T>(
102
- column: K | string,
103
- operator: Operator | Query | WhereValue | WhereFunction | T[K],
104
- value?: Query | WhereValue | WhereFunction | T[K],
105
- boolean: BooleanOperator = 'AND'
106
- ): this {
107
- // if (column instanceof Function) {
108
- // const query = new WhereNested();
109
- // this.components.wheres = query;
110
- // column(query);
111
- // return this;
112
- // }
113
- if (value === undefined) {
114
- value = operator
115
- operator = '=' as Operator
116
- }
117
-
118
- if (value instanceof Query) {
119
- this.components.wheres.push(new WhereSubSelect(column as string, operator as Operator, value, boolean))
120
- return this
121
- }
122
-
123
- if (typeof value === 'function') {
124
- const query = new Query()
125
- // @ts-ignore
126
- value(query)
127
- this.components.wheres.push(new WhereSubSelect(column as string, operator as Operator, query, boolean))
128
- return this
129
- }
130
-
131
- // this.bindings.push(value);
132
- // const where = new Where();
133
- // where.boolean = this.components.wheres.length ? boolean : 'WHERE';
134
- // this.components.wheres.push({
135
- // column, operator, value, boolean
136
- // });
137
-
138
- if (typeof value === 'object') {
139
- return this
140
- }
141
-
142
- this.components.wheres.push(new Where(column as string, operator as Operator, value as WhereValue, boolean))
143
-
144
- return this
145
- }
146
-
147
- orWhere<K extends keyof T>(column: K | string, operator: Operator | WhereValue | T[K], value?: WhereValue | T[K]): this {
148
- return this.where(column, operator, value, 'OR')
149
- }
150
-
151
- andWhere<K extends keyof T>(column: K | string, operator: Operator | WhereValue | T[K], value?: WhereValue | T[K]): this {
152
- return this.where(column, operator, value)
153
- }
154
-
155
- whereIn<K extends keyof T>(
156
- column: K | string,
157
- values: Query | WhereFunction | WhereValue[] | T[K][],
158
- boolean: BooleanOperator = 'AND',
159
- not = false
160
- ): this {
161
- if (values instanceof Query) {
162
- this.components.wheres.push(new WhereSubSelect(column as string, not ? 'NOT IN' : 'IN', values, boolean))
163
- return this
164
- }
165
- if (typeof values === 'function') {
166
- const query = new Query()
167
- values(query)
168
- this.components.wheres.push(new WhereSubSelect(column as string, not ? 'NOT IN' : 'IN', query, boolean))
169
- return this
170
- }
171
- this.components.wheres.push(new WhereIn(column as string, values as WhereValue[], boolean, not))
172
-
173
- return this
174
- }
175
-
176
- andWhereIn<K extends keyof T>(column: K | string, values: SqlValue[]): this {
177
- return this.whereIn(column, values)
178
- }
179
-
180
- andWhereNotIn<K extends keyof T>(column: K | string, values: SqlValue[]): this {
181
- return this.whereIn(column, values, 'AND', true)
182
- }
183
-
184
- whereLike<K extends keyof T>(column: K | string, value: SqlValue, boolean: BooleanOperator = 'AND', not = false): this {
185
- this.components.wheres.push(new WhereLike(column as string, value, boolean, not))
186
-
187
- return this
188
- }
189
-
190
- whereNotIn<K extends keyof T>(
191
- column: K | string,
192
- values: Query | WhereFunction | WhereValue[] | T[K][],
193
- boolean: BooleanOperator = 'AND'
194
- ): this {
195
- return this.whereIn(column, values, boolean, true)
196
- }
197
-
198
- orWhereIn<K extends keyof T>(column: K | string, values: SqlValue[]): this {
199
- return this.whereIn(column, values, 'OR')
200
- }
201
-
202
- orWhereNotIn<K extends keyof T>(column: K | string, values: SqlValue[]): this {
203
- return this.whereIn(column, values, 'OR', true)
204
- }
205
-
206
- orWhereLike<K extends keyof T>(column: K | string, value: SqlValue, not = false): this {
207
- return this.whereLike(column, value, 'OR', not)
208
- }
209
-
210
- orWhereNotLike<K extends keyof T>(column: K | string, value: SqlValue): this {
211
- return this.whereLike(column, value, 'OR', true)
212
- }
213
-
214
- whereBetween<K extends keyof T>(column: K | string, values: [SqlValue, SqlValue], boolean: BooleanOperator = 'AND', not = false): this {
215
- this.components.wheres.push(new WhereBetween(column as string, values, boolean, not))
216
-
217
- return this
218
- }
219
-
220
- whereNotBetween<K extends keyof T>(column: K | string, values: [SqlValue, SqlValue], boolean: BooleanOperator = 'AND'): this {
221
- return this.whereBetween(column, values, boolean, true)
222
- }
223
-
224
- orWhereBetween<K extends keyof T>(column: K | string, values: [SqlValue, SqlValue]): this {
225
- return this.whereBetween(column, values, 'OR')
226
- }
227
-
228
- orWhereNotBetween<K extends keyof T>(column: K | string, values: [SqlValue, SqlValue]): this {
229
- return this.whereBetween(column, values, 'OR', true)
230
- }
231
-
232
- whereNull<K extends keyof T>(column: K | string, boolean: BooleanOperator = 'AND', not = false): this {
233
- this.components.wheres.push(new WhereNull(column as string, boolean, not))
234
-
235
- return this
236
- }
237
-
238
- andWhereNull<K extends keyof T>(column: K | string): this {
239
- return this.whereNull(column)
240
- }
241
-
242
- whereNotNull<K extends keyof T>(column: K | string, boolean: BooleanOperator = 'AND'): this {
243
- return this.whereNull(column, boolean, true)
244
- }
245
-
246
- andWhereNotNull<K extends keyof T>(column: K | string, boolean: BooleanOperator = 'AND'): this {
247
- return this.whereNotNull(column, boolean)
248
- }
249
-
250
- orWhereNull<K extends keyof T>(column: K | string): this {
251
- return this.whereNull(column, 'OR')
252
- }
253
-
254
- orWhereNotNull<K extends keyof T>(column: K | string): this {
255
- return this.whereNull(column, 'OR', true)
256
- }
257
-
258
- distinct(value = true) {
259
- this.components.distinct = value
260
-
261
- return this
262
- }
263
-
264
- join(table: string, first: string, operator: Operator, second: string, type: keyof typeof JoinType = JoinType.INNER) {
265
- this.components.joins.push({type, table, first, operator, second})
266
-
267
- return this
268
- }
269
-
270
- innerJoin(table: string, first: string, operator: Operator, second: string) {
271
- return this.join(table, first, operator, second, JoinType.INNER)
272
- }
273
-
274
- leftJoin(table: string, first: string, operator: Operator, second: string) {
275
- return this.join(table, first, operator, second, JoinType.LEFT)
276
- }
277
-
278
- rightJoin(table: string, first: string, operator: Operator, second: string) {
279
- return this.join(table, first, operator, second, JoinType.RIGHT)
280
- }
281
-
282
- orderBy<K extends keyof T>(column: K | [string | K, Direction][], direction: Direction = 'DESC') {
283
- if (typeof column === 'string') {
284
- column = [[column, direction]]
285
- }
286
- this.components.orders = column as [string, Direction][]
287
-
288
- return this
289
- }
290
-
291
- groupBy<K extends keyof T>(...columns: (K | string) []) {
292
- this.components.groups = columns as string[]
293
-
294
- return this
295
- }
296
-
297
- addSelect<K extends keyof T>(...columns: (K | string | StringExpression)[]) {
298
- this.components.columns = this.components.columns.concat(columns as string[])
299
-
300
- return this
301
- }
302
-
303
- async count<K extends keyof T>(...columns: (K | string | StringExpression)[]): Promise<number> {
304
- this.components.aggregate = {
305
- function: 'COUNT',
306
- columns: columns as string[],
307
- }
308
- const value = await Query.connection.first(this as unknown as Query<{aggregate: number}>)
309
- return value?.aggregate || 0
310
- }
311
-
312
- selectCount<K extends keyof T>(...columns: (K | string | StringExpression)[]): this {
313
- this.components.aggregate = {
314
- function: 'COUNT',
315
- columns: columns as string[],
316
- }
317
- return this
318
- }
319
-
320
- async max<K extends keyof T>(column: (K | string | StringExpression), ...columns: (K | string | StringExpression)[]): Promise<T[]> {
321
- this.components.aggregate = {
322
- function: 'MAX',
323
- columns: [column].concat(columns) as string[],
324
- }
325
- return Query.connection.get(this)
326
- }
327
-
328
- async insert(data: SqlValueMap | SqlValueMap[]) {
329
- this.statementType = Query.connection.driver.statements.insert
330
-
331
- if (!Array.isArray(data)) {
332
- data = [data]
333
- }
334
-
335
- this.components.insert = data
336
-
337
- await this.run()
338
- }
339
-
340
- async insertOne(data: SqlValueMap): Promise<number> {
341
- this.statementType = Query.connection.driver.statements.insert
342
-
343
- this.components.insert = [data]
344
-
345
- return await Query.connection.insertOne(this as Query<{}>)
346
- }
347
-
348
- async delete() {
349
- this.statementType = Query.connection.driver.statements.delete
350
-
351
- await this.run()
352
- }
353
-
354
- async update(name: string | keyof T | Record<keyof T, SqlValue> | SqlValueMap, value?: SqlValue) {
355
- this.statementType = Query.connection.driver.statements.update
356
-
357
- let data: SqlValueMap
358
- if (typeof name === 'string') {
359
- data = {[name]: value}
360
- } else {
361
- data = name as SqlValueMap
362
- }
363
-
364
- this.components.update = data
365
-
366
- await this.run()
367
- }
368
-
369
- limit<K extends keyof T>(from: number, count?: number) {
370
- this.components.limit = {from, count}
371
-
372
- return this
373
- }
374
- }
@@ -1,3 +0,0 @@
1
- export abstract class Seeder {
2
- public abstract run():void
3
- }
@@ -1,27 +0,0 @@
1
- import { Storage } from "@Typetron/Storage"
2
- import { Constructor } from "@Typetron/Support"
3
- import { Seeder } from "./Seeder"
4
-
5
- export class SeederManager {
6
- constructor(
7
- public storage: Storage,
8
- public directory: string
9
- ) {}
10
-
11
- async seed() {
12
- const files = await this.storage
13
- .files(this.directory, true)
14
- .where("extension", "ts")
15
- .whenEmpty(() => console.log('Nothing to seed!'))
16
-
17
- files.forEachAsync(async file => {
18
- await this.getSeed(file.path).run()
19
- })
20
- }
21
-
22
- private getSeed(path: string): Seeder {
23
- const module: Record<string, Constructor<Seeder>> = require(path)
24
- const Class = Object.values(module)[0]
25
- return new Class()
26
- }
27
- }
@@ -1,2 +0,0 @@
1
- export * from './Seeder'
2
- export * from './SeederManager'
@@ -1,9 +0,0 @@
1
- import { Expression } from '@Typetron/Database/Expression'
2
-
3
- export class StringExpression extends Expression {
4
- constructor(public value: string) {super()}
5
-
6
- toSQL() {
7
- return this.value
8
- }
9
- }