@typetron/framework 0.3.16 → 0.3.18
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/Cache/Cache.d.ts +9 -0
- package/Cache/Cache.d.ts.map +1 -0
- package/Cache/Cache.js +7 -0
- package/Cache/Cache.js.map +1 -0
- package/Cache/CacheLoader.d.ts +8 -0
- package/Cache/CacheLoader.d.ts.map +1 -0
- package/Cache/CacheLoader.js +55 -0
- package/Cache/CacheLoader.js.map +1 -0
- package/Cache/Consumers/Cache.d.ts +18 -0
- package/Cache/Consumers/Cache.d.ts.map +1 -0
- package/Cache/Consumers/Cache.js +99 -0
- package/Cache/Consumers/Cache.js.map +1 -0
- package/Cache/Contracts/CacheInterface.d.ts +14 -0
- package/Cache/Contracts/CacheInterface.d.ts.map +1 -0
- package/Cache/Contracts/CacheInterface.js +3 -0
- package/Cache/Contracts/CacheInterface.js.map +1 -0
- package/Cache/Contracts/EngineInterface.d.ts +8 -0
- package/Cache/Contracts/EngineInterface.d.ts.map +1 -0
- package/Cache/Contracts/EngineInterface.js +3 -0
- package/Cache/Contracts/EngineInterface.js.map +1 -0
- package/Cache/Contracts/ServiceInterface.d.ts +8 -0
- package/Cache/Contracts/ServiceInterface.d.ts.map +1 -0
- package/Cache/Contracts/ServiceInterface.js +3 -0
- package/Cache/Contracts/ServiceInterface.js.map +1 -0
- package/Cache/Engines/DatabaseCache.d.ts +11 -0
- package/Cache/Engines/DatabaseCache.d.ts.map +1 -0
- package/Cache/Engines/DatabaseCache.js +40 -0
- package/Cache/Engines/DatabaseCache.js.map +1 -0
- package/Cache/Engines/FileCache.d.ts +22 -0
- package/Cache/Engines/FileCache.d.ts.map +1 -0
- package/Cache/Engines/FileCache.js +107 -0
- package/Cache/Engines/FileCache.js.map +1 -0
- package/Cache/Services/DatabaseCacheService.d.ts +13 -0
- package/Cache/Services/DatabaseCacheService.d.ts.map +1 -0
- package/Cache/Services/DatabaseCacheService.js +74 -0
- package/Cache/Services/DatabaseCacheService.js.map +1 -0
- package/Cache/Services/FileCacheService.d.ts +13 -0
- package/Cache/Services/FileCacheService.d.ts.map +1 -0
- package/Cache/Services/FileCacheService.js +60 -0
- package/Cache/Services/FileCacheService.js.map +1 -0
- package/Cache/Stores/DatabaseStore.d.ts +16 -0
- package/Cache/Stores/DatabaseStore.d.ts.map +1 -0
- package/Cache/Stores/DatabaseStore.js +208 -0
- package/Cache/Stores/DatabaseStore.js.map +1 -0
- package/Cache/Stores/FileStore.d.ts +16 -0
- package/Cache/Stores/FileStore.d.ts.map +1 -0
- package/Cache/Stores/FileStore.js +63 -0
- package/Cache/Stores/FileStore.js.map +1 -0
- package/Cache/Stores/MemoryStore.d.ts +13 -0
- package/Cache/Stores/MemoryStore.d.ts.map +1 -0
- package/Cache/Stores/MemoryStore.js +60 -0
- package/Cache/Stores/MemoryStore.js.map +1 -0
- package/Cache/index.d.ts +6 -0
- package/Cache/index.d.ts.map +1 -0
- package/Cache/index.js +18 -0
- package/Cache/index.js.map +1 -0
- package/Cache/types.d.ts +5 -0
- package/Cache/types.d.ts.map +1 -0
- package/Cache/types.js +3 -0
- package/Cache/types.js.map +1 -0
- package/Container/ClassResolver.d.ts +8 -8
- package/Container/ClassResolver.d.ts.map +1 -1
- package/Container/ClassResolver.js +89 -87
- package/Container/ClassResolver.js.map +1 -1
- package/Container/Container.d.ts +24 -24
- package/Container/Container.d.ts.map +1 -1
- package/Container/Container.js +118 -118
- package/Container/Container.js.map +1 -1
- package/Container/Contracts.d.ts +2 -2
- package/Container/Contracts.js +2 -2
- package/Container/Decorators.d.ts +4 -4
- package/Container/Decorators.js +21 -21
- package/Container/Metadata.d.ts +20 -20
- package/Container/Metadata.js +18 -18
- package/Container/Resolver.d.ts +18 -18
- package/Container/Resolver.js +15 -15
- package/Container/index.d.ts +5 -5
- package/Container/index.js +17 -17
- package/Database/Clauses/Where.js +1 -1
- package/Database/Connection.d.ts +20 -20
- package/Database/Connection.js +42 -42
- package/Database/Decorators.d.ts +36 -36
- package/Database/Decorators.js +116 -116
- package/Database/Drivers/DatabaseDriver.d.ts +28 -28
- package/Database/Drivers/DatabaseDriver.js +6 -6
- package/Database/Drivers/MySQL/Alter/index.d.ts +33 -33
- package/Database/Drivers/MySQL/Alter/index.js +61 -61
- package/Database/Drivers/MySQL/ColumnDefinition.d.ts +6 -6
- package/Database/Drivers/MySQL/ColumnDefinition.js +17 -17
- package/Database/Drivers/MySQL/Create.d.ts +9 -9
- package/Database/Drivers/MySQL/Create.js +37 -37
- package/Database/Drivers/MySQL/MysqlDriver.d.ts +41 -41
- package/Database/Drivers/MySQL/MysqlDriver.js +76 -76
- package/Database/Drivers/MySQL/Schema.d.ts +15 -15
- package/Database/Drivers/MySQL/Schema.js +65 -65
- package/Database/Drivers/MySQL/index.d.ts +1 -1
- package/Database/Drivers/MySQL/index.js +15 -15
- package/Database/Drivers/SQL/Schema.d.ts +6 -6
- package/Database/Drivers/SQL/Schema.js +57 -57
- package/Database/Drivers/SQL/Statements/Alter.d.ts +7 -7
- package/Database/Drivers/SQL/Statements/Alter.js +17 -17
- package/Database/Drivers/SQL/Statements/BaseStatement.d.ts +12 -12
- package/Database/Drivers/SQL/Statements/BaseStatement.js +46 -46
- package/Database/Drivers/SQL/Statements/Delete.d.ts +5 -5
- package/Database/Drivers/SQL/Statements/Delete.js +16 -16
- package/Database/Drivers/SQL/Statements/Insert.d.ts +6 -6
- package/Database/Drivers/SQL/Statements/Insert.js +23 -23
- package/Database/Drivers/SQL/Statements/Select.d.ts +7 -7
- package/Database/Drivers/SQL/Statements/Select.js +44 -44
- package/Database/Drivers/SQL/Statements/Update.d.ts +6 -6
- package/Database/Drivers/SQL/Statements/Update.js +27 -27
- package/Database/Drivers/SQL/index.d.ts +8 -8
- package/Database/Drivers/SQL/index.js +2 -2
- package/Database/Drivers/SQLite/Create.d.ts +9 -9
- package/Database/Drivers/SQLite/Create.js +36 -36
- package/Database/Drivers/SQLite/Schema.d.ts +15 -15
- package/Database/Drivers/SQLite/Schema.js +44 -44
- package/Database/Drivers/SQLite/SqliteDriver.d.ts +42 -42
- package/Database/Drivers/SQLite/SqliteDriver.d.ts.map +1 -1
- package/Database/Drivers/SQLite/SqliteDriver.js +102 -102
- package/Database/Drivers/SQLite/SqliteDriver.js.map +1 -1
- package/Database/Drivers/SQLite/index.d.ts +2 -2
- package/Database/Drivers/SQLite/index.js +26 -26
- package/Database/Drivers/SchemaContract.d.ts +8 -8
- package/Database/Drivers/SchemaContract.js +9 -9
- package/Database/Drivers/Statement.d.ts +9 -9
- package/Database/Drivers/Statement.js +15 -15
- package/Database/Drivers/index.d.ts +4 -4
- package/Database/Drivers/index.js +16 -16
- package/Database/Entity.d.ts +64 -64
- package/Database/Entity.d.ts.map +1 -1
- package/Database/Entity.js +252 -252
- package/Database/Entity.js.map +1 -1
- package/Database/EntityNotFoundError.d.ts +5 -5
- package/Database/EntityNotFoundError.js +10 -10
- package/Database/EntityProxyHandler.d.ts +5 -5
- package/Database/EntityProxyHandler.js +30 -30
- package/Database/EntityQuery.d.ts +28 -28
- package/Database/EntityQuery.js +156 -156
- package/Database/Expression.d.ts +3 -3
- package/Database/Expression.js +6 -6
- package/Database/Fields.d.ts +155 -155
- package/Database/Fields.js +548 -548
- package/Database/Helpers.d.ts +1 -1
- package/Database/Helpers.js +16 -16
- package/Database/List.d.ts +24 -24
- package/Database/List.d.ts.map +1 -1
- package/Database/List.js +49 -49
- package/Database/List.js.map +1 -1
- package/Database/Migrations/Migration.d.ts +7 -7
- package/Database/Migrations/Migration.js +9 -9
- package/Database/Migrations/MigrationHistory.d.ts +8 -8
- package/Database/Migrations/MigrationHistory.js +38 -38
- package/Database/Migrations/Migrator.d.ts +20 -20
- package/Database/Migrations/Migrator.js +118 -118
- package/Database/Migrations/index.d.ts +3 -3
- package/Database/Migrations/index.js +15 -15
- package/Database/ORM/BaseRelationship.d.ts +7 -7
- package/Database/ORM/BaseRelationship.js +10 -10
- package/Database/Query.d.ts +62 -62
- package/Database/Query.d.ts.map +1 -1
- package/Database/Query.js +265 -264
- package/Database/Query.js.map +1 -1
- package/Database/Seeders/Seeder.d.ts +3 -3
- package/Database/Seeders/Seeder.js +6 -6
- package/Database/Seeders/SeederManager.d.ts +8 -8
- package/Database/Seeders/SeederManager.js +24 -24
- package/Database/Seeders/index.d.ts +2 -2
- package/Database/Seeders/index.js +14 -14
- package/Database/StringExpression.d.ts +6 -6
- package/Database/StringExpression.js +14 -14
- package/Database/Types.d.ts +117 -117
- package/Database/Types.d.ts.map +1 -1
- package/Database/Types.js +94 -94
- package/Database/Types.js.map +1 -1
- package/Database/index.d.ts +20 -20
- package/Database/index.js +20 -20
- package/Encryption/index.d.ts +15 -15
- package/Encryption/index.js +53 -53
- package/Forms/Decorators.d.ts +6 -6
- package/Forms/Decorators.js +28 -28
- package/Forms/Form.d.ts +17 -17
- package/Forms/Form.js +69 -69
- package/Forms/FormFields.d.ts +9 -9
- package/Forms/FormFields.js +35 -35
- package/Forms/index.d.ts +3 -3
- package/Forms/index.js +15 -15
- package/Framework/App.d.ts +6 -6
- package/Framework/App.js +9 -9
- package/Framework/Application.d.ts +17 -17
- package/Framework/Application.d.ts.map +1 -1
- package/Framework/Application.js +94 -93
- package/Framework/Application.js.map +1 -1
- package/Framework/Auth/Auth.d.ts +24 -24
- package/Framework/Auth/Auth.js +108 -108
- package/Framework/Auth/Authenticatable.d.ts +6 -6
- package/Framework/Auth/Authenticatable.js +2 -2
- package/Framework/Auth/User.d.ts +10 -10
- package/Framework/Auth/User.js +37 -37
- package/Framework/Auth/index.d.ts +5 -5
- package/Framework/Auth/index.d.ts.map +1 -1
- package/Framework/Auth/index.js +45 -45
- package/Framework/Auth/index.js.map +1 -1
- package/Framework/Config/AppConfig.d.ts +18 -18
- package/Framework/Config/AppConfig.js +11 -11
- package/Framework/Config/AuthConfig.d.ts +8 -8
- package/Framework/Config/AuthConfig.js +7 -7
- package/Framework/Config/BaseConfig.d.ts +6 -6
- package/Framework/Config/BaseConfig.js +12 -12
- package/Framework/Config/CacheConfig.d.ts +16 -0
- package/Framework/Config/CacheConfig.d.ts.map +1 -0
- package/Framework/Config/CacheConfig.js +23 -0
- package/Framework/Config/CacheConfig.js.map +1 -0
- package/Framework/Config/DatabaseConfig.d.ts +10 -10
- package/Framework/Config/DatabaseConfig.js +25 -25
- package/Framework/Config/index.d.ts +5 -4
- package/Framework/Config/index.d.ts.map +1 -1
- package/Framework/Config/index.js +17 -16
- package/Framework/Config/index.js.map +1 -1
- package/Framework/Middleware/AuthMiddleware.d.ts +7 -7
- package/Framework/Middleware/AuthMiddleware.js +63 -63
- package/Framework/Middleware/CorsMiddleware.d.ts +6 -6
- package/Framework/Middleware/CorsMiddleware.js +43 -43
- package/Framework/Middleware/StaticAssetsMiddleware.d.ts +14 -14
- package/Framework/Middleware/StaticAssetsMiddleware.js +104 -104
- package/Framework/Middleware/index.d.ts +2 -2
- package/Framework/Middleware/index.js +14 -14
- package/Framework/Provider.d.ts +5 -5
- package/Framework/Provider.js +20 -20
- package/Framework/Providers/CacheProvider.d.ts +7 -0
- package/Framework/Providers/CacheProvider.d.ts.map +1 -0
- package/Framework/Providers/CacheProvider.js +39 -0
- package/Framework/Providers/CacheProvider.js.map +1 -0
- package/Framework/Providers/DatabaseProvider.d.ts +9 -9
- package/Framework/Providers/DatabaseProvider.js +63 -63
- package/Framework/Providers/WebsocketsProvider.d.ts +12 -12
- package/Framework/Providers/WebsocketsProvider.js +122 -122
- package/Framework/Resolvers/AuthResolver.d.ts +5 -5
- package/Framework/Resolvers/AuthResolver.js +14 -14
- package/Framework/Resolvers/EntityResolver.d.ts +9 -9
- package/Framework/Resolvers/EntityResolver.js +40 -40
- package/Framework/Resolvers/FormResolver.d.ts +9 -9
- package/Framework/Resolvers/FormResolver.js +32 -32
- package/Framework/RootDir.d.ts +2 -2
- package/Framework/RootDir.js +6 -6
- package/Framework/index.d.ts +7 -6
- package/Framework/index.d.ts.map +1 -1
- package/Framework/index.js +19 -18
- package/Framework/index.js.map +1 -1
- package/Models/Model.d.ts +9 -9
- package/Models/Model.js +35 -35
- package/Models/index.d.ts +21 -21
- package/Models/index.d.ts.map +1 -1
- package/Models/index.js +58 -58
- package/Models/index.js.map +1 -1
- package/Router/BaseController.d.ts +4 -4
- package/Router/BaseController.js +20 -20
- package/Router/Decorators.d.ts +21 -21
- package/Router/Decorators.js +170 -170
- package/Router/Guard.d.ts +4 -4
- package/Router/Guard.js +10 -10
- package/Router/Http/Contracts.d.ts +3 -3
- package/Router/Http/Contracts.js +2 -2
- package/Router/Http/ErrorHandler.d.ts +9 -9
- package/Router/Http/ErrorHandler.js +51 -51
- package/Router/Http/ErrorHandlerInterface.d.ts +5 -5
- package/Router/Http/ErrorHandlerInterface.js +6 -6
- package/Router/Http/Errors/HttpError.d.ts +7 -7
- package/Router/Http/Errors/HttpError.js +15 -15
- package/Router/Http/Handler.d.ts +15 -15
- package/Router/Http/Handler.js +131 -131
- package/Router/Http/Request.d.ts +22 -22
- package/Router/Http/Request.js +151 -151
- package/Router/Http/Response.d.ts +17 -17
- package/Router/Http/Response.js +51 -51
- package/Router/Http/index.d.ts +83 -83
- package/Router/Http/index.js +99 -99
- package/Router/Metadata.d.ts +31 -31
- package/Router/Metadata.js +25 -25
- package/Router/Middleware.d.ts +5 -5
- package/Router/Middleware.js +2 -2
- package/Router/Route.d.ts +23 -23
- package/Router/Route.js +110 -110
- package/Router/RouteNotFoundError.d.ts +3 -3
- package/Router/RouteNotFoundError.js +9 -9
- package/Router/Router.d.ts +12 -12
- package/Router/Router.js +32 -32
- package/Router/Websockets/Handler.d.ts +12 -12
- package/Router/Websockets/Handler.js +59 -59
- package/Router/Websockets/WebsocketEvent.d.ts +15 -15
- package/Router/Websockets/WebsocketEvent.js +53 -53
- package/Router/Websockets/index.d.ts +16 -16
- package/Router/Websockets/index.d.ts.map +1 -1
- package/Router/Websockets/index.js +57 -57
- package/Router/Websockets/index.js.map +1 -1
- package/Router/Websockets/types.d.ts +20 -20
- package/Router/Websockets/types.js +8 -8
- package/Router/index.d.ts +6 -6
- package/Router/index.js +18 -18
- package/Storage/File.d.ts +11 -11
- package/Storage/File.js +46 -46
- package/Storage/Image.d.ts +3 -3
- package/Storage/Image.js +7 -7
- package/Storage/InvalidImage.d.ts +3 -3
- package/Storage/InvalidImage.js +7 -7
- package/Storage/Storage.d.ts +13 -12
- package/Storage/Storage.d.ts.map +1 -1
- package/Storage/Storage.js +104 -110
- package/Storage/Storage.js.map +1 -1
- package/Storage/index.d.ts +4 -4
- package/Storage/index.js +16 -16
- package/Storage/utils.d.ts +5 -5
- package/Storage/utils.js +20 -20
- package/Support/Array.d.ts +28 -28
- package/Support/Array.d.ts.map +1 -1
- package/Support/Array.js +108 -108
- package/Support/Array.js.map +1 -1
- package/Support/Math.d.ts +6 -6
- package/Support/Math.js +7 -7
- package/Support/Metadata.d.ts +14 -14
- package/Support/Metadata.js +20 -20
- package/Support/String.d.ts +11 -11
- package/Support/String.js +23 -23
- package/Support/index.d.ts +14 -13
- package/Support/index.d.ts.map +1 -1
- package/Support/index.js +6 -5
- package/Support/index.js.map +1 -1
- package/Support/utils.d.ts +2 -0
- package/Support/utils.d.ts.map +1 -0
- package/Support/utils.js +13 -0
- package/Support/utils.js.map +1 -0
- package/Testing/TestCase.d.ts +32 -32
- package/Testing/TestCase.js +130 -130
- package/Validation/Rule.d.ts +6 -6
- package/Validation/Rule.js +6 -6
- package/Validation/RuleInterface.d.ts +6 -6
- package/Validation/RuleInterface.js +2 -2
- package/Validation/Rules/Email.d.ts +3 -3
- package/Validation/Rules/Email.js +20 -20
- package/Validation/Rules/FileExtension.d.ts +3 -3
- package/Validation/Rules/FileExtension.js +22 -22
- package/Validation/Rules/MaxLength.d.ts +3 -3
- package/Validation/Rules/MaxLength.js +19 -19
- package/Validation/Rules/MinLength.d.ts +3 -3
- package/Validation/Rules/MinLength.js +19 -19
- package/Validation/Rules/Optional.d.ts +3 -3
- package/Validation/Rules/Optional.js +19 -19
- package/Validation/Rules/Required.d.ts +3 -3
- package/Validation/Rules/Required.js +26 -26
- package/Validation/Validator.d.ts +11 -11
- package/Validation/Validator.js +10 -10
- package/Validation/index.d.ts +9 -9
- package/Validation/index.js +21 -21
- package/package.json +8 -5
- package/tests/Cache/DatabaseStoreTest.d.ts +2 -0
- package/tests/Cache/DatabaseStoreTest.d.ts.map +1 -0
- package/tests/Cache/DatabaseStoreTest.js +138 -0
- package/tests/Cache/DatabaseStoreTest.js.map +1 -0
- package/tests/Cache/FileStoreTest.d.ts +2 -0
- package/tests/Cache/FileStoreTest.d.ts.map +1 -0
- package/tests/Cache/FileStoreTest.js +142 -0
- package/tests/Cache/FileStoreTest.js.map +1 -0
- package/tests/Cache/MemoryStoreTest.d.ts +2 -0
- package/tests/Cache/MemoryStoreTest.d.ts.map +1 -0
- package/tests/Cache/MemoryStoreTest.js +141 -0
- package/tests/Cache/MemoryStoreTest.js.map +1 -0
- package/tests/Container/ContainerTest.d.ts +1 -1
- package/tests/Container/ContainerTest.js +395 -395
- package/tests/Database/Drivers/MySQL/AlterTest.d.ts +1 -1
- package/tests/Database/Drivers/MySQL/AlterTest.js +135 -135
- package/tests/Database/Drivers/MySQL/CreateTest.d.ts +1 -1
- package/tests/Database/Drivers/MySQL/CreateTest.js +57 -57
- package/tests/Database/Drivers/MysqlDriverTest.d.ts +1 -1
- package/tests/Database/Drivers/MysqlDriverTest.js +149 -149
- package/tests/Database/Drivers/SqliteDriverTest.d.ts +1 -1
- package/tests/Database/Drivers/SqliteDriverTest.js +135 -135
- package/tests/Database/Entities/Article.d.ts +10 -10
- package/tests/Database/Entities/Article.js +42 -42
- package/tests/Database/Entities/Profile.d.ts +10 -10
- package/tests/Database/Entities/Profile.js +38 -38
- package/tests/Database/Entities/Role.d.ts +8 -8
- package/tests/Database/Entities/Role.js +30 -30
- package/tests/Database/Entities/User.d.ts +15 -15
- package/tests/Database/Entities/User.js +57 -57
- package/tests/Database/EntityRelationshipsTest.d.ts +1 -1
- package/tests/Database/EntityRelationshipsTest.js +552 -552
- package/tests/Database/EntityTest.d.ts +1 -1
- package/tests/Database/EntityTest.js +233 -233
- package/tests/Database/Migrations/RunnerTest.d.ts +1 -1
- package/tests/Database/Migrations/RunnerTest.js +111 -111
- package/tests/Database/Migrations/migrations/1.createUserTable.d.ts +5 -5
- package/tests/Database/Migrations/migrations/1.createUserTable.js +13 -13
- package/tests/Database/Migrations/migrations/2.createArticlesTable.d.ts +5 -5
- package/tests/Database/Migrations/migrations/2.createArticlesTable.js +13 -13
- package/tests/Database/QueryTest.d.ts +1 -1
- package/tests/Database/QueryTest.js +622 -622
- package/tests/Database/SchemaTest.d.ts +1 -1
- package/tests/Database/SchemaTest.js +45 -45
- package/tests/Database/Seeders/RunnerTest.d.ts +1 -1
- package/tests/Database/Seeders/RunnerTest.js +43 -43
- package/tests/Database/Seeders/seeders/RandomSeeder.d.ts +4 -4
- package/tests/Database/Seeders/seeders/RandomSeeder.js +13 -13
- package/tests/Database/utils.d.ts +5 -5
- package/tests/Database/utils.js +18 -18
- package/tests/Forms/FormsTest.d.ts +1 -1
- package/tests/Forms/FormsTest.js +79 -79
- package/tests/Framework/Middleware/StaticAssetsMiddlewareTest.d.ts +1 -1
- package/tests/Framework/Middleware/StaticAssetsMiddlewareTest.js +165 -165
- package/tests/Framework/Resolvers/EntityResolverTest.d.ts +1 -1
- package/tests/Framework/Resolvers/EntityResolverTest.js +59 -59
- package/tests/Model/ModelTest.d.ts +1 -1
- package/tests/Model/ModelTest.js +233 -233
- package/tests/Router/HttpHandlerTest.d.ts +1 -1
- package/tests/Router/HttpHandlerTest.js +36 -36
- package/tests/Router/WebSocketsHandlerTest.d.ts +1 -1
- package/tests/Router/WebSocketsHandlerTest.js +35 -35
- package/tests/Support/ArrayTest.d.ts +1 -1
- package/tests/Support/ArrayTest.js +258 -258
- package/tests/Support/StringTest.d.ts +1 -1
- package/tests/Support/StringTest.js +38 -38
- package/tests/Validation/RulesTest.d.ts +1 -1
- package/tests/Validation/RulesTest.js +67 -67
- package/Database/Drivers/SQL/Statements/Create.d.ts +0 -7
- package/Database/Drivers/SQL/Statements/Create.d.ts.map +0 -1
- package/Database/Drivers/SQL/Statements/Create.js +0 -22
- package/Database/Drivers/SQL/Statements/Create.js.map +0 -1
- package/LICENSE.md +0 -21
- package/Readme.md +0 -123
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const mocha_1 = require("@testdeck/mocha");
|
|
13
|
-
const Validation_1 = require("../../Validation");
|
|
14
|
-
const chai_1 = require("chai");
|
|
15
|
-
let RulesTest = class RulesTest {
|
|
16
|
-
shouldLimitStringAddingThreeDotsAtTheEnd() {
|
|
17
|
-
const validEmails = [
|
|
18
|
-
'email@example.com',
|
|
19
|
-
'firstname.lastname@example.com',
|
|
20
|
-
'email@subdomain.example.com',
|
|
21
|
-
'firstname+lastname@example.com',
|
|
22
|
-
'email@123.123.123.123',
|
|
23
|
-
'email@[123.123.123.123]',
|
|
24
|
-
'"email"@example.com',
|
|
25
|
-
'1234567890@example.com',
|
|
26
|
-
'email@example-one.com',
|
|
27
|
-
'_______@example.com',
|
|
28
|
-
'email@example.name',
|
|
29
|
-
'email@example.museum',
|
|
30
|
-
'email@example.co.jp',
|
|
31
|
-
'firstname-lastname@example.com',
|
|
32
|
-
];
|
|
33
|
-
const invalidEmails = [
|
|
34
|
-
'plainaddress',
|
|
35
|
-
'#@%^%#$@#$@#.com',
|
|
36
|
-
'@example.com',
|
|
37
|
-
'Joe Smith <email@example.com>',
|
|
38
|
-
'email.example.com',
|
|
39
|
-
'email@example@example.com',
|
|
40
|
-
'.email@example.com',
|
|
41
|
-
'email.@example.com',
|
|
42
|
-
'email..email@example.com',
|
|
43
|
-
'あいうえお@example.com',
|
|
44
|
-
'email@example.com (Joe Smith)',
|
|
45
|
-
'email@example',
|
|
46
|
-
'email@-example.com',
|
|
47
|
-
'email@example..com',
|
|
48
|
-
'Abc..123@example.com',
|
|
49
|
-
];
|
|
50
|
-
const rule = new (Validation_1.Email());
|
|
51
|
-
validEmails.forEach(email => {
|
|
52
|
-
chai_1.expect(rule.passes('', email), email).to.be.equal(true);
|
|
53
|
-
});
|
|
54
|
-
invalidEmails.forEach(email => {
|
|
55
|
-
chai_1.expect(rule.passes('', email), email).to.be.equal(false);
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
__decorate([
|
|
60
|
-
mocha_1.test,
|
|
61
|
-
__metadata("design:type", Function),
|
|
62
|
-
__metadata("design:paramtypes", []),
|
|
63
|
-
__metadata("design:returntype", void 0)
|
|
64
|
-
], RulesTest.prototype, "shouldLimitStringAddingThreeDotsAtTheEnd", null);
|
|
65
|
-
RulesTest = __decorate([
|
|
66
|
-
mocha_1.suite
|
|
67
|
-
], RulesTest);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const mocha_1 = require("@testdeck/mocha");
|
|
13
|
+
const Validation_1 = require("../../Validation");
|
|
14
|
+
const chai_1 = require("chai");
|
|
15
|
+
let RulesTest = class RulesTest {
|
|
16
|
+
shouldLimitStringAddingThreeDotsAtTheEnd() {
|
|
17
|
+
const validEmails = [
|
|
18
|
+
'email@example.com',
|
|
19
|
+
'firstname.lastname@example.com',
|
|
20
|
+
'email@subdomain.example.com',
|
|
21
|
+
'firstname+lastname@example.com',
|
|
22
|
+
'email@123.123.123.123',
|
|
23
|
+
'email@[123.123.123.123]',
|
|
24
|
+
'"email"@example.com',
|
|
25
|
+
'1234567890@example.com',
|
|
26
|
+
'email@example-one.com',
|
|
27
|
+
'_______@example.com',
|
|
28
|
+
'email@example.name',
|
|
29
|
+
'email@example.museum',
|
|
30
|
+
'email@example.co.jp',
|
|
31
|
+
'firstname-lastname@example.com',
|
|
32
|
+
];
|
|
33
|
+
const invalidEmails = [
|
|
34
|
+
'plainaddress',
|
|
35
|
+
'#@%^%#$@#$@#.com',
|
|
36
|
+
'@example.com',
|
|
37
|
+
'Joe Smith <email@example.com>',
|
|
38
|
+
'email.example.com',
|
|
39
|
+
'email@example@example.com',
|
|
40
|
+
'.email@example.com',
|
|
41
|
+
'email.@example.com',
|
|
42
|
+
'email..email@example.com',
|
|
43
|
+
'あいうえお@example.com',
|
|
44
|
+
'email@example.com (Joe Smith)',
|
|
45
|
+
'email@example',
|
|
46
|
+
'email@-example.com',
|
|
47
|
+
'email@example..com',
|
|
48
|
+
'Abc..123@example.com',
|
|
49
|
+
];
|
|
50
|
+
const rule = new (Validation_1.Email());
|
|
51
|
+
validEmails.forEach(email => {
|
|
52
|
+
chai_1.expect(rule.passes('', email), email).to.be.equal(true);
|
|
53
|
+
});
|
|
54
|
+
invalidEmails.forEach(email => {
|
|
55
|
+
chai_1.expect(rule.passes('', email), email).to.be.equal(false);
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
__decorate([
|
|
60
|
+
mocha_1.test,
|
|
61
|
+
__metadata("design:type", Function),
|
|
62
|
+
__metadata("design:paramtypes", []),
|
|
63
|
+
__metadata("design:returntype", void 0)
|
|
64
|
+
], RulesTest.prototype, "shouldLimitStringAddingThreeDotsAtTheEnd", null);
|
|
65
|
+
RulesTest = __decorate([
|
|
66
|
+
mocha_1.suite
|
|
67
|
+
], RulesTest);
|
|
68
68
|
//# sourceMappingURL=RulesTest.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Create.d.ts","sourceRoot":"","sources":["../../../../../Database/Drivers/SQL/Statements/Create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAExD,qBAAa,MAAO,SAAQ,aAAa;IAErC,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,CAAK;IAEnC,KAAK;CAUR"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Create = void 0;
|
|
4
|
-
const BaseStatement_1 = require("./BaseStatement");
|
|
5
|
-
class Create extends BaseStatement_1.BaseStatement {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(...arguments);
|
|
8
|
-
this.columns = [];
|
|
9
|
-
}
|
|
10
|
-
toSql() {
|
|
11
|
-
return `
|
|
12
|
-
CREATE
|
|
13
|
-
TABLE
|
|
14
|
-
${this.table}
|
|
15
|
-
(
|
|
16
|
-
${this.components.columns.join(', ')}
|
|
17
|
-
)
|
|
18
|
-
`;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.Create = Create;
|
|
22
|
-
//# sourceMappingURL=Create.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Create.js","sourceRoot":"","sources":["../../../../../Database/Drivers/SQL/Statements/Create.ts"],"names":[],"mappings":";;;AAAA,mDAA+C;AAG/C,MAAa,MAAO,SAAQ,6BAAa;IAAzC;;QAEI,YAAO,GAA0B,EAAE,CAAA;IAYvC,CAAC;IAVG,KAAK;QACD,OAAO;;;kBAGG,IAAI,CAAC,KAAK;;kBAEV,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;;SAE3C,CAAA;IACL,CAAC;CACJ;AAdD,wBAcC"}
|
package/LICENSE.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) [2019] [Ionel-Cristian Lupu]
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/Readme.md
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
# Typetron
|
|
2
|
-
> **Note:** This project is a prototype in heavy development and not ready for production.
|
|
3
|
-
|
|
4
|
-
**[Typetron](https://typetron.org)** is a **modern web framework** built for Node.js, written in **Typescript**, that
|
|
5
|
-
allows you to build fully featured web applications.
|
|
6
|
-
Typetron is best suited for small sized to enterprise level apps.
|
|
7
|
-
Most of the core packages it uses were built from scratch in order to preserve the performance of the framework.
|
|
8
|
-
|
|
9
|
-
_(check [this tutorial](https://typetron.org/tutorials/blog) on how to get started with Typetron)_
|
|
10
|
-
|
|
11
|
-
### Prerequisites
|
|
12
|
-
- [NodeJs >=12 LTS](https://nodejs.org)
|
|
13
|
-
|
|
14
|
-
#### Features
|
|
15
|
-
Typetron aims to have all the features necessary for building any web app without the need for you
|
|
16
|
-
to search the internet for a package to use. Almost all the packages it has were built from scratch and are
|
|
17
|
-
available in the framework.
|
|
18
|
-
This was done to ensure that all the features you are using benefit from the latest language features.
|
|
19
|
-
Also, every package can be tuned for performance or updated in no time if needed.
|
|
20
|
-
|
|
21
|
-
##### Features List
|
|
22
|
-
|
|
23
|
-
[typetron.org](https://typetron.org/docs/)
|
|
24
|
-
|
|
25
|
-
##### Performance
|
|
26
|
-
Being built with packages created from scratch using the latest features of the language, Typetron comes with
|
|
27
|
-
excellent performance out of the box compared to other available frameworks.
|
|
28
|
-
|
|
29
|
-
##### Developer experience
|
|
30
|
-
Typetron's source code is built around developer's expectations: it is modern, clean and beautiful.
|
|
31
|
-
Also, the tools Typetron is providing are everything a developer needs to build his next awesome project.
|
|
32
|
-
|
|
33
|
-
##### Code sharing
|
|
34
|
-
A few years ago we wrote websites. Nowadays we write web applications. The web evolved alongside the tools we are
|
|
35
|
-
using. A typical web application is composed of at least two parts: a backend app and a frontend app.
|
|
36
|
-
This separation led to two different camps that have a very distinct line between them. Typetron provides tools to make
|
|
37
|
-
these two camps work together.
|
|
38
|
-
|
|
39
|
-
#### Source code examples
|
|
40
|
-
|
|
41
|
-
##### Entities
|
|
42
|
-
```ts
|
|
43
|
-
export class User extends Entity {
|
|
44
|
-
|
|
45
|
-
@PrimaryColumn()
|
|
46
|
-
id: number;
|
|
47
|
-
|
|
48
|
-
@Column()
|
|
49
|
-
email: string;
|
|
50
|
-
|
|
51
|
-
@Column()
|
|
52
|
-
name: string;
|
|
53
|
-
|
|
54
|
-
@Relation(() => Post, 'author')
|
|
55
|
-
posts: HasMany<Post> = [];
|
|
56
|
-
|
|
57
|
-
@Relation(() => Group, 'users')
|
|
58
|
-
group: BelongsTo<Group>;
|
|
59
|
-
}
|
|
60
|
-
```
|
|
61
|
-
##### Forms
|
|
62
|
-
```ts
|
|
63
|
-
export class UserForm extends Form {
|
|
64
|
-
@Field()
|
|
65
|
-
@Rules(
|
|
66
|
-
Required,
|
|
67
|
-
)
|
|
68
|
-
email: string;
|
|
69
|
-
|
|
70
|
-
@Field()
|
|
71
|
-
@Rules(
|
|
72
|
-
Required,
|
|
73
|
-
MinLength(5),
|
|
74
|
-
)
|
|
75
|
-
name: string;
|
|
76
|
-
|
|
77
|
-
@Field()
|
|
78
|
-
dateOfBirth: Date;
|
|
79
|
-
}
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
##### Controllers
|
|
83
|
-
|
|
84
|
-
```ts
|
|
85
|
-
@Controller('users')
|
|
86
|
-
export class UserController {
|
|
87
|
-
|
|
88
|
-
@Inject()
|
|
89
|
-
storage: Storage;
|
|
90
|
-
|
|
91
|
-
@AuthUser()
|
|
92
|
-
user: User;
|
|
93
|
-
|
|
94
|
-
@Get('me')
|
|
95
|
-
async me() {
|
|
96
|
-
return this.auth.user;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
@Get()
|
|
100
|
-
async browse() {
|
|
101
|
-
return UserModel.from(User.get());
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
@Get(':User')
|
|
105
|
-
read(user: User) {
|
|
106
|
-
return user;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
@Put(':User')
|
|
110
|
-
update(user: User, userForm: UserForm) {
|
|
111
|
-
return user.fill(userForm).save();
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
@Post()
|
|
115
|
-
create(userForm: UserForm) {
|
|
116
|
-
return User.create(userForm);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
## License
|
|
123
|
-
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.
|