mongodb-dynamic-api 1.3.2 → 1.3.3
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
|
|
3
|
+
## [1.3.3](https://github.com/MikeDev75015/mongodb-dynamic-api/compare/v1.3.2...v1.3.3) (2024-03-06)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### api
|
|
7
|
+
|
|
8
|
+
* **api:** display the package version in swagger by default ([36520c3](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/36520c37abdd4fcbbfeed333a68ea0a108533b39))
|
|
9
|
+
|
|
3
10
|
## [1.3.2](https://github.com/MikeDev75015/mongodb-dynamic-api/compare/v1.3.1...v1.3.2) (2024-03-05)
|
|
4
11
|
|
|
5
12
|
## [1.3.1](https://github.com/MikeDev75015/mongodb-dynamic-api/compare/v1.3.0...v1.3.1) (2024-03-05)
|
package/package.json
CHANGED
|
@@ -15,9 +15,6 @@ const mongoose_1 = require("@nestjs/mongoose");
|
|
|
15
15
|
const decorators_1 = require("./decorators");
|
|
16
16
|
const helpers_1 = require("./helpers");
|
|
17
17
|
const modules_1 = require("./modules");
|
|
18
|
-
const delete_many_1 = require("./modules/delete-many");
|
|
19
|
-
const duplicate_many_1 = require("./modules/duplicate-many");
|
|
20
|
-
const update_many_1 = require("./modules/update-many");
|
|
21
18
|
let DynamicApiModule = DynamicApiModule_1 = class DynamicApiModule {
|
|
22
19
|
static forRoot(uri, { useGlobalCache = true, cacheOptions = {} } = {}) {
|
|
23
20
|
if (!uri) {
|
|
@@ -78,13 +75,13 @@ let DynamicApiModule = DynamicApiModule_1 = class DynamicApiModule {
|
|
|
78
75
|
module = modules_1.CreateOneModule;
|
|
79
76
|
break;
|
|
80
77
|
case 'DeleteMany':
|
|
81
|
-
module =
|
|
78
|
+
module = modules_1.DeleteManyModule;
|
|
82
79
|
break;
|
|
83
80
|
case 'DeleteOne':
|
|
84
81
|
module = modules_1.DeleteOneModule;
|
|
85
82
|
break;
|
|
86
83
|
case 'DuplicateMany':
|
|
87
|
-
module =
|
|
84
|
+
module = modules_1.DuplicateManyModule;
|
|
88
85
|
break;
|
|
89
86
|
case 'DuplicateOne':
|
|
90
87
|
module = modules_1.DuplicateOneModule;
|
|
@@ -99,7 +96,7 @@ let DynamicApiModule = DynamicApiModule_1 = class DynamicApiModule {
|
|
|
99
96
|
module = modules_1.ReplaceOneModule;
|
|
100
97
|
break;
|
|
101
98
|
case 'UpdateMany':
|
|
102
|
-
module =
|
|
99
|
+
module = modules_1.UpdateManyModule;
|
|
103
100
|
break;
|
|
104
101
|
case 'UpdateOne':
|
|
105
102
|
module = modules_1.UpdateOneModule;
|
|
@@ -96,7 +96,8 @@ function buildExtraConfig(config, swaggerConfig) {
|
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
98
|
function enableDynamicAPISwagger(app, options = {}) {
|
|
99
|
-
const
|
|
99
|
+
const versionFile = require('../version.json');
|
|
100
|
+
const { title = 'MongoDB Dynamic API', description = 'Auto generated CRUD for MongoDB', version = (version_json_1.default ?? versionFile)?.version, path = '/dynamic-api', swaggerExtraConfig, swaggerDocumentOptions, } = options ?? {};
|
|
100
101
|
const config = new swagger_1.DocumentBuilder()
|
|
101
102
|
.setTitle(title)
|
|
102
103
|
.setDescription(description)
|
package/src/modules/index.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
export * from './create-one';
|
|
2
1
|
export * from './create-many';
|
|
2
|
+
export * from './create-one';
|
|
3
|
+
export * from './delete-many';
|
|
3
4
|
export * from './delete-one';
|
|
5
|
+
export * from './duplicate-many';
|
|
4
6
|
export * from './duplicate-one';
|
|
5
7
|
export * from './get-many';
|
|
6
8
|
export * from './get-one';
|
|
7
9
|
export * from './replace-one';
|
|
10
|
+
export * from './update-many';
|
|
8
11
|
export * from './update-one';
|
package/src/modules/index.js
CHANGED
|
@@ -14,11 +14,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./create-one"), exports);
|
|
18
17
|
__exportStar(require("./create-many"), exports);
|
|
18
|
+
__exportStar(require("./create-one"), exports);
|
|
19
|
+
__exportStar(require("./delete-many"), exports);
|
|
19
20
|
__exportStar(require("./delete-one"), exports);
|
|
21
|
+
__exportStar(require("./duplicate-many"), exports);
|
|
20
22
|
__exportStar(require("./duplicate-one"), exports);
|
|
21
23
|
__exportStar(require("./get-many"), exports);
|
|
22
24
|
__exportStar(require("./get-one"), exports);
|
|
23
25
|
__exportStar(require("./replace-one"), exports);
|
|
26
|
+
__exportStar(require("./update-many"), exports);
|
|
24
27
|
__exportStar(require("./update-one"), exports);
|
package/src/version.json
CHANGED