-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from MAIF/plugins.json
Plugins.json
- Loading branch information
Showing
33 changed files
with
997 additions
and
846 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
# Collaborate | ||
|
||
Wasmo 1.2.2 brings a new feature to collaborate inside the product. You can work together on a plugin by sharing it with collaborators. It's easy to share plugins with your entire team. | ||
|
||
To share plugins from the UI: | ||
1. Click on the desired plugin | ||
2. Click the 🔗 button | ||
3. Write administrators and users emails in their respective lists | ||
|
||
<div style={{ display: 'flex', justifyContent: 'center', width: '100%', marginTop: '2rem' }}> | ||
<img src="/wasmo/collaborate.png" width={500} style={{ borderRadius: '.5rem' }} /> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Page from './page'; | ||
|
||
export const metadata = { | ||
title: 'Builder - UI', | ||
} | ||
|
||
export default Page; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
"use client" | ||
|
||
import Layout from '@/components/Layout'; | ||
import Page from './_page.mdx'; | ||
|
||
export default function Home() { | ||
|
||
return <Layout | ||
metadata={{ | ||
title: 'Wasmo - User Interface', | ||
href: '/builder/ui' | ||
}} | ||
previous={{ | ||
href: "/builder/plugin-structure", | ||
title: "Plugin structure" | ||
}} | ||
next={{ | ||
href: "/cli/ui", | ||
title: "User interface" | ||
}}> | ||
<Page /> | ||
</Layout> | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
import Badge from '../../components/Badge' | ||
import Badges from '../../components/Badges' | ||
import FAQButton from '../../components/FAQButton' | ||
|
||
# FAQ | ||
|
||
<FAQButton title="What is the fastest way to use Wasmo?" /> | ||
<FAQButton title="How to create an Otoroshi-compatible plugin using Docker?" /> | ||
<FAQButton title="How can I create a new development version of my plugin?" /> | ||
<FAQButton title="Can I download the generated Wasm from the UI?" /> | ||
<FAQButton title="Can I determine who built each version and at what time?" /> | ||
<FAQButton title="How to collaborate with my team ?" /> | ||
<FAQButton title="Our team have a CI/CD process and wants to automate the building of our plugins." /> | ||
<FAQButton title="How can I collaborate with my team?" /> | ||
|
||
### What is the fastest way to use Wasmo? | ||
|
||
``` | ||
$ cargo install wasmo | ||
or | ||
$ brew tap maif/wasmo | ||
$ brew install wasmo | ||
``` | ||
|
||
### How to create an Otoroshi-compatible plugin using Docker? | ||
<Badge raw value="Name : foo" default/> | ||
|
||
Initialize the plugin with corresponding Otoroshi template and Javascript language | ||
``` | ||
wasmo init --template=otoroshi_js --name=foo | ||
``` | ||
|
||
Build plugin from folder and Docker | ||
``` | ||
wasmo build --host=OneShotDocker --path=. | ||
``` | ||
|
||
### How can I create a new development version of my plugin? | ||
<Badges raw values={["Name : foo", "Version : 1.0.2"]} default/> | ||
|
||
Rust plugin | ||
|
||
``` Cargo.toml | ||
[package] | ||
name = "foo" | ||
version = "1.0.2" | ||
|
||
... | ||
``` | ||
|
||
JS/TS/Open Policy Agent plugin | ||
|
||
``` package.json | ||
{ | ||
"name": "foo", | ||
"version": "1.0.2", | ||
... | ||
} | ||
``` | ||
|
||
Go plugin | ||
|
||
``` go.mod | ||
module foo/1.0.2 | ||
... | ||
``` | ||
|
||
<div style={{ display: 'flex', justifyContent: 'center', width: '100%', marginTop: '2rem' }}> | ||
<img src="/wasmo/release.png" style={{ borderRadius: '.5rem', | ||
width: '230px', | ||
maxWidth: '230px', | ||
height: '503px', | ||
minHeight: '503px' | ||
}} /> | ||
|
||
<div className="flex flex-col ms-5"> | ||
### Can I download the generated Wasm from the UI? | ||
|
||
Once you have built a dev or release version of your plugin using the Hammer or Rocker buttons (available at the top right of the screen), | ||
you can click on each version under the 'Releases' section on the left side of the screen. | ||
|
||
### Can I determine who built each version and at what time? | ||
|
||
Each plugin has a **config** file under the **configuration** section with the following information : | ||
- type: language used to develop the plugin. | ||
- users: list of users allowed to edit and view the plugin. | ||
- admins: list of admins allowed to edit, view and share the plugin. | ||
- filename: name of the plugin. | ||
- pluginId: unique ID of the plugin. | ||
- template: original template, selected at plugin creation. | ||
- **versions: list of built versions, with name, creator and date of generation**. | ||
- last_hash: hash used by the backend to check if changes has been made between last version. | ||
</div> | ||
</div> | ||
|
||
### How can I collaborate with my team? | ||
|
||
Since version 1.22, Wasmo allows users to share plugins with two levels of rights: | ||
- `users`: Can edit and view plugin. | ||
- `admins`: Can edit, view and share plugin. | ||
|
||
You can find more information about sharing by reading this [article](/wasmo/builder/collaborate) | ||
|
||
### Our team have a CI/CD process and wants to automate the building of our plugins. | ||
|
||
Since version 1.x, Wasmo includes a command line interface to create, edit and build plugins. | ||
|
||
You can find more [information](/wasmo/cli/getting-started) about the CLI and the Github [repository](https://github.com/MAIF/wasmo/tree/main/cli) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Page from './page'; | ||
|
||
export const metadata = { | ||
title: 'FAQ', | ||
} | ||
|
||
export default Page; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
"use client" | ||
|
||
import Layout from '@/components/Layout'; | ||
import Page from './_page.mdx'; | ||
|
||
export default function Home() { | ||
|
||
return <Layout | ||
metadata={{ | ||
title: 'FAQ', | ||
href: '/cli/examples' | ||
}} | ||
next={{ | ||
href: "/builder/getting-started", | ||
title: "Builder - Getting started" | ||
}}> | ||
<Page /> | ||
</Layout> | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export default function Badge({ value, raw, ...props }) { | ||
return <div className={`inline-flex flex items-center ${props.default ? 'mb-3' : 'ms-3 mt-2 '}`} style={{ gap: '.5rem' }}> | ||
<span className="whitespace-nowrap rounded-full bg-purple-100 px-2.5 py-0.5 text-sm text-purple-700"> | ||
{!raw ? `<${value}>` : value} | ||
</span> | ||
</div> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export default function FAQButton({ title }) { | ||
return <button className="block btn border border-black p-2 w-4/5 text-start rounded-lg mb-3 flex items-center justify-between" type="button" | ||
onClick={() => { | ||
window.location.href = `/wasmo/faq#${title | ||
.toLowerCase() | ||
.replace(/[^a-z0-9 ]/g, '') | ||
.replace(/[ ]/g, '-')}` | ||
}}> | ||
<div className="items-center flex gap-2"> | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" width={24}> | ||
<path strokeLinecap="round" strokeLinejoin="round" d="m8.25 4.5 7.5 7.5-7.5 7.5" /> | ||
</svg> | ||
{title} | ||
</div> | ||
|
||
|
||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.25} stroke="currentColor" width={24}> | ||
<path strokeLinecap="round" strokeLinejoin="round" d="M15.042 21.672 13.684 16.6m0 0-2.51 2.225.569-9.47 5.227 7.917-3.286-.672ZM12 2.25V4.5m5.834.166-1.591 1.591M20.25 10.5H18M7.757 14.743l-1.59 1.59M6 10.5H3.75m4.007-4.243-1.59-1.59" /> | ||
</svg> | ||
</button> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.