@fluxhub/fluxhub-lib 21.0.5 → 21.0.6

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.
@@ -170,6 +170,65 @@ function fhHandledError() {
170
170
  function fhIsHandled(err) {
171
171
  return !!err?.fhHandled;
172
172
  }
173
+ /**
174
+ * Impostazioni comuni per Sentry.init dei portali (Rustrak): rumore da scartare e pulizia
175
+ * dei breadcrumb. Unica fonte per tutti i portali: una voce nuova si aggiunge qui e arriva
176
+ * a tutti con l'aggiornamento della libreria. Uso nel monitoring.ts del portale:
177
+ * Sentry.init({ dsn, release, ..., ...FH_MONITORING_DEFAULTS })
178
+ * Tipi volutamente generici: la libreria non dipende dall'SDK di Sentry.
179
+ * Rumore individuato analizzando le issue di tutti i portali il 21/10/2026.
180
+ */
181
+ const FH_MONITORING_IGNORE_ERRORS = [
182
+ 'ResizeObserver loop',
183
+ 'NG0100',
184
+ // sessione scaduta: l'interceptor fa logout e rilancia l'errore alle richieste in coda
185
+ 'Refresh token non valido',
186
+ 'SESSIONE SCADUTA',
187
+ // file JS della versione precedente spariti dopo una pubblicazione
188
+ 'ChunkLoadError',
189
+ /Loading chunk [\w-]+ failed/,
190
+ 'Failed to fetch dynamically imported module',
191
+ 'Importing a module script failed',
192
+ // copia di un 5xx che la libreria ha gia' segnalato come "HTTP 5xx /endpoint CHIAVE"
193
+ /^Server returned code \d+ with body/,
194
+ ];
195
+ /** Scarta un evento gia' segnalato o non azionabile; raggruppa i backend non raggiungibili. */
196
+ function fhMonitoringBeforeSend(event, hint) {
197
+ const ex = hint?.originalException;
198
+ // KO dei servizi dati rilanciato dopo essere stato mostrato e segnalato
199
+ if (fhIsHandled(ex))
200
+ return null;
201
+ // chiamata HTTP senza gestore d'errore arrivata all'ErrorHandler: 0 = rete assente o
202
+ // richiesta interrotta dal cambio pagina, 401 = sessione scaduta (li scarta anche fhHttpErrorReport)
203
+ if (ex instanceof HttpErrorResponse && (ex.status === 0 || ex.status === 401))
204
+ return null;
205
+ // backend giu' o in riavvio: una issue per portale e status, non una per chiave di query
206
+ const msg = String(event?.message || event?.exception?.values?.[0]?.value || '');
207
+ const gw = /^HTTP (502|503|504) /.exec(msg);
208
+ if (gw && event)
209
+ event.fingerprint = ['fh-gateway', gw[1]];
210
+ return event;
211
+ }
212
+ /**
213
+ * Breadcrumb: i console.log dei portali stampano record interi (anche utenti con password),
214
+ * quindi dei log di console restano solo warning ed errori, senza argomenti; via anche il
215
+ * banner di licenza di AG Grid, che riempie la coda.
216
+ */
217
+ function fhMonitoringBeforeBreadcrumb(b) {
218
+ if (!b || b.category !== 'console')
219
+ return b;
220
+ if (b.level !== 'warning' && b.level !== 'error')
221
+ return null;
222
+ if (/AG Grid/i.test(String(b.message || '')) && /licen/i.test(String(b.message || '')))
223
+ return null;
224
+ delete b.data;
225
+ return b;
226
+ }
227
+ const FH_MONITORING_DEFAULTS = {
228
+ ignoreErrors: FH_MONITORING_IGNORE_ERRORS,
229
+ beforeSend: fhMonitoringBeforeSend,
230
+ beforeBreadcrumb: fhMonitoringBeforeBreadcrumb,
231
+ };
173
232
 
174
233
  class QGResult {
175
234
  result_msg = '';
@@ -36448,5 +36507,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
36448
36507
  * Generated bundle index. Do not edit.
36449
36508
  */
36450
36509
 
36451
- export { AppMakerService, AppService, ApprovaGridComponent, AuthHttpRequestInterceptor, AuthenticationService, CheckboxEditorComponent, ComboBoxEditorComponent, CurrencyComponent, FHAutoCompleteComponent, FHCheckBoxComponent, FHColorPickerComponent, FHComboboxComponent, FHConfirmValues, FHCurrencyFormatterDirective, FHCurrencyPipe, FHDatePickerComponent, FHDateRangePickerComponent, FHFieldPickListComponent, FHFilterComboboxComponent, FHFormBuilderComponent, FHFormExecuterComponent, FHFormToolBarComponent, FHGridComponent, FHGridJSONComponent, FHGridToolBarComponent, FHGuard, FHHelpButtonComponent, FHImageViewerComponent, FHListComponent, FHLogPanelComponent, FHMultiComboboxComponent, FHNotesPanelComponent, FHNumericFieldComponent, FHPickFieldComponent, FHPickUsersComponent, FHRichTextComponent, FHRoleManagerComponent, FHTableManagerComponent, FHTextAreaComponent, FHTextInputComponent, FHTimePickerComponent, FHUploadComponent, FHUploadPanelComponent, FHUploadPanelS3Component, FHUploadS3Component, FHUserFieldComponent, FHWinAppLogsComponent, FHWinAskBigTextComponent, FHWinAskButtonsComponent, FHWinAskNumberComponent, FHWinAskRichTextComponent, FHWinAskTextComponent, FHWinAutoComplete, FHWinComboComponent, FHWinConfirmComponent, FHWinErrorComponent, FHWinGridSelection, FHWinInfoComponent, FHWinListComponent, FHWinMappaComponent, FHWinOutputComponent, FHWinPicklistComponent, FHWinSalvaAnnulla, FHWinSelectByGridComponent, FHWinShowEmail, FHWinShowEmailS3, FHWinShowImage, FHWinShowLog, FHWinShowLogDett, FHWinTimeSlider, FHWinUploadComponent, FHWinUserInfo, FHWinUserPickerComponent, FHWinWaitComponent, FHWorkflowForm, FHWorkflowHeaderBar, FHWorkflowView, FH_ERROR_REPORTER, FH_EVENT_ID_HEADER, FH_ROUTE_HEADER, FSInput, FSResult, FileService, GridService, LocalDBService, MonthYearPickerComponent, NumericEditorComponent, OdbcService, OfficeAutomatorService, OfficeOperation, OfficeResult, QGParam, QGResult, QParam, QResult, QueryOpenService, QueryService, RegistrationService, ReplaceLineBreaks, SafePipe, TextAreaEditorComponent, UtilityService, WkfService, YearPickerComponent, fhHandledError, fhIsHandled };
36510
+ export { AppMakerService, AppService, ApprovaGridComponent, AuthHttpRequestInterceptor, AuthenticationService, CheckboxEditorComponent, ComboBoxEditorComponent, CurrencyComponent, FHAutoCompleteComponent, FHCheckBoxComponent, FHColorPickerComponent, FHComboboxComponent, FHConfirmValues, FHCurrencyFormatterDirective, FHCurrencyPipe, FHDatePickerComponent, FHDateRangePickerComponent, FHFieldPickListComponent, FHFilterComboboxComponent, FHFormBuilderComponent, FHFormExecuterComponent, FHFormToolBarComponent, FHGridComponent, FHGridJSONComponent, FHGridToolBarComponent, FHGuard, FHHelpButtonComponent, FHImageViewerComponent, FHListComponent, FHLogPanelComponent, FHMultiComboboxComponent, FHNotesPanelComponent, FHNumericFieldComponent, FHPickFieldComponent, FHPickUsersComponent, FHRichTextComponent, FHRoleManagerComponent, FHTableManagerComponent, FHTextAreaComponent, FHTextInputComponent, FHTimePickerComponent, FHUploadComponent, FHUploadPanelComponent, FHUploadPanelS3Component, FHUploadS3Component, FHUserFieldComponent, FHWinAppLogsComponent, FHWinAskBigTextComponent, FHWinAskButtonsComponent, FHWinAskNumberComponent, FHWinAskRichTextComponent, FHWinAskTextComponent, FHWinAutoComplete, FHWinComboComponent, FHWinConfirmComponent, FHWinErrorComponent, FHWinGridSelection, FHWinInfoComponent, FHWinListComponent, FHWinMappaComponent, FHWinOutputComponent, FHWinPicklistComponent, FHWinSalvaAnnulla, FHWinSelectByGridComponent, FHWinShowEmail, FHWinShowEmailS3, FHWinShowImage, FHWinShowLog, FHWinShowLogDett, FHWinTimeSlider, FHWinUploadComponent, FHWinUserInfo, FHWinUserPickerComponent, FHWinWaitComponent, FHWorkflowForm, FHWorkflowHeaderBar, FHWorkflowView, FH_ERROR_REPORTER, FH_EVENT_ID_HEADER, FH_MONITORING_DEFAULTS, FH_MONITORING_IGNORE_ERRORS, FH_ROUTE_HEADER, FSInput, FSResult, FileService, GridService, LocalDBService, MonthYearPickerComponent, NumericEditorComponent, OdbcService, OfficeAutomatorService, OfficeOperation, OfficeResult, QGParam, QGResult, QParam, QResult, QueryOpenService, QueryService, RegistrationService, ReplaceLineBreaks, SafePipe, TextAreaEditorComponent, UtilityService, WkfService, YearPickerComponent, fhHandledError, fhIsHandled, fhMonitoringBeforeBreadcrumb, fhMonitoringBeforeSend };
36452
36511
  //# sourceMappingURL=fluxhub-fluxhub-lib.mjs.map