fix(script): reject async/generator JS transforms and catch throwing getters

This commit is contained in:
aykhans committed 2026-09-30 19:53:37 +04:00
1 parent e85a6d4613
commit bcf2ea3446
2 files changed
+73 -23

No files matched your search

+1
View File
@@ -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")