@steroidsjs/nest 4.2.1 → 4.4.0

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 (119) hide show
  1. package/infrastructure/adapters/QueryAdapterTypeORM.js +2 -1
  2. package/infrastructure/adapters/QueryAdapterTypeORM.js.map +1 -1
  3. package/infrastructure/applications/BaseApplication.js +2 -1
  4. package/infrastructure/applications/BaseApplication.js.map +1 -1
  5. package/infrastructure/applications/rest/IRestAppModuleConfig.d.ts +4 -0
  6. package/infrastructure/applications/rest/RestApplication.d.ts +10 -0
  7. package/infrastructure/applications/rest/RestApplication.js +23 -6
  8. package/infrastructure/applications/rest/RestApplication.js.map +1 -1
  9. package/infrastructure/commands/MigrateCommand.d.ts +0 -1
  10. package/infrastructure/commands/MigrateCommand.js +0 -34
  11. package/infrastructure/commands/MigrateCommand.js.map +1 -1
  12. package/infrastructure/commands/generate/index.d.ts +6 -6
  13. package/infrastructure/commands/generate/index.js +7 -39
  14. package/infrastructure/commands/generate/index.js.map +1 -1
  15. package/infrastructure/decorators/Transform.d.ts +2 -2
  16. package/infrastructure/decorators/fields/BaseField.d.ts +15 -47
  17. package/infrastructure/decorators/fields/BaseField.js +36 -105
  18. package/infrastructure/decorators/fields/BaseField.js.map +1 -1
  19. package/infrastructure/decorators/fields/BooleanField.js +1 -1
  20. package/infrastructure/decorators/fields/BooleanField.js.map +1 -1
  21. package/infrastructure/decorators/fields/ComputableField.js +0 -1
  22. package/infrastructure/decorators/fields/ComputableField.js.map +1 -1
  23. package/infrastructure/decorators/fields/CoordinateField.js +1 -1
  24. package/infrastructure/decorators/fields/CoordinateField.js.map +1 -1
  25. package/infrastructure/decorators/fields/CreateTimeField.js +1 -1
  26. package/infrastructure/decorators/fields/CreateTimeField.js.map +1 -1
  27. package/infrastructure/decorators/fields/DateField.js +1 -1
  28. package/infrastructure/decorators/fields/DateField.js.map +1 -1
  29. package/infrastructure/decorators/fields/DateTimeField.js +2 -2
  30. package/infrastructure/decorators/fields/DateTimeField.js.map +1 -1
  31. package/infrastructure/decorators/fields/DecimalField.js +1 -1
  32. package/infrastructure/decorators/fields/DecimalField.js.map +1 -1
  33. package/infrastructure/decorators/fields/DecimalNumberField.js +1 -1
  34. package/infrastructure/decorators/fields/DecimalNumberField.js.map +1 -1
  35. package/infrastructure/decorators/fields/DeleteDateField.js +1 -1
  36. package/infrastructure/decorators/fields/DeleteDateField.js.map +1 -1
  37. package/infrastructure/decorators/fields/EmailField.js +1 -1
  38. package/infrastructure/decorators/fields/EmailField.js.map +1 -1
  39. package/infrastructure/decorators/fields/EnumField.js +1 -1
  40. package/infrastructure/decorators/fields/EnumField.js.map +1 -1
  41. package/infrastructure/decorators/fields/FileField.js +1 -1
  42. package/infrastructure/decorators/fields/FileField.js.map +1 -1
  43. package/infrastructure/decorators/fields/GeometryField.d.ts +2 -0
  44. package/infrastructure/decorators/fields/GeometryField.js +2 -1
  45. package/infrastructure/decorators/fields/GeometryField.js.map +1 -1
  46. package/infrastructure/decorators/fields/HtmlField.js +1 -1
  47. package/infrastructure/decorators/fields/HtmlField.js.map +1 -1
  48. package/infrastructure/decorators/fields/IntegerField.js +1 -1
  49. package/infrastructure/decorators/fields/IntegerField.js.map +1 -1
  50. package/infrastructure/decorators/fields/JSONBField.d.ts +4 -1
  51. package/infrastructure/decorators/fields/JSONBField.js +2 -2
  52. package/infrastructure/decorators/fields/JSONBField.js.map +1 -1
  53. package/infrastructure/decorators/fields/PasswordField.js +1 -1
  54. package/infrastructure/decorators/fields/PasswordField.js.map +1 -1
  55. package/infrastructure/decorators/fields/PhoneField.js +1 -1
  56. package/infrastructure/decorators/fields/PhoneField.js.map +1 -1
  57. package/infrastructure/decorators/fields/PrimaryKeyField.js +1 -1
  58. package/infrastructure/decorators/fields/PrimaryKeyField.js.map +1 -1
  59. package/infrastructure/decorators/fields/RelationField.d.ts +6 -4
  60. package/infrastructure/decorators/fields/RelationField.js +5 -8
  61. package/infrastructure/decorators/fields/RelationField.js.map +1 -1
  62. package/infrastructure/decorators/fields/RelationIdField.js +1 -1
  63. package/infrastructure/decorators/fields/RelationIdField.js.map +1 -1
  64. package/infrastructure/decorators/fields/StringField.js +1 -1
  65. package/infrastructure/decorators/fields/StringField.js.map +1 -1
  66. package/infrastructure/decorators/fields/TextField.js +1 -1
  67. package/infrastructure/decorators/fields/TextField.js.map +1 -1
  68. package/infrastructure/decorators/fields/TimeField.js +1 -1
  69. package/infrastructure/decorators/fields/TimeField.js.map +1 -1
  70. package/infrastructure/decorators/fields/UidField.js +1 -1
  71. package/infrastructure/decorators/fields/UidField.js.map +1 -1
  72. package/infrastructure/decorators/fields/UpdateTimeField.js +1 -1
  73. package/infrastructure/decorators/fields/UpdateTimeField.js.map +1 -1
  74. package/infrastructure/decorators/fields/helpers/InternalFieldMetadataHelpers.d.ts +27 -0
  75. package/infrastructure/decorators/fields/helpers/InternalFieldMetadataHelpers.js +104 -0
  76. package/infrastructure/decorators/fields/helpers/InternalFieldMetadataHelpers.js.map +1 -0
  77. package/infrastructure/decorators/typeorm/TypeOrmDecoratorFactory.d.ts +3 -2
  78. package/infrastructure/decorators/typeorm/TypeOrmDecoratorFactory.js.map +1 -1
  79. package/infrastructure/decorators/typeorm/TypeOrmTableFromModel.js.map +1 -1
  80. package/infrastructure/decorators/typeorm/fields/TypeOrmBooleanField/index.js +1 -1
  81. package/infrastructure/decorators/typeorm/fields/TypeOrmBooleanField/index.js.map +1 -1
  82. package/infrastructure/decorators/typeorm/fields/TypeOrmUidField/index.js +1 -1
  83. package/infrastructure/decorators/typeorm/fields/TypeOrmUidField/index.js.map +1 -1
  84. package/infrastructure/filters/UserExceptionFilter.d.ts +1 -0
  85. package/infrastructure/filters/UserExceptionFilter.js +1 -0
  86. package/infrastructure/filters/UserExceptionFilter.js.map +1 -1
  87. package/infrastructure/pipes/CreateDtoPipe.d.ts +5 -1
  88. package/infrastructure/pipes/CreateDtoPipe.js +23 -4
  89. package/infrastructure/pipes/CreateDtoPipe.js.map +1 -1
  90. package/infrastructure/pipes/CreateDtoPipe.test.d.ts +1 -0
  91. package/infrastructure/pipes/CreateDtoPipe.test.js +98 -0
  92. package/infrastructure/pipes/CreateDtoPipe.test.js.map +1 -0
  93. package/package.json +6 -2
  94. package/tsconfig.tsbuildinfo +1 -1
  95. package/usecases/base/SearchQuery.d.ts +11 -0
  96. package/usecases/base/SearchQuery.js +36 -19
  97. package/usecases/base/SearchQuery.js.map +1 -1
  98. package/usecases/base/SearchQuery.test.d.ts +1 -0
  99. package/usecases/base/SearchQuery.test.js +102 -0
  100. package/usecases/base/SearchQuery.test.js.map +1 -0
  101. package/usecases/exceptions/UserException.d.ts +1 -0
  102. package/usecases/exceptions/UserException.js +1 -0
  103. package/usecases/exceptions/UserException.js.map +1 -1
  104. package/usecases/helpers/DataMapper.js +13 -8
  105. package/usecases/helpers/DataMapper.js.map +1 -1
  106. package/usecases/helpers/getMetaRelationsFromObject.d.ts +2 -0
  107. package/usecases/helpers/getMetaRelationsFromObject.js +53 -0
  108. package/usecases/helpers/getMetaRelationsFromObject.js.map +1 -0
  109. package/usecases/helpers/getMetaRelationsFromObject.test.d.ts +1 -0
  110. package/usecases/helpers/getMetaRelationsFromObject.test.js +327 -0
  111. package/usecases/helpers/getMetaRelationsFromObject.test.js.map +1 -0
  112. package/usecases/services/CrudService.js +5 -1
  113. package/usecases/services/CrudService.js.map +1 -1
  114. package/usecases/utils/wrapInDoubleQuotes.d.ts +1 -0
  115. package/usecases/utils/wrapInDoubleQuotes.js +15 -0
  116. package/usecases/utils/wrapInDoubleQuotes.js.map +1 -0
  117. package/infrastructure/utils/getNewPermissions.d.ts +0 -2
  118. package/infrastructure/utils/getNewPermissions.js +0 -18
  119. package/infrastructure/utils/getNewPermissions.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CreateDtoPipe.test.js","sourceRoot":"","sources":["../../../src/infrastructure/pipes/CreateDtoPipe.test.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,mD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CAAC,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;QACvD,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACrC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAC1C,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC9B,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@steroidsjs/nest",
