quidproquo-dev-server 0.0.253 → 0.0.255
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/lib/commonjs/actionProcessor/core/event/express/api/getEventAutoRespondActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/event/express/api/getEventAutoRespondActionProcessor.js +31 -31
- package/lib/commonjs/actionProcessor/core/event/express/api/getEventGetRecordsActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/event/express/api/getEventGetRecordsActionProcessor.js +34 -34
- package/lib/commonjs/actionProcessor/core/event/express/api/getEventGetStorySessionActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/event/express/api/getEventGetStorySessionActionProcessor.js +46 -46
- package/lib/commonjs/actionProcessor/core/event/express/api/getEventMatchStoryActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/event/express/api/getEventMatchStoryActionProcessor.js +53 -53
- package/lib/commonjs/actionProcessor/core/event/express/api/getEventTransformResponseResultActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/event/express/api/getEventTransformResponseResultActionProcessor.js +58 -58
- package/lib/commonjs/actionProcessor/core/event/express/api/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/event/express/api/index.js +21 -21
- package/lib/commonjs/actionProcessor/core/event/express/api/types.d.ts +8 -8
- package/lib/commonjs/actionProcessor/core/event/express/api/types.js +2 -2
- package/lib/commonjs/actionProcessor/core/event/express/index.d.ts +1 -1
- package/lib/commonjs/actionProcessor/core/event/express/index.js +17 -17
- package/lib/commonjs/actionProcessor/core/event/index.d.ts +4 -4
- package/lib/commonjs/actionProcessor/core/event/index.js +20 -20
- package/lib/commonjs/actionProcessor/core/event/node/index.d.ts +1 -1
- package/lib/commonjs/actionProcessor/core/event/node/index.js +17 -17
- package/lib/commonjs/actionProcessor/core/event/node/serviceFunction/getEventAutoRespondActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/event/node/serviceFunction/getEventAutoRespondActionProcessor.js +24 -24
- package/lib/commonjs/actionProcessor/core/event/node/serviceFunction/getEventGetRecordsActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/event/node/serviceFunction/getEventGetRecordsActionProcessor.js +28 -28
- package/lib/commonjs/actionProcessor/core/event/node/serviceFunction/getEventGetStorySessionActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/event/node/serviceFunction/getEventGetStorySessionActionProcessor.js +24 -24
- package/lib/commonjs/actionProcessor/core/event/node/serviceFunction/getEventMatchStoryActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/event/node/serviceFunction/getEventMatchStoryActionProcessor.js +33 -33
- package/lib/commonjs/actionProcessor/core/event/node/serviceFunction/getEventTransformResponseResultActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/event/node/serviceFunction/getEventTransformResponseResultActionProcessor.js +30 -30
- package/lib/commonjs/actionProcessor/core/event/node/serviceFunction/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/event/node/serviceFunction/index.js +21 -21
- package/lib/commonjs/actionProcessor/core/event/node/serviceFunction/types.d.ts +11 -11
- package/lib/commonjs/actionProcessor/core/event/node/serviceFunction/types.js +2 -2
- package/lib/commonjs/actionProcessor/core/event/queue/getEventAutoRespondActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/event/queue/getEventAutoRespondActionProcessor.js +29 -29
- package/lib/commonjs/actionProcessor/core/event/queue/getEventGetRecordsActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/event/queue/getEventGetRecordsActionProcessor.js +31 -31
- package/lib/commonjs/actionProcessor/core/event/queue/getEventGetStorySessionActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/event/queue/getEventGetStorySessionActionProcessor.js +24 -24
- package/lib/commonjs/actionProcessor/core/event/queue/getEventMatchStoryActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/event/queue/getEventMatchStoryActionProcessor.js +42 -42
- package/lib/commonjs/actionProcessor/core/event/queue/getEventTransformResponseResultActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/event/queue/getEventTransformResponseResultActionProcessor.js +26 -26
- package/lib/commonjs/actionProcessor/core/event/queue/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/event/queue/index.js +21 -21
- package/lib/commonjs/actionProcessor/core/event/queue/types.d.ts +15 -15
- package/lib/commonjs/actionProcessor/core/event/queue/types.js +2 -2
- package/lib/commonjs/actionProcessor/core/event/ws/index.d.ts +1 -1
- package/lib/commonjs/actionProcessor/core/event/ws/index.js +17 -17
- package/lib/commonjs/actionProcessor/core/event/ws/websocket/getEventAutoRespondActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/event/ws/websocket/getEventAutoRespondActionProcessor.js +24 -24
- package/lib/commonjs/actionProcessor/core/event/ws/websocket/getEventGetRecordsActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/event/ws/websocket/getEventGetRecordsActionProcessor.js +53 -53
- package/lib/commonjs/actionProcessor/core/event/ws/websocket/getEventGetStorySessionActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/event/ws/websocket/getEventGetStorySessionActionProcessor.js +24 -24
- package/lib/commonjs/actionProcessor/core/event/ws/websocket/getEventMatchStoryActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/event/ws/websocket/getEventMatchStoryActionProcessor.js +41 -41
- package/lib/commonjs/actionProcessor/core/event/ws/websocket/getEventTransformResponseResultActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/event/ws/websocket/getEventTransformResponseResultActionProcessor.js +29 -29
- package/lib/commonjs/actionProcessor/core/event/ws/websocket/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/event/ws/websocket/index.js +21 -21
- package/lib/commonjs/actionProcessor/core/event/ws/websocket/types.d.ts +8 -8
- package/lib/commonjs/actionProcessor/core/event/ws/websocket/types.js +2 -2
- package/lib/commonjs/actionProcessor/core/eventBus/getEventBusSendMessagesActionProcessor.d.ts +10 -10
- package/lib/commonjs/actionProcessor/core/eventBus/getEventBusSendMessagesActionProcessor.js +43 -43
- package/lib/commonjs/actionProcessor/core/eventBus/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/eventBus/index.js +17 -17
- package/lib/commonjs/actionProcessor/core/getCoreActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/getCoreActionProcessor.js +20 -20
- package/lib/commonjs/actionProcessor/core/graphDatabaseOverride/getGraphDatabaseExecuteOpenCypherQueryActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/graphDatabaseOverride/getGraphDatabaseExecuteOpenCypherQueryActionProcessor.js +38 -38
- package/lib/commonjs/actionProcessor/core/graphDatabaseOverride/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/graphDatabaseOverride/index.js +17 -17
- package/lib/commonjs/actionProcessor/core/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/index.js +18 -18
- package/lib/commonjs/actionProcessor/core/log/getLogCreateActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/log/getLogCreateActionProcessor.js +44 -44
- package/lib/commonjs/actionProcessor/core/log/getLogDisableEventHistoryActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/log/getLogDisableEventHistoryActionProcessor.js +25 -25
- package/lib/commonjs/actionProcessor/core/log/getLogTemplateLiteralActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/log/getLogTemplateLiteralActionProcessor.js +30 -30
- package/lib/commonjs/actionProcessor/core/log/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/log/index.js +19 -19
- package/lib/commonjs/actionProcessor/core/queue/getQueueSendMessageActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/queue/getQueueSendMessageActionProcessor.js +46 -46
- package/lib/commonjs/actionProcessor/core/queue/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/queue/index.js +17 -17
- package/lib/commonjs/actionProcessor/index.d.ts +4 -4
- package/lib/commonjs/actionProcessor/index.js +37 -37
- package/lib/commonjs/actionProcessor/webserver/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/webserver/index.js +18 -18
- package/lib/commonjs/actionProcessor/webserver/serviceFunctionOverride/getServiceFunctionExecuteActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/webserver/serviceFunctionOverride/getServiceFunctionExecuteActionProcessor.js +41 -41
- package/lib/commonjs/actionProcessor/webserver/serviceFunctionOverride/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/webserver/serviceFunctionOverride/index.js +17 -17
- package/lib/commonjs/actionProcessor/webserver/websocket/getWebsocketSendMessageActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/webserver/websocket/getWebsocketSendMessageActionProcessor.js +35 -35
- package/lib/commonjs/actionProcessor/webserver/websocket/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/webserver/websocket/index.js +17 -17
- package/lib/commonjs/allServiceConfig.d.ts +3 -3
- package/lib/commonjs/allServiceConfig.js +42 -43
- package/lib/commonjs/config/index.d.ts +1 -1
- package/lib/commonjs/config/index.js +17 -17
- package/lib/commonjs/config/settings/defineDevServerConfig.d.ts +6 -6
- package/lib/commonjs/config/settings/defineDevServerConfig.js +21 -21
- package/lib/commonjs/config/settings/index.d.ts +1 -1
- package/lib/commonjs/config/settings/index.js +17 -17
- package/lib/commonjs/entry/serviceFunction/runCypherQuery.d.ts +3 -3
- package/lib/commonjs/entry/serviceFunction/runCypherQuery.js +8 -9
- package/lib/commonjs/implementations/apiImplementation.d.ts +2 -2
- package/lib/commonjs/implementations/apiImplementation.js +145 -148
- package/lib/commonjs/implementations/eventBusImplementation.d.ts +2 -2
- package/lib/commonjs/implementations/eventBusImplementation.js +73 -73
- package/lib/commonjs/implementations/index.d.ts +5 -5
- package/lib/commonjs/implementations/index.js +21 -21
- package/lib/commonjs/implementations/queueImplementation.d.ts +2 -2
- package/lib/commonjs/implementations/queueImplementation.js +95 -95
- package/lib/commonjs/implementations/serviceFunctionImplementation.d.ts +2 -2
- package/lib/commonjs/implementations/serviceFunctionImplementation.js +34 -34
- package/lib/commonjs/implementations/webSocket/index.d.ts +2 -2
- package/lib/commonjs/implementations/webSocket/index.js +18 -18
- package/lib/commonjs/implementations/webSocket/types/WsEvent.d.ts +12 -13
- package/lib/commonjs/implementations/webSocket/types/WsEvent.js +2 -2
- package/lib/commonjs/implementations/webSocket/types/index.d.ts +1 -1
- package/lib/commonjs/implementations/webSocket/types/index.js +17 -17
- package/lib/commonjs/implementations/webSocket/webSocketImplementation.d.ts +3 -3
- package/lib/commonjs/implementations/webSocket/webSocketImplementation.js +136 -136
- package/lib/commonjs/index.d.ts +3 -3
- package/lib/commonjs/index.js +19 -19
- package/lib/commonjs/logic/eventBus.d.ts +10 -11
- package/lib/commonjs/logic/eventBus.js +49 -49
- package/lib/commonjs/logic/index.d.ts +2 -2
- package/lib/commonjs/logic/index.js +18 -18
- package/lib/commonjs/logic/processEvent.d.ts +2 -2
- package/lib/commonjs/logic/processEvent.js +30 -30
- package/lib/commonjs/main.d.ts +5 -5
- package/lib/commonjs/main.js +55 -55
- package/lib/commonjs/types/DevServerConfig.d.ts +14 -14
- package/lib/commonjs/types/DevServerConfig.js +2 -2
- package/lib/commonjs/types/ExpressEvent.d.ts +26 -26
- package/lib/commonjs/types/ExpressEvent.js +2 -2
- package/lib/commonjs/types/index.d.ts +2 -2
- package/lib/commonjs/types/index.js +18 -18
- package/lib/esm/actionProcessor/core/event/express/api/getEventAutoRespondActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/event/express/api/getEventAutoRespondActionProcessor.js +16 -16
- package/lib/esm/actionProcessor/core/event/express/api/getEventGetRecordsActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/event/express/api/getEventGetRecordsActionProcessor.js +19 -19
- package/lib/esm/actionProcessor/core/event/express/api/getEventGetStorySessionActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/event/express/api/getEventGetStorySessionActionProcessor.js +36 -36
- package/lib/esm/actionProcessor/core/event/express/api/getEventMatchStoryActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/event/express/api/getEventMatchStoryActionProcessor.js +38 -38
- package/lib/esm/actionProcessor/core/event/express/api/getEventTransformResponseResultActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/event/express/api/getEventTransformResponseResultActionProcessor.js +46 -46
- package/lib/esm/actionProcessor/core/event/express/api/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/event/express/api/index.js +12 -12
- package/lib/esm/actionProcessor/core/event/express/api/types.d.ts +8 -8
- package/lib/esm/actionProcessor/core/event/express/api/types.js +1 -1
- package/lib/esm/actionProcessor/core/event/express/index.d.ts +1 -1
- package/lib/esm/actionProcessor/core/event/express/index.js +1 -1
- package/lib/esm/actionProcessor/core/event/index.d.ts +4 -4
- package/lib/esm/actionProcessor/core/event/index.js +4 -4
- package/lib/esm/actionProcessor/core/event/node/index.d.ts +1 -1
- package/lib/esm/actionProcessor/core/event/node/index.js +1 -1
- package/lib/esm/actionProcessor/core/event/node/serviceFunction/getEventAutoRespondActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/event/node/serviceFunction/getEventAutoRespondActionProcessor.js +9 -9
- package/lib/esm/actionProcessor/core/event/node/serviceFunction/getEventGetRecordsActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/event/node/serviceFunction/getEventGetRecordsActionProcessor.js +13 -13
- package/lib/esm/actionProcessor/core/event/node/serviceFunction/getEventGetStorySessionActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/event/node/serviceFunction/getEventGetStorySessionActionProcessor.js +9 -9
- package/lib/esm/actionProcessor/core/event/node/serviceFunction/getEventMatchStoryActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/event/node/serviceFunction/getEventMatchStoryActionProcessor.js +18 -18
- package/lib/esm/actionProcessor/core/event/node/serviceFunction/getEventTransformResponseResultActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/event/node/serviceFunction/getEventTransformResponseResultActionProcessor.js +15 -15
- package/lib/esm/actionProcessor/core/event/node/serviceFunction/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/event/node/serviceFunction/index.js +12 -12
- package/lib/esm/actionProcessor/core/event/node/serviceFunction/types.d.ts +11 -11
- package/lib/esm/actionProcessor/core/event/node/serviceFunction/types.js +1 -1
- package/lib/esm/actionProcessor/core/event/queue/getEventAutoRespondActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/event/queue/getEventAutoRespondActionProcessor.js +14 -14
- package/lib/esm/actionProcessor/core/event/queue/getEventGetRecordsActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/event/queue/getEventGetRecordsActionProcessor.js +16 -16
- package/lib/esm/actionProcessor/core/event/queue/getEventGetStorySessionActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/event/queue/getEventGetStorySessionActionProcessor.js +9 -9
- package/lib/esm/actionProcessor/core/event/queue/getEventMatchStoryActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/event/queue/getEventMatchStoryActionProcessor.js +27 -27
- package/lib/esm/actionProcessor/core/event/queue/getEventTransformResponseResultActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/event/queue/getEventTransformResponseResultActionProcessor.js +11 -11
- package/lib/esm/actionProcessor/core/event/queue/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/event/queue/index.js +12 -12
- package/lib/esm/actionProcessor/core/event/queue/types.d.ts +15 -15
- package/lib/esm/actionProcessor/core/event/queue/types.js +1 -1
- package/lib/esm/actionProcessor/core/event/ws/index.d.ts +1 -1
- package/lib/esm/actionProcessor/core/event/ws/index.js +1 -1
- package/lib/esm/actionProcessor/core/event/ws/websocket/getEventAutoRespondActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/event/ws/websocket/getEventAutoRespondActionProcessor.js +9 -9
- package/lib/esm/actionProcessor/core/event/ws/websocket/getEventGetRecordsActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/event/ws/websocket/getEventGetRecordsActionProcessor.js +38 -38
- package/lib/esm/actionProcessor/core/event/ws/websocket/getEventGetStorySessionActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/event/ws/websocket/getEventGetStorySessionActionProcessor.js +9 -9
- package/lib/esm/actionProcessor/core/event/ws/websocket/getEventMatchStoryActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/event/ws/websocket/getEventMatchStoryActionProcessor.js +26 -26
- package/lib/esm/actionProcessor/core/event/ws/websocket/getEventTransformResponseResultActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/event/ws/websocket/getEventTransformResponseResultActionProcessor.js +14 -14
- package/lib/esm/actionProcessor/core/event/ws/websocket/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/event/ws/websocket/index.js +12 -12
- package/lib/esm/actionProcessor/core/event/ws/websocket/types.d.ts +8 -8
- package/lib/esm/actionProcessor/core/event/ws/websocket/types.js +1 -1
- package/lib/esm/actionProcessor/core/eventBus/getEventBusSendMessagesActionProcessor.d.ts +10 -10
- package/lib/esm/actionProcessor/core/eventBus/getEventBusSendMessagesActionProcessor.js +30 -30
- package/lib/esm/actionProcessor/core/eventBus/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/eventBus/index.js +4 -4
- package/lib/esm/actionProcessor/core/getCoreActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/getCoreActionProcessor.js +10 -10
- package/lib/esm/actionProcessor/core/graphDatabaseOverride/getGraphDatabaseExecuteOpenCypherQueryActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/graphDatabaseOverride/getGraphDatabaseExecuteOpenCypherQueryActionProcessor.js +25 -25
- package/lib/esm/actionProcessor/core/graphDatabaseOverride/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/graphDatabaseOverride/index.js +4 -4
- package/lib/esm/actionProcessor/core/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/index.js +2 -2
- package/lib/esm/actionProcessor/core/log/getLogCreateActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/log/getLogCreateActionProcessor.js +26 -26
- package/lib/esm/actionProcessor/core/log/getLogDisableEventHistoryActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/log/getLogDisableEventHistoryActionProcessor.js +10 -10
- package/lib/esm/actionProcessor/core/log/getLogTemplateLiteralActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/log/getLogTemplateLiteralActionProcessor.js +12 -12
- package/lib/esm/actionProcessor/core/log/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/log/index.js +8 -8
- package/lib/esm/actionProcessor/core/queue/getQueueSendMessageActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/queue/getQueueSendMessageActionProcessor.js +33 -33
- package/lib/esm/actionProcessor/core/queue/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/queue/index.js +4 -4
- package/lib/esm/actionProcessor/index.d.ts +4 -4
- package/lib/esm/actionProcessor/index.js +18 -18
- package/lib/esm/actionProcessor/webserver/index.d.ts +2 -2
- package/lib/esm/actionProcessor/webserver/index.js +6 -6
- package/lib/esm/actionProcessor/webserver/serviceFunctionOverride/getServiceFunctionExecuteActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/webserver/serviceFunctionOverride/getServiceFunctionExecuteActionProcessor.js +29 -29
- package/lib/esm/actionProcessor/webserver/serviceFunctionOverride/index.d.ts +2 -2
- package/lib/esm/actionProcessor/webserver/serviceFunctionOverride/index.js +4 -4
- package/lib/esm/actionProcessor/webserver/websocket/getWebsocketSendMessageActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/webserver/websocket/getWebsocketSendMessageActionProcessor.js +19 -19
- package/lib/esm/actionProcessor/webserver/websocket/index.d.ts +2 -2
- package/lib/esm/actionProcessor/webserver/websocket/index.js +4 -4
- package/lib/esm/allServiceConfig.d.ts +3 -3
- package/lib/esm/allServiceConfig.js +39 -39
- package/lib/esm/config/index.d.ts +1 -1
- package/lib/esm/config/index.js +1 -1
- package/lib/esm/config/settings/defineDevServerConfig.d.ts +6 -6
- package/lib/esm/config/settings/defineDevServerConfig.js +16 -16
- package/lib/esm/config/settings/index.d.ts +1 -1
- package/lib/esm/config/settings/index.js +1 -1
- package/lib/esm/entry/serviceFunction/runCypherQuery.d.ts +3 -3
- package/lib/esm/entry/serviceFunction/runCypherQuery.js +5 -5
- package/lib/esm/implementations/apiImplementation.d.ts +2 -2
- package/lib/esm/implementations/apiImplementation.js +129 -132
- package/lib/esm/implementations/eventBusImplementation.d.ts +2 -2
- package/lib/esm/implementations/eventBusImplementation.js +60 -60
- package/lib/esm/implementations/index.d.ts +5 -5
- package/lib/esm/implementations/index.js +5 -5
- package/lib/esm/implementations/queueImplementation.d.ts +2 -2
- package/lib/esm/implementations/queueImplementation.js +78 -78
- package/lib/esm/implementations/serviceFunctionImplementation.d.ts +2 -2
- package/lib/esm/implementations/serviceFunctionImplementation.js +21 -21
- package/lib/esm/implementations/webSocket/index.d.ts +2 -2
- package/lib/esm/implementations/webSocket/index.js +2 -2
- package/lib/esm/implementations/webSocket/types/WsEvent.d.ts +12 -13
- package/lib/esm/implementations/webSocket/types/WsEvent.js +1 -1
- package/lib/esm/implementations/webSocket/types/index.d.ts +1 -1
- package/lib/esm/implementations/webSocket/types/index.js +1 -1
- package/lib/esm/implementations/webSocket/webSocketImplementation.d.ts +3 -3
- package/lib/esm/implementations/webSocket/webSocketImplementation.js +125 -125
- package/lib/esm/index.d.ts +3 -3
- package/lib/esm/index.js +3 -3
- package/lib/esm/logic/eventBus.d.ts +10 -11
- package/lib/esm/logic/eventBus.js +34 -34
- package/lib/esm/logic/index.d.ts +2 -2
- package/lib/esm/logic/index.js +2 -2
- package/lib/esm/logic/processEvent.d.ts +2 -2
- package/lib/esm/logic/processEvent.js +20 -20
- package/lib/esm/main.d.ts +5 -5
- package/lib/esm/main.js +30 -30
- package/lib/esm/types/DevServerConfig.d.ts +14 -14
- package/lib/esm/types/DevServerConfig.js +1 -1
- package/lib/esm/types/ExpressEvent.d.ts +26 -26
- package/lib/esm/types/ExpressEvent.js +1 -1
- package/lib/esm/types/index.d.ts +2 -2
- package/lib/esm/types/index.js +2 -2
- package/package.json +7 -7
package/lib/commonjs/main.js
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.startDevServer = exports.getDevConfigs = void 0;
|
|
27
|
-
const quidproquo_core_1 = require("quidproquo-core");
|
|
28
|
-
const implementations_1 = require("./implementations");
|
|
29
|
-
__exportStar(require("./implementations"), exports);
|
|
30
|
-
const getDevConfigs = (qpqConfigs, devServerConfigOverrides) => {
|
|
31
|
-
return qpqConfigs.map((qpqConfig) => {
|
|
32
|
-
return [
|
|
33
|
-
// Base config
|
|
34
|
-
...qpqConfig,
|
|
35
|
-
// all service override
|
|
36
|
-
...((devServerConfigOverrides === null || devServerConfigOverrides === void 0 ? void 0 : devServerConfigOverrides.allServices) || []),
|
|
37
|
-
// specific service override
|
|
38
|
-
...(((devServerConfigOverrides === null || devServerConfigOverrides === void 0 ? void 0 : devServerConfigOverrides.byService) || {})[quidproquo_core_1.qpqCoreUtils.getApplicationModuleName(qpqConfig)] || []),
|
|
39
|
-
];
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
exports.getDevConfigs = getDevConfigs;
|
|
43
|
-
const startDevServer = (devServerConfig, devServerConfigOverrides) => __awaiter(void 0, void 0, void 0, function* () {
|
|
44
|
-
console.log('Starting QPQ Dev Server!!!');
|
|
45
|
-
// Add ovverrides for dev server
|
|
46
|
-
const updatedDevServerConfig = Object.assign(Object.assign({}, devServerConfig), { qpqConfigs: (0, exports.getDevConfigs)(devServerConfig.qpqConfigs) });
|
|
47
|
-
yield Promise.all([
|
|
48
|
-
(0, implementations_1.apiImplementation)(updatedDevServerConfig),
|
|
49
|
-
(0, implementations_1.serviceFunctionImplementation)(updatedDevServerConfig),
|
|
50
|
-
(0, implementations_1.eventBusImplementation)(updatedDevServerConfig),
|
|
51
|
-
(0, implementations_1.queueImplementation)(updatedDevServerConfig),
|
|
52
|
-
(0, implementations_1.webSocketImplementation)(updatedDevServerConfig),
|
|
53
|
-
]);
|
|
54
|
-
});
|
|
55
|
-
exports.startDevServer = startDevServer;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.startDevServer = exports.getDevConfigs = void 0;
|
|
27
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
28
|
+
const implementations_1 = require("./implementations");
|
|
29
|
+
__exportStar(require("./implementations"), exports);
|
|
30
|
+
const getDevConfigs = (qpqConfigs, devServerConfigOverrides) => {
|
|
31
|
+
return qpqConfigs.map((qpqConfig) => {
|
|
32
|
+
return [
|
|
33
|
+
// Base config
|
|
34
|
+
...qpqConfig,
|
|
35
|
+
// all service override
|
|
36
|
+
...((devServerConfigOverrides === null || devServerConfigOverrides === void 0 ? void 0 : devServerConfigOverrides.allServices) || []),
|
|
37
|
+
// specific service override
|
|
38
|
+
...(((devServerConfigOverrides === null || devServerConfigOverrides === void 0 ? void 0 : devServerConfigOverrides.byService) || {})[quidproquo_core_1.qpqCoreUtils.getApplicationModuleName(qpqConfig)] || []),
|
|
39
|
+
];
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
exports.getDevConfigs = getDevConfigs;
|
|
43
|
+
const startDevServer = (devServerConfig, devServerConfigOverrides) => __awaiter(void 0, void 0, void 0, function* () {
|
|
44
|
+
console.log('Starting QPQ Dev Server!!!');
|
|
45
|
+
// Add ovverrides for dev server
|
|
46
|
+
const updatedDevServerConfig = Object.assign(Object.assign({}, devServerConfig), { qpqConfigs: (0, exports.getDevConfigs)(devServerConfig.qpqConfigs) });
|
|
47
|
+
yield Promise.all([
|
|
48
|
+
(0, implementations_1.apiImplementation)(updatedDevServerConfig),
|
|
49
|
+
(0, implementations_1.serviceFunctionImplementation)(updatedDevServerConfig),
|
|
50
|
+
(0, implementations_1.eventBusImplementation)(updatedDevServerConfig),
|
|
51
|
+
(0, implementations_1.queueImplementation)(updatedDevServerConfig),
|
|
52
|
+
(0, implementations_1.webSocketImplementation)(updatedDevServerConfig),
|
|
53
|
+
]);
|
|
54
|
+
});
|
|
55
|
+
exports.startDevServer = startDevServer;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { QPQConfig, QpqFunctionRuntime } from 'quidproquo-core';
|
|
2
|
-
export type DevServerConfig = {
|
|
3
|
-
serverDomain: 'localhost';
|
|
4
|
-
serverPort: number;
|
|
5
|
-
webSocketPort?: number;
|
|
6
|
-
dynamicModuleLoader: <T = any>(serviceName: string, modulePath: QpqFunctionRuntime) => Promise<T>;
|
|
7
|
-
qpqConfigs: QPQConfig[];
|
|
8
|
-
};
|
|
9
|
-
export type DevServerConfigOverrides = {
|
|
10
|
-
allServices?: QPQConfig;
|
|
11
|
-
byService?: {
|
|
12
|
-
[key: string]: QPQConfig;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
1
|
+
import { QPQConfig, QpqFunctionRuntime } from 'quidproquo-core';
|
|
2
|
+
export type DevServerConfig = {
|
|
3
|
+
serverDomain: 'localhost';
|
|
4
|
+
serverPort: number;
|
|
5
|
+
webSocketPort?: number;
|
|
6
|
+
dynamicModuleLoader: <T = any>(serviceName: string, modulePath: QpqFunctionRuntime) => Promise<T>;
|
|
7
|
+
qpqConfigs: QPQConfig[];
|
|
8
|
+
};
|
|
9
|
+
export type DevServerConfigOverrides = {
|
|
10
|
+
allServices?: QPQConfig;
|
|
11
|
+
byService?: {
|
|
12
|
+
[key: string]: QPQConfig;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { QPQBinaryData } from 'quidproquo-core';
|
|
2
|
-
export interface ExpressEvent {
|
|
3
|
-
protocol: string;
|
|
4
|
-
host: string;
|
|
5
|
-
path: string;
|
|
6
|
-
ip: string;
|
|
7
|
-
method: string;
|
|
8
|
-
query: {
|
|
9
|
-
[key: string]: undefined | string | string[];
|
|
10
|
-
};
|
|
11
|
-
correlation: string;
|
|
12
|
-
isBase64Encoded: boolean;
|
|
13
|
-
body: any;
|
|
14
|
-
headers: {
|
|
15
|
-
[key: string]: undefined | string;
|
|
16
|
-
};
|
|
17
|
-
files?: QPQBinaryData[];
|
|
18
|
-
}
|
|
19
|
-
export interface ExpressEventResponse {
|
|
20
|
-
statusCode: number;
|
|
21
|
-
body: string;
|
|
22
|
-
headers: {
|
|
23
|
-
[key: string]: undefined | string;
|
|
24
|
-
};
|
|
25
|
-
isBase64Encoded: boolean;
|
|
26
|
-
}
|
|
1
|
+
import { QPQBinaryData } from 'quidproquo-core';
|
|
2
|
+
export interface ExpressEvent {
|
|
3
|
+
protocol: string;
|
|
4
|
+
host: string;
|
|
5
|
+
path: string;
|
|
6
|
+
ip: string;
|
|
7
|
+
method: string;
|
|
8
|
+
query: {
|
|
9
|
+
[key: string]: undefined | string | string[];
|
|
10
|
+
};
|
|
11
|
+
correlation: string;
|
|
12
|
+
isBase64Encoded: boolean;
|
|
13
|
+
body: any;
|
|
14
|
+
headers: {
|
|
15
|
+
[key: string]: undefined | string;
|
|
16
|
+
};
|
|
17
|
+
files?: QPQBinaryData[];
|
|
18
|
+
}
|
|
19
|
+
export interface ExpressEventResponse {
|
|
20
|
+
statusCode: number;
|
|
21
|
+
body: string;
|
|
22
|
+
headers: {
|
|
23
|
+
[key: string]: undefined | string;
|
|
24
|
+
};
|
|
25
|
+
isBase64Encoded: boolean;
|
|
26
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './DevServerConfig';
|
|
2
|
-
export * from './ExpressEvent';
|
|
1
|
+
export * from './DevServerConfig';
|
|
2
|
+
export * from './ExpressEvent';
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./DevServerConfig"), exports);
|
|
18
|
-
__exportStar(require("./ExpressEvent"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./DevServerConfig"), exports);
|
|
18
|
+
__exportStar(require("./ExpressEvent"), exports);
|
package/lib/esm/actionProcessor/core/event/express/api/getEventAutoRespondActionProcessor.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getEventAutoRespondActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getEventAutoRespondActionProcessor: ActionProcessorListResolver;
|
package/lib/esm/actionProcessor/core/event/express/api/getEventAutoRespondActionProcessor.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { actionResult, EventActionType, } from 'quidproquo-core';
|
|
2
|
-
import { qpqWebServerUtils } from 'quidproquo-webserver';
|
|
3
|
-
const getProcessAutoRespond = (qpqConfig) => async ({ qpqEventRecord, matchResult }) => {
|
|
4
|
-
if (qpqEventRecord.method === 'OPTIONS') {
|
|
5
|
-
return actionResult({
|
|
6
|
-
status: 200,
|
|
7
|
-
isBase64Encoded: false,
|
|
8
|
-
body: '',
|
|
9
|
-
headers: qpqWebServerUtils.getCorsHeaders(qpqConfig, matchResult.config || {}, qpqEventRecord.headers),
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
return actionResult(null);
|
|
13
|
-
};
|
|
14
|
-
export const getEventAutoRespondActionProcessor = async (qpqConfig) => ({
|
|
15
|
-
[EventActionType.AutoRespond]: getProcessAutoRespond(qpqConfig),
|
|
16
|
-
});
|
|
1
|
+
import { actionResult, EventActionType, } from 'quidproquo-core';
|
|
2
|
+
import { qpqWebServerUtils } from 'quidproquo-webserver';
|
|
3
|
+
const getProcessAutoRespond = (qpqConfig) => async ({ qpqEventRecord, matchResult }) => {
|
|
4
|
+
if (qpqEventRecord.method === 'OPTIONS') {
|
|
5
|
+
return actionResult({
|
|
6
|
+
status: 200,
|
|
7
|
+
isBase64Encoded: false,
|
|
8
|
+
body: '',
|
|
9
|
+
headers: qpqWebServerUtils.getCorsHeaders(qpqConfig, matchResult.config || {}, qpqEventRecord.headers),
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
return actionResult(null);
|
|
13
|
+
};
|
|
14
|
+
export const getEventAutoRespondActionProcessor = async (qpqConfig) => ({
|
|
15
|
+
[EventActionType.AutoRespond]: getProcessAutoRespond(qpqConfig),
|
|
16
|
+
});
|
package/lib/esm/actionProcessor/core/event/express/api/getEventGetRecordsActionProcessor.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getEventGetRecordsActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getEventGetRecordsActionProcessor: ActionProcessorListResolver;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { actionResult, EventActionType, } from 'quidproquo-core';
|
|
2
|
-
const getProcessGetRecords = (_qpqConfig) => async ({ eventParams: [expressEvent] }) => {
|
|
3
|
-
const path = expressEvent.path || '';
|
|
4
|
-
const internalEventRecord = {
|
|
5
|
-
path,
|
|
6
|
-
query: expressEvent.query,
|
|
7
|
-
body: expressEvent.body,
|
|
8
|
-
headers: expressEvent.headers,
|
|
9
|
-
method: expressEvent.method,
|
|
10
|
-
correlation: expressEvent.correlation,
|
|
11
|
-
sourceIp: expressEvent.ip,
|
|
12
|
-
isBase64Encoded: expressEvent.isBase64Encoded,
|
|
13
|
-
files: expressEvent.files,
|
|
14
|
-
};
|
|
15
|
-
return actionResult([internalEventRecord]);
|
|
16
|
-
};
|
|
17
|
-
export const getEventGetRecordsActionProcessor = async (qpqConfig) => ({
|
|
18
|
-
[EventActionType.GetRecords]: getProcessGetRecords(qpqConfig),
|
|
19
|
-
});
|
|
1
|
+
import { actionResult, EventActionType, } from 'quidproquo-core';
|
|
2
|
+
const getProcessGetRecords = (_qpqConfig) => async ({ eventParams: [expressEvent] }) => {
|
|
3
|
+
const path = expressEvent.path || '';
|
|
4
|
+
const internalEventRecord = {
|
|
5
|
+
path,
|
|
6
|
+
query: expressEvent.query,
|
|
7
|
+
body: expressEvent.body,
|
|
8
|
+
headers: expressEvent.headers,
|
|
9
|
+
method: expressEvent.method,
|
|
10
|
+
correlation: expressEvent.correlation,
|
|
11
|
+
sourceIp: expressEvent.ip,
|
|
12
|
+
isBase64Encoded: expressEvent.isBase64Encoded,
|
|
13
|
+
files: expressEvent.files,
|
|
14
|
+
};
|
|
15
|
+
return actionResult([internalEventRecord]);
|
|
16
|
+
};
|
|
17
|
+
export const getEventGetRecordsActionProcessor = async (qpqConfig) => ({
|
|
18
|
+
[EventActionType.GetRecords]: getProcessGetRecords(qpqConfig),
|
|
19
|
+
});
|
package/lib/esm/actionProcessor/core/event/express/api/getEventGetStorySessionActionProcessor.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getEventGetStorySessionActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getEventGetStorySessionActionProcessor: ActionProcessorListResolver;
|
package/lib/esm/actionProcessor/core/event/express/api/getEventGetStorySessionActionProcessor.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { decodeAccessToken } from 'quidproquo-actionprocessor-awslambda';
|
|
2
|
-
import { actionResult, EventActionType, } from 'quidproquo-core';
|
|
3
|
-
import { qpqWebServerUtils } from 'quidproquo-webserver';
|
|
4
|
-
const getProcessGetStorySession = (qpqConfig) => {
|
|
5
|
-
return async ({ matchStoryResult, qpqEventRecord }, session) => {
|
|
6
|
-
const accessToken = qpqWebServerUtils.getAccessTokenFromHeaders(qpqEventRecord.headers);
|
|
7
|
-
if (!accessToken) {
|
|
8
|
-
return actionResult(void 0);
|
|
9
|
-
}
|
|
10
|
-
// if this endpoint has no auth settings, BUT we do have an access token
|
|
11
|
-
// then we want to just attempt to extract info for logs, but we will say that its
|
|
12
|
-
// wasValid = false
|
|
13
|
-
if (!matchStoryResult.config?.routeAuthSettings?.userDirectoryName) {
|
|
14
|
-
// If this endpoint is unauthenticated, then we will just decode it, and say it wasnt valid, for logs
|
|
15
|
-
const info = qpqWebServerUtils.decodeJWT(accessToken);
|
|
16
|
-
return actionResult({
|
|
17
|
-
...session,
|
|
18
|
-
decodedAccessToken: {
|
|
19
|
-
exp: info?.exp || 0,
|
|
20
|
-
userDirectory: '',
|
|
21
|
-
userId: info?.sub || info?.id || info?.userId || info?.username || '',
|
|
22
|
-
username: info?.username || info?.userId || info?.sub || info?.id || '',
|
|
23
|
-
wasValid: false,
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
const decodedAccessToken = await decodeAccessToken(matchStoryResult.config.routeAuthSettings.userDirectoryName, qpqConfig, accessToken, true);
|
|
28
|
-
return actionResult({
|
|
29
|
-
...session,
|
|
30
|
-
decodedAccessToken,
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
export const getEventGetStorySessionActionProcessor = async (qpqConfig) => ({
|
|
35
|
-
[EventActionType.GetStorySession]: getProcessGetStorySession(qpqConfig),
|
|
36
|
-
});
|
|
1
|
+
import { decodeAccessToken } from 'quidproquo-actionprocessor-awslambda';
|
|
2
|
+
import { actionResult, EventActionType, } from 'quidproquo-core';
|
|
3
|
+
import { qpqWebServerUtils } from 'quidproquo-webserver';
|
|
4
|
+
const getProcessGetStorySession = (qpqConfig) => {
|
|
5
|
+
return async ({ matchStoryResult, qpqEventRecord }, session) => {
|
|
6
|
+
const accessToken = qpqWebServerUtils.getAccessTokenFromHeaders(qpqEventRecord.headers);
|
|
7
|
+
if (!accessToken) {
|
|
8
|
+
return actionResult(void 0);
|
|
9
|
+
}
|
|
10
|
+
// if this endpoint has no auth settings, BUT we do have an access token
|
|
11
|
+
// then we want to just attempt to extract info for logs, but we will say that its
|
|
12
|
+
// wasValid = false
|
|
13
|
+
if (!matchStoryResult.config?.routeAuthSettings?.userDirectoryName) {
|
|
14
|
+
// If this endpoint is unauthenticated, then we will just decode it, and say it wasnt valid, for logs
|
|
15
|
+
const info = qpqWebServerUtils.decodeJWT(accessToken);
|
|
16
|
+
return actionResult({
|
|
17
|
+
...session,
|
|
18
|
+
decodedAccessToken: {
|
|
19
|
+
exp: info?.exp || 0,
|
|
20
|
+
userDirectory: '',
|
|
21
|
+
userId: info?.sub || info?.id || info?.userId || info?.username || '',
|
|
22
|
+
username: info?.username || info?.userId || info?.sub || info?.id || '',
|
|
23
|
+
wasValid: false,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
const decodedAccessToken = await decodeAccessToken(matchStoryResult.config.routeAuthSettings.userDirectoryName, qpqConfig, accessToken, true);
|
|
28
|
+
return actionResult({
|
|
29
|
+
...session,
|
|
30
|
+
decodedAccessToken,
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export const getEventGetStorySessionActionProcessor = async (qpqConfig) => ({
|
|
35
|
+
[EventActionType.GetStorySession]: getProcessGetStorySession(qpqConfig),
|
|
36
|
+
});
|
package/lib/esm/actionProcessor/core/event/express/api/getEventMatchStoryActionProcessor.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getEventMatchStoryActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getEventMatchStoryActionProcessor: ActionProcessorListResolver;
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { awsLambdaUtils } from 'quidproquo-actionprocessor-awslambda';
|
|
2
|
-
import { actionResult, actionResultError, ErrorTypeEnum, EventActionType, } from 'quidproquo-core';
|
|
3
|
-
import { qpqWebServerUtils } from 'quidproquo-webserver';
|
|
4
|
-
const getProcessMatchStory = (qpqConfig) => {
|
|
5
|
-
const routes = qpqWebServerUtils.getAllRoutes(qpqConfig);
|
|
6
|
-
return async ({ qpqEventRecord }) => {
|
|
7
|
-
// Sort the routes by string length
|
|
8
|
-
// Note: We may need to filter variable routes out {} as the variables are length independent
|
|
9
|
-
const sortedRoutes = routes
|
|
10
|
-
.filter((r) => r.method === qpqEventRecord.method || qpqEventRecord.method === 'OPTIONS')
|
|
11
|
-
.sort((a, b) => {
|
|
12
|
-
if (a.path.length < b.path.length)
|
|
13
|
-
return -1;
|
|
14
|
-
if (a.path.length > b.path.length)
|
|
15
|
-
return 1;
|
|
16
|
-
return 0;
|
|
17
|
-
});
|
|
18
|
-
// Find the most relevant match
|
|
19
|
-
const matchedRoute = sortedRoutes
|
|
20
|
-
.map((r) => ({
|
|
21
|
-
match: awsLambdaUtils.matchUrl(r.path, qpqEventRecord.path),
|
|
22
|
-
route: r,
|
|
23
|
-
}))
|
|
24
|
-
.find((m) => m.match.didMatch);
|
|
25
|
-
if (!matchedRoute) {
|
|
26
|
-
return actionResultError(ErrorTypeEnum.NotFound, `route not found [${qpqEventRecord.path}] - [${qpqWebServerUtils.getHeaderValue('user-agent', qpqEventRecord.headers)}]`);
|
|
27
|
-
}
|
|
28
|
-
return actionResult({
|
|
29
|
-
runtime: matchedRoute.route.runtime,
|
|
30
|
-
runtimeOptions: matchedRoute.match.params || {},
|
|
31
|
-
// TODO: Make this aware of the API that we are eventing
|
|
32
|
-
config: qpqWebServerUtils.mergeAllRouteOptions('api', matchedRoute.route, qpqConfig),
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
export const getEventMatchStoryActionProcessor = async (qpqConfig) => ({
|
|
37
|
-
[EventActionType.MatchStory]: getProcessMatchStory(qpqConfig),
|
|
38
|
-
});
|
|
1
|
+
import { awsLambdaUtils } from 'quidproquo-actionprocessor-awslambda';
|
|
2
|
+
import { actionResult, actionResultError, ErrorTypeEnum, EventActionType, } from 'quidproquo-core';
|
|
3
|
+
import { qpqWebServerUtils } from 'quidproquo-webserver';
|
|
4
|
+
const getProcessMatchStory = (qpqConfig) => {
|
|
5
|
+
const routes = qpqWebServerUtils.getAllRoutes(qpqConfig);
|
|
6
|
+
return async ({ qpqEventRecord }) => {
|
|
7
|
+
// Sort the routes by string length
|
|
8
|
+
// Note: We may need to filter variable routes out {} as the variables are length independent
|
|
9
|
+
const sortedRoutes = routes
|
|
10
|
+
.filter((r) => r.method === qpqEventRecord.method || qpqEventRecord.method === 'OPTIONS')
|
|
11
|
+
.sort((a, b) => {
|
|
12
|
+
if (a.path.length < b.path.length)
|
|
13
|
+
return -1;
|
|
14
|
+
if (a.path.length > b.path.length)
|
|
15
|
+
return 1;
|
|
16
|
+
return 0;
|
|
17
|
+
});
|
|
18
|
+
// Find the most relevant match
|
|
19
|
+
const matchedRoute = sortedRoutes
|
|
20
|
+
.map((r) => ({
|
|
21
|
+
match: awsLambdaUtils.matchUrl(r.path, qpqEventRecord.path),
|
|
22
|
+
route: r,
|
|
23
|
+
}))
|
|
24
|
+
.find((m) => m.match.didMatch);
|
|
25
|
+
if (!matchedRoute) {
|
|
26
|
+
return actionResultError(ErrorTypeEnum.NotFound, `route not found [${qpqEventRecord.path}] - [${qpqWebServerUtils.getHeaderValue('user-agent', qpqEventRecord.headers)}]`);
|
|
27
|
+
}
|
|
28
|
+
return actionResult({
|
|
29
|
+
runtime: matchedRoute.route.runtime,
|
|
30
|
+
runtimeOptions: matchedRoute.match.params || {},
|
|
31
|
+
// TODO: Make this aware of the API that we are eventing
|
|
32
|
+
config: qpqWebServerUtils.mergeAllRouteOptions('api', matchedRoute.route, qpqConfig),
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export const getEventMatchStoryActionProcessor = async (qpqConfig) => ({
|
|
37
|
+
[EventActionType.MatchStory]: getProcessMatchStory(qpqConfig),
|
|
38
|
+
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getEventTransformResponseResultActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getEventTransformResponseResultActionProcessor: ActionProcessorListResolver;
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { actionResult, ErrorTypeEnum, EventActionType, } from 'quidproquo-core';
|
|
2
|
-
import { qpqWebServerUtils } from 'quidproquo-webserver';
|
|
3
|
-
const ErrorTypeHttpResponseMap = {
|
|
4
|
-
[ErrorTypeEnum.BadRequest]: 400,
|
|
5
|
-
[ErrorTypeEnum.Unauthorized]: 401,
|
|
6
|
-
[ErrorTypeEnum.PaymentRequired]: 402,
|
|
7
|
-
[ErrorTypeEnum.Forbidden]: 403,
|
|
8
|
-
[ErrorTypeEnum.NotFound]: 404,
|
|
9
|
-
[ErrorTypeEnum.TimeOut]: 408,
|
|
10
|
-
[ErrorTypeEnum.Conflict]: 409,
|
|
11
|
-
[ErrorTypeEnum.UnsupportedMediaType]: 415,
|
|
12
|
-
[ErrorTypeEnum.OutOfResources]: 500,
|
|
13
|
-
[ErrorTypeEnum.GenericError]: 500,
|
|
14
|
-
[ErrorTypeEnum.NotImplemented]: 501,
|
|
15
|
-
[ErrorTypeEnum.NoContent]: 204,
|
|
16
|
-
[ErrorTypeEnum.Invalid]: 422,
|
|
17
|
-
};
|
|
18
|
-
const getResponseFromErrorResult = (error) => {
|
|
19
|
-
const statusCode = ErrorTypeHttpResponseMap[error.errorType] || 500;
|
|
20
|
-
return qpqWebServerUtils.toJsonEventResponse({
|
|
21
|
-
errorType: error.errorType,
|
|
22
|
-
errorText: error.errorText,
|
|
23
|
-
}, statusCode);
|
|
24
|
-
};
|
|
25
|
-
const getProcessTransformResponseResult = (qpqConfig) =>
|
|
26
|
-
// We might need to JSON.stringify the body.
|
|
27
|
-
async ({ eventParams, qpqEventRecordResponses }) => {
|
|
28
|
-
const [record] = qpqEventRecordResponses;
|
|
29
|
-
const [expressEvent] = eventParams;
|
|
30
|
-
// If we have an error, we need to transform it to a response, otherwise we can just use the record as is
|
|
31
|
-
const successRecord = record.success ? record.result : getResponseFromErrorResult(record.error);
|
|
32
|
-
const recordHeaders = successRecord.headers || {};
|
|
33
|
-
const headers = {
|
|
34
|
-
...qpqWebServerUtils.getCorsHeaders(qpqConfig, {}, expressEvent.headers),
|
|
35
|
-
...recordHeaders,
|
|
36
|
-
};
|
|
37
|
-
return actionResult({
|
|
38
|
-
statusCode: successRecord.status,
|
|
39
|
-
body: successRecord.body || '',
|
|
40
|
-
isBase64Encoded: successRecord.isBase64Encoded,
|
|
41
|
-
headers,
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
export const getEventTransformResponseResultActionProcessor = async (qpqConfig) => ({
|
|
45
|
-
[EventActionType.TransformResponseResult]: getProcessTransformResponseResult(qpqConfig),
|
|
46
|
-
});
|
|
1
|
+
import { actionResult, ErrorTypeEnum, EventActionType, } from 'quidproquo-core';
|
|
2
|
+
import { qpqWebServerUtils } from 'quidproquo-webserver';
|
|
3
|
+
const ErrorTypeHttpResponseMap = {
|
|
4
|
+
[ErrorTypeEnum.BadRequest]: 400,
|
|
5
|
+
[ErrorTypeEnum.Unauthorized]: 401,
|
|
6
|
+
[ErrorTypeEnum.PaymentRequired]: 402,
|
|
7
|
+
[ErrorTypeEnum.Forbidden]: 403,
|
|
8
|
+
[ErrorTypeEnum.NotFound]: 404,
|
|
9
|
+
[ErrorTypeEnum.TimeOut]: 408,
|
|
10
|
+
[ErrorTypeEnum.Conflict]: 409,
|
|
11
|
+
[ErrorTypeEnum.UnsupportedMediaType]: 415,
|
|
12
|
+
[ErrorTypeEnum.OutOfResources]: 500,
|
|
13
|
+
[ErrorTypeEnum.GenericError]: 500,
|
|
14
|
+
[ErrorTypeEnum.NotImplemented]: 501,
|
|
15
|
+
[ErrorTypeEnum.NoContent]: 204,
|
|
16
|
+
[ErrorTypeEnum.Invalid]: 422,
|
|
17
|
+
};
|
|
18
|
+
const getResponseFromErrorResult = (error) => {
|
|
19
|
+
const statusCode = ErrorTypeHttpResponseMap[error.errorType] || 500;
|
|
20
|
+
return qpqWebServerUtils.toJsonEventResponse({
|
|
21
|
+
errorType: error.errorType,
|
|
22
|
+
errorText: error.errorText,
|
|
23
|
+
}, statusCode);
|
|
24
|
+
};
|
|
25
|
+
const getProcessTransformResponseResult = (qpqConfig) =>
|
|
26
|
+
// We might need to JSON.stringify the body.
|
|
27
|
+
async ({ eventParams, qpqEventRecordResponses }) => {
|
|
28
|
+
const [record] = qpqEventRecordResponses;
|
|
29
|
+
const [expressEvent] = eventParams;
|
|
30
|
+
// If we have an error, we need to transform it to a response, otherwise we can just use the record as is
|
|
31
|
+
const successRecord = record.success ? record.result : getResponseFromErrorResult(record.error);
|
|
32
|
+
const recordHeaders = successRecord.headers || {};
|
|
33
|
+
const headers = {
|
|
34
|
+
...qpqWebServerUtils.getCorsHeaders(qpqConfig, {}, expressEvent.headers),
|
|
35
|
+
...recordHeaders,
|
|
36
|
+
};
|
|
37
|
+
return actionResult({
|
|
38
|
+
statusCode: successRecord.status,
|
|
39
|
+
body: successRecord.body || '',
|
|
40
|
+
isBase64Encoded: successRecord.isBase64Encoded,
|
|
41
|
+
headers,
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
export const getEventTransformResponseResultActionProcessor = async (qpqConfig) => ({
|
|
45
|
+
[EventActionType.TransformResponseResult]: getProcessTransformResponseResult(qpqConfig),
|
|
46
|
+
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getExpressApiEventEventProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getExpressApiEventEventProcessor: ActionProcessorListResolver;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { getEventAutoRespondActionProcessor } from './getEventAutoRespondActionProcessor';
|
|
2
|
-
import { getEventGetRecordsActionProcessor } from './getEventGetRecordsActionProcessor';
|
|
3
|
-
import { getEventGetStorySessionActionProcessor } from './getEventGetStorySessionActionProcessor';
|
|
4
|
-
import { getEventMatchStoryActionProcessor } from './getEventMatchStoryActionProcessor';
|
|
5
|
-
import { getEventTransformResponseResultActionProcessor } from './getEventTransformResponseResultActionProcessor';
|
|
6
|
-
export const getExpressApiEventEventProcessor = async (qpqConfig, dynamicModuleLoader) => ({
|
|
7
|
-
...(await getEventAutoRespondActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
8
|
-
...(await getEventGetRecordsActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
9
|
-
...(await getEventGetStorySessionActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
10
|
-
...(await getEventMatchStoryActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
11
|
-
...(await getEventTransformResponseResultActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
12
|
-
});
|
|
1
|
+
import { getEventAutoRespondActionProcessor } from './getEventAutoRespondActionProcessor';
|
|
2
|
+
import { getEventGetRecordsActionProcessor } from './getEventGetRecordsActionProcessor';
|
|
3
|
+
import { getEventGetStorySessionActionProcessor } from './getEventGetStorySessionActionProcessor';
|
|
4
|
+
import { getEventMatchStoryActionProcessor } from './getEventMatchStoryActionProcessor';
|
|
5
|
+
import { getEventTransformResponseResultActionProcessor } from './getEventTransformResponseResultActionProcessor';
|
|
6
|
+
export const getExpressApiEventEventProcessor = async (qpqConfig, dynamicModuleLoader) => ({
|
|
7
|
+
...(await getEventAutoRespondActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
8
|
+
...(await getEventGetRecordsActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
9
|
+
...(await getEventGetStorySessionActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
10
|
+
...(await getEventMatchStoryActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
11
|
+
...(await getEventTransformResponseResultActionProcessor(qpqConfig, dynamicModuleLoader)),
|
|
12
|
+
});
|