Versions in this module Expand all Collapse all v0 v0.2.1 Feb 9, 2024 Changes in this version + const DEFAULT_MAX_ALLOWED_WARNINGS + var ErrExecutionAbortedTooManyWarnings = errors.New("execution was aborted because there are too many warnings") + var ErrNoProvidedConfirmExecPrompt = errors.New("risk score too high and no provided way to show confirm prompt") + var ErrUserRefusedExecution = errors.New("user refused execution") + func RunLocalModule(args RunLocalModuleArgs) (scriptResult core.Value, scriptState *core.GlobalState, ...) + func RunPreparedModule(args RunPreparedModuleArgs) (moduleResult core.Value, moduleState *core.GlobalState, module *core.Module, ...) + type RunLocalModuleArgs struct + AdditionalPermissions []core.Permission + AllowMissingEnvVars bool + Debugger *core.Debugger + EnableTesting bool + Fpath string + FullAccessToDatabases bool + IgnoreHighRiskScore bool + LogLevels *core.LogLevels + LogOut io.Writer + Logger zerolog.Logger + OnPrepared func(state *core.GlobalState) error + OptimizeBytecode bool + Out io.Writer + ParentContext *core.Context + ParentContextRequired bool + ParsingCompilationContext *core.Context + PassedArgs *core.ModuleArgs + PassedCLIArgs []string + PreinitFilesystem afs.Filesystem + PreparedChan chan error + Project *project.Project + ScriptContextFileSystem afs.Filesystem + ShowBytecode bool + StdlibCtx context.Context + TestFilters core.TestFilters + UseBytecode bool + type RunPreparedModuleArgs struct + Debugger *core.Debugger + DoNotCancelWhenFinished bool + IgnoreHighRiskScore bool + OptimizeBytecode bool + ParentContext *core.Context + ParsingCompilationContext *core.Context + ShowBytecode bool + State *core.GlobalState + UseBytecode bool