diff options
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/platform.js')
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/static/platform.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/platform.js b/packages/meshbay-hub/src/meshbay_hub/static/platform.js index 28817c7..e3b3d2d 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/platform.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/platform.js @@ -253,6 +253,16 @@ export const node = { return bridge.node.start(opts); }, /** + * After sign-in: set up, start and link the node this application ships, + * for the signed-in account ({username, token}). Leaves alone a node set up + * for another account and an account linked to another node. Resolves to + * `{ state }`; a build or platform with nothing to do answers 'unsupported'. + */ + async ensure(opts) { + if (!bridge || !bridge.node || !bridge.node.ensure) return { state: 'unsupported' }; + return bridge.node.ensure(opts); + }, + /** * One of the local node's operations, by name (`NODE_OPS` in the desktop * client's main.js). The page never names a route: the main process checks * the arguments, builds the request, and asks the person itself before |