@steroidsjs/nest 3.0.0 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/infrastructure/adapters/QueryAdapterTypeORM.js +26 -2
  2. package/infrastructure/adapters/QueryAdapterTypeORM.js.map +1 -1
  3. package/infrastructure/applications/base/config.js +1 -1
  4. package/infrastructure/applications/base/config.js.map +1 -1
  5. package/infrastructure/applications/console/ConsoleApplication.js +2 -2
  6. package/infrastructure/applications/console/ConsoleApplication.js.map +1 -1
  7. package/infrastructure/applications/console/config.js +3 -0
  8. package/infrastructure/applications/console/config.js.map +1 -1
  9. package/infrastructure/applications/rest/RestApplication.js +7 -0
  10. package/infrastructure/applications/rest/RestApplication.js.map +1 -1
  11. package/infrastructure/applications/rest/exceptions/RequestExecutionException.d.ts +6 -0
  12. package/infrastructure/applications/rest/exceptions/RequestExecutionException.js +6 -0
  13. package/infrastructure/applications/rest/exceptions/RequestExecutionException.js.map +1 -1
  14. package/infrastructure/commands/MigrateCommand.js +1 -0
  15. package/infrastructure/commands/MigrateCommand.js.map +1 -1
  16. package/infrastructure/commands/dbml/dbml2code.js +8 -0
  17. package/infrastructure/commands/dbml/dbml2code.js.map +1 -1
  18. package/infrastructure/commands/entity-generator/EntityCodeGenerateCommand.d.ts +4 -0
  19. package/infrastructure/commands/entity-generator/EntityCodeGenerateCommand.js +4 -0
  20. package/infrastructure/commands/entity-generator/EntityCodeGenerateCommand.js.map +1 -1
  21. package/infrastructure/commands/entity-generator/EntityCodeGenerator.js +1 -0
  22. package/infrastructure/commands/entity-generator/EntityCodeGenerator.js.map +1 -1
  23. package/infrastructure/commands/generate/CustomPostgresQueryRunner.d.ts +77 -0
  24. package/infrastructure/commands/generate/CustomPostgresQueryRunner.js +149 -0
  25. package/infrastructure/commands/generate/CustomPostgresQueryRunner.js.map +1 -1
  26. package/infrastructure/commands/generate/CustomRdbmsSchemaBuilder.js +7 -1
  27. package/infrastructure/commands/generate/CustomRdbmsSchemaBuilder.js.map +1 -1
  28. package/infrastructure/commands/generate/index.js +14 -0
  29. package/infrastructure/commands/generate/index.js.map +1 -1
  30. package/infrastructure/commands/importClassesFromDirectories.d.ts +3 -0
  31. package/infrastructure/commands/importClassesFromDirectories.js +3 -0
  32. package/infrastructure/commands/importClassesFromDirectories.js.map +1 -1
  33. package/infrastructure/decorators/Module.js +6 -0
  34. package/infrastructure/decorators/Module.js.map +1 -1
  35. package/infrastructure/decorators/TableFromModel.js +3 -0
  36. package/infrastructure/decorators/TableFromModel.js.map +1 -1
  37. package/infrastructure/decorators/fields/BaseField.js +5 -0
  38. package/infrastructure/decorators/fields/BaseField.js.map +1 -1
  39. package/infrastructure/decorators/fields/CreateTimeField.js +1 -0
  40. package/infrastructure/decorators/fields/CreateTimeField.js.map +1 -1
  41. package/infrastructure/decorators/fields/DateTimeField.js +5 -0
  42. package/infrastructure/decorators/fields/DateTimeField.js.map +1 -1
  43. package/infrastructure/decorators/fields/ExtendField.js +2 -0
  44. package/infrastructure/decorators/fields/ExtendField.js.map +1 -1
  45. package/infrastructure/decorators/fields/RelationField.js +3 -0
  46. package/infrastructure/decorators/fields/RelationField.js.map +1 -1
  47. package/infrastructure/decorators/fields/RelationIdField.js +2 -0
  48. package/infrastructure/decorators/fields/RelationIdField.js.map +1 -1
  49. package/infrastructure/decorators/fields/UidField.js +1 -0
  50. package/infrastructure/decorators/fields/UidField.js.map +1 -1
  51. package/infrastructure/decorators/fields/UpdateTimeField.js +1 -0
  52. package/infrastructure/decorators/fields/UpdateTimeField.js.map +1 -1
  53. package/infrastructure/filters/ValidationExceptionFilter.js +1 -0
  54. package/infrastructure/filters/ValidationExceptionFilter.js.map +1 -1
  55. package/infrastructure/helpers/ModuleHelper.d.ts +1 -0
  56. package/infrastructure/helpers/ModuleHelper.js +1 -0
  57. package/infrastructure/helpers/ModuleHelper.js.map +1 -1
  58. package/infrastructure/helpers/typeORM/ConditionHelperTypeORM.js +21 -18
  59. package/infrastructure/helpers/typeORM/ConditionHelperTypeORM.js.map +1 -1
  60. package/infrastructure/helpers/typeORM/SearchHelperTypeORM.js +6 -0
  61. package/infrastructure/helpers/typeORM/SearchHelperTypeORM.js.map +1 -1
  62. package/infrastructure/pipes/CreateDtoPipe.js +1 -0
  63. package/infrastructure/pipes/CreateDtoPipe.js.map +1 -1
  64. package/infrastructure/repositories/CrudRepository.d.ts +88 -0
  65. package/infrastructure/repositories/CrudRepository.js +85 -0
  66. package/infrastructure/repositories/CrudRepository.js.map +1 -1
  67. package/infrastructure/tests/ModelTest.test.js +23 -0
  68. package/infrastructure/tests/ModelTest.test.js.map +1 -1
  69. package/infrastructure/tests/app/services/ArticleService.d.ts +4 -1
  70. package/infrastructure/tests/app/services/ArticleService.js +3 -1
  71. package/infrastructure/tests/app/services/ArticleService.js.map +1 -1
  72. package/infrastructure/tests/app/services/CommentService.d.ts +4 -1
  73. package/infrastructure/tests/app/services/CommentService.js +3 -1
  74. package/infrastructure/tests/app/services/CommentService.js.map +1 -1
  75. package/infrastructure/tests/app/services/FileService.d.ts +4 -1
  76. package/infrastructure/tests/app/services/FileService.js +3 -1
  77. package/infrastructure/tests/app/services/FileService.js.map +1 -1
  78. package/infrastructure/tests/app/services/ImageService.d.ts +4 -1
  79. package/infrastructure/tests/app/services/ImageService.js +3 -1
  80. package/infrastructure/tests/app/services/ImageService.js.map +1 -1
  81. package/infrastructure/tests/app/services/TagService.d.ts +4 -1
  82. package/infrastructure/tests/app/services/TagService.js +3 -1
  83. package/infrastructure/tests/app/services/TagService.js.map +1 -1
  84. package/infrastructure/tests/app/services/UserService.d.ts +4 -1
  85. package/infrastructure/tests/app/services/UserService.js +3 -1
  86. package/infrastructure/tests/app/services/UserService.js.map +1 -1
  87. package/infrastructure/tests/bootstrap.js +1 -1
  88. package/infrastructure/tests/bootstrap.js.map +1 -1
  89. package/package.json +1 -1
  90. package/tsconfig.tsbuildinfo +1 -1
  91. package/usecases/base/SearchQuery.d.ts +12 -0
  92. package/usecases/base/SearchQuery.js +18 -0
  93. package/usecases/base/SearchQuery.js.map +1 -1
  94. package/usecases/helpers/DataMapper.js +6 -0
  95. package/usecases/helpers/DataMapper.js.map +1 -1
  96. package/usecases/helpers/ValidationHelper.d.ts +27 -0
  97. package/usecases/helpers/ValidationHelper.js +33 -0
  98. package/usecases/helpers/ValidationHelper.js.map +1 -1
  99. package/usecases/interfaces/IManualSchema.d.ts +4 -0
  100. package/usecases/services/CrudService.d.ts +47 -8
  101. package/usecases/services/CrudService.js +88 -0
  102. package/usecases/services/CrudService.js.map +1 -1
  103. package/usecases/services/ReadService.d.ts +31 -0
  104. package/usecases/services/ReadService.js +32 -0
  105. package/usecases/services/ReadService.js.map +1 -1
  106. package/usecases/validators/Validator.js +1 -0
  107. package/usecases/validators/Validator.js.map +1 -1
