From e1e373cd525358f3524e275724021c7afdba5ce7 Mon Sep 17 00:00:00 2001 From: Mykola Bilochub Date: Sat, 9 Feb 2019 16:48:39 +0200 Subject: [PATCH] fixup! docs: use mkdocs for documentation --- doc/api/client.md | 8 ++++++-- doc/api/connection.md | 2 +- doc/api/net.md | 14 +++++++++++--- doc/api/tls.md | 14 +++++++++++--- doc/api/ws-browser.md | 14 +++++++++++--- doc/api/ws.md | 14 +++++++++++--- 6 files changed, 51 insertions(+), 15 deletions(-) diff --git a/doc/api/client.md b/doc/api/client.md index 0f99271a..9364e95a 100644 --- a/doc/api/client.md +++ b/doc/api/client.md @@ -1,6 +1,6 @@ # Client -## Object: jstp.Client +## Interface: jstp.Client Client object is used to specify client-side connection behavior. @@ -34,6 +34,9 @@ having the same signature. Client-side application instance to be exposed over connection. +If this field is not set, an [`Application`][application] `jstp@1.0.0` with an +empty `api` is used. + ### client.heartbeatInterval - [``][number] @@ -44,7 +47,8 @@ Setting this field enables heartbeat. - [``][session] -Setting this field leads to reconnection to the session. +Setting this field results in using the `'session'` authentication strategy +when connecting, which can be used to reconnect to the existing session. ### client.logger diff --git a/doc/api/connection.md b/doc/api/connection.md index c8cb2768..dda5c75a 100644 --- a/doc/api/connection.md +++ b/doc/api/connection.md @@ -264,7 +264,7 @@ May be [`null`][null] if connection was established without logging in. [application]: ./application.md#class-jstpapplication [transport]: ./transport.md [server]: ./server.md -[client]: ./client.md#object-jstpclient +[client]: ./client.md#interface-jstpclient [session]: ./session.md [remoteerror]: ./errors.md#class-jstpremoteerror [remoteproxy]: ./remote-proxy.md diff --git a/doc/api/net.md b/doc/api/net.md index 5ee77768..1dae0c8a 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -7,7 +7,9 @@ - `app` [``][string] | [``][object] Application to connect to as `'name'` or `'name@version'` or `{ name, version }`, where version must be a valid semver range. -- `client` [``][client] +- `client` [``][client] | [``][null] Optional, when omitted, an + object with the default values for [`application`][clientapp], + [`connectPolicy`][clientcp] and [`reconnector`][clientreconnector] is used. - `...args` `` Arguments passed directly to [`net.connect()`][netconnect] (except for `connectListener`) - `callback` [``][function] @@ -19,7 +21,9 @@ - `app` [``][string] | [``][object] Application to connect to as `'name'` or `'name@version'` or `{ name, version }`, where version must be a valid semver range. -- `client` [``][client] +- `client` [``][client] | [``][null] Optional, when omitted, an + object with the default values for [`application`][clientapp], + [`connectPolicy`][clientcp] and [`reconnector`][clientreconnector] is used. - `interfaces` [``][string] Interface names to perform inspect on. - `...args` `` Arguments passed directly to [`net.connect()`][netconnect] (except for `connectListener`). @@ -89,7 +93,10 @@ options, using any other strategy will result in [application]: ./application.md#class-jstpapplication [authpolicy]: ./auth-policy.md -[client]: ./client.md#object-jstpclient +[client]: ./client.md#interface-jstpclient +[clientapp]: ./client.md#clientapplication +[clientcp]: ./client.md#clientconnectpolicyapplication-connection91-session93-callback +[clientreconnector]: ./client.md#clientreconnectorconnection-reconnectfn [connection]: ./connection.md#class-jstpconnection [createappindex]: ./application.md#jstpcreateappsindexapplications [ssp]: ./session-storage-provider.md#interface-jstpsessionstorageprovider @@ -106,3 +113,4 @@ options, using any other strategy will result in [error]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error [function]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function [map]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map +[null]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type diff --git a/doc/api/tls.md b/doc/api/tls.md index f77c5d8d..a19cf2e9 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -7,7 +7,9 @@ - `app` [``][string] | [``][object] Application to connect to as `'name'` or `'name@version'` or `{ name, version }`, where version must be a valid semver range. -- `client` [``][client] +- `client` [``][client] | [``][null] Optional, when omitted, an + object with the default values for [`application`][clientapp], + [`connectPolicy`][clientcp] and [`reconnector`][clientreconnector] is used. - `...args` `` Arguments passed directly to [`tls.connect()`][tlsconnect] (except for `callback`) - `callback` [``][function] @@ -19,7 +21,9 @@ - `app` [``][string] | [``][object] Application to connect to as `'name'` or `'name@version'` or `{ name, version }`, where version must be a valid semver range. -- `client` [``][client] +- `client` [``][client] | [``][null] Optional, when omitted, an + object with the default values for [`application`][clientapp], + [`connectPolicy`][clientcp] and [`reconnector`][clientreconnector] is used. - `interfaces` [``][string] Interface names to perform inspect on. - `...args` `` Arguments passed directly to [`tls.connect()`][tlsconnect] (except for `callback`) @@ -70,7 +74,10 @@ For more details see [`jstp.net.createServer()`][jstpnetserver] [application]: ./application.md#class-jstpapplication [authpolicy]: ./auth-policy.md -[client]: ./client.md#object-jstpclient +[client]: ./client.md#interface-jstpclient +[clientapp]: ./client.md#clientapplication +[clientcp]: ./client.md#clientconnectpolicyapplication-connection91-session93-callback +[clientreconnector]: ./client.md#clientreconnectorconnection-reconnectfn [connection]: ./connection.md#class-jstpconnection [createappindex]: ./application.md#jstpcreateappsindexapplications [ssp]: ./session-storage-provider.md#interface-jstpsessionstorageprovider @@ -88,3 +95,4 @@ For more details see [`jstp.net.createServer()`][jstpnetserver] [error]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error [function]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function [map]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map +[null]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type diff --git a/doc/api/ws-browser.md b/doc/api/ws-browser.md index fa344d94..03bbe890 100644 --- a/doc/api/ws-browser.md +++ b/doc/api/ws-browser.md @@ -10,7 +10,9 @@ browser. - `app` [``][string] | [``][object] Application to connect to as `'name'` or `'name@version'` or `{ name, version }`, where version must be a valid semver range. -- `client` [``][client] +- `client` [``][client] | [``][null] Optional, when omitted, an + object with the default values for [`application`][clientapp], + [`connectPolicy`][clientcp] and [`reconnector`][clientreconnector] is used. - `url` [``][string] - `callback` [``][function] - `error`: [``][error] @@ -21,7 +23,9 @@ browser. - `app` [``][string] | [``][object] Application to connect to as `'name'` or `'name@version'` or `{ name, version }`, where version must be a valid semver range. -- `client` [``][client] +- `client` [``][client] | [``][null] Optional, when omitted, an + object with the default values for [`application`][clientapp], + [`connectPolicy`][clientcp] and [`reconnector`][clientreconnector] is used. - `interfaces` [``][string] Interface names to perform inspect on. - `url` [``][string] - `callback` [``][function] @@ -42,7 +46,10 @@ For more details see [`jstp.net.connectAndInspect()`][jstpnetconnectinspect]. For more details see [`jstp.net.reconnect()`][jstpnetreconnect]. -[client]: ./client.md#object-jstpclient +[client]: ./client.md#interface-jstpclient +[clientapp]: ./client.md#clientapplication +[clientcp]: ./client.md#clientconnectpolicyapplication-connection91-session93-callback +[clientreconnector]: ./client.md#clientreconnectorconnection-reconnectfn [connection]: ./connection.md#class-jstpconnection [remoteproxy]: ./remote-proxy.md#class-jstpremoteproxy [jstpnetconnectinspect]: ./net.md#jstpnetconnectandinspectapp-client-interfaces-args-callback @@ -52,3 +59,4 @@ For more details see [`jstp.net.reconnect()`][jstpnetreconnect]. [object]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object [error]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error [function]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function +[null]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type diff --git a/doc/api/ws.md b/doc/api/ws.md index 16c7fc87..24bd43b9 100644 --- a/doc/api/ws.md +++ b/doc/api/ws.md @@ -7,7 +7,9 @@ - `app` [``][string] | [``][object] Application to connect to as `'name'` or `'name@version'` or `{ name, version }`, where version must be a valid semver range. -- `client` [``][client] +- `client` [``][client] | [``][null] Optional, when omitted, an + object with the default values for [`application`][clientapp], + [`connectPolicy`][clientcp] and [`reconnector`][clientreconnector] is used. - `webSocketConfig` [``][wsclientconfig] - `requestUrl` [``][string] | [``][url] - `callback` [``][function] @@ -19,7 +21,9 @@ - `app` [``][string] | [``][object] Application to connect to as `'name'` or `'name@version'` or `{ name, version }`, where version must be a valid semver range. -- `client` [``][client] +- `client` [``][client] | [``][null] Optional, when omitted, an + object with the default values for [`application`][clientapp], + [`connectPolicy`][clientcp] and [`reconnector`][clientreconnector] is used. - `interfaces` [``][string] Interface names to perform inspect on. - `webSocketConfig` [``][wsclientconfig] - `requestUrl` [``][string] | [``][url] @@ -73,7 +77,10 @@ For more details see [`jstp.net.createServer()`][jstpnetserver] [application]: ./application.md#class-jstpapplication [authpolicy]: ./auth-policy.md -[client]: ./client.md#object-jstpclient +[client]: ./client.md#interface-jstpclient +[clientapp]: ./client.md#clientapplication +[clientcp]: ./client.md#clientconnectpolicyapplication-connection91-session93-callback +[clientreconnector]: ./client.md#clientreconnectorconnection-reconnectfn [connection]: ./connection.md#class-jstpconnection [createappindex]: ./application.md#jstpcreateappsindexapplications [ssp]: ./session-storage-provider.md#interface-jstpsessionstorageprovider @@ -92,3 +99,4 @@ For more details see [`jstp.net.createServer()`][jstpnetserver] [function]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function [map]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map [wsclientconfig]: https://github.com/theturtle32/WebSocket-Node/blob/master/docs/WebSocketClient.md#client-config-options +[null]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type