Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@eventual/core-runtime

Package Overview
Dependencies
Maintainers
2
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eventual/core-runtime - npm Package Compare versions

Comparing version 0.31.7 to 0.32.0

2

lib/cjs/handlers/command-worker.js

@@ -231,2 +231,2 @@ "use strict";

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWFuZC13b3JrZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvaGFuZGxlcnMvY29tbWFuZC13b3JrZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEseUNBT3dCO0FBQ3hCLHNEQU1pQztBQUNqQyw4REFBK0I7QUFZL0I7Ozs7O0dBS0c7QUFDSCxTQUFnQixtQkFBbUIsQ0FBQyxFQUNsQyxhQUFhLEVBQ2IsWUFBWSxHQUNXO0lBQ3ZCLGlEQUFpRDtJQUNqRCxJQUFJLGFBQWEsRUFBRTtRQUNqQixJQUFBLGdDQUFxQixFQUFDLGFBQWEsQ0FBQyxDQUFDO0tBQ3RDO0lBQ0QsNkZBQTZGO0lBQzdGLElBQUksWUFBWSxFQUFFO1FBQ2hCLElBQUEsNkJBQWtCLEVBQUMsWUFBWSxDQUFDLENBQUM7S0FDbEM7SUFFRCxNQUFNLE1BQU0sR0FBRyxVQUFVLEVBQUUsQ0FBQztJQUU1Qjs7Ozs7T0FLRztJQUNILE9BQU8sVUFBVSxPQUFPO1FBQ3RCLE9BQU8sQ0FBQyxLQUFLLENBQUMsU0FBUyxFQUFFLE9BQU8sQ0FBQyxDQUFDO1FBQ2xDLE9BQU8sSUFBQSwyQkFBZ0IsRUFBQyxzQkFBVyxDQUFDLGFBQWEsRUFBRSxLQUFLLElBQUksRUFBRTtZQUM1RCxJQUFJ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AwLCB1c2luZyAyMDQgdG8gbWF0Y2ggQVBJIEdhdGV3YXlcbiAgICAgICAgICAgICAgLy8gYW5kIGFjY3VyYXRlbHkgcmVmbGVjdCBOTyBDT05URU5UXG4gICAgICAgICAgICAgIHN0YXR1czogMjA0LFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBuZXcgSHR0cFJlc3BvbnNlKFxuICAgICAgICAgICAgYE5vdCBGb3VuZDogJHtyZXF1ZXN0Lm1ldGhvZH0gJHtyZXF1ZXN0LnVybH1gLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBzdGF0dXM6IDQwNCxcbiAgICAgICAgICAgICAgc3RhdHVzVGV4dDogXCJOb3QgRm91bmRcIixcbiAgICAgICAgICAgIH1cbiAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZXNwb25zZTtcbiAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICBpZiAoaXNIdHRwRXJyb3IoZXJyKSkge1xuICAgICAgICAgIHJldHVybiBuZXcgSHR0cFJlc3BvbnNlKFxuICAgICAgICAgICAgSlNPTi5zdHJpbmdpZnkoe1xuICAgICAgICAgICAgICBtZXNzYWdlOiBlcnIubWVzc2FnZSxcbiAgICAgICAgICAgICAgZGF0YTogZXJyLmRhdGEsXG4gICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgc3RhdHVzOiBlcnIuY29kZSxcbiAgICAgICAgICAgIH1cbiAgICAgICAgICApO1xuICAgICAgICB9IGVsc2UgaWYgKGVyciBpbnN0YW5jZW9mIEVycm9yKSB7XG4gICAgICAgICAgY29uc29sZS5lcnJvcihlcnIpO1xuICAgICAgICAgIHJldHVybiBuZXcgSHR0cFJlc3BvbnNlKGVyci5tZXNzYWdlLCB7XG4gICAgICAgICAgICBzdGF0dXM6IDUwMCxcbiAgICAgICAgICAgIHN0YXR1c1RleHQ6IFwiSW50ZXJuYWwgU2Vyd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VzcG9uc2UgdG8gdGhlIGhhbmRsZXJcbiAgICAgICAgICAgIHJldHVybiBjb21tYW5kLmhhbmRsZXIocmVxdWVzdCwgY29udGV4dCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgbGV0IGlucHV0OiBhbnkgPSBhd2FpdCByZXF1ZXN0LnRyeUpzb24oKTtcbiAgICAgICAgICBpZiAoY29tbWFuZC5pbnB1dCAmJiBzaG91bGRWYWxpZGF0ZSkge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgaW5wdXQgPSBjb21tYW5kLmlucHV0LnBhcnNlKGlucHV0KTtcbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKFwiSW52YWxpZCBpbnB1dFwiLCBlcnIsIGlucHV0KTtcbiAgICAgICAgICAgICAgcmV0dXJuIG5ldyBIdHRwUmVzcG9uc2UoSlNPTi5zdHJpbmdpZnkoZXJyKSwge1xuICAgICAgICAgICAgICAgIHN0YXR1czogNDAwLFxuICAgICAgICAgICAgICAgIHN0YXR1c1RleHQ6IFwiSW52YWxpZCBpbnB1dFwiLFxuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBsZXQgb3V0cHV0OiBhbnkgPSBhd2FpdCBjb21tYW5kLmhhbmRsZXIoaW5wdXQsIGNvbnRleHQpO1xuICAgICAgICAgIGlmIChjb21tYW5kLm91dHB1dCAmJiBzaG91bGRWYWxpZGF0ZSkge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgb3V0cHV0ID0gY29tbWFuZC5vdXRwdXQucGFyc2Uob3V0cHV0KTtcbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKFwiUlBDIG91dHB1dCBkaWQgbm90IG1hdGNoIHNjaGVtYVwiLCBvdXRwdXQsIGVycik7XG4gICAgICAgICAgICAgIHJldHVybiBuZXcgSHR0cFJlc3BvbnNlKEpTT04uc3RyaW5naWZ5KGVyciksIHtcbiAgICAgICAgICAgICAgICBzdGF0dXM6IDUwMCxcbiAgICAgICAgICAgICAgICBzdGF0dXNUZXh0OiBcIlJQQyBvdXRwdXQgZGlkIG5vdCBtYXRjaCBzY2hlbWFcIixcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBuZXcgSHR0cFJlc3BvbnNlKEpTT04uc3RyaW5naWZ5KG91dHB1dCwganNvblJlcGxhY2VyKSwge1xuICAgICAgICAgICAgc3RhdHVzOiAyMDAsXG4gICAgICAgICAgfSk7XG4gICAgICAgIH0pXG4gICAgICApO1xuICAgIH1cblxuICAgIGNvbnN0IHBhdGggPSBjb21tYW5kLnBhdGg7XG5cbiAgICBpZiAocGF0aCkge1xuICAgICAgY29uc3QgbWV0aG9kID0gKGNvbW1hbmQubWV0aG9kPy50b0xvY2FsZUxvd2VyQ2FzZSgpID8/XG4gICAgICAgIFwiYWxsXCIpIGFzIGtleW9mIFJvdXRlcjtcblxuICAgICAgLy8gUkVTVCByb3V0ZXMgcGFyc2UgdGhlIHJlcXVlc3QgYWNjb3JkaW5nIHRvIHRoZSBjb21tYW5kJ3MgcGF0aC9tZXRob2QvcGFyYW1zIGNvbmZpZ3VyYXRpb25cbiAgICAgIHJvdXRlclttZXRob2RdKFxuICAgICAgICBwYXRoLFxuICAgICAgICB3aXRoTWlkZGxld2FyZShhc3luYyAocmVxdWVzdDogSHR0cFJlcXVlc3QsIGNvbnRleHQpID0+IHtcbiAgICAgICAgICBpZiAoY29tbWFuZC5wYXNzVGhyb3VnaCkge1xuICAgICAgICAgICAgLy8gaWYgcGFzc3Rocm91Z2ggaXMgZW5hYmxlZCwganVzdCBwcm94eSB0aGUgcmVxdWVzdC1yZXNwb25zZSB0byB0aGUgaGFuZGxlclxuICAgICAgICAgICAgcmV0dXJuIGNvbW1hbmQuaGFuZGxlcihyZXF1ZXN0LCBjb250ZXh0KTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICAvLyBmaXJzdCwgZ2V0IHRoZSBib2R5IGFzIHB1cmUgSlNPTiAtIGFzc3VtZSBpdCdzIGFuIG9iamVjdFxuICAgICAgICAgIGNvbnN0IGJvZHkgPSBhd2FpdCByZXF1ZXN0LnRyeUpzb24oKTtcbiAgICAgICAgICBsZXQgaW5wdXQ6IGFueSA9IHtcbiAgICAgICAgICAgIC4uLnJlcXVlc3QucGFyYW1zLFxuICAgICAgICAgICAgLi4uKGJvZHkgJiYgdHlwZW9mIGJvZHkgPT09IFwib2JqZWN0XCIgPyBib2R5IDoge30pLFxuICAgICAgICAgIH07XG5cbiAgICAgICAgICAvLyBwYXJzZSBoZWFkZXJzL3BhcmFtcy9xdWVyaWVzL2JvZHkgaW50byB0aGUgUlBDIGludGVyZmFjZVxuICAgICAgICAgIGlmIChjb21tYW5kLnBhcmFtcykge1xuICAgICAgICAgICAgT2JqZWN0LmVudHJpZXMoY29tbWFuZC5wYXJhbXMgYXMgUmVjb3JkPHN0cmluZywgUmVzdFBhcmFtU3BlYz4pLm1hcChcbiAgICAgICAgICAgICAgKFtuYW1lLCBzcGVjXSkgPT4ge1xuICAgICAgICAgICAgICAgIGlucHV0W25hbWVdID0gcmVzb2x2ZUlucHV0KG5hbWUsIHNwZWMpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChjb21tYW5kLmlucHV0ICYmIHNob3VsZFZhbGlkYXRlKSB7XG4gICAgICAgICAgICAvLyB2YWxpZGF0ZSB0aGUgem9kIGlucHV0IHNjaGVtYSBpZiBvbmUgaXMgc3BlY2lmaWVkXG4gICAgICAgICAgICBpbnB1dCA9IGNvbW1hbmQuaW5wdXQucGFyc2UoaW5wdXQpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIC8vIGNhbGwgdGhlIGNvbW1hbm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gICogQHJldHVybnNcbiAgICAgKi9cbiAgICBmdW5jdGlvbiB3aXRoTWlkZGxld2FyZShcbiAgICAgIGhhbmRsZXI6IChyZXF1ZXN0OiBIdHRwUmVxdWVzdCwgY29udGV4dDogYW55KSA9PiBQcm9taXNlPEh0dHBSZXNwb25zZT5cbiAgICApIHtcbiAgICAgIHJldHVybiBhc3luYyAocmVxdWVzdDogSHR0cFJlcXVlc3QpOiBQcm9taXNlPEh0dHBSZXNwb25zZT4gPT4ge1xuICAgICAgICBjb25zdCBjaGFpbiA9IChjb21tYW5kLm1pZGRsZXdhcmVzID8/IFtdKS52YWx1ZXMoKTtcblxuICAgICAgICByZXR1cm4gbmV4dChyZXF1ZXN0LCB7fSk7XG5cbiAgICAgICAgYXN5bmMgZnVuY3Rpb24gbmV4dChcbiAgICAgICAgICByZXF1ZXN0OiBIdHRwUmVxdWVzdCxcbiAgICAgICAgICBjb250ZXh0OiBhbnlcbiAgICAgICAgKTogUHJvbWlzZTxIdHRwUmVzcG9uc2U+IHtcbiAgICAgICAgICBsZXQgY29uc3VtZWQgPSBmYWxzZTtcbiAgICAgICAgICBjb25zdCBtaWRkbGV3YXJlID0gY2hhaW4ubmV4dCgpO1xuICAgICAgICAgIGlmIChtaWRkbGV3YXJlLmRvbmUpIHtcbiAgICAgICAgICAgIHJldHVybiBoYW5kbGVyKHJlcXVlc3QsIGNvbnRleHQpO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gbWlkZGxld2FyZS52YWx1ZSh7XG4gICAgICAgICAgICAgIHJlcXVlc3QsXG4gICAgICAgICAgICAgIGNvbnRleHQsXG4gICAgICAgICAgICAgIG5leHQ6IGFzeW5jIChjb250ZXh0KSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKGNvbnN1bWVkKSB7XG4gICAgICAgICAgICAgICAgICBjb25zdW1lZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgIC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ICAgICAgICAgICAgLy8gYW5kIGFjY3VyYXRlbHkgcmVmbGVjdCBOTyBDT05URU5UXG4gICAgICAgICAgICAgIHN0YXR1czogMjA0LFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBuZXcgSHR0cFJlc3BvbnNlKFxuICAgICAgICAgICAgYE5vdCBGb3VuZDogJHtyZXF1ZXN0Lm1ldGhvZH0gJHtyZXF1ZXN0LnVybH1gLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBzdGF0dXM6IDQwNCxcbiAgICAgICAgICAgICAgc3RhdHVzVGV4dDogXCJOb3QgRm91bmRcIixcbiAgICAgICAgICAgIH1cbiAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZXNwb25zZTtcbiAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICBpZiAoaXNIdHRwRXJyb3IoZXJyKSkge1xuICAgICAgICAgIHJldHVybiBuZXcgSHR0cFJlc3BvbnNlKFxuICAgICAgICAgICAgSlNPTi5zdHJpbmdpZnkoe1xuICAgICAgICAgICAgICBtZXNzYWdlOiBlcnIubWVzc2FnZSxcbiAgICAgICAgICAgICAgZGF0YTogZXJyLmRhdGEsXG4gICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgc3RhdHVzOiBlcnIuY29kZSxcbiAgICAgICAgICAgIH1cbiAgICAgICAgICApO1xuICAgICAgICB9IGVsc2UgaWYgKGVyciBpbnN0YW5jZW9mIEVycm9yKSB7XG4gICAgICAgICAgY29uc29sZS5lcnJvcihlcnIpO1xuICAgICAgICAgIHJldHVybiBuZXcgSHR0cFJlc3BvbnNlKGVyci5tZXNzYWdlLCB7XG4gICAgICAgICAgICBzdGF0dXM6IDUwMCxcbiAgICAgICAgICAgIHN0YXR1c1RleHQ6IFwiSW50ZXJuYWwgU2VydmVyIEVycm9yXCIsXG4gICAgICAgICAgfSk7XG4gICAgICAgIH0gZWxzZ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iBjb21tYW5kLmhhbmRsZXIocmVxdWVzdCwgY29udGV4dCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgbGV0IGlucHV0OiBhbnkgPSBhd2FpdCByZXF1ZXN0LnRyeUpzb24oKTtcbiAgICAgICAgICBpZiAoY29tbWFuZC5pbnB1dCAmJiBzaG91bGRWYWxpZGF0ZSkge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgaW5wdXQgPSBjb21tYW5kLmlucHV0LnBhcnNlKGlucHV0KTtcbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKFwiSW52YWxpZCBpbnB1dFwiLCBlcnIsIGlucHV0KTtcbiAgICAgICAgICAgICAgcmV0dXJuIG5ldyBIdHRwUmVzcG9uc2UoSlNPTi5zdHJpbmdpZnkoZXJyKSwge1xuICAgICAgICAgICAgICAgIHN0YXR1czogNDAwLFxuICAgICAgICAgICAgICAgIHN0YXR1c1RleHQ6IFwiSW52YWxpZCBpbnB1dFwiLFxuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBsZXQgb3V0cHV0OiBhbnkgPSBhd2FpdCBjb21tYW5kLmhhbmRsZXIoaW5wdXQsIGNvbnRleHQpO1xuICAgICAgICAgIGlmIChjb21tYW5kLm91dHB1dCAmJiBzaG91bGRWYWxpZGF0ZSkge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgb3V0cHV0ID0gY29tbWFuZC5vdXRwdXQucGFyc2Uob3V0cHV0KTtcbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKFwiUlBDIG91dHB1dCBkaWQgbm90IG1hdGNoIHNjaGVtYVwiLCBvdXRwdXQsIGVycik7XG4gICAgICAgICAgICAgIHJldHVybiBuZXcgSHR0cFJlc3BvbnNlKEpTT04uc3RyaW5naWZ5KGVyciksIHtcbiAgICAgICAgICAgICAgICBzdGF0dXM6IDUwMCxcbiAgICAgICAgICAgICAgICBzdGF0dXNUZXh0OiBcIlJQQyBvdXRwdXQgZGlkIG5vdCBtYXRjaCBzY2hlbWFcIixcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBuZXcgSHR0cFJlc3BvbnNlKEpTT04uc3RyaW5naWZ5KG91dHB1dCwganNvblJlcGxhY2VyKSwge1xuICAgICAgICAgICAgc3RhdHVzOiAyMDAsXG4gICAgICAgICAgfSk7XG4gICAgICAgIH0pXG4gICAgICApO1xuICAgIH1cblxuICAgIGNvbnN0IHBhdGggPSBjb21tYW5kLnBhdGg7XG5cbiAgICBpZiAocGF0aCkge1xuICAgICAgY29uc3QgbWV0aG9kID0gKGNvbW1hbmQubWV0aG9kPy50b0xvY2FsZUxvd2VyQ2FzZSgpID8/XG4gICAgICAgIFwiYWxsXCIpIGFzIGtleW9mIFJvdXRlcjtcblxuICAgICAgLy8gUkVTVCByb3V0ZXMgcGFyc2UgdGhlIHJlcXVlc3QgYWNjb3JkaW5nIHRvIHRoZSBjb21tYW5kJ3MgcGF0aC9tZXRob2QvcGFyYW1zIGNvbmZpZ3VyYXRpb25cbiAgICAgIHJvdXRlclttZXRob2RdKFxuICAgICAgICBwYXRoLFxuICAgICAgICB3aXRoTWlkZGxld2FyZShhc3luYyAocmVxdWVzdDogSHR0cFJlcXVlc3QsIGNvbnRleHQpID0+IHtcbiAgICAgICAgICBpZiAoY29tbWFuZC5wYXNzVGhyb3VnaCkge1xuICAgICAgICAgICAgLy8gaWYgcGFzc3Rocm91Z2ggaXMgZW5hYmxlZCwganVzdCBwcm94eSB0aGUgcmVxdWVzdC1yZXNwb25zZSB0byB0aGUgaGFuZGxlclxuICAgICAgICAgICAgcmV0dXJuIGNvbW1hbmQuaGFuZGxlcihyZXF1ZXN0LCBjb250ZXh0KTtcbiAgICAgIC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uICAgICAgICAgICAgfSBlbHNlIGlmIChzcGVjID09PSBcImhlYWRlclwiKSB7XG4gICAgICAgICAgICAgIHJldHVybiByZXF1ZXN0LmhlYWRlcnMuZ2V0KG5hbWUpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChzcGVjID09PSBcInBhdGhcIikge1xuICAgICAgICAgICAgICByZXR1cm4gcmVxdWVzdC5wYXJhbXM/LltuYW1lXTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJldHVybiByZXNvbHZlSW5wdXQoc3BlYy5uYW1lID8/IG5hbWUsIHNwZWMuaW4pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSlcbiAgICAgICk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQXBwbGllcyB0aGUgY2hhaW4gb2YgbWlkZGxld2FyZSBjYWxsYmFja3MgdG8gdGhlIHJlcXVlc3QgdG8gYnVpbGQgdXBcbiAgICAgKiBjb250ZXh0IGFuZCBwYXNzIGl0IHRocm91Z2ggdGhlIGNoYWluIGFuZCBmaW5hbGx5IHRvIHRoZSBoYW5kbGVyLlxuICAgICAqXG4gICAgICogRWFjaCBjb250ZXh0IGNhbiBhZGQgdG8gb3IgY29tcGxldGVseSByZXBsYWNlIHRoZSBjb250ZXh0LiBUaGV5IGNhblxuICAgICAqIGFsc28gYnJlYWsgdGhlIGNoYWluIGF0IGFueSB0aW1lIGJ5IHJldHVybmluZyBhIEh0dHBSZXNwb25zZSBpbnN0ZWFkXG4gICAgICogb2YgY2FsbGluZyBgbmV4dGAuXG4gICAgICpcbiAgICAgKiBAcGFyYW0gaGFuZGxlclxuICAgICAqIEByZXR1cm5zXG4gICAgICovXG4gICAgZnVuY3Rpb24gd2l0aE1pZGRsZXdhcmUoXG4gICAgICBoYW5kbGVyOiAocmVxdWVzdDogSHR0cFJlcXVlc3QsIGNvbnRleHQ6IGFueSkgPT4gUHJvbWlzZTxIdHRwUmVzcG9uc2U+XG4gICAgKSB7XG4gICAgICByZXR1cm4gYXN5bmMgKHJlcXVlc3Q6IEh0dHBSZXF1ZXN0KTogUHJvbWlzZTxIdHRwUmVzcG9uc2U+ID0+IHtcbiAgICAgICAgY29uc3QgY2hhaW4gPSAoY29tbWFuZC5taWRkbGV3YXJlcyA/PyBbXSkudmFsdWVzKCk7XG5cbiAgICAgICAgcmV0dXJuIG5leHQocmVxdWVzdCwge30pO1xuXG4gICAgICAgIGFzeW5jIGZ1bmN0aW9uIG5leHQoXG4gICAgICAgICAgcmVxdWVzdDogSHR0cFJlcXVlc3QsXG4gICAgICAgICAgY29udGV4dDogYW55XG4gICAgICAgICk6IFByb21pc2U8SHR0cFJlc3BvbnNlPiB7XG4gICAgICAgICAgbGV0IGNvbnN1bWVkID0gZmFsc2U7XG4gICAgICAgICAgY29uc3QgbWlkZGxld2FyZSA9IGNoYWluLm5leHQoKTtcbiAgICAgICAgICBpZiAobWlkZGxld2FyZS5kb25lKSB7XG4gICAgICAgICAgICByZXR1cm4gaGFuZGxlcihyZXF1ZXN0LCBjb250ZXh0KTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIG1pZGRsZXdhcmUudmFsdWUoe1xuICAgICAgICAgICAgICByZXF1ZXN0LFxuICAgICAgICAgICAgICBjb250ZXh0LFxuICAgICAgICAgICAgICBuZXh0OiBhc3luYyAoY29udGV4dCkgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChjb25zdW1lZCkge1xuICAgICAgICAgICAgICAgICAgY29uc3VtZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxuICAgICAgICAgICAgICAgICAgICBgTWlkZGxld2FyZSBjYW5ub3QgY2FsbCAnbmV4dCcgbW9yZSB0aGFuIG9uY2VgXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gbmV4dChyZXF1ZXN0LCBjb250ZXh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R1cm4gdmFsdWU7XG59XG4iXX0=

