@bitblit/ratchet-epsilon-common 4.0.98-alpha → 4.0.102-alpha
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/dist/{types/background → background}/background-dynamo-log-table-handler.d.ts +3 -3
- package/dist/{es/background → background}/background-dynamo-log-table-handler.js +6 -2
- package/dist/{types/background → background}/background-execution-event.d.ts +1 -1
- package/dist/{types/background → background}/background-execution-listener.d.ts +1 -1
- package/dist/{types/background → background}/background-handler.d.ts +5 -9
- package/dist/{es/background → background}/background-handler.js +15 -7
- package/dist/{types/background → background}/background-http-adapter-handler.d.ts +7 -11
- package/dist/{es/background → background}/background-http-adapter-handler.js +13 -8
- package/dist/{types/background → background}/background-queue-response-internal.d.ts +1 -1
- package/dist/{types/background → background}/background-validator.d.ts +5 -8
- package/dist/{es/background → background}/background-validator.js +5 -3
- package/dist/{es/background → background}/epsilon-background-process-error.js +6 -1
- package/dist/{types/background → background}/internal-background-entry.d.ts +1 -1
- package/dist/{types/background → background}/manager/abstract-background-manager.d.ts +3 -10
- package/dist/{es/background → background}/manager/abstract-background-manager.js +5 -4
- package/dist/{types/background → background}/manager/aws-sqs-sns-background-manager.d.ts +4 -11
- package/dist/{es/background → background}/manager/aws-sqs-sns-background-manager.js +9 -5
- package/dist/{types/background → background}/manager/background-manager-like.d.ts +2 -9
- package/dist/background/manager/background-manager.spec.js +73 -0
- package/dist/{types/background → background}/manager/single-thread-local-background-manager.d.ts +3 -10
- package/dist/{es/background → background}/manager/single-thread-local-background-manager.js +3 -3
- package/dist/{types/background → background}/s3-background-transaction-logger.d.ts +2 -2
- package/dist/{es/background → background}/s3-background-transaction-logger.js +6 -3
- package/dist/{types/build → build}/ratchet-epsilon-common-info.d.ts +1 -1
- package/dist/{types/built-in → built-in}/background/echo-processor.d.ts +2 -2
- package/dist/{es/built-in → built-in}/background/echo-processor.js +4 -3
- package/dist/{types/built-in → built-in}/background/log-and-enqueue-echo-processor.d.ts +2 -2
- package/dist/{es/built-in → built-in}/background/log-and-enqueue-echo-processor.js +2 -2
- package/dist/{types/built-in → built-in}/background/log-message-background-error-processor.d.ts +2 -2
- package/dist/{es/built-in → built-in}/background/log-message-background-error-processor.js +1 -1
- package/dist/{types/built-in → built-in}/background/no-op-processor.d.ts +2 -2
- package/dist/{es/built-in → built-in}/background/no-op-processor.js +1 -1
- package/dist/{types/built-in → built-in}/background/retry-processor.d.ts +2 -2
- package/dist/{es/built-in → built-in}/background/retry-processor.js +8 -4
- package/dist/{types/built-in → built-in}/background/sample-delay-processor.d.ts +2 -2
- package/dist/{es/built-in → built-in}/background/sample-delay-processor.js +2 -1
- package/dist/{types/built-in → built-in}/background/sample-input-validated-processor.d.ts +3 -3
- package/dist/{es/built-in → built-in}/background/sample-input-validated-processor.js +1 -1
- package/dist/{es/built-in → built-in}/built-in-trace-id-generators.js +2 -2
- package/dist/{types/built-in → built-in}/daemon/daemon-authorizer-function.d.ts +2 -2
- package/dist/{types/built-in → built-in}/daemon/daemon-config.d.ts +2 -2
- package/dist/{types/built-in → built-in}/daemon/daemon-group-selection-function.d.ts +1 -1
- package/dist/{types/built-in → built-in}/daemon/daemon-handler.d.ts +6 -12
- package/dist/{es/built-in → built-in}/daemon/daemon-handler.js +9 -8
- package/dist/built-in/daemon/daemon-process-state-list.d.ts +5 -0
- package/dist/{types/built-in → built-in}/http/apollo-filter.d.ts +2 -2
- package/dist/{es/built-in → built-in}/http/apollo-filter.js +6 -5
- package/dist/{types/built-in → built-in}/http/built-in-auth-filters.d.ts +3 -3
- package/dist/{es/built-in → built-in}/http/built-in-auth-filters.js +5 -5
- package/dist/{types/built-in → built-in}/http/built-in-authorizers.d.ts +2 -2
- package/dist/{es/built-in → built-in}/http/built-in-authorizers.js +1 -1
- package/dist/{types/built-in → built-in}/http/built-in-filters.d.ts +2 -2
- package/dist/{es/built-in → built-in}/http/built-in-filters.js +9 -9
- package/dist/{types/built-in → built-in}/http/built-in-handlers.d.ts +2 -2
- package/dist/{es/built-in → built-in}/http/built-in-handlers.js +10 -10
- package/dist/{types/built-in → built-in}/http/log-level-manipulation-filter.d.ts +1 -4
- package/dist/{es/built-in → built-in}/http/log-level-manipulation-filter.js +2 -2
- package/dist/{types/built-in → built-in}/http/run-handler-as-filter.d.ts +5 -5
- package/dist/{es/built-in → built-in}/http/run-handler-as-filter.js +8 -8
- package/dist/built-in/http/run-handler-as-filter.spec.js +40 -0
- package/dist/{types/cli-bootstrap → cli-bootstrap}/ratchet-cli-handler.d.ts +2 -2
- package/dist/{es/cli-bootstrap → cli-bootstrap}/ratchet-cli-handler.js +6 -6
- package/dist/cli-bootstrap/run-background-process-from-command-line.d.ts +3 -0
- package/dist/{es/cli-bootstrap → cli-bootstrap}/run-background-process-from-command-line.js +2 -2
- package/dist/{types/config → config}/background/background-config.d.ts +4 -4
- package/dist/{types/config → config}/background/background-error-processor.d.ts +1 -1
- package/dist/{types/config → config}/background/background-processor.d.ts +1 -1
- package/dist/{types/config → config}/background/background-transaction-log.d.ts +1 -1
- package/dist/{types/config → config}/background/background-transaction-logger.d.ts +1 -1
- package/dist/config/cron/cron-background-entry.d.ts +6 -0
- package/dist/{types/config → config}/cron/cron-config.d.ts +1 -1
- package/dist/{types/config → config}/dynamo-db-config.d.ts +1 -1
- package/dist/{types/config → config}/epsilon-config.d.ts +8 -8
- package/dist/{types/config → config}/epsilon-logger-config.d.ts +3 -2
- package/dist/{types/config → config}/http/authorizer-function.d.ts +3 -3
- package/dist/{types/config → config}/http/extended-api-gateway-event.d.ts +1 -1
- package/dist/{types/config → config}/http/filter-chain-context.d.ts +4 -4
- package/dist/{types/config → config}/http/filter-function.d.ts +1 -1
- package/dist/{types/config → config}/http/handler-function.d.ts +1 -1
- package/dist/{types/config → config}/http/http-config.d.ts +5 -5
- package/dist/{types/config → config}/http/http-processing-config.d.ts +2 -2
- package/dist/{types/config → config}/http/mapped-http-processing-config.d.ts +1 -1
- package/dist/{types/config → config}/inter-api/inter-api-config.d.ts +2 -2
- package/dist/config/inter-api/inter-api-process-mapping.d.ts +6 -0
- package/dist/{types/config → config}/open-api/open-api-document.d.ts +2 -2
- package/dist/{types/config → config}/s3-config.d.ts +1 -1
- package/dist/{types/config → config}/sns-config.d.ts +1 -1
- package/dist/{es/epsilon-build-properties.js → epsilon-build-properties.js} +1 -1
- package/dist/{types/epsilon-constants.d.ts → epsilon-constants.d.ts} +1 -1
- package/dist/{es/epsilon-constants.js → epsilon-constants.js} +13 -12
- package/dist/{types/epsilon-global-handler.d.ts → epsilon-global-handler.d.ts} +3 -6
- package/dist/{es/epsilon-global-handler.js → epsilon-global-handler.js} +23 -18
- package/dist/{types/epsilon-instance.d.ts → epsilon-instance.d.ts} +6 -11
- package/dist/epsilon-logging-extension-processor.d.ts +6 -0
- package/dist/{es/epsilon-logging-extension-processor.js → epsilon-logging-extension-processor.js} +1 -1
- package/dist/{types/http → http}/auth/api-gateway-adapter-authentication-handler.d.ts +0 -10
- package/dist/{es/http → http}/auth/api-gateway-adapter-authentication-handler.js +4 -3
- package/dist/{types/http → http}/auth/auth0-web-token-manipulator.d.ts +2 -2
- package/dist/{es/http → http}/auth/auth0-web-token-manipulator.js +6 -1
- package/dist/{types/http → http}/auth/basic-auth-token.d.ts +0 -3
- package/dist/{types/http → http}/auth/google-web-token-manipulator.d.ts +2 -2
- package/dist/{es/http → http}/auth/google-web-token-manipulator.js +6 -3
- package/dist/http/auth/google-web-token-manipulator.spec.js +10 -0
- package/dist/{types/http → http}/auth/jwt-ratchet-local-web-token-manipulator.d.ts +3 -5
- package/dist/{es/http → http}/auth/jwt-ratchet-local-web-token-manipulator.js +5 -3
- package/dist/{types/http → http}/auth/local-web-token-manipulator.d.ts +4 -5
- package/dist/{es/http → http}/auth/local-web-token-manipulator.js +9 -5
- package/dist/http/auth/local-web-token-manipulator.spec.js +24 -0
- package/dist/{types/http → http}/auth/web-token-manipulator.d.ts +1 -4
- package/dist/{types/http → http}/error/bad-gateway.d.ts +1 -1
- package/dist/{es/http → http}/error/bad-gateway.js +2 -2
- package/dist/{types/http → http}/error/bad-request-error.d.ts +1 -1
- package/dist/{es/http → http}/error/bad-request-error.js +2 -2
- package/dist/{types/http → http}/error/conflict-error.d.ts +1 -1
- package/dist/{es/http → http}/error/conflict-error.js +2 -2
- package/dist/{es/http → http}/error/epsilon-http-error.js +9 -3
- package/dist/http/error/epsilon-http-error.spec.js +11 -0
- package/dist/{types/http → http}/error/forbidden-error.d.ts +1 -1
- package/dist/{es/http → http}/error/forbidden-error.js +2 -2
- package/dist/{types/http → http}/error/gateway-timeout.d.ts +1 -1
- package/dist/{es/http → http}/error/gateway-timeout.js +2 -2
- package/dist/{types/http → http}/error/method-not-allowed-error.d.ts +1 -1
- package/dist/{es/http → http}/error/method-not-allowed-error.js +2 -2
- package/dist/{types/http → http}/error/misconfigured-error.d.ts +1 -1
- package/dist/{es/http → http}/error/misconfigured-error.js +2 -2
- package/dist/{types/http → http}/error/not-found-error.d.ts +1 -1
- package/dist/{es/http → http}/error/not-found-error.js +2 -2
- package/dist/{types/http → http}/error/not-implemented.d.ts +1 -1
- package/dist/{es/http → http}/error/not-implemented.js +2 -2
- package/dist/{types/http → http}/error/request-timeout-error.d.ts +1 -1
- package/dist/{es/http → http}/error/request-timeout-error.js +2 -2
- package/dist/{types/http → http}/error/service-unavailable.d.ts +1 -1
- package/dist/{es/http → http}/error/service-unavailable.js +2 -2
- package/dist/{types/http → http}/error/too-many-requests-error.d.ts +1 -1
- package/dist/{es/http → http}/error/too-many-requests-error.js +2 -2
- package/dist/{types/http → http}/error/unauthorized-error.d.ts +1 -1
- package/dist/{es/http → http}/error/unauthorized-error.js +2 -2
- package/dist/{types/http → http}/event-util.d.ts +3 -25
- package/dist/{es/http → http}/event-util.js +9 -8
- package/dist/http/event-util.spec.js +157 -0
- package/dist/{types/http → http}/response-util.d.ts +2 -2
- package/dist/{es/http → http}/response-util.js +2 -2
- package/dist/http/response-util.spec.d.ts +1 -0
- package/dist/http/response-util.spec.js +88 -0
- package/dist/http/route/epsilon-router.d.ts +8 -0
- package/dist/http/route/epsilon-router.js +1 -0
- package/dist/http/route/extended-auth-response-context.js +1 -0
- package/dist/{types/http → http}/route/route-mapping.d.ts +3 -3
- package/dist/http/route/route-mapping.js +1 -0
- package/dist/http/route/route-validator-config.js +1 -0
- package/dist/{types/http → http}/route/router-util.d.ts +9 -12
- package/dist/{es/http → http}/route/router-util.js +10 -10
- package/dist/http/route/router-util.spec.d.ts +1 -0
- package/dist/http/route/router-util.spec.js +23 -0
- package/dist/{types/http → http}/web-handler.d.ts +4 -7
- package/dist/{es/http → http}/web-handler.js +11 -10
- package/dist/http/web-handler.spec.d.ts +1 -0
- package/dist/http/web-handler.spec.js +32 -0
- package/dist/{types/http → http}/web-v2-handler.d.ts +2 -5
- package/dist/{es/http → http}/web-v2-handler.js +3 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/inter-api/inter-api-entry.js +1 -0
- package/dist/{types/inter-api → inter-api}/inter-api-util.d.ts +3 -3
- package/dist/{es/inter-api → inter-api}/inter-api-util.js +6 -5
- package/dist/inter-api/inter-api-util.spec.d.ts +1 -0
- package/dist/inter-api/inter-api-util.spec.js +61 -0
- package/dist/{types/inter-api-manager.d.ts → inter-api-manager.d.ts} +2 -5
- package/dist/{es/inter-api-manager.js → inter-api-manager.js} +5 -3
- package/dist/{types/lambda-event-handler → lambda-event-handler}/cron-epsilon-lambda-event-handler.d.ts +5 -5
- package/dist/{es/lambda-event-handler → lambda-event-handler}/cron-epsilon-lambda-event-handler.js +5 -4
- package/dist/lambda-event-handler/cron-epsilon-lambda-event-handler.spec.d.ts +1 -0
- package/dist/lambda-event-handler/cron-epsilon-lambda-event-handler.spec.js +50 -0
- package/dist/{types/lambda-event-handler → lambda-event-handler}/dynamo-epsilon-lambda-event-handler.d.ts +2 -2
- package/dist/{es/lambda-event-handler → lambda-event-handler}/dynamo-epsilon-lambda-event-handler.js +4 -3
- package/dist/{types/lambda-event-handler → lambda-event-handler}/generic-sns-epsilon-lambda-event-handler.d.ts +2 -2
- package/dist/{es/lambda-event-handler → lambda-event-handler}/generic-sns-epsilon-lambda-event-handler.js +4 -3
- package/dist/{types/lambda-event-handler → lambda-event-handler}/inter-api-epsilon-lambda-event-handler.d.ts +2 -2
- package/dist/{es/lambda-event-handler → lambda-event-handler}/inter-api-epsilon-lambda-event-handler.js +2 -1
- package/dist/{types/lambda-event-handler → lambda-event-handler}/s3-epsilon-lambda-event-handler.d.ts +2 -2
- package/dist/{es/lambda-event-handler → lambda-event-handler}/s3-epsilon-lambda-event-handler.js +4 -3
- package/dist/{types/local-container-server.d.ts → local-container-server.d.ts} +1 -4
- package/dist/{es/local-container-server.js → local-container-server.js} +8 -4
- package/dist/local-server-cert.js +67 -0
- package/dist/{types/local-server.d.ts → local-server.d.ts} +2 -5
- package/dist/{es/local-server.js → local-server.js} +11 -8
- package/dist/open-api-util/open-api-doc-modifications.js +1 -0
- package/dist/{types/open-api-util → open-api-util}/open-api-doc-modifier.d.ts +1 -4
- package/dist/{es/open-api-util → open-api-util}/open-api-doc-modifier.js +2 -1
- package/dist/open-api-util/open-api-doc-modifier.spec.d.ts +1 -0
- package/dist/open-api-util/open-api-doc-modifier.spec.js +16 -0
- package/dist/{es/open-api-util → open-api-util}/yaml-combiner.js +2 -2
- package/dist/open-api-util/yaml-combiner.spec.d.ts +1 -0
- package/dist/open-api-util/yaml-combiner.spec.js +22 -0
- package/dist/{types/sample → sample}/sample-server-components.d.ts +2 -2
- package/dist/{es/sample → sample}/sample-server-components.js +25 -24
- package/dist/sample/sample-server-static-files.js +593 -0
- package/dist/{types/sample → sample}/test-error-server.d.ts +1 -4
- package/dist/{es/sample → sample}/test-error-server.js +4 -2
- package/dist/{types/util → util}/context-util.d.ts +3 -3
- package/dist/{es/util → util}/context-util.js +11 -5
- package/dist/{types/util → util}/cron-util.d.ts +2 -2
- package/dist/{es/util → util}/cron-util.js +3 -3
- package/dist/util/cron-util.spec.d.ts +1 -0
- package/dist/util/cron-util.spec.js +124 -0
- package/dist/{types/util → util}/epsilon-config-parser.d.ts +6 -6
- package/dist/{es/util → util}/epsilon-config-parser.js +9 -9
- package/includes/cli.js +8 -10
- package/package.json +16 -19
- package/dist/cjs/background/background-dynamo-log-table-handler.js +0 -38
- package/dist/cjs/background/background-entry.js +0 -2
- package/dist/cjs/background/background-execution-event-type.js +0 -11
- package/dist/cjs/background/background-execution-event.js +0 -2
- package/dist/cjs/background/background-execution-listener.js +0 -2
- package/dist/cjs/background/background-handler.js +0 -269
- package/dist/cjs/background/background-http-adapter-handler.js +0 -127
- package/dist/cjs/background/background-meta-response-internal.js +0 -2
- package/dist/cjs/background/background-process-handling.js +0 -8
- package/dist/cjs/background/background-process-log-table-entry.js +0 -2
- package/dist/cjs/background/background-queue-response-internal.js +0 -2
- package/dist/cjs/background/background-validator.js +0 -88
- package/dist/cjs/background/epsilon-background-process-error.js +0 -93
- package/dist/cjs/background/internal-background-entry.js +0 -2
- package/dist/cjs/background/manager/abstract-background-manager.js +0 -92
- package/dist/cjs/background/manager/aws-sqs-sns-background-manager.js +0 -153
- package/dist/cjs/background/manager/background-manager-like.js +0 -2
- package/dist/cjs/background/manager/single-thread-local-background-manager.js +0 -49
- package/dist/cjs/background/s3-background-transaction-logger.js +0 -54
- package/dist/cjs/build/ratchet-epsilon-common-info.js +0 -18
- package/dist/cjs/built-in/background/echo-processor.js +0 -18
- package/dist/cjs/built-in/background/log-and-enqueue-echo-processor.js +0 -16
- package/dist/cjs/built-in/background/log-message-background-error-processor.js +0 -10
- package/dist/cjs/built-in/background/no-op-processor.js +0 -13
- package/dist/cjs/built-in/background/retry-processor.js +0 -41
- package/dist/cjs/built-in/background/sample-delay-processor.js +0 -16
- package/dist/cjs/built-in/background/sample-input-validated-processor-data.js +0 -2
- package/dist/cjs/built-in/background/sample-input-validated-processor.js +0 -16
- package/dist/cjs/built-in/built-in-trace-id-generators.js +0 -25
- package/dist/cjs/built-in/daemon/daemon-authorizer-function.js +0 -2
- package/dist/cjs/built-in/daemon/daemon-config.js +0 -2
- package/dist/cjs/built-in/daemon/daemon-group-selection-function.js +0 -2
- package/dist/cjs/built-in/daemon/daemon-handler.js +0 -62
- package/dist/cjs/built-in/daemon/daemon-process-state-list.js +0 -2
- package/dist/cjs/built-in/http/apollo-filter.js +0 -63
- package/dist/cjs/built-in/http/built-in-auth-filters.js +0 -115
- package/dist/cjs/built-in/http/built-in-authorizers.js +0 -43
- package/dist/cjs/built-in/http/built-in-filters.js +0 -222
- package/dist/cjs/built-in/http/built-in-handlers.js +0 -73
- package/dist/cjs/built-in/http/log-level-manipulation-filter.js +0 -20
- package/dist/cjs/built-in/http/run-handler-as-filter.js +0 -64
- package/dist/cjs/cli-bootstrap/ratchet-cli-handler.js +0 -24
- package/dist/cjs/cli-bootstrap/run-background-process-from-command-line.js +0 -26
- package/dist/cjs/config/background/background-aws-config.js +0 -2
- package/dist/cjs/config/background/background-config.js +0 -2
- package/dist/cjs/config/background/background-error-processor.js +0 -2
- package/dist/cjs/config/background/background-processor.js +0 -2
- package/dist/cjs/config/background/background-transaction-log.js +0 -2
- package/dist/cjs/config/background/background-transaction-logger.js +0 -2
- package/dist/cjs/config/cron/abstract-cron-entry.js +0 -2
- package/dist/cjs/config/cron/cron-background-entry.js +0 -2
- package/dist/cjs/config/cron/cron-config.js +0 -2
- package/dist/cjs/config/dynamo-db-config.js +0 -2
- package/dist/cjs/config/epsilon-config.js +0 -2
- package/dist/cjs/config/epsilon-lambda-event-handler.js +0 -2
- package/dist/cjs/config/epsilon-logger-config.js +0 -2
- package/dist/cjs/config/generic-aws-event-handler-function.js +0 -2
- package/dist/cjs/config/http/authorizer-function.js +0 -2
- package/dist/cjs/config/http/epsilon-authorization-context.js +0 -2
- package/dist/cjs/config/http/extended-api-gateway-event.js +0 -2
- package/dist/cjs/config/http/filter-chain-context.js +0 -2
- package/dist/cjs/config/http/filter-function.js +0 -2
- package/dist/cjs/config/http/handler-function.js +0 -2
- package/dist/cjs/config/http/http-config.js +0 -2
- package/dist/cjs/config/http/http-processing-config.js +0 -2
- package/dist/cjs/config/http/mapped-http-processing-config.js +0 -2
- package/dist/cjs/config/http/null-returned-object-handling.js +0 -9
- package/dist/cjs/config/inter-api/inter-api-aws-config.js +0 -2
- package/dist/cjs/config/inter-api/inter-api-config.js +0 -2
- package/dist/cjs/config/inter-api/inter-api-process-mapping.js +0 -2
- package/dist/cjs/config/logging-trace-id-generator.js +0 -2
- package/dist/cjs/config/open-api/open-api-document-components.js +0 -2
- package/dist/cjs/config/open-api/open-api-document-path.js +0 -2
- package/dist/cjs/config/open-api/open-api-document.js +0 -2
- package/dist/cjs/config/s3-config.js +0 -2
- package/dist/cjs/config/sns-config.js +0 -2
- package/dist/cjs/epsilon-build-properties.js +0 -28
- package/dist/cjs/epsilon-constants.js +0 -49
- package/dist/cjs/epsilon-global-handler.js +0 -155
- package/dist/cjs/epsilon-instance.js +0 -2
- package/dist/cjs/epsilon-logging-extension-processor.js +0 -19
- package/dist/cjs/http/auth/api-gateway-adapter-authentication-handler.js +0 -75
- package/dist/cjs/http/auth/auth0-web-token-manipulator.js +0 -62
- package/dist/cjs/http/auth/basic-auth-token.js +0 -2
- package/dist/cjs/http/auth/google-web-token-manipulator.js +0 -72
- package/dist/cjs/http/auth/jwt-ratchet-local-web-token-manipulator.js +0 -29
- package/dist/cjs/http/auth/local-web-token-manipulator.js +0 -74
- package/dist/cjs/http/auth/web-token-manipulator.js +0 -2
- package/dist/cjs/http/error/bad-gateway.js +0 -12
- package/dist/cjs/http/error/bad-request-error.js +0 -12
- package/dist/cjs/http/error/conflict-error.js +0 -12
- package/dist/cjs/http/error/epsilon-http-error.js +0 -132
- package/dist/cjs/http/error/forbidden-error.js +0 -12
- package/dist/cjs/http/error/gateway-timeout.js +0 -12
- package/dist/cjs/http/error/method-not-allowed-error.js +0 -12
- package/dist/cjs/http/error/misconfigured-error.js +0 -12
- package/dist/cjs/http/error/not-found-error.js +0 -12
- package/dist/cjs/http/error/not-implemented.js +0 -12
- package/dist/cjs/http/error/request-timeout-error.js +0 -12
- package/dist/cjs/http/error/service-unavailable.js +0 -12
- package/dist/cjs/http/error/too-many-requests-error.js +0 -12
- package/dist/cjs/http/error/unauthorized-error.js +0 -12
- package/dist/cjs/http/event-util.js +0 -180
- package/dist/cjs/http/response-util.js +0 -146
- package/dist/cjs/http/route/epsilon-router.js +0 -2
- package/dist/cjs/http/route/extended-auth-response-context.js +0 -2
- package/dist/cjs/http/route/route-mapping.js +0 -2
- package/dist/cjs/http/route/route-validator-config.js +0 -2
- package/dist/cjs/http/route/router-util.js +0 -238
- package/dist/cjs/http/web-handler.js +0 -122
- package/dist/cjs/http/web-v2-handler.js +0 -25
- package/dist/cjs/index.js +0 -135
- package/dist/cjs/inter-api/inter-api-entry.js +0 -2
- package/dist/cjs/inter-api/inter-api-util.js +0 -62
- package/dist/cjs/inter-api-manager.js +0 -67
- package/dist/cjs/lambda-event-handler/cron-epsilon-lambda-event-handler.js +0 -76
- package/dist/cjs/lambda-event-handler/dynamo-epsilon-lambda-event-handler.js +0 -36
- package/dist/cjs/lambda-event-handler/generic-sns-epsilon-lambda-event-handler.js +0 -32
- package/dist/cjs/lambda-event-handler/inter-api-epsilon-lambda-event-handler.js +0 -26
- package/dist/cjs/lambda-event-handler/s3-epsilon-lambda-event-handler.js +0 -44
- package/dist/cjs/local-container-server.js +0 -77
- package/dist/cjs/local-server-cert.js +0 -71
- package/dist/cjs/local-server.js +0 -164
- package/dist/cjs/open-api-util/open-api-doc-modifications.js +0 -2
- package/dist/cjs/open-api-util/open-api-doc-modifier.js +0 -83
- package/dist/cjs/open-api-util/yaml-combiner.js +0 -32
- package/dist/cjs/sample/sample-server-components.js +0 -188
- package/dist/cjs/sample/sample-server-static-files.js +0 -597
- package/dist/cjs/sample/test-error-server.js +0 -47
- package/dist/cjs/util/aws-util.js +0 -69
- package/dist/cjs/util/context-util.js +0 -104
- package/dist/cjs/util/cron-util.js +0 -72
- package/dist/cjs/util/epsilon-config-parser.js +0 -71
- package/dist/es/index.js +0 -132
- package/dist/es/local-server-cert.js +0 -67
- package/dist/es/sample/sample-server-static-files.js +0 -593
- package/dist/tsconfig.cjs.tsbuildinfo +0 -1
- package/dist/tsconfig.es.tsbuildinfo +0 -1
- package/dist/tsconfig.types.tsbuildinfo +0 -1
- package/dist/types/built-in/daemon/daemon-process-state-list.d.ts +0 -8
- package/dist/types/cli-bootstrap/run-background-process-from-command-line.d.ts +0 -12
- package/dist/types/config/cron/cron-background-entry.d.ts +0 -15
- package/dist/types/config/inter-api/inter-api-process-mapping.d.ts +0 -11
- package/dist/types/epsilon-logging-extension-processor.d.ts +0 -5
- package/dist/types/http/route/epsilon-router.d.ts +0 -8
- package/dist/types/index.d.ts +0 -135
- /package/dist/{types/background → background}/background-entry.d.ts +0 -0
- /package/dist/{es/background → background}/background-entry.js +0 -0
- /package/dist/{types/background → background}/background-execution-event-type.d.ts +0 -0
- /package/dist/{es/background → background}/background-execution-event-type.js +0 -0
- /package/dist/{es/background → background}/background-execution-event.js +0 -0
- /package/dist/{es/background → background}/background-execution-listener.js +0 -0
- /package/dist/{types/background → background}/background-meta-response-internal.d.ts +0 -0
- /package/dist/{es/background → background}/background-meta-response-internal.js +0 -0
- /package/dist/{types/background → background}/background-process-handling.d.ts +0 -0
- /package/dist/{es/background → background}/background-process-handling.js +0 -0
- /package/dist/{types/background → background}/background-process-log-table-entry.d.ts +0 -0
- /package/dist/{es/background → background}/background-process-log-table-entry.js +0 -0
- /package/dist/{es/background → background}/background-queue-response-internal.js +0 -0
- /package/dist/{types/background → background}/epsilon-background-process-error.d.ts +0 -0
- /package/dist/{es/background → background}/internal-background-entry.js +0 -0
- /package/dist/{es/background → background}/manager/background-manager-like.js +0 -0
- /package/dist/{es/built-in/background/sample-input-validated-processor-data.js → background/manager/background-manager.spec.d.ts} +0 -0
- /package/dist/{es/build → build}/ratchet-epsilon-common-info.js +0 -0
- /package/dist/{types/built-in → built-in}/background/sample-input-validated-processor-data.d.ts +0 -0
- /package/dist/{es/built-in/daemon/daemon-authorizer-function.js → built-in/background/sample-input-validated-processor-data.js} +0 -0
- /package/dist/{types/built-in → built-in}/built-in-trace-id-generators.d.ts +0 -0
- /package/dist/{es/built-in/daemon/daemon-config.js → built-in/daemon/daemon-authorizer-function.js} +0 -0
- /package/dist/{es/built-in/daemon/daemon-group-selection-function.js → built-in/daemon/daemon-config.js} +0 -0
- /package/dist/{es/built-in/daemon/daemon-process-state-list.js → built-in/daemon/daemon-group-selection-function.js} +0 -0
- /package/dist/{es/config/background/background-aws-config.js → built-in/daemon/daemon-process-state-list.js} +0 -0
- /package/dist/{es/config/background/background-config.js → built-in/http/run-handler-as-filter.spec.d.ts} +0 -0
- /package/dist/{types/config → config}/background/background-aws-config.d.ts +0 -0
- /package/dist/{es/config/background/background-error-processor.js → config/background/background-aws-config.js} +0 -0
- /package/dist/{es/config/background/background-processor.js → config/background/background-config.js} +0 -0
- /package/dist/{es/config/background/background-transaction-log.js → config/background/background-error-processor.js} +0 -0
- /package/dist/{es/config/background/background-transaction-logger.js → config/background/background-processor.js} +0 -0
- /package/dist/{es/config/cron/abstract-cron-entry.js → config/background/background-transaction-log.js} +0 -0
- /package/dist/{es/config/cron/cron-background-entry.js → config/background/background-transaction-logger.js} +0 -0
- /package/dist/{types/config → config}/cron/abstract-cron-entry.d.ts +0 -0
- /package/dist/{es/config/cron/cron-config.js → config/cron/abstract-cron-entry.js} +0 -0
- /package/dist/{es/config/dynamo-db-config.js → config/cron/cron-background-entry.js} +0 -0
- /package/dist/{es/config/epsilon-config.js → config/cron/cron-config.js} +0 -0
- /package/dist/{es/config/epsilon-lambda-event-handler.js → config/dynamo-db-config.js} +0 -0
- /package/dist/{es/config/epsilon-logger-config.js → config/epsilon-config.js} +0 -0
- /package/dist/{types/config → config}/epsilon-lambda-event-handler.d.ts +0 -0
- /package/dist/{es/config/generic-aws-event-handler-function.js → config/epsilon-lambda-event-handler.js} +0 -0
- /package/dist/{es/config/http/authorizer-function.js → config/epsilon-logger-config.js} +0 -0
- /package/dist/{types/config → config}/generic-aws-event-handler-function.d.ts +0 -0
- /package/dist/{es/config/http/epsilon-authorization-context.js → config/generic-aws-event-handler-function.js} +0 -0
- /package/dist/{es/config/http/extended-api-gateway-event.js → config/http/authorizer-function.js} +0 -0
- /package/dist/{types/config → config}/http/epsilon-authorization-context.d.ts +0 -0
- /package/dist/{es/config/http/filter-chain-context.js → config/http/epsilon-authorization-context.js} +0 -0
- /package/dist/{es/config/http/filter-function.js → config/http/extended-api-gateway-event.js} +0 -0
- /package/dist/{es/config/http/handler-function.js → config/http/filter-chain-context.js} +0 -0
- /package/dist/{es/config/http/http-config.js → config/http/filter-function.js} +0 -0
- /package/dist/{es/config/http/http-processing-config.js → config/http/handler-function.js} +0 -0
- /package/dist/{es/config/http/mapped-http-processing-config.js → config/http/http-config.js} +0 -0
- /package/dist/{es/config/inter-api/inter-api-aws-config.js → config/http/http-processing-config.js} +0 -0
- /package/dist/{es/config/inter-api/inter-api-config.js → config/http/mapped-http-processing-config.js} +0 -0
- /package/dist/{types/config → config}/http/null-returned-object-handling.d.ts +0 -0
- /package/dist/{es/config → config}/http/null-returned-object-handling.js +0 -0
- /package/dist/{types/config → config}/inter-api/inter-api-aws-config.d.ts +0 -0
- /package/dist/{es/config/inter-api/inter-api-process-mapping.js → config/inter-api/inter-api-aws-config.js} +0 -0
- /package/dist/{es/config/logging-trace-id-generator.js → config/inter-api/inter-api-config.js} +0 -0
- /package/dist/{es/config/open-api/open-api-document-components.js → config/inter-api/inter-api-process-mapping.js} +0 -0
- /package/dist/{types/config → config}/logging-trace-id-generator.d.ts +0 -0
- /package/dist/{es/config/open-api/open-api-document-path.js → config/logging-trace-id-generator.js} +0 -0
- /package/dist/{types/config → config}/open-api/open-api-document-components.d.ts +0 -0
- /package/dist/{es/config/open-api/open-api-document.js → config/open-api/open-api-document-components.js} +0 -0
- /package/dist/{types/config → config}/open-api/open-api-document-path.d.ts +0 -0
- /package/dist/{es/config/s3-config.js → config/open-api/open-api-document-path.js} +0 -0
- /package/dist/{es/config/sns-config.js → config/open-api/open-api-document.js} +0 -0
- /package/dist/{es/epsilon-instance.js → config/s3-config.js} +0 -0
- /package/dist/{es/http/auth/basic-auth-token.js → config/sns-config.js} +0 -0
- /package/dist/{types/epsilon-build-properties.d.ts → epsilon-build-properties.d.ts} +0 -0
- /package/dist/{es/http/auth/web-token-manipulator.js → epsilon-instance.js} +0 -0
- /package/dist/{es/http/route/epsilon-router.js → http/auth/basic-auth-token.js} +0 -0
- /package/dist/{es/http/route/extended-auth-response-context.js → http/auth/google-web-token-manipulator.spec.d.ts} +0 -0
- /package/dist/{es/http/route/route-mapping.js → http/auth/local-web-token-manipulator.spec.d.ts} +0 -0
- /package/dist/{es/http/route/route-validator-config.js → http/auth/web-token-manipulator.js} +0 -0
- /package/dist/{types/http → http}/error/epsilon-http-error.d.ts +0 -0
- /package/dist/{es/inter-api/inter-api-entry.js → http/error/epsilon-http-error.spec.d.ts} +0 -0
- /package/dist/{es/open-api-util/open-api-doc-modifications.js → http/event-util.spec.d.ts} +0 -0
- /package/dist/{types/http → http}/route/extended-auth-response-context.d.ts +0 -0
- /package/dist/{types/http → http}/route/route-validator-config.d.ts +0 -0
- /package/dist/{types/inter-api → inter-api}/inter-api-entry.d.ts +0 -0
- /package/dist/{types/local-server-cert.d.ts → local-server-cert.d.ts} +0 -0
- /package/dist/{types/open-api-util → open-api-util}/open-api-doc-modifications.d.ts +0 -0
- /package/dist/{types/open-api-util → open-api-util}/yaml-combiner.d.ts +0 -0
- /package/dist/{types/sample → sample}/sample-server-static-files.d.ts +0 -0
- /package/dist/{types/util → util}/aws-util.d.ts +0 -0
- /package/dist/{es/util → util}/aws-util.js +0 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { InterApiUtil } from './inter-api-util.js';
|
|
2
|
+
import { JestRatchet } from '@bitblit/ratchet-jest/dist/jest/jest-ratchet.js';
|
|
3
|
+
import { jest } from '@jest/globals';
|
|
4
|
+
describe('#interApiUtil', function () {
|
|
5
|
+
let mockSns;
|
|
6
|
+
let mockSqs;
|
|
7
|
+
let mockBgMgr;
|
|
8
|
+
const evt = {
|
|
9
|
+
Records: [
|
|
10
|
+
{
|
|
11
|
+
EventSource: 'aws:sns',
|
|
12
|
+
EventVersion: '1.0',
|
|
13
|
+
EventSubscriptionArn: 'arn:aws:sns:us-east-1:012345678901:GenericApiEventTopicDev:6efec6a5-1f02-4fc5-b0f7-fa7c013cf8bb',
|
|
14
|
+
Sns: {
|
|
15
|
+
Type: 'Notification',
|
|
16
|
+
MessageId: '205de1e8-7ba6-52f5-b706-b815f442c512',
|
|
17
|
+
TopicArn: 'arn:aws:sns:us-east-1:012345678901:GenericApiEventTopicDev',
|
|
18
|
+
Subject: null,
|
|
19
|
+
Message: '{"type":"EPSILON_INTER_API_EVENT","interApiEvent":{"source":"OriginalApi","type":"Sample","data":{"notes":"SOURCE API: OriginalApi","timestampEpochMS":1636011428200}}}',
|
|
20
|
+
Timestamp: '2021-11-04T07:37:08.241Z',
|
|
21
|
+
SignatureVersion: '1',
|
|
22
|
+
Signature: 'LyS2ybM/Epsq5sFqPJd==',
|
|
23
|
+
SigningCertUrl: 'https://sns.us-east-1.amazonaws.com/SimpleNotificationService-7ff5318490ec183fbaddaa2a969abfda.pem',
|
|
24
|
+
UnsubscribeUrl: 'https://sns.us-east-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-east-1:012345678901:GenericApiEventTopicDev:6efec6a5-1f02-4fc5-b0f7-fa7c013cf8bb',
|
|
25
|
+
MessageAttributes: {},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
};
|
|
30
|
+
beforeEach(() => {
|
|
31
|
+
mockSns = JestRatchet.mock(jest.fn);
|
|
32
|
+
mockSqs = JestRatchet.mock(jest.fn);
|
|
33
|
+
mockBgMgr = JestRatchet.mock(jest.fn);
|
|
34
|
+
});
|
|
35
|
+
it('should translate processes', async () => {
|
|
36
|
+
mockBgMgr.createEntry.mockResolvedValue({ t: 1 });
|
|
37
|
+
mockBgMgr.addEntriesToQueue.mockResolvedValue(['a]']);
|
|
38
|
+
const cfg = {
|
|
39
|
+
aws: {
|
|
40
|
+
source: 'test',
|
|
41
|
+
snsArn: 'test',
|
|
42
|
+
localMode: true,
|
|
43
|
+
},
|
|
44
|
+
processMappings: [
|
|
45
|
+
{
|
|
46
|
+
typeRegex: '.*',
|
|
47
|
+
sourceRegex: '.*',
|
|
48
|
+
disabled: false,
|
|
49
|
+
backgroundProcessTypes: ['TESTBG'],
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
};
|
|
53
|
+
const output = await InterApiUtil.processInterApiEvent(evt, cfg, mockBgMgr);
|
|
54
|
+
expect(output).not.toBeNull();
|
|
55
|
+
expect(output.length).toEqual(1);
|
|
56
|
+
});
|
|
57
|
+
it('should verify that an event is an inter-api even', async () => {
|
|
58
|
+
const res = InterApiUtil.isInterApiSnsEvent(evt);
|
|
59
|
+
expect(res).toBeTruthy();
|
|
60
|
+
}, 500);
|
|
61
|
+
});
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { InterApiEntry } from './inter-api/inter-api-entry';
|
|
2
|
-
import { InterApiAwsConfig } from './config/inter-api/inter-api-aws-config';
|
|
1
|
+
import { InterApiEntry } from './inter-api/inter-api-entry.js';
|
|
2
|
+
import { InterApiAwsConfig } from './config/inter-api/inter-api-aws-config.js';
|
|
3
3
|
import { SNSClient } from '@aws-sdk/client-sns';
|
|
4
|
-
/**
|
|
5
|
-
* Handles all submission of events to the inter-api SNS topic (if any)
|
|
6
|
-
*/
|
|
7
4
|
export declare class InterApiManager {
|
|
8
5
|
private _aws;
|
|
9
6
|
private _sns;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { Logger } from '@bitblit/ratchet-common';
|
|
2
|
-
import { EpsilonConstants } from './epsilon-constants';
|
|
3
|
-
import { InterApiUtil } from './inter-api/inter-api-util';
|
|
1
|
+
import { Logger } from '@bitblit/ratchet-common/dist/logger/logger.js';
|
|
2
|
+
import { EpsilonConstants } from './epsilon-constants.js';
|
|
3
|
+
import { InterApiUtil } from './inter-api/inter-api-util.js';
|
|
4
4
|
import { PublishCommand } from '@aws-sdk/client-sns';
|
|
5
5
|
export class InterApiManager {
|
|
6
|
+
_aws;
|
|
7
|
+
_sns;
|
|
6
8
|
constructor(_aws, _sns) {
|
|
7
9
|
this._aws = _aws;
|
|
8
10
|
this._sns = _sns;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { EpsilonLambdaEventHandler } from '../config/epsilon-lambda-event-handler';
|
|
1
|
+
import { EpsilonLambdaEventHandler } from '../config/epsilon-lambda-event-handler.js';
|
|
2
2
|
import { Context, ProxyResult, ScheduledEvent } from 'aws-lambda';
|
|
3
|
-
import { EpsilonInstance } from '../epsilon-instance';
|
|
4
|
-
import { CronConfig } from '../config/cron/cron-config';
|
|
5
|
-
import { BackgroundHandler } from '../background/background-handler';
|
|
6
|
-
import { BackgroundManagerLike } from '../background/manager/background-manager-like';
|
|
3
|
+
import { EpsilonInstance } from '../epsilon-instance.js';
|
|
4
|
+
import { CronConfig } from '../config/cron/cron-config.js';
|
|
5
|
+
import { BackgroundHandler } from '../background/background-handler.js';
|
|
6
|
+
import { BackgroundManagerLike } from '../background/manager/background-manager-like.js';
|
|
7
7
|
export declare class CronEpsilonLambdaEventHandler implements EpsilonLambdaEventHandler<ScheduledEvent> {
|
|
8
8
|
private _epsilon;
|
|
9
9
|
constructor(_epsilon: EpsilonInstance);
|
package/dist/{es/lambda-event-handler → lambda-event-handler}/cron-epsilon-lambda-event-handler.js
RENAMED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { Logger } from '@bitblit/ratchet-common';
|
|
2
|
-
import { AwsUtil } from '../util/aws-util';
|
|
3
|
-
import { CronUtil } from '../util/cron-util';
|
|
4
|
-
import { LambdaEventDetector } from '@bitblit/ratchet-aws';
|
|
1
|
+
import { Logger } from '@bitblit/ratchet-common/dist/logger/logger.js';
|
|
2
|
+
import { AwsUtil } from '../util/aws-util.js';
|
|
3
|
+
import { CronUtil } from '../util/cron-util.js';
|
|
4
|
+
import { LambdaEventDetector } from '@bitblit/ratchet-aws/dist/lambda/lambda-event-detector.js';
|
|
5
5
|
export class CronEpsilonLambdaEventHandler {
|
|
6
|
+
_epsilon;
|
|
6
7
|
constructor(_epsilon) {
|
|
7
8
|
this._epsilon = _epsilon;
|
|
8
9
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { BackgroundHandler } from '../background/background-handler.js';
|
|
2
|
+
import { JestRatchet } from '@bitblit/ratchet-jest/dist/jest/jest-ratchet.js';
|
|
3
|
+
import { CronEpsilonLambdaEventHandler } from './cron-epsilon-lambda-event-handler.js';
|
|
4
|
+
import { SingleThreadLocalBackgroundManager } from '../background/manager/single-thread-local-background-manager.js';
|
|
5
|
+
import { jest } from '@jest/globals';
|
|
6
|
+
describe('#cronEpsilonLambdaEventHandler', function () {
|
|
7
|
+
let mockSqs;
|
|
8
|
+
let mockSns;
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
mockSqs = JestRatchet.mock(jest.fn);
|
|
11
|
+
mockSns = JestRatchet.mock(jest.fn);
|
|
12
|
+
});
|
|
13
|
+
xit('should verify that cron data functions get executed', async () => {
|
|
14
|
+
const evt = {
|
|
15
|
+
id: '1',
|
|
16
|
+
version: '1',
|
|
17
|
+
account: 'test',
|
|
18
|
+
time: 'test',
|
|
19
|
+
region: '',
|
|
20
|
+
resources: ['test'],
|
|
21
|
+
source: null,
|
|
22
|
+
detail: {},
|
|
23
|
+
'detail-type': null,
|
|
24
|
+
};
|
|
25
|
+
const cronConfig = {
|
|
26
|
+
timezone: 'America/Los_Angeles',
|
|
27
|
+
context: 'Test',
|
|
28
|
+
entries: [
|
|
29
|
+
{
|
|
30
|
+
backgroundTaskType: 'test',
|
|
31
|
+
fireImmediate: true,
|
|
32
|
+
data: () => {
|
|
33
|
+
return { curDate: new Date().toISOString(), fixed: 'abc' };
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
};
|
|
38
|
+
const smConfig = {
|
|
39
|
+
processors: [],
|
|
40
|
+
httpSubmissionPath: '/background/',
|
|
41
|
+
implyTypeFromPathSuffix: true,
|
|
42
|
+
httpMetaEndpoint: '/background-meta',
|
|
43
|
+
};
|
|
44
|
+
const background = new BackgroundHandler(null, null);
|
|
45
|
+
background.getConfig = jest.fn(() => smConfig);
|
|
46
|
+
const backgroundManager = new SingleThreadLocalBackgroundManager();
|
|
47
|
+
const res = await CronEpsilonLambdaEventHandler.processCronEvent(evt, cronConfig, backgroundManager, background);
|
|
48
|
+
expect(res).toBeTruthy();
|
|
49
|
+
}, 500);
|
|
50
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EpsilonLambdaEventHandler } from '../config/epsilon-lambda-event-handler';
|
|
1
|
+
import { EpsilonLambdaEventHandler } from '../config/epsilon-lambda-event-handler.js';
|
|
2
2
|
import { Context, DynamoDBStreamEvent, ProxyResult } from 'aws-lambda';
|
|
3
|
-
import { EpsilonInstance } from '../epsilon-instance';
|
|
3
|
+
import { EpsilonInstance } from '../epsilon-instance.js';
|
|
4
4
|
export declare class DynamoEpsilonLambdaEventHandler implements EpsilonLambdaEventHandler<DynamoDBStreamEvent> {
|
|
5
5
|
private _epsilon;
|
|
6
6
|
constructor(_epsilon: EpsilonInstance);
|
package/dist/{es/lambda-event-handler → lambda-event-handler}/dynamo-epsilon-lambda-event-handler.js
RENAMED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Logger } from '@bitblit/ratchet-common';
|
|
2
|
-
import { AwsUtil } from '../util/aws-util';
|
|
3
|
-
import { LambdaEventDetector } from '@bitblit/ratchet-aws';
|
|
1
|
+
import { Logger } from '@bitblit/ratchet-common/dist/logger/logger.js';
|
|
2
|
+
import { AwsUtil } from '../util/aws-util.js';
|
|
3
|
+
import { LambdaEventDetector } from '@bitblit/ratchet-aws/dist/lambda/lambda-event-detector.js';
|
|
4
4
|
export class DynamoEpsilonLambdaEventHandler {
|
|
5
|
+
_epsilon;
|
|
5
6
|
constructor(_epsilon) {
|
|
6
7
|
this._epsilon = _epsilon;
|
|
7
8
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EpsilonLambdaEventHandler } from '../config/epsilon-lambda-event-handler';
|
|
1
|
+
import { EpsilonLambdaEventHandler } from '../config/epsilon-lambda-event-handler.js';
|
|
2
2
|
import { Context, ProxyResult, SNSEvent } from 'aws-lambda';
|
|
3
|
-
import { EpsilonInstance } from '../epsilon-instance';
|
|
3
|
+
import { EpsilonInstance } from '../epsilon-instance.js';
|
|
4
4
|
export declare class GenericSnsEpsilonLambdaEventHandler implements EpsilonLambdaEventHandler<SNSEvent> {
|
|
5
5
|
private _epsilon;
|
|
6
6
|
constructor(_epsilon: EpsilonInstance);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Logger } from '@bitblit/ratchet-common';
|
|
2
|
-
import { AwsUtil } from '../util/aws-util';
|
|
3
|
-
import { LambdaEventDetector } from '@bitblit/ratchet-aws';
|
|
1
|
+
import { Logger } from '@bitblit/ratchet-common/dist/logger/logger.js';
|
|
2
|
+
import { AwsUtil } from '../util/aws-util.js';
|
|
3
|
+
import { LambdaEventDetector } from '@bitblit/ratchet-aws/dist/lambda/lambda-event-detector.js';
|
|
4
4
|
export class GenericSnsEpsilonLambdaEventHandler {
|
|
5
|
+
_epsilon;
|
|
5
6
|
constructor(_epsilon) {
|
|
6
7
|
this._epsilon = _epsilon;
|
|
7
8
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EpsilonLambdaEventHandler } from '../config/epsilon-lambda-event-handler';
|
|
1
|
+
import { EpsilonLambdaEventHandler } from '../config/epsilon-lambda-event-handler.js';
|
|
2
2
|
import { Context, ProxyResult, SNSEvent } from 'aws-lambda';
|
|
3
|
-
import { EpsilonInstance } from '../epsilon-instance';
|
|
3
|
+
import { EpsilonInstance } from '../epsilon-instance.js';
|
|
4
4
|
export declare class InterApiEpsilonLambdaEventHandler implements EpsilonLambdaEventHandler<SNSEvent> {
|
|
5
5
|
private _epsilon;
|
|
6
6
|
constructor(_epsilon: EpsilonInstance);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EpsilonLambdaEventHandler } from '../config/epsilon-lambda-event-handler';
|
|
1
|
+
import { EpsilonLambdaEventHandler } from '../config/epsilon-lambda-event-handler.js';
|
|
2
2
|
import { Context, ProxyResult, S3Event } from 'aws-lambda';
|
|
3
|
-
import { EpsilonInstance } from '../epsilon-instance';
|
|
3
|
+
import { EpsilonInstance } from '../epsilon-instance.js';
|
|
4
4
|
export declare class S3EpsilonLambdaEventHandler implements EpsilonLambdaEventHandler<S3Event> {
|
|
5
5
|
private _epsilon;
|
|
6
6
|
constructor(_epsilon: EpsilonInstance);
|
package/dist/{es/lambda-event-handler → lambda-event-handler}/s3-epsilon-lambda-event-handler.js
RENAMED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Logger } from '@bitblit/ratchet-common';
|
|
2
|
-
import { AwsUtil } from '../util/aws-util';
|
|
3
|
-
import { LambdaEventDetector } from '@bitblit/ratchet-aws';
|
|
1
|
+
import { Logger } from '@bitblit/ratchet-common/dist/logger/logger.js';
|
|
2
|
+
import { AwsUtil } from '../util/aws-util.js';
|
|
3
|
+
import { LambdaEventDetector } from '@bitblit/ratchet-aws/dist/lambda/lambda-event-detector.js';
|
|
4
4
|
export class S3EpsilonLambdaEventHandler {
|
|
5
|
+
_epsilon;
|
|
5
6
|
constructor(_epsilon) {
|
|
6
7
|
this._epsilon = _epsilon;
|
|
7
8
|
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
import { IncomingMessage, ServerResponse } from 'http';
|
|
3
|
-
/**
|
|
4
|
-
* A simplistic server for testing your lambdas locally
|
|
5
|
-
*/
|
|
6
3
|
export declare class LocalContainerServer {
|
|
7
4
|
private port;
|
|
8
5
|
private server;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import { Logger
|
|
1
|
+
import { Logger } from '@bitblit/ratchet-common/dist/logger/logger.js';
|
|
2
|
+
import { LoggerLevelName } from '@bitblit/ratchet-common/dist/logger/logger-level-name.js';
|
|
2
3
|
import http from 'http';
|
|
3
|
-
import { EventUtil } from './http/event-util';
|
|
4
|
+
import { EventUtil } from './http/event-util.js';
|
|
4
5
|
import fetch from 'cross-fetch';
|
|
5
|
-
import { LocalServer } from './local-server';
|
|
6
|
+
import { LocalServer } from './local-server.js';
|
|
7
|
+
import { StringRatchet } from '@bitblit/ratchet-common/dist/lang/string-ratchet.js';
|
|
6
8
|
export class LocalContainerServer {
|
|
9
|
+
port;
|
|
10
|
+
server;
|
|
11
|
+
aborted = false;
|
|
7
12
|
constructor(port = 8889) {
|
|
8
13
|
this.port = port;
|
|
9
|
-
this.aborted = false;
|
|
10
14
|
}
|
|
11
15
|
async runServer() {
|
|
12
16
|
return new Promise((res, rej) => {
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export class LocalServerCert {
|
|
2
|
+
static CLIENT_CSR = '-----BEGIN CERTIFICATE REQUEST-----\n' +
|
|
3
|
+
'MIICwjCCAaoCAQAwfTELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAk5WMRIwEAYDVQQH\n' +
|
|
4
|
+
'DAlMYXMgVmVnYXMxDjAMBgNVBAoMBVBsdW1hMRkwFwYDVQQDDBB3d3cuaGV5cGx1\n' +
|
|
5
|
+
'bWEuY29tMSIwIAYJKoZIhvcNAQkBFhNjd2Vpc3NAaGV5cGx1bWEuY29tMIIBIjAN\n' +
|
|
6
|
+
'BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2Gh1SD1VciosMgh3MHF7IyKgNTu2\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
|
|
62
|
+
'v+0vkQN7NeA3pnZW0W/kag400nP8xJ26f+xiggw9Q4vOlFSioe6loUjgCBNZDlh3\n' +
|
|
63
|
+
'iO5VAoGASXkcv39B9/8FuWQ7rwhXHEubxOOwZZzSBU1wtLj2qHyPGoeU9ZpsmdrL\n' +
|
|
64
|
+
'XS9w1Jy0e49qmbBjzTqAEBw2nn/JVMFHyI/s//JVF7Q9GfBZAF5XF6mJ24yzTKgF\n' +
|
|
65
|
+
'kSoO5T+7s8NXi0eAIBe4CkWCBX7kWEZtu46GuVhsrC3oEazuLOs=\n' +
|
|
66
|
+
'-----END RSA PRIVATE KEY-----\n';
|
|
67
|
+
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
import { APIGatewayEvent, Context, ProxyResult } from 'aws-lambda';
|
|
3
3
|
import { IncomingMessage, ServerResponse } from 'http';
|
|
4
|
-
import { EpsilonGlobalHandler } from './epsilon-global-handler';
|
|
5
|
-
/**
|
|
6
|
-
* A simplistic server for testing your lambdas locally
|
|
7
|
-
*/
|
|
4
|
+
import { EpsilonGlobalHandler } from './epsilon-global-handler.js';
|
|
8
5
|
export declare class LocalServer {
|
|
9
6
|
private globalHandler;
|
|
10
7
|
private port;
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import { Logger } from '@bitblit/ratchet-common';
|
|
1
|
+
import { Logger } from '@bitblit/ratchet-common/dist/logger/logger.js';
|
|
2
2
|
import http from 'http';
|
|
3
3
|
import https from 'https';
|
|
4
|
-
import { StringRatchet } from '@bitblit/ratchet-common';
|
|
4
|
+
import { StringRatchet } from '@bitblit/ratchet-common/dist/lang/string-ratchet.js';
|
|
5
5
|
import { DateTime } from 'luxon';
|
|
6
6
|
import qs from 'querystring';
|
|
7
|
-
import { EventUtil } from './http/event-util';
|
|
8
|
-
import { LoggerLevelName } from '@bitblit/ratchet-common';
|
|
9
|
-
import { LocalServerCert } from './local-server-cert';
|
|
10
|
-
import { SampleServerComponents } from './sample/sample-server-components';
|
|
11
|
-
import { LocalWebTokenManipulator } from './http/auth/local-web-token-manipulator';
|
|
7
|
+
import { EventUtil } from './http/event-util.js';
|
|
8
|
+
import { LoggerLevelName } from '@bitblit/ratchet-common/dist/logger/logger-level-name.js';
|
|
9
|
+
import { LocalServerCert } from './local-server-cert.js';
|
|
10
|
+
import { SampleServerComponents } from './sample/sample-server-components.js';
|
|
11
|
+
import { LocalWebTokenManipulator } from './http/auth/local-web-token-manipulator.js';
|
|
12
12
|
export class LocalServer {
|
|
13
|
+
globalHandler;
|
|
14
|
+
port;
|
|
15
|
+
server;
|
|
16
|
+
aborted = false;
|
|
13
17
|
constructor(globalHandler, port = 8888, https = false) {
|
|
14
18
|
this.globalHandler = globalHandler;
|
|
15
19
|
this.port = port;
|
|
16
|
-
this.aborted = false;
|
|
17
20
|
}
|
|
18
21
|
async runServer() {
|
|
19
22
|
return new Promise((res, rej) => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { OpenApiDocModifications } from './open-api-doc-modifications';
|
|
2
|
-
/**
|
|
3
|
-
* Monitoring endpoints
|
|
4
|
-
*/
|
|
1
|
+
import { OpenApiDocModifications } from './open-api-doc-modifications.js';
|
|
5
2
|
export declare class OpenApiDocModifier {
|
|
6
3
|
private options;
|
|
7
4
|
constructor(options: OpenApiDocModifications);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { OpenApiDocModifier } from './open-api-doc-modifier.js';
|
|
2
|
+
import { SampleServerStaticFiles } from '../sample/sample-server-static-files.js';
|
|
3
|
+
describe('#openApiDocModifier', function () {
|
|
4
|
+
it('should exist', async () => {
|
|
5
|
+
const data = SampleServerStaticFiles.SAMPLE_OPEN_API_DOC;
|
|
6
|
+
expect(data).toBeTruthy();
|
|
7
|
+
expect(data.length).toBeGreaterThan(0);
|
|
8
|
+
const mods = {
|
|
9
|
+
newServerPath: 'https://api.sample.com/cw',
|
|
10
|
+
removeTags: ['Neon', 'CORS'],
|
|
11
|
+
removeEndpoints: [new RegExp('options .*')],
|
|
12
|
+
};
|
|
13
|
+
const result = new OpenApiDocModifier(mods).modifyOpenApiDoc(data);
|
|
14
|
+
expect(result).toBeTruthy();
|
|
15
|
+
}, 30000);
|
|
16
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
|
-
import { RequireRatchet } from '@bitblit/ratchet-common';
|
|
2
|
+
import { RequireRatchet } from '@bitblit/ratchet-common/dist/lang/require-ratchet.js';
|
|
3
3
|
import yaml from 'js-yaml';
|
|
4
|
-
import { Logger } from '@bitblit/ratchet-common';
|
|
4
|
+
import { Logger } from '@bitblit/ratchet-common/dist/logger/logger.js';
|
|
5
5
|
export class YamlCombiner {
|
|
6
6
|
static combine(files, inRootPath = []) {
|
|
7
7
|
RequireRatchet.notNullOrUndefined(files, 'Files argument');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Logger } from '@bitblit/ratchet-common/dist/logger/logger.js';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { YamlCombiner } from './yaml-combiner.js';
|
|
4
|
+
import { EsmRatchet } from '@bitblit/ratchet-common/dist/lang/esm-ratchet.js';
|
|
5
|
+
describe('#yamlCombiner', function () {
|
|
6
|
+
it('should combine yamls', async () => {
|
|
7
|
+
const files = [
|
|
8
|
+
path.join(EsmRatchet.fetchDirName(), '../../../../test-data/epsilon/sample-yaml/test1.yaml'),
|
|
9
|
+
path.join(EsmRatchet.fetchDirName(), '../../../../test-data/epsilon/sample-yaml/test2.yaml'),
|
|
10
|
+
];
|
|
11
|
+
const root = ['components', 'schemas'];
|
|
12
|
+
const result = YamlCombiner.combine(files, root);
|
|
13
|
+
expect(result).toBeTruthy();
|
|
14
|
+
expect(result.indexOf('Object1')).toBeGreaterThan(0);
|
|
15
|
+
expect(result.indexOf('Object2')).toBeGreaterThan(0);
|
|
16
|
+
expect(result.indexOf('Object3')).toBeGreaterThan(0);
|
|
17
|
+
expect(result.indexOf('Object4')).toBeGreaterThan(0);
|
|
18
|
+
expect(result.indexOf('components')).toEqual(0);
|
|
19
|
+
expect(result.indexOf('schemas')).toBeGreaterThan(0);
|
|
20
|
+
Logger.info('G: \n\n%s', result);
|
|
21
|
+
}, 30000);
|
|
22
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApolloServer } from 'apollo-server-lambda';
|
|
2
|
-
import { EpsilonGlobalHandler } from '../epsilon-global-handler';
|
|
3
|
-
import { EpsilonConfig } from '../config/epsilon-config';
|
|
2
|
+
import { EpsilonGlobalHandler } from '../epsilon-global-handler.js';
|
|
3
|
+
import { EpsilonConfig } from '../config/epsilon-config.js';
|
|
4
4
|
export declare class SampleServerComponents {
|
|
5
5
|
private constructor();
|
|
6
6
|
static createSampleApollo(): Promise<ApolloServer>;
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import { Logger } from '@bitblit/ratchet-common';
|
|
1
|
+
import { Logger } from '@bitblit/ratchet-common/dist/logger/logger.js';
|
|
2
2
|
import { ApolloServer, gql } from 'apollo-server-lambda';
|
|
3
3
|
import { ApolloServerPluginLandingPageGraphQLPlayground } from 'apollo-server-core';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { LoggerLevelName
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
4
|
+
import { StringRatchet } from '@bitblit/ratchet-common/dist/lang/string-ratchet.js';
|
|
5
|
+
import { ErrorRatchet } from '@bitblit/ratchet-common/dist/lang/error-ratchet.js';
|
|
6
|
+
import { LoggerLevelName } from '@bitblit/ratchet-common/dist/logger/logger-level-name.js';
|
|
7
|
+
import { PromiseRatchet } from '@bitblit/ratchet-common/dist/lang/promise-ratchet.js';
|
|
8
|
+
import { BooleanRatchet } from '@bitblit/ratchet-common/dist/lang/boolean-ratchet.js';
|
|
9
|
+
import { NumberRatchet } from '@bitblit/ratchet-common/dist/lang/number-ratchet.js';
|
|
10
|
+
import { EpsilonGlobalHandler } from '../epsilon-global-handler.js';
|
|
11
|
+
import { BuiltInHandlers } from '../built-in/http/built-in-handlers.js';
|
|
12
|
+
import { LocalWebTokenManipulator } from '../http/auth/local-web-token-manipulator.js';
|
|
13
|
+
import { EchoProcessor } from '../built-in/background/echo-processor.js';
|
|
14
|
+
import { NoOpProcessor } from '../built-in/background/no-op-processor.js';
|
|
15
|
+
import { SampleDelayProcessor } from '../built-in/background/sample-delay-processor.js';
|
|
16
|
+
import { LogAndEnqueueEchoProcessor } from '../built-in/background/log-and-enqueue-echo-processor.js';
|
|
17
|
+
import { EpsilonConfigParser } from '../util/epsilon-config-parser.js';
|
|
18
|
+
import { RouterUtil } from '../http/route/router-util.js';
|
|
19
|
+
import { SampleInputValidatedProcessor } from '../built-in/background/sample-input-validated-processor.js';
|
|
20
|
+
import { BuiltInAuthorizers } from '../built-in/http/built-in-authorizers.js';
|
|
21
|
+
import { ApolloFilter } from '../built-in/http/apollo-filter.js';
|
|
22
|
+
import { BuiltInFilters } from '../built-in/http/built-in-filters.js';
|
|
23
|
+
import { EventUtil } from '../http/event-util.js';
|
|
24
|
+
import { LogMessageBackgroundErrorProcessor } from '../built-in/background/log-message-background-error-processor.js';
|
|
25
|
+
import { SingleThreadLocalBackgroundManager } from '../background/manager/single-thread-local-background-manager.js';
|
|
26
|
+
import { SampleServerStaticFiles } from './sample-server-static-files.js';
|
|
26
27
|
export class SampleServerComponents {
|
|
27
28
|
constructor() { }
|
|
28
29
|
static async createSampleApollo() {
|
|
@@ -103,7 +104,7 @@ export class SampleServerComponents {
|
|
|
103
104
|
.withExtraDecryptionKeys(['abcdefabcdef'])
|
|
104
105
|
.withOldKeyUseLogLevel(LoggerLevelName.info);
|
|
105
106
|
const meta = RouterUtil.defaultHttpMetaProcessingConfigWithAuthenticationHeaderParsing(tokenManipulator);
|
|
106
|
-
meta.timeoutMS =
|
|
107
|
+
meta.timeoutMS = 10_000;
|
|
107
108
|
ApolloFilter.addApolloFilterToList(meta.preFilters, new RegExp('.*graphql.*'), await SampleServerComponents.createSampleApollo(), {
|
|
108
109
|
cors: {
|
|
109
110
|
origin: '*',
|