@n1k1t/mock-server 0.1.0 → 0.1.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.
- package/.vscode/settings.json +3 -0
- package/README.md +55 -28
- package/bin/index.ts +31 -0
- package/lib/bin/index.d.ts +2 -0
- package/lib/bin/index.d.ts.map +1 -0
- package/lib/{src/cli.js → bin/index.js} +13 -15
- package/lib/bin/index.js.map +1 -0
- package/lib/package.json +4 -3
- package/lib/src/client/errors/connection.error.js +1 -1
- package/lib/src/client/errors/connection.error.js.map +1 -1
- package/lib/src/client/errors/validation.error.d.ts.map +1 -1
- package/lib/src/client/helpers/expectations.d.ts +91 -0
- package/lib/src/client/helpers/expectations.d.ts.map +1 -0
- package/lib/src/client/helpers/expectations.js +66 -0
- package/lib/src/client/helpers/expectations.js.map +1 -0
- package/lib/src/client/helpers/index.d.ts +2 -0
- package/lib/src/client/helpers/index.d.ts.map +1 -0
- package/lib/src/client/helpers/index.js +18 -0
- package/lib/src/client/helpers/index.js.map +1 -0
- package/lib/src/client/index.d.ts +4 -7
- package/lib/src/client/index.d.ts.map +1 -1
- package/lib/src/client/index.js +4 -41
- package/lib/src/client/index.js.map +1 -1
- package/lib/src/client/methods/expectations.create.method.d.ts +4 -0
- package/lib/src/client/methods/expectations.create.method.d.ts.map +1 -0
- package/lib/src/client/methods/expectations.create.method.js +29 -0
- package/lib/src/client/methods/expectations.create.method.js.map +1 -0
- package/lib/src/client/methods/expectations.delete.method.d.ts +6 -0
- package/lib/src/client/methods/expectations.delete.method.d.ts.map +1 -0
- package/lib/src/client/methods/expectations.delete.method.js +26 -0
- package/lib/src/client/methods/expectations.delete.method.js.map +1 -0
- package/lib/src/client/methods/expectations.update.method.d.ts +8 -0
- package/lib/src/client/methods/expectations.update.method.d.ts.map +1 -0
- package/lib/src/client/methods/expectations.update.method.js +44 -0
- package/lib/src/client/methods/expectations.update.method.js.map +1 -0
- package/lib/src/client/methods/index.d.ts +4 -1
- package/lib/src/client/methods/index.d.ts.map +1 -1
- package/lib/src/client/methods/index.js +11 -14
- package/lib/src/client/methods/index.js.map +1 -1
- package/lib/src/client/methods/ping.method.d.ts +4 -0
- package/lib/src/client/methods/ping.method.d.ts.map +1 -0
- package/lib/src/client/methods/ping.method.js +22 -0
- package/lib/src/client/methods/ping.method.js.map +1 -0
- package/lib/src/client/models/client.d.ts +40 -0
- package/lib/src/client/models/client.d.ts.map +1 -0
- package/lib/src/client/models/client.js +33 -0
- package/lib/src/client/models/client.js.map +1 -0
- package/lib/src/client/models/client.spec.d.ts +2 -0
- package/lib/src/client/models/client.spec.d.ts.map +1 -0
- package/lib/src/client/models/client.spec.js +219 -0
- package/lib/src/client/models/client.spec.js.map +1 -0
- package/lib/src/client/models/index.d.ts +3 -0
- package/lib/src/client/models/index.d.ts.map +1 -0
- package/lib/src/client/models/index.js +19 -0
- package/lib/src/client/models/index.js.map +1 -0
- package/lib/src/client/models/method.d.ts +17 -0
- package/lib/src/client/models/method.d.ts.map +1 -0
- package/lib/src/client/models/method.js +25 -0
- package/lib/src/client/models/method.js.map +1 -0
- package/lib/src/client/onsite.d.ts +7 -0
- package/lib/src/client/onsite.d.ts.map +1 -0
- package/lib/src/client/onsite.js +44 -0
- package/lib/src/client/onsite.js.map +1 -0
- package/lib/src/client/remote.d.ts +8 -0
- package/lib/src/client/remote.d.ts.map +1 -0
- package/lib/src/client/remote.js +52 -0
- package/lib/src/client/remote.js.map +1 -0
- package/lib/src/client/types.d.ts +19 -1
- package/lib/src/client/types.d.ts.map +1 -1
- package/lib/src/client/utils.d.ts +4 -3
- package/lib/src/client/utils.d.ts.map +1 -1
- package/lib/src/client/utils.js +36 -3
- package/lib/src/client/utils.js.map +1 -1
- package/lib/src/config/index.d.ts +9 -6
- package/lib/src/config/index.d.ts.map +1 -1
- package/lib/src/config/index.js +8 -7
- package/lib/src/config/index.js.map +1 -1
- package/lib/src/expectations/__utils__/index.d.ts +3 -0
- package/lib/src/expectations/__utils__/index.d.ts.map +1 -0
- package/lib/src/expectations/__utils__/index.js +44 -0
- package/lib/src/expectations/__utils__/index.js.map +1 -0
- package/lib/src/expectations/errors/index.d.ts.map +1 -0
- package/lib/src/expectations/errors/index.js.map +1 -0
- package/lib/src/expectations/index.d.ts +4 -0
- package/lib/src/expectations/index.d.ts.map +1 -0
- package/lib/src/{server/expectations → expectations}/index.js +1 -2
- package/lib/src/expectations/index.js.map +1 -0
- package/lib/src/expectations/models/expectation.d.ts +35 -0
- package/lib/src/expectations/models/expectation.d.ts.map +1 -0
- package/lib/src/expectations/models/expectation.js +113 -0
- package/lib/src/expectations/models/expectation.js.map +1 -0
- package/lib/src/expectations/models/index.d.ts +4 -0
- package/lib/src/expectations/models/index.d.ts.map +1 -0
- package/lib/src/expectations/models/index.js +20 -0
- package/lib/src/expectations/models/index.js.map +1 -0
- package/lib/src/expectations/models/operator.d.ts +20 -0
- package/lib/src/expectations/models/operator.d.ts.map +1 -0
- package/lib/src/expectations/models/operator.js +41 -0
- package/lib/src/expectations/models/operator.js.map +1 -0
- package/lib/src/expectations/models/storage.d.ts +15 -0
- package/lib/src/expectations/models/storage.d.ts.map +1 -0
- package/lib/src/{server/expectations → expectations/models}/storage.js +4 -14
- package/lib/src/expectations/models/storage.js.map +1 -0
- package/lib/src/expectations/models/storage.spec.d.ts +2 -0
- package/lib/src/expectations/models/storage.spec.d.ts.map +1 -0
- package/lib/src/expectations/models/storage.spec.js +111 -0
- package/lib/src/expectations/models/storage.spec.js.map +1 -0
- package/lib/src/expectations/operators/and.operator.d.ts +8 -0
- package/lib/src/expectations/operators/and.operator.d.ts.map +1 -0
- package/lib/src/expectations/operators/and.operator.js +24 -0
- package/lib/src/expectations/operators/and.operator.js.map +1 -0
- package/lib/src/expectations/operators/and.operator.spec.d.ts.map +1 -0
- package/lib/src/expectations/operators/and.operator.spec.js +73 -0
- package/lib/src/expectations/operators/and.operator.spec.js.map +1 -0
- package/lib/src/expectations/operators/exec.operator.d.ts +8 -0
- package/lib/src/expectations/operators/exec.operator.d.ts.map +1 -0
- package/lib/src/expectations/operators/exec.operator.js +18 -0
- package/lib/src/expectations/operators/exec.operator.js.map +1 -0
- package/lib/src/expectations/operators/exec.operator.spec.d.ts.map +1 -0
- package/lib/src/expectations/operators/exec.operator.spec.js +58 -0
- package/lib/src/expectations/operators/exec.operator.spec.js.map +1 -0
- package/lib/src/expectations/operators/has.operator.d.ts +28 -0
- package/lib/src/expectations/operators/has.operator.d.ts.map +1 -0
- package/lib/src/expectations/operators/has.operator.js +119 -0
- package/lib/src/expectations/operators/has.operator.js.map +1 -0
- package/lib/src/expectations/operators/has.operator.spec.d.ts.map +1 -0
- package/lib/src/expectations/operators/has.operator.spec.js +434 -0
- package/lib/src/expectations/operators/has.operator.spec.js.map +1 -0
- package/lib/src/expectations/operators/if.operator.d.ts +16 -0
- package/lib/src/expectations/operators/if.operator.d.ts.map +1 -0
- package/lib/src/expectations/operators/if.operator.js +49 -0
- package/lib/src/expectations/operators/if.operator.js.map +1 -0
- package/lib/src/expectations/operators/if.operator.spec.d.ts.map +1 -0
- package/lib/src/expectations/operators/if.operator.spec.js +122 -0
- package/lib/src/expectations/operators/if.operator.spec.js.map +1 -0
- package/lib/src/{server/expectations → expectations}/operators/index.d.ts +2 -0
- package/lib/src/expectations/operators/index.d.ts.map +1 -0
- package/lib/src/{server/expectations → expectations}/operators/index.js +5 -1
- package/lib/src/expectations/operators/index.js.map +1 -0
- package/lib/src/expectations/operators/merge.operator.d.ts +14 -0
- package/lib/src/expectations/operators/merge.operator.d.ts.map +1 -0
- package/lib/src/expectations/operators/merge.operator.js +34 -0
- package/lib/src/expectations/operators/merge.operator.js.map +1 -0
- package/lib/src/expectations/operators/merge.operator.spec.d.ts.map +1 -0
- package/lib/src/expectations/operators/merge.operator.spec.js +65 -0
- package/lib/src/expectations/operators/merge.operator.spec.js.map +1 -0
- package/lib/src/expectations/operators/not.operator.d.ts +8 -0
- package/lib/src/expectations/operators/not.operator.d.ts.map +1 -0
- package/lib/src/expectations/operators/not.operator.js +24 -0
- package/lib/src/expectations/operators/not.operator.js.map +1 -0
- package/lib/src/expectations/operators/not.operator.spec.d.ts.map +1 -0
- package/lib/src/expectations/operators/not.operator.spec.js +36 -0
- package/lib/src/expectations/operators/not.operator.spec.js.map +1 -0
- package/lib/src/expectations/operators/or.operator.d.ts +8 -0
- package/lib/src/expectations/operators/or.operator.d.ts.map +1 -0
- package/lib/src/expectations/operators/or.operator.js +24 -0
- package/lib/src/expectations/operators/or.operator.js.map +1 -0
- package/lib/src/expectations/operators/or.operator.spec.d.ts.map +1 -0
- package/lib/src/expectations/operators/or.operator.spec.js +74 -0
- package/lib/src/expectations/operators/or.operator.spec.js.map +1 -0
- package/lib/src/expectations/operators/remove.operator.d.ts +13 -0
- package/lib/src/expectations/operators/remove.operator.d.ts.map +1 -0
- package/lib/src/expectations/operators/remove.operator.js +33 -0
- package/lib/src/expectations/operators/remove.operator.js.map +1 -0
- package/lib/src/expectations/operators/remove.operator.spec.d.ts.map +1 -0
- package/lib/src/expectations/operators/remove.operator.spec.js +57 -0
- package/lib/src/expectations/operators/remove.operator.spec.js.map +1 -0
- package/lib/src/expectations/operators/root.operator.d.ts +8 -0
- package/lib/src/expectations/operators/root.operator.d.ts.map +1 -0
- package/lib/src/expectations/operators/root.operator.js +36 -0
- package/lib/src/expectations/operators/root.operator.js.map +1 -0
- package/lib/src/expectations/operators/set.operator.d.ts +21 -0
- package/lib/src/expectations/operators/set.operator.d.ts.map +1 -0
- package/lib/src/expectations/operators/set.operator.js +56 -0
- package/lib/src/expectations/operators/set.operator.js.map +1 -0
- package/lib/src/expectations/operators/set.operator.spec.d.ts.map +1 -0
- package/lib/src/expectations/operators/set.operator.spec.js +101 -0
- package/lib/src/expectations/operators/set.operator.spec.js.map +1 -0
- package/lib/src/expectations/operators/switch.operator.d.ts +25 -0
- package/lib/src/expectations/operators/switch.operator.d.ts.map +1 -0
- package/lib/src/expectations/operators/switch.operator.js +68 -0
- package/lib/src/expectations/operators/switch.operator.js.map +1 -0
- package/lib/src/expectations/operators/switch.operator.spec.d.ts +2 -0
- package/lib/src/expectations/operators/switch.operator.spec.d.ts.map +1 -0
- package/lib/src/expectations/operators/switch.operator.spec.js +129 -0
- package/lib/src/expectations/operators/switch.operator.spec.js.map +1 -0
- package/lib/src/expectations/types.d.ts +86 -0
- package/lib/src/expectations/types.d.ts.map +1 -0
- package/lib/src/{server/expectations → expectations}/types.js +13 -2
- package/lib/src/expectations/types.js.map +1 -0
- package/lib/src/expectations/utils.d.ts +24 -0
- package/lib/src/expectations/utils.d.ts.map +1 -0
- package/lib/src/expectations/utils.js +119 -0
- package/lib/src/expectations/utils.js.map +1 -0
- package/lib/src/server/endpoints/config.get.endpoint.d.ts +9 -4
- package/lib/src/server/endpoints/config.get.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/config.get.endpoint.js +4 -7
- package/lib/src/server/endpoints/config.get.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/expectations.create.endpoint.d.ts +10 -12
- package/lib/src/server/endpoints/expectations.create.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/expectations.create.endpoint.js +4 -9
- package/lib/src/server/endpoints/expectations.create.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/expectations.delete.endpoint.d.ts +11 -8
- package/lib/src/server/endpoints/expectations.delete.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/expectations.delete.endpoint.js +4 -7
- package/lib/src/server/endpoints/expectations.delete.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/expectations.get-list.endpoint.d.ts +10 -5
- package/lib/src/server/endpoints/expectations.get-list.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/expectations.get-list.endpoint.js +4 -4
- package/lib/src/server/endpoints/expectations.get-list.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/expectations.update.endpoint.d.ts +14 -12
- package/lib/src/server/endpoints/expectations.update.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/expectations.update.endpoint.js +6 -21
- package/lib/src/server/endpoints/expectations.update.endpoint.js.map +1 -1
- package/lib/src/server/endpoints/history.get-list.endpoint.d.ts +27 -0
- package/lib/src/server/endpoints/history.get-list.endpoint.d.ts.map +1 -0
- package/lib/src/server/endpoints/history.get-list.endpoint.js +11 -0
- package/lib/src/server/endpoints/history.get-list.endpoint.js.map +1 -0
- package/lib/src/server/endpoints/index.d.ts +2 -3
- package/lib/src/server/endpoints/index.d.ts.map +1 -1
- package/lib/src/server/endpoints/index.js +5 -7
- package/lib/src/server/endpoints/index.js.map +1 -1
- package/lib/src/server/endpoints/ping.endpoint.d.ts +9 -4
- package/lib/src/server/endpoints/ping.endpoint.d.ts.map +1 -1
- package/lib/src/server/endpoints/ping.endpoint.js +3 -3
- package/lib/src/server/endpoints/ping.endpoint.js.map +1 -1
- package/lib/src/server/history/model.d.ts +16 -16
- package/lib/src/server/history/model.d.ts.map +1 -1
- package/lib/src/server/history/model.js +21 -6
- package/lib/src/server/history/model.js.map +1 -1
- package/lib/src/server/history/storage.d.ts +3 -4
- package/lib/src/server/history/storage.d.ts.map +1 -1
- package/lib/src/server/history/storage.js +7 -4
- package/lib/src/server/history/storage.js.map +1 -1
- package/lib/src/server/index.d.ts +15 -3
- package/lib/src/server/index.d.ts.map +1 -1
- package/lib/src/server/index.js +31 -32
- package/lib/src/server/index.js.map +1 -1
- package/lib/src/server/middlewares/add-history.middleware.d.ts +15 -5
- package/lib/src/server/middlewares/add-history.middleware.d.ts.map +1 -1
- package/lib/src/server/middlewares/add-history.middleware.js +7 -8
- package/lib/src/server/middlewares/add-history.middleware.js.map +1 -1
- package/lib/src/server/middlewares/destroy-request.midleware.d.ts +15 -5
- package/lib/src/server/middlewares/destroy-request.midleware.d.ts.map +1 -1
- package/lib/src/server/middlewares/destroy-request.midleware.js +6 -7
- package/lib/src/server/middlewares/destroy-request.midleware.js.map +1 -1
- package/lib/src/server/middlewares/handle-expectation-delay.middleware.d.ts +15 -5
- package/lib/src/server/middlewares/handle-expectation-delay.middleware.d.ts.map +1 -1
- package/lib/src/server/middlewares/handle-expectation-delay.middleware.js +3 -4
- package/lib/src/server/middlewares/handle-expectation-delay.middleware.js.map +1 -1
- package/lib/src/server/middlewares/handle-expectation-forward.middleware.d.ts +15 -5
- package/lib/src/server/middlewares/handle-expectation-forward.middleware.d.ts.map +1 -1
- package/lib/src/server/middlewares/handle-expectation-forward.middleware.js +33 -47
- package/lib/src/server/middlewares/handle-expectation-forward.middleware.js.map +1 -1
- package/lib/src/server/middlewares/index.d.ts +4 -4
- package/lib/src/server/middlewares/index.d.ts.map +1 -1
- package/lib/src/server/middlewares/index.js +9 -9
- package/lib/src/server/middlewares/index.js.map +1 -1
- package/lib/src/server/middlewares/internal-route.middleware.d.ts +15 -3
- package/lib/src/server/middlewares/internal-route.middleware.d.ts.map +1 -1
- package/lib/src/server/middlewares/internal-route.middleware.js +6 -5
- package/lib/src/server/middlewares/internal-route.middleware.js.map +1 -1
- package/lib/src/server/middlewares/match-expectation.middleware.d.ts +18 -0
- package/lib/src/server/middlewares/match-expectation.middleware.d.ts.map +1 -0
- package/lib/src/server/middlewares/match-expectation.middleware.js +20 -0
- package/lib/src/server/middlewares/match-expectation.middleware.js.map +1 -0
- package/lib/src/server/middlewares/reply.middleware.d.ts +15 -5
- package/lib/src/server/middlewares/reply.middleware.d.ts.map +1 -1
- package/lib/src/server/middlewares/reply.middleware.js +36 -27
- package/lib/src/server/middlewares/reply.middleware.js.map +1 -1
- package/lib/src/server/middlewares/resolve-public.middleware.d.ts +15 -3
- package/lib/src/server/middlewares/resolve-public.middleware.d.ts.map +1 -1
- package/lib/src/server/middlewares/resolve-public.middleware.js +14 -15
- package/lib/src/server/middlewares/resolve-public.middleware.js.map +1 -1
- package/lib/src/server/models/endpoint.d.ts +32 -0
- package/lib/src/server/models/endpoint.d.ts.map +1 -0
- package/lib/src/server/{endpoints/model.js → models/endpoint.js} +3 -3
- package/lib/src/server/models/endpoint.js.map +1 -0
- package/lib/src/server/models/index.d.ts +2 -0
- package/lib/src/server/models/index.d.ts.map +1 -1
- package/lib/src/server/models/index.js +2 -0
- package/lib/src/server/models/index.js.map +1 -1
- package/lib/src/server/models/middleware.d.ts +23 -0
- package/lib/src/server/models/middleware.d.ts.map +1 -0
- package/lib/src/server/{middlewares/model.js → models/middleware.js} +7 -11
- package/lib/src/server/models/middleware.js.map +1 -0
- package/lib/src/server/models/reply-service/index.d.ts +6 -6
- package/lib/src/server/models/reply-service/index.d.ts.map +1 -1
- package/lib/src/server/models/reply-service/index.js +24 -24
- package/lib/src/server/models/reply-service/index.js.map +1 -1
- package/lib/src/server/models/request-context/http.d.ts +42 -0
- package/lib/src/server/models/request-context/http.d.ts.map +1 -0
- package/lib/src/server/models/request-context/http.js +51 -0
- package/lib/src/server/models/request-context/http.js.map +1 -0
- package/lib/src/server/models/request-context/index.d.ts +4 -58
- package/lib/src/server/models/request-context/index.d.ts.map +1 -1
- package/lib/src/server/models/request-context/index.js +4 -57
- package/lib/src/server/models/request-context/index.js.map +1 -1
- package/lib/src/server/models/request-context/model.d.ts +13 -0
- package/lib/src/server/models/request-context/model.d.ts.map +1 -0
- package/lib/src/server/models/request-context/model.js +14 -0
- package/lib/src/server/models/request-context/model.js.map +1 -0
- package/lib/src/server/models/request-context/types.d.ts +14 -18
- package/lib/src/server/models/request-context/types.d.ts.map +1 -1
- package/lib/src/server/models/request-context/utils.d.ts +7 -3
- package/lib/src/server/models/request-context/utils.d.ts.map +1 -1
- package/lib/src/server/models/request-context/utils.js +48 -25
- package/lib/src/server/models/request-context/utils.js.map +1 -1
- package/lib/src/server/models/request-context/ws.d.ts +21 -0
- package/lib/src/server/models/request-context/ws.d.ts.map +1 -0
- package/lib/src/server/models/request-context/ws.js +22 -0
- package/lib/src/server/models/request-context/ws.js.map +1 -0
- package/lib/src/server/models/server-context.d.ts +26 -0
- package/lib/src/server/models/server-context.d.ts.map +1 -0
- package/lib/src/server/models/server-context.js +33 -0
- package/lib/src/server/models/server-context.js.map +1 -0
- package/lib/src/server/proxy.d.ts +0 -1
- package/lib/src/server/proxy.d.ts.map +1 -1
- package/lib/src/server/router.d.ts +4 -8
- package/lib/src/server/router.d.ts.map +1 -1
- package/lib/src/server/router.js +5 -12
- package/lib/src/server/router.js.map +1 -1
- package/lib/src/server/ws-exchange/index.d.ts +5 -0
- package/lib/src/server/ws-exchange/index.d.ts.map +1 -0
- package/lib/src/server/{web-socket-exchange → ws-exchange}/index.js +3 -3
- package/lib/src/server/ws-exchange/index.js.map +1 -0
- package/lib/src/server/ws-exchange/types.d.ts +12 -0
- package/lib/src/server/ws-exchange/types.d.ts.map +1 -0
- package/lib/src/server/ws-exchange/types.js.map +1 -0
- package/lib/src/types.d.ts +0 -3
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/utils/common.d.ts +4 -0
- package/lib/src/utils/common.d.ts.map +1 -0
- package/lib/src/utils/common.js +18 -0
- package/lib/src/utils/common.js.map +1 -0
- package/lib/src/utils/index.d.ts +4 -28
- package/lib/src/utils/index.d.ts.map +1 -1
- package/lib/src/utils/index.js +17 -46
- package/lib/src/utils/index.js.map +1 -1
- package/lib/src/utils/json.d.ts +26 -0
- package/lib/src/utils/json.d.ts.map +1 -0
- package/lib/src/utils/json.js +36 -0
- package/lib/src/utils/json.js.map +1 -0
- package/lib/src/utils/regexp.d.ts +2 -0
- package/lib/src/utils/regexp.d.ts.map +1 -0
- package/lib/src/utils/regexp.js +9 -0
- package/lib/src/utils/regexp.js.map +1 -0
- package/lib/src/{server/utils/index.d.ts → utils/validation.d.ts} +1 -1
- package/lib/src/utils/validation.d.ts.map +1 -0
- package/lib/src/{server/utils/index.js → utils/validation.js} +1 -1
- package/lib/src/{server/utils/index.js.map → utils/validation.js.map} +1 -1
- package/lib/test/index.js +111 -108
- package/lib/test/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/common.global.d.ts +13 -6
- package/lib/types/common.global.d.ts.map +1 -1
- package/lib/types/lib.d.ts +1 -0
- package/lib/types/lib.d.ts.map +1 -1
- package/lib/types/lib.js +1 -0
- package/lib/types/lib.js.map +1 -1
- package/package.json +4 -3
- package/types/common.global.ts +21 -2
- package/types/lib.ts +1 -0
- package/lib/src/cli.d.ts +0 -2
- package/lib/src/cli.d.ts.map +0 -1
- package/lib/src/cli.js.map +0 -1
- package/lib/src/client/methods/expectations/create.method.d.ts +0 -6
- package/lib/src/client/methods/expectations/create.method.d.ts.map +0 -1
- package/lib/src/client/methods/expectations/create.method.js +0 -13
- package/lib/src/client/methods/expectations/create.method.js.map +0 -1
- package/lib/src/client/methods/expectations/delete-all.method.d.ts +0 -3
- package/lib/src/client/methods/expectations/delete-all.method.d.ts.map +0 -1
- package/lib/src/client/methods/expectations/delete-all.method.js +0 -11
- package/lib/src/client/methods/expectations/delete-all.method.js.map +0 -1
- package/lib/src/client/methods/expectations/delete.method.d.ts +0 -4
- package/lib/src/client/methods/expectations/delete.method.d.ts.map +0 -1
- package/lib/src/client/methods/expectations/delete.method.js +0 -12
- package/lib/src/client/methods/expectations/delete.method.js.map +0 -1
- package/lib/src/client/methods/expectations/index.d.ts +0 -5
- package/lib/src/client/methods/expectations/index.d.ts.map +0 -1
- package/lib/src/client/methods/expectations/index.js +0 -15
- package/lib/src/client/methods/expectations/index.js.map +0 -1
- package/lib/src/client/methods/expectations/types.d.ts +0 -18
- package/lib/src/client/methods/expectations/types.d.ts.map +0 -1
- package/lib/src/client/methods/expectations/types.js.map +0 -1
- package/lib/src/client/methods/expectations/update.method.d.ts +0 -8
- package/lib/src/client/methods/expectations/update.method.d.ts.map +0 -1
- package/lib/src/client/methods/expectations/update.method.js +0 -16
- package/lib/src/client/methods/expectations/update.method.js.map +0 -1
- package/lib/src/client/methods/expectations/utils.d.ts +0 -3
- package/lib/src/client/methods/expectations/utils.d.ts.map +0 -1
- package/lib/src/client/methods/expectations/utils.js +0 -26
- package/lib/src/client/methods/expectations/utils.js.map +0 -1
- package/lib/src/server/endpoints/expectations.delete-all.endpoint.d.ts +0 -11
- package/lib/src/server/endpoints/expectations.delete-all.endpoint.d.ts.map +0 -1
- package/lib/src/server/endpoints/expectations.delete-all.endpoint.js +0 -11
- package/lib/src/server/endpoints/expectations.delete-all.endpoint.js.map +0 -1
- package/lib/src/server/endpoints/history-records.get-list.endpoint.d.ts +0 -16
- package/lib/src/server/endpoints/history-records.get-list.endpoint.d.ts.map +0 -1
- package/lib/src/server/endpoints/history-records.get-list.endpoint.js +0 -11
- package/lib/src/server/endpoints/history-records.get-list.endpoint.js.map +0 -1
- package/lib/src/server/endpoints/model.d.ts +0 -26
- package/lib/src/server/endpoints/model.d.ts.map +0 -1
- package/lib/src/server/endpoints/model.js.map +0 -1
- package/lib/src/server/expectations/__utils__/index.d.ts +0 -3
- package/lib/src/server/expectations/__utils__/index.d.ts.map +0 -1
- package/lib/src/server/expectations/__utils__/index.js +0 -36
- package/lib/src/server/expectations/__utils__/index.js.map +0 -1
- package/lib/src/server/expectations/errors/index.d.ts.map +0 -1
- package/lib/src/server/expectations/errors/index.js.map +0 -1
- package/lib/src/server/expectations/index.d.ts +0 -5
- package/lib/src/server/expectations/index.d.ts.map +0 -1
- package/lib/src/server/expectations/index.js.map +0 -1
- package/lib/src/server/expectations/model.d.ts +0 -37
- package/lib/src/server/expectations/model.d.ts.map +0 -1
- package/lib/src/server/expectations/model.js +0 -90
- package/lib/src/server/expectations/model.js.map +0 -1
- package/lib/src/server/expectations/operators/and.operator.d.ts +0 -3
- package/lib/src/server/expectations/operators/and.operator.d.ts.map +0 -1
- package/lib/src/server/expectations/operators/and.operator.js +0 -5
- package/lib/src/server/expectations/operators/and.operator.js.map +0 -1
- package/lib/src/server/expectations/operators/and.operator.spec.d.ts.map +0 -1
- package/lib/src/server/expectations/operators/and.operator.spec.js +0 -55
- package/lib/src/server/expectations/operators/and.operator.spec.js.map +0 -1
- package/lib/src/server/expectations/operators/exec.operator.d.ts +0 -9
- package/lib/src/server/expectations/operators/exec.operator.d.ts.map +0 -1
- package/lib/src/server/expectations/operators/exec.operator.js +0 -15
- package/lib/src/server/expectations/operators/exec.operator.js.map +0 -1
- package/lib/src/server/expectations/operators/exec.operator.spec.d.ts.map +0 -1
- package/lib/src/server/expectations/operators/exec.operator.spec.js +0 -27
- package/lib/src/server/expectations/operators/exec.operator.spec.js.map +0 -1
- package/lib/src/server/expectations/operators/has.operator.d.ts +0 -3
- package/lib/src/server/expectations/operators/has.operator.d.ts.map +0 -1
- package/lib/src/server/expectations/operators/has.operator.js +0 -83
- package/lib/src/server/expectations/operators/has.operator.js.map +0 -1
- package/lib/src/server/expectations/operators/has.operator.spec.d.ts.map +0 -1
- package/lib/src/server/expectations/operators/has.operator.spec.js +0 -173
- package/lib/src/server/expectations/operators/has.operator.spec.js.map +0 -1
- package/lib/src/server/expectations/operators/if.operator.d.ts +0 -3
- package/lib/src/server/expectations/operators/if.operator.d.ts.map +0 -1
- package/lib/src/server/expectations/operators/if.operator.js +0 -15
- package/lib/src/server/expectations/operators/if.operator.js.map +0 -1
- package/lib/src/server/expectations/operators/if.operator.spec.d.ts.map +0 -1
- package/lib/src/server/expectations/operators/if.operator.spec.js +0 -98
- package/lib/src/server/expectations/operators/if.operator.spec.js.map +0 -1
- package/lib/src/server/expectations/operators/index.d.ts.map +0 -1
- package/lib/src/server/expectations/operators/index.js.map +0 -1
- package/lib/src/server/expectations/operators/merge.operator.d.ts +0 -3
- package/lib/src/server/expectations/operators/merge.operator.d.ts.map +0 -1
- package/lib/src/server/expectations/operators/merge.operator.js +0 -30
- package/lib/src/server/expectations/operators/merge.operator.js.map +0 -1
- package/lib/src/server/expectations/operators/merge.operator.spec.d.ts.map +0 -1
- package/lib/src/server/expectations/operators/merge.operator.spec.js +0 -55
- package/lib/src/server/expectations/operators/merge.operator.spec.js.map +0 -1
- package/lib/src/server/expectations/operators/not.operator.d.ts +0 -3
- package/lib/src/server/expectations/operators/not.operator.d.ts.map +0 -1
- package/lib/src/server/expectations/operators/not.operator.js +0 -5
- package/lib/src/server/expectations/operators/not.operator.js.map +0 -1
- package/lib/src/server/expectations/operators/not.operator.spec.d.ts.map +0 -1
- package/lib/src/server/expectations/operators/not.operator.spec.js +0 -17
- package/lib/src/server/expectations/operators/not.operator.spec.js.map +0 -1
- package/lib/src/server/expectations/operators/or.operator.d.ts +0 -3
- package/lib/src/server/expectations/operators/or.operator.d.ts.map +0 -1
- package/lib/src/server/expectations/operators/or.operator.js +0 -9
- package/lib/src/server/expectations/operators/or.operator.js.map +0 -1
- package/lib/src/server/expectations/operators/or.operator.spec.d.ts.map +0 -1
- package/lib/src/server/expectations/operators/or.operator.spec.js +0 -55
- package/lib/src/server/expectations/operators/or.operator.spec.js.map +0 -1
- package/lib/src/server/expectations/operators/remove.operator.d.ts +0 -3
- package/lib/src/server/expectations/operators/remove.operator.d.ts.map +0 -1
- package/lib/src/server/expectations/operators/remove.operator.js +0 -28
- package/lib/src/server/expectations/operators/remove.operator.js.map +0 -1
- package/lib/src/server/expectations/operators/remove.operator.spec.d.ts.map +0 -1
- package/lib/src/server/expectations/operators/remove.operator.spec.js +0 -45
- package/lib/src/server/expectations/operators/remove.operator.spec.js.map +0 -1
- package/lib/src/server/expectations/operators/set.operator.d.ts +0 -3
- package/lib/src/server/expectations/operators/set.operator.d.ts.map +0 -1
- package/lib/src/server/expectations/operators/set.operator.js +0 -39
- package/lib/src/server/expectations/operators/set.operator.js.map +0 -1
- package/lib/src/server/expectations/operators/set.operator.spec.d.ts.map +0 -1
- package/lib/src/server/expectations/operators/set.operator.spec.js +0 -57
- package/lib/src/server/expectations/operators/set.operator.spec.js.map +0 -1
- package/lib/src/server/expectations/operators/utils.d.ts +0 -20
- package/lib/src/server/expectations/operators/utils.d.ts.map +0 -1
- package/lib/src/server/expectations/operators/utils.js +0 -67
- package/lib/src/server/expectations/operators/utils.js.map +0 -1
- package/lib/src/server/expectations/storage.d.ts +0 -19
- package/lib/src/server/expectations/storage.d.ts.map +0 -1
- package/lib/src/server/expectations/storage.js.map +0 -1
- package/lib/src/server/expectations/types.d.ts +0 -83
- package/lib/src/server/expectations/types.d.ts.map +0 -1
- package/lib/src/server/expectations/types.js.map +0 -1
- package/lib/src/server/expectations/utils.d.ts +0 -12
- package/lib/src/server/expectations/utils.d.ts.map +0 -1
- package/lib/src/server/expectations/utils.js +0 -92
- package/lib/src/server/expectations/utils.js.map +0 -1
- package/lib/src/server/expectations/utils.spec.d.ts +0 -2
- package/lib/src/server/expectations/utils.spec.d.ts.map +0 -1
- package/lib/src/server/expectations/utils.spec.js +0 -59
- package/lib/src/server/expectations/utils.spec.js.map +0 -1
- package/lib/src/server/expectations/validation-schemas.d.ts +0 -24
- package/lib/src/server/expectations/validation-schemas.d.ts.map +0 -1
- package/lib/src/server/expectations/validation-schemas.js +0 -36
- package/lib/src/server/expectations/validation-schemas.js.map +0 -1
- package/lib/src/server/middlewares/model.d.ts +0 -25
- package/lib/src/server/middlewares/model.d.ts.map +0 -1
- package/lib/src/server/middlewares/model.js.map +0 -1
- package/lib/src/server/middlewares/validate-expectation-request.middleware.d.ts +0 -6
- package/lib/src/server/middlewares/validate-expectation-request.middleware.d.ts.map +0 -1
- package/lib/src/server/middlewares/validate-expectation-request.middleware.js +0 -20
- package/lib/src/server/middlewares/validate-expectation-request.middleware.js.map +0 -1
- package/lib/src/server/models/server-context/index.d.ts +0 -14
- package/lib/src/server/models/server-context/index.d.ts.map +0 -1
- package/lib/src/server/models/server-context/index.js +0 -20
- package/lib/src/server/models/server-context/index.js.map +0 -1
- package/lib/src/server/types.d.ts +0 -6
- package/lib/src/server/types.d.ts.map +0 -1
- package/lib/src/server/types.js +0 -3
- package/lib/src/server/types.js.map +0 -1
- package/lib/src/server/utils/index.d.ts.map +0 -1
- package/lib/src/server/web-socket-exchange/index.d.ts +0 -5
- package/lib/src/server/web-socket-exchange/index.d.ts.map +0 -1
- package/lib/src/server/web-socket-exchange/index.js.map +0 -1
- package/lib/src/server/web-socket-exchange/types.d.ts +0 -12
- package/lib/src/server/web-socket-exchange/types.d.ts.map +0 -1
- package/lib/src/server/web-socket-exchange/types.js +0 -3
- package/lib/src/server/web-socket-exchange/types.js.map +0 -1
- /package/lib/src/{server/expectations → expectations}/errors/index.d.ts +0 -0
- /package/lib/src/{server/expectations → expectations}/errors/index.js +0 -0
- /package/lib/src/{server/expectations → expectations}/operators/and.operator.spec.d.ts +0 -0
- /package/lib/src/{server/expectations → expectations}/operators/exec.operator.spec.d.ts +0 -0
- /package/lib/src/{server/expectations → expectations}/operators/has.operator.spec.d.ts +0 -0
- /package/lib/src/{server/expectations → expectations}/operators/if.operator.spec.d.ts +0 -0
- /package/lib/src/{server/expectations → expectations}/operators/merge.operator.spec.d.ts +0 -0
- /package/lib/src/{server/expectations → expectations}/operators/not.operator.spec.d.ts +0 -0
- /package/lib/src/{server/expectations → expectations}/operators/or.operator.spec.d.ts +0 -0
- /package/lib/src/{server/expectations → expectations}/operators/remove.operator.spec.d.ts +0 -0
- /package/lib/src/{server/expectations → expectations}/operators/set.operator.spec.d.ts +0 -0
- /package/lib/src/{client/methods/expectations → server/ws-exchange}/types.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exec.operator.d.ts","sourceRoot":"","sources":["../../../../../src/server/expectations/operators/exec.operator.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,QAAQ,CAAC;AAGvB,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE3E,MAAM,MAAM,+BAA+B,CAAC,QAAQ,SAAS,oBAAoB,GAAG,qBAAqB,IACvG,SAAS,CAAC,OAAO,EAAE,CAAC;IAAE,CAAC,EAAE,OAAO,CAAC,CAAC;IAAC,OAAO,EAAE,QAAQ,CAAA;CAAE,CAAC,CAAC,CAAC;;AAE3D,wBASE"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const lodash_1 = __importDefault(require("lodash"));
|
|
7
|
-
const utils_1 = require("./utils");
|
|
8
|
-
exports.default = (0, utils_1.buildExpectationOperatorHandler)((mode, command, context) => {
|
|
9
|
-
if (mode !== 'manipulation') {
|
|
10
|
-
return true;
|
|
11
|
-
}
|
|
12
|
-
Function(`return ({ _, context }) => ${command}`)()({ _: lodash_1.default, context });
|
|
13
|
-
return true;
|
|
14
|
-
});
|
|
15
|
-
//# sourceMappingURL=exec.operator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exec.operator.js","sourceRoot":"","sources":["../../../../../src/server/expectations/operators/exec.operator.ts"],"names":[],"mappings":";;;;;AAAA,oDAAuB;AAEvB,mCAA0D;AAM1D,kBAAe,IAAA,uCAA+B,EAC5C,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;IACzB,IAAI,IAAI,KAAK,cAAc,EAAE;QAC3B,OAAO,IAAI,CAAC;KACb;IAED,QAAQ,CAAC,8BAA8B,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAD,gBAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IACpE,OAAO,IAAI,CAAC;AACd,CAAC,CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exec.operator.spec.d.ts","sourceRoot":"","sources":["../../../../../src/server/expectations/operators/exec.operator.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const __utils__1 = require("../__utils__");
|
|
7
|
-
const utils_1 = require("../utils");
|
|
8
|
-
const exec_operator_1 = __importDefault(require("./exec.operator"));
|
|
9
|
-
describe('Expectations.Operators.Exec', () => {
|
|
10
|
-
it('should exec by inline command', () => {
|
|
11
|
-
const context = (0, __utils__1.buildExpectationContext)();
|
|
12
|
-
const command = '_.set(context, "query.test", "foo")';
|
|
13
|
-
expect((0, exec_operator_1.default)('manipulation', command, context, { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
14
|
-
expect(context.query.test).toEqual('foo');
|
|
15
|
-
});
|
|
16
|
-
it('should exec by multiline command', () => {
|
|
17
|
-
const context = (0, __utils__1.buildExpectationContext)();
|
|
18
|
-
const command = `{
|
|
19
|
-
context.body.foo.push({ test: 1 });
|
|
20
|
-
context.body.foo.push({ test: 2 });
|
|
21
|
-
}`;
|
|
22
|
-
expect((0, exec_operator_1.default)('manipulation', command, context, { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
23
|
-
expect(context.body.foo[2].test).toEqual(1);
|
|
24
|
-
expect(context.body.foo[3].test).toEqual(2);
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
//# sourceMappingURL=exec.operator.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exec.operator.spec.js","sourceRoot":"","sources":["../../../../../src/server/expectations/operators/exec.operator.spec.ts"],"names":[],"mappings":";;;;;AAAA,2CAAuD;AACvD,oCAA0D;AAE1D,oEAAuC;AAEvC,QAAQ,CAAC,6BAA6B,EAAE,GAAG,EAAE;IAC3C,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;QACvC,MAAM,OAAO,GAAG,IAAA,kCAAuB,GAAE,CAAA;QACzC,MAAM,OAAO,GAAG,qCAAqC,CAAC;QAEtD,MAAM,CAAC,IAAA,uBAAQ,EAAC,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,mBAAmB,EAAE,sCAA8B,EAAE,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;QACzH,MAAM,CAAO,OAAO,CAAC,KAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE;QAC1C,MAAM,OAAO,GAAG,IAAA,kCAAuB,GAAE,CAAA;QACzC,MAAM,OAAO,GAAG;;;MAGd,CAAC;QAEH,MAAM,CAAC,IAAA,uBAAQ,EAAC,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,mBAAmB,EAAE,sCAA8B,EAAE,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;QACzH,MAAM,CAAO,OAAO,CAAC,IAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACnD,MAAM,CAAO,OAAO,CAAC,IAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"has.operator.d.ts","sourceRoot":"","sources":["../../../../../src/server/expectations/operators/has.operator.ts"],"names":[],"mappings":";AAMA,wBAoFG"}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const minimatch_1 = __importDefault(require("minimatch"));
|
|
7
|
-
const lodash_1 = __importDefault(require("lodash"));
|
|
8
|
-
const utils_1 = require("./utils");
|
|
9
|
-
const utils_2 = require("../../../utils");
|
|
10
|
-
exports.default = (0, utils_1.buildExpectationOperatorHandler)((mode, schema, context) => {
|
|
11
|
-
if (!schema.$location) {
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
14
|
-
const payload = (0, utils_1.extractContextPayloadSegment)(schema.$location, context);
|
|
15
|
-
if (!payload) {
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
switch (payload.type) {
|
|
19
|
-
case 'string': {
|
|
20
|
-
if (schema.$value !== undefined) {
|
|
21
|
-
return payload.value === schema.$value;
|
|
22
|
-
}
|
|
23
|
-
if (schema.$valueAnyOf) {
|
|
24
|
-
return schema.$valueAnyOf.some((value) => payload.value === value);
|
|
25
|
-
}
|
|
26
|
-
if (schema.$regExp) {
|
|
27
|
-
return schema.$regExp.test(payload.value);
|
|
28
|
-
}
|
|
29
|
-
if (schema.$regExpAnyOf) {
|
|
30
|
-
return schema.$regExpAnyOf.some((regExp) => regExp.test(payload.value));
|
|
31
|
-
}
|
|
32
|
-
if (schema.$minimatch) {
|
|
33
|
-
return (0, minimatch_1.default)(payload.value, schema.$minimatch);
|
|
34
|
-
}
|
|
35
|
-
if (schema.$minimatchAnyOf) {
|
|
36
|
-
return schema.$minimatchAnyOf.some((pattern) => (0, minimatch_1.default)(payload.value, pattern));
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
case 'number': {
|
|
40
|
-
if (schema.$value !== undefined) {
|
|
41
|
-
return payload.value === schema.$value;
|
|
42
|
-
}
|
|
43
|
-
if (schema.$valueAnyOf) {
|
|
44
|
-
return schema.$valueAnyOf.some((value) => payload.value === value);
|
|
45
|
-
}
|
|
46
|
-
if (schema.$minimatch) {
|
|
47
|
-
return (0, minimatch_1.default)(String(payload.value), schema.$minimatch);
|
|
48
|
-
}
|
|
49
|
-
if (schema.$minimatchAnyOf) {
|
|
50
|
-
const value = String(payload.value);
|
|
51
|
-
return schema.$minimatchAnyOf.some((pattern) => (0, minimatch_1.default)(value, pattern));
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
case 'object': {
|
|
55
|
-
const values = schema.$path
|
|
56
|
-
? [lodash_1.default.get(payload.value, schema.$path)]
|
|
57
|
-
: schema.$jsonPath
|
|
58
|
-
? (0, utils_2.extractByJsonPathSafe)({ path: schema.$jsonPath, json: payload.value }).results?.map(({ value }) => value) ?? []
|
|
59
|
-
: [];
|
|
60
|
-
if (schema.$value !== undefined) {
|
|
61
|
-
return values.every((value) => schema.$value === value);
|
|
62
|
-
}
|
|
63
|
-
if (schema.$valueAnyOf) {
|
|
64
|
-
return values.every((valueToCheck) => (schema.$valueAnyOf).some((value) => valueToCheck === value));
|
|
65
|
-
}
|
|
66
|
-
if (schema.$regExp) {
|
|
67
|
-
return values.every((value) => (schema.$regExp).test(String(value)));
|
|
68
|
-
}
|
|
69
|
-
if (schema.$regExpAnyOf) {
|
|
70
|
-
return values.every((value) => (schema.$regExpAnyOf).some((regExp) => regExp.test(String(value))));
|
|
71
|
-
}
|
|
72
|
-
if (schema.$minimatch) {
|
|
73
|
-
return values.every((value) => (0, minimatch_1.default)(String(value), schema.$minimatch));
|
|
74
|
-
}
|
|
75
|
-
if (schema.$minimatchAnyOf) {
|
|
76
|
-
return values.every((value) => (schema.$minimatchAnyOf).some((pattern) => (0, minimatch_1.default)(String(value), pattern)));
|
|
77
|
-
}
|
|
78
|
-
return values.length !== 0;
|
|
79
|
-
}
|
|
80
|
-
default: return false;
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
//# sourceMappingURL=has.operator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"has.operator.js","sourceRoot":"","sources":["../../../../../src/server/expectations/operators/has.operator.ts"],"names":[],"mappings":";;;;;AAAA,0DAAkC;AAClC,oDAAuB;AAEvB,mCAAwF;AACxF,0CAAuD;AAEvD,kBAAe,IAAA,uCAA+B,EAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;IAC/E,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;QACrB,OAAO,KAAK,CAAC;KACd;IAED,MAAM,OAAO,GAAG,IAAA,oCAA4B,EAAC,MAAM,CAAC,SAAS,EAAE,OAA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operator.spec.d.ts","sourceRoot":"","sources":["../../../../../src/server/expectations/operators/has.operator.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const __utils__1 = require("../__utils__");
|
|
7
|
-
const utils_1 = require("../utils");
|
|
8
|
-
const has_operator_1 = __importDefault(require("./has.operator"));
|
|
9
|
-
describe('Expectations.Operators.Has', () => {
|
|
10
|
-
it('should handle invalid payload', () => {
|
|
11
|
-
const schema = { $location: 'query' };
|
|
12
|
-
expect((0, has_operator_1.default)('validation', schema, {}, { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeFalsy();
|
|
13
|
-
});
|
|
14
|
-
it('should handle schema without location', () => {
|
|
15
|
-
expect((0, has_operator_1.default)('validation', {}, {}, { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeFalsy();
|
|
16
|
-
});
|
|
17
|
-
it('should validate by schema in query using path', () => {
|
|
18
|
-
const schema = {
|
|
19
|
-
$location: 'query',
|
|
20
|
-
$path: 'foo',
|
|
21
|
-
};
|
|
22
|
-
expect((0, has_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
23
|
-
});
|
|
24
|
-
it('should validate by schema in query using path and value', () => {
|
|
25
|
-
const schema = {
|
|
26
|
-
$location: 'query',
|
|
27
|
-
$path: 'foo',
|
|
28
|
-
$value: 1,
|
|
29
|
-
};
|
|
30
|
-
expect((0, has_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
31
|
-
});
|
|
32
|
-
it('should validate by schema in query using jsonPath and valueAnyOf', () => {
|
|
33
|
-
const schema = {
|
|
34
|
-
$location: 'query',
|
|
35
|
-
$jsonPath: '$.bar.baz',
|
|
36
|
-
$valueAnyOf: [1, 2, null],
|
|
37
|
-
};
|
|
38
|
-
expect((0, has_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
39
|
-
});
|
|
40
|
-
it('should validate by schema in query using path and regExp', () => {
|
|
41
|
-
const schema = {
|
|
42
|
-
$location: 'query',
|
|
43
|
-
$path: 'foo',
|
|
44
|
-
$regExp: /\d/,
|
|
45
|
-
};
|
|
46
|
-
expect((0, has_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
47
|
-
});
|
|
48
|
-
it('should validate by schema in query using path and regExpAnyOf', () => {
|
|
49
|
-
const schema = {
|
|
50
|
-
$location: 'query',
|
|
51
|
-
$path: 'foo',
|
|
52
|
-
$regExpAnyOf: [/\./, /\d/],
|
|
53
|
-
};
|
|
54
|
-
expect((0, has_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
55
|
-
});
|
|
56
|
-
it('should validate by schema in query using path and minimatch', () => {
|
|
57
|
-
const schema = {
|
|
58
|
-
$location: 'query',
|
|
59
|
-
$path: 'foo',
|
|
60
|
-
$minimatch: '*',
|
|
61
|
-
};
|
|
62
|
-
expect((0, has_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
63
|
-
});
|
|
64
|
-
it('should validate by schema in query using path and minimatchAnyOf', () => {
|
|
65
|
-
const schema = {
|
|
66
|
-
$location: 'query',
|
|
67
|
-
$path: 'foo',
|
|
68
|
-
$minimatchAnyOf: ['2', '3', '1'],
|
|
69
|
-
};
|
|
70
|
-
expect((0, has_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
71
|
-
});
|
|
72
|
-
it('should validate by schema in query using jsonPath', () => {
|
|
73
|
-
const schema = {
|
|
74
|
-
$location: 'query',
|
|
75
|
-
$jsonPath: '$.bar.baz',
|
|
76
|
-
};
|
|
77
|
-
expect((0, has_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
78
|
-
});
|
|
79
|
-
it('should validate by schema in query using jsonPath and value', () => {
|
|
80
|
-
const schema = {
|
|
81
|
-
$location: 'query',
|
|
82
|
-
$jsonPath: '$.bar.baz',
|
|
83
|
-
$value: null,
|
|
84
|
-
};
|
|
85
|
-
expect((0, has_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
86
|
-
});
|
|
87
|
-
it('should validate by schema with invalid condition in query using jsonPath and value', () => {
|
|
88
|
-
const schema = {
|
|
89
|
-
$location: 'query',
|
|
90
|
-
$jsonPath: '$.bar.baz',
|
|
91
|
-
$value: 1,
|
|
92
|
-
};
|
|
93
|
-
expect((0, has_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeFalsy();
|
|
94
|
-
});
|
|
95
|
-
it('should validate by schema in path using value', () => {
|
|
96
|
-
const schema = {
|
|
97
|
-
$location: 'path',
|
|
98
|
-
$value: '/foo/bar/baz',
|
|
99
|
-
};
|
|
100
|
-
expect((0, has_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
101
|
-
});
|
|
102
|
-
it('should validate by schema in path using valueAnyOf', () => {
|
|
103
|
-
const schema = {
|
|
104
|
-
$location: 'path',
|
|
105
|
-
$valueAnyOf: ['/foo', '/bar', '/foo/bar/baz'],
|
|
106
|
-
};
|
|
107
|
-
expect((0, has_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
108
|
-
});
|
|
109
|
-
it('should validate by schema in path using regExp', () => {
|
|
110
|
-
const schema = {
|
|
111
|
-
$location: 'path',
|
|
112
|
-
$regExp: /^\/foo\/\w+\/baz$/,
|
|
113
|
-
};
|
|
114
|
-
expect((0, has_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
115
|
-
});
|
|
116
|
-
it('should validate by schema in path using regExpAnyOf', () => {
|
|
117
|
-
const schema = {
|
|
118
|
-
$location: 'path',
|
|
119
|
-
$regExpAnyOf: [/\./, /^\/foo\/\w+\/baz$/, /^foo$/],
|
|
120
|
-
};
|
|
121
|
-
expect((0, has_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
122
|
-
});
|
|
123
|
-
it('should validate by schema in path using minimatch', () => {
|
|
124
|
-
const schema = {
|
|
125
|
-
$location: 'path',
|
|
126
|
-
$minimatch: '/foo/*/baz',
|
|
127
|
-
};
|
|
128
|
-
expect((0, has_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
129
|
-
});
|
|
130
|
-
it('should validate by schema in path using minimatchAnyOf', () => {
|
|
131
|
-
const schema = {
|
|
132
|
-
$location: 'path',
|
|
133
|
-
$minimatchAnyOf: ['/foo/baz', '/bar/baz', '/foo/bar/*'],
|
|
134
|
-
};
|
|
135
|
-
expect((0, has_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
136
|
-
});
|
|
137
|
-
it('should validate by schema in method using value', () => {
|
|
138
|
-
const schema = {
|
|
139
|
-
$location: 'method',
|
|
140
|
-
$value: 'POST',
|
|
141
|
-
};
|
|
142
|
-
expect((0, has_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
143
|
-
});
|
|
144
|
-
it('should validate by schema in statusCode using value', () => {
|
|
145
|
-
const schema = {
|
|
146
|
-
$location: 'statusCode',
|
|
147
|
-
$value: 200,
|
|
148
|
-
};
|
|
149
|
-
expect((0, has_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
150
|
-
});
|
|
151
|
-
it('should validate by schema in statusCode using valueAnyOf', () => {
|
|
152
|
-
const schema = {
|
|
153
|
-
$location: 'statusCode',
|
|
154
|
-
$valueAnyOf: [404, 200],
|
|
155
|
-
};
|
|
156
|
-
expect((0, has_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
157
|
-
});
|
|
158
|
-
it('should validate by schema in statusCode using minimatch', () => {
|
|
159
|
-
const schema = {
|
|
160
|
-
$location: 'statusCode',
|
|
161
|
-
$minimatch: '2**',
|
|
162
|
-
};
|
|
163
|
-
expect((0, has_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
164
|
-
});
|
|
165
|
-
it('should validate by schema in statusCode using minimatchAnyOf', () => {
|
|
166
|
-
const schema = {
|
|
167
|
-
$location: 'statusCode',
|
|
168
|
-
$minimatchAnyOf: ['2*1', '200'],
|
|
169
|
-
};
|
|
170
|
-
expect((0, has_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
171
|
-
});
|
|
172
|
-
});
|
|
173
|
-
//# sourceMappingURL=has.operator.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"has.operator.spec.js","sourceRoot":"","sources":["../../../../../src/server/expectations/operators/has.operator.spec.ts"],"names":[],"mappings":";;;;;AAAA,2CAAuD;AACvD,oCAA0D;AAE1D,kEAAsC;AAEtC,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;IAC1C,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;QACvC,MAAM,MAAM,GAAmC,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;QACtE,MAAM,CAAC,IAAA,sBAAQ,EAAC,YAAY,EAAE,MAAM,EAAO,EAAE,EAAE,EAAE,mBAAmB,EAAE,sCAA8B,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;IACvH,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;QAC/C,MAAM,CAAC,IAAA,sBAAQ,EAAC,YAAY,EAAE,EAAE,EAAO,EAAE,EAAE,EAAE,mBAAmB,EAAE,sCAA8B,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;IACnH,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;QACvD,MAAM,MAAM,GAAmC;YAC7C,SAAS,EAAE,OAAO;YAClB,KAAK,EAAE,KAAK;SACb,CAAC;QAEF,MAAM,CACJ,IAAA,sBAAQ,EAAC,YAAY,EAAE,MAAM,EAAE,IAAA,kCAAuB,GAAE,EAAE,EAAE,mBAAmB,EAAE,sCAA8B,EAAE,CAAC,CACnH,CAAC,UAAU,EAAE,CAAC;IACjB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yDAAyD,EAAE,GAAG,EAAE;QACjE,MAAM,MAAM,GAAmC;YAC7C,SAAS,EAAE,OAAO;YAClB,KAAK,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AAQ,EAAC,YAAY,EAAE,MAAM,EAAE,IAAA,kCAAuB,GAAE,EAAE,EAAE,mBAAmB,EAAE,sCAA8B,EAAE,CAAC,CACnH,CAAC,UAAU,EAAE,CAAC;IACjB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8DAA8D,EAAE,GAAG,EAAE;QACtE,MAAM,MAAM,GAAmC;YAC7C,SAAS,EAAE,YAAY;YACvB,eAAe,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;SAChC,CAAC;QAEF,MAAM,CACJ,IAAA,sBAAQ,EAAC,YAAY,EAAE,MAAM,EAAE,IAAA,kCAAuB,GAAE,EAAE,EAAE,mBAAmB,EAAE,sCAA8B,EAAE,CAAC,CACnH,CAAC,UAAU,EAAE,CAAC;IACjB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"if.operator.d.ts","sourceRoot":"","sources":["../../../../../src/server/expectations/operators/if.operator.ts"],"names":[],"mappings":";AAEA,wBAYG"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const utils_1 = require("./utils");
|
|
4
|
-
exports.default = (0, utils_1.buildExpectationOperatorHandler)((mode, schema, context, { exploreNestedSchema }) => {
|
|
5
|
-
const { $then, $else, ...schemaPart } = schema;
|
|
6
|
-
const result = exploreNestedSchema(mode, schemaPart, context);
|
|
7
|
-
if ($then && result) {
|
|
8
|
-
return exploreNestedSchema(mode, $then, context);
|
|
9
|
-
}
|
|
10
|
-
if ($else && !result) {
|
|
11
|
-
return exploreNestedSchema(mode, $else, context);
|
|
12
|
-
}
|
|
13
|
-
return false;
|
|
14
|
-
});
|
|
15
|
-
//# sourceMappingURL=if.operator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"if.operator.js","sourceRoot":"","sources":["../../../../../src/server/expectations/operators/if.operator.ts"],"names":[],"mappings":";;AAAA,mCAA0D;AAE1D,kBAAe,IAAA,uCAA+B,EAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,mBAAmB,EAAE,EAAE,EAAE;IACvG,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,UAAU,EAAE,GAAG,MAAM,CAAC;IAC/C,MAAM,MAAM,GAAG,mBAAmB,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAE9D,IAAI,KAAK,IAAI,MAAM,EAAE;QACnB,OAAO,mBAAmB,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;KAClD;IACD,IAAI,KAAK,IAAI,CAAC,MAAM,EAAE;QACpB,OAAO,mBAAmB,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;KAClD;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"if.operator.spec.d.ts","sourceRoot":"","sources":["../../../../../src/server/expectations/operators/if.operator.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const __utils__1 = require("../__utils__");
|
|
7
|
-
const utils_1 = require("../utils");
|
|
8
|
-
const if_operator_1 = __importDefault(require("./if.operator"));
|
|
9
|
-
describe('Expectations.Operators.If', () => {
|
|
10
|
-
describe('validation mode', () => {
|
|
11
|
-
it('should validate by schema with simple valid condition and valid [then] target branch', () => {
|
|
12
|
-
const schema = {
|
|
13
|
-
$has: { $location: 'path', $regExp: /^\/foo/ },
|
|
14
|
-
$then: { $has: { $location: 'method', $value: 'POST' } },
|
|
15
|
-
};
|
|
16
|
-
expect((0, if_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
17
|
-
});
|
|
18
|
-
it('should validate by schema with simple invalid condition and valid [then] target branch', () => {
|
|
19
|
-
const schema = {
|
|
20
|
-
$has: { $location: 'path', $regExp: /^\/bar/ },
|
|
21
|
-
$then: { $has: { $location: 'method', $value: 'POST' } },
|
|
22
|
-
};
|
|
23
|
-
expect((0, if_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeFalsy();
|
|
24
|
-
});
|
|
25
|
-
it('should validate by schema with simple valid condition and invalid [then] target branch', () => {
|
|
26
|
-
const schema = {
|
|
27
|
-
$has: { $location: 'path', $regExp: /^\/foo/ },
|
|
28
|
-
$then: { $has: { $location: 'method', $value: 'GET' } },
|
|
29
|
-
};
|
|
30
|
-
expect((0, if_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeFalsy();
|
|
31
|
-
});
|
|
32
|
-
it('should validate by schema with simple invalid condition and valid [else] target branch', () => {
|
|
33
|
-
const schema = {
|
|
34
|
-
$has: { $location: 'path', $regExp: /^\/bar/ },
|
|
35
|
-
$else: { $has: { $location: 'method', $value: 'POST' } },
|
|
36
|
-
};
|
|
37
|
-
expect((0, if_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
38
|
-
});
|
|
39
|
-
it('should validate by schema with simple invalid condition and invalid [else] target branch', () => {
|
|
40
|
-
const schema = {
|
|
41
|
-
$has: { $location: 'path', $regExp: /^\/bar/ },
|
|
42
|
-
$else: { $has: { $location: 'method', $value: 'GET' } },
|
|
43
|
-
};
|
|
44
|
-
expect((0, if_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeFalsy();
|
|
45
|
-
});
|
|
46
|
-
it('should validate by schema with complex valid condition', () => {
|
|
47
|
-
const schema = {
|
|
48
|
-
$or: [
|
|
49
|
-
{ $if: {} },
|
|
50
|
-
{ $has: { $location: 'path', $regExp: /^\/bar/ } },
|
|
51
|
-
{ $has: { $location: 'method', $value: 'POST' } },
|
|
52
|
-
],
|
|
53
|
-
$then: {
|
|
54
|
-
$or: [
|
|
55
|
-
{ $has: { $location: 'body', $path: 'foo.1.test.0', $regExp: /^2/ } },
|
|
56
|
-
{ $has: { $location: 'body', $path: 'foo.1.baz.0', $regExp: /^2/ } },
|
|
57
|
-
],
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
expect((0, if_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
61
|
-
});
|
|
62
|
-
it('should validate by schema with complex invalid condition', () => {
|
|
63
|
-
const schema = {
|
|
64
|
-
$or: [
|
|
65
|
-
{ $if: {} },
|
|
66
|
-
{ $has: { $location: 'path', $regExp: /^\/bar/ } },
|
|
67
|
-
{ $has: { $location: 'method', $value: 'GET' } },
|
|
68
|
-
],
|
|
69
|
-
$else: {
|
|
70
|
-
$has: { $location: 'body', $path: 'foo.1.test.0', $regExp: /^2/ },
|
|
71
|
-
},
|
|
72
|
-
};
|
|
73
|
-
expect((0, if_operator_1.default)('validation', schema, (0, __utils__1.buildExpectationContext)(), { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeFalsy();
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
describe('manipulation mode', () => {
|
|
77
|
-
it('should manipulate by schema with conplex condition', () => {
|
|
78
|
-
const context = (0, __utils__1.buildExpectationContext)();
|
|
79
|
-
const schema = {
|
|
80
|
-
$or: [
|
|
81
|
-
{ $if: {} },
|
|
82
|
-
{ $has: { $location: 'path', $regExp: /^\/bar/ } },
|
|
83
|
-
{ $has: { $location: 'method', $value: 'POST' } },
|
|
84
|
-
],
|
|
85
|
-
$then: {
|
|
86
|
-
$and: [
|
|
87
|
-
{ $set: { $location: 'headers', $path: 'content-length', $value: 100 } },
|
|
88
|
-
{ $set: { $location: 'query', $path: 'bar.baz', $value: { test: true } } },
|
|
89
|
-
],
|
|
90
|
-
},
|
|
91
|
-
};
|
|
92
|
-
expect((0, if_operator_1.default)('manipulation', schema, context, { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
93
|
-
expect(context.headers?.['content-length']).toEqual(100);
|
|
94
|
-
expect(context.query?.bar?.baz?.test).toBeTruthy();
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
//# sourceMappingURL=if.operator.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"if.operator.spec.js","sourceRoot":"","sources":["../../../../../src/server/expectations/operators/if.operator.spec.ts"],"names":[],"mappings":";;;;;AAAA,2CAAuD;AACvD,oCAA0D;AAE1D,gEAAqC;AAErC,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACzC,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;QAC/B,EAAE,CAAC,sFAAsF,EAAE,GAAG,EAAE;YAC9F,MAAM,MAAM,GAAmC;gBAC7C,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE;gBAC9C,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;aACzD,CAAC;YAEF,MAAM,CACJ,IAAA,qBAAQ,EAAC,YAAY,EAAE,MAAM,EAAE,IAAA,kCAAuB,GAAE,EAAE,EAAE,mBAAmB,EAAE,sCAA8B,EAAE,CAAC,CACnH,CAAC,UAAU,EAAE,CAAC;QACjB,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,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AO,IAAI,KAAK,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/server/expectations/operators/index.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAiD;AAAxC,qHAAA,OAAO,OAAQ;AACxB,6CAA+C;AAAtC,mHAAA,OAAO,OAAO;AACvB,+CAAiD;AAAxC,qHAAA,OAAO,OAAQ;AACxB,6CAA+C;AAAtC,mHAAA,OAAO,OAAO;AACvB,+CAAiD;AAAxC,qHAAA,OAAO,OAAQ;AACxB,+CAAiD;AAAxC,qHAAA,OAAO,OAAQ;AACxB,mDAAqD;AAA5C,yHAAA,OAAO,OAAU;AAC1B,qDAAuD;AAA9C,2HAAA,OAAO,OAAW;AAC3B,iDAAmD;AAA1C,uHAAA,OAAO,OAAS"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"merge.operator.d.ts","sourceRoot":"","sources":["../../../../../src/server/expectations/operators/merge.operator.ts"],"names":[],"mappings":";AAMA,wBA6BG"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const lodash_1 = __importDefault(require("lodash"));
|
|
7
|
-
const deepmerge_1 = __importDefault(require("deepmerge"));
|
|
8
|
-
const utils_1 = require("./utils");
|
|
9
|
-
const utils_2 = require("../../../utils");
|
|
10
|
-
exports.default = (0, utils_1.buildExpectationOperatorHandler)((mode, schema, context) => {
|
|
11
|
-
if (mode !== 'manipulation' || !schema.$location || schema.$value === undefined) {
|
|
12
|
-
return true;
|
|
13
|
-
}
|
|
14
|
-
const payload = (0, utils_1.extractContextPayloadSegment)(schema.$location, context);
|
|
15
|
-
if (payload?.type !== 'object') {
|
|
16
|
-
return true;
|
|
17
|
-
}
|
|
18
|
-
if (schema.$path) {
|
|
19
|
-
lodash_1.default.set(payload.value, schema.$path, (0, deepmerge_1.default)(lodash_1.default.get(payload.value, schema.$path), schema.$value ?? {}));
|
|
20
|
-
return true;
|
|
21
|
-
}
|
|
22
|
-
if (schema.$jsonPath) {
|
|
23
|
-
(0, utils_2.extractByJsonPathSafe)({ path: schema.$jsonPath, json: payload.value })
|
|
24
|
-
.results?.forEach((segment) => lodash_1.default.set(payload.value, segment.pointer.substring(1).replace(/\//g, '.'), (0, deepmerge_1.default)(lodash_1.default.get(segment.parent, segment.parentProperty), schema.$value ?? {})));
|
|
25
|
-
return true;
|
|
26
|
-
}
|
|
27
|
-
lodash_1.default.set(payload.parent, payload.key, (0, deepmerge_1.default)(payload.value, schema.$value ?? {}));
|
|
28
|
-
return true;
|
|
29
|
-
});
|
|
30
|
-
//# sourceMappingURL=merge.operator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"merge.operator.js","sourceRoot":"","sources":["../../../../../src/server/expectations/operators/merge.operator.ts"],"names":[],"mappings":";;;;;AAAA,oDAAuB;AACvB,0DAA8B;AAE9B,mCAAwF;AACxF,0CAAuD;AAEvD,kBAAe,IAAA,uCAA+B,EAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;IACjF,IAAI,IAAI,KAAK,cAAc,IAAI,CAAC,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS,EAAE;QAC/E,OAAO,IAAI,CAAC;KACb;IAED,MAAM,OAAO,GAAG,IAAA,oCAA4B,EAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACxE,IAAI,OAAO,EAAE,IAAI,KAAK,QAAQ,EAAE;QAC9B,OAAO,IAAI,CAAC;KACb;IAED,IAAI,MAAM,CAAC,KAAK,EAAE;QAChB,gBAAC,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,IAAA,mBAAK,EAAC,gBAAC,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC;QACnG,OAAO,IAAI,CAAC;KACb;IACD,IAAI,MAAM,CAAC,SAAS,EAAE;QACpB,IAAA,6BAAqB,EAAC,EAAE,IAAI,EAAE,MAAM,CAAC,SAAS,EAAE,IAAI,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;aACnE,OAAO,EAAE,OAAO,CACf,CAAC,OAAO,EAAE,EAAE,CAAC,gBAAC,CAAC,GAAG,CAChB,OAAO,CAAC,KAAK,EACb,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,EAChD,IAAA,mBAAK,EAAC,gBAAC,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,CAC1E,CACF,CAAC;QAEJ,OAAO,IAAI,CAAC;KACb;IAED,gBAAC,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,EAAE,IAAA,mBAAK,EAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC;IAC9E,OAAO,IAAI,CAAC;AACd,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"merge.operator.spec.d.ts","sourceRoot":"","sources":["../../../../../src/server/expectations/operators/merge.operator.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const __utils__1 = require("../__utils__");
|
|
7
|
-
const utils_1 = require("../utils");
|
|
8
|
-
const merge_operator_1 = __importDefault(require("./merge.operator"));
|
|
9
|
-
describe('Expectations.Operators.Merge', () => {
|
|
10
|
-
it('should handle invalid payload', () => {
|
|
11
|
-
const schema = { $location: 'query' };
|
|
12
|
-
expect((0, merge_operator_1.default)('manipulation', schema, {}, { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
13
|
-
});
|
|
14
|
-
it('should handle schema without location', () => {
|
|
15
|
-
expect((0, merge_operator_1.default)('manipulation', {}, {}, { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
16
|
-
});
|
|
17
|
-
it('should handle schema with non object payload', () => {
|
|
18
|
-
const schema = {
|
|
19
|
-
$location: 'path',
|
|
20
|
-
$value: true,
|
|
21
|
-
};
|
|
22
|
-
expect((0, merge_operator_1.default)('manipulation', schema, {}, { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
23
|
-
});
|
|
24
|
-
it('should manipulate by schema', () => {
|
|
25
|
-
const context = (0, __utils__1.buildExpectationContext)();
|
|
26
|
-
const schema = {
|
|
27
|
-
$location: 'query',
|
|
28
|
-
$value: { test: true },
|
|
29
|
-
};
|
|
30
|
-
expect((0, merge_operator_1.default)('manipulation', schema, context, { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
31
|
-
expect(context.query.test).toBeTruthy();
|
|
32
|
-
});
|
|
33
|
-
it('should manipulate by schema using path', () => {
|
|
34
|
-
const context = (0, __utils__1.buildExpectationContext)();
|
|
35
|
-
const schema = {
|
|
36
|
-
$location: 'query',
|
|
37
|
-
$path: 'bar',
|
|
38
|
-
$value: { test: true },
|
|
39
|
-
};
|
|
40
|
-
expect((0, merge_operator_1.default)('manipulation', schema, context, { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
41
|
-
expect(context.query.bar.test).toBeTruthy();
|
|
42
|
-
});
|
|
43
|
-
it('should manipulate by schema using jsonPath', () => {
|
|
44
|
-
const context = (0, __utils__1.buildExpectationContext)();
|
|
45
|
-
const schema = {
|
|
46
|
-
$location: 'body',
|
|
47
|
-
$jsonPath: '$.foo[*]',
|
|
48
|
-
$value: { test: true },
|
|
49
|
-
};
|
|
50
|
-
expect((0, merge_operator_1.default)('manipulation', schema, context, { exploreNestedSchema: utils_1.exploreNestedExpectationSchema })).toBeTruthy();
|
|
51
|
-
expect(context.body.foo[0].test).toBeTruthy();
|
|
52
|
-
expect(context.body.foo[1].test).toBeTruthy();
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
//# sourceMappingURL=merge.operator.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"merge.operator.spec.js","sourceRoot":"","sources":["../../../../../src/server/expectations/operators/merge.operator.spec.ts"],"names":[],"mappings":";;;;;AAAA,2CAAuD;AACvD,oCAA0D;AAE1D,sEAAwC;AAExC,QAAQ,CAAC,8BAA8B,EAAE,GAAG,EAAE;IAC5C,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;QACvC,MAAM,MAAM,GAAmC,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;QACtE,MAAM,CAAC,IAAA,wBAAQ,EAAC,cAAc,EAAE,MAAM,EAAO,EAAE,EAAE,EAAE,mBAAmB,EAAE,sCAA8B,EAAE,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;IAC1H,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;QAC/C,MAAM,CAAC,IAAA,wBAAQ,EAAC,cAAc,EAAE,EAAE,EAAO,EAAE,EAAE,EAAE,mBAAmB,EAAE,sCAA8B,EAAE,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;IACtH,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8CAA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