8000 Merge pull request #1416 from sarasfox/foxx-manger-updateDeps · msand/arangodb@979682b · GitHub
[go: up one dir, main page]

Skip to content

Commit 979682b

Browse files
committed
Merge pull request arangodb#1416 from sarasfox/foxx-manger-updateDeps
added updateDeps to foxx-manager.
2 parents 4eefaa6 + b4554d0 commit 979682b

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

js/client/modules/org/arangodb/foxx/manager.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ var help = function () {
150150
"available" : "lists all Foxx applications available in the local repository",
151151
"configuration" : "request the configuration information for the given mountpoint",
152152
"configure" : "sets the configuration for the given mountpoint",
153+
"updateDeps" : "links the dependencies in manifest to a mountpoint",
153154
"dependencies" : "request the dependencies information for the given mountpoint",
154155
"development" : "activates development mode for the given mountpoint",
155156
"help" : "shows this help",
@@ -477,7 +478,28 @@ var configuration = function(mount) {
477478
arangosh.checkRequestResult(res);
478479
return res;
479480
};
481+
////////////////////////////////////////////////////////////////////////////////
482+
/// @brief Link Dependencies to the installed mountpoint the app at the mountpoint
483+
////////////////////////////////////////////////////////////////////////////////
480484

485+
var updateDeps = function(mount, options) {
486+
checkParameter(
487+
"update(<mount>)",
488+
[ [ "Mount path", "string" ] ],
489+
[ mount ] );
490+
utils.validateMount(mount);
491+
var req = {
492+
mount: mount,
493+
options: options
494+
};
495+
var res = arango.POST("/_admin/foxx/updateDeps", JSON.stringify(req));
496+
arangosh.checkRequestResult(res);
497+
return {
498+
name: res.name,
499+
version: res.version,
500+
mount: res.mount
501+
};
502+
};
481503
////////////////////////////////////////////////////////////////////////////////
482504
/// @brief Configure the dependencies of the app at the mountpoint
483505
////////////////////////////////////////////////////////////////////////////////
@@ -668,6 +690,14 @@ var run = function (args) {
668690
res = configuration(args[1]);
669691
printf("Configuration options:\n%s\n", JSON.stringify(res, undefined, 2));
670692
break;
693+
case "updateDeps":
694+
options = extractOptions(args).configuration || {};
695+
res = updateDeps(args[1], options);
696+
printf("Reconfigured Application %s version %s on mount point %s\n",
697+
res.name,
698+
res.version,
699+
res.mount);
700+
break;
671701
case "set-dependencies":
672702
options = extractOptions(args).configuration || {};
673703
res = setDependencies(args[1], options);

0 commit comments

Comments
 (0)
0