mongodb-dynamic-api 4.17.0 → 4.21.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.
- package/CHANGELOG.md +182 -0
- package/README.md +5 -2
- package/package.json +6 -3
- package/schematics/collection.json +11 -0
- package/schematics/resource/files/__name@dasherize__.entity.ts.template +9 -0
- package/schematics/resource/files/__name@dasherize__.module.ts.template +13 -0
- package/schematics/resource/index.js +37 -0
- package/schematics/resource/index.js.map +1 -0
- package/schematics/resource/schema.json +34 -0
- package/schematics.tsbuildinfo +1 -0
- package/src/decorators/entity-exists.decorator.js +11 -2
- package/src/decorators/entity-exists.decorator.js.map +1 -1
- package/src/decorators/index.d.ts +1 -0
- package/src/decorators/index.js +1 -0
- package/src/decorators/index.js.map +1 -1
- package/src/decorators/is-unique.decorator.js +11 -2
- package/src/decorators/is-unique.decorator.js.map +1 -1
- package/src/decorators/rate-limit.decorator.d.ts +3 -0
- package/src/decorators/rate-limit.decorator.js +21 -0
- package/src/decorators/rate-limit.decorator.js.map +1 -0
- package/src/dynamic-api.module.js +4 -0
- package/src/dynamic-api.module.js.map +1 -1
- package/src/gateways/base.gateway.js +9 -9
- package/src/gateways/base.gateway.js.map +1 -1
- package/src/guards/dynamic-api-jwt-auth.guard.d.ts +3 -0
- package/src/guards/dynamic-api-jwt-auth.guard.js +23 -2
- package/src/guards/dynamic-api-jwt-auth.guard.js.map +1 -1
- package/src/helpers/index-sync.helper.d.ts +6 -0
- package/src/helpers/index-sync.helper.js +48 -0
- package/src/helpers/index-sync.helper.js.map +1 -0
- package/src/helpers/index.d.ts +6 -0
- package/src/helpers/index.js +6 -0
- package/src/helpers/index.js.map +1 -1
- package/src/helpers/mint-token-pair.helper.d.ts +13 -0
- package/src/helpers/mint-token-pair.helper.js +41 -0
- package/src/helpers/mint-token-pair.helper.js.map +1 -0
- package/src/helpers/mongo-transaction.helper.d.ts +2 -0
- package/src/helpers/mongo-transaction.helper.js +11 -0
- package/src/helpers/mongo-transaction.helper.js.map +1 -0
- package/src/helpers/mongoose-cast-error.helper.d.ts +2 -0
- package/src/helpers/mongoose-cast-error.helper.js +8 -0
- package/src/helpers/mongoose-cast-error.helper.js.map +1 -0
- package/src/helpers/predicate-identifier.helper.d.ts +3 -0
- package/src/helpers/predicate-identifier.helper.js +34 -0
- package/src/helpers/predicate-identifier.helper.js.map +1 -0
- package/src/helpers/strip-business-validators.helper.d.ts +3 -0
- package/src/helpers/strip-business-validators.helper.js +17 -0
- package/src/helpers/strip-business-validators.helper.js.map +1 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/index.js.map +1 -1
- package/src/interceptors/index.d.ts +1 -0
- package/src/interceptors/index.js +1 -0
- package/src/interceptors/index.js.map +1 -1
- package/src/interceptors/merge-id-param.interceptor.d.ts +6 -0
- package/src/interceptors/merge-id-param.interceptor.js +24 -0
- package/src/interceptors/merge-id-param.interceptor.js.map +1 -0
- package/src/interfaces/dynamic-api-audit-log.interface.d.ts +10 -0
- package/src/interfaces/dynamic-api-audit-log.interface.js +3 -0
- package/src/interfaces/dynamic-api-audit-log.interface.js.map +1 -0
- package/src/interfaces/dynamic-api-global-state.interface.d.ts +2 -0
- package/src/interfaces/dynamic-api-health-check.interface.d.ts +8 -0
- package/src/interfaces/dynamic-api-health-check.interface.js +3 -0
- package/src/interfaces/dynamic-api-health-check.interface.js.map +1 -0
- package/src/interfaces/dynamic-api-rate-limit.interface.d.ts +6 -0
- package/src/interfaces/dynamic-api-rate-limit.interface.js +3 -0
- package/src/interfaces/dynamic-api-rate-limit.interface.js.map +1 -0
- package/src/interfaces/dynamic-api-route-config.interface.d.ts +6 -1
- package/src/interfaces/dynamic-api-route-config.interface.js.map +1 -1
- package/src/interfaces/dynamic-api-service-callback.interface.d.ts +1 -0
- package/src/interfaces/index.d.ts +3 -0
- package/src/interfaces/index.js +3 -0
- package/src/interfaces/index.js.map +1 -1
- package/src/modules/auth/interfaces/auth-options.interface.d.ts +8 -1
- package/src/modules/auth/mixins/auth-controller.mixin.d.ts +1 -1
- package/src/modules/auth/mixins/auth-controller.mixin.js +11 -2
- package/src/modules/auth/mixins/auth-controller.mixin.js.map +1 -1
- package/src/modules/auth/mixins/auth-gateway.mixin.js +3 -1
- package/src/modules/auth/mixins/auth-gateway.mixin.js.map +1 -1
- package/src/modules/health/health.controller.d.ts +3 -0
- package/src/modules/health/health.controller.js +53 -0
- package/src/modules/health/health.controller.js.map +1 -0
- package/src/modules/health/health.module.d.ts +6 -0
- package/src/modules/health/health.module.js +28 -0
- package/src/modules/health/health.module.js.map +1 -0
- package/src/modules/health/index.d.ts +2 -0
- package/src/modules/health/index.js +19 -0
- package/src/modules/health/index.js.map +1 -0
- package/src/predicates/group-member.predicate.d.ts +2 -1
- package/src/predicates/group-member.predicate.js +6 -4
- package/src/predicates/group-member.predicate.js.map +1 -1
- package/src/predicates/ownership.predicate.d.ts +2 -1
- package/src/predicates/ownership.predicate.js +4 -2
- package/src/predicates/ownership.predicate.js.map +1 -1
- package/src/routes/create-many/base-create-many.service.d.ts +1 -0
- package/src/routes/create-many/base-create-many.service.js +3 -0
- package/src/routes/create-many/base-create-many.service.js.map +1 -1
- package/src/routes/create-many/create-many.helper.js +1 -0
- package/src/routes/create-many/create-many.helper.js.map +1 -1
- package/src/routes/create-many/create-many.module.js +1 -1
- package/src/routes/create-many/create-many.module.js.map +1 -1
- package/src/routes/create-one/base-create-one.service.d.ts +1 -0
- package/src/routes/create-one/base-create-one.service.js +3 -0
- package/src/routes/create-one/base-create-one.service.js.map +1 -1
- package/src/routes/create-one/create-one.helper.js +1 -0
- package/src/routes/create-one/create-one.helper.js.map +1 -1
- package/src/routes/create-one/create-one.module.js +1 -1
- package/src/routes/create-one/create-one.module.js.map +1 -1
- package/src/routes/delete-many/base-delete-many.service.d.ts +2 -0
- package/src/routes/delete-many/base-delete-many.service.js +24 -11
- package/src/routes/delete-many/base-delete-many.service.js.map +1 -1
- package/src/routes/delete-many/delete-many-controller.mixin.js +1 -1
- package/src/routes/delete-many/delete-many-controller.mixin.js.map +1 -1
- package/src/routes/delete-many/delete-many.helper.js +1 -0
- package/src/routes/delete-many/delete-many.helper.js.map +1 -1
- package/src/routes/delete-many/delete-many.module.js +1 -1
- package/src/routes/delete-many/delete-many.module.js.map +1 -1
- package/src/routes/delete-one/base-delete-one.service.d.ts +2 -0
- package/src/routes/delete-one/base-delete-one.service.js +24 -11
- package/src/routes/delete-one/base-delete-one.service.js.map +1 -1
- package/src/routes/delete-one/delete-one.helper.js +1 -0
- package/src/routes/delete-one/delete-one.helper.js.map +1 -1
- package/src/routes/delete-one/delete-one.module.js +1 -1
- package/src/routes/delete-one/delete-one.module.js.map +1 -1
- package/src/routes/duplicate-many/base-duplicate-many.service.d.ts +1 -0
- package/src/routes/duplicate-many/base-duplicate-many.service.js +3 -0
- package/src/routes/duplicate-many/base-duplicate-many.service.js.map +1 -1
- package/src/routes/duplicate-many/duplicate-many-controller.mixin.js +1 -1
- package/src/routes/duplicate-many/duplicate-many-controller.mixin.js.map +1 -1
- package/src/routes/duplicate-many/duplicate-many.helper.js +1 -0
- package/src/routes/duplicate-many/duplicate-many.helper.js.map +1 -1
- package/src/routes/duplicate-many/duplicate-many.module.js +1 -1
- package/src/routes/duplicate-many/duplicate-many.module.js.map +1 -1
- package/src/routes/duplicate-one/base-duplicate-one.service.d.ts +1 -0
- package/src/routes/duplicate-one/base-duplicate-one.service.js +3 -0
- package/src/routes/duplicate-one/base-duplicate-one.service.js.map +1 -1
- package/src/routes/duplicate-one/duplicate-one.helper.js +1 -0
- package/src/routes/duplicate-one/duplicate-one.helper.js.map +1 -1
- package/src/routes/duplicate-one/duplicate-one.module.js +1 -1
- package/src/routes/duplicate-one/duplicate-one.module.js.map +1 -1
- package/src/routes/get-many/base-get-many.service.d.ts +2 -1
- package/src/routes/get-many/base-get-many.service.js +6 -3
- package/src/routes/get-many/base-get-many.service.js.map +1 -1
- package/src/routes/get-many/get-many.helper.d.ts +2 -2
- package/src/routes/get-many/get-many.helper.js +2 -1
- package/src/routes/get-many/get-many.helper.js.map +1 -1
- package/src/routes/get-many/get-many.module.d.ts +2 -2
- package/src/routes/get-many/get-many.module.js +1 -1
- package/src/routes/get-many/get-many.module.js.map +1 -1
- package/src/routes/get-one/base-get-one.service.d.ts +2 -1
- package/src/routes/get-one/base-get-one.service.js +6 -3
- package/src/routes/get-one/base-get-one.service.js.map +1 -1
- package/src/routes/get-one/get-one.helper.d.ts +2 -2
- package/src/routes/get-one/get-one.helper.js +2 -1
- package/src/routes/get-one/get-one.helper.js.map +1 -1
- package/src/routes/get-one/get-one.module.d.ts +2 -2
- package/src/routes/get-one/get-one.module.js +1 -1
- package/src/routes/get-one/get-one.module.js.map +1 -1
- package/src/routes/replace-one/base-replace-one.service.d.ts +1 -0
- package/src/routes/replace-one/base-replace-one.service.js +3 -0
- package/src/routes/replace-one/base-replace-one.service.js.map +1 -1
- package/src/routes/replace-one/replace-one.helper.js +1 -0
- package/src/routes/replace-one/replace-one.helper.js.map +1 -1
- package/src/routes/replace-one/replace-one.module.js +1 -1
- package/src/routes/replace-one/replace-one.module.js.map +1 -1
- package/src/routes/update-many/base-update-many.service.d.ts +1 -0
- package/src/routes/update-many/base-update-many.service.js +9 -0
- package/src/routes/update-many/base-update-many.service.js.map +1 -1
- package/src/routes/update-many/update-many-controller.mixin.js +2 -2
- package/src/routes/update-many/update-many-controller.mixin.js.map +1 -1
- package/src/routes/update-many/update-many.helper.js +1 -0
- package/src/routes/update-many/update-many.helper.js.map +1 -1
- package/src/routes/update-many/update-many.module.js +1 -1
- package/src/routes/update-many/update-many.module.js.map +1 -1
- package/src/routes/update-one/base-update-one.service.d.ts +1 -0
- package/src/routes/update-one/base-update-one.service.js +3 -0
- package/src/routes/update-one/base-update-one.service.js.map +1 -1
- package/src/routes/update-one/update-one-controller.mixin.js +14 -4
- package/src/routes/update-one/update-one-controller.mixin.js.map +1 -1
- package/src/routes/update-one/update-one.helper.js +1 -0
- package/src/routes/update-one/update-one.helper.js.map +1 -1
- package/src/routes/update-one/update-one.module.js +1 -1
- package/src/routes/update-one/update-one.module.js.map +1 -1
- package/src/services/base/base.service.d.ts +14 -4
- package/src/services/base/base.service.js +73 -10
- package/src/services/base/base.service.js.map +1 -1
- package/src/services/dynamic-api-broadcast/dynamic-api-broadcast.service.js +6 -6
- package/src/services/dynamic-api-broadcast/dynamic-api-broadcast.service.js.map +1 -1
- package/src/services/dynamic-api-global-state/dynamic-api-global-state.service.js +2 -0
- package/src/services/dynamic-api-global-state/dynamic-api-global-state.service.js.map +1 -1
- package/src/testing/create-dynamic-api-testing-app.d.ts +16 -0
- package/src/testing/create-dynamic-api-testing-app.js +42 -0
- package/src/testing/create-dynamic-api-testing-app.js.map +1 -0
- package/src/testing/index.d.ts +1 -0
- package/src/testing/index.js +18 -0
- package/src/testing/index.js.map +1 -0
- package/src/version.json +1 -1
- package/test/for-feature/ability-predicates.e2e-spec.js +28 -0
- package/test/for-feature/ability-predicates.e2e-spec.js.map +1 -1
- package/test/for-feature/audit-log.e2e-spec.d.ts +1 -0
- package/test/for-feature/audit-log.e2e-spec.js +134 -0
- package/test/for-feature/audit-log.e2e-spec.js.map +1 -0
- package/test/for-feature/cascade-transaction-atomicity.e2e-spec.d.ts +1 -0
- package/test/for-feature/cascade-transaction-atomicity.e2e-spec.js +86 -0
- package/test/for-feature/cascade-transaction-atomicity.e2e-spec.js.map +1 -0
- package/test/for-feature/db-aware-validators.e2e-spec.js +54 -3
- package/test/for-feature/db-aware-validators.e2e-spec.js.map +1 -1
- package/test/for-feature/http-broadcast.e2e-spec.js +56 -2
- package/test/for-feature/http-broadcast.e2e-spec.js.map +1 -1
- package/test/for-feature/index-sync.e2e-spec.d.ts +1 -0
- package/test/for-feature/index-sync.e2e-spec.js +88 -0
- package/test/for-feature/index-sync.e2e-spec.js.map +1 -0
- package/test/for-feature/populate.e2e-spec.d.ts +1 -0
- package/test/for-feature/populate.e2e-spec.js +93 -0
- package/test/for-feature/populate.e2e-spec.js.map +1 -0
- package/test/for-root/auth-api-basic.e2e-spec.js +13 -0
- package/test/for-root/auth-api-basic.e2e-spec.js.map +1 -1
- package/test/for-root/auth-api-login.e2e-spec.js +29 -0
- package/test/for-root/auth-api-login.e2e-spec.js.map +1 -1
- package/test/for-root/auth-api-mint-token-pair.e2e-spec.d.ts +1 -0
- package/test/for-root/auth-api-mint-token-pair.e2e-spec.js +58 -0
- package/test/for-root/auth-api-mint-token-pair.e2e-spec.js.map +1 -0
- package/test/for-root/auth-api-rate-limit.e2e-spec.d.ts +1 -0
- package/test/for-root/auth-api-rate-limit.e2e-spec.js +60 -0
- package/test/for-root/auth-api-rate-limit.e2e-spec.js.map +1 -0
- package/test/for-root/health-check.e2e-spec.d.ts +1 -0
- package/test/for-root/health-check.e2e-spec.js +66 -0
- package/test/for-root/health-check.e2e-spec.js.map +1 -0
- package/test/for-root/initialization.e2e-spec.js +4 -0
- package/test/for-root/initialization.e2e-spec.js.map +1 -1
- package/test/for-root/websockets-auth-basic.e2e-spec.js +2 -0
- package/test/for-root/websockets-auth-basic.e2e-spec.js.map +1 -1
- package/test/for-root/websockets-auth-login.e2e-spec.js +32 -0
- package/test/for-root/websockets-auth-login.e2e-spec.js.map +1 -1
- package/test/shared/entities/index.d.ts +1 -0
- package/test/shared/entities/index.js +1 -0
- package/test/shared/entities/index.js.map +1 -1
- package/test/shared/entities/unique-login-user.factory.d.ts +14 -0
- package/test/shared/entities/unique-login-user.factory.js +40 -0
- package/test/shared/entities/unique-login-user.factory.js.map +1 -0
- package/test/testing/create-dynamic-api-testing-app.e2e-spec.d.ts +1 -0
- package/test/testing/create-dynamic-api-testing-app.e2e-spec.js +66 -0
- package/test/testing/create-dynamic-api-testing-app.e2e-spec.js.map +1 -0
- package/testing.d.ts +1 -0
- package/testing.js +18 -0
- package/testing.js.map +1 -0
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,187 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
|
|
3
|
+
## [4.21.0](https://github.com/MikeDev75015/mongodb-dynamic-api/compare/v4.19.0...v4.21.0) (2026-08-16)
|
|
4
|
+
|
|
5
|
+
### ci
|
|
6
|
+
|
|
7
|
+
* **ci:** revert "[skip ci]" on the release commit — it blocks the PR merge ([ec7e328](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/ec7e328be74bebfd322b0b64e5dd990dc7ad9c57))
|
|
8
|
+
* **ci:** skip CI for the auto-generated release commit ([8b8e1e5](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/8b8e1e542af780a657ba480085b63e2cc53f9a88))
|
|
9
|
+
* **ci:** stop e2e job from reusing a poisoned mongodb-memory-server binary cache ([fa03d8f](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/fa03d8f00c37a8f67fe936545e73aaa1295b25c0))
|
|
10
|
+
* **ci:** stop npm publish from re-running a broken build inside dist/ ([2bcc32c](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/2bcc32c60e590c7e9eed4921ac848e4adb4a89c9))
|
|
11
|
+
|
|
12
|
+
### quality
|
|
13
|
+
|
|
14
|
+
* **quality:** replace cascade boolean-flag method with two methods (S2301) ([526f23b](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/526f23b4b6ce4362381c75b58d225575adeb2dfd))
|
|
15
|
+
* **quality:** resolve 11 SonarCloud leak-period issues on develop ([aed6dda](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/aed6ddad3eeb3f5c40fef2d30973322d89303818))
|
|
16
|
+
|
|
17
|
+
### schematics
|
|
18
|
+
|
|
19
|
+
* **schematics:** add Nest CLI resource schematic ([978e9df](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/978e9dfb5a313565172c57de7e251c07dee2ad35))
|
|
20
|
+
|
|
21
|
+
### routes
|
|
22
|
+
|
|
23
|
+
* **routes:** add opt-in per-route audit log ([9321fec](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/9321fecad59fa34356f87946e88f7389d0662503))
|
|
24
|
+
* **routes:** add populate to GetOne/GetMany route config ([d5462ef](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/d5462effb48651dff2554ac27ec255826460edb9))
|
|
25
|
+
|
|
26
|
+
### cascade
|
|
27
|
+
|
|
28
|
+
* **cascade:** wrap cascade deletes in a MongoDB transaction ([d3991aa](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/d3991aa9fb244acdea65eb8cf2a0bed98841cff4))
|
|
29
|
+
|
|
30
|
+
### auth
|
|
31
|
+
|
|
32
|
+
* **auth:** add mintTokenPair for issuing tokens outside /auth/login ([747392b](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/747392b16230d5ebc6d25d8d6db5464ed7903d4c))
|
|
33
|
+
* **auth:** add per-route rate limiting for sensitive auth routes ([282c93c](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/282c93cf377baed45eca4df99253c64f5481f421))
|
|
34
|
+
|
|
35
|
+
### testing
|
|
36
|
+
|
|
37
|
+
* **testing:** add createDynamicApiTestingApp with in-memory MongoDB ([9fdd4e1](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/9fdd4e1e6a120e387d78a6870bfd27f21dff2230))
|
|
38
|
+
|
|
39
|
+
### health
|
|
40
|
+
|
|
41
|
+
* **health:** add DynamicApiHealthModule readiness probe ([1e96eb9](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/1e96eb948ae69fa8df0616c5f803b7fcfa1ee37d))
|
|
42
|
+
|
|
43
|
+
### helpers
|
|
44
|
+
|
|
45
|
+
* **helpers:** add enableDynamicAPIIndexSync with actionable E11000 errors ([cb756c8](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/cb756c877bd9dfdcd81fc99d9601894e4a9843d5))
|
|
46
|
+
|
|
47
|
+
### guards
|
|
48
|
+
|
|
49
|
+
* **guards:** log the real rejection reason of DynamicApiJwtAuthGuard ([a609b27](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/a609b270d38269f3e1984ae24ae430e3072d9d65))
|
|
50
|
+
|
|
51
|
+
## [4.20.0](https://github.com/MikeDev75015/mongodb-dynamic-api/compare/v4.19.0...v4.20.0) (2026-08-16)
|
|
52
|
+
|
|
53
|
+
### ci
|
|
54
|
+
|
|
55
|
+
* **ci:** skip CI for the auto-generated release commit ([8b8e1e5](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/8b8e1e542af780a657ba480085b63e2cc53f9a88))
|
|
56
|
+
* **ci:** stop e2e job from reusing a poisoned mongodb-memory-server binary cache ([fa03d8f](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/fa03d8f00c37a8f67fe936545e73aaa1295b25c0))
|
|
57
|
+
* **ci:** stop npm publish from re-running a broken build inside dist/ ([2bcc32c](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/2bcc32c60e590c7e9eed4921ac848e4adb4a89c9))
|
|
58
|
+
|
|
59
|
+
### quality
|
|
60
|
+
|
|
61
|
+
* **quality:** replace cascade boolean-flag method with two methods (S2301) ([526f23b](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/526f23b4b6ce4362381c75b58d225575adeb2dfd))
|
|
62
|
+
* **quality:** resolve 11 SonarCloud leak-period issues on develop ([aed6dda](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/aed6ddad3eeb3f5c40fef2d30973322d89303818))
|
|
63
|
+
|
|
64
|
+
### schematics
|
|
65
|
+
|
|
66
|
+
* **schematics:** add Nest CLI resource schematic ([978e9df](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/978e9dfb5a313565172c57de7e251c07dee2ad35))
|
|
67
|
+
|
|
68
|
+
### routes
|
|
69
|
+
|
|
70
|
+
* **routes:** add opt-in per-route audit log ([9321fec](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/9321fecad59fa34356f87946e88f7389d0662503))
|
|
71
|
+
* **routes:** add populate to GetOne/GetMany route config ([d5462ef](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/d5462effb48651dff2554ac27ec255826460edb9))
|
|
72
|
+
|
|
73
|
+
### cascade
|
|
74
|
+
|
|
75
|
+
* **cascade:** wrap cascade deletes in a MongoDB transaction ([d3991aa](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/d3991aa9fb244acdea65eb8cf2a0bed98841cff4))
|
|
76
|
+
|
|
77
|
+
### auth
|
|
78
|
+
|
|
79
|
+
* **auth:** add mintTokenPair for issuing tokens outside /auth/login ([747392b](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/747392b16230d5ebc6d25d8d6db5464ed7903d4c))
|
|
80
|
+
* **auth:** add per-route rate limiting for sensitive auth routes ([282c93c](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/282c93cf377baed45eca4df99253c64f5481f421))
|
|
81
|
+
|
|
82
|
+
### testing
|
|
83
|
+
|
|
84
|
+
* **testing:** add createDynamicApiTestingApp with in-memory MongoDB ([9fdd4e1](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/9fdd4e1e6a120e387d78a6870bfd27f21dff2230))
|
|
85
|
+
|
|
86
|
+
### health
|
|
87
|
+
|
|
88
|
+
* **health:** add DynamicApiHealthModule readiness probe ([1e96eb9](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/1e96eb948ae69fa8df0616c5f803b7fcfa1ee37d))
|
|
89
|
+
|
|
90
|
+
### helpers
|
|
91
|
+
|
|
92
|
+
* **helpers:** add enableDynamicAPIIndexSync with actionable E11000 errors ([cb756c8](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/cb756c877bd9dfdcd81fc99d9601894e4a9843d5))
|
|
93
|
+
|
|
94
|
+
### guards
|
|
95
|
+
|
|
96
|
+
* **guards:** log the real rejection reason of DynamicApiJwtAuthGuard ([a609b27](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/a609b270d38269f3e1984ae24ae430e3072d9d65))
|
|
97
|
+
|
|
98
|
+
## [4.19.0](https://github.com/MikeDev75015/mongodb-dynamic-api/compare/v4.17.0...v4.19.0) (2026-08-16)
|
|
99
|
+
|
|
100
|
+
### quality
|
|
101
|
+
|
|
102
|
+
* **quality:** replace cascade boolean-flag method with two methods (S2301) ([0b4294e](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/0b4294e7f721c52c1ae01ff3f24a583a0e7b6b1f))
|
|
103
|
+
* **quality:** resolve 11 SonarCloud leak-period issues on develop ([7543eee](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/7543eeeaa64c12d68a8261b14881ac9844e3bd7d))
|
|
104
|
+
|
|
105
|
+
### ci
|
|
106
|
+
|
|
107
|
+
* **ci:** stop e2e job from reusing a poisoned mongodb-memory-server binary cache ([9fc307c](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/9fc307cfac4c9d6c388cbcf4da18d3f3f8d701db))
|
|
108
|
+
|
|
109
|
+
### schematics
|
|
110
|
+
|
|
111
|
+
* **schematics:** add Nest CLI resource schematic ([a75d28b](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/a75d28b64288c54d61dd30955b631cb3c437231f))
|
|
112
|
+
|
|
113
|
+
### routes
|
|
114
|
+
|
|
115
|
+
* **routes:** add opt-in per-route audit log ([50bb97b](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/50bb97b1888ded816b664207c8ef1f19140188f6))
|
|
116
|
+
* **routes:** add populate to GetOne/GetMany route config ([b0c3d7e](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/b0c3d7ea92a5ae91b476b6e540911ffebad4622e))
|
|
117
|
+
* **routes:** merge the :id route param into UpdateOne's body before validation ([26bbf26](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/26bbf261c2fd306c8d094b54feb28a7446dd5d50))
|
|
118
|
+
* **routes:** return 400 instead of 500 on invalid *Many input ([c92c708](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/c92c708cee36a5336c185eb881348b05e8af7ea5))
|
|
119
|
+
|
|
120
|
+
### cascade
|
|
121
|
+
|
|
122
|
+
* **cascade:** wrap cascade deletes in a MongoDB transaction ([34b375a](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/34b375a9fdf98ef213bc308823d1275bb78e2553))
|
|
123
|
+
|
|
124
|
+
### auth
|
|
125
|
+
|
|
126
|
+
* **auth:** add mintTokenPair for issuing tokens outside /auth/login ([8f874cb](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/8f874cba850955ae44537315ff5ac75dc2ec28ee))
|
|
127
|
+
* **auth:** add per-route rate limiting for sensitive auth routes ([1db6bf6](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/1db6bf6eee5620c76f9046ba9ae897d61ca202c4))
|
|
128
|
+
* **auth:** strip DB-aware business validators from the generated login DTO ([1794b47](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/1794b473d1a70d57814b7b45d6f7ebc39880865b))
|
|
129
|
+
|
|
130
|
+
### testing
|
|
131
|
+
|
|
132
|
+
* **testing:** add createDynamicApiTestingApp with in-memory MongoDB ([82e11d7](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/82e11d788bcf3e406b3d55a9f38fafb47ea3268d))
|
|
133
|
+
|
|
134
|
+
### health
|
|
135
|
+
|
|
136
|
+
* **health:** add DynamicApiHealthModule readiness probe ([5cc364b](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/5cc364b7c83a5a593799fe1528bc0248b06079de))
|
|
137
|
+
|
|
138
|
+
### helpers
|
|
139
|
+
|
|
140
|
+
* **helpers:** add enableDynamicAPIIndexSync with actionable E11000 errors ([ea532b9](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/ea532b946c916b0fecc9298c5cdb930ff30e5264))
|
|
141
|
+
|
|
142
|
+
### guards
|
|
143
|
+
|
|
144
|
+
* **guards:** log the real rejection reason of DynamicApiJwtAuthGuard ([5a14de0](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/5a14de0492efb4c9a62869aa974acbf4474ea1c3))
|
|
145
|
+
|
|
146
|
+
### predicates
|
|
147
|
+
|
|
148
|
+
* **predicates:** coercion, fallback fields and custom compare for isOwner/isGroupMember ([dc391ef](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/dc391ef9e388ccbf12b97dcda71b7f28c1b2b9eb))
|
|
149
|
+
* **predicates:** guard identifiersMatch's String() fallback against plain objects ([9ac365b](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/9ac365b6d0d172499b0821497acbd09f31e363a1))
|
|
150
|
+
* **predicates:** narrow identifiersMatch's operands to a stringifiable type ([7c8030d](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/7c8030d9310757f19b0b806e554050fbdfa3ad28))
|
|
151
|
+
|
|
152
|
+
### broadcast
|
|
153
|
+
|
|
154
|
+
* **broadcast:** catch a throwing resolveBroadcast() in broadcastFromHttp/broadcastIfNeeded ([582e7fb](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/582e7fbbe377a364c591b9895e96bf2fb2331ade))
|
|
155
|
+
|
|
156
|
+
### validators
|
|
157
|
+
|
|
158
|
+
* **validators:** guard IsUnique/EntityExists against malformed ObjectIds ([8c5096e](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/8c5096e70a3a63c59d9fb94784231f92e107745e))
|
|
159
|
+
|
|
160
|
+
## [4.18.0](https://github.com/MikeDev75015/mongodb-dynamic-api/compare/v4.17.0...v4.18.0) (2026-08-13)
|
|
161
|
+
|
|
162
|
+
### predicates
|
|
163
|
+
|
|
164
|
+
* **predicates:** coercion, fallback fields and custom compare for isOwner/isGroupMember ([dc391ef](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/dc391ef9e388ccbf12b97dcda71b7f28c1b2b9eb))
|
|
165
|
+
* **predicates:** guard identifiersMatch's String() fallback against plain objects ([9ac365b](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/9ac365b6d0d172499b0821497acbd09f31e363a1))
|
|
166
|
+
* **predicates:** narrow identifiersMatch's operands to a stringifiable type ([7c8030d](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/7c8030d9310757f19b0b806e554050fbdfa3ad28))
|
|
167
|
+
|
|
168
|
+
### routes
|
|
169
|
+
|
|
170
|
+
* **routes:** merge the :id route param into UpdateOne's body before validation ([26bbf26](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/26bbf261c2fd306c8d094b54feb28a7446dd5d50))
|
|
171
|
+
* **routes:** return 400 instead of 500 on invalid *Many input ([c92c708](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/c92c708cee36a5336c185eb881348b05e8af7ea5))
|
|
172
|
+
|
|
173
|
+
### broadcast
|
|
174
|
+
|
|
175
|
+
* **broadcast:** catch a throwing resolveBroadcast() in broadcastFromHttp/broadcastIfNeeded ([582e7fb](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/582e7fbbe377a364c591b9895e96bf2fb2331ade))
|
|
176
|
+
|
|
177
|
+
### validators
|
|
178
|
+
|
|
179
|
+
* **validators:** guard IsUnique/EntityExists against malformed ObjectIds ([8c5096e](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/8c5096e70a3a63c59d9fb94784231f92e107745e))
|
|
180
|
+
|
|
181
|
+
### auth
|
|
182
|
+
|
|
183
|
+
* **auth:** strip DB-aware business validators from the generated login DTO ([1794b47](https://github.com/MikeDev75015/mongodb-dynamic-api/commit/1794b473d1a70d57814b7b45d6f7ebc39880865b))
|
|
184
|
+
|
|
3
185
|
## [4.17.0](https://github.com/MikeDev75015/mongodb-dynamic-api/compare/v4.15.0...v4.17.0) (2026-08-12)
|
|
4
186
|
|
|
5
187
|
### routes
|
package/README.md
CHANGED
|
@@ -256,7 +256,7 @@ Register `UsersModule` in `AppModule`, run `npm run start:dev` — your API is l
|
|
|
256
256
|
|:--------|:------------|:-----:|
|
|
257
257
|
| 🗂️ **Entities** | `BaseEntity`, `SoftDeletableEntity`, timestamps, JSON transform | [View](https://github.com/MikeDev75015/mongodb-dynamic-api/blob/main/README/entities.md) |
|
|
258
258
|
| 🗃️ **Schema Options** | Indexes, lifecycle hooks, custom schema initialization | [View](https://github.com/MikeDev75015/mongodb-dynamic-api/blob/main/README/schema-options.md) |
|
|
259
|
-
| 🔐 **Authentication** | Dual-token JWT, 8 endpoints, cookie mode, revocation, OTP ⭐ | [View](https://github.com/MikeDev75015/mongodb-dynamic-api/blob/main/README/authentication.md) |
|
|
259
|
+
| 🔐 **Authentication** | Dual-token JWT, 8 endpoints, cookie mode, revocation, OTP, per-route rate limiting ⭐ | [View](https://github.com/MikeDev75015/mongodb-dynamic-api/blob/main/README/authentication.md) |
|
|
260
260
|
| 🛡️ **Authorization** | Ability predicates, `filter` vs `throw` mode | [View](https://github.com/MikeDev75015/mongodb-dynamic-api/blob/main/README/authorization.md) |
|
|
261
261
|
| ⚡ **Caching** | Global cache, auto-purge endpoint, `disableCache` option ⭐ | [View](https://github.com/MikeDev75015/mongodb-dynamic-api/blob/main/README/caching.md) |
|
|
262
262
|
| ✅ **Validation** | `class-validator`, global + per-route `ValidationPipe`, DB-aware `@IsUnique`/`@EntityExists` ⭐ | [View](https://github.com/MikeDev75015/mongodb-dynamic-api/blob/main/README/validation.md) |
|
|
@@ -265,9 +265,12 @@ Register `UsersModule` in `AppModule`, run `npm run start:dev` — your API is l
|
|
|
265
265
|
| 🔁 **Callbacks** | `beforeSave`, `afterSave`, `beforeDelete`, typed contexts ⭐ | [View](https://github.com/MikeDev75015/mongodb-dynamic-api/blob/main/README/callbacks.md) |
|
|
266
266
|
| 🔄 **Versioning** | URI-based API versioning | [View](https://github.com/MikeDev75015/mongodb-dynamic-api/blob/main/README/versioning.md) |
|
|
267
267
|
| 📚 **Swagger UI** | Auto-generated OpenAPI docs, visibility decorators | [View](https://github.com/MikeDev75015/mongodb-dynamic-api/blob/main/README/swagger-ui.md) |
|
|
268
|
-
| 🗂️ **Route Config** | DTOs, cascade delete, predicates, subPath, interceptors ⭐ | [View](https://github.com/MikeDev75015/mongodb-dynamic-api/blob/main/README/route-config.md) |
|
|
268
|
+
| 🗂️ **Route Config** | DTOs, cascade delete (atomic ⭐), predicates, subPath, interceptors, `populate`, `auditLog` ⭐ *New* | [View](https://github.com/MikeDev75015/mongodb-dynamic-api/blob/main/README/route-config.md) |
|
|
269
269
|
| 🎛️ **Controller Config** | `forFeature` options, `customRoutes`, `extraProviders` ⭐ | [View](https://github.com/MikeDev75015/mongodb-dynamic-api/blob/main/README/controller-config.md) |
|
|
270
270
|
| 🐞 **Debugging** | `MONGODB_DYNAMIC_API_LOGGER` levels, WS debug mode, where each log comes from ⭐ | [View](https://github.com/MikeDev75015/mongodb-dynamic-api/blob/main/README/debugging.md) |
|
|
271
|
+
| 🩺 **Health Check** | `GET /health` readiness probe, `DynamicApiHealthModule` ⭐ *New* | [View](https://github.com/MikeDev75015/mongodb-dynamic-api/blob/main/README/health-check.md) |
|
|
272
|
+
| 🧪 **Testing** | `createDynamicApiTestingApp`, in-memory MongoDB, zero Docker ⭐ *New* | [View](https://github.com/MikeDev75015/mongodb-dynamic-api/blob/main/README/testing.md) |
|
|
273
|
+
| 🏗️ **Schematics** | `nest g -c mongodb-dynamic-api resource <name>` — scaffold entity + module in one command ⭐ *New* | [View](https://github.com/MikeDev75015/mongodb-dynamic-api/blob/main/README/schematics.md) |
|
|
271
274
|
|
|
272
275
|
> [!NOTE]
|
|
273
276
|
> **Key reminders:**
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mongodb-dynamic-api",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.21.0",
|
|
4
4
|
"description": "Auto generated CRUD API for MongoDB using NestJS",
|
|
5
5
|
"readmeFilename": "README.md",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"types": "index.d.ts",
|
|
8
|
+
"schematics": "./schematics/collection.json",
|
|
8
9
|
"scripts": {
|
|
9
|
-
"
|
|
10
|
-
"build": "tsc",
|
|
10
|
+
"build": "tsc && tsc -p tsconfig.schematics.json && node scripts/copy-schematics-assets.cjs",
|
|
11
11
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
12
12
|
"lint": "tslint -p tsconfig.json -c tslint.json",
|
|
13
13
|
"test": "jest --runInBand",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"homepage": "https://mikedev75015.github.io",
|
|
42
42
|
"dependencies": {
|
|
43
|
+
"@angular-devkit/schematics": "^19.2.27",
|
|
43
44
|
"@nestjs/cache-manager": "^3.0.1",
|
|
44
45
|
"@nestjs/common": "^11.1.13",
|
|
45
46
|
"@nestjs/core": "11.1.18",
|
|
@@ -72,6 +73,7 @@
|
|
|
72
73
|
"@nestjs/cli": "^11.0.16",
|
|
73
74
|
"@nestjs/schematics": "^11.0.9",
|
|
74
75
|
"@nestjs/testing": "^11.1.16",
|
|
76
|
+
"@nestjs/throttler": "^6.5.0",
|
|
75
77
|
"@release-it/bumper": "^7.0.5",
|
|
76
78
|
"@release-it/conventional-changelog": "^11.0.0",
|
|
77
79
|
"@swc/cli": "^0.3.9",
|
|
@@ -94,6 +96,7 @@
|
|
|
94
96
|
"jest-mock-extended": "^3.0.5",
|
|
95
97
|
"jest-sonar-reporter": "^2.0.0",
|
|
96
98
|
"lcov-result-merger": "^5.0.1",
|
|
99
|
+
"mongodb-memory-server": "^11.2.0",
|
|
97
100
|
"prettier": "^3.2.5",
|
|
98
101
|
"release-it": "^20.0.1",
|
|
99
102
|
"source-map-support": "^0.5.21",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../node_modules/@angular-devkit/schematics/collection-schema.json",
|
|
3
|
+
"schematics": {
|
|
4
|
+
"resource": {
|
|
5
|
+
"description": "Generate a mongodb-dynamic-api entity + module (CRUD scaffolding)",
|
|
6
|
+
"factory": "./resource/index#resource",
|
|
7
|
+
"schema": "./resource/schema.json",
|
|
8
|
+
"aliases": ["res"]
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Prop, Schema } from '@nestjs/mongoose';
|
|
2
|
+
import { <%= softDelete ? 'SoftDeletableEntity' : 'BaseEntity' %> } from 'mongodb-dynamic-api';
|
|
3
|
+
|
|
4
|
+
@Schema({ collection: '<%= dasherize(name) %>' })
|
|
5
|
+
export class <%= classify(name) %> extends <%= softDelete ? 'SoftDeletableEntity' : 'BaseEntity' %> {
|
|
6
|
+
// TODO: declare your entity's fields here, e.g.:
|
|
7
|
+
// @Prop({ type: String, required: true })
|
|
8
|
+
// title: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Module } from '@nestjs/common';
|
|
2
|
+
import { DynamicApiModule } from 'mongodb-dynamic-api';
|
|
3
|
+
import { <%= classify(name) %> } from './<%= dasherize(name) %>.entity';
|
|
4
|
+
|
|
5
|
+
@Module({
|
|
6
|
+
imports: [
|
|
7
|
+
DynamicApiModule.forFeature({
|
|
8
|
+
entity: <%= classify(name) %>,
|
|
9
|
+
controllerOptions: { path: '<%= dasherize(name) %>' },
|
|
10
|
+
}),
|
|
11
|
+
],
|
|
12
|
+
})
|
|
13
|
+
export class <%= classify(name) %>Module {}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveDestination = resolveDestination;
|
|
4
|
+
exports.resource = resource;
|
|
5
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
6
|
+
function classify(input) {
|
|
7
|
+
return input
|
|
8
|
+
.replace(/[-_\s]+(.)?/g, (_match, chr) => (chr ? chr.toUpperCase() : ''))
|
|
9
|
+
.replace(/^(.)/, (chr) => chr.toUpperCase());
|
|
10
|
+
}
|
|
11
|
+
function dasherize(input) {
|
|
12
|
+
return input
|
|
13
|
+
.replace(/([a-z0-9])([A-Z])/g, '$1-$2')
|
|
14
|
+
.replace(/[\s_]+/g, '-')
|
|
15
|
+
.toLowerCase();
|
|
16
|
+
}
|
|
17
|
+
function resolveDestination(options) {
|
|
18
|
+
const basePath = options.path ?? 'src';
|
|
19
|
+
return options.flat ? basePath : `${basePath}/${dasherize(options.name)}`;
|
|
20
|
+
}
|
|
21
|
+
function resource(options) {
|
|
22
|
+
if (!options.name) {
|
|
23
|
+
throw new schematics_1.SchematicsException('name option is required.');
|
|
24
|
+
}
|
|
25
|
+
const destination = resolveDestination(options);
|
|
26
|
+
const templateSource = (0, schematics_1.apply)((0, schematics_1.url)('./files'), [
|
|
27
|
+
(0, schematics_1.applyTemplates)({
|
|
28
|
+
classify,
|
|
29
|
+
dasherize,
|
|
30
|
+
name: options.name,
|
|
31
|
+
softDelete: !!options.softDelete,
|
|
32
|
+
}),
|
|
33
|
+
(0, schematics_1.move)(destination),
|
|
34
|
+
]);
|
|
35
|
+
return (0, schematics_1.mergeWith)(templateSource);
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../libs/schematics/resource/index.ts"],"names":[],"mappings":";;AAoCA,gDAGC;AAOD,4BAkBC;AAhED,2DAAoH;AAapH,SAAS,QAAQ,CAAC,KAAa;IAC7B,OAAO,KAAK;SACX,OAAO,CAAC,cAAc,EAAE,CAAC,MAAM,EAAE,GAAuB,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;SAC5F,OAAO,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC;AAC/C,CAAC;AAMD,SAAS,SAAS,CAAC,KAAa;IAC9B,OAAO,KAAK;SACX,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC;SACtC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC;SACvB,WAAW,EAAE,CAAC;AACjB,CAAC;AAQD,SAAgB,kBAAkB,CAAC,OAAwB;IACzD,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,IAAI,KAAK,CAAC;IACvC,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,IAAI,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;AAC5E,CAAC;AAOD,SAAgB,QAAQ,CAAC,OAAwB;IAC/C,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QAClB,MAAM,IAAI,gCAAmB,CAAC,0BAA0B,CAAC,CAAC;IAC5D,CAAC;IAED,MAAM,WAAW,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAEhD,MAAM,cAAc,GAAG,IAAA,kBAAK,EAAC,IAAA,gBAAG,EAAC,SAAS,CAAC,EAAE;QAC3C,IAAA,2BAAc,EAAC;YACb,QAAQ;YACR,SAAS;YACT,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU;SACjC,CAAC;QACF,IAAA,iBAAI,EAAC,WAAW,CAAC;KAClB,CAAC,CAAC;IAEH,OAAO,IAAA,sBAAS,EAAC,cAAc,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
+
"$id": "MongodbDynamicApiResource",
|
|
4
|
+
"title": "Mongodb Dynamic Api Resource Options",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"name": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "The name of the resource (e.g. 'user', 'blog-post').",
|
|
10
|
+
"$default": {
|
|
11
|
+
"$source": "argv",
|
|
12
|
+
"index": 0
|
|
13
|
+
},
|
|
14
|
+
"x-prompt": "What name would you like to use for the resource?"
|
|
15
|
+
},
|
|
16
|
+
"path": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "The path at which to create the resource, relative to the current working directory.",
|
|
19
|
+
"default": "src"
|
|
20
|
+
},
|
|
21
|
+
"flat": {
|
|
22
|
+
"type": "boolean",
|
|
23
|
+
"description": "Do not create a subdirectory for the resource's files.",
|
|
24
|
+
"default": false
|
|
25
|
+
},
|
|
26
|
+
"softDelete": {
|
|
27
|
+
"type": "boolean",
|
|
28
|
+
"description": "Extend SoftDeletableEntity instead of BaseEntity.",
|
|
29
|
+
"default": false,
|
|
30
|
+
"alias": "soft-delete"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"required": ["name"]
|
|
34
|
+
}
|