Comments (8)
Closing this one, as a basic plugin system is underway, and future work will be done as smaller, separate tasks.
from insomnia.
How would be plugin associated with Insomnia app?
from insomnia.
@Andreyco If plugins are HTTP-based like the description states, I don't see any clear elegant solutions. If plugins were run as JS child processes it would be much easier.
Here are a few ideas I had so far:
- plugin contains manifest file which describes how to interact with it
- plugin adds itself by pinging the Insomnia app through a protocol request:
insomnia://plugins/add?...
Any other ideas?
from insomnia.
Is it possible to associate schema/file extension to Electron application? If so, plugin could be packed as archive of target type. When opened, it could be copied to Insomnia sandbox (or whatever Electron offers) and run after restart.
We should copy Chrome/Firefox behaviour here.
In my understanding, plugin should be able to register pre/post request hooks. Modify payload, or do whatever it needs get done.
Plugin should be able to:
- read/modify request payload
- read/modify response payload
- register UI elements in app
- set env variables
- set it's priority somehow (in case it's output should affect request - could be tricky)
- more?!
Also, there should be mechanism to run Insomnia without running plugins in case something breaks ;)
from insomnia.
@Andreyco I think it's an awesome idea to model this system after the way browsers do it.
Like Chrome's .crx
extension files, Insomnia could have a .insomnia
extension. The package format could be a simple zip file with the extension renamed.
There are ways to set an Electron app to open certain file extensions (I'm pretty sure), but they could also be added via an open dialog, drag-n-drop handler, or command line interface.
from insomnia.
I believe it can be a good idea to mimic not chrome by atom's plug-ins system http://flight-manual.atom.io/using-atom/sections/atom-packages/
It looks completely possible to store plug-ins remotely, besides that there are some extra pros:
- plug-in can have it own dependencies
- no need to implement a new file type and methods to work with it
I'll leave the link to atom package manager here for you to take a look https://github.com/atom/apm
from insomnia.
@ValeriaVG there is also https://hyper.is/ which piggy-backs on npm for plugins. That might be a good thing to start with.
After taking a peek, it looks like apm is just a small wrapper around npm.
from insomnia.
@gschier Yes, it's just a wrapper. And hyper looks promising at first sight. But how it will work with http - based plug-ins?
from insomnia.
Related Issues (20)
- Pressing enter/return while text is selected in the request URL bar causes the selected text to be deleted HOT 1
- How can I copy password or reveal password from window application if it showing "you cannot copy text from a password field" , HOT 1
- cannot disable rendering of request body
- The API Key is not added to the query parameters
- Pre-request Script command insomnia.request.url.removeQueryParams("foo") removes all parameters but the one named "foo" HOT 3
- Improve speed of the browser HOT 3
- Response preview adds whitespace to URL HOT 2
- GRPC not working with https HOT 5
- Plugin Template Tag runs on sync HOT 1
- Double backslash at end of Environment JSON key freezes entire app, corrupts collection
- Insomnia UI Alignment: Left Pane Horizontal Lines Misaligned With Rest of App HOT 1
- Application Error HOT 1
- 9.0.0 reversed folder/request order HOT 6
- Cannot open collections after last Insomnia updates on 24 April 2024 HOT 2
- Scratch Pad gone after update to 9 HOT 4
- Insomnia designer EnvironmentVariables do not get updated through Test tab
- Insomnia uses template URL for the request instead of the one, with the path parameter inside (Websocket).
- Application looks like 4k resolution on FullHD HOT 4
- Drag and drop request is not working properly under collection tab HOT 1
- insomniaFetch not respecting proxy settings HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from insomnia.