@@ -224,2 +224,2 @@ import { commandRpcPath, HttpResponse, isHttpError, } from "@eventual/core";

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWFuZC13b3JrZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvaGFuZGxlcnMvY29tbWFuZC13b3JrZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLGNBQWMsRUFHZCxZQUFZLEVBQ1osV0FBVyxHQUVaLE1BQU0sZ0JBQWdCLENBQUM7QUFDeEIsT0FBTyxFQUNMLFFBQVEsRUFDUixrQkFBa0IsRUFDbEIscUJBQXFCLEVBQ3JCLFdBQVcsRUFDWCxnQkFBZ0IsR0FDakIsTUFBTSx5QkFBeUIsQ0FBQztBQUNqQyxPQUFPLElBQUksTUFBTSxhQUFhLENBQUM7QUFZL0I7Ozs7O0dBS0c7QUFDSCxNQUFNLFVBQVUsbUJBQW1CLENBQUMsRUFDbEMsYUFBYSxFQUNiLFlBQVksR0FDVztJQUN2QixpREFBaUQ7SUFDakQsSUFBSSxhQUFhLEVBQUU7UUFDakIscUJBQXFCLENBQUMsYUFBYSxDQUFDLENBQUM7S0FDdEM7SUFDRCw2RkFBNkY7SUFDN0YsSUFBSSxZQUFZLEVBQUU7UUFDaEIsa0JBQWtCLENBQUMsWUFBWSxDQUFDLENBQUM7S0FDbEM7SUFFRCxNQUFNLE1BQU0sR0FBRyxVQUFVLEVBQUUsQ0FBQztJQUU1Qjs7Ozs7T0FLRztJQUNILE9BQU8sVUFBVSxPQUFPO1FBQ3RCLE9BQU8sQ0FBQyxLQUFLLENBQUMsU0FBUyxFQUFFLE9BQU8sQ0FBQyxDQUFDO1FBQ2xDLE9BQU8sZ0JBQWdCLENBQUMsV0FBVyxDQUFDLGFBQWEsRUFBRSxLQUFLLElBQUksRUFBRTtZQUM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lcbiAgICAgICAgICAgICAgLy8gYW5kIGFjY3VyYXRlbHkgcmVmbGVjdCBOTyBDT05URU5UXG4gICAgICAgICAgICAgIHN0YXR1czogMjA0LFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBuZXcgSHR0cFJlc3BvbnNlKFxuICAgICAgICAgICAgYE5vdCBGb3VuZDogJHtyZXF1ZXN0Lm1ldGhvZH0gJHtyZXF1ZXN0LnVybH1gLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBzdGF0dXM6IDQwNCxcbiAgICAgICAgICAgICAgc3RhdHVzVGV4dDogXCJOb3QgRm91bmRcIixcbiAgICAgICAgICAgIH1cbiAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZXNwb25zZTtcbiAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICBpZiAoaXNIdHRwRXJyb3IoZXJyKSkge1xuICAgICAgICAgIHJldHVybiBuZXcgSHR0cFJlc3BvbnNlKFxuICAgICAgICAgICAgSlNPTi5zdHJpbmdpZnkoe1xuICAgICAgICAgICAgICBtZXNzYWdlOiBlcnIubWVzc2FnZSxcbiAgICAgICAgICAgICAgZGF0YTogZXJyLmRhdGEsXG4gICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgc3RhdHVzOiBlcnIuY29kZSxcbiAgICAgICAgICAgIH1cbiAgICAgICAgICApO1xuICAgICAgICB9IGVsc2UgaWYgKGVyciBpbnN0YW5jZW9mIEVycm9yKSB7XG4gICAgICAgICAgY29uc29sZS5lcnJvcihlcnIpO1xuICAgICAgICAgIHJldHVybiBuZXcgSHR0cFJlc3BvbnNlKGVyci5tZXNzYWdlLCB7XG4gICAgICAgICAgICBzdGF0dXM6IDUwMCxcbiAgICAgICAgICAgIHN0YXR1c1RleHQ6IFwiSW50ZXJuYWwgU2VydmVyIEVycm9yXCIsXG4gICAgICAgICAgfSk7XG4gICAgICAgIH0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HJldHVybiBjb21tYW5kLmhhbmRsZXIocmVxdWVzdCwgY29udGV4dCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgbGV0IGlucHV0OiBhbnkgPSBhd2FpdCByZXF1ZXN0LnRyeUpzb24oKTtcbiAgICAgICAgICBpZiAoY29tbWFuZC5pbnB1dCAmJiBzaG91bGRWYWxpZGF0ZSkge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgaW5wdXQgPSBjb21tYW5kLmlucHV0LnBhcnNlKGlucHV0KTtcbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKFwiSW52YWxpZCBpbnB1dFwiLCBlcnIsIGlucHV0KTtcbiAgICAgICAgICAgICAgcmV0dXJuIG5ldyBIdHRwUmVzcG9uc2UoSlNPTi5zdHJpbmdpZnkoZXJyKSwge1xuICAgICAgICAgICAgICAgIHN0YXR1czogNDAwLFxuICAgICAgICAgICAgICAgIHN0YXR1c1RleHQ6IFwiSW52YWxpZCBpbnB1dFwiLFxuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBsZXQgb3V0cHV0OiBhbnkgPSBhd2FpdCBjb21tYW5kLmhhbmRsZXIoaW5wdXQsIGNvbnRleHQpO1xuICAgICAgICAgIGlmIChjb21tYW5kLm91dHB1dCAmJiBzaG91bGRWYWxpZGF0ZSkge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgb3V0cHV0ID0gY29tbWFuZC5vdXRwdXQucGFyc2Uob3V0cHV0KTtcbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKFwiUlBDIG91dHB1dCBkaWQgbm90IG1hdGNoIHNjaGVtYVwiLCBvdXRwdXQsIGVycik7XG4gICAgICAgICAgICAgIHJldHVybiBuZXcgSHR0cFJlc3BvbnNlKEpTT04uc3RyaW5naWZ5KGVyciksIHtcbiAgICAgICAgICAgICAgICBzdGF0dXM6IDUwMCxcbiAgICAgICAgICAgICAgICBzdGF0dXNUZXh0OiBcIlJQQyBvdXRwdXQgZGlkIG5vdCBtYXRjaCBzY2hlbWFcIixcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBuZXcgSHR0cFJlc3BvbnNlKEpTT04uc3RyaW5naWZ5KG91dHB1dCwganNvblJlcGxhY2VyKSwge1xuICAgICAgICAgICAgc3RhdHVzOiAyMDAsXG4gICAgICAgICAgfSk7XG4gICAgICAgIH0pXG4gICAgICApO1xuICAgIH1cblxuICAgIGNvbnN0IHBhdGggPSBjb21tYW5kLnBhdGg7XG5cbiAgICBpZiAocGF0aCkge1xuICAgICAgY29uc3QgbWV0aG9kID0gKGNvbW1hbmQubWV0aG9kPy50b0xvY2FsZUxvd2VyQ2FzZSgpID8/XG4gICAgICAgIFwiYWxsXCIpIGFzIGtleW9mIFJvdXRlcjtcblxuICAgICAgLy8gUkVTVCByb3V0ZXMgcGFyc2UgdGhlIHJlcXVlc3QgYWNjb3JkaW5nIHRvIHRoZSBjb21tYW5kJ3MgcGF0aC9tZXRob2QvcGFyYW1zIGNvbmZpZ3VyYXRpb25cbiAgICAgIHJvdXRlclttZXRob2RdKFxuICAgICAgICBwYXRoLFxuICAgICAgICB3aXRoTWlkZGxld2FyZShhc3luYyAocmVxdWVzdDogSHR0cFJlcXVlc3QsIGNvbnRleHQpID0+IHtcbiAgICAgICAgICBpZiAoY29tbWFuZC5wYXNzVGhyb3VnaCkge1xuICAgICAgICAgICAgLy8gaWYgcGFzc3Rocm91Z2ggaXMgZW5hYmxlZCwganVzdCBwcm94eSB0aGUgcmVxdWVzdC1yZXNwb25zZSB0byB0aGUgaGFuZGxlclxuICAgICAgICAgICAgcmV0dXJuIGNvbW1hbmQuaGFuZGxlcihyZXF1ZXN0LCBjb250ZXh0KTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICAvLyBmaXJzdCwgZ2V0IHRoZSBib2R5IGFzIHB1cmUgSlNPTiAtIGFzc3VtZSBpdCdzIGFuIG9iamVjdFxuICAgICAgICAgIGNvbnN0IGJvZHkgPSBhd2FpdCByZXF1ZXN0LnRyeUpzb24oKTtcbiAgICAgICAgICBsZXQgaW5wdXQ6IGFueSA9IHtcbiAgICAgICAgICAgIC4uLnJlcXVlc3QucGFyYW1zLFxuICAgICAgICAgICAgLi4uKGJvZHkgJiYgdHlwZW9mIGJvZHkgPT09IFwib2JqZWN0XCIgPyBib2R5IDoge30pLFxuICAgICAgICAgIH07XG5cbiAgICAgICAgICAvLyBwYXJzZSBoZWFkZXJzL3BhcmFtcy9xdWVyaWVzL2JvZHkgaW50byB0aGUgUlBDIGludGVyZmFjZVxuICAgICAgICAgIGlmIChjb21tYW5kLnBhcmFtcykge1xuICAgICAgICAgICAgT2JqZWN0LmVudHJpZXMoY29tbWFuZC5wYXJhbXMgYXMgUmVjb3JkPHN0cmluZywgUmVzdFBhcmFtU3BlYz4pLm1hcChcbiAgICAgICAgICAgICAgKFtuYW1lLCBzcGVjXSkgPT4ge1xuICAgICAgICAgICAgICAgIGlucHV0W25hbWVdID0gcmVzb2x2ZUlucHV0KG5hbWUsIHNwZWMpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChjb21tYW5kLmlucHV0ICYmIHNob3VsZFZhbGlkYXRlKSB7XG4gICAgICAgICAgICAvLyB2YWxpZGF0ZSB0aGUgem9kIGlucHV0IHNjaGVtYSBpZiBvbmUgaXMgc3BlY2lmaWVkXG4gICAgICAgICAgICBpbnB1dCA9IGNvbW1hbmQuaW5wdXQucGFyc2UoaW5wdXQpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIC8vIGNhbGwgdGhlIGNvbW1hbmQgUlBDIGhhbmRsZXJcbiAgICAgICAgICBsZXQgb3V0cHV0O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XRoTWlkZGxld2FyZShcbiAgICAgIGhhbmRsZXI6IChyZXF1ZXN0OiBIdHRwUmVxdWVzdCwgY29udGV4dDogYW55KSA9PiBQcm9taXNlPEh0dHBSZXNwb25zZT5cbiAgICApIHtcbiAgICAgIHJldHVybiBhc3luYyAocmVxdWVzdDogSHR0cFJlcXVlc3QpOiBQcm9taXNlPEh0dHBSZXNwb25zZT4gPT4ge1xuICAgICAgICBjb25zdCBjaGFpbiA9IChjb21tYW5kLm1pZGRsZXdhcmVzID8/IFtdKS52YWx1ZXMoKTtcblxuICAgICAgICByZXR1cm4gbmV4dChyZXF1ZXN0LCB7fSk7XG5cbiAgICAgICAgYXN5bmMgZnVuY3Rpb24gbmV4dChcbiAgICAgICAgICByZXF1ZXN0OiBIdHRwUmVxdWVzdCxcbiAgICAgICAgICBjb250ZXh0OiBhbnlcbiAgICAgICAgKTogUHJvbWlzZTxIdHRwUmVzcG9uc2U+IHtcbiAgICAgICAgICBsZXQgY29uc3VtZWQgPSBmYWxzZTtcbiAgICAgICAgICBjb25zdCBtaWRkbGV3YXJlID0gY2hhaW4ubmV4dCgpO1xuICAgICAgICAgIGlmIChtaWRkbGV3YXJlLmRvbmUpIHtcbiAgICAgICAgICAgIHJldHVybiBoYW5kbGVyKHJlcXVlc3QsIGNvbnRleHQpO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gbWlkZGxld2FyZS52YWx1ZSh7XG4gICAgICAgICAgICAgIHJlcXVlc3QsXG4gICAgICAgICAgICAgIGNvbnRleHQsXG4gICAgICAgICAgICAgIG5leHQ6IGFzeW5jIChjb250ZXh0KSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKGNvbnN1bWVkKSB7XG4gICAgICAgICAgICAgICAgICBjb25zdW1lZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgICAgICAgICAgIGBNaWRkbGV3YXJlIGNhbm5vdCBjYWxsIC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2luZyAyMDQgdG8gbWF0Y2ggQVBJIEdhdGV3YXlcbiAgICAgICAgICAgICAgLy8gYW5kIGFjY3VyYXRlbHkgcmVmbGVjdCBOTyBDT05URU5UXG4gICAgICAgICAgICAgIHN0YXR1czogMjA0LFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBuZXcgSHR0cFJlc3BvbnNlKFxuICAgICAgICAgICAgYE5vdCBGb3VuZDogJHtyZXF1ZXN0Lm1ldGhvZH0gJHtyZXF1ZXN0LnVybH1gLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBzdGF0dXM6IDQwNCxcbiAgICAgICAgICAgICAgc3RhdHVzVGV4dDogXCJOb3QgRm91bmRcIixcbiAgICAgICAgICAgIH1cbiAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZXNwb25zZTtcbiAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICBpZiAoaXNIdHRwRXJyb3IoZXJyKSkge1xuICAgICAgICAgIHJldHVybiBuZXcgSHR0cFJlc3BvbnNlKFxuICAgICAgICAgICAgSlNPTi5zdHJpbmdpZnkoe1xuICAgICAgICAgICAgICBtZXNzYWdlOiBlcnIubWVzc2FnZSxcbiAgICAgICAgICAgICAgZGF0YTogZXJyLmRhdGEsXG4gICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgc3RhdHVzOiBlcnIuY29kZSxcbiAgICAgICAgICAgIH1cbiAgICAgICAgICApO1xuICAgICAgICB9IGVsc2UgaWYgKGVyciBpbnN0YW5jZW9mIEVycm9yKSB7XG4gICAgICAgICAgY29uc29sZS5lcnJvcihlcnIpO1xuICAgICAgICAgIHJldHVybiBuZXcgSHR0cFJlc3BvbnNlKGVyci5tZXNzYWdlLCB7XG4gICAgICAgICAgICBzdGF0dXM6IDUwMCxcbiAgICAgICAgICAgIHN0YXR1c1RleHQ6IFwiSW50ZXJuYWwgU2VydmVyIEVyc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2UgdG8gdGhlIGhhbmRsZXJcbiAgICAgICAgICAgIHJldHVybiBjb21tYW5kLmhhbmRsZXIocmVxdWVzdCwgY29udGV4dCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgbGV0IGlucHV0OiBhbnkgPSBhd2FpdCByZXF1ZXN0LnRyeUpzb24oKTtcbiAgICAgICAgICBpZiAoY29tbWFuZC5pbnB1dCAmJiBzaG91bGRWYWxpZGF0ZSkge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgaW5wdXQgPSBjb21tYW5kLmlucHV0LnBhcnNlKGlucHV0KTtcbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKFwiSW52YWxpZCBpbnB1dFwiLCBlcnIsIGlucHV0KTtcbiAgICAgICAgICAgICAgcmV0dXJuIG5ldyBIdHRwUmVzcG9uc2UoSlNPTi5zdHJpbmdpZnkoZXJyKSwge1xuICAgICAgICAgICAgICAgIHN0YXR1czogNDAwLFxuICAgICAgICAgICAgICAgIHN0YXR1c1RleHQ6IFwiSW52YWxpZCBpbnB1dFwiLFxuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBsZXQgb3V0cHV0OiBhbnkgPSBhd2FpdCBjb21tYW5kLmhhbmRsZXIoaW5wdXQsIGNvbnRleHQpO1xuICAgICAgICAgIGlmIChjb21tYW5kLm91dHB1dCAmJiBzaG91bGRWYWxpZGF0ZSkge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgb3V0cHV0ID0gY29tbWFuZC5vdXRwdXQucGFyc2Uob3V0cHV0KTtcbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKFwiUlBDIG91dHB1dCBkaWQgbm90IG1hdGNoIHNjaGVtYVwiLCBvdXRwdXQsIGVycik7XG4gICAgICAgICAgICAgIHJldHVybiBuZXcgSHR0cFJlc3BvbnNlKEpTT04uc3RyaW5naWZ5KGVyciksIHtcbiAgICAgICAgICAgICAgICBzdGF0dXM6IDUwMCxcbiAgICAgICAgICAgICAgICBzdGF0dXNUZXh0OiBcIlJQQyBvdXRwdXQgZGlkIG5vdCBtYXRjaCBzY2hlbWFcIixcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBuZXcgSHR0cFJlc3BvbnNlKEpTT04uc3RyaW5naWZ5KG91dHB1dCwganNvblJlcGxhY2VyKSwge1xuICAgICAgICAgICAgc3RhdHVzOiAyMDAsXG4gICAgICAgICAgfSk7XG4gICAgICAgIH0pXG4gICAgICApO1xuICAgIH1cblxuICAgIGNvbnN0IHBhdGggPSBjb21tYW5kLnBhdGg7XG5cbiAgICBpZiAocGF0aCkge1xuICAgICAgY29uc3QgbWV0aG9kID0gKGNvbW1hbmQubWV0aG9kPy50b0xvY2FsZUxvd2VyQ2FzZSgpID8/XG4gICAgICAgIFwiYWxsXCIpIGFzIGtleW9mIFJvdXRlcjtcblxuICAgICAgLy8gUkVTVCByb3V0ZXMgcGFyc2UgdGhlIHJlcXVlc3QgYWNjb3JkaW5nIHRvIHRoZSBjb21tYW5kJ3MgcGF0aC9tZXRob2QvcGFyYW1zIGNvbmZpZ3VyYXRpb25cbiAgICAgIHJvdXRlclttZXRob2RdKFxuICAgICAgICBwYXRoLFxuICAgICAgICB3aXRoTWlkZGxld2FyZShhc3luYyAocmVxdWVzdDogSHR0cFJlcXVlc3QsIGNvbnRleHQpID0+IHtcbiAgICAgICAgICBpZiAoY29tbWFuZC5wYXNzVGhyb3VnaCkge1xuICAgICAgICAgICAgLy8gaWYgcGFzc3Rocm91Z2ggaXMgZW5hYmxlZCwganVzdCBwcm94eSB0aGUgcmVxdWVzdC1yZXNwb25zZSB0byB0aGUgaGFuZGxlclxuICAgICAgICAgICAgcmV0dXJuIGNvbW1hbmQu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ICAgICByZXR1cm4gcmVxdWVzdC5xdWVyeT8uW25hbWVdO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChzcGVjID09PSBcImhlYWRlclwiKSB7XG4gICAgICAgICAgICAgIHJldHVybiByZXF1ZXN0LmhlYWRlcnMuZ2V0KG5hbWUpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChzcGVjID09PSBcInBhdGhcIikge1xuICAgICAgICAgICAgICByZXR1cm4gcmVxdWVzdC5wYXJhbXM/LltuYW1lXTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJldHVybiByZXNvbHZlSW5wdXQoc3BlYy5uYW1lID8/IG5hbWUsIHNwZWMuaW4pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSlcbiAgICAgICk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQXBwbGllcyB0aGUgY2hhaW4gb2YgbWlkZGxld2FyZSBjYWxsYmFja3MgdG8gdGhlIHJlcXVlc3QgdG8gYnVpbGQgdXBcbiAgICAgKiBjb250ZXh0IGFuZCBwYXNzIGl0IHRocm91Z2ggdGhlIGNoYWluIGFuZCBmaW5hbGx5IHRvIHRoZSBoYW5kbGVyLlxuICAgICAqXG4gICAgICogRWFjaCBjb250ZXh0IGNhbiBhZGQgdG8gb3IgY29tcGxldGVseSByZXBsYWNlIHRoZSBjb250ZXh0LiBUaGV5IGNhblxuICAgICAqIGFsc28gYnJlYWsgdGhlIGNoYWluIGF0IGFueSB0aW1lIGJ5IHJldHVybmluZyBhIEh0dHBSZXNwb25zZSBpbnN0ZWFkXG4gICAgICogb2YgY2FsbGluZyBgbmV4dGAuXG4gICAgICpcbiAgICAgKiBAcGFyYW0gaGFuZGxlclxuICAgICAqIEByZXR1cm5zXG4gICAgICovXG4gICAgZnVuY3Rpb24gd2l0aE1pZGRsZXdhcmUoXG4gICAgICBoYW5kbGVyOiAocmVxdWVzdDogSHR0cFJlcXVlc3QsIGNvbnRleHQ6IGFueSkgPT4gUHJvbWlzZTxIdHRwUmVzcG9uc2U+XG4gICAgKSB7XG4gICAgICByZXR1cm4gYXN5bmMgKHJlcXVlc3Q6IEh0dHBSZXF1ZXN0KTogUHJvbWlzZTxIdHRwUmVzcG9uc2U+ID0+IHtcbiAgICAgICAgY29uc3QgY2hhaW4gPSAoY29tbWFuZC5taWRkbGV3YXJlcyA/PyBbXSkudmFsdWVzKCk7XG5cbiAgICAgICAgcmV0dXJuIG5leHQocmVxdWVzdCwge30pO1xuXG4gICAgICAgIGFzeW5jIGZ1bmN0aW9uIG5leHQoXG4gICAgICAgICAgcmVxdWVzdDogSHR0cFJlcXVlc3QsXG4gICAgICAgICAgY29udGV4dDogYW55XG4gICAgICAgICk6IFByb21pc2U8SHR0cFJlc3BvbnNlPiB7XG4gICAgICAgICAgbGV0IGNvbnN1bWVkID0gZmFsc2U7XG4gICAgICAgICAgY29uc3QgbWlkZGxld2FyZSA9IGNoYWluLm5leHQoKTtcbiAgICAgICAgICBpZiAobWlkZGxld2FyZS5kb25lKSB7XG4gICAgICAgICAgICByZXR1cm4gaGFuZGxlcihyZXF1ZXN0LCBjb250ZXh0KTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIG1pZGRsZXdhcmUudmFsdWUoe1xuICAgICAgICAgICAgICByZXF1ZXN0LFxuICAgICAgICAgICAgICBjb250ZXh0LFxuICAgICAgICAgICAgICBuZXh0OiBhc3luYyAoY29udGV4dCkgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChjb25zdW1lZCkge1xuICAgICAgICAgICAgICAgICAgY29uc3VtZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxuICAgICAgICAgICAgICAgICAgICBgTWlkZGxld2FyZSBjYW5ub3QgY2FsbCAnbmV4dCcgbW9yZSB0aGFuIG9uY2VgXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICA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1cm4gdmFsdWUudG9JU09TdHJpbmcoKTtcbiAgfVxuICByZXR1cm4gdmFsdWU7XG59XG4iXX0=
{
"name": "@eventual/core-runtime",
"version": "0.31.7",
"version": "0.32.0",
"exports": {

@@ -20,3 +20,3 @@ ".": {

"zod": "^3",
"@eventual/core": "^0.31.7"
"@eventual/core": "^0.32.0"
},

@@ -23,0 +23,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc