Refines JS bridge handlers to process messages directly as typed arguments, removing unnecessary JSON decoding and clarifying error logs.
Updates logic to only execute post-response scripts when present and corrects a warning message.
Refactors pre-request script execution to support environment variable manipulation.
Introduces a simplified key-value map for the environment within the JavaScript context, allowing easier script interaction. Updates the `ad.environment` JS API accordingly.
Implements logic on the Dart side to translate the structured environment model to the simple map before script execution and merge changes back from the map to the model afterward, persisting the modifications.
Shows an indicator on the 'Scripts' tab when pre-request or post-request scripts exist for the selected request.
Updates the selected tab text color in the scripts pane for better visibility.
Initializes JavaScript runtime during application startup.
Executes user-defined pre-request scripts before sending API requests, allowing modification of request details like URL, headers, and body.
Updates script execution environment for better scoping and uses synchronous evaluation.
Updates request model state management to include pre-request and post-request script fields.
Connects the script editor UI to the state notifier, allowing script changes to be persisted.
Introduces `preRequestScript` and `postRequestScript` fields to the request model to store user-defined scripts.
Implements a service using `flutter_js` to execute JavaScript pre-request scripts before a request is sent.
The script can access and modify request data (like headers, body, URL) and environment variables.
Adds bridging to forward JavaScript `console.log`, `console.warn`, and `console.error` calls to the Dart console for easier debugging
Introduces a JavaScript setup script that defines the `ad` helper object.
This `ad` object exposes APIs for manipulating request data, accessing response details, and managing environment variables within scripts.
Adds an `evaluate` function to execute JS code using the `flutter_js` runtime and log results or errors.
This establishes the core infrastructure for pre-request and post-response scripting.
- replace `flutter_highlighter` and `highlighter` with `flutter_highlight` and `highlight`.
- add `flutter_code_editor` dependency.
- introduce a new scripts editor pane in the REST request view.