http-request-manager 18.13.2 → 18.13.4
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.
|
@@ -906,6 +906,7 @@ const TRACKER_SESSION_INIT_KEY = 'query_params_tracker_initialized';
|
|
|
906
906
|
const DEFAULT_TRACKER_OPTIONS = SettingOptions.adapt({
|
|
907
907
|
storage: StorageType.GLOBAL,
|
|
908
908
|
encrypted: false,
|
|
909
|
+
expiresIn: '1d',
|
|
909
910
|
});
|
|
910
911
|
class QueryParamsTrackerService {
|
|
911
912
|
constructor() {
|
|
@@ -1155,7 +1156,6 @@ class QueryParamsTrackerService {
|
|
|
1155
1156
|
if (initialized === '1') {
|
|
1156
1157
|
return;
|
|
1157
1158
|
}
|
|
1158
|
-
this.clearTracking();
|
|
1159
1159
|
sessionStorage.setItem(TRACKER_SESSION_INIT_KEY, '1');
|
|
1160
1160
|
}
|
|
1161
1161
|
restoreState() {
|
|
@@ -1163,7 +1163,6 @@ class QueryParamsTrackerService {
|
|
|
1163
1163
|
.pipe(take(1))
|
|
1164
1164
|
.subscribe({
|
|
1165
1165
|
next: (storedState) => {
|
|
1166
|
-
// Don't overwrite in-memory state if we've already tracked paths
|
|
1167
1166
|
if (Object.keys(this.state.paths).length > 0) {
|
|
1168
1167
|
return;
|
|
1169
1168
|
}
|
|
@@ -2435,14 +2434,14 @@ class WebSocketManagerService {
|
|
|
2435
2434
|
content
|
|
2436
2435
|
};
|
|
2437
2436
|
// DEBUG: Log the exact message being sent
|
|
2438
|
-
console.log('🔍 [DEBUG] sendMessageInChannel:', {
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
});
|
|
2437
|
+
// console.log('🔍 [DEBUG] sendMessageInChannel:', {
|
|
2438
|
+
// channel,
|
|
2439
|
+
// channelType: typeof channel,
|
|
2440
|
+
// channelEmpty: channel === '' || channel === null || channel === undefined,
|
|
2441
|
+
// content,
|
|
2442
|
+
// fullMessage: message,
|
|
2443
|
+
// jsonString: JSON.stringify(message)
|
|
2444
|
+
// });
|
|
2446
2445
|
WebSocketManagerService.socket.send(JSON.stringify(message));
|
|
2447
2446
|
console.log(`💬 Send message:`, content);
|
|
2448
2447
|
}
|
|
@@ -7254,14 +7253,14 @@ class HTTPManagerStateService extends ComponentStore {
|
|
|
7254
7253
|
return this.httpManagerService.getRequest(requestOptions, effectiveParams).pipe(map((apiData) => ({ data: apiData, fromCache: false })));
|
|
7255
7254
|
})).pipe(tap((packet) => {
|
|
7256
7255
|
const res = packet?.data;
|
|
7257
|
-
console.log('[DEBUG] Streaming response received:', res)
|
|
7256
|
+
// console.log('[DEBUG] Streaming response received:', res)
|
|
7258
7257
|
if (res && res.length > 0) {
|
|
7259
|
-
console.log('[DEBUG] Updating state with streaming data:', res)
|
|
7258
|
+
// console.log('[DEBUG] Updating state with streaming data:', res)
|
|
7260
7259
|
this.setData$(res);
|
|
7261
7260
|
this.streamedResponse = res;
|
|
7262
7261
|
}
|
|
7263
7262
|
else {
|
|
7264
|
-
console.log('[DEBUG] No streaming data or empty array:', res)
|
|
7263
|
+
// console.log('[DEBUG] No streaming data or empty array:', res)
|
|
7265
7264
|
}
|
|
7266
7265
|
// Reset pending once we have a response packet (cache or network)
|
|
7267
7266
|
this.httpManagerService.isPending.next(false);
|
|
@@ -7271,33 +7270,33 @@ class HTTPManagerStateService extends ComponentStore {
|
|
|
7271
7270
|
}
|
|
7272
7271
|
return this.persistStreamDataToDb(packet?.data, options);
|
|
7273
7272
|
}), map((res) => {
|
|
7274
|
-
console.log('[DEBUG] Returning data to subscribers:', res)
|
|
7273
|
+
// console.log('[DEBUG] Returning data to subscribers:', res)
|
|
7275
7274
|
return res;
|
|
7276
7275
|
}), catchError((error) => {
|
|
7277
|
-
console.error('[DEBUG] Streaming error:', error)
|
|
7276
|
+
// console.error('[DEBUG] Streaming error:', error)
|
|
7278
7277
|
this.httpManagerService.isPending.next(false);
|
|
7279
7278
|
return of([]);
|
|
7280
7279
|
}));
|
|
7281
7280
|
}
|
|
7282
7281
|
return this.httpManagerService.getRequest(requestOptions, effectiveParams)
|
|
7283
7282
|
.pipe(tap((res) => {
|
|
7284
|
-
console.log('[DEBUG] Streaming response received:', res)
|
|
7283
|
+
// console.log('[DEBUG] Streaming response received:', res)
|
|
7285
7284
|
// Always update state with streaming data
|
|
7286
7285
|
if (res && res.length > 0) {
|
|
7287
|
-
console.log('[DEBUG] Updating state with streaming data:', res)
|
|
7286
|
+
// console.log('[DEBUG] Updating state with streaming data:', res)
|
|
7288
7287
|
this.setData$(res);
|
|
7289
7288
|
this.streamedResponse = res;
|
|
7290
7289
|
}
|
|
7291
7290
|
else {
|
|
7292
|
-
console.log('[DEBUG] No streaming data or empty array:', res)
|
|
7291
|
+
// console.log('[DEBUG] No streaming data or empty array:', res)
|
|
7293
7292
|
}
|
|
7294
7293
|
// Reset pending once we have a response packet
|
|
7295
7294
|
this.httpManagerService.isPending.next(false);
|
|
7296
7295
|
}), concatMap((res) => this.persistStreamDataToDb(res, options)), map((res) => {
|
|
7297
|
-
console.log('[DEBUG] Returning data to subscribers:', res)
|
|
7296
|
+
// console.log('[DEBUG] Returning data to subscribers:', res)
|
|
7298
7297
|
return res; // Return the data so subscribers can receive it
|
|
7299
7298
|
}), catchError((error) => {
|
|
7300
|
-
console.error('[DEBUG] Streaming error:', error)
|
|
7299
|
+
// console.error('[DEBUG] Streaming error:', error)
|
|
7301
7300
|
this.httpManagerService.isPending.next(false);
|
|
7302
7301
|
return of([]);
|
|
7303
7302
|
}));
|
|
@@ -7662,15 +7661,15 @@ class HTTPManagerStateService extends ComponentStore {
|
|
|
7662
7661
|
return;
|
|
7663
7662
|
}
|
|
7664
7663
|
// DEBUG: Log what we're sending
|
|
7665
|
-
console.log('🔍 [DEBUG] sendWsCommunication called:', {
|
|
7666
|
-
|
|
7667
|
-
|
|
7668
|
-
|
|
7669
|
-
|
|
7670
|
-
|
|
7671
|
-
|
|
7672
|
-
|
|
7673
|
-
});
|
|
7664
|
+
// console.log('🔍 [DEBUG] sendWsCommunication called:', {
|
|
7665
|
+
// wsServer,
|
|
7666
|
+
// wsServerType: typeof wsServer,
|
|
7667
|
+
// wsServerEmpty: wsServer === '' || wsServer === null || wsServer === undefined,
|
|
7668
|
+
// method,
|
|
7669
|
+
// path,
|
|
7670
|
+
// user: this.apiOptions.ws.user,
|
|
7671
|
+
// fullPayload: { method, path, user: this.apiOptions.ws.user }
|
|
7672
|
+
// });
|
|
7674
7673
|
this.httpManagerService.sendMessageInChannel(wsServer, { method, path, user: this.apiOptions.ws.user });
|
|
7675
7674
|
}
|
|
7676
7675
|
else {
|
|
@@ -7926,7 +7925,8 @@ class HTTPManagerStateService extends ComponentStore {
|
|
|
7926
7925
|
if (!this.hasDatabase || !this.databaseOptions?.table)
|
|
7927
7926
|
return;
|
|
7928
7927
|
const tableName = this.databaseOptions.table;
|
|
7929
|
-
this.dbManagerService.clearTable(tableName)
|
|
7928
|
+
this.dbManagerService.clearTable(tableName)
|
|
7929
|
+
.subscribe({
|
|
7930
7930
|
next: () => {
|
|
7931
7931
|
this.clearRequestCacheMetadata(tableName);
|
|
7932
7932
|
if (this.dataType === DataType.ARRAY) {
|