refactor(code-executor): migrate user scripts to single context argument
- replace (page, context, helpers) signature with async (context) => {}
- add ScriptContext interface exposing page, browser, env, getEnv,
getCredential, getStepOutput, runSnippet, dumpDom, log/warn/error
- rename getEnvUrl to getEnv throughout service and docs
- fix step ordering: normalizeStepOrder and run step rows are now 1-based
- migrate existing DB rows (scenario_steps, scenario_run_steps) +1
- update all tests and stored snippet/step code in DB to new API
This commit is contained in:
@@ -31,7 +31,7 @@ export class ExecDto {
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description:
|
||||
"Key/value map of environment variables available via `helpers.env` and `helpers.getEnvUrl()` in the script.",
|
||||
"Key/value map of environment variables available via `helpers.env` and `helpers.getEnv()` in the script.",
|
||||
example: { BASE_URL: "https://example.com" },
|
||||
})
|
||||
@IsOptional()
|
||||
|
||||
Reference in New Issue
Block a user