@syncbridge/ngrok 0.4.18 → 0.4.20
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.
|
@@ -12,6 +12,7 @@ export declare class NgrokTcpClientComponent<TEvents extends NgrokTcpClientCompo
|
|
|
12
12
|
protected _reconnectTimer?: NodeJS.Timeout;
|
|
13
13
|
values: NgrokTcpClientVariables;
|
|
14
14
|
get connected(): boolean;
|
|
15
|
+
protected _init(): Promise<void>;
|
|
15
16
|
protected _start(abortSignal: AbortSignal): Promise<void>;
|
|
16
17
|
protected _stop(): Promise<void>;
|
|
17
18
|
write(data: string | Buffer): void;
|
|
@@ -17,6 +17,18 @@ let NgrokTcpClientComponent = class NgrokTcpClientComponent extends IoClientBase
|
|
|
17
17
|
get connected() {
|
|
18
18
|
return !!this._socket;
|
|
19
19
|
}
|
|
20
|
+
async _init() {
|
|
21
|
+
await super._init();
|
|
22
|
+
this.on('values-updated', async () => {
|
|
23
|
+
const isStopped = this.stopped;
|
|
24
|
+
await this._stop();
|
|
25
|
+
if (!isStopped) {
|
|
26
|
+
await this._start(new AbortController().signal).catch(err => {
|
|
27
|
+
this.setStatus(ServiceStatus.unhealthy, err.message);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
20
32
|
async _start(abortSignal) {
|
|
21
33
|
await super._start(abortSignal);
|
|
22
34
|
this._stopping = false;
|
|
@@ -12,6 +12,7 @@ __decorate([
|
|
|
12
12
|
type: VariableType.Secret,
|
|
13
13
|
description: 'Ngrok auth token',
|
|
14
14
|
required: true,
|
|
15
|
+
hotPlug: true,
|
|
15
16
|
}),
|
|
16
17
|
__metadata("design:type", String)
|
|
17
18
|
], NgrokTcpClientVariables.prototype, "authToken", void 0);
|
|
@@ -20,6 +21,7 @@ __decorate([
|
|
|
20
21
|
label: 'Local Port',
|
|
21
22
|
description: 'Local port number which ngrok process connection to be served. If not set, a port number will be automatically selected',
|
|
22
23
|
default: 0,
|
|
24
|
+
hotPlug: true,
|
|
23
25
|
}),
|
|
24
26
|
__metadata("design:type", Number)
|
|
25
27
|
], NgrokTcpClientVariables.prototype, "localPort", void 0);
|
package/constants.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncbridge/ngrok",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.20",
|
|
4
4
|
"description": "SyncBridge Ngrok component",
|
|
5
5
|
"author": "Panates Inc",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"node-events-async": "^1.5.0"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@syncbridge/common": "^0.
|
|
15
|
-
"@syncbridge/builtins": "^0.4.
|
|
14
|
+
"@syncbridge/common": "^0.6.0",
|
|
15
|
+
"@syncbridge/builtins": "^0.4.20"
|
|
16
16
|
},
|
|
17
17
|
"exports": {
|
|
18
18
|
".": {
|