Do not remove ExApp docker volume by default, deprecate old option
`keep-data`, add new `rm-data` to remove ExApp data.
---------
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
We forgot to change this in this PR:
https://github.com/cloud-py-api/app_api/pull/277
For Proxy requests there should be no timeout, cause they are coming
from user or external services and not from Nextcloud
Even if they will take a long time, Nextcloud instance will be not slow
down
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
This PR introduces new (mandatory if you use the ExApp proxy) registration of the routes that are allowed to call on ExApp via AppAPI ExApp proxy.
---------
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Co-authored-by: Alexander Piskun <13381981+bigcat88@users.noreply.github.com>
1. Will be required for future AI ExApps with scaling
2. Will be required for future ExApps with federated support
3. Requited by **WorkflowEngine project** at it's current stage
4. This will make developing of ExApps easier, as usual in
"manual"registration" we use different app version(constant "1.0.0")
---------
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Treat `PUT` with the same logic as `DELETE`
`$_POST` and `$_FILES` are always empty as PHP automatically does not
parse data during `PUT`
Just send raw request which we received to ExApp.
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
This PR made a few changes to ExApp proxy:
1. Fix Get requests proxy to preserve the url params
2. Add pass of cookies to the ExApp with request
3. Fixes Proxy work with multipart requests and files using separate
internal version of requestToExApp with slightly adjusted handling of
query and body params
4. Remove default caching for json requests
---------
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Co-authored-by: Alexander Piskun <13381981+bigcat88@users.noreply.github.com>
PR should not break anything, for old parts added a workarounds, that we
will remove in a month when all ExApps will publish their updates.
**Changes**:
* UI now use the same algorithm/code for ExApp `register` & `update` as
the CLI commands.
* Deprecated "deploy" command, now `register` commands performs deploy.
**Refactoring**:
* Removed internal `DispatchInit` command, as from CLI we already can do
it without spawning additional process.
* Removed hack(`status['active']`) when we have some half-enabled state
of ExApp when it is not enabled, but already can call APIs, now ExApp
enables before calling `/init`
* Made code more consistent in many place.
OTHER CHANGES FOR DEVS:
* For `--json-info` parameter in occ `register` command keys renamed:
"appid" -> "id", "system_app" -> "system"
_Old naming is still supported but will be removed in future, in such
way we make consistent parameters between `info.xml` and `--json-info`._
----
Related: #219
_AppAPI will perform deploy & registration in a background and issue
should be fixed_
---------
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Co-authored-by: Andrey Borysenko <andrey18106x@gmail.com>
Added `ALL` ApiScope to allow the use of OCS Apis that we have not yet
defined in the AppAPI.
---------
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Co-authored-by: Andrey Borysenko <andrey18106x@gmail.com>
Fixes: #122
1. Made sending the "init" request in a separate process
2. If "init" request fails with STATUS_NOT_IMPLEMENTED or
STATUS_NOT_FOUND sets the progress to 100
3. Added `wait-finish` optional parameter to `app_api:app:register` occ
command.
What is missing:
- [x] Global option: how long the "/init" request can be proceed.
- [x] Docs update for this
- [x] Update nc_py_api CI for this
- [x] Added test for registering ExApp that does not have "/init"
endpoint.
This allows to implement ExApp without "/init" endpoint and made it
optional.
---------
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Co-authored-by: Andrey Borysenko <andrey18106x@gmail.com>
Fixes#121
- small actions clean up
- added basic but very useful tests for "occ app_api:app:unregister"
Changes in behaviour:
- container of app is always removed
- volume with data is removed by default, but optionally can be kept
- app_api does not try to disable ExApp if it is already disabled
- "--silent" options now means "max silence as possible"
- added "--force" option to ignore errors if any.
---------
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>