Commit Graph

1346 Commits

Author SHA1 Message Date
Udhay-Adithya
a91e1e0aec feat: add scripts tab to request history 2025-06-23 22:48:03 +05:30
Udhay-Adithya
68318e6b90 feat: add preRequestScript and postRequestScript to HistoryRequestModel 2025-06-23 22:33:22 +05:30
Udhay-Adithya
f60c195510 feat: update RequestModel to include default preRequestScript and postRequestScript 2025-06-23 22:09:07 +05:30
Ashita Prasad
67af625ccb Create pre post script utilities 2025-06-22 22:29:11 +05:30
Ashita Prasad
9e686a8145 export flutter_js_services 2025-06-22 21:28:09 +05:30
Ashita Prasad
53fff89056 Update flutter_js_service.dart 2025-06-22 21:24:03 +05:30
Ashita Prasad
7d2c29cc0d Update kJSSetupScript & add js_utils.dart 2025-06-22 21:23:55 +05:30
Udhay-Adithya
12aa846792 feat: update scripts code pane to use ad dropdown button 2025-06-22 20:09:50 +05:30
Ankit Mahato
9cb7f0fe10 Merge branch 'main' into add-feature-scripts 2025-06-21 20:39:25 +05:30
Udhay-Adithya
ad59d56975 refactor: replace TabView with DropdownButton 2025-06-05 21:10:06 +05:30
Udhay-Adithya
f158d5de12 fix: disable folding handles and line numbers in scripts editor gutter for now 2025-06-05 19:09:30 +05:30
Udhay-Adithya
fe4858ecd0 feat: update pre-request and post-response script handling in CollectionStateNotifier
- Changed return type of handlePreRequestScript and handlePostResponseScript to Future<RequestModel> for better type safety.
- Updated the logic to return the modified request model after executing scripts.
- Ensured that the request model is updated correctly in the sendRequest method after executing the pre-request script.
2025-05-19 16:54:32 +05:30
Ashita Prasad
cff39c12e5 Update dashboard.dart 2025-05-17 17:02:26 +05:30
Ashita Prasad
6e638bb383 Add DashBot to settings 2025-05-17 16:57:16 +05:30
Ashita Prasad
b3b3127c55 Update settings_model.dart 2025-05-17 16:56:53 +05:30
Ashita Prasad
4473bce003 Update explain.dart 2025-05-17 16:48:25 +05:30
Ashita Prasad
6ec2b1d273 Update padding fix 2025-05-17 04:13:55 +05:30
Udhay Adithya
464dd9aff8 Merge branch 'foss42:main' into add-feature-scripts 2025-05-16 14:31:27 +05:30
Udhay-Adithya
14ff728870 fix: JS bridge message handling and script execution checks
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.
2025-05-16 14:30:58 +05:30
Arshhasan
89cbf8312b [Mobile] #842 Headers, Params & Form data text fields get clipped towards bottom for longer texts 2025-05-16 13:13:07 +05:30
Arshhasan
95ed16c061 [Mobile] #842 Headers, Params & Form data text fields get clipped towards bottom for longer texts 2025-05-16 13:11:09 +05:30
Ashita Prasad
17c3c8a793 UX Fix: Field addition button removed from mobile 2025-05-10 00:43:50 +05:30
Ankit Mahato
8d06fc4cd0 UI friendly fix for issue #638 2025-05-04 22:35:21 +05:30
Udhay-Adithya
c2c67a7fca feat: implement post-response script handling and update environment variables 2025-05-02 01:26:52 +05:30
Udhay-Adithya
0645ab1a33 feat: allow scripts to modify environment variables
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.
2025-05-01 20:14:00 +05:30
Udhay-Adithya
71c6818093 fix: move _selectedTabIndex declaration to class level 2025-05-01 17:50:56 +05:30
Udhay-Adithya
6344e8df21 feat: add indicator for request scripts
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.
2025-05-01 17:11:10 +05:30
Udhay-Adithya
36061f660a feat add pre-request script execution
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.
2025-05-01 16:48:50 +05:30
Udhay Adithya
e936f382e0 Merge branch 'foss42:main' into add-feature-scripts 2025-05-01 16:47:38 +05:30
Udhay-Adithya
56137769f8 feat: adds pre/post-request script editing
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.
2025-04-26 00:11:08 +05:30
Udhay Adithya
d9906cc88b Merge branch 'foss42:main' into add-feature-scripts 2025-04-25 23:29:23 +05:30
Udhay-Adithya
fadf49372f feat: add support for pre-request scripts
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
2025-04-25 23:26:31 +05:30
Udhay-Adithya
839d8b5c00 feat: add JavaScript scripting foundation
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.
2025-04-25 22:34:02 +05:30
Rio Jos
a19c9ba093 http options method on history provider 2025-04-24 15:43:22 +05:30
Rio Jos
aa8e5c3d03 http method options 2025-04-24 15:43:22 +05:30
Ankit Mahato
99151e6673 cleanup 2025-04-23 04:25:46 +05:30
Ankit Mahato
d55c414438 Update consts.dart 2025-04-23 04:16:14 +05:30
Ankit Mahato
f25555861e Update alamofire.dart 2025-04-23 04:14:55 +05:30
Ankit Mahato
ec2c2a2407 Update codegen.dart 2025-04-23 04:14:20 +05:30
Udhay-Adithya
f97b39a103 feat: add flutter_js dependency and implement JS runtime service 2025-04-22 14:39:06 +05:30
Udhay-Adithya
346e4c3ef0 feat: refactor code highlighting and add scripts editor pane
- 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.
2025-04-22 14:34:43 +05:30
Udhay-Adithya
ef3867ef43 feat: add scripts tab to request pane and update tab structure 2025-04-21 23:31:55 +05:30
Nikhil
030ad8c401 all tests updated 2025-04-20 03:56:40 +05:30
Nikhil
db3b343d82 Merge branch 'foss42:main' into add-feature-460 2025-04-14 09:20:51 +05:30
Nikhil
d08bf8f564 tests and changes 2025-04-14 03:59:43 +05:30
Ankit Mahato
f532f20660 fix json syntax highlighting after light/dark mode is switched 2025-04-13 00:08:11 +05:30
Ankit Mahato
218d9f2c66 Update splitview_drawer.dart 2025-04-12 22:50:23 +05:30
Nikhil
154e3580e5 fixing 2025-04-12 02:01:36 +05:30
Nikhil
793d3ebfdc Merge branch 'foss42:main' into resolve-issue-672 2025-04-11 07:26:17 +05:30
Ankit Mahato
b8cf1eeda8 Merge pull request #788 from badnikhil/resolve-issue-697
updated rust codegen
2025-04-10 04:46:54 +05:30