@sinch/functions-runtime 0.6.2 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/sinch-runtime.js +71 -12
- package/dist/bin/sinch-runtime.js.map +1 -1
- package/dist/{chunk-W3R4GR3E.js → chunk-H2JZGXXT.js} +581 -385
- package/dist/chunk-H2JZGXXT.js.map +1 -0
- package/dist/index.d.ts +17 -2
- package/dist/index.js +1 -1
- package/dist/voice/v2.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-W3R4GR3E.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -5851,6 +5851,10 @@ export declare class TunnelClient {
|
|
|
5851
5851
|
private webhookConfig;
|
|
5852
5852
|
private welcomeResolver;
|
|
5853
5853
|
private streams;
|
|
5854
|
+
/** Set by disconnect(). A reconnect after it would repoint the webhooks cleanup restored. */
|
|
5855
|
+
private shuttingDown;
|
|
5856
|
+
/** The in-flight configureWebhooks(), so disconnect() can wait for it before restoring. */
|
|
5857
|
+
private configuring;
|
|
5854
5858
|
constructor(localPort?: number);
|
|
5855
5859
|
/** Sends one JSON message up the tunnel channel, if it is still connected. */
|
|
5856
5860
|
private sendMessage;
|
|
@@ -5861,7 +5865,8 @@ export declare class TunnelClient {
|
|
|
5861
5865
|
/**
|
|
5862
5866
|
* Build a full tunnel URL with optional sub-path and tunnel query param.
|
|
5863
5867
|
* e.g. buildTunnelUrl('/webhook/conversation') →
|
|
5864
|
-
* https://tunnel.fn.sinch.
|
|
5868
|
+
* https://tunnel.fn.sinch.io/ingress/webhook/conversation?tunnel=01KKT...
|
|
5869
|
+
* See ./url.ts for why the welcome URL's own query string is dropped.
|
|
5865
5870
|
*/
|
|
5866
5871
|
private buildTunnelUrl;
|
|
5867
5872
|
private handleWelcomeMessage;
|
|
@@ -5874,11 +5879,21 @@ export declare class TunnelClient {
|
|
|
5874
5879
|
*/
|
|
5875
5880
|
private configureWebhooks;
|
|
5876
5881
|
/**
|
|
5877
|
-
*
|
|
5882
|
+
* Restore every webhook the tunnel repointed. Run in parallel: this happens during
|
|
5883
|
+
* shutdown, under a timeout, and the two restores are independent.
|
|
5884
|
+
* The v1 application callback is still not restored (it was never saved).
|
|
5878
5885
|
*/
|
|
5879
5886
|
private cleanupWebhooks;
|
|
5880
5887
|
private configureVoiceWebhooks;
|
|
5881
5888
|
private scheduleReconnect;
|
|
5889
|
+
/**
|
|
5890
|
+
* Stop the tunnel and restore every webhook it repointed.
|
|
5891
|
+
*
|
|
5892
|
+
* Order matters (#102 review): stop reconnects and close the socket first, so no new
|
|
5893
|
+
* welcome can start another configure; then wait for any configure already in flight, so
|
|
5894
|
+
* a PATCH that lands late (Ctrl+C between its GET and its PATCH) cannot overwrite the
|
|
5895
|
+
* restore; only then restore.
|
|
5896
|
+
*/
|
|
5882
5897
|
disconnect(): Promise<void>;
|
|
5883
5898
|
getTunnelUrl(): string | null;
|
|
5884
5899
|
getIsConnected(): boolean;
|
package/dist/index.js
CHANGED
package/dist/voice/v2.js
CHANGED
package/package.json
CHANGED