@nsshunt/stsuxvue 1.0.84 → 1.0.86
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/stsuxvue.cjs
CHANGED
|
@@ -12961,6 +12961,7 @@ class RESTClientSubscriber {
|
|
|
12961
12961
|
this.Subscribe(this.#currentSubscriptions);
|
|
12962
12962
|
};
|
|
12963
12963
|
async #InvokeRESTAPI(subscription) {
|
|
12964
|
+
this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#InvokeRESTAPI(): subscriptionKey: [${subscription.subscriptionKey.id}]`));
|
|
12964
12965
|
const { subscriptionKey } = subscription;
|
|
12965
12966
|
let url = "";
|
|
12966
12967
|
switch (subscriptionKey.topic) {
|
|
@@ -13049,6 +13050,7 @@ class RESTClientSubscriber {
|
|
|
13049
13050
|
}
|
|
13050
13051
|
return retVal.data;
|
|
13051
13052
|
} catch (error) {
|
|
13053
|
+
this.#LogErrorMessage(chalk.red(`RESTClientSubscriber:#InvokeRESTAPI(): subscriptionKey: [${subscription.subscriptionKey.id}], Error: [${error}]`));
|
|
13052
13054
|
return null;
|
|
13053
13055
|
}
|
|
13054
13056
|
} else {
|
|
@@ -13057,13 +13059,17 @@ class RESTClientSubscriber {
|
|
|
13057
13059
|
}
|
|
13058
13060
|
#GetData = async (subscription) => {
|
|
13059
13061
|
try {
|
|
13062
|
+
this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#GetData(): subscriptionKey: [${JSON.stringify(subscription.subscriptionKey)}`));
|
|
13060
13063
|
const retVal = await this.#InvokeRESTAPI(subscription);
|
|
13061
13064
|
if (retVal) {
|
|
13062
13065
|
const payload = {
|
|
13063
13066
|
subscriptionKey: subscription.subscriptionKey,
|
|
13064
13067
|
data: retVal
|
|
13065
13068
|
};
|
|
13069
|
+
this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#GetData(): data returned: subscriptionKey: [${JSON.stringify(subscription.subscriptionKey)}, retVal: [${JSON.stringify(retVal)}]`));
|
|
13066
13070
|
subscription.cb(payload);
|
|
13071
|
+
} else {
|
|
13072
|
+
this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#GetData(): No data returned: subscriptionKey: [${JSON.stringify(subscription.subscriptionKey)}`));
|
|
13067
13073
|
}
|
|
13068
13074
|
} catch (error) {
|
|
13069
13075
|
this.#LogErrorMessage(chalk.red(`RESTClientSubscriber:#AddKeepAlive(): Error response: [${JSON.stringify(error)}]`));
|
|
@@ -13093,12 +13099,14 @@ class RESTClientSubscriber {
|
|
|
13093
13099
|
}, timeout);
|
|
13094
13100
|
}
|
|
13095
13101
|
#AddKeepAlive(subscription) {
|
|
13102
|
+
this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#AddKeepAlive(): subscriptionKey: [${subscription.subscriptionKey.id}]`));
|
|
13096
13103
|
this.#RemoveKeepAlive(subscription);
|
|
13097
13104
|
const socketSubscribeKeepAlive = {
|
|
13098
13105
|
id: subscription.subscriptionKey.id
|
|
13099
13106
|
};
|
|
13100
13107
|
socketSubscribeKeepAlive.timeout = this.#SetupTimeout(socketSubscribeKeepAlive, subscription, this.#options.keepAlive ?? 1e3);
|
|
13101
13108
|
this.#socketSubscribeKeepAlive[subscription.subscriptionKey.id] = socketSubscribeKeepAlive;
|
|
13109
|
+
this.#LogDebugMessage(chalk.yellow(`RESTClientSubscriber:#AddKeepAlive(): Getting Data: subscriptionKey: [${subscription.subscriptionKey.id}]`));
|
|
13102
13110
|
this.#GetData(subscription);
|
|
13103
13111
|
}
|
|
13104
13112
|
#RemoveKeepAlive(subscription) {
|