@@ -18,28 +18,105 @@ export declare class TableSqlInMemory extends SqlInMemory {
18
18
  upTableQueries: TableQuery[];
19
19
  downTableQueries: TableQuery[];
20
20
  }
21
+ /**
22
+ * Runs queries on a single postgres database connection.
23
+ */
21
24
  export declare class CustomPostgresQueryRunner extends PostgresQueryRunner implements QueryRunner {
25
+ /**
26
+ * Sql-s stored if "sql in memory" mode is enabled.
27
+ */
22
28
  protected sqlInMemory: TableSqlInMemory;
29
+ /**
30
+ * Creates a new table.
31
+ */
23
32
  createTable(table: Table, ifNotExist?: boolean, createForeignKeys?: boolean, createIndices?: boolean): Promise<void>;
33
+ /**
34
+ * Drops the table.
35
+ */
24
36
  dropTable(target: Table | string, ifExist?: boolean, dropForeignKeys?: boolean, dropIndices?: boolean): Promise<void>;
37
+ /**
38
+ * Creates a new column from the column in the table.
39
+ */
25
40
  addColumn(tableOrName: Table | string, column: TableColumn): Promise<void>;
41
+ /**
42
+ * Renames column in the given table.
43
+ */
26
44
  renameColumn(tableOrName: Table | string, oldTableColumnOrName: TableColumn | string, newTableColumnOrName: TableColumn | string): Promise<void>;
45
+ /**
46
+ * Changes a column in the table.
47
+ */
27
48
  changeColumn(tableOrName: Table | string, oldTableColumnOrName: TableColumn | string, newColumn: TableColumn): Promise<void>;
49
+ /**
50
+ * Drops column in the table.
51
+ */
28
52
  dropColumn(tableOrName: Table | string, columnOrName: TableColumn | string): Promise<void>;
53
+ /**
54
+ * Updates composite primary keys.
55
+ */
29
56
  updatePrimaryKeys(tableOrName: Table | string, columns: TableColumn[]): Promise<void>;
57
+ /**
58
+ * Creates new unique constraint.
59
+ */
30
60
  createUniqueConstraint(tableOrName: Table | string, uniqueConstraint: TableUnique): Promise<void>;
61
+ /**
62
+ * Drops unique constraint.
63
+ */
31
64
  dropUniqueConstraint(tableOrName: Table | string, uniqueOrName: TableUnique | string): Promise<void>;
65
+ /**
66
+ * Creates new check constraint.
67
+ */
32
68
  createCheckConstraint(tableOrName: Table | string, checkConstraint: TableCheck): Promise<void>;
69
+ /**
70
+ * Drops check constraint.
71
+ */
33
72
  dropCheckConstraint(tableOrName: Table | string, checkOrName: TableCheck | string): Promise<void>;
73
+ /**
74
+ * Creates new exclusion constraint.
75
+ */
34
76
  createExclusionConstraint(tableOrName: Table | string, exclusionConstraint: TableExclusion): Promise<void>;
77
+ /**
78
+ * Drops exclusion constraint.
79
+ */
35
80
  dropExclusionConstraint(tableOrName: Table | string, exclusionOrName: TableExclusion | string): Promise<void>;
81
+ /**
82
+ * Creates a new foreign key.
83
+ */
36
84
  createForeignKey(tableOrName: Table | string, foreignKey: TableForeignKey): Promise<void>;
85
+ /**
86
+ * Drops a foreign key from the table.
87
+ */
37
88
  dropForeignKey(tableOrName: Table | string, foreignKeyOrName: TableForeignKey | string): Promise<void>;
89
+ /**
90
+ * Creates a new index.
91
+ */
38
92
  createIndex(tableOrName: Table | string, index: TableIndex): Promise<void>;
93
+ /**
94
+ * Drops an index from the table.
95
+ */
39
96
  dropIndex(tableOrName: Table | string, indexOrName: TableIndex | string): Promise<void>;
97
+ /**
98
+ * Executes sql used special for schema build.
99
+ */
40
100
  protected executeQueries(upQueries: TableQuery | TableQuery[] | Query | Query[], downQueries: TableQuery | TableQuery[] | Query | Query[]): Promise<void>;
101
+ /**
102
+ * Enables special query runner mode in which sql queries won't be executed,
103
+ * instead they will be memorized into a special variable inside query runner.
104
+ * You can get memorized sql using getMemorySql() method.
105
+ */
41
106
  enableSqlMemory(): void;
107
+ /**
108
+ * Disables special query runner mode in which sql queries won't be executed
109
+ * started by calling enableSqlMemory() method.
110
+ *
111
+ * Previously memorized sql will be flushed.
112
+ */
42
113
  disableSqlMemory(): void;
114
+ /**
115
+ * Flushes all memorized sqls.
116
+ */
43
117
  clearSqlMemory(): void;
118
+ /**
119
+ * Gets sql stored in the memory. Parameters in the sql are already replaced.
120
+ */
44
121
  getMemorySql(): TableSqlInMemory;
45
122
  }