@based/server 4.0.1 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/defaultConfig.d.ts +3 -0
- package/dist/auth/defaultConfig.js +12 -0
- package/dist/auth/defaultConfig.js.map +1 -0
- package/dist/auth/index.d.ts +12 -6
- package/dist/auth/index.js +32 -20
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/parseAuthState.d.ts +2 -1
- package/dist/auth/parseAuthState.js +28 -6
- package/dist/auth/parseAuthState.js.map +1 -1
- package/dist/authorize.d.ts +9 -0
- package/dist/authorize.js +59 -0
- package/dist/authorize.js.map +1 -0
- package/dist/compress.js +3 -0
- package/dist/compress.js.map +1 -1
- package/dist/createSimpleServer.d.ts +20 -10
- package/dist/createSimpleServer.js +64 -53
- package/dist/createSimpleServer.js.map +1 -1
- package/dist/error/errorTypeHandlers.js +31 -12
- package/dist/error/errorTypeHandlers.js.map +1 -1
- package/dist/error/index.d.ts +11 -1
- package/dist/error/index.js +9 -10
- package/dist/error/index.js.map +1 -1
- package/dist/error/types.d.ts +41 -45
- package/dist/error/types.js +3 -1
- package/dist/error/types.js.map +1 -1
- package/dist/functionApi/callFunction.d.ts +3 -0
- package/dist/functionApi/callFunction.js +29 -0
- package/dist/functionApi/callFunction.js.map +1 -0
- package/dist/functionApi/client/index.d.ts +16 -0
- package/dist/functionApi/client/index.js +44 -0
- package/dist/functionApi/client/index.js.map +1 -0
- package/dist/functionApi/client/query.d.ts +11 -0
- package/dist/functionApi/client/query.js +32 -0
- package/dist/functionApi/client/query.js.map +1 -0
- package/dist/functionApi/get.d.ts +3 -0
- package/dist/functionApi/get.js +71 -0
- package/dist/functionApi/get.js.map +1 -0
- package/dist/functionApi/index.d.ts +5 -0
- package/dist/functionApi/index.js +25 -0
- package/dist/functionApi/index.js.map +1 -0
- package/dist/functionApi/observe.d.ts +4 -0
- package/dist/functionApi/observe.js +44 -0
- package/dist/functionApi/observe.js.map +1 -0
- package/dist/functionApi/stream.d.ts +3 -0
- package/dist/functionApi/stream.js +30 -0
- package/dist/functionApi/stream.js.map +1 -0
- package/dist/functions/index.d.ts +16 -8
- package/dist/functions/index.js +39 -10
- package/dist/functions/index.js.map +1 -1
- package/dist/functions/timeout.d.ts +3 -3
- package/dist/functions/timeout.js.map +1 -1
- package/dist/functions/types.d.ts +44 -30
- package/dist/functions/types.js +40 -12
- package/dist/functions/types.js.map +1 -1
- package/dist/incoming/http/authorize.d.ts +2 -2
- package/dist/incoming/http/authorize.js +4 -4
- package/dist/incoming/http/authorize.js.map +1 -1
- package/dist/incoming/http/function.d.ts +3 -4
- package/dist/incoming/http/function.js +30 -35
- package/dist/incoming/http/function.js.map +1 -1
- package/dist/incoming/http/get.d.ts +3 -3
- package/dist/incoming/http/get.js +23 -33
- package/dist/incoming/http/get.js.map +1 -1
- package/dist/incoming/http/index.js +49 -30
- package/dist/incoming/http/index.js.map +1 -1
- package/dist/incoming/http/parseQuery.d.ts +1 -1
- package/dist/incoming/http/parseQuery.js +3 -1
- package/dist/incoming/http/parseQuery.js.map +1 -1
- package/dist/incoming/http/readBody.d.ts +4 -3
- package/dist/incoming/http/readBody.js +32 -8
- package/dist/incoming/http/readBody.js.map +1 -1
- package/dist/incoming/http/streamFunction/DataStream.d.ts +8 -0
- package/dist/incoming/http/streamFunction/DataStream.js +42 -3
- package/dist/incoming/http/streamFunction/DataStream.js.map +1 -1
- package/dist/incoming/http/streamFunction/getExtension.d.ts +1 -1
- package/dist/incoming/http/streamFunction/index.d.ts +3 -3
- package/dist/incoming/http/streamFunction/index.js +6 -87
- package/dist/incoming/http/streamFunction/index.js.map +1 -1
- package/dist/incoming/http/streamFunction/multiPart/index.d.ts +4 -0
- package/dist/incoming/http/streamFunction/multiPart/index.js +66 -0
- package/dist/incoming/http/streamFunction/multiPart/index.js.map +1 -0
- package/dist/incoming/http/streamFunction/multiPart/readFormData.d.ts +12 -0
- package/dist/{network/http/streamFunction/multipartStream.js → incoming/http/streamFunction/multiPart/readFormData.js} +83 -89
- package/dist/incoming/http/streamFunction/multiPart/readFormData.js.map +1 -0
- package/dist/incoming/http/streamFunction/multipartStream.d.ts +3 -4
- package/dist/incoming/http/streamFunction/multipartStream.js +68 -66
- package/dist/incoming/http/streamFunction/multipartStream.js.map +1 -1
- package/dist/incoming/http/streamFunction/stream/createStream.d.ts +6 -0
- package/dist/incoming/http/streamFunction/stream/createStream.js +75 -0
- package/dist/incoming/http/streamFunction/stream/createStream.js.map +1 -0
- package/dist/incoming/http/streamFunction/stream/index.d.ts +4 -0
- package/dist/incoming/http/streamFunction/stream/index.js +70 -0
- package/dist/incoming/http/streamFunction/stream/index.js.map +1 -0
- package/dist/incoming/http/streamFunction/stream.d.ts +1 -1
- package/dist/incoming/index.d.ts +1 -1
- package/dist/incoming/index.js +13 -11
- package/dist/incoming/index.js.map +1 -1
- package/dist/incoming/upgrade.js +18 -9
- package/dist/incoming/upgrade.js.map +1 -1
- package/dist/incoming/ws/auth.d.ts +4 -4
- package/dist/incoming/ws/auth.js +37 -19
- package/dist/incoming/ws/auth.js.map +1 -1
- package/dist/incoming/ws/function.d.ts +2 -3
- package/dist/incoming/ws/function.js +21 -73
- package/dist/incoming/ws/function.js.map +1 -1
- package/dist/incoming/ws/get.d.ts +2 -3
- package/dist/incoming/ws/get.js +33 -54
- package/dist/incoming/ws/get.js.map +1 -1
- package/dist/incoming/ws/index.d.ts +1 -1
- package/dist/incoming/ws/index.js +2 -1
- package/dist/incoming/ws/index.js.map +1 -1
- package/dist/incoming/ws/observable.d.ts +7 -6
- package/dist/incoming/ws/observable.js +25 -49
- package/dist/incoming/ws/observable.js.map +1 -1
- package/dist/incoming/ws/types.d.ts +3 -0
- package/dist/{auth → incoming/ws}/types.js +0 -0
- package/dist/{auth → incoming/ws}/types.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/installFn.d.ts +4 -0
- package/dist/installFn.js +94 -0
- package/dist/installFn.js.map +1 -0
- package/dist/observable/create.d.ts +1 -1
- package/dist/observable/create.js +5 -1
- package/dist/observable/create.js.map +1 -1
- package/dist/observable/destroy.js +1 -1
- package/dist/observable/destroy.js.map +1 -1
- package/dist/observable/error.d.ts +1 -1
- package/dist/observable/index.d.ts +0 -1
- package/dist/observable/index.js +0 -1
- package/dist/observable/index.js.map +1 -1
- package/dist/observable/send.d.ts +3 -3
- package/dist/observable/send.js +2 -8
- package/dist/observable/send.js.map +1 -1
- package/dist/observable/start/error.d.ts +2 -1
- package/dist/observable/start/error.js +13 -11
- package/dist/observable/start/error.js.map +1 -1
- package/dist/observable/start/index.js +17 -8
- package/dist/observable/start/index.js.map +1 -1
- package/dist/observable/subscribe.d.ts +3 -3
- package/dist/observable/subscribe.js +6 -12
- package/dist/observable/subscribe.js.map +1 -1
- package/dist/observable/types.d.ts +6 -5
- package/dist/observable/unsub.d.ts +1 -1
- package/dist/observable/unsub.js.map +1 -1
- package/dist/observable/verify.d.ts +1 -1
- package/dist/observable/verify.js +1 -1
- package/dist/observable/verify.js.map +1 -1
- package/dist/protocol.d.ts +1 -0
- package/dist/protocol.js +11 -1
- package/dist/protocol.js.map +1 -1
- package/dist/security.d.ts +1 -1
- package/dist/security.js +1 -1
- package/dist/security.js.map +1 -1
- package/dist/sendError.d.ts +3 -2
- package/dist/sendError.js +30 -16
- package/dist/sendError.js.map +1 -1
- package/dist/sendHttpResponse.d.ts +1 -1
- package/dist/sendHttpResponse.js +29 -4
- package/dist/sendHttpResponse.js.map +1 -1
- package/dist/server.d.ts +10 -3
- package/dist/server.js +16 -4
- package/dist/server.js.map +1 -1
- package/dist/verifyRoute.d.ts +14 -0
- package/dist/verifyRoute.js +99 -0
- package/dist/verifyRoute.js.map +1 -0
- package/package.json +4 -2
- package/dist/BasedServerClient.d.ts +0 -71
- package/dist/BasedServerClient.js +0 -390
- package/dist/BasedServerClient.js.map +0 -1
- package/dist/Client.d.ts +0 -75
- package/dist/Client.js +0 -277
- package/dist/Client.js.map +0 -1
- package/dist/Params.d.ts +0 -20
- package/dist/Params.js +0 -48
- package/dist/Params.js.map +0 -1
- package/dist/api/index.d.ts +0 -7
- package/dist/api/index.js +0 -173
- package/dist/api/index.js.map +0 -1
- package/dist/auth/authorize.d.ts +0 -2
- package/dist/auth/authorize.js +0 -8
- package/dist/auth/authorize.js.map +0 -1
- package/dist/auth/dummyAuth.d.ts +0 -2
- package/dist/auth/dummyAuth.js +0 -8
- package/dist/auth/dummyAuth.js.map +0 -1
- package/dist/auth/types.d.ts +0 -10
- package/dist/clientContext.d.ts +0 -0
- package/dist/clientContext.js +0 -83
- package/dist/clientContext.js.map +0 -1
- package/dist/closeListener.d.ts +0 -4
- package/dist/closeListener.js +0 -13
- package/dist/closeListener.js.map +0 -1
- package/dist/context.d.ts +0 -54
- package/dist/context.js +0 -18
- package/dist/context.js.map +0 -1
- package/dist/error.d.ts +0 -66
- package/dist/error.js +0 -149
- package/dist/error.js.map +0 -1
- package/dist/findPrefix.d.ts +0 -3
- package/dist/findPrefix.js +0 -20
- package/dist/findPrefix.js.map +0 -1
- package/dist/functions/workerPool.d.ts +0 -0
- package/dist/functions/workerPool.js +0 -5
- package/dist/functions/workerPool.js.map +0 -1
- package/dist/getFromConfig.d.ts +0 -3
- package/dist/getFromConfig.js +0 -50
- package/dist/getFromConfig.js.map +0 -1
- package/dist/handlers/authorize.d.ts +0 -5
- package/dist/handlers/authorize.js +0 -196
- package/dist/handlers/authorize.js.map +0 -1
- package/dist/handlers/bulkUpdate/index.d.ts +0 -5
- package/dist/handlers/bulkUpdate/index.js +0 -26
- package/dist/handlers/bulkUpdate/index.js.map +0 -1
- package/dist/handlers/configuration/index.d.ts +0 -10
- package/dist/handlers/configuration/index.js +0 -74
- package/dist/handlers/configuration/index.js.map +0 -1
- package/dist/handlers/configuration/observable/index.d.ts +0 -46
- package/dist/handlers/configuration/observable/index.js +0 -277
- package/dist/handlers/configuration/observable/index.js.map +0 -1
- package/dist/handlers/configure/index.d.ts +0 -5
- package/dist/handlers/configure/index.js +0 -44
- package/dist/handlers/configure/index.js.map +0 -1
- package/dist/handlers/copy/index.d.ts +0 -8
- package/dist/handlers/copy/index.js +0 -135
- package/dist/handlers/copy/index.js.map +0 -1
- package/dist/handlers/delete/index.d.ts +0 -5
- package/dist/handlers/delete/index.js +0 -34
- package/dist/handlers/delete/index.js.map +0 -1
- package/dist/handlers/digest/index.d.ts +0 -5
- package/dist/handlers/digest/index.js +0 -23
- package/dist/handlers/digest/index.js.map +0 -1
- package/dist/handlers/functions/call.d.ts +0 -6
- package/dist/handlers/functions/call.js +0 -54
- package/dist/handlers/functions/call.js.map +0 -1
- package/dist/handlers/functions/observable/Observable.d.ts +0 -49
- package/dist/handlers/functions/observable/Observable.js +0 -290
- package/dist/handlers/functions/observable/Observable.js.map +0 -1
- package/dist/handlers/functions/observable/SharedObservable.d.ts +0 -45
- package/dist/handlers/functions/observable/SharedObservable.js +0 -291
- package/dist/handlers/functions/observable/SharedObservable.js.map +0 -1
- package/dist/handlers/functions/observable/index.d.ts +0 -14
- package/dist/handlers/functions/observable/index.js +0 -130
- package/dist/handlers/functions/observable/index.js.map +0 -1
- package/dist/handlers/get/index.d.ts +0 -5
- package/dist/handlers/get/index.js +0 -23
- package/dist/handlers/get/index.js.map +0 -1
- package/dist/handlers/getConfig/index.d.ts +0 -5
- package/dist/handlers/getConfig/index.js +0 -38
- package/dist/handlers/getConfig/index.js.map +0 -1
- package/dist/handlers/handleRequests.d.ts +0 -5
- package/dist/handlers/handleRequests.js +0 -78
- package/dist/handlers/handleRequests.js.map +0 -1
- package/dist/handlers/index.d.ts +0 -4
- package/dist/handlers/index.js +0 -49
- package/dist/handlers/index.js.map +0 -1
- package/dist/handlers/messageParser.d.ts +0 -5
- package/dist/handlers/messageParser.js +0 -122
- package/dist/handlers/messageParser.js.map +0 -1
- package/dist/handlers/removeField/index.d.ts +0 -5
- package/dist/handlers/removeField/index.js +0 -42
- package/dist/handlers/removeField/index.js.map +0 -1
- package/dist/handlers/removeType/index.d.ts +0 -5
- package/dist/handlers/removeType/index.js +0 -30
- package/dist/handlers/removeType/index.js.map +0 -1
- package/dist/handlers/rest/file/DataStream.d.ts +0 -7
- package/dist/handlers/rest/file/DataStream.js +0 -17
- package/dist/handlers/rest/file/DataStream.js.map +0 -1
- package/dist/handlers/rest/file/formStream.d.ts +0 -4
- package/dist/handlers/rest/file/formStream.js +0 -188
- package/dist/handlers/rest/file/formStream.js.map +0 -1
- package/dist/handlers/rest/file/getExtenstion.d.ts +0 -2
- package/dist/handlers/rest/file/getExtenstion.js +0 -22
- package/dist/handlers/rest/file/getExtenstion.js.map +0 -1
- package/dist/handlers/rest/file/index.d.ts +0 -4
- package/dist/handlers/rest/file/index.js +0 -53
- package/dist/handlers/rest/file/index.js.map +0 -1
- package/dist/handlers/rest/file/storeFile.d.ts +0 -6
- package/dist/handlers/rest/file/storeFile.js +0 -44
- package/dist/handlers/rest/file/storeFile.js.map +0 -1
- package/dist/handlers/rest/file/stream.d.ts +0 -5
- package/dist/handlers/rest/file/stream.js +0 -104
- package/dist/handlers/rest/file/stream.js.map +0 -1
- package/dist/handlers/rest/file/types.d.ts +0 -9
- package/dist/handlers/rest/file/types.js +0 -3
- package/dist/handlers/rest/file/types.js.map +0 -1
- package/dist/handlers/rest/getReqMessage.d.ts +0 -3
- package/dist/handlers/rest/getReqMessage.js +0 -92
- package/dist/handlers/rest/getReqMessage.js.map +0 -1
- package/dist/handlers/rest/index.d.ts +0 -4
- package/dist/handlers/rest/index.js +0 -121
- package/dist/handlers/rest/index.js.map +0 -1
- package/dist/handlers/rest/invalidReq.d.ts +0 -4
- package/dist/handlers/rest/invalidReq.js +0 -20
- package/dist/handlers/rest/invalidReq.js.map +0 -1
- package/dist/handlers/rest/parseResponse.d.ts +0 -6
- package/dist/handlers/rest/parseResponse.js +0 -230
- package/dist/handlers/rest/parseResponse.js.map +0 -1
- package/dist/handlers/rest/playground/index.d.ts +0 -5
- package/dist/handlers/rest/playground/index.js +0 -308
- package/dist/handlers/rest/playground/index.js.map +0 -1
- package/dist/handlers/rest/readBody.d.ts +0 -3
- package/dist/handlers/rest/readBody.js +0 -45
- package/dist/handlers/rest/readBody.js.map +0 -1
- package/dist/handlers/set/index.d.ts +0 -5
- package/dist/handlers/set/index.js +0 -20
- package/dist/handlers/set/index.js.map +0 -1
- package/dist/handlers/subscription/index.d.ts +0 -32
- package/dist/handlers/subscription/index.js +0 -223
- package/dist/handlers/subscription/index.js.map +0 -1
- package/dist/handlers/token.d.ts +0 -5
- package/dist/handlers/token.js +0 -122
- package/dist/handlers/token.js.map +0 -1
- package/dist/handlers/track/index.d.ts +0 -7
- package/dist/handlers/track/index.js +0 -102
- package/dist/handlers/track/index.js.map +0 -1
- package/dist/handlers/userAuth/index.d.ts +0 -5
- package/dist/handlers/userAuth/index.js +0 -78
- package/dist/handlers/userAuth/index.js.map +0 -1
- package/dist/network/http/authorize.d.ts +0 -3
- package/dist/network/http/authorize.js +0 -28
- package/dist/network/http/authorize.js.map +0 -1
- package/dist/network/http/compress.d.ts +0 -6
- package/dist/network/http/compress.js +0 -56
- package/dist/network/http/compress.js.map +0 -1
- package/dist/network/http/end.d.ts +0 -4
- package/dist/network/http/end.js +0 -19
- package/dist/network/http/end.js.map +0 -1
- package/dist/network/http/function.d.ts +0 -3
- package/dist/network/http/function.js +0 -47
- package/dist/network/http/function.js.map +0 -1
- package/dist/network/http/get.d.ts +0 -3
- package/dist/network/http/get.js +0 -129
- package/dist/network/http/get.js.map +0 -1
- package/dist/network/http/index.d.ts +0 -3
- package/dist/network/http/index.js +0 -122
- package/dist/network/http/index.js.map +0 -1
- package/dist/network/http/readBody.d.ts +0 -3
- package/dist/network/http/readBody.js +0 -112
- package/dist/network/http/readBody.js.map +0 -1
- package/dist/network/http/send.d.ts +0 -5
- package/dist/network/http/send.js +0 -60
- package/dist/network/http/send.js.map +0 -1
- package/dist/network/http/streamFunction/DataStream.d.ts +0 -7
- package/dist/network/http/streamFunction/DataStream.js +0 -19
- package/dist/network/http/streamFunction/DataStream.js.map +0 -1
- package/dist/network/http/streamFunction/getExtension.d.ts +0 -2
- package/dist/network/http/streamFunction/getExtension.js +0 -29
- package/dist/network/http/streamFunction/getExtension.js.map +0 -1
- package/dist/network/http/streamFunction/index.d.ts +0 -3
- package/dist/network/http/streamFunction/index.js +0 -81
- package/dist/network/http/streamFunction/index.js.map +0 -1
- package/dist/network/http/streamFunction/multipartStream.d.ts +0 -12
- package/dist/network/http/streamFunction/multipartStream.js.map +0 -1
- package/dist/network/http/streamFunction/stream.d.ts +0 -5
- package/dist/network/http/streamFunction/stream.js +0 -103
- package/dist/network/http/streamFunction/stream.js.map +0 -1
- package/dist/network/index.d.ts +0 -4
- package/dist/network/index.js +0 -84
- package/dist/network/index.js.map +0 -1
- package/dist/network/message/auth.d.ts +0 -4
- package/dist/network/message/auth.js +0 -32
- package/dist/network/message/auth.js.map +0 -1
- package/dist/network/message/function.d.ts +0 -3
- package/dist/network/message/function.js +0 -67
- package/dist/network/message/function.js.map +0 -1
- package/dist/network/message/get.d.ts +0 -3
- package/dist/network/message/get.js +0 -109
- package/dist/network/message/get.js.map +0 -1
- package/dist/network/message/index.d.ts +0 -3
- package/dist/network/message/index.js +0 -62
- package/dist/network/message/index.js.map +0 -1
- package/dist/network/message/observable.d.ts +0 -5
- package/dist/network/message/observable.js +0 -103
- package/dist/network/message/observable.js.map +0 -1
- package/dist/network/message/send.d.ts +0 -4
- package/dist/network/message/send.js +0 -11
- package/dist/network/message/send.js.map +0 -1
- package/dist/network/upgrade.d.ts +0 -4
- package/dist/network/upgrade.js +0 -49
- package/dist/network/upgrade.js.map +0 -1
- package/dist/network/worker/get.d.ts +0 -0
- package/dist/network/worker/get.js +0 -122
- package/dist/network/worker/get.js.map +0 -1
- package/dist/network/worker/observable.d.ts +0 -0
- package/dist/network/worker/observable.js +0 -120
- package/dist/network/worker/observable.js.map +0 -1
- package/dist/openListener.d.ts +0 -4
- package/dist/openListener.js +0 -13
- package/dist/openListener.js.map +0 -1
- package/dist/secrets.d.ts +0 -9
- package/dist/secrets.js +0 -150
- package/dist/secrets.js.map +0 -1
- package/dist/security/index.d.ts +0 -3
- package/dist/security/index.js +0 -66
- package/dist/security/index.js.map +0 -1
- package/dist/types.d.ts +0 -129
- package/dist/types.js +0 -17
- package/dist/types.js.map +0 -1
- package/dist/upgradeListener.d.ts +0 -4
- package/dist/upgradeListener.js +0 -47
- package/dist/upgradeListener.js.map +0 -1
- package/dist/worker/authorize.d.ts +0 -5
- package/dist/worker/authorize.js +0 -15
- package/dist/worker/authorize.js.map +0 -1
- package/dist/worker/fnMap.d.ts +0 -2
- package/dist/worker/fnMap.js +0 -5
- package/dist/worker/fnMap.js.map +0 -1
- package/dist/worker/functions.d.ts +0 -3
- package/dist/worker/functions.js +0 -8
- package/dist/worker/functions.js.map +0 -1
- package/dist/worker/http/function.d.ts +0 -4
- package/dist/worker/http/function.js +0 -75
- package/dist/worker/http/function.js.map +0 -1
- package/dist/worker/index.d.ts +0 -1
- package/dist/worker/index.js +0 -101
- package/dist/worker/index.js.map +0 -1
- package/dist/worker/observable.d.ts +0 -15
- package/dist/worker/observable.js +0 -110
- package/dist/worker/observable.js.map +0 -1
- package/dist/worker/ws/function.d.ts +0 -3
- package/dist/worker/ws/function.js +0 -42
- package/dist/worker/ws/function.js.map +0 -1
- package/dist/workers/index.d.ts +0 -0
- package/dist/workers/index.js +0 -20
- package/dist/workers/index.js.map +0 -1
- package/dist/workers/workerCode.d.ts +0 -12
- package/dist/workers/workerCode.js +0 -46
- package/dist/workers/workerCode.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import type { BasedServer } from '../server';
|
|
3
|
-
import {
|
|
3
|
+
import { BasedRoute, BasedSpec, FunctionConfig } from './types';
|
|
4
4
|
export * from './types';
|
|
5
5
|
export declare class BasedFunctions {
|
|
6
6
|
server: BasedServer;
|
|
@@ -10,11 +10,19 @@ export declare class BasedFunctions {
|
|
|
10
10
|
installsInProgress: {
|
|
11
11
|
[name: string]: Promise<any>;
|
|
12
12
|
};
|
|
13
|
+
maxPayLoadSizeDefaults: {
|
|
14
|
+
stream: number;
|
|
15
|
+
query: number;
|
|
16
|
+
function: number;
|
|
17
|
+
};
|
|
13
18
|
paths: {
|
|
14
19
|
[path: string]: string;
|
|
15
20
|
};
|
|
16
21
|
specs: {
|
|
17
|
-
[name: string]:
|
|
22
|
+
[name: string]: BasedSpec & {
|
|
23
|
+
maxPayloadSize: number;
|
|
24
|
+
rateLimitTokens: number;
|
|
25
|
+
};
|
|
18
26
|
};
|
|
19
27
|
beingUninstalled: {
|
|
20
28
|
[name: string]: boolean;
|
|
@@ -22,13 +30,13 @@ export declare class BasedFunctions {
|
|
|
22
30
|
constructor(server: BasedServer, config?: FunctionConfig);
|
|
23
31
|
uninstallLoop(): void;
|
|
24
32
|
updateConfig(config: FunctionConfig): void;
|
|
25
|
-
updateFunction(spec:
|
|
33
|
+
updateFunction(spec: BasedSpec): Promise<void>;
|
|
26
34
|
private installGaurdedFromConfig;
|
|
27
|
-
install(name: string): Promise<
|
|
35
|
+
install(name: string): Promise<BasedSpec | null>;
|
|
28
36
|
getNameFromPath(path: string): string;
|
|
29
|
-
route(name?: string, path?: string):
|
|
30
|
-
getFromStore(name: string):
|
|
31
|
-
update(spec:
|
|
37
|
+
route(name?: string, path?: string): BasedRoute | null;
|
|
38
|
+
getFromStore(name: string): BasedSpec | null;
|
|
39
|
+
update(spec: BasedSpec): boolean;
|
|
32
40
|
remove(name: string): boolean;
|
|
33
|
-
uninstall(name: string, spec?:
|
|
41
|
+
uninstall(name: string, spec?: BasedSpec | false): Promise<boolean>;
|
|
34
42
|
}
|
package/dist/functions/index.js
CHANGED
|
@@ -24,6 +24,11 @@ class BasedFunctions {
|
|
|
24
24
|
constructor(server, config) {
|
|
25
25
|
this.reqId = 0;
|
|
26
26
|
this.installsInProgress = {};
|
|
27
|
+
this.maxPayLoadSizeDefaults = {
|
|
28
|
+
stream: 5e6,
|
|
29
|
+
query: 2500,
|
|
30
|
+
function: 20e3,
|
|
31
|
+
};
|
|
27
32
|
this.paths = {};
|
|
28
33
|
this.specs = {};
|
|
29
34
|
this.beingUninstalled = {};
|
|
@@ -37,7 +42,7 @@ class BasedFunctions {
|
|
|
37
42
|
const q = [];
|
|
38
43
|
for (const name in this.specs) {
|
|
39
44
|
const spec = this.specs[name];
|
|
40
|
-
if (spec
|
|
45
|
+
if ((0, types_1.isQueryFunctionSpec)(spec) && this.server.activeObservables[name]) {
|
|
41
46
|
(0, timeout_1.updateTimeoutCounter)(spec);
|
|
42
47
|
}
|
|
43
48
|
else if ((0, timeout_1.fnIsTimedOut)(spec)) {
|
|
@@ -90,6 +95,9 @@ class BasedFunctions {
|
|
|
90
95
|
this.update(spec);
|
|
91
96
|
}
|
|
92
97
|
}
|
|
98
|
+
else {
|
|
99
|
+
this.update(spec);
|
|
100
|
+
}
|
|
93
101
|
}
|
|
94
102
|
async installGaurdedFromConfig(name) {
|
|
95
103
|
if (this.installsInProgress[name]) {
|
|
@@ -113,7 +121,7 @@ class BasedFunctions {
|
|
|
113
121
|
this.update(spec);
|
|
114
122
|
return this.getFromStore(name);
|
|
115
123
|
}
|
|
116
|
-
return
|
|
124
|
+
return null;
|
|
117
125
|
}
|
|
118
126
|
getNameFromPath(path) {
|
|
119
127
|
return this.paths[path];
|
|
@@ -130,12 +138,16 @@ class BasedFunctions {
|
|
|
130
138
|
(0, timeout_1.updateTimeoutCounter)(spec);
|
|
131
139
|
return spec;
|
|
132
140
|
}
|
|
133
|
-
return
|
|
141
|
+
return null;
|
|
134
142
|
}
|
|
135
143
|
update(spec) {
|
|
136
144
|
if (!spec) {
|
|
137
145
|
return false;
|
|
138
146
|
}
|
|
147
|
+
// Case when functions are installed exactly at the same time
|
|
148
|
+
if ((0, utils_1.deepEqual)(spec, this.specs[spec.name])) {
|
|
149
|
+
return false;
|
|
150
|
+
}
|
|
139
151
|
if (!spec.idleTimeout) {
|
|
140
152
|
spec.idleTimeout = this.config.idleTimeout;
|
|
141
153
|
}
|
|
@@ -146,28 +158,45 @@ class BasedFunctions {
|
|
|
146
158
|
if (spec.path) {
|
|
147
159
|
this.paths[spec.path] = spec.name;
|
|
148
160
|
}
|
|
161
|
+
if (!spec.maxPayloadSize) {
|
|
162
|
+
if ((0, types_1.isQueryFunctionSpec)(spec)) {
|
|
163
|
+
spec.maxPayloadSize = this.maxPayLoadSizeDefaults.query;
|
|
164
|
+
}
|
|
165
|
+
else if ((0, types_1.isStreamFunctionSpec)(spec)) {
|
|
166
|
+
spec.maxPayloadSize = this.maxPayLoadSizeDefaults.stream;
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
spec.maxPayloadSize = this.maxPayLoadSizeDefaults.function;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
if (!spec.rateLimitTokens) {
|
|
173
|
+
spec.rateLimitTokens = 1;
|
|
174
|
+
}
|
|
175
|
+
const previousChecksum = this.specs[spec.name]?.checksum ?? -1;
|
|
176
|
+
// @ts-ignore maxpayload and rlimit tokens added on line 184...
|
|
177
|
+
this.specs[spec.name] = spec;
|
|
149
178
|
if (this.specs[spec.name] && this.server.activeObservables[spec.name]) {
|
|
150
|
-
if (!(0, types_1.
|
|
179
|
+
if (!(0, types_1.isQueryFunctionSpec)(spec)) {
|
|
151
180
|
for (const [id] of this.server.activeObservables[spec.name]) {
|
|
152
181
|
(0, observable_1.destroyObs)(this.server, id);
|
|
153
182
|
}
|
|
154
183
|
}
|
|
155
184
|
else {
|
|
156
|
-
|
|
157
|
-
(
|
|
185
|
+
if (previousChecksum !== spec.checksum) {
|
|
186
|
+
for (const [id] of this.server.activeObservables[spec.name]) {
|
|
187
|
+
(0, observable_1.start)(this.server, id);
|
|
188
|
+
}
|
|
158
189
|
}
|
|
159
190
|
}
|
|
160
191
|
}
|
|
161
|
-
|
|
162
|
-
return false;
|
|
192
|
+
return true;
|
|
163
193
|
}
|
|
164
194
|
remove(name) {
|
|
165
|
-
// Does not call unregister!
|
|
166
195
|
const spec = this.specs[name];
|
|
167
196
|
if (!spec) {
|
|
168
197
|
return false;
|
|
169
198
|
}
|
|
170
|
-
if ((0, types_1.
|
|
199
|
+
if ((0, types_1.isQueryFunctionRoute)(spec)) {
|
|
171
200
|
const activeObs = this.server.activeObservables[name];
|
|
172
201
|
if (activeObs) {
|
|
173
202
|
for (const [id] of activeObs) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,mCAOgB;AAChB,wCAAmD;AACnD,uCAA8D;AAC9D,8CAAiD;AACjD,0CAAuB;AAEvB,MAAa,cAAc;IAqCzB,YAAY,MAAmB,EAAE,MAAuB;QAlCxD,UAAK,GAAW,CAAC,CAAA;QAMjB,uBAAkB,GAAqC,EAAE,CAAA;QAEzD,2BAAsB,GAIlB;YACF,MAAM,EAAE,GAAG;YACX,KAAK,EAAE,IAAI;YACX,QAAQ,EAAE,IAAI;SACf,CAAA;QAED,UAAK,GAED,EAAE,CAAA;QAEN,UAAK,GAMD,EAAE,CAAA;QAEN,qBAAgB,GAEZ,EAAE,CAAA;QAGJ,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,MAAM,EAAE;YACV,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAA;SAC1B;IACH,CAAC;IAED,aAAa;QACX,IAAI,CAAC,iBAAiB,GAAG,UAAU,CAAC,KAAK,IAAI,EAAE;YAC7C,MAAM,CAAC,GAAG,EAAE,CAAA;YACZ,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE;gBAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IA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IAAI,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE;YAC/B,OAAO,CAAC,KAAK,CAAC,gCAAgC,EAAE,IAAI,CAAC,CAAA;SACtD;QACD,IAAI,CAAC,IAAI,IAAI,IAAI,KAAK,KAAK,EAAE;YAC3B,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;SACxB;QACD,IAAI,CAAC,IAAI,EAAE;YACT,OAAO,KAAK,CAAA;SACb;QAED,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;QAElC,IACE,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;YAC1B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,QAAQ,EAAE,IAAI;YACd,IAAI;SACL,CAAC,EACF;YACA,IAAI,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE;gBAC/B,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAA;gBAClC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;aACzB;iBAAM;gBACL,OAAO,CAAC,IAAI,CAAC,wCAAwC,EAAE,IAAI,CAAC,CAAA;aAC7D;SACF;QAED,OAAO,KAAK,CAAA;IACd,CAAC;CACF;AA1QD,wCA0QC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const fnIsTimedOut: (spec:
|
|
3
|
-
export declare const updateTimeoutCounter: (spec:
|
|
1
|
+
import type { BasedSpec } from './types';
|
|
2
|
+
export declare const fnIsTimedOut: (spec: BasedSpec) => boolean;
|
|
3
|
+
export declare const updateTimeoutCounter: (spec: BasedSpec) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeout.js","sourceRoot":"","sources":["../../src/functions/timeout.ts"],"names":[],"mappings":";;;AAEO,MAAM,YAAY,GAAG,
|
|
1
|
+
{"version":3,"file":"timeout.js","sourceRoot":"","sources":["../../src/functions/timeout.ts"],"names":[],"mappings":";;;AAEO,MAAM,YAAY,GAAG,CAAC,IAAe,EAAW,EAAE;IACvD,IAAI,IAAI,CAAC,cAAc,KAAK,CAAC,CAAC,EAAE;QAC9B,IAAI,IAAI,CAAC,cAAc,KAAK,CAAC,EAAE;YAC7B,OAAO,IAAI,CAAA;SACZ;QACD,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC,IAAI,IAAI,CAAC,cAAc,GAAG,CAAC,EAAE;YACnD,IAAI,CAAC,cAAc,EAAE,CAAA;SACtB;KACF;IACD,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAVY,QAAA,YAAY,gBAUxB;AAEM,MAAM,oBAAoB,GAAG,CAAC,IAAe,EAAE,EAAE;IACtD,IAAI,IAAI,CAAC,cAAc,KAAK,CAAC,CAAC,EAAE;QAC9B,IAAI,CAAC,cAAc;YACjB,IAAI,CAAC,WAAW,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,GAAG,GAAG,GAAG,CAAC,CAAC,CAAA;KACvE;AACH,CAAC,CAAA;AALY,QAAA,oBAAoB,wBAKhC"}
|
|
@@ -1,67 +1,81 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ObservableUpdateFunction } from '../observable';
|
|
1
|
+
import { BasedQueryFunction, BasedFunction, CustomHttpResponse, BasedStreamFunction } from '@based/functions';
|
|
3
2
|
import { BasedServer } from '../server';
|
|
4
|
-
|
|
5
|
-
export declare type BasedFunctionRoute = {
|
|
3
|
+
declare type Route = {
|
|
6
4
|
name: string;
|
|
7
|
-
observable?: boolean;
|
|
8
|
-
headers?: string[];
|
|
9
5
|
path?: string;
|
|
10
|
-
stream?: boolean;
|
|
11
6
|
maxPayloadSize?: number;
|
|
12
7
|
rateLimitTokens?: number;
|
|
13
8
|
public?: boolean;
|
|
9
|
+
headers?: string[];
|
|
10
|
+
internalOnly?: boolean;
|
|
14
11
|
};
|
|
15
|
-
export declare type
|
|
16
|
-
export declare type
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
export declare type BasedFunctionRoute = Route;
|
|
13
|
+
export declare type BasedQueryFunctionRoute = Route & {
|
|
14
|
+
query: true;
|
|
15
|
+
};
|
|
16
|
+
export declare type BasedStreamFunctionRoute = Route & {
|
|
17
|
+
stream: true;
|
|
18
|
+
};
|
|
19
|
+
export declare type BasedQueryFunctionSpec = {
|
|
21
20
|
customHttpResponse?: CustomHttpResponse;
|
|
21
|
+
checksum: number;
|
|
22
|
+
function: BasedQueryFunction;
|
|
22
23
|
memCacheTimeout?: number;
|
|
23
24
|
idleTimeout?: number;
|
|
24
25
|
timeoutCounter?: number;
|
|
25
|
-
};
|
|
26
|
-
export declare type
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
} & BasedQueryFunctionRoute;
|
|
27
|
+
export declare type BasedStreamFunctionSpec = {
|
|
28
|
+
checksum: number;
|
|
29
|
+
function: BasedStreamFunction;
|
|
30
|
+
maxExecTime?: number;
|
|
31
|
+
idleTimeout?: number;
|
|
32
|
+
timeoutCounter?: number;
|
|
33
|
+
} & BasedStreamFunctionRoute;
|
|
34
|
+
export declare type BasedFunctionSpec = {
|
|
30
35
|
customHttpResponse?: CustomHttpResponse;
|
|
31
36
|
checksum: number;
|
|
32
37
|
function: BasedFunction;
|
|
33
38
|
maxExecTime?: number;
|
|
34
39
|
idleTimeout?: number;
|
|
35
40
|
timeoutCounter?: number;
|
|
36
|
-
};
|
|
41
|
+
} & BasedFunctionRoute;
|
|
42
|
+
export declare type BasedRoute = BasedFunctionRoute | BasedQueryFunctionRoute | BasedStreamFunctionRoute;
|
|
43
|
+
export declare type BasedSpec<R extends BasedRoute = BasedRoute> = R extends BasedQueryFunctionRoute ? BasedQueryFunctionSpec : R extends BasedStreamFunctionRoute ? BasedStreamFunctionSpec : BasedFunctionSpec;
|
|
37
44
|
export declare type FunctionConfig = {
|
|
38
45
|
memCacheTimeout?: number;
|
|
39
46
|
idleTimeout?: number;
|
|
40
47
|
maxWorkers?: number;
|
|
41
48
|
importWrapperPath?: string;
|
|
49
|
+
maxPayLoadSizeDefaults?: {
|
|
50
|
+
stream: number;
|
|
51
|
+
query: number;
|
|
52
|
+
function: number;
|
|
53
|
+
};
|
|
42
54
|
route: (opts: {
|
|
43
55
|
server: BasedServer;
|
|
44
56
|
name?: string;
|
|
45
57
|
path?: string;
|
|
46
|
-
}) =>
|
|
58
|
+
}) => null | (BasedFunctionRoute & {
|
|
47
59
|
maxPayloadSize: number;
|
|
48
60
|
rateLimitTokens: number;
|
|
49
61
|
});
|
|
50
62
|
install: (opts: {
|
|
51
63
|
server: BasedServer;
|
|
52
64
|
name: string;
|
|
53
|
-
function?: BasedFunctionSpec |
|
|
54
|
-
}) => Promise<
|
|
65
|
+
function?: BasedFunctionSpec | BasedQueryFunctionSpec;
|
|
66
|
+
}) => Promise<null | BasedQueryFunctionSpec | BasedStreamFunctionSpec | BasedFunctionSpec>;
|
|
55
67
|
uninstall: (opts: {
|
|
56
68
|
server: BasedServer;
|
|
57
69
|
name: string;
|
|
58
|
-
function:
|
|
70
|
+
function: BasedQueryFunctionSpec | BasedStreamFunctionSpec | BasedFunctionSpec;
|
|
59
71
|
}) => Promise<boolean>;
|
|
60
72
|
};
|
|
61
|
-
export declare
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
export declare function
|
|
73
|
+
export declare function isQueryFunctionSpec(fn: BasedQueryFunctionSpec | BasedStreamFunctionSpec | BasedFunctionSpec): fn is BasedQueryFunctionSpec;
|
|
74
|
+
export declare function isStreamFunctionSpec(fn: BasedQueryFunctionSpec | BasedFunctionSpec | BasedStreamFunctionSpec): fn is BasedQueryFunctionSpec;
|
|
75
|
+
export declare function isFunctionSpec(fn: BasedQueryFunctionSpec | BasedFunctionSpec | BasedStreamFunctionSpec): fn is BasedSpec;
|
|
76
|
+
export declare function isSpec(fn: any): fn is BasedSpec;
|
|
77
|
+
export declare function isQueryFunctionRoute(fn: BasedFunctionRoute | BasedQueryFunctionRoute | BasedStreamFunctionRoute): fn is BasedQueryFunctionRoute;
|
|
78
|
+
export declare function isStreamFunctionRoute(fn: BasedFunctionRoute | BasedQueryFunctionRoute | BasedStreamFunctionRoute): fn is BasedStreamFunctionRoute;
|
|
79
|
+
export declare function isFunctionRoute(fn: BasedFunctionRoute | BasedQueryFunctionRoute | BasedStreamFunctionRoute): fn is BasedFunctionRoute;
|
|
80
|
+
export declare function isRoute(route: any): route is BasedRoute;
|
|
81
|
+
export {};
|
package/dist/functions/types.js
CHANGED
|
@@ -1,15 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
exports.isRoute = exports.isFunctionRoute = exports.isStreamFunctionRoute = exports.isQueryFunctionRoute = exports.isSpec = exports.isFunctionSpec = exports.isStreamFunctionSpec = exports.isQueryFunctionSpec = void 0;
|
|
4
|
+
// specs
|
|
5
|
+
function isQueryFunctionSpec(fn) {
|
|
6
|
+
return fn.query === true;
|
|
7
|
+
}
|
|
8
|
+
exports.isQueryFunctionSpec = isQueryFunctionSpec;
|
|
9
|
+
function isStreamFunctionSpec(fn) {
|
|
10
|
+
return fn.stream === true;
|
|
11
|
+
}
|
|
12
|
+
exports.isStreamFunctionSpec = isStreamFunctionSpec;
|
|
13
|
+
function isFunctionSpec(fn) {
|
|
14
|
+
return !('stream' in fn) && !('query' in fn);
|
|
15
|
+
}
|
|
16
|
+
exports.isFunctionSpec = isFunctionSpec;
|
|
17
|
+
function isSpec(fn) {
|
|
18
|
+
return (fn &&
|
|
19
|
+
typeof fn === 'object' &&
|
|
20
|
+
(isFunctionSpec(fn) || isStreamFunctionSpec(fn) || isQueryFunctionSpec(fn)));
|
|
21
|
+
}
|
|
22
|
+
exports.isSpec = isSpec;
|
|
23
|
+
// routes
|
|
24
|
+
function isQueryFunctionRoute(fn) {
|
|
25
|
+
return fn.query === true;
|
|
26
|
+
}
|
|
27
|
+
exports.isQueryFunctionRoute = isQueryFunctionRoute;
|
|
28
|
+
function isStreamFunctionRoute(fn) {
|
|
29
|
+
return fn.stream === true;
|
|
30
|
+
}
|
|
31
|
+
exports.isStreamFunctionRoute = isStreamFunctionRoute;
|
|
32
|
+
function isFunctionRoute(fn) {
|
|
33
|
+
return !('stream' in fn) && !('query' in fn);
|
|
34
|
+
}
|
|
35
|
+
exports.isFunctionRoute = isFunctionRoute;
|
|
36
|
+
function isRoute(route) {
|
|
37
|
+
if (route && typeof route === 'object' && 'name' in route) {
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
exports.isRoute = isRoute;
|
|
15
43
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/functions/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/functions/types.ts"],"names":[],"mappings":";;;AAoGA,QAAQ;AAER,SAAgB,mBAAmB,CACjC,EAAwE;IAExE,OAAQ,EAA6B,CAAC,KAAK,KAAK,IAAI,CAAA;AACtD,CAAC;AAJD,kDAIC;AAED,SAAgB,oBAAoB,CAClC,EAAwE;IAExE,OAAQ,EAA8B,CAAC,MAAM,KAAK,IAAI,CAAA;AACxD,CAAC;AAJD,oDAIC;AAED,SAAgB,cAAc,CAC5B,EAAwE;IAExE,OAAO,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,OAAO,IAAI,EAAE,CAAC,CAAA;AAC9C,CAAC;AAJD,wCAIC;AAED,SAAgB,MAAM,CAAC,EAAO;IAC5B,OAAO,CACL,EAAE;QACF,OAAO,EAAE,KAAK,QAAQ;QACtB,CAAC,cAAc,CAAC,EAAE,CAAC,IAAI,oBAAoB,CAAC,EAAE,CAAC,IAAI,mBAAmB,CAAC,EAAE,CAAC,CAAC,CAC5E,CAAA;AACH,CAAC;AAND,wBAMC;AAED,SAAS;AAET,SAAgB,oBAAoB,CAClC,EAA2E;IAE3E,OAAQ,EAA8B,CAAC,KAAK,KAAK,IAAI,CAAA;AACvD,CAAC;AAJD,oDAIC;AAED,SAAgB,qBAAqB,CACnC,EAA2E;IAE3E,OAAQ,EAA+B,CAAC,MAAM,KAAK,IAAI,CAAA;AACzD,CAAC;AAJD,sDAIC;AAED,SAAgB,eAAe,CAC7B,EAA2E;IAE3E,OAAO,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,OAAO,IAAI,EAAE,CAAC,CAAA;AAC9C,CAAC;AAJD,0CAIC;AAED,SAAgB,OAAO,CAAC,KAAU;IAChC,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,IAAI,KAAK,EAAE;QACzD,OAAO,IAAI,CAAA;KACZ;IACD,OAAO,KAAK,CAAA;AACd,CAAC;AALD,0BAKC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { BasedServer } from '../../server';
|
|
2
2
|
import { BasedFunctionRoute } from '../../functions';
|
|
3
|
-
import { HttpSession, Context } from '
|
|
4
|
-
export declare const authorizeRequest: (server: BasedServer, ctx: Context<HttpSession>, payload:
|
|
3
|
+
import { HttpSession, Context } from '@based/functions';
|
|
4
|
+
export declare const authorizeRequest: <P = any>(server: BasedServer, ctx: Context<HttpSession>, payload: P, route: BasedFunctionRoute, authorized: (payload: P) => void, notAuth?: (payload: P) => void) => void;
|
|
@@ -9,14 +9,14 @@ const authorizeRequest = (server, ctx, payload, route, authorized, notAuth = ()
|
|
|
9
9
|
return;
|
|
10
10
|
}
|
|
11
11
|
server.auth
|
|
12
|
-
.authorize(ctx, route.name, payload)
|
|
12
|
+
.authorize(server.client, ctx, route.name, payload)
|
|
13
13
|
.then((ok) => {
|
|
14
14
|
if (!ctx.session) {
|
|
15
|
-
notAuth();
|
|
15
|
+
notAuth(payload);
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
18
|
if (!ok) {
|
|
19
|
-
notAuth();
|
|
19
|
+
notAuth(payload);
|
|
20
20
|
(0, sendError_1.sendError)(server, ctx, error_1.BasedErrorCode.AuthorizeRejectedError, {
|
|
21
21
|
route,
|
|
22
22
|
});
|
|
@@ -26,7 +26,7 @@ const authorizeRequest = (server, ctx, payload, route, authorized, notAuth = ()
|
|
|
26
26
|
}
|
|
27
27
|
})
|
|
28
28
|
.catch((err) => {
|
|
29
|
-
notAuth();
|
|
29
|
+
notAuth(payload);
|
|
30
30
|
(0, sendError_1.sendError)(server, ctx, error_1.BasedErrorCode.AuthorizeFunctionError, {
|
|
31
31
|
route,
|
|
32
32
|
err,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorize.js","sourceRoot":"","sources":["../../../src/incoming/http/authorize.ts"],"names":[],"mappings":";;;AAEA,+CAA2C;AAC3C,uCAA4C;AAGrC,MAAM,gBAAgB,GAAG,CAC9B,MAAmB,EACnB,GAAyB,EACzB,
|
|
1
|
+
{"version":3,"file":"authorize.js","sourceRoot":"","sources":["../../../src/incoming/http/authorize.ts"],"names":[],"mappings":";;;AAEA,+CAA2C;AAC3C,uCAA4C;AAGrC,MAAM,gBAAgB,GAAG,CAC9B,MAAmB,EACnB,GAAyB,EACzB,OAAU,EACV,KAAyB,EACzB,UAAgC,EAChC,UAAgC,GAAG,EAAE,CAAC,SAAS,EAC/C,EAAE;IACF,IAAI,KAAK,CAAC,MAAM,KAAK,IAAI,EAAE;QACzB,UAAU,CAAC,OAAO,CAAC,CAAA;QACnB,OAAM;KACP;IACD,MAAM,CAAC,IAAI;SACR,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC;SAClD,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE;QACX,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE;YAChB,OAAO,CAAC,OAAO,CAAC,CAAA;YAChB,OAAM;SACP;QACD,IAAI,CAAC,EAAE,EAAE;YACP,OAAO,CAAC,OAAO,CAAC,CAAA;YAChB,IAAA,qBAAS,EAAC,MAAM,EAAE,GAAG,EAAE,sBAAc,CAAC,sBAAsB,EAAE;gBAC5D,KAAK;aACN,CAAC,CAAA;SACH;aAAM;YACL,UAAU,CAAC,OAAO,CAAC,CAAA;SACpB;IACH,CAAC,CAAC;SACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QACb,OAAO,CAAC,OAAO,CAAC,CAAA;QAChB,IAAA,qBAAS,EAAC,MAAM,EAAE,GAAG,EAAE,sBAAc,CAAC,sBAAsB,EAAE;YAC5D,KAAK;YACL,GAAG;SACJ,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACN,CAAC,CAAA;AAnCY,QAAA,gBAAgB,oBAmC5B"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export declare const httpFunction: (route: BasedFunctionRoute, ctx: Context<HttpSession>, server: BasedServer, payload?: Uint8Array) => void;
|
|
1
|
+
import { HttpSession } from '@based/functions';
|
|
2
|
+
import { IsAuthorizedHandler } from '../../authorize';
|
|
3
|
+
export declare const httpFunction: IsAuthorizedHandler<HttpSession>;
|
|
@@ -1,47 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.httpFunction = void 0;
|
|
4
|
-
const functions_1 = require("../../functions");
|
|
5
4
|
const sendHttpResponse_1 = require("../../sendHttpResponse");
|
|
6
5
|
const error_1 = require("../../error");
|
|
7
6
|
const sendError_1 = require("../../sendError");
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const name = route.name;
|
|
13
|
-
server.functions
|
|
14
|
-
.install(name)
|
|
15
|
-
.then((spec) => {
|
|
16
|
-
if (!ctx.session) {
|
|
7
|
+
const installFn_1 = require("../../installFn");
|
|
8
|
+
const httpFunction = async (route, server, ctx, payload) => {
|
|
9
|
+
(0, installFn_1.installFn)(server, ctx, route).then((spec) => {
|
|
10
|
+
if (spec === null) {
|
|
17
11
|
return;
|
|
18
12
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
13
|
+
spec
|
|
14
|
+
.function(server.client, payload, ctx)
|
|
15
|
+
.then(async (result) => {
|
|
16
|
+
if (!ctx.session) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
if (
|
|
20
|
+
/* change signature
|
|
21
|
+
add (based, result, payload, ctx)
|
|
22
|
+
based.send(ctx, {
|
|
23
|
+
headers: {},
|
|
24
|
+
payload
|
|
25
|
+
}) ?
|
|
26
|
+
*/
|
|
27
|
+
spec.customHttpResponse &&
|
|
28
|
+
(await spec.customHttpResponse(result, payload, ctx, sendHttpResponse_1.sendHttpResponse))) {
|
|
29
|
+
// return
|
|
30
|
+
}
|
|
31
|
+
// sendHttpResponse(ctx, result)
|
|
32
|
+
})
|
|
33
|
+
.catch((err) => {
|
|
34
|
+
(0, sendError_1.sendError)(server, ctx, error_1.BasedErrorCode.FunctionError, {
|
|
35
|
+
err,
|
|
36
|
+
route,
|
|
41
37
|
});
|
|
42
|
-
}
|
|
43
|
-
})
|
|
44
|
-
.catch(() => (0, sendError_1.sendError)(server, ctx, error_1.BasedErrorCode.FunctionNotFound, route));
|
|
38
|
+
});
|
|
39
|
+
});
|
|
45
40
|
};
|
|
46
41
|
exports.httpFunction = httpFunction;
|
|
47
42
|
//# sourceMappingURL=function.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"function.js","sourceRoot":"","sources":["../../../src/incoming/http/function.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"function.js","sourceRoot":"","sources":["../../../src/incoming/http/function.ts"],"names":[],"mappings":";;;AAEA,6DAAyD;AACzD,uCAA4C;AAC5C,+CAA2C;AAC3C,+CAA2C;AAGpC,MAAM,YAAY,GAAqC,KAAK,EACjE,KAAyB,EACzB,MAAM,EACN,GAAG,EACH,OAAO,EACP,EAAE;IACF,IAAA,qBAAS,EAAC,MAAM,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;QAC1C,IAAI,IAAI,KAAK,IAAI,EAAE;YACjB,OAAM;SACP;QACD,IAAI;aACD,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,CAAC;aACrC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;YACrB,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE;gBAChB,OAAM;aACP;YACD;YACE;;;;;;cAME;YACF,IAAI,CAAC,kBAAkB;gBACvB,CAAC,MAAM,IAAI,CAAC,kBAAkB,CAC5B,MAAM,EACN,OAAO,EACP,GAAG,EACH,mCAAgB,CACjB,CAAC,EACF;gBACA,SAAS;aACV;YACD,gCAAgC;QAClC,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;YACb,IAAA,qBAAS,EAAC,MAAM,EAAE,GAAG,EAAE,sBAAc,CAAC,aAAa,EAAE;gBACnD,GAAG;gBACH,KAAK;aACN,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AA3CY,QAAA,YAAY,gBA2CxB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { BasedServer } from '../../server';
|
|
2
|
-
import { HttpSession, Context } from '
|
|
3
|
-
import {
|
|
4
|
-
export declare const httpGet: (route:
|
|
2
|
+
import { HttpSession, Context } from '@based/functions';
|
|
3
|
+
import { BasedQueryFunctionRoute } from '../../functions';
|
|
4
|
+
export declare const httpGet: (route: BasedQueryFunctionRoute, payload: any, ctx: Context<HttpSession>, server: BasedServer, checksum: number) => void;
|