mirror of
https://github.com/aykhans/sarin.git
synced 2026-10-17 14:53:52 +00:00
fix(script): reject async/generator JS transforms and catch throwing getters
This commit is contained in:
2 files changed
+73
-23
No files matched your search
@@ -434,6 +434,7 @@ var (
|
||||
ErrScriptSourceEmpty = errors.New("script source cannot be empty after @")
|
||||
ErrScriptTransformMissing = errors.New("script must define a global 'transform' function")
|
||||
ErrScriptTransformReturnObject = errors.New("transform function must return an object")
|
||||
ErrScriptTransformAsync = errors.New("transform function must be synchronous, async and generator functions are not supported")
|
||||
ErrScriptURLNoHost = errors.New("script URL must have a host")
|
||||
ErrScriptHTTPOutsideTransform = errors.New("http functions can only be called while transform is running")
|
||||
ErrScriptHTTPUnavailable = errors.New("http client is not available")
|
||||
|
||||
Reference in new issue
Block a user