@typetron/framework 0.5.5 → 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 +4 -4
- 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
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { App, HttpRequest, HttpResponse } from 'uWebSockets.js'
|
|
2
|
-
import { Http, Request, Response } from '@Typetron/Router/Http'
|
|
3
|
-
import { Buffer } from 'buffer'
|
|
4
|
-
import { IncomingHttpHeaders } from 'http'
|
|
5
|
-
import * as console from 'console'
|
|
6
|
-
import busboy, { FileInfo } from 'busboy'
|
|
7
|
-
import { File } from '@Typetron/Storage'
|
|
8
|
-
import { Readable } from 'stream'
|
|
9
|
-
import os from 'os'
|
|
10
|
-
import fs from 'fs'
|
|
11
|
-
|
|
12
|
-
async function handleRequest(serverResponse: HttpResponse, serverRequest: HttpRequest, handler: (request: Request) => Promise<Response>) {
|
|
13
|
-
serverResponse.onAborted(() => {
|
|
14
|
-
console.log('uNetworking response aborted ->', serverResponse)
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
try {
|
|
18
|
-
const request = new Request(serverRequest.getUrl(), serverRequest.getMethod() as Http.Method, serverRequest.getQuery())
|
|
19
|
-
const headers: Record<string, string> = {}
|
|
20
|
-
|
|
21
|
-
serverRequest.forEach((name, value) => headers[name] = value)
|
|
22
|
-
request.setHeadersLoader(() => headers)
|
|
23
|
-
request.getHeader = <T extends string | string[] | undefined>(name: keyof IncomingHttpHeaders | string): T => {
|
|
24
|
-
return serverRequest.getHeader(name.toString()) as T
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
if (request.method.toLowerCase() !== Http.Method.GET.toLowerCase()) {
|
|
28
|
-
if (request.isMultipartRequest()) {
|
|
29
|
-
[request.body, request.files] = await readForm(serverResponse, headers)
|
|
30
|
-
} else {
|
|
31
|
-
request.body = await readJson(serverResponse, headers['content-type'])
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// const overwrittenMethod = (request.body as Record<string, string | undefined>)[Request.methodField] || ''
|
|
35
|
-
// request.method = Http.Method[overwrittenMethod.toUpperCase() as Http.Method] || request.method
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const response = await handler(request)
|
|
39
|
-
let content = response.body as string | object | number | Array<any> | Buffer
|
|
40
|
-
|
|
41
|
-
serverResponse.writeStatus(response.status.toString())
|
|
42
|
-
|
|
43
|
-
if (!(content instanceof Buffer)) {
|
|
44
|
-
if (content instanceof Object) {
|
|
45
|
-
content = JSON.stringify(content)
|
|
46
|
-
serverResponse.writeHeader('Content-Type', 'application/json')
|
|
47
|
-
}
|
|
48
|
-
content = String(content ?? '')
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
Object.keys(response.headers).forEach(header => {
|
|
52
|
-
const headerValue = response.headers[header]
|
|
53
|
-
if (headerValue) {
|
|
54
|
-
serverResponse.writeHeader(header, String(headerValue))
|
|
55
|
-
}
|
|
56
|
-
})
|
|
57
|
-
serverResponse.end(content)
|
|
58
|
-
} catch (error) {
|
|
59
|
-
console.log('error ->', error)
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export function uNetworkingServer(port: number, handler: (request: Request) => Promise<Response>) {
|
|
64
|
-
const app = App({ // or maybe SSLApp?
|
|
65
|
-
// key_file_name: 'misc/key.pem',
|
|
66
|
-
// cert_file_name: 'misc/cert.pem',
|
|
67
|
-
// passphrase: '1234'
|
|
68
|
-
})
|
|
69
|
-
.any('*', async (response, request) => {
|
|
70
|
-
await handleRequest(response, request, handler)
|
|
71
|
-
})
|
|
72
|
-
.any('/*', async (response, request) => {
|
|
73
|
-
await handleRequest(response, request, handler)
|
|
74
|
-
})
|
|
75
|
-
.listen(port, (token) => {
|
|
76
|
-
if (!token) {
|
|
77
|
-
console.log('Failed to listen to port ' + port)
|
|
78
|
-
}
|
|
79
|
-
})
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/* Helper function for reading a posted JSON body */
|
|
83
|
-
function readJson(response: HttpResponse, contentType: string) {
|
|
84
|
-
let buffer: Buffer
|
|
85
|
-
return new Promise<object | string | undefined>((resolve, reject) => {
|
|
86
|
-
response.onData((ab, isLast) => {
|
|
87
|
-
const chunk = Buffer.from(ab)
|
|
88
|
-
if (!isLast) {
|
|
89
|
-
buffer = Buffer.concat(buffer ? [buffer, chunk] : [chunk])
|
|
90
|
-
return
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
const content = (buffer ? Buffer.concat([buffer, chunk]) : chunk)
|
|
94
|
-
if (contentType === 'application/json') {
|
|
95
|
-
try {
|
|
96
|
-
const json = JSON.parse(content.toString())
|
|
97
|
-
resolve(json)
|
|
98
|
-
} catch (e) {
|
|
99
|
-
resolve({})
|
|
100
|
-
}
|
|
101
|
-
} else {
|
|
102
|
-
resolve(content)
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
})
|
|
106
|
-
})
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
function readForm(response: HttpResponse, headers: any): Promise<[string | object, Record<string, File | File[]>]> {
|
|
110
|
-
return new Promise((resolve, reject) => {
|
|
111
|
-
const formDataParser = busboy({headers})
|
|
112
|
-
const files: Record<string, File | File[]> = {}
|
|
113
|
-
const content: Record<string, string> = {}
|
|
114
|
-
|
|
115
|
-
formDataParser.on('file', function(fieldName: string, file: Readable, {filename, encoding, mimeType}: FileInfo) {
|
|
116
|
-
const extension = filename.split('.').pop()
|
|
117
|
-
const fileInstance = new File(`upload_${new Date().getTime().toString()}_${String.randomAlphaNum(9)}.${extension}`)
|
|
118
|
-
|
|
119
|
-
fileInstance.originalName = filename
|
|
120
|
-
fileInstance.directory = os.tmpdir()
|
|
121
|
-
fileInstance.saved = true
|
|
122
|
-
|
|
123
|
-
const stream = fs.createWriteStream(fileInstance.path)
|
|
124
|
-
stream.on('error', reject)
|
|
125
|
-
|
|
126
|
-
file.on('data', function(data) {
|
|
127
|
-
stream.write(data)
|
|
128
|
-
})
|
|
129
|
-
file.on('end', function() {
|
|
130
|
-
stream.end()
|
|
131
|
-
|
|
132
|
-
const field = files[fieldName]
|
|
133
|
-
files[fieldName] = field instanceof Array ? [...field, fileInstance] : field ? [field, fileInstance] : fileInstance
|
|
134
|
-
})
|
|
135
|
-
})
|
|
136
|
-
formDataParser.on('field', function(fieldName, value) {
|
|
137
|
-
content[fieldName] = value
|
|
138
|
-
})
|
|
139
|
-
formDataParser.on('finish', function() {
|
|
140
|
-
resolve([content, files])
|
|
141
|
-
})
|
|
142
|
-
|
|
143
|
-
response.onData((ab, isLast) => {
|
|
144
|
-
formDataParser.write(Buffer.from(ab.slice(0)))
|
|
145
|
-
if (isLast) {
|
|
146
|
-
formDataParser.end()
|
|
147
|
-
}
|
|
148
|
-
})
|
|
149
|
-
})
|
|
150
|
-
|
|
151
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { Container, Inject } from '../../Container'
|
|
2
|
-
import { RequestHandler, Router } from '../../Router'
|
|
3
|
-
import { Response } from '../Http'
|
|
4
|
-
import { Request as BaseRequest } from '../Request'
|
|
5
|
-
import { Abstract, Constructor, Type } from '../../Support'
|
|
6
|
-
import { WebsocketRoute } from './WebsocketRoute'
|
|
7
|
-
import { Request } from '@Typetron/Router/Websockets/Request'
|
|
8
|
-
import { WebsocketMiddleware } from '@Typetron/Router/Websockets/Middleware'
|
|
9
|
-
|
|
10
|
-
export class Handler {
|
|
11
|
-
@Inject()
|
|
12
|
-
router: Router
|
|
13
|
-
|
|
14
|
-
onOpen?: WebsocketRoute
|
|
15
|
-
onClose?: WebsocketRoute
|
|
16
|
-
|
|
17
|
-
addAction(
|
|
18
|
-
name: string,
|
|
19
|
-
controller: Constructor,
|
|
20
|
-
actionName: string,
|
|
21
|
-
parametersTypes: (Type<(...args: any[]) => any> | FunctionConstructor)[] = [],
|
|
22
|
-
middleware: Abstract<WebsocketMiddleware>[] = []
|
|
23
|
-
) {
|
|
24
|
-
const action = new WebsocketRoute(
|
|
25
|
-
name,
|
|
26
|
-
controller,
|
|
27
|
-
actionName,
|
|
28
|
-
parametersTypes,
|
|
29
|
-
middleware
|
|
30
|
-
)
|
|
31
|
-
if (this.router.actions.has(name)) {
|
|
32
|
-
throw new Error(`There is already an action with the same name: '${name}'`)
|
|
33
|
-
}
|
|
34
|
-
this.router.actions.set(name, action)
|
|
35
|
-
return action
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
async handle<T = unknown>(container: Container, request: Request): Promise<Response<T>> {
|
|
39
|
-
|
|
40
|
-
container.set(BaseRequest, request)
|
|
41
|
-
container.set(Request, request)
|
|
42
|
-
|
|
43
|
-
let stack: RequestHandler = async () => {
|
|
44
|
-
const route = this.router.actions.get(request.name)
|
|
45
|
-
|
|
46
|
-
if (!route) {
|
|
47
|
-
throw new Error(`Action '${request.name}' not found`)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
container.set(WebsocketRoute, route)
|
|
51
|
-
|
|
52
|
-
let routeStack: RequestHandler = async () => {
|
|
53
|
-
const content = await route.run(container, request.parameters)
|
|
54
|
-
|
|
55
|
-
if (content instanceof Response) {
|
|
56
|
-
return content
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return Response.ok(content)
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
route.middleware.forEach(middlewareClass => {
|
|
63
|
-
const middleware = container.get(middlewareClass)
|
|
64
|
-
routeStack = middleware.handle.bind(middleware, request, routeStack)
|
|
65
|
-
})
|
|
66
|
-
|
|
67
|
-
return await routeStack(request)
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
this.router.middleware.global?.forEach(middlewareClass => {
|
|
71
|
-
const middleware = container.get(middlewareClass)
|
|
72
|
-
stack = middleware.handle.bind(middleware, request, stack)
|
|
73
|
-
})
|
|
74
|
-
|
|
75
|
-
this.router.middleware.websocket?.forEach(middlewareClass => {
|
|
76
|
-
const middleware = container.get(middlewareClass)
|
|
77
|
-
stack = middleware.handle.bind(middleware, request, stack)
|
|
78
|
-
})
|
|
79
|
-
|
|
80
|
-
return await stack(request) as Response<T>
|
|
81
|
-
}
|
|
82
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Request } from '@Typetron/Router/Websockets/Request'
|
|
2
|
-
import { GlobalMiddleware, RequestHandler } from '@Typetron/Router'
|
|
3
|
-
import { Response } from '@Typetron/Router/Http' // TODO remove any Http reference from websockets
|
|
4
|
-
|
|
5
|
-
export abstract class WebsocketMiddleware extends GlobalMiddleware {
|
|
6
|
-
abstract handle(request: Request, next: RequestHandler): Promise<Response>
|
|
7
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { Container } from '../../Container'
|
|
2
|
-
import { AnyFunction, Constructor, Type } from '../../Support'
|
|
3
|
-
import { ControllerMetadata, MethodMetadata } from '../Metadata'
|
|
4
|
-
import { Route } from '@Typetron/Router'
|
|
5
|
-
|
|
6
|
-
export class WebsocketRoute extends Route {
|
|
7
|
-
|
|
8
|
-
async run(container: Container, requestParameters: Record<string, unknown>): Promise<object | string> {
|
|
9
|
-
const controller = await container.get(this.controller)
|
|
10
|
-
|
|
11
|
-
try {
|
|
12
|
-
const metadata: MethodMetadata | undefined = ControllerMetadata.get(this.controller).actions[this.controllerMethod]
|
|
13
|
-
const parameters = await this.resolveParameters(
|
|
14
|
-
requestParameters,
|
|
15
|
-
this.parametersTypes,
|
|
16
|
-
metadata?.parametersOverrides ?? [],
|
|
17
|
-
container
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
for await (const guardClass of this.guards) {
|
|
21
|
-
const guard = container.get(guardClass)
|
|
22
|
-
if (!await guard.condition(...parameters)) {
|
|
23
|
-
guard.onFail()
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return (controller[this.controllerMethod as keyof Constructor] as AnyFunction).apply(controller, parameters)
|
|
28
|
-
} catch (unknownError) {
|
|
29
|
-
const error = unknownError as Error
|
|
30
|
-
error.stack = `Controller: ${controller.constructor.name}.${this.controllerMethod} \n at ` + error.stack
|
|
31
|
-
throw error
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
private async resolveParameters(
|
|
36
|
-
requestParameters: Record<string, unknown>,
|
|
37
|
-
parametersTypes: (Type<AnyFunction> | FunctionConstructor)[],
|
|
38
|
-
overrides: AnyFunction[],
|
|
39
|
-
container: Container
|
|
40
|
-
) {
|
|
41
|
-
let parameterIndex = 0
|
|
42
|
-
// tslint:disable-next-line:no-any
|
|
43
|
-
const routeParameters: any[] = Object.values(requestParameters)
|
|
44
|
-
return parametersTypes.mapAsync(async (parameter, index) => {
|
|
45
|
-
const newValueFunction = overrides[index]
|
|
46
|
-
if (newValueFunction) {
|
|
47
|
-
return await newValueFunction.call(undefined, container)
|
|
48
|
-
}
|
|
49
|
-
if (parameter.name === 'String') {
|
|
50
|
-
return routeParameters[parameterIndex++]
|
|
51
|
-
}
|
|
52
|
-
if (parameter.name === 'Number') {
|
|
53
|
-
const value = routeParameters[parameterIndex++]
|
|
54
|
-
return value === undefined || value === 'undefined' ? undefined : Number(value)
|
|
55
|
-
}
|
|
56
|
-
return container.get(parameter, [routeParameters[parameterIndex++]])
|
|
57
|
-
})
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { WebSocket as uWebSocket } from 'uWebSockets.js'
|
|
2
|
-
import { ActionResponse, WebsocketMessageStatus } from './types'
|
|
3
|
-
import { Container } from '@Typetron/Container'
|
|
4
|
-
|
|
5
|
-
export * from './Handler'
|
|
6
|
-
export * from './types'
|
|
7
|
-
|
|
8
|
-
export class WebSocket {
|
|
9
|
-
|
|
10
|
-
public connection: uWebSocket<any> & {container: Container}
|
|
11
|
-
id?: number | string
|
|
12
|
-
|
|
13
|
-
constructor(connection: uWebSocket<any>, public container: Container) {
|
|
14
|
-
this.connection = Object.assign(connection, {container})
|
|
15
|
-
this.reset(container)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
subscribe(topic: string) {
|
|
19
|
-
this.connection.subscribe(topic)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
unsubscribe(topic: string) {
|
|
23
|
-
this.connection.unsubscribe(topic)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
reset(container?: Container) {
|
|
27
|
-
this.connection.container = container || this.connection.container.parent?.createChildContainer() || new Container()
|
|
28
|
-
this.connection.container.set(WebSocket, this)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// tslint:disable-next-line:no-any
|
|
32
|
-
publish(topic: string, action: string, body?: unknown) {
|
|
33
|
-
const sentResponse: ActionResponse<unknown> = {
|
|
34
|
-
action,
|
|
35
|
-
message: body,
|
|
36
|
-
status: WebsocketMessageStatus.OK,
|
|
37
|
-
}
|
|
38
|
-
this.connection.publish(topic, JSON.stringify(sentResponse), false, true)
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// tslint:disable-next-line:no-any
|
|
42
|
-
publishAndSend(topic: string, action: string, body?: unknown) {
|
|
43
|
-
this.publish(topic, action, body)
|
|
44
|
-
this.send(action, body)
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// tslint:disable-next-line:no-any
|
|
48
|
-
send(action: string, body?: unknown) {
|
|
49
|
-
const sentResponse: ActionResponse<unknown> = {
|
|
50
|
-
action,
|
|
51
|
-
message: body,
|
|
52
|
-
status: WebsocketMessageStatus.OK,
|
|
53
|
-
}
|
|
54
|
-
this.connection.send(JSON.stringify(sentResponse), false, true)
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export enum WebsocketMessageStatus {
|
|
2
|
-
OK = 'OK',
|
|
3
|
-
Error = 'Error',
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export interface Action<T> {
|
|
7
|
-
action: string
|
|
8
|
-
message?: T
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface ActionRequestMessage {
|
|
12
|
-
parameters?: (string | number)[]
|
|
13
|
-
// tslint:disable-next-line:no-any
|
|
14
|
-
body?: any
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export type ActionRequest = Action<ActionRequestMessage>
|
|
18
|
-
|
|
19
|
-
export interface ActionResponse<T> extends Action<T> {
|
|
20
|
-
status: WebsocketMessageStatus
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export type ActionErrorResponse<T extends string = string> = ActionResponse<{message: T, stack: string}>
|
package/Router/index.ts
DELETED
package/Storage/File.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as path from 'path'
|
|
2
|
-
|
|
3
|
-
export class File {
|
|
4
|
-
// content?: string | Buffer
|
|
5
|
-
originalName?: string
|
|
6
|
-
|
|
7
|
-
saved = false
|
|
8
|
-
|
|
9
|
-
constructor(public name: string, public directory?: string) {
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
get extension() {
|
|
13
|
-
return this.guessExtension()
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
get path() {
|
|
17
|
-
return path.join(this.directory || '', this.name)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
guessExtension() {
|
|
21
|
-
const fileParts = this.name.split('.')
|
|
22
|
-
if (fileParts.length >= 1) {
|
|
23
|
-
return fileParts.pop()
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
toString() {
|
|
28
|
-
return this.name
|
|
29
|
-
}
|
|
30
|
-
}
|
package/Storage/Image.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { File } from './File'
|
|
2
|
-
|
|
3
|
-
export class Image extends File {
|
|
4
|
-
// static fromBase64(base64: string): Image {
|
|
5
|
-
// const matches = base64.match(/data:image\/([a-zA-Z]*);base64,([^\\"]*)/)
|
|
6
|
-
// if (!matches) {
|
|
7
|
-
// throw new InvalidImage()
|
|
8
|
-
// }
|
|
9
|
-
// if (matches.length !== 3) {
|
|
10
|
-
// throw InvalidImage
|
|
11
|
-
// }
|
|
12
|
-
// const extension = matches[1]
|
|
13
|
-
// const data = matches[2]
|
|
14
|
-
//
|
|
15
|
-
// const image = new this('.' + extension)
|
|
16
|
-
// image.content = Buffer.from(data, 'base64')
|
|
17
|
-
// return image
|
|
18
|
-
// }
|
|
19
|
-
}
|
package/Storage/InvalidImage.ts
DELETED
package/Storage/Storage.ts
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import * as fileSystemDeprecated from 'fs'
|
|
2
|
-
import { File } from './File'
|
|
3
|
-
import * as path from 'path'
|
|
4
|
-
import * as fileSystem from 'node:fs/promises'
|
|
5
|
-
|
|
6
|
-
export class Storage {
|
|
7
|
-
files(directory: string, recursively = false): File[] {
|
|
8
|
-
return fileSystemDeprecated
|
|
9
|
-
.readdirSync(directory) // TODO make this async
|
|
10
|
-
.reduce((files, name) => {
|
|
11
|
-
const filePath = path.join(directory, name)
|
|
12
|
-
const stats = fileSystemDeprecated.statSync(filePath)
|
|
13
|
-
if (stats.isFile()) {
|
|
14
|
-
const file = new File(name)
|
|
15
|
-
file.directory = directory
|
|
16
|
-
files.push(file)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
if (recursively && stats.isDirectory()) {
|
|
20
|
-
files = files.concat(this.files(filePath))
|
|
21
|
-
}
|
|
22
|
-
return files
|
|
23
|
-
}, [] as File[])
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
async read(filePath: string): Promise<Buffer> {
|
|
27
|
-
return fileSystem.readFile(filePath)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
async exists(filePath: string): Promise<boolean> {
|
|
31
|
-
try {
|
|
32
|
-
await fileSystem.access(filePath)
|
|
33
|
-
return true
|
|
34
|
-
} catch (error) {
|
|
35
|
-
return false
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
async save(file: File, directory: string = '', name?: string | number): Promise<File> {
|
|
40
|
-
const newPath = path.join(directory, file.name)
|
|
41
|
-
if (!file.name) {
|
|
42
|
-
file.name = String(name || this.generateRandomFileName() + '.' + file.extension)
|
|
43
|
-
}
|
|
44
|
-
if (directory && !(await this.exists(directory))) {
|
|
45
|
-
await this.makeDirectory(directory)
|
|
46
|
-
}
|
|
47
|
-
return new Promise(async (resolve, reject) => {
|
|
48
|
-
fileSystemDeprecated
|
|
49
|
-
.createReadStream(file.path)
|
|
50
|
-
.on('error', reject)
|
|
51
|
-
.pipe(fileSystemDeprecated.createWriteStream(newPath))
|
|
52
|
-
.on('finish', () => resolve(file))
|
|
53
|
-
.on('error', reject)
|
|
54
|
-
})
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
async put(filePath: string, content: string | Buffer, options?: any): Promise<File> {
|
|
58
|
-
const file = new File(path.basename(filePath))
|
|
59
|
-
file.directory = path.dirname(filePath)
|
|
60
|
-
|
|
61
|
-
if (file.directory && !(await this.exists(file.directory))) {
|
|
62
|
-
await this.makeDirectory(file.directory)
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
await fileSystem.writeFile(filePath, content, options)
|
|
66
|
-
return file
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
async makeDirectory(directory: string): Promise<void> {
|
|
70
|
-
await fileSystem.mkdir(directory, {recursive: true})
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
async deleteDirectory(directory: string): Promise<void> {
|
|
74
|
-
if (await this.exists(directory)) {
|
|
75
|
-
await fileSystem.rm(directory, {recursive: true})
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
async delete(filePath: string): Promise<void> {
|
|
80
|
-
if (!(await this.exists(filePath))) {
|
|
81
|
-
return
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
if ((await fileSystem.stat(filePath)).isDirectory()) {
|
|
85
|
-
throw new Error('Can not delete because this path leads to a directory and not a file.')
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
await fileSystem.unlink(filePath)
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
private generateRandomFileName(): string {
|
|
92
|
-
const stringDomain =
|
|
93
|
-
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'
|
|
94
|
-
return (
|
|
95
|
-
String.random(13, stringDomain) + '-' + new Date().getTime().toString()
|
|
96
|
-
)
|
|
97
|
-
}
|
|
98
|
-
}
|
package/Storage/index.ts
DELETED
package/Storage/utils.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { InvalidImage } from '@Typetron/Storage/InvalidImage'
|
|
2
|
-
|
|
3
|
-
export function fromBase64(base64: string): {extension: string, content: Buffer} {
|
|
4
|
-
const matches = base64.match(/data:image\/([a-zA-Z]*);base64,([^\\"]*)/)
|
|
5
|
-
if (!matches) {
|
|
6
|
-
throw new InvalidImage()
|
|
7
|
-
}
|
|
8
|
-
if (matches.length !== 3) {
|
|
9
|
-
throw InvalidImage
|
|
10
|
-
}
|
|
11
|
-
const extension = matches[1]
|
|
12
|
-
const data = matches[2]
|
|
13
|
-
|
|
14
|
-
return {
|
|
15
|
-
content: Buffer.from(data, 'base64'),
|
|
16
|
-
extension: extension
|
|
17
|
-
}
|
|
18
|
-
}
|