You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`wasmo config set`|token|path|server | Globally configure the CLI with the authorization token, the path where the configuration file will be stored and the server to reach during the build. These parameters are optional and can be passed when running the build command. |
51
+
|`wasmo config set`|path|server|clientId | clientSecret | Globally configure the CLI with the path where the configuration file will be stored and the server to reach during the build. These parameters are optional and can be passed when running the build command. |
51
52
|`wasmo config get`|| Get the configuration from the configured path file or from `$HOME/.wasmo`|
52
53
|`wasmo config reset`|| Clean configuration and reset to default settings. The default file path configuration will be `$HOME/.wasmo`||
53
54
|`wasmo init`| template | name | path | Initialize a WASM plugin to the specific path. You can choose between many templates, javascript/typescript (js/ts), Open Policy Agent (opa), Rust or Golang (go). |
54
-
|`wasmo build`| path | host | server |token| Build the plugin by sending the contents to the remote or local Wasmo server. As soon as the build is complete, the WASM binary is donwloaded and saved in the plugin folder. |
55
+
|`wasmo build`| path | host | server |clientId | clientSecret| Build the plugin by sending the contents to the remote or local Wasmo server. As soon as the build is complete, the WASM binary is donwloaded and saved in the plugin folder. |
Then open the content of your `my-first-plugin` folder. You should find the generated WASM binary named `my-first-plugin-1.0.0.wasm`.
@@ -84,12 +85,11 @@ You have two ways to build your plugin:
84
85
85
86
[wasmoserver]: https://github.com/MAIF/wasmo
86
87
87
-
Assuming we want to build our `my-first-plugin` locally. Enter `wasmo build --host=OneShotDocker --path=my-first-plugin --token=foobar` to start the build.
88
+
Assuming we want to build our `my-first-plugin` locally. Enter `wasmo build --host=OneShotDocker --path=my-first-plugin` to start the build.
88
89
89
90
Let's explain these 3 parameters:
90
91
- the `path` parameter is explicitly used to indicate the plugin to build
91
92
- the `host` indicates which kind of Wasmo server used. The pratical way is to use `Docker` or `OneShotDocker` because it prevents to install a Wasmo server by deploying, inside your locally Docker, a new Wasmo container. The last possible value is `Remote` and can be used to specify with a URI the remote Wasmo server used.
92
-
- the `token` argument is passed to the Wasmo server to authenticate the CLI. It can also be set up in the [configuration file][#configure-your-configuration-file]
93
93
94
94
[](https://www.youtube.com/watch?v=NdbQR6vQ5Sk)
95
95
@@ -123,14 +123,12 @@ If value is omitted, then it sets it to an empty string.
123
123
The available keys are:
124
124
-`path`: configure the path where the wasmo configuration will be stored
125
125
-`server`: the Wasmo server to build your plugins (an URL format value is expected)
126
-
-`token`: the token, pass to the Wasmo server, to authenticate the CLI
127
-
-`docker_authorization`: the token value accepted by Docker instances
126
+
-`clientId`: the client id used in Basic and Otoroshi Auth
127
+
-`clientSecret`: the client secret used in Basic and Otoroshi Auth
128
128
129
129
You can also edit the configuration file manually. In this case, the following values are :
/// Globally configure the CLI with the authorization token, the path where the configuration file will be stored and the server to reach during the build. These parameters are optional and can be passed when running the build command.
159
+
/// Globally configure the CLI with the path where the configuration file will be stored and the server to reach during the build. These parameters are optional and can be passed when running the build command.
152
160
Config{
153
161
#[command(subcommand)]
154
162
command:ConfigCommands,
@@ -169,15 +177,6 @@ enum ConfigCommands {
169
177
170
178
)]
171
179
path:Option<String>,
172
-
/// The token access, used to authenticate the calls to the server
173
-
#[arg(
174
-
value_name = "TOKEN",
175
-
short = 't',
176
-
long = "token",
177
-
help = "The token access, used to authenticate the calls to the server",
178
-
required = false
179
-
)]
180
-
token:Option<String>,
181
180
/// The remote server to build your plugins
182
181
#[arg(
183
182
value_name = "SERVER",
@@ -187,16 +186,20 @@ enum ConfigCommands {
187
186
required = false
188
187
)]
189
188
server:Option<String>,
190
-
/// The cli authorization send to the remote or local builder
189
+
/// client id
191
190
#[arg(
192
-
value_name = "DOCKER_AUTHORIZATION",
193
-
short = 'd',
194
-
long = "docker_authorization",
195
-
help = "The token expected by the docker wasmo container when building. The default value is foobar",
0 commit comments