3
- "version": "4.2.1",
3
+ "version": "4.4.0",
4
4
  "scripts": {
5
5
  "script": "nps",
6
6
  "watch": "nps watch",
7
7
  "build": "nps build",
8
8
  "test": "nps test",
9
- "test-unit": "jest --config jest.unit.config.ts"
9
+ "test-unit": "jest --config jest.unit.config.ts",
10
+ "postinstall": "jest --clearCache"
10
11
  },
11
12
  "description": "",
12
13
  "main": "index.js",
@@ -27,6 +28,7 @@
27
28
  "@supercharge/request-ip": "^1.2.0",
28
29
  "body-parser": "^2.2.1",
29
30
  "class-transformer": "^0.5.1",
31
+ "cookie-parser": "^1.4.7",
30
32
  "date-fns": "^2.29.3",
31
33
  "express": "^4.18.2",
32
34
  "lodash": "^4.17.21",
@@ -57,7 +59,9 @@
57
59
  "@steroidsjs/eslint-config": "2.1.2",
58
60
  "@steroidsjs/nest-typeorm": "^10.0.3",
59
61
  "@steroidsjs/typeorm": "^0.3.23",
62
+ "@types/cookie-parser": "^1.4.10",
60
63
  "@types/jest": "^29.4.0",
64
+ "@types/lodash": "^4.17.23",
61
65
  "@types/node": "^18.11.18",
62
66
  "@typescript-eslint/eslint-plugin": "^5.49.0",
63
67
  "@typescript-eslint/parser": "^5.49.0",