Giter VIP home page Giter VIP logo

Comments (8)

gschier avatar gschier commented on May 22, 2024 2

Closing this one, as a basic plugin system is underway, and future work will be done as smaller, separate tasks.

from insomnia.

Andreyco avatar Andreyco commented on May 22, 2024

How would be plugin associated with Insomnia app?

from insomnia.

gschier avatar gschier commented on May 22, 2024

@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.

Andreyco avatar Andreyco commented on May 22, 2024

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.

gschier avatar gschier commented on May 22, 2024

@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.

ValeriaVG avatar ValeriaVG commented on May 22, 2024

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.

gschier avatar gschier commented on May 22, 2024

@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.

ValeriaVG avatar ValeriaVG commented on May 22, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.