@herrromich/az-functions 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +830 -0
- package/coverage/cobertura-coverage.xml +3482 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/context/forked-invocation-context.ts.html +127 -0
- package/coverage/lcov-report/context/index.html +191 -0
- package/coverage/lcov-report/context/index.ts.html +97 -0
- package/coverage/lcov-report/context/platform-context.manager.ts.html +193 -0
- package/coverage/lcov-report/context/platform-context.model.ts.html +262 -0
- package/coverage/lcov-report/context/platform-context.provider.ts.html +196 -0
- package/coverage/lcov-report/context/platform.execution.context.ts.html +217 -0
- package/coverage/lcov-report/context/wrapped-invocation-context.ts.html +163 -0
- package/coverage/lcov-report/event-hub-handler/azure-event-hub-trigger.model.ts.html +187 -0
- package/coverage/lcov-report/event-hub-handler/azure-event-hub-trigger.service.ts.html +760 -0
- package/coverage/lcov-report/event-hub-handler/decorators/decorators.model.ts.html +292 -0
- package/coverage/lcov-report/event-hub-handler/decorators/decorators.ts.html +778 -0
- package/coverage/lcov-report/event-hub-handler/decorators/index.html +146 -0
- package/coverage/lcov-report/event-hub-handler/decorators/index.ts.html +91 -0
- package/coverage/lcov-report/event-hub-handler/event-hub-handle-method-args-metadata.service.ts.html +130 -0
- package/coverage/lcov-report/event-hub-handler/event-hub-handler-metadata.reader.ts.html +199 -0
- package/coverage/lcov-report/event-hub-handler/event-hub-handler-registration.service.ts.html +220 -0
- package/coverage/lcov-report/event-hub-handler/event-hub-handler.factory.ts.html +283 -0
- package/coverage/lcov-report/event-hub-handler/event-hub-handler.model.ts.html +421 -0
- package/coverage/lcov-report/event-hub-handler/event-hub-handler.provider.ts.html +187 -0
- package/coverage/lcov-report/event-hub-handler/event-hub-trigger-support.factory.ts.html +787 -0
- package/coverage/lcov-report/event-hub-handler/event-hub-trigger-support.service.ts.html +829 -0
- package/coverage/lcov-report/event-hub-handler/event-hub-trigger.model.ts.html +193 -0
- package/coverage/lcov-report/event-hub-handler/event-hub-trigger.service.ts.html +859 -0
- package/coverage/lcov-report/event-hub-handler/event-hub-triggers-registration.service.ts.html +307 -0
- package/coverage/lcov-report/event-hub-handler/index.html +221 -0
- package/coverage/lcov-report/event-hub-handler/index.ts.html +142 -0
- package/coverage/lcov-report/eventhub-handler/decorators/decorators.model.ts.html +277 -0
- package/coverage/lcov-report/eventhub-handler/decorators/decorators.ts.html +679 -0
- package/coverage/lcov-report/eventhub-handler/decorators/index.html +131 -0
- package/coverage/lcov-report/eventhub-handler/eventhub-handler-metadata.reader.ts.html +196 -0
- package/coverage/lcov-report/eventhub-handler/eventhub-handler-registration.service.ts.html +220 -0
- package/coverage/lcov-report/eventhub-handler/eventhub-handler.factory.ts.html +193 -0
- package/coverage/lcov-report/eventhub-handler/eventhub-handler.model.ts.html +406 -0
- package/coverage/lcov-report/eventhub-handler/eventhub-trigger.model.ts.html +187 -0
- package/coverage/lcov-report/eventhub-handler/eventhub-trigger.service.ts.html +760 -0
- package/coverage/lcov-report/eventhub-handler/eventhub-triggers-registration.service.ts.html +304 -0
- package/coverage/lcov-report/eventhub-handler/index.html +206 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/forked-invocation-context.ts.html +127 -0
- package/coverage/lcov-report/function-handler-metadata.reader.ts.html +172 -0
- package/coverage/lcov-report/http-controller/authentication.provider.ts.html +481 -0
- package/coverage/lcov-report/http-controller/authenticator.provider.ts.html +460 -0
- package/coverage/lcov-report/http-controller/azure-http-trigger.service.ts.html +1045 -0
- package/coverage/lcov-report/http-controller/decorators/decorators.model.ts.html +388 -0
- package/coverage/lcov-report/http-controller/decorators/decorators.ts.html +1627 -0
- package/coverage/lcov-report/http-controller/decorators/index.html +146 -0
- package/coverage/lcov-report/http-controller/decorators/index.ts.html +94 -0
- package/coverage/lcov-report/http-controller/http-controller-metadata.reader.ts.html +271 -0
- package/coverage/lcov-report/http-controller/http-controller-metadata.service.ts.html +130 -0
- package/coverage/lcov-report/http-controller/http-controller-platform.model.ts.html +187 -0
- package/coverage/lcov-report/http-controller/http-controller-registration.service.ts.html +241 -0
- package/coverage/lcov-report/http-controller/http-controller.model.ts.html +745 -0
- package/coverage/lcov-report/http-controller/http-handler-support.factory.ts.html +499 -0
- package/coverage/lcov-report/http-controller/http-handler.factory.ts.html +415 -0
- package/coverage/lcov-report/http-controller/http-operation-registration.service.ts.html +328 -0
- package/coverage/lcov-report/http-controller/http-operations-registration.service.ts.html +328 -0
- package/coverage/lcov-report/http-controller/http-request-arg-provider.factory.ts.html +580 -0
- package/coverage/lcov-report/http-controller/http-request-handler.provider.ts.html +388 -0
- package/coverage/lcov-report/http-controller/http-response-processor.factory.ts.html +316 -0
- package/coverage/lcov-report/http-controller/index.html +311 -0
- package/coverage/lcov-report/http-controller/index.ts.html +226 -0
- package/coverage/lcov-report/http-controller/open-api-definition.service.ts.html +568 -0
- package/coverage/lcov-report/http-controller/open-api-metadata.service.ts.html +373 -0
- package/coverage/lcov-report/http-controller/open-api-print.service.ts.html +232 -0
- package/coverage/lcov-report/http-controller/open-api-registration.service.ts.html +220 -0
- package/coverage/lcov-report/http-controller/rest-open-api.regstry.ts.html +262 -0
- package/coverage/lcov-report/http-controller/security/authentication-service.factory.ts.html +280 -0
- package/coverage/lcov-report/http-controller/security/authentication-service.ts.html +115 -0
- package/coverage/lcov-report/http-controller/security/authenticator.provider.ts.html +799 -0
- package/coverage/lcov-report/http-controller/security/bearer-security-authentication.service.ts.html +133 -0
- package/coverage/lcov-report/http-controller/security/index.html +206 -0
- package/coverage/lcov-report/http-controller/security/index.ts.html +94 -0
- package/coverage/lcov-report/http-controller/security/model.ts.html +133 -0
- package/coverage/lcov-report/http-controller/security/operation-authentication.resolver.ts.html +418 -0
- package/coverage/lcov-report/http-controller/security/principal-merge.service.ts.html +163 -0
- package/coverage/lcov-report/http-controller/security/strict-principal-merge.servce.ts.html +154 -0
- package/coverage/lcov-report/http-controller/swagger-handling.service.ts.html +463 -0
- package/coverage/lcov-report/index.html +281 -0
- package/coverage/lcov-report/init.ts.html +97 -0
- package/coverage/lcov-report/ioc-container.utils.ts.html +100 -0
- package/coverage/lcov-report/logger/azure-log-transport.service.ts.html +433 -0
- package/coverage/lcov-report/logger/bindings.ts.html +253 -0
- package/coverage/lcov-report/logger/index.html +221 -0
- package/coverage/lcov-report/logger/index.ts.html +163 -0
- package/coverage/lcov-report/logger/log-level.service.ts.html +127 -0
- package/coverage/lcov-report/logger/log-transport.service.ts.html +571 -0
- package/coverage/lcov-report/logger/logger-factory.provider.ts.html +142 -0
- package/coverage/lcov-report/logger/logger.factory.ts.html +172 -0
- package/coverage/lcov-report/logger/logger.model.ts.html +868 -0
- package/coverage/lcov-report/logger/logger.utils.ts.html +877 -0
- package/coverage/lcov-report/logger/model.ts.html +172 -0
- package/coverage/lcov-report/logger/otel.logger.ts.html +358 -0
- package/coverage/lcov-report/logger/platform.logger.ts.html +229 -0
- package/coverage/lcov-report/logger/trie-search.service.ts.html +616 -0
- package/coverage/lcov-report/platform/azure-platform.ts.html +256 -0
- package/coverage/lcov-report/platform/index.html +176 -0
- package/coverage/lcov-report/platform/index.ts.html +139 -0
- package/coverage/lcov-report/platform/platform-component-metadata.service.ts.html +115 -0
- package/coverage/lcov-report/platform/register-function.factory.ts.html +145 -0
- package/coverage/lcov-report/platform/register-trigger-handler.factory.ts.html +214 -0
- package/coverage/lcov-report/platform/security-context.ts.html +127 -0
- package/coverage/lcov-report/platform/startup.service.ts.html +106 -0
- package/coverage/lcov-report/platform/system-logger-name.provider.ts.html +145 -0
- package/coverage/lcov-report/platform/system.container.ts.html +169 -0
- package/coverage/lcov-report/platform-context.model.ts.html +124 -0
- package/coverage/lcov-report/platform.logger.ts.html +316 -0
- package/coverage/lcov-report/platform.model.ts.html +292 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/security/index.html +146 -0
- package/coverage/lcov-report/security/index.ts.html +91 -0
- package/coverage/lcov-report/security/security-context.ts.html +130 -0
- package/coverage/lcov-report/security/security.model.ts.html +169 -0
- package/coverage/lcov-report/shared/all-settled.util.ts.html +118 -0
- package/coverage/lcov-report/shared/decorators/decorators.model.ts.html +136 -0
- package/coverage/lcov-report/shared/decorators/decorators.ts.html +346 -0
- package/coverage/lcov-report/shared/decorators/index.html +146 -0
- package/coverage/lcov-report/shared/decorators/index.ts.html +91 -0
- package/coverage/lcov-report/shared/function-handler-metadata.reader.ts.html +172 -0
- package/coverage/lcov-report/shared/index.html +176 -0
- package/coverage/lcov-report/shared/index.ts.html +133 -0
- package/coverage/lcov-report/shared/ioc-container.utils.ts.html +115 -0
- package/coverage/lcov-report/shared/platform-context-local-storage.ts.html +133 -0
- package/coverage/lcov-report/shared/platform-context.manager.ts.html +253 -0
- package/coverage/lcov-report/shared/platform.context.provider.ts.html +136 -0
- package/coverage/lcov-report/shared/platform.model.ts.html +298 -0
- package/coverage/lcov-report/shared/security.model.ts.html +142 -0
- package/coverage/lcov-report/shared/trie-search.service.ts.html +337 -0
- package/coverage/lcov-report/shared/trigger-handler-metadata.reader.ts.html +166 -0
- package/coverage/lcov-report/shared/zod-parser-wrapper.service.ts.html +217 -0
- package/coverage/lcov-report/shared/zod-parser-wrapper.ts.html +232 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov-report/src/context/index.html +191 -0
- package/coverage/lcov-report/src/context/index.ts.html +97 -0
- package/coverage/lcov-report/src/context/platform-context.manager.ts.html +193 -0
- package/coverage/lcov-report/src/context/platform-context.model.ts.html +262 -0
- package/coverage/lcov-report/src/context/platform-context.provider.ts.html +196 -0
- package/coverage/lcov-report/src/context/platform.execution.context.ts.html +217 -0
- package/coverage/lcov-report/src/context/wrapped-invocation-context.ts.html +163 -0
- package/coverage/lcov-report/src/event-hub-handler/azure-event-hub-trigger.model.ts.html +187 -0
- package/coverage/lcov-report/src/event-hub-handler/azure-event-hub-trigger.service.ts.html +769 -0
- package/coverage/lcov-report/src/event-hub-handler/decorators/decorators.model.ts.html +313 -0
- package/coverage/lcov-report/src/event-hub-handler/decorators/decorators.ts.html +778 -0
- package/coverage/lcov-report/src/event-hub-handler/decorators/index.html +146 -0
- package/coverage/lcov-report/src/event-hub-handler/decorators/index.ts.html +91 -0
- package/coverage/lcov-report/src/event-hub-handler/event-hub-handle-method-args-metadata.service.ts.html +130 -0
- package/coverage/lcov-report/src/event-hub-handler/event-hub-handler-metadata.reader.ts.html +199 -0
- package/coverage/lcov-report/src/event-hub-handler/event-hub-handler-registration.service.ts.html +220 -0
- package/coverage/lcov-report/src/event-hub-handler/event-hub-handler.factory.ts.html +283 -0
- package/coverage/lcov-report/src/event-hub-handler/event-hub-handler.model.ts.html +421 -0
- package/coverage/lcov-report/src/event-hub-handler/event-hub-handler.provider.ts.html +187 -0
- package/coverage/lcov-report/src/event-hub-handler/event-hub-trigger-support.factory.ts.html +787 -0
- package/coverage/lcov-report/src/event-hub-handler/event-hub-trigger-support.service.ts.html +832 -0
- package/coverage/lcov-report/src/event-hub-handler/event-hub-trigger.model.ts.html +193 -0
- package/coverage/lcov-report/src/event-hub-handler/event-hub-trigger.service.ts.html +859 -0
- package/coverage/lcov-report/src/event-hub-handler/event-hub-triggers-registration.service.ts.html +307 -0
- package/coverage/lcov-report/src/event-hub-handler/index.html +221 -0
- package/coverage/lcov-report/src/event-hub-handler/index.ts.html +142 -0
- package/coverage/lcov-report/src/framework.container.ts.html +157 -0
- package/coverage/lcov-report/src/http-controller/authentication.provider.ts.html +481 -0
- package/coverage/lcov-report/src/http-controller/authenticator.provider.ts.html +460 -0
- package/coverage/lcov-report/src/http-controller/azure-http-trigger.service.ts.html +865 -0
- package/coverage/lcov-report/src/http-controller/decorators/decorators.model.ts.html +553 -0
- package/coverage/lcov-report/src/http-controller/decorators/decorators.ts.html +1633 -0
- package/coverage/lcov-report/src/http-controller/decorators/index.html +146 -0
- package/coverage/lcov-report/src/http-controller/decorators/index.ts.html +94 -0
- package/coverage/lcov-report/src/http-controller/http-controller-metadata.reader.ts.html +271 -0
- package/coverage/lcov-report/src/http-controller/http-controller-metadata.service.ts.html +121 -0
- package/coverage/lcov-report/src/http-controller/http-controller-platform.model.ts.html +187 -0
- package/coverage/lcov-report/src/http-controller/http-controller-registration.service.ts.html +241 -0
- package/coverage/lcov-report/src/http-controller/http-controller.model.ts.html +784 -0
- package/coverage/lcov-report/src/http-controller/http-handler-support.factory.ts.html +481 -0
- package/coverage/lcov-report/src/http-controller/http-handler.factory.ts.html +406 -0
- package/coverage/lcov-report/src/http-controller/http-operation-registration.service.ts.html +328 -0
- package/coverage/lcov-report/src/http-controller/http-operations-registration.service.ts.html +328 -0
- package/coverage/lcov-report/src/http-controller/http-request-arg-provider.factory.ts.html +580 -0
- package/coverage/lcov-report/src/http-controller/http-request-handler.provider.ts.html +388 -0
- package/coverage/lcov-report/src/http-controller/http-response-processor.factory.ts.html +316 -0
- package/coverage/lcov-report/src/http-controller/index.html +311 -0
- package/coverage/lcov-report/src/http-controller/index.ts.html +226 -0
- package/coverage/lcov-report/src/http-controller/open-api-definition.service.ts.html +550 -0
- package/coverage/lcov-report/src/http-controller/open-api-metadata.service.ts.html +373 -0
- package/coverage/lcov-report/src/http-controller/open-api-print.service.ts.html +232 -0
- package/coverage/lcov-report/src/http-controller/open-api-registration.service.ts.html +220 -0
- package/coverage/lcov-report/src/http-controller/rest-open-api.regstry.ts.html +262 -0
- package/coverage/lcov-report/src/http-controller/security/authentication-service.factory.ts.html +280 -0
- package/coverage/lcov-report/src/http-controller/security/authentication-service.ts.html +139 -0
- package/coverage/lcov-report/src/http-controller/security/authenticator.provider.ts.html +799 -0
- package/coverage/lcov-report/src/http-controller/security/bearer-security-authentication.service.ts.html +133 -0
- package/coverage/lcov-report/src/http-controller/security/index.html +206 -0
- package/coverage/lcov-report/src/http-controller/security/index.ts.html +94 -0
- package/coverage/lcov-report/src/http-controller/security/model.ts.html +133 -0
- package/coverage/lcov-report/src/http-controller/security/operation-authentication.resolver.ts.html +418 -0
- package/coverage/lcov-report/src/http-controller/security/principal-merge.service.ts.html +163 -0
- package/coverage/lcov-report/src/http-controller/security/strict-principal-merge.servce.ts.html +154 -0
- package/coverage/lcov-report/src/http-controller/swagger-handling.service.ts.html +463 -0
- package/coverage/lcov-report/src/index.html +161 -0
- package/coverage/lcov-report/src/init.ts.html +97 -0
- package/coverage/lcov-report/src/logger/azure-log-transport.service.ts.html +433 -0
- package/coverage/lcov-report/src/logger/bindings.ts.html +253 -0
- package/coverage/lcov-report/src/logger/index.html +221 -0
- package/coverage/lcov-report/src/logger/index.ts.html +163 -0
- package/coverage/lcov-report/src/logger/log-level.service.ts.html +127 -0
- package/coverage/lcov-report/src/logger/log-transport.service.ts.html +571 -0
- package/coverage/lcov-report/src/logger/logger-factory.provider.ts.html +142 -0
- package/coverage/lcov-report/src/logger/logger.factory.ts.html +172 -0
- package/coverage/lcov-report/src/logger/logger.model.ts.html +868 -0
- package/coverage/lcov-report/src/logger/logger.utils.ts.html +877 -0
- package/coverage/lcov-report/src/logger/otel.logger.ts.html +358 -0
- package/coverage/lcov-report/src/logger/platform.logger.ts.html +229 -0
- package/coverage/lcov-report/src/logger/trie-search.service.ts.html +616 -0
- package/coverage/lcov-report/src/middleware.ts.html +232 -0
- package/coverage/lcov-report/src/platform/azure-platform.ts.html +256 -0
- package/coverage/lcov-report/src/platform/index.html +176 -0
- package/coverage/lcov-report/src/platform/index.ts.html +139 -0
- package/coverage/lcov-report/src/platform/platform-component-metadata.service.ts.html +115 -0
- package/coverage/lcov-report/src/platform/register-function.factory.ts.html +145 -0
- package/coverage/lcov-report/src/platform/register-trigger-handler.factory.ts.html +214 -0
- package/coverage/lcov-report/src/platform/security-context.ts.html +127 -0
- package/coverage/lcov-report/src/platform/startup.service.ts.html +202 -0
- package/coverage/lcov-report/src/platform/system-logger-name.provider.ts.html +145 -0
- package/coverage/lcov-report/src/platform/system.container.ts.html +172 -0
- package/coverage/lcov-report/src/platform.container.ts.html +148 -0
- package/coverage/lcov-report/src/security/index.html +146 -0
- package/coverage/lcov-report/src/security/index.ts.html +91 -0
- package/coverage/lcov-report/src/security/security-context.ts.html +175 -0
- package/coverage/lcov-report/src/security/security.model.ts.html +223 -0
- package/coverage/lcov-report/src/shared/decorators/decorators.model.ts.html +136 -0
- package/coverage/lcov-report/src/shared/decorators/decorators.ts.html +346 -0
- package/coverage/lcov-report/src/shared/decorators/index.html +146 -0
- package/coverage/lcov-report/src/shared/decorators/index.ts.html +91 -0
- package/coverage/lcov-report/src/shared/index.html +176 -0
- package/coverage/lcov-report/src/shared/index.ts.html +133 -0
- package/coverage/lcov-report/src/shared/ioc-container.utils.ts.html +115 -0
- package/coverage/lcov-report/src/shared/platform-context-local-storage.ts.html +133 -0
- package/coverage/lcov-report/src/shared/platform.model.ts.html +298 -0
- package/coverage/lcov-report/src/shared/security.model.ts.html +139 -0
- package/coverage/lcov-report/src/shared/trie-search.service.ts.html +337 -0
- package/coverage/lcov-report/src/shared/trigger-handler-metadata.reader.ts.html +166 -0
- package/coverage/lcov-report/src/shared/zod-parser-wrapper.ts.html +232 -0
- package/coverage/lcov-report/test/index.html +116 -0
- package/coverage/lcov-report/test/utils.ts.html +100 -0
- package/coverage/lcov-report/test-utils/index.html +116 -0
- package/coverage/lcov-report/test-utils/utils.ts.html +100 -0
- package/coverage/lcov-report/trie-search.service.ts.html +469 -0
- package/coverage/lcov-report/trigger-handler-metadata.reader.ts.html +187 -0
- package/coverage/lcov-report/wrapped-invocation-context.ts.html +163 -0
- package/coverage/lcov-report/zod-parser-wrapper.ts.html +232 -0
- package/coverage/lcov.info +3220 -0
- package/dist/assets/swagger-ui/LICENSE +202 -0
- package/dist/assets/swagger-ui/NOTICE +2 -0
- package/dist/assets/swagger-ui/README.md +40 -0
- package/dist/assets/swagger-ui/absolute-path.js +1 -0
- package/dist/assets/swagger-ui/favicon-16x16.png +0 -0
- package/dist/assets/swagger-ui/favicon-32x32.png +0 -0
- package/dist/assets/swagger-ui/index.css +16 -0
- package/dist/assets/swagger-ui/index.html +19 -0
- package/dist/assets/swagger-ui/index.js +1 -0
- package/dist/assets/swagger-ui/log.bundle-sizes.swagger-ui.txt +114 -0
- package/dist/assets/swagger-ui/log.es-bundle-core-sizes.swagger-ui.txt +14 -0
- package/dist/assets/swagger-ui/log.es-bundle-sizes.swagger-ui.txt +114 -0
- package/dist/assets/swagger-ui/oauth2-redirect.html +6 -0
- package/dist/assets/swagger-ui/oauth2-redirect.js +1 -0
- package/dist/assets/swagger-ui/package.json +20 -0
- package/dist/assets/swagger-ui/swagger-initializer.js +1 -0
- package/dist/assets/swagger-ui/swagger-ui-bundle.js +2 -0
- package/dist/assets/swagger-ui/swagger-ui-bundle.js.LICENSE.txt +106 -0
- package/dist/assets/swagger-ui/swagger-ui-bundle.js.map +1 -0
- package/dist/assets/swagger-ui/swagger-ui-es-bundle-core.js +2 -0
- package/dist/assets/swagger-ui/swagger-ui-es-bundle-core.js.LICENSE.txt +35 -0
- package/dist/assets/swagger-ui/swagger-ui-es-bundle-core.js.map +1 -0
- package/dist/assets/swagger-ui/swagger-ui-es-bundle.js +2 -0
- package/dist/assets/swagger-ui/swagger-ui-es-bundle.js.LICENSE.txt +106 -0
- package/dist/assets/swagger-ui/swagger-ui-es-bundle.js.map +1 -0
- package/dist/assets/swagger-ui/swagger-ui-standalone-preset.js +2 -0
- package/dist/assets/swagger-ui/swagger-ui-standalone-preset.js.LICENSE.txt +22 -0
- package/dist/assets/swagger-ui/swagger-ui-standalone-preset.js.map +1 -0
- package/dist/assets/swagger-ui/swagger-ui.css +3 -0
- package/dist/assets/swagger-ui/swagger-ui.css.map +1 -0
- package/dist/assets/swagger-ui/swagger-ui.js +1 -0
- package/dist/assets/swagger-ui/swagger-ui.js.map +1 -0
- package/dist/index.cjs +3 -0
- package/dist/index.cjs.LICENSE.txt +24 -0
- package/dist/src/context/index.d.ts +4 -0
- package/dist/src/context/platform-context.manager.d.ts +23 -0
- package/dist/src/context/platform-context.model.d.ts +56 -0
- package/dist/src/context/platform-context.provider.d.ts +23 -0
- package/dist/src/context/platform.execution.context.d.ts +13 -0
- package/dist/src/context/wrapped-invocation-context.d.ts +5 -0
- package/dist/src/event-hub-handler/decorators/decorators.d.ts +161 -0
- package/dist/src/event-hub-handler/decorators/decorators.model.d.ts +62 -0
- package/dist/src/event-hub-handler/decorators/index.d.ts +2 -0
- package/dist/src/event-hub-handler/event-hub-handler-metadata.reader.d.ts +8 -0
- package/dist/src/event-hub-handler/event-hub-handler-registration.service.d.ts +12 -0
- package/dist/src/event-hub-handler/event-hub-handler.factory.d.ts +13 -0
- package/dist/src/event-hub-handler/event-hub-handler.model.d.ts +101 -0
- package/dist/src/event-hub-handler/event-hub-trigger-support.factory.d.ts +10 -0
- package/dist/src/event-hub-handler/event-hub-trigger.model.d.ts +39 -0
- package/dist/src/event-hub-handler/event-hub-triggers-registration.service.d.ts +18 -0
- package/dist/src/event-hub-handler/index.d.ts +4 -0
- package/dist/src/framework.container.d.ts +6 -0
- package/dist/src/http-controller/decorators/decorators.d.ts +410 -0
- package/dist/src/http-controller/decorators/decorators.model.d.ts +123 -0
- package/dist/src/http-controller/decorators/index.d.ts +3 -0
- package/dist/src/http-controller/http-controller-metadata.reader.d.ts +8 -0
- package/dist/src/http-controller/http-controller-registration.service.d.ts +12 -0
- package/dist/src/http-controller/http-controller.model.d.ts +131 -0
- package/dist/src/http-controller/http-handler-support.factory.d.ts +26 -0
- package/dist/src/http-controller/http-handler.factory.d.ts +16 -0
- package/dist/src/http-controller/http-operations-registration.service.d.ts +22 -0
- package/dist/src/http-controller/http-request-arg-provider.factory.d.ts +12 -0
- package/dist/src/http-controller/http-response-processor.factory.d.ts +10 -0
- package/dist/src/http-controller/index.d.ts +11 -0
- package/dist/src/http-controller/open-api-definition.service.d.ts +29 -0
- package/dist/src/http-controller/open-api-metadata.service.d.ts +11 -0
- package/dist/src/http-controller/open-api-print.service.d.ts +8 -0
- package/dist/src/http-controller/open-api-registration.service.d.ts +17 -0
- package/dist/src/http-controller/security/authentication-service.d.ts +15 -0
- package/dist/src/http-controller/security/authenticator.provider.d.ts +31 -0
- package/dist/src/http-controller/security/bearer-security-authentication.service.d.ts +9 -0
- package/dist/src/http-controller/security/bearer-token.service.d.ts +5 -0
- package/dist/src/http-controller/security/index.d.ts +3 -0
- package/dist/src/http-controller/security/operation-authentication.resolver.d.ts +18 -0
- package/dist/src/http-controller/security/principal-merge.service.d.ts +11 -0
- package/dist/src/http-controller/security/strict-principal-merge.servce.d.ts +5 -0
- package/dist/src/http-controller/swagger-handling.service.d.ts +11 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/init.d.ts +1 -0
- package/dist/src/logger/bindings.d.ts +7 -0
- package/dist/src/logger/index.d.ts +6 -0
- package/dist/src/logger/log-level.service.d.ts +7 -0
- package/dist/src/logger/log-transport.service.d.ts +19 -0
- package/dist/src/logger/logger.model.d.ts +241 -0
- package/dist/src/logger/logger.utils.d.ts +17 -0
- package/dist/src/logger/otel.logger.d.ts +9 -0
- package/dist/src/logger/trie-search.service.d.ts +65 -0
- package/dist/src/middleware.d.ts +10 -0
- package/dist/src/platform/azure-platform.d.ts +15 -0
- package/dist/src/platform/index.d.ts +5 -0
- package/dist/src/platform/model.d.ts +18 -0
- package/dist/src/platform/register-trigger-handler.factory.d.ts +5 -0
- package/dist/src/platform/startup.service.d.ts +36 -0
- package/dist/src/platform/system-logger-name.provider.d.ts +1 -0
- package/dist/src/platform.container.d.ts +3 -0
- package/dist/src/security/index.d.ts +2 -0
- package/dist/src/security/security-context.d.ts +22 -0
- package/dist/src/security/security.model.d.ts +37 -0
- package/dist/src/shared/decorators/decorators.d.ts +37 -0
- package/dist/src/shared/decorators/decorators.model.d.ts +13 -0
- package/dist/src/shared/decorators/index.d.ts +2 -0
- package/dist/src/shared/index.d.ts +8 -0
- package/dist/src/shared/ioc-container.utils.d.ts +7 -0
- package/dist/src/shared/platform.model.d.ts +44 -0
- package/dist/src/shared/trigger-handler-metadata.reader.d.ts +6 -0
- package/dist/src/shared/zod-parser-wrapper.d.ts +5 -0
- package/docs/logging.md +805 -0
- package/package.json +87 -0
- package/src/context/index.ts +4 -0
- package/src/context/platform-context.manager.ts +36 -0
- package/src/context/platform-context.model.ts +59 -0
- package/src/context/platform-context.provider.ts +37 -0
- package/src/context/platform.execution.context.ts +44 -0
- package/src/context/wrapped-invocation-context.ts +26 -0
- package/src/event-hub-handler/decorators/decorators.model.ts +76 -0
- package/src/event-hub-handler/decorators/decorators.ts +231 -0
- package/src/event-hub-handler/decorators/index.ts +2 -0
- package/src/event-hub-handler/event-hub-handler-metadata.reader.ts +38 -0
- package/src/event-hub-handler/event-hub-handler-registration.service.ts +45 -0
- package/src/event-hub-handler/event-hub-handler.factory.ts +66 -0
- package/src/event-hub-handler/event-hub-handler.model.ts +112 -0
- package/src/event-hub-handler/event-hub-trigger-support.factory.ts +234 -0
- package/src/event-hub-handler/event-hub-trigger.model.ts +36 -0
- package/src/event-hub-handler/event-hub-triggers-registration.service.ts +74 -0
- package/src/event-hub-handler/index.ts +19 -0
- package/src/framework.container.ts +24 -0
- package/src/http-controller/decorators/decorators.model.ts +156 -0
- package/src/http-controller/decorators/decorators.ts +516 -0
- package/src/http-controller/decorators/index.ts +3 -0
- package/src/http-controller/http-controller-metadata.reader.ts +62 -0
- package/src/http-controller/http-controller-registration.service.ts +52 -0
- package/src/http-controller/http-controller.model.ts +233 -0
- package/src/http-controller/http-handler-support.factory.ts +132 -0
- package/src/http-controller/http-handler.factory.ts +107 -0
- package/src/http-controller/http-operations-registration.service.ts +81 -0
- package/src/http-controller/http-request-arg-provider.factory.ts +165 -0
- package/src/http-controller/http-response-processor.factory.ts +77 -0
- package/src/http-controller/index.ts +47 -0
- package/src/http-controller/open-api-definition.service.ts +155 -0
- package/src/http-controller/open-api-metadata.service.ts +96 -0
- package/src/http-controller/open-api-print.service.ts +49 -0
- package/src/http-controller/open-api-registration.service.ts +45 -0
- package/src/http-controller/security/authentication-service.ts +18 -0
- package/src/http-controller/security/authenticator.provider.ts +238 -0
- package/src/http-controller/security/bearer-security-authentication.service.ts +16 -0
- package/src/http-controller/security/bearer-token.service.ts +6 -0
- package/src/http-controller/security/index.ts +3 -0
- package/src/http-controller/security/operation-authentication.resolver.ts +111 -0
- package/src/http-controller/security/principal-merge.service.ts +26 -0
- package/src/http-controller/security/strict-principal-merge.servce.ts +23 -0
- package/src/http-controller/swagger-handling.service.ts +126 -0
- package/src/index.ts +80 -0
- package/src/init.ts +4 -0
- package/src/logger/bindings.ts +56 -0
- package/src/logger/index.ts +26 -0
- package/src/logger/log-level.service.ts +14 -0
- package/src/logger/log-transport.service.ts +162 -0
- package/src/logger/logger.model.ts +261 -0
- package/src/logger/logger.utils.ts +264 -0
- package/src/logger/otel.logger.ts +91 -0
- package/src/logger/trie-search.service.ts +177 -0
- package/src/middleware.ts +49 -0
- package/src/platform/azure-platform.ts +57 -0
- package/src/platform/index.ts +18 -0
- package/src/platform/model.ts +19 -0
- package/src/platform/register-trigger-handler.factory.ts +43 -0
- package/src/platform/startup.service.ts +39 -0
- package/src/platform/system-logger-name.provider.ts +20 -0
- package/src/platform.container.ts +21 -0
- package/src/security/index.ts +2 -0
- package/src/security/security-context.ts +30 -0
- package/src/security/security.model.ts +46 -0
- package/src/shared/decorators/decorators.model.ts +17 -0
- package/src/shared/decorators/decorators.ts +87 -0
- package/src/shared/decorators/index.ts +2 -0
- package/src/shared/index.ts +16 -0
- package/src/shared/ioc-container.utils.ts +10 -0
- package/src/shared/platform.model.ts +71 -0
- package/src/shared/trigger-handler-metadata.reader.ts +27 -0
- package/src/shared/zod-parser-wrapper.ts +49 -0
- package/src/test-utilities/index.ts +1 -0
- package/src/test-utilities/utils.ts +5 -0
- package/tsconfig.test.json +8 -0
package/package.json
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@herrromich/az-functions",
|
|
3
|
+
"description": "Extensions for NodeJS Azure Functions",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"main": "dist/index.cjs",
|
|
7
|
+
"types": "dist/src/index.d.ts",
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public",
|
|
10
|
+
"registry": "https://registry.npmjs.org"
|
|
11
|
+
},
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=20"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@azure/monitor-opentelemetry-exporter": "^1.0.0-beta.41",
|
|
17
|
+
"@opentelemetry/api": "^1.9.1",
|
|
18
|
+
"@opentelemetry/api-logs": "^0.218.0",
|
|
19
|
+
"@opentelemetry/core": "^2.7.0",
|
|
20
|
+
"@opentelemetry/resources": "^2.7.0",
|
|
21
|
+
"@opentelemetry/sdk-logs": "^0.215.0",
|
|
22
|
+
"@opentelemetry/semantic-conventions": "^1.40.0",
|
|
23
|
+
"http-status-codes": "^2.3.0",
|
|
24
|
+
"lodash": "^4.17.21",
|
|
25
|
+
"mime-types": "^3.0.1",
|
|
26
|
+
"openapi3-ts": "^4.5.0",
|
|
27
|
+
"swagger-ui-dist": "^5.30.2",
|
|
28
|
+
"triple-beam": "^1.3.0",
|
|
29
|
+
"tslib": "^2.8.1",
|
|
30
|
+
"winston": "^3.18.3",
|
|
31
|
+
"winston-transport": "^4.9.0",
|
|
32
|
+
"yaml": "^2.8.1"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@asteasolutions/zod-to-openapi": "^8.2.0",
|
|
36
|
+
"@types/eslint": "^9.6.1",
|
|
37
|
+
"@types/jest": "^29.5.14",
|
|
38
|
+
"@types/lodash": "^4.17.20",
|
|
39
|
+
"@types/mime-types": "^2.1.4",
|
|
40
|
+
"@types/node": "22.13.14",
|
|
41
|
+
"@types/triple-beam": "^1.3.5",
|
|
42
|
+
"copy-webpack-plugin": "^13.0.1",
|
|
43
|
+
"eslint": "^9.39.4",
|
|
44
|
+
"jest": "^30.3.0",
|
|
45
|
+
"jest-extended": "^7.0.0",
|
|
46
|
+
"jest-mock": "^30.2.0",
|
|
47
|
+
"jest-mock-extended": "^4.0.0",
|
|
48
|
+
"rimraf": "^6.1.3",
|
|
49
|
+
"rollup": "^4.0.0",
|
|
50
|
+
"source-map-loader": "^5.0.0",
|
|
51
|
+
"syncpack": "~13.0.4",
|
|
52
|
+
"tsc-alias": "^1.9.2",
|
|
53
|
+
"type-fest": "^5.5.0",
|
|
54
|
+
"typescript": "~5.9.3",
|
|
55
|
+
"webpack": "^5.102.1",
|
|
56
|
+
"webpack-bundle-analyzer": "^4.10.2",
|
|
57
|
+
"webpack-node-externals": "^3.0.0",
|
|
58
|
+
"zod": "^4.3.6"
|
|
59
|
+
},
|
|
60
|
+
"peerDependencies": {
|
|
61
|
+
"@asteasolutions/zod-to-openapi": "^8.2.0",
|
|
62
|
+
"@azure/functions": "^4.9.0",
|
|
63
|
+
"inversify": "^7.10.4",
|
|
64
|
+
"reflect-metadata": "0.2.2",
|
|
65
|
+
"zod": "^4.3.6"
|
|
66
|
+
},
|
|
67
|
+
"repository": {
|
|
68
|
+
"type": "git",
|
|
69
|
+
"url": "git@github.com:HerrRomich/az-functions.git"
|
|
70
|
+
},
|
|
71
|
+
"scripts": {
|
|
72
|
+
"dist:clean": "rimraf ./dist",
|
|
73
|
+
"dist:fix-types": "tsc-alias -p tsconfig.json --outDir dist",
|
|
74
|
+
"dist:assemble": "pnpm run dist:build",
|
|
75
|
+
"dist:build": "pnpm run dist:clean && webpack --mode=production && pnpm run dist:fix-types",
|
|
76
|
+
"dist:build:recursive": "pnpm -r --sort --filter {.}... run dist:build",
|
|
77
|
+
"watch:fix-types": "tsc-alias -p tsconfig.json --outDir dist --watch",
|
|
78
|
+
"watch:webpack": "webpack --mode=development --watch",
|
|
79
|
+
"watch": "pnpm run watch:webpack & pnpm run watch:fix-types",
|
|
80
|
+
"watch:recursive": "pnpm -r --sort --filter {.}... --parallel --stream run watch",
|
|
81
|
+
"test": "jest --env=node --colors --coverage",
|
|
82
|
+
"lint": "eslint",
|
|
83
|
+
"lint:fix": "eslint --fix",
|
|
84
|
+
"ci:build": "pnpm lint && pnpm test && pnpm dist:build",
|
|
85
|
+
"ci:build:recursive": "pnpm -r --sort --filter {.}... run ci:build"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { injectable } from 'inversify';
|
|
2
|
+
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
3
|
+
import { serviceIdentifier } from 'shared';
|
|
4
|
+
import { PlatformContext } from './platform-context.model';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A unique identifier for the PlatformContextManager service.
|
|
8
|
+
* This identifier can be used for dependency injection and service resolution.
|
|
9
|
+
*/
|
|
10
|
+
export const PLATFORM_CONTEXT_MANAGER = serviceIdentifier<PlatformContextManager>('AzFunction.ContextManager');
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Interface representing a manager for PlatformContext instances.
|
|
14
|
+
* The manager provides methods to access the active context and to run code within a specific context.
|
|
15
|
+
*
|
|
16
|
+
* - `active()`: Returns the currently active PlatformContext, or undefined if no context is active.
|
|
17
|
+
* - `runWith(platformContext, callback)`: Runs the provided callback function within the specified PlatformContext.
|
|
18
|
+
* The callback will have access to the context during its execution.
|
|
19
|
+
*/
|
|
20
|
+
export interface PlatformContextManager {
|
|
21
|
+
active(): PlatformContext | undefined;
|
|
22
|
+
runWith<T>(platformContext: PlatformContext, callback: () => T): T;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@injectable()
|
|
26
|
+
export class BasePlatformContextManager implements PlatformContextManager {
|
|
27
|
+
private readonly storage = new AsyncLocalStorage<PlatformContext>();
|
|
28
|
+
|
|
29
|
+
runWith<T>(platformContext: PlatformContext, callback: () => T): T {
|
|
30
|
+
return this.storage.run(platformContext, callback);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
active(): PlatformContext | undefined {
|
|
34
|
+
return this.storage.getStore();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { InvocationContext } from '@azure/functions';
|
|
2
|
+
import { AzFunctionsRuntimeError } from 'shared';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Error class representing errors related to the platform context in Azure Functions.
|
|
6
|
+
* This class extends the AzFunctionsRuntimeError and can be used to throw errors specific to platform context operations.
|
|
7
|
+
*/
|
|
8
|
+
export class PlatformContextError extends AzFunctionsRuntimeError {}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Type representing a unique key for storing and retrieving values in the PlatformContext.
|
|
12
|
+
* The key is created using a symbol, ensuring uniqueness across the application.
|
|
13
|
+
* The generic type parameter T allows for type safety when associating values with the key.
|
|
14
|
+
*
|
|
15
|
+
* @template T - The type of the value associated with the key.
|
|
16
|
+
*/
|
|
17
|
+
export type PlatformContextValueKey<T = unknown> = symbol & { __type: T };
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Creates a unique key for storing and retrieving values in the PlatformContext.
|
|
21
|
+
* The key is created using a symbol, ensuring uniqueness across the application.
|
|
22
|
+
*
|
|
23
|
+
* @template T - The type of the value associated with the key.
|
|
24
|
+
* @param key - The unique string identifier for the key.
|
|
25
|
+
* @returns A unique PlatformContextValueKey for the specified type.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* const MY_KEY = createPlatformContextValueKey<MyType>('MyUniqueKey');
|
|
29
|
+
*
|
|
30
|
+
* // Retrieve a value from the PlatformContext using the key
|
|
31
|
+
* const value = platformContext.getValue(MY_KEY);
|
|
32
|
+
*
|
|
33
|
+
* // Set a value in the PlatformContext using the key
|
|
34
|
+
* platformContext.setValue(MY_KEY, myValue);
|
|
35
|
+
*
|
|
36
|
+
* // Delete a value from the PlatformContext using the key
|
|
37
|
+
* platformContext.deleteValue(MY_KEY);
|
|
38
|
+
*/
|
|
39
|
+
export function createPlatformContextValueKey<T>(key: string): PlatformContextValueKey<T> {
|
|
40
|
+
return Symbol.for(key) as PlatformContextValueKey<T>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Interface representing the platform context in Azure Functions.
|
|
45
|
+
* The PlatformContext provides access to the invocation context and allows storing and retrieving values associated with the context.
|
|
46
|
+
*
|
|
47
|
+
* - `invocationContext`: The InvocationContext associated with the current execution.
|
|
48
|
+
* - `getValue(key)`: Retrieves a value associated with the specified key from the context.
|
|
49
|
+
* - `setValue(key, value)`: Sets a value associated with the specified key in the context.
|
|
50
|
+
* - `deleteValue(key)`: Deletes a value associated with the specified key from the context.
|
|
51
|
+
* - `clone()`: Creates a deep copy of the current PlatformContext, preserving its values and invocation context.
|
|
52
|
+
*/
|
|
53
|
+
export interface PlatformContext {
|
|
54
|
+
readonly invocationContext: InvocationContext;
|
|
55
|
+
getValue<T>(key: PlatformContextValueKey<T>): T | undefined;
|
|
56
|
+
setValue<T>(key: PlatformContextValueKey<T>, value: T): PlatformContext;
|
|
57
|
+
deleteValue(key: PlatformContextValueKey): PlatformContext;
|
|
58
|
+
clone(): PlatformContext;
|
|
59
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { InvocationContext } from '@azure/functions';
|
|
2
|
+
import { injectable } from 'inversify';
|
|
3
|
+
import { serviceIdentifier } from 'shared';
|
|
4
|
+
import * as winston from 'winston';
|
|
5
|
+
import { createPlatformContextValueKey, PlatformContext } from './platform-context.model';
|
|
6
|
+
import { PlatformExecutionContext } from './platform.execution.context';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* A unique identifier for the PlatformContextProvider service.
|
|
10
|
+
* This identifier can be used for dependency injection and service resolution.
|
|
11
|
+
*/
|
|
12
|
+
export const PLATFORM_CONTEXT_PROVIDER = serviceIdentifier<PlatformContextProvider>(
|
|
13
|
+
'AzFunctions.Platform.ContextProvider',
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Interface representing a provider for PlatformContext instances.
|
|
18
|
+
* The provider is responsible for creating and providing PlatformContext instances based on the given InvocationContext.
|
|
19
|
+
*
|
|
20
|
+
* - `providePlatformContext(invocationContext)`: Creates and returns a PlatformContext instance for the provided InvocationContext.
|
|
21
|
+
*/
|
|
22
|
+
export interface PlatformContextProvider {
|
|
23
|
+
providePlatformContext(invocationContext: InvocationContext): PlatformContext;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const ORIGINAL_INVOCATION_CONTEXT_VALUE_KEY = createPlatformContextValueKey<InvocationContext>(
|
|
27
|
+
'AzFunctions.Platform.OriginalInvocationContext',
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
@injectable()
|
|
31
|
+
export class PlatformExecutionContextProvider implements PlatformContextProvider {
|
|
32
|
+
constructor(private readonly logger: winston.Logger) {}
|
|
33
|
+
|
|
34
|
+
providePlatformContext(invocationContext: InvocationContext): PlatformContext {
|
|
35
|
+
return new PlatformExecutionContext(invocationContext, this.logger);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { InvocationContext } from '@azure/functions';
|
|
2
|
+
import * as winston from 'winston';
|
|
3
|
+
import { PlatformContext, PlatformContextError, PlatformContextValueKey } from './platform-context.model';
|
|
4
|
+
import { ORIGINAL_INVOCATION_CONTEXT_VALUE_KEY } from './platform-context.provider';
|
|
5
|
+
import { WrappedInvocationContext } from './wrapped-invocation-context';
|
|
6
|
+
|
|
7
|
+
export class PlatformExecutionContext implements PlatformContext {
|
|
8
|
+
private readonly data: Map<PlatformContextValueKey, unknown>;
|
|
9
|
+
readonly invocationContext: InvocationContext;
|
|
10
|
+
private readonly logger;
|
|
11
|
+
|
|
12
|
+
constructor(invocationContext: InvocationContext, logger: winston.Logger) {
|
|
13
|
+
this.logger = logger.child({});
|
|
14
|
+
this.invocationContext = new WrappedInvocationContext(invocationContext, this.logger);
|
|
15
|
+
this.data = new Map<PlatformContextValueKey, unknown>();
|
|
16
|
+
this.data.set(ORIGINAL_INVOCATION_CONTEXT_VALUE_KEY, invocationContext);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
getValue<T>(key: PlatformContextValueKey<T>): T | undefined {
|
|
20
|
+
return this.data.get(key) as T | undefined;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
setValue<T>(key: PlatformContextValueKey<T>, value: T): PlatformContext {
|
|
24
|
+
this.data.set(key, value);
|
|
25
|
+
return this;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
deleteValue(key: PlatformContextValueKey): PlatformContext {
|
|
29
|
+
this.data.delete(key);
|
|
30
|
+
return this;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
clone(): PlatformContext {
|
|
34
|
+
const originalContext = this.getValue(ORIGINAL_INVOCATION_CONTEXT_VALUE_KEY);
|
|
35
|
+
if (!originalContext) {
|
|
36
|
+
throw new PlatformContextError('Original invocation context is missing');
|
|
37
|
+
}
|
|
38
|
+
const clonedContext = new PlatformExecutionContext(originalContext, this.logger);
|
|
39
|
+
for (const [key, value] of this.data.entries()) {
|
|
40
|
+
clonedContext.setValue(key, value);
|
|
41
|
+
}
|
|
42
|
+
return clonedContext;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { LogLevel as FunctionsLoglevel, InvocationContext } from '@azure/functions';
|
|
2
|
+
import { LogLevel } from 'logger';
|
|
3
|
+
import * as winston from 'winston';
|
|
4
|
+
|
|
5
|
+
const LOG_LEVEL_MAP: Record<FunctionsLoglevel, LogLevel> = {
|
|
6
|
+
critical: 'error',
|
|
7
|
+
error: 'error',
|
|
8
|
+
warning: 'warn',
|
|
9
|
+
information: 'info',
|
|
10
|
+
debug: 'debug',
|
|
11
|
+
trace: 'verbose',
|
|
12
|
+
none: 'info',
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export class WrappedInvocationContext extends InvocationContext {
|
|
16
|
+
constructor(parentInvocationContext: InvocationContext, logger: winston.Logger) {
|
|
17
|
+
super({
|
|
18
|
+
...parentInvocationContext,
|
|
19
|
+
logHandler: (level, ...args) => {
|
|
20
|
+
const translatedLogLevel = LOG_LEVEL_MAP[level];
|
|
21
|
+
const [message, ...meta] = args;
|
|
22
|
+
logger.log(translatedLogLevel, message as string, ...meta);
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { EventHubFunctionOptions, EventHubTriggerOptions } from '@azure/functions';
|
|
2
|
+
import { ArgMetadata, CommonArgMetadata, TriggerHandlerClassMetadata } from 'shared';
|
|
3
|
+
import { ZodType } from 'zod';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Configuration for an Event Hub handler.
|
|
7
|
+
* - `connection`: The name of the app setting that contains the Event Hub connection string.
|
|
8
|
+
* - `eventHubName`: The name of the Event Hub to listen to.
|
|
9
|
+
*/
|
|
10
|
+
export interface EventHubHandlerConfig {
|
|
11
|
+
connection: string;
|
|
12
|
+
eventHubName: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const EVENT_HUB_HANDLER_TYPE = 'event-hub-handler';
|
|
16
|
+
|
|
17
|
+
export interface EventHubHandlerMetadata extends TriggerHandlerClassMetadata, EventHubHandlerConfig {
|
|
18
|
+
type: typeof EVENT_HUB_HANDLER_TYPE;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type EventHubHandlerCardinality = EventHubTriggerOptions['cardinality'];
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Configuration for an Event Hub handler.
|
|
25
|
+
* - `triggerId`: A unique identifier for the trigger.
|
|
26
|
+
* - `consumerGroup`: (Optional) The consumer group to use. Defaults to `$Default`.
|
|
27
|
+
* - `cardinality`: (Optional) The cardinality of the Messages, either 'one' or 'many'. Defaults to 'many'.
|
|
28
|
+
* - `extraInputs`: (Optional) Additional inputs for the function.
|
|
29
|
+
* - `extraOutputs`: (Optional) Additional outputs for the function.
|
|
30
|
+
*/
|
|
31
|
+
export type OnEventHubTriggerConfig = {
|
|
32
|
+
triggerId?: string;
|
|
33
|
+
consumerGroup?: string;
|
|
34
|
+
cardinality?: EventHubHandlerCardinality;
|
|
35
|
+
} & Pick<EventHubFunctionOptions, 'extraInputs' | 'extraOutputs'>;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Configuration for an Event Hub trigger message argument.
|
|
39
|
+
* - `withPayload`: (Optional) A Zod schema for the payload of the message. If not provided, the payload will be of type `unknown`.
|
|
40
|
+
* - `withSystemProperties`: (Optional) A Zod schema for the system properties of the message. If not provided, the system properties won't be included in the message argument.
|
|
41
|
+
* - `withProperties`: (Optional) A Zod schema for the custom properties of the message. If not provided, the properties won't be included in the message argument.
|
|
42
|
+
* - `withEventData`: (Optional) If true, includes the raw EventData in the message argument.
|
|
43
|
+
*/
|
|
44
|
+
export interface EventHubTriggerMessageArgConfig {
|
|
45
|
+
withPayload?: ZodType<unknown>;
|
|
46
|
+
withSystemProperties?: ZodType<unknown>;
|
|
47
|
+
withProperties?: ZodType<unknown>;
|
|
48
|
+
withEventData?: true;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface EventHubHandlerMessageArgMetadata {
|
|
52
|
+
payloadSchema?: ZodType<unknown>;
|
|
53
|
+
systemPropertiesSchema?: ZodType<unknown>;
|
|
54
|
+
propertiesSchema?: ZodType<unknown>;
|
|
55
|
+
isEventData?: true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface EventHubHandlerDataArgMetadata extends EventHubHandlerMessageArgMetadata, ArgMetadata {
|
|
59
|
+
type: 'message' | 'messages';
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface EventHubHandlerRawDataArgMetadata extends ArgMetadata {
|
|
63
|
+
type: 'rawMessage' | 'rawMessages';
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type EventHubHandlerArgMetadata =
|
|
67
|
+
| CommonArgMetadata
|
|
68
|
+
| EventHubHandlerRawDataArgMetadata
|
|
69
|
+
| EventHubHandlerDataArgMetadata;
|
|
70
|
+
|
|
71
|
+
export interface OnEventHubTriggerArgsMetadata {
|
|
72
|
+
args: EventHubHandlerArgMetadata[];
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export type EventHubTriggerMetadata = { type: typeof EVENT_HUB_HANDLER_TYPE } & OnEventHubTriggerConfig &
|
|
76
|
+
OnEventHubTriggerArgsMetadata;
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { decorate, injectable } from 'inversify';
|
|
2
|
+
import * as shared from 'shared';
|
|
3
|
+
import { adjustMetadata, FUNCTION_HANDLER_METADATA, getCommonArg } from 'shared';
|
|
4
|
+
import {
|
|
5
|
+
EventHubHandlerArgMetadata,
|
|
6
|
+
EventHubHandlerConfig,
|
|
7
|
+
EventHubHandlerMetadata,
|
|
8
|
+
EventHubTriggerMessageArgConfig,
|
|
9
|
+
EventHubTriggerMetadata,
|
|
10
|
+
OnEventHubTriggerArgsMetadata,
|
|
11
|
+
OnEventHubTriggerConfig,
|
|
12
|
+
} from './decorators.model';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Class decorator to define an Event Hub function handler.
|
|
16
|
+
* This decorator registers the class as an Event Hub handler with the specified configuration.
|
|
17
|
+
*
|
|
18
|
+
* @param config Configuration for the Event Hub handler, including the name and event hub details.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* @EventHubHandler({
|
|
23
|
+
* eventHubName: 'my-event-hub',
|
|
24
|
+
* connection: 'EventHubConnectionString',
|
|
25
|
+
* consumerGroup: '$Default',
|
|
26
|
+
* })
|
|
27
|
+
* class MyEventHubHandler implements OnEventHubTrigger {
|
|
28
|
+
*
|
|
29
|
+
* @OnEventHubTrigger({ cardinality: 'many' })
|
|
30
|
+
* async handle(
|
|
31
|
+
* @Messages({ withPayload: z.object({ id: z.string(), value: z.number() }) }) messages: EventHubMessageWrapper<{ id: string; value: number }>[],
|
|
32
|
+
* InvocationCtx: InvocationContext
|
|
33
|
+
* ): Promise<void> {
|
|
34
|
+
* for (const message of messages) {
|
|
35
|
+
* console.log(`Received Message with id: ${message.payload.id} and value: ${message.payload.value}`);
|
|
36
|
+
* }
|
|
37
|
+
* }
|
|
38
|
+
* }
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export function EventHubHandler(config: EventHubHandlerConfig): ClassDecorator {
|
|
42
|
+
return target => {
|
|
43
|
+
const metadata: EventHubHandlerMetadata = {
|
|
44
|
+
type: 'event-hub-handler',
|
|
45
|
+
...config,
|
|
46
|
+
};
|
|
47
|
+
Reflect.defineMetadata(FUNCTION_HANDLER_METADATA, metadata, target);
|
|
48
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
49
|
+
decorate(injectable(), target as Function);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Class decorator to define an Event Hub function handler.
|
|
55
|
+
* This decorator registers the class as an Event Hub handler with the specified configuration.
|
|
56
|
+
*
|
|
57
|
+
* @param config Configuration for the Event Hub handler, including the name and event hub details.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const eventPayloadSchema = z.object({ id: z.string(), value: z.number() });
|
|
62
|
+
* type EventPayload = z.infer<typeof eventPayloadSchema>;
|
|
63
|
+
*
|
|
64
|
+
* @EventHubHandler({
|
|
65
|
+
* eventHubName: 'my-event-hub',
|
|
66
|
+
* connection: 'EventHubConnectionString',
|
|
67
|
+
* consumerGroup: '$Default',
|
|
68
|
+
* })
|
|
69
|
+
* class MyEventHubHandler {
|
|
70
|
+
* @OnEventHubTrigger({
|
|
71
|
+
* triggerId: 'my-event-hub-trigger',
|
|
72
|
+
* cardinality: 'many'
|
|
73
|
+
* })
|
|
74
|
+
* async handle(
|
|
75
|
+
* @Messages({ withPayload: eventPayloadSchema, withEventData: true }) messages: EventHubMessageWrapper<EventPayload, undefined, undefined, true>[],
|
|
76
|
+
* InvocationCtx: InvocationContext
|
|
77
|
+
* ): Promise<void> {
|
|
78
|
+
* for (const message of messages) {
|
|
79
|
+
* console.log(`Received Message with id: ${message.payload.id} and value: ${message.payload.value}, enqueued at: ${message.eventData.enqueuedTimeUtc}`);
|
|
80
|
+
* }
|
|
81
|
+
* }
|
|
82
|
+
* }
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
export function OnEventHubTrigger(config: OnEventHubTriggerConfig): MethodDecorator {
|
|
86
|
+
return (target, propertyKey) => {
|
|
87
|
+
const ownMetadata = Reflect.getOwnMetadata(FUNCTION_HANDLER_METADATA, target, propertyKey) as
|
|
88
|
+
| OnEventHubTriggerArgsMetadata
|
|
89
|
+
| undefined;
|
|
90
|
+
const argsMetadata =
|
|
91
|
+
ownMetadata ?? shared.initializeMetadata<EventHubHandlerArgMetadata>(target, propertyKey, getCommonArg);
|
|
92
|
+
const metadata: EventHubTriggerMetadata = {
|
|
93
|
+
type: 'event-hub-handler',
|
|
94
|
+
...config,
|
|
95
|
+
...argsMetadata,
|
|
96
|
+
};
|
|
97
|
+
Reflect.defineMetadata(FUNCTION_HANDLER_METADATA, metadata, target, propertyKey);
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Parameter decorator to inject Event Hub Message data into the handler method.
|
|
103
|
+
*
|
|
104
|
+
* This decorator can be used to specify the structure of the Event Hub Message payload,
|
|
105
|
+
* system properties, and custom properties using Zod schemas.
|
|
106
|
+
*
|
|
107
|
+
* @param messageConfig
|
|
108
|
+
* Configuration for the Event Hub Message argument, including optional Zod schemas for payload, system properties, and custom properties.
|
|
109
|
+
* - `withPayload`: A Zod schema to validate and parse the Message payload.
|
|
110
|
+
* - `withSystemProperties`: A Zod schema to validate and parse the system properties of the Message. If not provided, system properties will not be included.
|
|
111
|
+
* - `withProperties`: A Zod schema to validate and parse custom properties of the Message. If not provided, custom properties will not be included.
|
|
112
|
+
* - `withEventData`: If set to true, includes the raw Event Hub event data in the argument.
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```ts
|
|
116
|
+
* const eventPayloadSchema = z.object({ id: z.string(), value: z.number() });
|
|
117
|
+
* type EventPayload = z.infer<typeof eventPayloadSchema>;
|
|
118
|
+
*
|
|
119
|
+
* const eventAppPropertiesSchema = z.object({ APP_REGISTRATION_ID: z.string() });
|
|
120
|
+
* type EventAppProperties = z.infer<typeof eventAppPropertiesSchema>;
|
|
121
|
+
*
|
|
122
|
+
* class MyEventHubHandler implements OnEventHubTrigger {
|
|
123
|
+
* async handle(
|
|
124
|
+
* @Message({ withPayload: eventPayloadSchema, withProperties: eventAppPropertiesSchema
|
|
125
|
+
* }) Message: EventHubMessageWrapper<EventPayload, undefined, EventAppProperties>,
|
|
126
|
+
* @InvocationCtx() context: InvocationContext
|
|
127
|
+
* ): Promise<void> {
|
|
128
|
+
* context.log(`Received Message with id: ${Message.payload.id} and value: ${Message.payload.value}`);
|
|
129
|
+
* }
|
|
130
|
+
* }
|
|
131
|
+
* ```
|
|
132
|
+
*/
|
|
133
|
+
export function Message(messageConfig: EventHubTriggerMessageArgConfig): ParameterDecorator {
|
|
134
|
+
return adjustHandlerMetadata(convertEventHubConfigToMeta('message', messageConfig));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Parameter decorator to inject multiple Event Hub Messages into the handler method.
|
|
139
|
+
*
|
|
140
|
+
* This decorator can be used to specify the structure of the Event Hub Message payload,
|
|
141
|
+
* system properties, and custom properties using Zod schemas.
|
|
142
|
+
* @param messagesConfig
|
|
143
|
+
* Configuration for the Event Hub Messages argument, including optional Zod schemas for payload, system properties, and custom properties.
|
|
144
|
+
* - `withPayload`: A Zod schema to validate and parse the Message payload.
|
|
145
|
+
* - `withSystemProperties`: A Zod schema to validate and parse the system properties of the Message. If not provided, system properties will not be included.
|
|
146
|
+
* - `withProperties`: A Zod schema to validate and parse custom properties of the Message. If not provided, custom properties will not be included.
|
|
147
|
+
* - `withEventData`: If set to true, includes the raw Event Hub event data in the argument.
|
|
148
|
+
*
|
|
149
|
+
* @example
|
|
150
|
+
* ```ts
|
|
151
|
+
const eventPayloadSchema = z.object({ id: z.string(), value: z.number() });
|
|
152
|
+
type EventPayload = z.infer<typeof eventPayloadSchema>;
|
|
153
|
+
|
|
154
|
+
* class MyEventHubHandler implements OnEventHubTrigger {
|
|
155
|
+
* async handle(
|
|
156
|
+
* @Messages({ withPayload: eventPayloadSchema }) messages: EventHubMessageWrapper<EventPayload>[],
|
|
157
|
+
* @InvocationCtx() context: InvocationContext
|
|
158
|
+
* ): Promise<void> {
|
|
159
|
+
* for (const message of messages) {
|
|
160
|
+
* context.log(`Received Message with id: ${message.payload.id} and value: ${message.payload.value}`);
|
|
161
|
+
* }
|
|
162
|
+
* }
|
|
163
|
+
* }
|
|
164
|
+
* ```
|
|
165
|
+
*/
|
|
166
|
+
export function Messages(messagesConfig: EventHubTriggerMessageArgConfig): ParameterDecorator {
|
|
167
|
+
return adjustHandlerMetadata(convertEventHubConfigToMeta('messages', messagesConfig));
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Parameter decorator to inject the raw Event Hub Message into the handler method.
|
|
172
|
+
* This decorator can be used when you need access to the complete Event Hub Message object,
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* ```ts
|
|
176
|
+
* class MyEventHubHandler implements OnEventHubTrigger {
|
|
177
|
+
* async handle(
|
|
178
|
+
* @RawMessage() message: unknown,
|
|
179
|
+
* @InvocationCtx() context: InvocationContext
|
|
180
|
+
* ): Promise<void> {
|
|
181
|
+
* context.log(`Received raw Message: ${JSON.stringify(message)}`);
|
|
182
|
+
* }
|
|
183
|
+
* }
|
|
184
|
+
* ```
|
|
185
|
+
*/
|
|
186
|
+
export function RawMessage(): ParameterDecorator {
|
|
187
|
+
return adjustHandlerMetadata({
|
|
188
|
+
type: 'rawMessage',
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Parameter decorator to inject multiple raw Event Hub Messages into the handler method.
|
|
194
|
+
* This decorator can be used when you need access to the complete Event Hub Message objects,
|
|
195
|
+
*
|
|
196
|
+
* @example
|
|
197
|
+
* ```ts
|
|
198
|
+
* class MyEventHubHandler implements OnEventHubTrigger {
|
|
199
|
+
* async handle(
|
|
200
|
+
* @RawMessages() messages: unknown[],
|
|
201
|
+
* @InvocationCtx() context: InvocationContext
|
|
202
|
+
* ): Promise<void> {
|
|
203
|
+
* for (const message of messages) {
|
|
204
|
+
* context.log(`Received raw Message: ${JSON.stringify(message)}`);
|
|
205
|
+
* }
|
|
206
|
+
* }
|
|
207
|
+
* }
|
|
208
|
+
* ```
|
|
209
|
+
*/
|
|
210
|
+
export function RawMessages(): ParameterDecorator {
|
|
211
|
+
return adjustHandlerMetadata({
|
|
212
|
+
type: 'rawMessages',
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
function convertEventHubConfigToMeta(
|
|
217
|
+
type: EventHubHandlerArgMetadata['type'],
|
|
218
|
+
messagesConfig: EventHubTriggerMessageArgConfig,
|
|
219
|
+
): EventHubHandlerArgMetadata {
|
|
220
|
+
return {
|
|
221
|
+
type,
|
|
222
|
+
payloadSchema: messagesConfig.withPayload,
|
|
223
|
+
systemPropertiesSchema: messagesConfig.withSystemProperties,
|
|
224
|
+
propertiesSchema: messagesConfig.withProperties,
|
|
225
|
+
isEventData: messagesConfig.withEventData,
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
function adjustHandlerMetadata(handlerArg: EventHubHandlerArgMetadata): ParameterDecorator {
|
|
230
|
+
return adjustMetadata(FUNCTION_HANDLER_METADATA, handlerArg, getCommonArg);
|
|
231
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { injectable } from 'inversify';
|
|
2
|
+
import {
|
|
3
|
+
FUNCTION_HANDLER_METADATA,
|
|
4
|
+
TriggerHandlerClass,
|
|
5
|
+
TriggerHandlerMetadataError,
|
|
6
|
+
TriggerHandlerMetadataReader,
|
|
7
|
+
} from 'shared';
|
|
8
|
+
import { EVENT_HUB_HANDLER_TYPE, EventHubHandlerMetadata, EventHubTriggerMetadata } from './decorators';
|
|
9
|
+
|
|
10
|
+
@injectable()
|
|
11
|
+
export class EventHubHandlerMetadataReader {
|
|
12
|
+
constructor(private readonly metadataReader: TriggerHandlerMetadataReader) {}
|
|
13
|
+
|
|
14
|
+
getHandlerClassMetadata(azureFunction: TriggerHandlerClass): EventHubHandlerMetadata {
|
|
15
|
+
const handlerClassMetadata = this.metadataReader.getHandlerClassMetadata(azureFunction);
|
|
16
|
+
if (handlerClassMetadata.type !== EVENT_HUB_HANDLER_TYPE) {
|
|
17
|
+
throw new TriggerHandlerMetadataError(
|
|
18
|
+
`Invalid type for handler class ${azureFunction.name}. Expected '${EVENT_HUB_HANDLER_TYPE}', but got '${handlerClassMetadata.type}'.`,
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
return handlerClassMetadata as EventHubHandlerMetadata;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
getTriggerMetadata(azureFunction: TriggerHandlerClass, operation: string): EventHubTriggerMetadata {
|
|
25
|
+
const argsMetadata = Reflect.getOwnMetadata(FUNCTION_HANDLER_METADATA, azureFunction.prototype, operation);
|
|
26
|
+
if (argsMetadata === undefined) {
|
|
27
|
+
throw new TriggerHandlerMetadataError(
|
|
28
|
+
`No metadata found for operation ${operation} in handler class ${azureFunction.name}.`,
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
if (argsMetadata.type !== EVENT_HUB_HANDLER_TYPE) {
|
|
32
|
+
throw new TriggerHandlerMetadataError(
|
|
33
|
+
`Invalid type for operation ${operation} in handler class ${azureFunction.name}. Expected '${EVENT_HUB_HANDLER_TYPE}', but got '${argsMetadata.type}'.`,
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
return argsMetadata as EventHubTriggerMetadata;
|
|
37
|
+
}
|
|
38
|
+
}
|