@typetron/framework 0.5.6 → 0.5.7
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.
- package/package.json +1 -1
- package/.eslintrc-old.js +0 -208
- package/Cache/Cache.ts +0 -13
- package/Cache/Stores/DatabaseStore.ts +0 -120
- package/Cache/Stores/FileStore.ts +0 -69
- package/Cache/Stores/MemoryStore.ts +0 -71
- package/Cache/index.ts +0 -5
- package/Cache/types.ts +0 -4
- package/Container/ClassResolver.ts +0 -106
- package/Container/Container.ts +0 -144
- package/Container/Contracts.ts +0 -3
- package/Container/Decorators.ts +0 -20
- package/Container/Metadata.ts +0 -16
- package/Container/Resolver.ts +0 -27
- package/Container/index.ts +0 -5
- package/Database/Clauses/Where.ts +0 -0
- package/Database/Connection.ts +0 -52
- package/Database/Decorators.ts +0 -142
- package/Database/Drivers/DatabaseDriver.ts +0 -37
- package/Database/Drivers/MySQL/Alter/index.ts +0 -55
- package/Database/Drivers/MySQL/ColumnDefinition.ts +0 -16
- package/Database/Drivers/MySQL/Create.ts +0 -47
- package/Database/Drivers/MySQL/MysqlDriver.ts +0 -123
- package/Database/Drivers/MySQL/Schema.ts +0 -82
- package/Database/Drivers/MySQL/index.ts +0 -13
- package/Database/Drivers/SQL/Schema.ts +0 -73
- package/Database/Drivers/SQL/Statements/Alter.ts +0 -22
- package/Database/Drivers/SQL/Statements/BaseStatement.ts +0 -55
- package/Database/Drivers/SQL/Statements/Delete.ts +0 -20
- package/Database/Drivers/SQL/Statements/Insert.ts +0 -24
- package/Database/Drivers/SQL/Statements/Select.ts +0 -55
- package/Database/Drivers/SQL/Statements/Update.ts +0 -33
- package/Database/Drivers/SQL/index.ts +0 -8
- package/Database/Drivers/SQLite/Create.ts +0 -45
- package/Database/Drivers/SQLite/Schema.ts +0 -54
- package/Database/Drivers/SQLite/SqliteDriver.ts +0 -144
- package/Database/Drivers/SQLite/index.ts +0 -15
- package/Database/Drivers/SchemaContract.ts +0 -11
- package/Database/Drivers/Statement.ts +0 -16
- package/Database/Drivers/index.ts +0 -4
- package/Database/Entity.ts +0 -377
- package/Database/EntityNotFoundError.ts +0 -5
- package/Database/EntityProxyHandler.ts +0 -43
- package/Database/EntityQuery.ts +0 -197
- package/Database/Expression.ts +0 -3
- package/Database/Fields.ts +0 -816
- package/Database/Helpers.ts +0 -12
- package/Database/List.ts +0 -71
- package/Database/Migrations/Migration.ts +0 -10
- package/Database/Migrations/MigrationHistory.ts +0 -20
- package/Database/Migrations/Migrator.ts +0 -122
- package/Database/Migrations/index.ts +0 -3
- package/Database/ORM/BaseRelationship.ts +0 -10
- package/Database/Query.ts +0 -374
- package/Database/Seeders/Seeder.ts +0 -3
- package/Database/Seeders/SeederManager.ts +0 -27
- package/Database/Seeders/index.ts +0 -2
- package/Database/StringExpression.ts +0 -9
- package/Database/Types.ts +0 -165
- package/Database/index.ts +0 -23
- package/Encryption/index.ts +0 -51
- package/Forms/Decorators.ts +0 -29
- package/Forms/Form.ts +0 -70
- package/Forms/FormFields.ts +0 -36
- package/Forms/index.ts +0 -3
- package/Framework/App.ts +0 -10
- package/Framework/Application.ts +0 -118
- package/Framework/Auth/Auth.ts +0 -122
- package/Framework/Auth/Authenticatable.ts +0 -9
- package/Framework/Auth/User.ts +0 -27
- package/Framework/Auth/index.ts +0 -29
- package/Framework/Config/AppConfig.ts +0 -25
- package/Framework/Config/AuthConfig.ts +0 -9
- package/Framework/Config/BaseConfig.ts +0 -9
- package/Framework/Config/CacheConfig.ts +0 -38
- package/Framework/Config/DatabaseConfig.ts +0 -21
- package/Framework/Config/MailConfig.ts +0 -30
- package/Framework/Config/index.ts +0 -6
- package/Framework/Middleware/AuthMiddleware.ts +0 -31
- package/Framework/Middleware/CorsMiddleware.ts +0 -32
- package/Framework/Middleware/StaticAssetsMiddleware.ts +0 -76
- package/Framework/Middleware/index.ts +0 -2
- package/Framework/Provider.ts +0 -9
- package/Framework/Providers/CacheProvider.ts +0 -28
- package/Framework/Providers/DatabaseProvider.ts +0 -36
- package/Framework/Providers/MailProvider.ts +0 -31
- package/Framework/Providers/WebsocketsProvider.ts +0 -120
- package/Framework/Resolvers/AuthResolver.ts +0 -23
- package/Framework/Resolvers/EntityResolver.ts +0 -41
- package/Framework/Resolvers/FormResolver.ts +0 -37
- package/Framework/RootDir.ts +0 -1
- package/Framework/index.ts +0 -8
- package/Frontend/Angular/index.ts +0 -24
- package/Frontend/Websockets/index.ts +0 -86
- package/LICENSE.md +0 -21
- package/Mail/MailAddress.ts +0 -4
- package/Mail/MailTransport.ts +0 -6
- package/Mail/Mailable.ts +0 -16
- package/Mail/Mailer.ts +0 -27
- package/Mail/PendingMail.ts +0 -68
- package/Mail/SentMessage.ts +0 -20
- package/Mail/Transports/MemoryTransport.ts +0 -13
- package/Mail/Transports/SendGridTransport.ts +0 -95
- package/Mail/index.ts +0 -3
- package/Models/Model.ts +0 -41
- package/Models/index.ts +0 -54
- package/Readme.md +0 -123
- package/Router/BaseController.ts +0 -7
- package/Router/Decorators.ts +0 -224
- package/Router/Guard.ts +0 -10
- package/Router/Http/Contracts.ts +0 -4
- package/Router/Http/ErrorHandler.ts +0 -45
- package/Router/Http/ErrorHandlerInterface.ts +0 -6
- package/Router/Http/Errors/HttpError.ts +0 -15
- package/Router/Http/Handler.ts +0 -183
- package/Router/Http/HttpRoute.ts +0 -110
- package/Router/Http/Middleware.ts +0 -7
- package/Router/Http/Request.ts +0 -225
- package/Router/Http/Response.ts +0 -35
- package/Router/Http/index.ts +0 -85
- package/Router/Metadata.ts +0 -34
- package/Router/Middleware.ts +0 -16
- package/Router/Request.ts +0 -65
- package/Router/Route.ts +0 -16
- package/Router/RouteNotFoundError.ts +0 -5
- package/Router/Router.ts +0 -35
- package/Router/Servers/index.ts +0 -6
- package/Router/Servers/node.ts +0 -49
- package/Router/Servers/uNetworking.ts +0 -151
- package/Router/Websockets/Handler.ts +0 -82
- package/Router/Websockets/Middleware.ts +0 -7
- package/Router/Websockets/Request.ts +0 -3
- package/Router/Websockets/WebsocketRoute.ts +0 -61
- package/Router/Websockets/index.ts +0 -57
- package/Router/Websockets/types.ts +0 -23
- package/Router/index.ts +0 -6
- package/Storage/File.ts +0 -30
- package/Storage/Image.ts +0 -19
- package/Storage/InvalidImage.ts +0 -3
- package/Storage/Storage.ts +0 -98
- package/Storage/index.ts +0 -4
- package/Storage/utils.ts +0 -18
- package/Support/Array.ts +0 -184
- package/Support/Math.ts +0 -12
- package/Support/Metadata.ts +0 -31
- package/Support/String.ts +0 -38
- package/Support/index.ts +0 -19
- package/Support/utils.ts +0 -7
- package/Testing/TestCase.ts +0 -193
- package/Validation/Rule.ts +0 -9
- package/Validation/RuleInterface.ts +0 -10
- package/Validation/Rules/Email.ts +0 -20
- package/Validation/Rules/FileExtension.ts +0 -21
- package/Validation/Rules/MaxLength.ts +0 -17
- package/Validation/Rules/MinLength.ts +0 -18
- package/Validation/Rules/Optional.ts +0 -18
- package/Validation/Rules/Required.ts +0 -29
- package/Validation/Validator.ts +0 -7
- package/Validation/index.ts +0 -12
- package/benchmark-index.js +0 -20
- package/benchmark.ts +0 -47
- package/tests/Cache/DatabaseStoreTest.ts +0 -110
- package/tests/Cache/FileStoreTest.ts +0 -93
- package/tests/Cache/MemoryStoreTest.ts +0 -92
- package/tests/Container/ContainerTest.ts +0 -336
- package/tests/Database/Drivers/MySQL/AlterTest.ts +0 -100
- package/tests/Database/Drivers/MySQL/CreateTest.ts +0 -39
- package/tests/Database/Drivers/MysqlDriverTest.ts +0 -140
- package/tests/Database/Drivers/SqliteDriverTest.ts +0 -126
- package/tests/Database/Entities/Article.ts +0 -21
- package/tests/Database/Entities/Profile.ts +0 -21
- package/tests/Database/Entities/Role.ts +0 -15
- package/tests/Database/Entities/User.ts +0 -35
- package/tests/Database/EntityRelationshipsTest.ts +0 -475
- package/tests/Database/EntityTest.ts +0 -202
- package/tests/Database/Migrations/RunnerTest.ts +0 -96
- package/tests/Database/Migrations/migrations/1.createUserTable.ts +0 -12
- package/tests/Database/Migrations/migrations/2.createArticlesTable.ts +0 -12
- package/tests/Database/QueryTest.ts +0 -573
- package/tests/Database/SchemaTest.ts +0 -32
- package/tests/Database/Seeders/RunnerTest.ts +0 -30
- package/tests/Database/Seeders/seeders/RandomSeeder.ts +0 -10
- package/tests/Database/utils.ts +0 -16
- package/tests/Forms/FormsTest.ts +0 -59
- package/tests/Framework/Middleware/StaticAssetsMiddlewareTest.ts +0 -129
- package/tests/Framework/Resolvers/EntityResolverTest.ts +0 -48
- package/tests/Framework/Router/RouterTest.ts +0 -33
- package/tests/Mail/MailerTest.ts +0 -76
- package/tests/Model/ModelTest.ts +0 -183
- package/tests/Router/HttpHandlerTest.ts +0 -72
- package/tests/Router/RequestTest.ts +0 -77
- package/tests/Router/WebSocketsHandlerTest.ts +0 -51
- package/tests/Storage/StorageTest.ts +0 -97
- package/tests/Support/ArrayTest.ts +0 -167
- package/tests/Support/StringTest.ts +0 -18
- package/tests/Validation/RulesTest.ts +0 -54
- package/types.d.ts +0 -8
- /package/{build/Cache → Cache}/Cache.d.ts +0 -0
- /package/{build/Cache → Cache}/Cache.d.ts.map +0 -0
- /package/{build/Cache → Cache}/Cache.js +0 -0
- /package/{build/Cache → Cache}/Cache.js.map +0 -0
- /package/{build/Cache → Cache}/Stores/DatabaseStore.d.ts +0 -0
- /package/{build/Cache → Cache}/Stores/DatabaseStore.d.ts.map +0 -0
- /package/{build/Cache → Cache}/Stores/DatabaseStore.js +0 -0
- /package/{build/Cache → Cache}/Stores/DatabaseStore.js.map +0 -0
- /package/{build/Cache → Cache}/Stores/FileStore.d.ts +0 -0
- /package/{build/Cache → Cache}/Stores/FileStore.d.ts.map +0 -0
- /package/{build/Cache → Cache}/Stores/FileStore.js +0 -0
- /package/{build/Cache → Cache}/Stores/FileStore.js.map +0 -0
- /package/{build/Cache → Cache}/Stores/MemoryStore.d.ts +0 -0
- /package/{build/Cache → Cache}/Stores/MemoryStore.d.ts.map +0 -0
- /package/{build/Cache → Cache}/Stores/MemoryStore.js +0 -0
- /package/{build/Cache → Cache}/Stores/MemoryStore.js.map +0 -0
- /package/{build/Cache → Cache}/index.d.ts +0 -0
- /package/{build/Cache → Cache}/index.d.ts.map +0 -0
- /package/{build/Cache → Cache}/index.js +0 -0
- /package/{build/Cache → Cache}/index.js.map +0 -0
- /package/{build/Cache → Cache}/types.d.ts +0 -0
- /package/{build/Cache → Cache}/types.d.ts.map +0 -0
- /package/{build/Cache → Cache}/types.js +0 -0
- /package/{build/Cache → Cache}/types.js.map +0 -0
- /package/{build/Container → Container}/ClassResolver.d.ts +0 -0
- /package/{build/Container → Container}/ClassResolver.d.ts.map +0 -0
- /package/{build/Container → Container}/ClassResolver.js +0 -0
- /package/{build/Container → Container}/ClassResolver.js.map +0 -0
- /package/{build/Container → Container}/Container.d.ts +0 -0
- /package/{build/Container → Container}/Container.d.ts.map +0 -0
- /package/{build/Container → Container}/Container.js +0 -0
- /package/{build/Container → Container}/Container.js.map +0 -0
- /package/{build/Container → Container}/Contracts.d.ts +0 -0
- /package/{build/Container → Container}/Contracts.d.ts.map +0 -0
- /package/{build/Container → Container}/Contracts.js +0 -0
- /package/{build/Container → Container}/Contracts.js.map +0 -0
- /package/{build/Container → Container}/Decorators.d.ts +0 -0
- /package/{build/Container → Container}/Decorators.d.ts.map +0 -0
- /package/{build/Container → Container}/Decorators.js +0 -0
- /package/{build/Container → Container}/Decorators.js.map +0 -0
- /package/{build/Container → Container}/Metadata.d.ts +0 -0
- /package/{build/Container → Container}/Metadata.d.ts.map +0 -0
- /package/{build/Container → Container}/Metadata.js +0 -0
- /package/{build/Container → Container}/Metadata.js.map +0 -0
- /package/{build/Container → Container}/Resolver.d.ts +0 -0
- /package/{build/Container → Container}/Resolver.d.ts.map +0 -0
- /package/{build/Container → Container}/Resolver.js +0 -0
- /package/{build/Container → Container}/Resolver.js.map +0 -0
- /package/{build/Container → Container}/index.d.ts +0 -0
- /package/{build/Container → Container}/index.d.ts.map +0 -0
- /package/{build/Container → Container}/index.js +0 -0
- /package/{build/Container → Container}/index.js.map +0 -0
- /package/{build/Database → Database}/Clauses/Where.d.ts +0 -0
- /package/{build/Database → Database}/Clauses/Where.d.ts.map +0 -0
- /package/{build/Database → Database}/Clauses/Where.js +0 -0
- /package/{build/Database → Database}/Clauses/Where.js.map +0 -0
- /package/{build/Database → Database}/Connection.d.ts +0 -0
- /package/{build/Database → Database}/Connection.d.ts.map +0 -0
- /package/{build/Database → Database}/Connection.js +0 -0
- /package/{build/Database → Database}/Connection.js.map +0 -0
- /package/{build/Database → Database}/Decorators.d.ts +0 -0
- /package/{build/Database → Database}/Decorators.d.ts.map +0 -0
- /package/{build/Database → Database}/Decorators.js +0 -0
- /package/{build/Database → Database}/Decorators.js.map +0 -0
- /package/{build/Database → Database}/Drivers/DatabaseDriver.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/DatabaseDriver.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/DatabaseDriver.js +0 -0
- /package/{build/Database → Database}/Drivers/DatabaseDriver.js.map +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/Alter/index.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/Alter/index.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/Alter/index.js +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/Alter/index.js.map +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/ColumnDefinition.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/ColumnDefinition.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/ColumnDefinition.js +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/ColumnDefinition.js.map +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/Create.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/Create.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/Create.js +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/Create.js.map +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/MysqlDriver.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/MysqlDriver.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/MysqlDriver.js +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/MysqlDriver.js.map +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/Schema.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/Schema.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/Schema.js +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/Schema.js.map +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/index.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/index.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/index.js +0 -0
- /package/{build/Database → Database}/Drivers/MySQL/index.js.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Schema.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Schema.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Schema.js +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Schema.js.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Alter.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Alter.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Alter.js +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Alter.js.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/BaseStatement.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/BaseStatement.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/BaseStatement.js +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/BaseStatement.js.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Delete.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Delete.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Delete.js +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Delete.js.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Insert.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Insert.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Insert.js +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Insert.js.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Select.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Select.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Select.js +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Select.js.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Update.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Update.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Update.js +0 -0
- /package/{build/Database → Database}/Drivers/SQL/Statements/Update.js.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/index.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/SQL/index.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/SQL/index.js +0 -0
- /package/{build/Database → Database}/Drivers/SQL/index.js.map +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/Create.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/Create.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/Create.js +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/Create.js.map +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/Schema.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/Schema.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/Schema.js +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/Schema.js.map +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/SqliteDriver.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/SqliteDriver.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/SqliteDriver.js +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/SqliteDriver.js.map +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/index.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/index.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/index.js +0 -0
- /package/{build/Database → Database}/Drivers/SQLite/index.js.map +0 -0
- /package/{build/Database → Database}/Drivers/SchemaContract.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/SchemaContract.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/SchemaContract.js +0 -0
- /package/{build/Database → Database}/Drivers/SchemaContract.js.map +0 -0
- /package/{build/Database → Database}/Drivers/Statement.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/Statement.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/Statement.js +0 -0
- /package/{build/Database → Database}/Drivers/Statement.js.map +0 -0
- /package/{build/Database → Database}/Drivers/index.d.ts +0 -0
- /package/{build/Database → Database}/Drivers/index.d.ts.map +0 -0
- /package/{build/Database → Database}/Drivers/index.js +0 -0
- /package/{build/Database → Database}/Drivers/index.js.map +0 -0
- /package/{build/Database → Database}/Entity.d.ts +0 -0
- /package/{build/Database → Database}/Entity.d.ts.map +0 -0
- /package/{build/Database → Database}/Entity.js +0 -0
- /package/{build/Database → Database}/Entity.js.map +0 -0
- /package/{build/Database → Database}/EntityNotFoundError.d.ts +0 -0
- /package/{build/Database → Database}/EntityNotFoundError.d.ts.map +0 -0
- /package/{build/Database → Database}/EntityNotFoundError.js +0 -0
- /package/{build/Database → Database}/EntityNotFoundError.js.map +0 -0
- /package/{build/Database → Database}/EntityProxyHandler.d.ts +0 -0
- /package/{build/Database → Database}/EntityProxyHandler.d.ts.map +0 -0
- /package/{build/Database → Database}/EntityProxyHandler.js +0 -0
- /package/{build/Database → Database}/EntityProxyHandler.js.map +0 -0
- /package/{build/Database → Database}/EntityQuery.d.ts +0 -0
- /package/{build/Database → Database}/EntityQuery.d.ts.map +0 -0
- /package/{build/Database → Database}/EntityQuery.js +0 -0
- /package/{build/Database → Database}/EntityQuery.js.map +0 -0
- /package/{build/Database → Database}/Expression.d.ts +0 -0
- /package/{build/Database → Database}/Expression.d.ts.map +0 -0
- /package/{build/Database → Database}/Expression.js +0 -0
- /package/{build/Database → Database}/Expression.js.map +0 -0
- /package/{build/Database → Database}/Fields.d.ts +0 -0
- /package/{build/Database → Database}/Fields.d.ts.map +0 -0
- /package/{build/Database → Database}/Fields.js +0 -0
- /package/{build/Database → Database}/Fields.js.map +0 -0
- /package/{build/Database → Database}/Helpers.d.ts +0 -0
- /package/{build/Database → Database}/Helpers.d.ts.map +0 -0
- /package/{build/Database → Database}/Helpers.js +0 -0
- /package/{build/Database → Database}/Helpers.js.map +0 -0
- /package/{build/Database → Database}/List.d.ts +0 -0
- /package/{build/Database → Database}/List.d.ts.map +0 -0
- /package/{build/Database → Database}/List.js +0 -0
- /package/{build/Database → Database}/List.js.map +0 -0
- /package/{build/Database → Database}/Migrations/Migration.d.ts +0 -0
- /package/{build/Database → Database}/Migrations/Migration.d.ts.map +0 -0
- /package/{build/Database → Database}/Migrations/Migration.js +0 -0
- /package/{build/Database → Database}/Migrations/Migration.js.map +0 -0
- /package/{build/Database → Database}/Migrations/MigrationHistory.d.ts +0 -0
- /package/{build/Database → Database}/Migrations/MigrationHistory.d.ts.map +0 -0
- /package/{build/Database → Database}/Migrations/MigrationHistory.js +0 -0
- /package/{build/Database → Database}/Migrations/MigrationHistory.js.map +0 -0
- /package/{build/Database → Database}/Migrations/Migrator.d.ts +0 -0
- /package/{build/Database → Database}/Migrations/Migrator.d.ts.map +0 -0
- /package/{build/Database → Database}/Migrations/Migrator.js +0 -0
- /package/{build/Database → Database}/Migrations/Migrator.js.map +0 -0
- /package/{build/Database → Database}/Migrations/index.d.ts +0 -0
- /package/{build/Database → Database}/Migrations/index.d.ts.map +0 -0
- /package/{build/Database → Database}/Migrations/index.js +0 -0
- /package/{build/Database → Database}/Migrations/index.js.map +0 -0
- /package/{build/Database → Database}/ORM/BaseRelationship.d.ts +0 -0
- /package/{build/Database → Database}/ORM/BaseRelationship.d.ts.map +0 -0
- /package/{build/Database → Database}/ORM/BaseRelationship.js +0 -0
- /package/{build/Database → Database}/ORM/BaseRelationship.js.map +0 -0
- /package/{build/Database → Database}/Query.d.ts +0 -0
- /package/{build/Database → Database}/Query.d.ts.map +0 -0
- /package/{build/Database → Database}/Query.js +0 -0
- /package/{build/Database → Database}/Query.js.map +0 -0
- /package/{build/Database → Database}/Seeders/Seeder.d.ts +0 -0
- /package/{build/Database → Database}/Seeders/Seeder.d.ts.map +0 -0
- /package/{build/Database → Database}/Seeders/Seeder.js +0 -0
- /package/{build/Database → Database}/Seeders/Seeder.js.map +0 -0
- /package/{build/Database → Database}/Seeders/SeederManager.d.ts +0 -0
- /package/{build/Database → Database}/Seeders/SeederManager.d.ts.map +0 -0
- /package/{build/Database → Database}/Seeders/SeederManager.js +0 -0
- /package/{build/Database → Database}/Seeders/SeederManager.js.map +0 -0
- /package/{build/Database → Database}/Seeders/index.d.ts +0 -0
- /package/{build/Database → Database}/Seeders/index.d.ts.map +0 -0
- /package/{build/Database → Database}/Seeders/index.js +0 -0
- /package/{build/Database → Database}/Seeders/index.js.map +0 -0
- /package/{build/Database → Database}/StringExpression.d.ts +0 -0
- /package/{build/Database → Database}/StringExpression.d.ts.map +0 -0
- /package/{build/Database → Database}/StringExpression.js +0 -0
- /package/{build/Database → Database}/StringExpression.js.map +0 -0
- /package/{build/Database → Database}/Types.d.ts +0 -0
- /package/{build/Database → Database}/Types.d.ts.map +0 -0
- /package/{build/Database → Database}/Types.js +0 -0
- /package/{build/Database → Database}/Types.js.map +0 -0
- /package/{build/Database → Database}/index.d.ts +0 -0
- /package/{build/Database → Database}/index.d.ts.map +0 -0
- /package/{build/Database → Database}/index.js +0 -0
- /package/{build/Database → Database}/index.js.map +0 -0
- /package/{build/Encryption → Encryption}/index.d.ts +0 -0
- /package/{build/Encryption → Encryption}/index.d.ts.map +0 -0
- /package/{build/Encryption → Encryption}/index.js +0 -0
- /package/{build/Encryption → Encryption}/index.js.map +0 -0
- /package/{build/Forms → Forms}/Decorators.d.ts +0 -0
- /package/{build/Forms → Forms}/Decorators.d.ts.map +0 -0
- /package/{build/Forms → Forms}/Decorators.js +0 -0
- /package/{build/Forms → Forms}/Decorators.js.map +0 -0
- /package/{build/Forms → Forms}/Form.d.ts +0 -0
- /package/{build/Forms → Forms}/Form.d.ts.map +0 -0
- /package/{build/Forms → Forms}/Form.js +0 -0
- /package/{build/Forms → Forms}/Form.js.map +0 -0
- /package/{build/Forms → Forms}/FormFields.d.ts +0 -0
- /package/{build/Forms → Forms}/FormFields.d.ts.map +0 -0
- /package/{build/Forms → Forms}/FormFields.js +0 -0
- /package/{build/Forms → Forms}/FormFields.js.map +0 -0
- /package/{build/Forms → Forms}/index.d.ts +0 -0
- /package/{build/Forms → Forms}/index.d.ts.map +0 -0
- /package/{build/Forms → Forms}/index.js +0 -0
- /package/{build/Forms → Forms}/index.js.map +0 -0
- /package/{build/Framework → Framework}/App.d.ts +0 -0
- /package/{build/Framework → Framework}/App.d.ts.map +0 -0
- /package/{build/Framework → Framework}/App.js +0 -0
- /package/{build/Framework → Framework}/App.js.map +0 -0
- /package/{build/Framework → Framework}/Application.d.ts +0 -0
- /package/{build/Framework → Framework}/Application.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Application.js +0 -0
- /package/{build/Framework → Framework}/Application.js.map +0 -0
- /package/{build/Framework → Framework}/Auth/Auth.d.ts +0 -0
- /package/{build/Framework → Framework}/Auth/Auth.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Auth/Auth.js +0 -0
- /package/{build/Framework → Framework}/Auth/Auth.js.map +0 -0
- /package/{build/Framework → Framework}/Auth/Authenticatable.d.ts +0 -0
- /package/{build/Framework → Framework}/Auth/Authenticatable.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Auth/Authenticatable.js +0 -0
- /package/{build/Framework → Framework}/Auth/Authenticatable.js.map +0 -0
- /package/{build/Framework → Framework}/Auth/User.d.ts +0 -0
- /package/{build/Framework → Framework}/Auth/User.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Auth/User.js +0 -0
- /package/{build/Framework → Framework}/Auth/User.js.map +0 -0
- /package/{build/Framework → Framework}/Auth/index.d.ts +0 -0
- /package/{build/Framework → Framework}/Auth/index.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Auth/index.js +0 -0
- /package/{build/Framework → Framework}/Auth/index.js.map +0 -0
- /package/{build/Framework → Framework}/Config/AppConfig.d.ts +0 -0
- /package/{build/Framework → Framework}/Config/AppConfig.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Config/AppConfig.js +0 -0
- /package/{build/Framework → Framework}/Config/AppConfig.js.map +0 -0
- /package/{build/Framework → Framework}/Config/AuthConfig.d.ts +0 -0
- /package/{build/Framework → Framework}/Config/AuthConfig.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Config/AuthConfig.js +0 -0
- /package/{build/Framework → Framework}/Config/AuthConfig.js.map +0 -0
- /package/{build/Framework → Framework}/Config/BaseConfig.d.ts +0 -0
- /package/{build/Framework → Framework}/Config/BaseConfig.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Config/BaseConfig.js +0 -0
- /package/{build/Framework → Framework}/Config/BaseConfig.js.map +0 -0
- /package/{build/Framework → Framework}/Config/CacheConfig.d.ts +0 -0
- /package/{build/Framework → Framework}/Config/CacheConfig.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Config/CacheConfig.js +0 -0
- /package/{build/Framework → Framework}/Config/CacheConfig.js.map +0 -0
- /package/{build/Framework → Framework}/Config/DatabaseConfig.d.ts +0 -0
- /package/{build/Framework → Framework}/Config/DatabaseConfig.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Config/DatabaseConfig.js +0 -0
- /package/{build/Framework → Framework}/Config/DatabaseConfig.js.map +0 -0
- /package/{build/Framework → Framework}/Config/MailConfig.d.ts +0 -0
- /package/{build/Framework → Framework}/Config/MailConfig.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Config/MailConfig.js +0 -0
- /package/{build/Framework → Framework}/Config/MailConfig.js.map +0 -0
- /package/{build/Framework → Framework}/Config/index.d.ts +0 -0
- /package/{build/Framework → Framework}/Config/index.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Config/index.js +0 -0
- /package/{build/Framework → Framework}/Config/index.js.map +0 -0
- /package/{build/Framework → Framework}/Middleware/AuthMiddleware.d.ts +0 -0
- /package/{build/Framework → Framework}/Middleware/AuthMiddleware.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Middleware/AuthMiddleware.js +0 -0
- /package/{build/Framework → Framework}/Middleware/AuthMiddleware.js.map +0 -0
- /package/{build/Framework → Framework}/Middleware/CorsMiddleware.d.ts +0 -0
- /package/{build/Framework → Framework}/Middleware/CorsMiddleware.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Middleware/CorsMiddleware.js +0 -0
- /package/{build/Framework → Framework}/Middleware/CorsMiddleware.js.map +0 -0
- /package/{build/Framework → Framework}/Middleware/StaticAssetsMiddleware.d.ts +0 -0
- /package/{build/Framework → Framework}/Middleware/StaticAssetsMiddleware.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Middleware/StaticAssetsMiddleware.js +0 -0
- /package/{build/Framework → Framework}/Middleware/StaticAssetsMiddleware.js.map +0 -0
- /package/{build/Framework → Framework}/Middleware/index.d.ts +0 -0
- /package/{build/Framework → Framework}/Middleware/index.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Middleware/index.js +0 -0
- /package/{build/Framework → Framework}/Middleware/index.js.map +0 -0
- /package/{build/Framework → Framework}/Provider.d.ts +0 -0
- /package/{build/Framework → Framework}/Provider.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Provider.js +0 -0
- /package/{build/Framework → Framework}/Provider.js.map +0 -0
- /package/{build/Framework → Framework}/Providers/CacheProvider.d.ts +0 -0
- /package/{build/Framework → Framework}/Providers/CacheProvider.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Providers/CacheProvider.js +0 -0
- /package/{build/Framework → Framework}/Providers/CacheProvider.js.map +0 -0
- /package/{build/Framework → Framework}/Providers/DatabaseProvider.d.ts +0 -0
- /package/{build/Framework → Framework}/Providers/DatabaseProvider.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Providers/DatabaseProvider.js +0 -0
- /package/{build/Framework → Framework}/Providers/DatabaseProvider.js.map +0 -0
- /package/{build/Framework → Framework}/Providers/MailProvider.d.ts +0 -0
- /package/{build/Framework → Framework}/Providers/MailProvider.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Providers/MailProvider.js +0 -0
- /package/{build/Framework → Framework}/Providers/MailProvider.js.map +0 -0
- /package/{build/Framework → Framework}/Providers/WebsocketsProvider.d.ts +0 -0
- /package/{build/Framework → Framework}/Providers/WebsocketsProvider.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Providers/WebsocketsProvider.js +0 -0
- /package/{build/Framework → Framework}/Providers/WebsocketsProvider.js.map +0 -0
- /package/{build/Framework → Framework}/Resolvers/AuthResolver.d.ts +0 -0
- /package/{build/Framework → Framework}/Resolvers/AuthResolver.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Resolvers/AuthResolver.js +0 -0
- /package/{build/Framework → Framework}/Resolvers/AuthResolver.js.map +0 -0
- /package/{build/Framework → Framework}/Resolvers/EntityResolver.d.ts +0 -0
- /package/{build/Framework → Framework}/Resolvers/EntityResolver.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Resolvers/EntityResolver.js +0 -0
- /package/{build/Framework → Framework}/Resolvers/EntityResolver.js.map +0 -0
- /package/{build/Framework → Framework}/Resolvers/FormResolver.d.ts +0 -0
- /package/{build/Framework → Framework}/Resolvers/FormResolver.d.ts.map +0 -0
- /package/{build/Framework → Framework}/Resolvers/FormResolver.js +0 -0
- /package/{build/Framework → Framework}/Resolvers/FormResolver.js.map +0 -0
- /package/{build/Framework → Framework}/RootDir.d.ts +0 -0
- /package/{build/Framework → Framework}/RootDir.d.ts.map +0 -0
- /package/{build/Framework → Framework}/RootDir.js +0 -0
- /package/{build/Framework → Framework}/RootDir.js.map +0 -0
- /package/{build/Framework → Framework}/index.d.ts +0 -0
- /package/{build/Framework → Framework}/index.d.ts.map +0 -0
- /package/{build/Framework → Framework}/index.js +0 -0
- /package/{build/Framework → Framework}/index.js.map +0 -0
- /package/{build/Mail → Mail}/MailAddress.d.ts +0 -0
- /package/{build/Mail → Mail}/MailAddress.d.ts.map +0 -0
- /package/{build/Mail → Mail}/MailAddress.js +0 -0
- /package/{build/Mail → Mail}/MailAddress.js.map +0 -0
- /package/{build/Mail → Mail}/MailTransport.d.ts +0 -0
- /package/{build/Mail → Mail}/MailTransport.d.ts.map +0 -0
- /package/{build/Mail → Mail}/MailTransport.js +0 -0
- /package/{build/Mail → Mail}/MailTransport.js.map +0 -0
- /package/{build/Mail → Mail}/Mailable.d.ts +0 -0
- /package/{build/Mail → Mail}/Mailable.d.ts.map +0 -0
- /package/{build/Mail → Mail}/Mailable.js +0 -0
- /package/{build/Mail → Mail}/Mailable.js.map +0 -0
- /package/{build/Mail → Mail}/Mailer.d.ts +0 -0
- /package/{build/Mail → Mail}/Mailer.d.ts.map +0 -0
- /package/{build/Mail → Mail}/Mailer.js +0 -0
- /package/{build/Mail → Mail}/Mailer.js.map +0 -0
- /package/{build/Mail → Mail}/PendingMail.d.ts +0 -0
- /package/{build/Mail → Mail}/PendingMail.d.ts.map +0 -0
- /package/{build/Mail → Mail}/PendingMail.js +0 -0
- /package/{build/Mail → Mail}/PendingMail.js.map +0 -0
- /package/{build/Mail → Mail}/SentMessage.d.ts +0 -0
- /package/{build/Mail → Mail}/SentMessage.d.ts.map +0 -0
- /package/{build/Mail → Mail}/SentMessage.js +0 -0
- /package/{build/Mail → Mail}/SentMessage.js.map +0 -0
- /package/{build/Mail → Mail}/Transports/MemoryTransport.d.ts +0 -0
- /package/{build/Mail → Mail}/Transports/MemoryTransport.d.ts.map +0 -0
- /package/{build/Mail → Mail}/Transports/MemoryTransport.js +0 -0
- /package/{build/Mail → Mail}/Transports/MemoryTransport.js.map +0 -0
- /package/{build/Mail → Mail}/Transports/SendGridTransport.d.ts +0 -0
- /package/{build/Mail → Mail}/Transports/SendGridTransport.d.ts.map +0 -0
- /package/{build/Mail → Mail}/Transports/SendGridTransport.js +0 -0
- /package/{build/Mail → Mail}/Transports/SendGridTransport.js.map +0 -0
- /package/{build/Mail → Mail}/index.d.ts +0 -0
- /package/{build/Mail → Mail}/index.d.ts.map +0 -0
- /package/{build/Mail → Mail}/index.js +0 -0
- /package/{build/Mail → Mail}/index.js.map +0 -0
- /package/{build/Models → Models}/Model.d.ts +0 -0
- /package/{build/Models → Models}/Model.d.ts.map +0 -0
- /package/{build/Models → Models}/Model.js +0 -0
- /package/{build/Models → Models}/Model.js.map +0 -0
- /package/{build/Models → Models}/index.d.ts +0 -0
- /package/{build/Models → Models}/index.d.ts.map +0 -0
- /package/{build/Models → Models}/index.js +0 -0
- /package/{build/Models → Models}/index.js.map +0 -0
- /package/{build/Router → Router}/BaseController.d.ts +0 -0
- /package/{build/Router → Router}/BaseController.d.ts.map +0 -0
- /package/{build/Router → Router}/BaseController.js +0 -0
- /package/{build/Router → Router}/BaseController.js.map +0 -0
- /package/{build/Router → Router}/Decorators.d.ts +0 -0
- /package/{build/Router → Router}/Decorators.d.ts.map +0 -0
- /package/{build/Router → Router}/Decorators.js +0 -0
- /package/{build/Router → Router}/Decorators.js.map +0 -0
- /package/{build/Router → Router}/Guard.d.ts +0 -0
- /package/{build/Router → Router}/Guard.d.ts.map +0 -0
- /package/{build/Router → Router}/Guard.js +0 -0
- /package/{build/Router → Router}/Guard.js.map +0 -0
- /package/{build/Router → Router}/Http/Contracts.d.ts +0 -0
- /package/{build/Router → Router}/Http/Contracts.d.ts.map +0 -0
- /package/{build/Router → Router}/Http/Contracts.js +0 -0
- /package/{build/Router → Router}/Http/Contracts.js.map +0 -0
- /package/{build/Router → Router}/Http/ErrorHandler.d.ts +0 -0
- /package/{build/Router → Router}/Http/ErrorHandler.d.ts.map +0 -0
- /package/{build/Router → Router}/Http/ErrorHandler.js +0 -0
- /package/{build/Router → Router}/Http/ErrorHandler.js.map +0 -0
- /package/{build/Router → Router}/Http/ErrorHandlerInterface.d.ts +0 -0
- /package/{build/Router → Router}/Http/ErrorHandlerInterface.d.ts.map +0 -0
- /package/{build/Router → Router}/Http/ErrorHandlerInterface.js +0 -0
- /package/{build/Router → Router}/Http/ErrorHandlerInterface.js.map +0 -0
- /package/{build/Router → Router}/Http/Errors/HttpError.d.ts +0 -0
- /package/{build/Router → Router}/Http/Errors/HttpError.d.ts.map +0 -0
- /package/{build/Router → Router}/Http/Errors/HttpError.js +0 -0
- /package/{build/Router → Router}/Http/Errors/HttpError.js.map +0 -0
- /package/{build/Router → Router}/Http/Handler.d.ts +0 -0
- /package/{build/Router → Router}/Http/Handler.d.ts.map +0 -0
- /package/{build/Router → Router}/Http/Handler.js +0 -0
- /package/{build/Router → Router}/Http/Handler.js.map +0 -0
- /package/{build/Router → Router}/Http/HttpRoute.d.ts +0 -0
- /package/{build/Router → Router}/Http/HttpRoute.d.ts.map +0 -0
- /package/{build/Router → Router}/Http/HttpRoute.js +0 -0
- /package/{build/Router → Router}/Http/HttpRoute.js.map +0 -0
- /package/{build/Router → Router}/Http/Middleware.d.ts +0 -0
- /package/{build/Router → Router}/Http/Middleware.d.ts.map +0 -0
- /package/{build/Router → Router}/Http/Middleware.js +0 -0
- /package/{build/Router → Router}/Http/Middleware.js.map +0 -0
- /package/{build/Router → Router}/Http/Request.d.ts +0 -0
- /package/{build/Router → Router}/Http/Request.d.ts.map +0 -0
- /package/{build/Router → Router}/Http/Request.js +0 -0
- /package/{build/Router → Router}/Http/Request.js.map +0 -0
- /package/{build/Router → Router}/Http/Response.d.ts +0 -0
- /package/{build/Router → Router}/Http/Response.d.ts.map +0 -0
- /package/{build/Router → Router}/Http/Response.js +0 -0
- /package/{build/Router → Router}/Http/Response.js.map +0 -0
- /package/{build/Router → Router}/Http/index.d.ts +0 -0
- /package/{build/Router → Router}/Http/index.d.ts.map +0 -0
- /package/{build/Router → Router}/Http/index.js +0 -0
- /package/{build/Router → Router}/Http/index.js.map +0 -0
- /package/{build/Router → Router}/Metadata.d.ts +0 -0
- /package/{build/Router → Router}/Metadata.d.ts.map +0 -0
- /package/{build/Router → Router}/Metadata.js +0 -0
- /package/{build/Router → Router}/Metadata.js.map +0 -0
- /package/{build/Router → Router}/Middleware.d.ts +0 -0
- /package/{build/Router → Router}/Middleware.d.ts.map +0 -0
- /package/{build/Router → Router}/Middleware.js +0 -0
- /package/{build/Router → Router}/Middleware.js.map +0 -0
- /package/{build/Router → Router}/Request.d.ts +0 -0
- /package/{build/Router → Router}/Request.d.ts.map +0 -0
- /package/{build/Router → Router}/Request.js +0 -0
- /package/{build/Router → Router}/Request.js.map +0 -0
- /package/{build/Router → Router}/Route.d.ts +0 -0
- /package/{build/Router → Router}/Route.d.ts.map +0 -0
- /package/{build/Router → Router}/Route.js +0 -0
- /package/{build/Router → Router}/Route.js.map +0 -0
- /package/{build/Router → Router}/RouteNotFoundError.d.ts +0 -0
- /package/{build/Router → Router}/RouteNotFoundError.d.ts.map +0 -0
- /package/{build/Router → Router}/RouteNotFoundError.js +0 -0
- /package/{build/Router → Router}/RouteNotFoundError.js.map +0 -0
- /package/{build/Router → Router}/Router.d.ts +0 -0
- /package/{build/Router → Router}/Router.d.ts.map +0 -0
- /package/{build/Router → Router}/Router.js +0 -0
- /package/{build/Router → Router}/Router.js.map +0 -0
- /package/{build/Router → Router}/Servers/index.d.ts +0 -0
- /package/{build/Router → Router}/Servers/index.d.ts.map +0 -0
- /package/{build/Router → Router}/Servers/index.js +0 -0
- /package/{build/Router → Router}/Servers/index.js.map +0 -0
- /package/{build/Router → Router}/Servers/node.d.ts +0 -0
- /package/{build/Router → Router}/Servers/node.d.ts.map +0 -0
- /package/{build/Router → Router}/Servers/node.js +0 -0
- /package/{build/Router → Router}/Servers/node.js.map +0 -0
- /package/{build/Router → Router}/Servers/uNetworking.d.ts +0 -0
- /package/{build/Router → Router}/Servers/uNetworking.d.ts.map +0 -0
- /package/{build/Router → Router}/Servers/uNetworking.js +0 -0
- /package/{build/Router → Router}/Servers/uNetworking.js.map +0 -0
- /package/{build/Router → Router}/Websockets/Handler.d.ts +0 -0
- /package/{build/Router → Router}/Websockets/Handler.d.ts.map +0 -0
- /package/{build/Router → Router}/Websockets/Handler.js +0 -0
- /package/{build/Router → Router}/Websockets/Handler.js.map +0 -0
- /package/{build/Router → Router}/Websockets/Middleware.d.ts +0 -0
- /package/{build/Router → Router}/Websockets/Middleware.d.ts.map +0 -0
- /package/{build/Router → Router}/Websockets/Middleware.js +0 -0
- /package/{build/Router → Router}/Websockets/Middleware.js.map +0 -0
- /package/{build/Router → Router}/Websockets/Request.d.ts +0 -0
- /package/{build/Router → Router}/Websockets/Request.d.ts.map +0 -0
- /package/{build/Router → Router}/Websockets/Request.js +0 -0
- /package/{build/Router → Router}/Websockets/Request.js.map +0 -0
- /package/{build/Router → Router}/Websockets/WebsocketRoute.d.ts +0 -0
- /package/{build/Router → Router}/Websockets/WebsocketRoute.d.ts.map +0 -0
- /package/{build/Router → Router}/Websockets/WebsocketRoute.js +0 -0
- /package/{build/Router → Router}/Websockets/WebsocketRoute.js.map +0 -0
- /package/{build/Router → Router}/Websockets/index.d.ts +0 -0
- /package/{build/Router → Router}/Websockets/index.d.ts.map +0 -0
- /package/{build/Router → Router}/Websockets/index.js +0 -0
- /package/{build/Router → Router}/Websockets/index.js.map +0 -0
- /package/{build/Router → Router}/Websockets/types.d.ts +0 -0
- /package/{build/Router → Router}/Websockets/types.d.ts.map +0 -0
- /package/{build/Router → Router}/Websockets/types.js +0 -0
- /package/{build/Router → Router}/Websockets/types.js.map +0 -0
- /package/{build/Router → Router}/index.d.ts +0 -0
- /package/{build/Router → Router}/index.d.ts.map +0 -0
- /package/{build/Router → Router}/index.js +0 -0
- /package/{build/Router → Router}/index.js.map +0 -0
- /package/{build/Storage → Storage}/File.d.ts +0 -0
- /package/{build/Storage → Storage}/File.d.ts.map +0 -0
- /package/{build/Storage → Storage}/File.js +0 -0
- /package/{build/Storage → Storage}/File.js.map +0 -0
- /package/{build/Storage → Storage}/Image.d.ts +0 -0
- /package/{build/Storage → Storage}/Image.d.ts.map +0 -0
- /package/{build/Storage → Storage}/Image.js +0 -0
- /package/{build/Storage → Storage}/Image.js.map +0 -0
- /package/{build/Storage → Storage}/InvalidImage.d.ts +0 -0
- /package/{build/Storage → Storage}/InvalidImage.d.ts.map +0 -0
- /package/{build/Storage → Storage}/InvalidImage.js +0 -0
- /package/{build/Storage → Storage}/InvalidImage.js.map +0 -0
- /package/{build/Storage → Storage}/Storage.d.ts +0 -0
- /package/{build/Storage → Storage}/Storage.d.ts.map +0 -0
- /package/{build/Storage → Storage}/Storage.js +0 -0
- /package/{build/Storage → Storage}/Storage.js.map +0 -0
- /package/{build/Storage → Storage}/index.d.ts +0 -0
- /package/{build/Storage → Storage}/index.d.ts.map +0 -0
- /package/{build/Storage → Storage}/index.js +0 -0
- /package/{build/Storage → Storage}/index.js.map +0 -0
- /package/{build/Storage → Storage}/utils.d.ts +0 -0
- /package/{build/Storage → Storage}/utils.d.ts.map +0 -0
- /package/{build/Storage → Storage}/utils.js +0 -0
- /package/{build/Storage → Storage}/utils.js.map +0 -0
- /package/{build/Support → Support}/Array.d.ts +0 -0
- /package/{build/Support → Support}/Array.d.ts.map +0 -0
- /package/{build/Support → Support}/Array.js +0 -0
- /package/{build/Support → Support}/Array.js.map +0 -0
- /package/{build/Support → Support}/Math.d.ts +0 -0
- /package/{build/Support → Support}/Math.d.ts.map +0 -0
- /package/{build/Support → Support}/Math.js +0 -0
- /package/{build/Support → Support}/Math.js.map +0 -0
- /package/{build/Support → Support}/Metadata.d.ts +0 -0
- /package/{build/Support → Support}/Metadata.d.ts.map +0 -0
- /package/{build/Support → Support}/Metadata.js +0 -0
- /package/{build/Support → Support}/Metadata.js.map +0 -0
- /package/{build/Support → Support}/String.d.ts +0 -0
- /package/{build/Support → Support}/String.d.ts.map +0 -0
- /package/{build/Support → Support}/String.js +0 -0
- /package/{build/Support → Support}/String.js.map +0 -0
- /package/{build/Support → Support}/index.d.ts +0 -0
- /package/{build/Support → Support}/index.d.ts.map +0 -0
- /package/{build/Support → Support}/index.js +0 -0
- /package/{build/Support → Support}/index.js.map +0 -0
- /package/{build/Support → Support}/utils.d.ts +0 -0
- /package/{build/Support → Support}/utils.d.ts.map +0 -0
- /package/{build/Support → Support}/utils.js +0 -0
- /package/{build/Support → Support}/utils.js.map +0 -0
- /package/{build/Testing → Testing}/TestCase.d.ts +0 -0
- /package/{build/Testing → Testing}/TestCase.d.ts.map +0 -0
- /package/{build/Testing → Testing}/TestCase.js +0 -0
- /package/{build/Testing → Testing}/TestCase.js.map +0 -0
- /package/{build/Validation → Validation}/Rule.d.ts +0 -0
- /package/{build/Validation → Validation}/Rule.d.ts.map +0 -0
- /package/{build/Validation → Validation}/Rule.js +0 -0
- /package/{build/Validation → Validation}/Rule.js.map +0 -0
- /package/{build/Validation → Validation}/RuleInterface.d.ts +0 -0
- /package/{build/Validation → Validation}/RuleInterface.d.ts.map +0 -0
- /package/{build/Validation → Validation}/RuleInterface.js +0 -0
- /package/{build/Validation → Validation}/RuleInterface.js.map +0 -0
- /package/{build/Validation → Validation}/Rules/Email.d.ts +0 -0
- /package/{build/Validation → Validation}/Rules/Email.d.ts.map +0 -0
- /package/{build/Validation → Validation}/Rules/Email.js +0 -0
- /package/{build/Validation → Validation}/Rules/Email.js.map +0 -0
- /package/{build/Validation → Validation}/Rules/FileExtension.d.ts +0 -0
- /package/{build/Validation → Validation}/Rules/FileExtension.d.ts.map +0 -0
- /package/{build/Validation → Validation}/Rules/FileExtension.js +0 -0
- /package/{build/Validation → Validation}/Rules/FileExtension.js.map +0 -0
- /package/{build/Validation → Validation}/Rules/MaxLength.d.ts +0 -0
- /package/{build/Validation → Validation}/Rules/MaxLength.d.ts.map +0 -0
- /package/{build/Validation → Validation}/Rules/MaxLength.js +0 -0
- /package/{build/Validation → Validation}/Rules/MaxLength.js.map +0 -0
- /package/{build/Validation → Validation}/Rules/MinLength.d.ts +0 -0
- /package/{build/Validation → Validation}/Rules/MinLength.d.ts.map +0 -0
- /package/{build/Validation → Validation}/Rules/MinLength.js +0 -0
- /package/{build/Validation → Validation}/Rules/MinLength.js.map +0 -0
- /package/{build/Validation → Validation}/Rules/Optional.d.ts +0 -0
- /package/{build/Validation → Validation}/Rules/Optional.d.ts.map +0 -0
- /package/{build/Validation → Validation}/Rules/Optional.js +0 -0
- /package/{build/Validation → Validation}/Rules/Optional.js.map +0 -0
- /package/{build/Validation → Validation}/Rules/Required.d.ts +0 -0
- /package/{build/Validation → Validation}/Rules/Required.d.ts.map +0 -0
- /package/{build/Validation → Validation}/Rules/Required.js +0 -0
- /package/{build/Validation → Validation}/Rules/Required.js.map +0 -0
- /package/{build/Validation → Validation}/Validator.d.ts +0 -0
- /package/{build/Validation → Validation}/Validator.d.ts.map +0 -0
- /package/{build/Validation → Validation}/Validator.js +0 -0
- /package/{build/Validation → Validation}/Validator.js.map +0 -0
- /package/{build/Validation → Validation}/index.d.ts +0 -0
- /package/{build/Validation → Validation}/index.d.ts.map +0 -0
- /package/{build/Validation → Validation}/index.js +0 -0
- /package/{build/Validation → Validation}/index.js.map +0 -0
package/Database/Types.ts
DELETED
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import { Query } from './Query'
|
|
2
|
-
import { StringExpression } from './StringExpression'
|
|
3
|
-
import { EntityQuery } from './EntityQuery'
|
|
4
|
-
|
|
5
|
-
export enum Operators {
|
|
6
|
-
'=' = '=',
|
|
7
|
-
'<' = '<',
|
|
8
|
-
'<=' = '<=',
|
|
9
|
-
'>' = '>',
|
|
10
|
-
'>=' = '>=',
|
|
11
|
-
'!=' = '!=',
|
|
12
|
-
'AND' = 'AND',
|
|
13
|
-
'OR' = 'OR',
|
|
14
|
-
'IS' = 'IS',
|
|
15
|
-
'IN' = 'IN',
|
|
16
|
-
'NOT IN' = 'NOT IN',
|
|
17
|
-
'LIKE' = 'LIKE',
|
|
18
|
-
'IS NOT' = 'IS NOT',
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export enum JoinType {
|
|
22
|
-
INNER = 'INNER',
|
|
23
|
-
LEFT = 'LEFT',
|
|
24
|
-
RIGHT = 'RIGHT'
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export type BooleanOperator = 'AND' | 'OR' | 'XOR';
|
|
28
|
-
export type Operator = keyof typeof Operators;
|
|
29
|
-
export type SqlValue = string | number | Date | undefined;
|
|
30
|
-
export type SqlValueMap = {[key: string]: SqlValue};
|
|
31
|
-
|
|
32
|
-
class JoinClause {
|
|
33
|
-
type: keyof typeof JoinType
|
|
34
|
-
table: string
|
|
35
|
-
first: string
|
|
36
|
-
operator: Operator
|
|
37
|
-
second: string
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface BaseComponents {
|
|
41
|
-
table: string;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface CreateComponents {
|
|
45
|
-
table: string;
|
|
46
|
-
columns: (string | StringExpression)[];
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export interface SelectComponents extends BaseComponents {
|
|
50
|
-
distinct?: boolean;
|
|
51
|
-
columns: (string | StringExpression)[];
|
|
52
|
-
aggregate?: {
|
|
53
|
-
function: string,
|
|
54
|
-
columns: string[];
|
|
55
|
-
};
|
|
56
|
-
joins: JoinClause[];
|
|
57
|
-
wheres: SqlClause[];
|
|
58
|
-
groups: string[];
|
|
59
|
-
orders: [string, Direction][];
|
|
60
|
-
having: Where[];
|
|
61
|
-
limit?: {from: number, count?: number};
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface InsertComponents extends BaseComponents {
|
|
65
|
-
insert?: SqlValueMap[];
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export interface UpdateComponents extends BaseComponents {
|
|
69
|
-
update?: SqlValueMap;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export interface Components extends BaseComponents, SelectComponents, InsertComponents, UpdateComponents, CreateComponents {
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// export interface SelectComponents extends Components {
|
|
76
|
-
// distinct = false;
|
|
77
|
-
// select: string[] = ['*'];
|
|
78
|
-
// insert?: {};
|
|
79
|
-
// delete?: boolean;
|
|
80
|
-
// joins?: JoinClause[];
|
|
81
|
-
// wheres?: Where[];
|
|
82
|
-
// orderBy?: OrderBy[];
|
|
83
|
-
// }
|
|
84
|
-
|
|
85
|
-
export type WhereFunction = (query: Query) => void;
|
|
86
|
-
export type WhereCondition = {[key: string]: string | number};
|
|
87
|
-
// export type WhereValue = SqlValue | WhereFunction | WhereCondition;
|
|
88
|
-
export type WhereValue = SqlValue;
|
|
89
|
-
|
|
90
|
-
export type Direction = 'ASC' | 'DESC';
|
|
91
|
-
|
|
92
|
-
export interface SqlClause {
|
|
93
|
-
toSql(): string;
|
|
94
|
-
|
|
95
|
-
getValues(): SqlValue[];
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
class SqlExpression implements SqlClause {
|
|
99
|
-
constructor(private sql: string, private values: SqlValue[] = []) {}
|
|
100
|
-
|
|
101
|
-
toSql() {
|
|
102
|
-
return this.sql
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
getValues() {
|
|
106
|
-
return this.values
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export class WhereExpression extends SqlExpression {
|
|
111
|
-
constructor(public column: string, public expression: SqlExpression, public boolean: BooleanOperator) {
|
|
112
|
-
super(`${boolean} ${column} ${expression.toSql()}`, expression.getValues())
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
export class Where extends WhereExpression {
|
|
117
|
-
constructor(column: string, operator: Operator, value: SqlValue, boolean: BooleanOperator) {
|
|
118
|
-
super(column, new SqlExpression(`${operator} ?`, [value]), boolean)
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export class WhereNested {
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export class WhereBetween extends WhereExpression {
|
|
126
|
-
constructor(column: string, values: [SqlValue, SqlValue], boolean: BooleanOperator, not = false) {
|
|
127
|
-
super(column, new SqlExpression(`${not ? 'NOT ' : ''}BETWEEN ? AND ?`, values), boolean)
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
export class WhereLike extends WhereExpression {
|
|
132
|
-
constructor(column: string, value: SqlValue, boolean: BooleanOperator, not = false) {
|
|
133
|
-
super(column, new SqlExpression(`${not ? 'NOT ' : ''}LIKE ?`, [value]), boolean)
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export class WhereIn extends WhereExpression {
|
|
138
|
-
constructor(column: string, values: WhereValue[], boolean: BooleanOperator, not = false) {
|
|
139
|
-
const value = values.map(() => '?').join(', ')
|
|
140
|
-
if (values.length) {
|
|
141
|
-
super(column, new SqlExpression(`${not ? 'NOT ' : ''}IN (${value})`, values), boolean)
|
|
142
|
-
} else {
|
|
143
|
-
super('', new SqlExpression('1 = 0', values), boolean)
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export class WhereNull extends WhereExpression {
|
|
149
|
-
constructor(column: string, boolean: BooleanOperator, not = false) {
|
|
150
|
-
super(column, new SqlExpression(`IS ${not ? 'NOT ' : ''}NULL`), boolean)
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export class WhereSubSelect extends WhereExpression {
|
|
155
|
-
constructor(column: string, operator: Operator, public query: Query, boolean: BooleanOperator) {
|
|
156
|
-
super(column, new SqlExpression(`${operator} (${query.toSQL()})`, query.getBindings()), boolean)
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
// tslint:disable-next-line:no-any
|
|
161
|
-
export type RelationsTreeQuery = (query: EntityQuery<any>) => void
|
|
162
|
-
|
|
163
|
-
export interface RelationsTree {
|
|
164
|
-
[key: string]: RelationsTree | RelationsTreeQuery
|
|
165
|
-
}
|
package/Database/index.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ChildKeys, ChildObject, Constructor } from '@Typetron/Support'
|
|
2
|
-
import { Entity } from './Entity'
|
|
3
|
-
import { BaseRelationship } from './ORM/BaseRelationship'
|
|
4
|
-
|
|
5
|
-
export type EntityKeys<T extends Entity> = ChildKeys<T, Entity>
|
|
6
|
-
export type EntityColumns<T extends Entity> = { [P in EntityKeys<T>]: T[P] extends Function ? never : P }[ EntityKeys<T>]
|
|
7
|
-
|
|
8
|
-
export type EntityObject<T extends Entity> = ChildObject<{
|
|
9
|
-
[P in keyof T]: T[P] extends BaseRelationship<infer U> ? U | number : T[P]
|
|
10
|
-
}, Entity>
|
|
11
|
-
export type EntityConstructor<T extends Entity> = typeof Entity & Constructor<T>
|
|
12
|
-
// export type EntityConstructor<T extends Entity> = {[key in keyof typeof Entity]: (typeof Entity)[key]} & Constructor<T>;
|
|
13
|
-
export type DotNotationProperties<T> = string
|
|
14
|
-
|
|
15
|
-
export * from './Query'
|
|
16
|
-
export * from './Entity'
|
|
17
|
-
export * from './Decorators'
|
|
18
|
-
export * from './StringExpression'
|
|
19
|
-
export * from './Expression'
|
|
20
|
-
export * from './Drivers'
|
|
21
|
-
export * from './Fields'
|
|
22
|
-
export * from './Connection'
|
|
23
|
-
|
package/Encryption/index.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { compare, hash } from 'bcryptjs'
|
|
2
|
-
import * as jwt from 'jsonwebtoken'
|
|
3
|
-
import { GetPublicKeyOrSecret, Secret, SignOptions, VerifyErrors, VerifyOptions } from 'jsonwebtoken'
|
|
4
|
-
|
|
5
|
-
export class Crypt {
|
|
6
|
-
hash(value: string, saltRounds: number): Promise<string> {
|
|
7
|
-
return hash(value, saltRounds)
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
compare(value: string, encrypted: string): Promise<boolean> {
|
|
11
|
-
return compare(value, encrypted)
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface JWToken<T> {
|
|
16
|
-
sub: T
|
|
17
|
-
iat: number
|
|
18
|
-
exp: number
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export class JWT {
|
|
22
|
-
sign(payload: string | Buffer | object, secretOrPrivateKey: Secret, options?: SignOptions) {
|
|
23
|
-
return new Promise<string>((resolve, reject) => {
|
|
24
|
-
jwt.sign(
|
|
25
|
-
payload,
|
|
26
|
-
secretOrPrivateKey,
|
|
27
|
-
options ?? {},
|
|
28
|
-
(error: Error | null, encoded?: string) => {
|
|
29
|
-
error ? reject(error) : resolve(encoded as string)
|
|
30
|
-
}
|
|
31
|
-
)
|
|
32
|
-
})
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
verify<T>(token: string, secretOrPrivateKey: Secret | GetPublicKeyOrSecret, options?: VerifyOptions) {
|
|
36
|
-
return new Promise<JWToken<T>>((resolve, reject) => {
|
|
37
|
-
jwt.verify(
|
|
38
|
-
token,
|
|
39
|
-
secretOrPrivateKey,
|
|
40
|
-
{
|
|
41
|
-
...options,
|
|
42
|
-
complete: true
|
|
43
|
-
},
|
|
44
|
-
(error: VerifyErrors | null, decoded) => {
|
|
45
|
-
error ? reject(error) : resolve(decoded?.payload as any as JWToken<T>)
|
|
46
|
-
}
|
|
47
|
-
)
|
|
48
|
-
})
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
}
|
package/Forms/Decorators.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { RuleInterface } from '../Validation'
|
|
2
|
-
import { Type } from '../Support'
|
|
3
|
-
import { FormField } from './FormFields'
|
|
4
|
-
import { Form } from './Form'
|
|
5
|
-
|
|
6
|
-
export const FormMetadataKey = 'form:fields'
|
|
7
|
-
|
|
8
|
-
export function Field<T extends Form>(name?: string) {
|
|
9
|
-
return function(target: T, property: string) {
|
|
10
|
-
const fields: {[key: string]: FormField} = Reflect.getMetadata(FormMetadataKey, target.constructor) || {}
|
|
11
|
-
const type = Reflect.getMetadata('design:type', target, property)
|
|
12
|
-
const field = fields[property] || new FormField(name || property, type)
|
|
13
|
-
field.name = name || property
|
|
14
|
-
fields[property] = field
|
|
15
|
-
Reflect.defineMetadata(FormMetadataKey, fields, target.constructor)
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// tslint:disable-next-line:no-any
|
|
20
|
-
export function Rules(...rules: (Type<RuleInterface> | ((...args: any[]) => Type<RuleInterface>))[]) {
|
|
21
|
-
return function(target: Object, property: string) {
|
|
22
|
-
const fields: {[key: string]: FormField} = Reflect.getMetadata(FormMetadataKey, target.constructor) || {}
|
|
23
|
-
const type = Reflect.getMetadata('design:type', target, property)
|
|
24
|
-
const field = fields[property] || new FormField(property, type)
|
|
25
|
-
field.rules = rules
|
|
26
|
-
fields[property] = field
|
|
27
|
-
Reflect.defineMetadata(FormMetadataKey, fields, target.constructor)
|
|
28
|
-
}
|
|
29
|
-
}
|
package/Forms/Form.ts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { FormMetadataKey } from './Decorators'
|
|
2
|
-
import { RuleValue } from '../Validation'
|
|
3
|
-
import { ChildKeys, ChildObject, Constructor } from '../Support'
|
|
4
|
-
import { FormField } from './FormFields'
|
|
5
|
-
import { Injectable, Scope } from '../Container'
|
|
6
|
-
|
|
7
|
-
export type FormFields<T> = ChildObject<T, Form>;
|
|
8
|
-
|
|
9
|
-
@Injectable(Scope.TRANSIENT)
|
|
10
|
-
export abstract class Form {
|
|
11
|
-
|
|
12
|
-
readonly errors: {[key: string]: Record<string, string>} = {}
|
|
13
|
-
|
|
14
|
-
static fields<T extends Form>(this: Constructor<T>): Record<ChildKeys<T, Form>, FormField> {
|
|
15
|
-
return Reflect.getMetadata(FormMetadataKey, this)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
fields() {
|
|
19
|
-
return (this.constructor as (Constructor<Form> & typeof Form)).fields()
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
valid() {
|
|
23
|
-
const fields = Object.values(this.fields()) as FormField[]
|
|
24
|
-
fields.forEach(field => {
|
|
25
|
-
const errors = field.validate(this[field.name as keyof FormFields<this>])
|
|
26
|
-
if (errors) {
|
|
27
|
-
this.errors[field.name] = errors
|
|
28
|
-
}
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
return !Object.keys(this.errors).length
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
validated() {
|
|
35
|
-
const fields = Object.values(this.fields()) as FormField[]
|
|
36
|
-
return fields.filter(field => !this.errors[field.name])
|
|
37
|
-
.reduce((obj, field) => {
|
|
38
|
-
const value = this[field.name as keyof this]
|
|
39
|
-
if (value) {
|
|
40
|
-
obj[field.name] = value
|
|
41
|
-
}
|
|
42
|
-
return obj
|
|
43
|
-
}, <{[key: string]: RuleValue}>{})
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
value() {
|
|
47
|
-
const fields = Object.values(this.fields()) as FormField[]
|
|
48
|
-
// tslint:disable-next-line:no-any
|
|
49
|
-
const value: Record<string, any> = {}
|
|
50
|
-
fields.forEach(field => {
|
|
51
|
-
value[field.name] = this[field.name as keyof FormFields<this>]
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
return value
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
fill(data: Partial<FormFields<this>>) {
|
|
58
|
-
const fields = Object.values(this.fields()) as FormField[]
|
|
59
|
-
fields.forEach(field => {
|
|
60
|
-
if (field.name in data) {
|
|
61
|
-
// @ts-ignore
|
|
62
|
-
this[field.name] = data[field.name]
|
|
63
|
-
}
|
|
64
|
-
})
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
toJSON() {
|
|
68
|
-
return this.value()
|
|
69
|
-
}
|
|
70
|
-
}
|
package/Forms/FormFields.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Constructor, Type } from '../Support'
|
|
2
|
-
import { Optional, RuleInterface } from '../Validation'
|
|
3
|
-
|
|
4
|
-
export class FormField {
|
|
5
|
-
constructor(
|
|
6
|
-
public name: string,
|
|
7
|
-
// tslint:disable-next-line:no-any
|
|
8
|
-
public type: any,
|
|
9
|
-
// tslint:disable-next-line:no-any
|
|
10
|
-
public rules: (Type<RuleInterface> | ((...args: any[]) => Type<RuleInterface>)) [] = []
|
|
11
|
-
) {
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// tslint:disable-next-line:no-any
|
|
15
|
-
validate(value: any): Record<string, string> | undefined {
|
|
16
|
-
const errors: Record<string, string> = {}
|
|
17
|
-
let hasErrors = false
|
|
18
|
-
|
|
19
|
-
if (this.rules.includes(Optional) && (value === undefined || value === null)) {
|
|
20
|
-
return
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
this.rules.forEach(rule => {
|
|
24
|
-
if (!rule.prototype.passes) {
|
|
25
|
-
rule = (rule as Function)()
|
|
26
|
-
}
|
|
27
|
-
const instance = new (rule as Constructor<RuleInterface>)
|
|
28
|
-
if (!instance.passes(this.name, value)) {
|
|
29
|
-
hasErrors = true
|
|
30
|
-
errors[instance.identifier] = instance.message(this.name, value)
|
|
31
|
-
}
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
return hasErrors ? errors : undefined
|
|
35
|
-
}
|
|
36
|
-
}
|
package/Forms/index.ts
DELETED
package/Framework/App.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Application } from './Application'
|
|
2
|
-
import { ServiceIdentifier } from '../Container/Contracts'
|
|
3
|
-
|
|
4
|
-
export class App {
|
|
5
|
-
static instance: Application
|
|
6
|
-
|
|
7
|
-
static get<T>(service: ServiceIdentifier<T> | string): T {
|
|
8
|
-
return App.instance.get(service)
|
|
9
|
-
}
|
|
10
|
-
}
|
package/Framework/Application.ts
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { Container } from '../Container'
|
|
2
|
-
import { Type } from '../Support'
|
|
3
|
-
import { App } from './App'
|
|
4
|
-
import { Provider } from './Provider'
|
|
5
|
-
import { AppConfig, AuthConfig, BaseConfig } from './Config'
|
|
6
|
-
import { FormResolver } from './Resolvers/FormResolver'
|
|
7
|
-
import { EntityResolver } from './Resolvers/EntityResolver'
|
|
8
|
-
import { RootDir } from './RootDir'
|
|
9
|
-
import { StaticAssetsMiddleware } from './Middleware/StaticAssetsMiddleware'
|
|
10
|
-
import { ErrorHandler, ErrorHandlerInterface, Handler as HttpHandler, } from '../Router/Http'
|
|
11
|
-
import { Storage } from '../Storage'
|
|
12
|
-
import { AuthResolver } from './Resolvers/AuthResolver'
|
|
13
|
-
import fileSystem from 'fs'
|
|
14
|
-
import path from 'path'
|
|
15
|
-
import { WebsocketsProvider } from './Providers/WebsocketsProvider'
|
|
16
|
-
|
|
17
|
-
export class Application extends Container {
|
|
18
|
-
static defaultConfigDirectory = 'config'
|
|
19
|
-
|
|
20
|
-
constructor(
|
|
21
|
-
public directory: string,
|
|
22
|
-
public configDirectory = Application.defaultConfigDirectory
|
|
23
|
-
) {
|
|
24
|
-
super()
|
|
25
|
-
Application.setInstance(this)
|
|
26
|
-
this.set(Application, (App.instance = this))
|
|
27
|
-
this.set(Container, this)
|
|
28
|
-
this.set(RootDir, directory)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
static async create(
|
|
32
|
-
directory: string,
|
|
33
|
-
configDirectory = Application.defaultConfigDirectory
|
|
34
|
-
) {
|
|
35
|
-
const app = new this(
|
|
36
|
-
fileSystem.realpathSync.native(directory),
|
|
37
|
-
configDirectory
|
|
38
|
-
)
|
|
39
|
-
await app.bootstrap()
|
|
40
|
-
return app
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
async startServer() {
|
|
44
|
-
const httpHandler = this.get(HttpHandler)
|
|
45
|
-
|
|
46
|
-
const appConfig = this.get(AppConfig)
|
|
47
|
-
|
|
48
|
-
if (appConfig.websocketsPort) {
|
|
49
|
-
await this.registerProviders([WebsocketsProvider])
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return httpHandler.startServer(this)
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
public async registerProviders(providers: Type<Provider>[]) {
|
|
56
|
-
await Promise.all(
|
|
57
|
-
providers.map((provider) => {
|
|
58
|
-
const instance = this.get(provider)
|
|
59
|
-
return instance.register()
|
|
60
|
-
})
|
|
61
|
-
)
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
private async loadConfig(configDirectory: string) {
|
|
65
|
-
const configsPath = path.join(this.directory, configDirectory)
|
|
66
|
-
|
|
67
|
-
const storage = this.get(Storage)
|
|
68
|
-
|
|
69
|
-
if (!(await storage.exists(configsPath))) {
|
|
70
|
-
console.warn(
|
|
71
|
-
`Config path '${configsPath}' does not exist. Running with default config.`
|
|
72
|
-
)
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
storage
|
|
76
|
-
.files(configsPath)
|
|
77
|
-
.whereIn('extension', ['ts'])
|
|
78
|
-
.forEach((file) => {
|
|
79
|
-
const configItem = require(file.path).default as BaseConfig<{}>
|
|
80
|
-
if (configItem && configItem.constructor) {
|
|
81
|
-
configItem.applyNewValues()
|
|
82
|
-
this.set(configItem.constructor, configItem)
|
|
83
|
-
}
|
|
84
|
-
})
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
private registerResolvers() {
|
|
88
|
-
this.resolvers.unshift(new FormResolver(this))
|
|
89
|
-
this.resolvers.unshift(new EntityResolver(this))
|
|
90
|
-
this.resolvers.unshift(new AuthResolver(this))
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
private async bootstrap() {
|
|
94
|
-
await this.loadConfig(this.configDirectory)
|
|
95
|
-
|
|
96
|
-
this.set(ErrorHandlerInterface, this.get(ErrorHandler))
|
|
97
|
-
|
|
98
|
-
const appConfig = this.get(AppConfig)
|
|
99
|
-
await this.checkAppSecret()
|
|
100
|
-
|
|
101
|
-
if (appConfig.staticAssets) {
|
|
102
|
-
appConfig.middleware.http.unshift(StaticAssetsMiddleware)
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
this.registerResolvers()
|
|
106
|
-
|
|
107
|
-
const providers = appConfig.providers || []
|
|
108
|
-
|
|
109
|
-
await this.registerProviders(providers)
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
private async checkAppSecret() {
|
|
113
|
-
const authConfig = this.get(AuthConfig)
|
|
114
|
-
if (!authConfig.signature) {
|
|
115
|
-
throw new Error(`APP_SECRET is not setup in your '.env' file.`)
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
package/Framework/Auth/Auth.ts
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { Inject, Injectable, Scope } from '../../Container'
|
|
2
|
-
import { User } from './User'
|
|
3
|
-
import { AuthConfig } from '../Config'
|
|
4
|
-
import { EntityKeys, ID } from '../../Database'
|
|
5
|
-
import { Crypt, JWT, JWToken } from '@Typetron/Encryption'
|
|
6
|
-
|
|
7
|
-
@Injectable(Scope.REQUEST)
|
|
8
|
-
export class Auth {
|
|
9
|
-
|
|
10
|
-
@Inject()
|
|
11
|
-
authConfig: AuthConfig
|
|
12
|
-
|
|
13
|
-
@Inject()
|
|
14
|
-
jwt: JWT
|
|
15
|
-
|
|
16
|
-
@Inject()
|
|
17
|
-
crypt: Crypt
|
|
18
|
-
|
|
19
|
-
id?: ID
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* This is primarily used in websocket connections so we don't need to pass the auth token for each weboscket message
|
|
23
|
-
*/
|
|
24
|
-
expiresAt = new Date()
|
|
25
|
-
|
|
26
|
-
private savedUser?: User
|
|
27
|
-
|
|
28
|
-
get authenticable(): typeof User {
|
|
29
|
-
return this.authConfig.entity
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// @BeforeRequest() // TODO implement the container's '@BeforeRequest' decorator to do something before each request.
|
|
33
|
-
// For example, load the authenticated user in memory again
|
|
34
|
-
// async before() {
|
|
35
|
-
// if (!this.id) {
|
|
36
|
-
// return undefined
|
|
37
|
-
// throw new Error('You tried to use the Auth service without authenticating the user. ' +
|
|
38
|
-
// 'Please use the AuthMiddleware or authenticate the user before using this route')
|
|
39
|
-
// }
|
|
40
|
-
//
|
|
41
|
-
// const user = await this.authenticable.find(this.id)
|
|
42
|
-
// if (!user) {
|
|
43
|
-
// throw new Error(`Authenticated user with ID ${this.id} not found `)
|
|
44
|
-
// }
|
|
45
|
-
// this.savedUser = await this.authenticable.find(this.id)
|
|
46
|
-
// }
|
|
47
|
-
|
|
48
|
-
async user<T extends User>(): Promise<T> {
|
|
49
|
-
// if (this.savedUser) { // TODO this if statement should be removed using the @BeforeRequest decorator above
|
|
50
|
-
// return this.savedUser as T
|
|
51
|
-
// }
|
|
52
|
-
|
|
53
|
-
if (!this.id) {
|
|
54
|
-
throw new Error('You tried to use the Auth service without authenticating the user. Please use the AuthMiddleware or authenticate the user before using this route')
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const user = await this.authenticable.find(this.id)
|
|
58
|
-
|
|
59
|
-
if (!user) {
|
|
60
|
-
throw new Error(`Could not find a user with id '${this.id}'`)
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
return this.savedUser = user as T
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
async login(username: string, password: string): Promise<string> {
|
|
67
|
-
const user = await this.authenticable.where((new this.authenticable).getUsername() as EntityKeys<User>, username).first()
|
|
68
|
-
if (!user || !await this.crypt.compare(password, user.password)) {
|
|
69
|
-
throw new Error('Invalid credentials')
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
delete this.savedUser
|
|
73
|
-
return this.sign(this.id = user.id)
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
loginById(id: ID): Promise<string> {
|
|
77
|
-
return this.sign(id)
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
loginUser(authenticable: User): Promise<string> {
|
|
81
|
-
return this.loginById(authenticable[authenticable.getId()])
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
sign(id: ID, expiresAtTimestampInSeconds?: number): Promise<string> {
|
|
85
|
-
return this.jwt.sign(
|
|
86
|
-
{
|
|
87
|
-
sub: this.set(id, expiresAtTimestampInSeconds)
|
|
88
|
-
},
|
|
89
|
-
this.authConfig.signature,
|
|
90
|
-
{
|
|
91
|
-
expiresIn: this.authConfig.duration
|
|
92
|
-
}
|
|
93
|
-
)
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
async register<T extends User>(username: string, password: string): Promise<T> {
|
|
97
|
-
return await this.authenticable.create({
|
|
98
|
-
[(new this.authenticable).getUsername() as EntityKeys<T>]: username,
|
|
99
|
-
password: await this.crypt.hash(password, this.authConfig.saltRounds),
|
|
100
|
-
}) as T
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
async verify(token: string): Promise<JWToken<number>> {
|
|
104
|
-
const payload = await this.jwt.verify<number>(token, this.authConfig.signature)
|
|
105
|
-
|
|
106
|
-
this.set(payload.sub, payload.exp)
|
|
107
|
-
|
|
108
|
-
return payload
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
private set(id: ID, expiresAtTimestampInSeconds?: number): ID {
|
|
112
|
-
if (expiresAtTimestampInSeconds) {
|
|
113
|
-
this.expiresAt = new Date(expiresAtTimestampInSeconds * 1000)
|
|
114
|
-
} else {
|
|
115
|
-
this.expiresAt = new Date()
|
|
116
|
-
this.expiresAt.setSeconds(this.expiresAt.getSeconds() + this.authConfig.duration)
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
return this.id = id
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
}
|
package/Framework/Auth/User.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Column, Entity, EntityColumns, ID, PrimaryColumn } from '../../Database'
|
|
2
|
-
import { Authenticatable } from './Authenticatable'
|
|
3
|
-
|
|
4
|
-
export class User extends Entity implements Authenticatable<User> {
|
|
5
|
-
|
|
6
|
-
@PrimaryColumn()
|
|
7
|
-
id: ID
|
|
8
|
-
|
|
9
|
-
@Column()
|
|
10
|
-
email: string
|
|
11
|
-
|
|
12
|
-
@Column()
|
|
13
|
-
password: string
|
|
14
|
-
|
|
15
|
-
getId(): EntityColumns<User> {
|
|
16
|
-
return 'id'
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
getPassword(): EntityColumns<User> {
|
|
20
|
-
return 'password'
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
getUsername(): EntityColumns<User> {
|
|
24
|
-
return 'email'
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
}
|