@oneuptime/common 14.0.110 → 14.2.0
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/Models/DatabaseModels/AIRunRecording.d.mts +12 -0
- package/Models/DatabaseModels/AIRunRecording.d.ts +12 -0
- package/Models/DatabaseModels/AIRunRecording.js +181 -0
- package/Models/DatabaseModels/AIRunRecording.mjs +2 -0
- package/Models/DatabaseModels/Alert.d.mts +1 -0
- package/Models/DatabaseModels/Alert.d.ts +1 -0
- package/Models/DatabaseModels/Alert.js +52 -2
- package/Models/DatabaseModels/AutoRemediationSuggestion.d.mts +2 -0
- package/Models/DatabaseModels/AutoRemediationSuggestion.d.ts +2 -0
- package/Models/DatabaseModels/AutoRemediationSuggestion.js +62 -0
- package/Models/DatabaseModels/DataStore.js +9 -0
- package/Models/DatabaseModels/EmailLog.js +2 -2
- package/Models/DatabaseModels/Form.js +3 -3
- package/Models/DatabaseModels/FormSubmission.js +4 -4
- package/Models/DatabaseModels/GlobalConfig.js +46 -45
- package/Models/DatabaseModels/Incident.d.mts +1 -0
- package/Models/DatabaseModels/Incident.d.ts +1 -0
- package/Models/DatabaseModels/Incident.js +53 -2
- package/Models/DatabaseModels/IncidentPostmortemActionItem.d.mts +31 -0
- package/Models/DatabaseModels/IncidentPostmortemActionItem.d.ts +31 -0
- package/Models/DatabaseModels/IncidentPostmortemActionItem.js +591 -0
- package/Models/DatabaseModels/IncidentPostmortemActionItem.mjs +3 -0
- package/Models/DatabaseModels/IncidentSlaRule.js +2 -2
- package/Models/DatabaseModels/Index.js +6 -0
- package/Models/DatabaseModels/InventoryItem.js +11 -0
- package/Models/DatabaseModels/Monitor.js +51 -17
- package/Models/DatabaseModels/MonitorNetworkDevice.d.mts +11 -0
- package/Models/DatabaseModels/MonitorNetworkDevice.d.ts +11 -0
- package/Models/DatabaseModels/MonitorNetworkDevice.js +189 -0
- package/Models/DatabaseModels/MonitorNetworkDevice.mjs +2 -0
- package/Models/DatabaseModels/MonitorProbe.js +22 -5
- package/Models/DatabaseModels/NetworkDevice.js +23 -7
- package/Models/DatabaseModels/NetworkEndpoint.d.mts +1 -0
- package/Models/DatabaseModels/NetworkEndpoint.d.ts +1 -0
- package/Models/DatabaseModels/NetworkEndpoint.js +39 -7
- package/Models/DatabaseModels/NetworkInterface.js +5 -5
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +19 -5
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.mts +1 -0
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.d.ts +1 -0
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.js +2 -0
- package/Models/DatabaseModels/OnCallDutyPolicyUserOverride.js +35 -7
- package/Models/DatabaseModels/OpenStackCloudCheck.js +8 -1
- package/Models/DatabaseModels/Project.d.mts +1 -0
- package/Models/DatabaseModels/Project.d.ts +1 -0
- package/Models/DatabaseModels/Project.js +46 -3
- package/Models/DatabaseModels/ProjectCallSMSConfig.js +3 -1
- package/Models/DatabaseModels/ProjectSmtpConfig.js +2 -0
- package/Models/DatabaseModels/PublicNoteApprovalRequest.js +3 -3
- package/Models/DatabaseModels/PublicNoteApprovalStep.js +1 -1
- package/Models/DatabaseModels/RunbookExecution.js +2 -2
- package/Models/DatabaseModels/RunbookRule.js +6 -6
- package/Models/DatabaseModels/ScheduledMaintenance.js +3 -3
- package/Models/DatabaseModels/ScheduledMaintenanceCalendarFeed.js +1 -1
- package/Models/DatabaseModels/ScheduledMaintenanceLabelRule.js +1 -1
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurement.js +7 -7
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js +1 -1
- package/Models/DatabaseModels/ScheduledMaintenanceOwnerRule.js +6 -6
- package/Models/DatabaseModels/ScheduledMaintenanceOwnerTeam.js +4 -4
- package/Models/DatabaseModels/ScheduledMaintenanceOwnerUser.js +4 -4
- package/Models/DatabaseModels/ScheduledMaintenancePublicNote.js +3 -3
- package/Models/DatabaseModels/ScheduledMaintenanceReminderRule.js +4 -4
- package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +3 -3
- package/Models/DatabaseModels/ScheduledMaintenanceTemplate.js +5 -5
- package/Models/DatabaseModels/TeamMember.js +10 -1
- package/Models/DatabaseModels/TelemetryIngestionKey.js +1 -1
- package/Models/DatabaseModels/WorkspaceNotificationRule.js +36 -1
- package/Models/DatabaseModels/WorkspaceNotificationSummary.js +1 -1
- package/Models/DatabaseModels/WorkspacePublicNoteApprovalMessage.js +3 -3
- package/Server/Services/DatabaseService.d.mts +4 -1
- package/Server/Services/DatabaseService.d.ts +4 -1
- package/Server/Types/Database/CountBy.d.mts +1 -0
- package/Server/Types/Database/CountBy.d.ts +1 -0
- package/Server/Types/Database/UpdateLimit.d.mts +6 -0
- package/Server/Types/Database/UpdateLimit.d.ts +6 -0
- package/Types/AI/AIActionWords.d.mts +28 -2
- package/Types/AI/AIActionWords.d.ts +28 -2
- package/Types/AI/AIActionWords.js +235 -3
- package/Types/AI/AIActionWords.mjs +8 -0
- package/Types/AI/AIChatTypes.d.mts +3 -1
- package/Types/AI/AIChatTypes.d.ts +3 -1
- package/Types/AI/AIReadTableWords.d.mts +192 -0
- package/Types/AI/AIReadTableWords.d.ts +192 -0
- package/Types/AI/AIReadTableWords.js +368 -0
- package/Types/AI/AIReadTableWords.mjs +18 -0
- package/Types/AI/AiOutcomes.d.mts +57 -0
- package/Types/AI/AiOutcomes.d.ts +57 -0
- package/Types/AI/AiOutcomes.js +67 -0
- package/Types/AI/AiOutcomes.mjs +10 -0
- package/Types/AI/AiRunRefusal.d.mts +48 -0
- package/Types/AI/AiRunRefusal.d.ts +48 -0
- package/Types/AI/AiRunRefusal.js +208 -0
- package/Types/AI/AiRunRefusal.mjs +12 -0
- package/Types/AI/InvestigationRecording.d.mts +46 -0
- package/Types/AI/InvestigationRecording.d.ts +46 -0
- package/Types/AI/InvestigationRecording.js +42 -0
- package/Types/AI/InvestigationRecording.mjs +7 -0
- package/Types/AI/ResourceAiAccessPermissions.js +7 -18
- package/Types/API/HTTPResponse.d.mts +3 -0
- package/Types/API/HTTPResponse.d.ts +3 -0
- package/Types/API/HTTPResponse.js +15 -0
- package/Types/AuditLog/AuditLogActionLabel.js +19 -9
- package/Types/BaseDatabase/AggregateBy.d.mts +16 -0
- package/Types/BaseDatabase/AggregateBy.d.ts +16 -0
- package/Types/BaseDatabase/AggregationIntervalUtil.d.mts +32 -1
- package/Types/BaseDatabase/AggregationIntervalUtil.d.ts +32 -1
- package/Types/BaseDatabase/AggregationIntervalUtil.js +199 -2
- package/Types/BaseDatabase/ListResult.d.mts +1 -0
- package/Types/BaseDatabase/ListResult.d.ts +1 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.d.mts +47 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.d.ts +47 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.js +282 -0
- package/Types/CallAndSMS/ServerTwilioEnvironment.mjs +7 -0
- package/Types/Cloud/CloudResourceHealth.d.mts +30 -1
- package/Types/Cloud/CloudResourceHealth.d.ts +30 -1
- package/Types/Cloud/CloudResourceHealth.js +405 -13
- package/Types/Cloud/CloudResourceHealth.mjs +28 -0
- package/Types/Dashboard/DashboardAutoRefresh.d.mts +1 -0
- package/Types/Dashboard/DashboardAutoRefresh.d.ts +1 -0
- package/Types/Dashboard/DashboardAutoRefresh.js +21 -0
- package/Types/Dashboard/DashboardAutoRefresh.mjs +1 -0
- package/Types/DataObservability/DataCheckRefusals.d.mts +32 -0
- package/Types/DataObservability/DataCheckRefusals.d.ts +32 -0
- package/Types/DataObservability/DataCheckRefusals.js +77 -0
- package/Types/DataObservability/DataCheckRefusals.mjs +8 -0
- package/Types/Database/AccessControl/PermissionScopeNarrowing.js +4 -0
- package/Types/Date.d.mts +8 -1
- package/Types/Date.d.ts +8 -1
- package/Types/Date.js +61 -7
- package/Types/Date.mjs +1 -0
- package/Types/DateLanguage.d.mts +2 -0
- package/Types/DateLanguage.d.ts +2 -0
- package/Types/DateLanguage.js +8 -5
- package/Types/Email/EmailTemplateType.d.mts +1 -0
- package/Types/Email/EmailTemplateType.d.ts +1 -0
- package/Types/Email/EmailTemplateType.js +2 -0
- package/Types/Email/ServerEmailEnvironment.d.mts +85 -0
- package/Types/Email/ServerEmailEnvironment.d.ts +85 -0
- package/Types/Email/ServerEmailEnvironment.js +793 -0
- package/Types/Email/ServerEmailEnvironment.mjs +14 -0
- package/Types/Exception/AiRunRefusalException.d.mts +6 -0
- package/Types/Exception/AiRunRefusalException.d.ts +6 -0
- package/Types/Exception/AiRunRefusalException.js +23 -0
- package/Types/Exception/AiRunRefusalException.mjs +2 -0
- package/Types/Exception/EgressGuardException.js +1 -1
- package/Types/Exception/ErrorMessageRule.d.mts +1 -0
- package/Types/Exception/ErrorMessageRule.d.ts +1 -0
- package/Types/Exception/ErrorMessageRule.js +67 -13
- package/Types/Exception/ErrorMessageRule.mjs +1 -0
- package/Types/Exception/ExceptionMessages.d.mts +2 -0
- package/Types/Exception/ExceptionMessages.d.ts +2 -0
- package/Types/Exception/ExceptionMessages.js +2 -0
- package/Types/Form/FormTargetCatalog.js +2 -2
- package/Types/Form/FormTargetType.js +2 -2
- package/Types/Incident/PostmortemActionItemStatus.d.mts +17 -0
- package/Types/Incident/PostmortemActionItemStatus.d.ts +17 -0
- package/Types/Incident/PostmortemActionItemStatus.js +74 -0
- package/Types/Incident/PostmortemActionItemStatus.mjs +5 -0
- package/Types/JSONFunctions.js +10 -3
- package/Types/Link.d.mts +1 -0
- package/Types/Link.d.ts +1 -0
- package/Types/ListData.d.mts +2 -0
- package/Types/ListData.d.ts +2 -0
- package/Types/ListData.js +4 -0
- package/Types/MeaningKeys.d.mts +4 -0
- package/Types/MeaningKeys.d.ts +4 -0
- package/Types/MeaningKeys.js +74 -0
- package/Types/MeaningKeys.mjs +5 -0
- package/Types/Monitor/MonitorCriteriaInstance.js +9 -0
- package/Types/Monitor/MonitorNotCheckedReason.d.mts +7 -0
- package/Types/Monitor/MonitorNotCheckedReason.d.ts +7 -0
- package/Types/Monitor/MonitorNotCheckedReason.js +36 -0
- package/Types/Monitor/MonitorNotCheckedReason.mjs +4 -0
- package/Types/Monitor/SnmpMonitor/NetworkTopology.d.mts +6 -0
- package/Types/Monitor/SnmpMonitor/NetworkTopology.d.ts +6 -0
- package/Types/Monitor/UptimeHistoryLabels.js +2 -2
- package/Types/Monitor/WhoIsTold.d.mts +3 -0
- package/Types/Monitor/WhoIsTold.d.ts +3 -0
- package/Types/Monitor/WhoIsTold.js +63 -13
- package/Types/NoBreakSpaces.d.mts +16 -0
- package/Types/NoBreakSpaces.d.ts +16 -0
- package/Types/NoBreakSpaces.js +419 -0
- package/Types/NoBreakSpaces.mjs +9 -0
- package/Types/NotificationRule/PagingLadder.d.mts +12 -0
- package/Types/NotificationRule/PagingLadder.d.ts +12 -0
- package/Types/NotificationRule/PagingLadder.js +159 -11
- package/Types/NotificationRule/PagingLadder.mjs +3 -0
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.mts +1 -0
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.d.ts +1 -0
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.js +12 -9
- package/Types/OnCallDutyPolicy/GlobalUserOverrideAccess.mjs +1 -0
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.mts +3 -1
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.d.ts +3 -1
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.js +24 -6
- package/Types/OnCallDutyPolicy/OnCallAcknowledgePage.mjs +1 -0
- package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.mts +1 -0
- package/Types/OnCallDutyPolicy/OnCallPagePassOn.d.ts +1 -0
- package/Types/OnCallDutyPolicy/OnCallPageRecordGone.d.mts +3 -0
- package/Types/OnCallDutyPolicy/OnCallPageRecordGone.d.ts +3 -0
- package/Types/OnCallDutyPolicy/OnCallPageRecordGone.js +42 -0
- package/Types/OnCallDutyPolicy/OnCallPageRecordGone.mjs +4 -0
- package/Types/OnCallDutyPolicy/OnCallPageWords.d.mts +6 -2
- package/Types/OnCallDutyPolicy/OnCallPageWords.d.ts +6 -2
- package/Types/OnCallDutyPolicy/OnCallPageWords.js +21 -20
- package/Types/OnCallDutyPolicy/OnCallPersonPage.d.mts +4 -0
- package/Types/OnCallDutyPolicy/OnCallPersonPage.d.ts +4 -0
- package/Types/OnCallDutyPolicy/OnCallPersonPage.js +125 -1
- package/Types/OnCallDutyPolicy/OnCallPersonPage.mjs +1 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.d.mts +12 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.d.ts +12 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.js +38 -0
- package/Types/OnCallDutyPolicy/OnCallPolicyStartedByHand.mjs +3 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.d.mts +2 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.d.ts +2 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.js +12 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.mjs +1 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.mts +92 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.d.ts +92 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.js +512 -0
- package/Types/OnCallDutyPolicy/ScheduleLayersSave.mjs +7 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.d.mts +23 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.d.ts +23 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.js +105 -0
- package/Types/OnCallDutyPolicy/UserOverrideEdit.mjs +6 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.mts +64 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.d.ts +64 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.js +237 -0
- package/Types/OnCallDutyPolicy/UserOverrideOverlap.mjs +14 -0
- package/Types/OpenStack/OpenStackCapacity.js +12 -5
- package/Types/Permission.d.mts +4 -0
- package/Types/Permission.d.ts +4 -0
- package/Types/Permission.js +66 -10
- package/Types/Probe/ProbeCapability.d.mts +2 -1
- package/Types/Probe/ProbeCapability.d.ts +2 -1
- package/Types/Probe/ProbeCapability.js +10 -0
- package/Types/Product/ProductUsage.js +2 -1
- package/Types/Product/ProjectProductsAnswer.js +2 -1
- package/Types/ReaderLanguage.d.mts +1 -0
- package/Types/ReaderLanguage.d.ts +1 -0
- package/Types/ReaderLanguage.js +13 -1
- package/Types/ReaderLanguage.mjs +1 -0
- package/Types/ResourceAiAgent/AiResourceType.d.mts +1 -0
- package/Types/ResourceAiAgent/AiResourceType.d.ts +1 -0
- package/Types/ResourceAiAgent/AiResourceType.js +12 -0
- package/Types/Rules/RuleRun.js +2 -2
- package/Types/Rum/ProductAnalyticsEventReads.js +10 -1
- package/Types/Rum/ProductAnalyticsEvents.js +13 -1
- package/Types/Rum/SessionReplayCustomEvents.d.mts +4 -1
- package/Types/Rum/SessionReplayCustomEvents.d.ts +4 -1
- package/Types/Rum/SessionReplayCustomEvents.js +12 -0
- package/Types/Rum/SessionReplayCustomEvents.mjs +1 -0
- package/Types/ScheduledMaintenance/MaintenanceCalendar.js +1 -1
- package/Types/ServerSending/ServerSendingStatus.d.mts +7 -0
- package/Types/ServerSending/ServerSendingStatus.d.ts +7 -0
- package/Types/ServerSending/ServerSendingStatus.js +49 -2
- package/Types/ServerSetup/ServerSetupChecklist.js +3 -3
- package/Types/SetupHealth/SetupHealth.d.mts +1 -0
- package/Types/SetupHealth/SetupHealth.d.ts +1 -0
- package/Types/SetupHealth/SetupHealth.js +13 -5
- package/Types/StateTimeline/RowsKeptOnDelete.js +1 -1
- package/Types/StatusPage/DefaultStatusNames.d.mts +11 -3
- package/Types/StatusPage/DefaultStatusNames.d.ts +11 -3
- package/Types/StatusPage/DefaultStatusNames.js +74 -28
- package/Types/StatusPage/DefaultStatusNames.mjs +9 -2
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.d.mts +8 -0
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.d.ts +8 -0
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.js +50 -0
- package/Types/StatusPage/NewIncidentSubscriberNotificationDefault.mjs +3 -0
- package/Types/StatusPage/PublicNoteSubscriberNotificationDefault.js +1 -1
- package/Types/StatusPage/StateChangeNoteMessage.d.mts +3 -2
- package/Types/StatusPage/StateChangeNoteMessage.d.ts +3 -2
- package/Types/StatusPage/StateChangeNoteMessage.js +16 -13
- package/Types/Telemetry/CompatibleIngest.d.mts +20 -0
- package/Types/Telemetry/CompatibleIngest.d.ts +20 -0
- package/Types/Telemetry/CompatibleIngest.js +123 -0
- package/Types/Telemetry/CompatibleIngest.mjs +21 -0
- package/Types/Telemetry/TelemetryIngestSurface.d.mts +5 -0
- package/Types/Telemetry/TelemetryIngestSurface.d.ts +5 -0
- package/Types/Telemetry/TelemetryIngestSurface.js +48 -7
- package/Types/Telemetry/TelemetryIngestionKeyType.js +7 -6
- package/Types/TimezoneAlias.d.mts +1 -0
- package/Types/TimezoneAlias.d.ts +1 -0
- package/Types/TimezoneAlias.js +13 -0
- package/Types/Translator.d.mts +1 -0
- package/Types/Translator.d.ts +1 -0
- package/Types/Translator.js +470 -63
- package/Types/Translator.mjs +1 -0
- package/Types/UserSession/SessionLength.d.mts +33 -0
- package/Types/UserSession/SessionLength.d.ts +33 -0
- package/Types/UserSession/SessionLength.js +134 -5
- package/Types/UserSession/SessionLength.mjs +5 -0
- package/Types/Workflow/RunRecord.js +1 -1
- package/Types/Workflow/Templates.js +2 -2
- package/Types/Workflow/WorkflowStatus.js +21 -10
- package/Types/Workspace/NotificationRules/BaseNotificationRule.d.mts +2 -0
- package/Types/Workspace/NotificationRules/BaseNotificationRule.d.ts +2 -0
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.mts +26 -1
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +26 -1
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.mts +84 -0
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.d.ts +84 -0
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.js +456 -0
- package/Types/Workspace/NotificationRules/NotificationRuleUpdates.mjs +5 -0
- package/Utils/AI/InvestigationReport.js +2 -2
- package/Utils/API.d.mts +0 -11
- package/Utils/API.d.ts +0 -11
- package/Utils/API.js +0 -432
- package/Utils/AiRemediation/Resource/ResourceCommandPolicy.js +2 -2
- package/Utils/AiRemediation/VerifiedFixRunbook.d.mts +39 -0
- package/Utils/AiRemediation/VerifiedFixRunbook.d.ts +39 -0
- package/Utils/AiRemediation/VerifiedFixRunbook.js +231 -0
- package/Utils/AiRemediation/VerifiedFixRunbook.mjs +10 -0
- package/Utils/Dashboard/DashboardWidgetSorts.js +11 -2
- package/Utils/Dashboard/MonitorListWidgetFormat.d.mts +2 -1
- package/Utils/Dashboard/MonitorListWidgetFormat.d.ts +2 -1
- package/Utils/Dashboard/MonitorListWidgetFormat.js +5 -3
- package/Utils/Dashboard/ValueWidgetSeries.d.mts +2 -0
- package/Utils/Dashboard/ValueWidgetSeries.d.ts +2 -0
- package/Utils/Dashboard/ValueWidgetSeries.js +75 -0
- package/Utils/DefaultRecordNames.d.mts +6 -0
- package/Utils/DefaultRecordNames.d.ts +6 -0
- package/Utils/DefaultRecordNames.js +122 -0
- package/Utils/DefaultRecordNames.mjs +6 -0
- package/Utils/DeveloperDocs/ExampleBuilder.js +1 -1
- package/Utils/DeveloperDocs/ResourceProfiles.js +2 -2
- package/Utils/Grok/Grok.js +7 -4
- package/Utils/GuidedSetup/StatusPageRecords.d.mts +5 -0
- package/Utils/GuidedSetup/StatusPageRecords.d.ts +5 -0
- package/Utils/GuidedSetup/StatusPageRecords.js +27 -2
- package/Utils/GuidedSetup/StatusPageRecords.mjs +1 -0
- package/Utils/GuidedSetup/WebsiteMonitorRecords.js +6 -0
- package/Utils/HostAddressUtil.d.mts +1 -0
- package/Utils/HostAddressUtil.d.ts +1 -0
- package/Utils/HostAddressUtil.js +30 -0
- package/Utils/Incident/PostmortemActionItemCodeTask.d.mts +20 -0
- package/Utils/Incident/PostmortemActionItemCodeTask.d.ts +20 -0
- package/Utils/Incident/PostmortemActionItemCodeTask.js +107 -0
- package/Utils/Incident/PostmortemActionItemCodeTask.mjs +10 -0
- package/Utils/Incident/PostmortemActionItemMarkdown.d.mts +39 -0
- package/Utils/Incident/PostmortemActionItemMarkdown.d.ts +39 -0
- package/Utils/Incident/PostmortemActionItemMarkdown.js +118 -0
- package/Utils/Incident/PostmortemActionItemMarkdown.mjs +12 -0
- package/Utils/Incident/PostmortemNoteActionItems.d.mts +29 -0
- package/Utils/Incident/PostmortemNoteActionItems.d.ts +29 -0
- package/Utils/Incident/PostmortemNoteActionItems.js +544 -0
- package/Utils/Incident/PostmortemNoteActionItems.mjs +7 -0
- package/Utils/LinearRegExp/LinearRegExp.js +5 -1
- package/Utils/LookupTable.d.mts +3 -0
- package/Utils/LookupTable.d.ts +3 -0
- package/Utils/LookupTable.js +61 -0
- package/Utils/LookupTable.mjs +3 -0
- package/Utils/Markdown/LinkReferenceDefinitions.d.mts +2 -0
- package/Utils/Markdown/LinkReferenceDefinitions.d.ts +2 -0
- package/Utils/Markdown/LinkReferenceDefinitions.js +101 -1
- package/Utils/Markdown/LinkReferenceDefinitions.mjs +2 -0
- package/Utils/Markdown/OverLongText.js +296 -2
- package/Utils/Markdown/SlowMarkdown.d.mts +1 -0
- package/Utils/Markdown/SlowMarkdown.d.ts +1 -0
- package/Utils/Markdown/SlowMarkdown.js +354 -4
- package/Utils/Markdown/SlowMarkdown.mjs +1 -0
- package/Utils/Metrics/MetricFormulaEvaluator.js +10 -4
- package/Utils/Metrics/MetricSeriesFingerprint.js +13 -4
- package/Utils/Metrics/MetricSeriesScope.d.mts +5 -0
- package/Utils/Metrics/MetricSeriesScope.d.ts +5 -0
- package/Utils/Metrics/MetricSeriesScope.js +5 -1
- package/Utils/Milliseconds.d.mts +7 -0
- package/Utils/Milliseconds.d.ts +7 -0
- package/Utils/Milliseconds.js +60 -0
- package/Utils/Milliseconds.mjs +4 -0
- package/Utils/Monitor/EndpointAttachmentUtil.d.mts +8 -0
- package/Utils/Monitor/EndpointAttachmentUtil.d.ts +8 -0
- package/Utils/Monitor/EndpointAttachmentUtil.js +91 -21
- package/Utils/Monitor/EndpointAttachmentUtil.mjs +4 -0
- package/Utils/Monitor/InterfaceInventoryUtil.d.mts +40 -0
- package/Utils/Monitor/InterfaceInventoryUtil.d.ts +40 -0
- package/Utils/Monitor/InterfaceInventoryUtil.js +217 -5
- package/Utils/Monitor/InterfaceInventoryUtil.mjs +8 -0
- package/Utils/Monitor/MonitorOverviewPresentationUtil.js +63 -29
- package/Utils/Monitor/MonitorOverviewProbeUtil.js +13 -2
- package/Utils/Monitor/MonitorRootCauseWording.d.mts +5 -0
- package/Utils/Monitor/MonitorRootCauseWording.d.ts +5 -0
- package/Utils/Monitor/MonitorRootCauseWording.js +148 -5
- package/Utils/Monitor/MonitoringOff.d.mts +2 -0
- package/Utils/Monitor/MonitoringOff.d.ts +2 -0
- package/Utils/Monitor/MonitoringOff.js +21 -0
- package/Utils/Monitor/NetworkTopologyUtil.d.mts +2 -1
- package/Utils/Monitor/NetworkTopologyUtil.d.ts +2 -1
- package/Utils/Monitor/NetworkTopologyUtil.js +10 -0
- package/Utils/Monitor/NotOperationalMonitorQuery.d.mts +2 -1
- package/Utils/Monitor/NotOperationalMonitorQuery.d.ts +2 -1
- package/Utils/Monitor/NotOperationalMonitorQuery.js +23 -4
- package/Utils/Monitor/ProbeAgreementRule.d.mts +10 -0
- package/Utils/Monitor/ProbeAgreementRule.d.ts +10 -0
- package/Utils/Monitor/ProbeAgreementRule.js +58 -0
- package/Utils/Monitor/ProbeAgreementRule.mjs +3 -0
- package/Utils/Monitor/ProbeFailureReading.d.mts +18 -0
- package/Utils/Monitor/ProbeFailureReading.d.ts +18 -0
- package/Utils/Monitor/ProbeFailureReading.js +166 -0
- package/Utils/Monitor/ProbeFailureReading.mjs +8 -0
- package/Utils/Monitor/RequestFailureDescriptions.d.mts +61 -0
- package/Utils/Monitor/RequestFailureDescriptions.d.ts +61 -0
- package/Utils/Monitor/RequestFailureDescriptions.js +252 -0
- package/Utils/Monitor/RequestFailureDescriptions.mjs +6 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.d.mts +9 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.d.ts +9 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.js +15 -0
- package/Utils/NetworkDevice/BoundMonitorNotChecked.mjs +2 -0
- package/Utils/Project/NextNumber.js +1 -1
- package/Utils/PromQL/PromQLAst.d.mts +159 -0
- package/Utils/PromQL/PromQLAst.d.ts +159 -0
- package/Utils/PromQL/PromQLAst.js +118 -0
- package/Utils/PromQL/PromQLAst.mjs +12 -0
- package/Utils/PromQL/PromQLDuration.d.mts +2 -0
- package/Utils/PromQL/PromQLDuration.d.ts +2 -0
- package/Utils/PromQL/PromQLDuration.js +78 -0
- package/Utils/PromQL/PromQLDuration.mjs +3 -0
- package/Utils/PromQL/PromQLEngine.d.mts +15 -0
- package/Utils/PromQL/PromQLEngine.d.ts +15 -0
- package/Utils/PromQL/PromQLEngine.js +974 -0
- package/Utils/PromQL/PromQLEngine.mjs +7 -0
- package/Utils/PromQL/PromQLEngineTypes.d.mts +84 -0
- package/Utils/PromQL/PromQLEngineTypes.d.ts +84 -0
- package/Utils/PromQL/PromQLEngineTypes.js +10 -0
- package/Utils/PromQL/PromQLEngineTypes.mjs +2 -0
- package/Utils/PromQL/PromQLError.d.mts +11 -0
- package/Utils/PromQL/PromQLError.d.ts +11 -0
- package/Utils/PromQL/PromQLError.js +27 -0
- package/Utils/PromQL/PromQLError.mjs +3 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.d.mts +8 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.d.ts +8 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.js +829 -0
- package/Utils/PromQL/PromQLFunctionEvaluators.mjs +3 -0
- package/Utils/PromQL/PromQLFunctions.d.mts +10 -0
- package/Utils/PromQL/PromQLFunctions.d.ts +10 -0
- package/Utils/PromQL/PromQLFunctions.js +127 -0
- package/Utils/PromQL/PromQLFunctions.mjs +4 -0
- package/Utils/PromQL/PromQLLabelOrder.d.mts +8 -0
- package/Utils/PromQL/PromQLLabelOrder.d.ts +8 -0
- package/Utils/PromQL/PromQLLabelOrder.js +212 -0
- package/Utils/PromQL/PromQLLabelOrder.mjs +6 -0
- package/Utils/PromQL/PromQLLabels.d.mts +11 -0
- package/Utils/PromQL/PromQLLabels.d.ts +11 -0
- package/Utils/PromQL/PromQLLabels.js +219 -0
- package/Utils/PromQL/PromQLLabels.mjs +9 -0
- package/Utils/PromQL/PromQLLexer.d.mts +39 -0
- package/Utils/PromQL/PromQLLexer.d.ts +39 -0
- package/Utils/PromQL/PromQLLexer.js +391 -0
- package/Utils/PromQL/PromQLLexer.mjs +3 -0
- package/Utils/PromQL/PromQLMath.d.mts +19 -0
- package/Utils/PromQL/PromQLMath.d.ts +19 -0
- package/Utils/PromQL/PromQLMath.js +200 -0
- package/Utils/PromQL/PromQLMath.mjs +9 -0
- package/Utils/PromQL/PromQLMetricNames.d.mts +21 -0
- package/Utils/PromQL/PromQLMetricNames.d.ts +21 -0
- package/Utils/PromQL/PromQLMetricNames.js +205 -0
- package/Utils/PromQL/PromQLMetricNames.mjs +8 -0
- package/Utils/PromQL/PromQLParser.d.mts +4 -0
- package/Utils/PromQL/PromQLParser.d.ts +4 -0
- package/Utils/PromQL/PromQLParser.js +836 -0
- package/Utils/PromQL/PromQLParser.mjs +4 -0
- package/Utils/PromQL/PromQLRegex.d.mts +20 -0
- package/Utils/PromQL/PromQLRegex.d.ts +20 -0
- package/Utils/PromQL/PromQLRegex.js +1014 -0
- package/Utils/PromQL/PromQLRegex.mjs +5 -0
- package/Utils/PromQL/PrometheusResponse.d.mts +25 -0
- package/Utils/PromQL/PrometheusResponse.d.ts +25 -0
- package/Utils/PromQL/PrometheusResponse.js +92 -0
- package/Utils/PromQL/PrometheusResponse.mjs +3 -0
- package/Utils/PromQL/RE2CharacterClass.d.mts +24 -0
- package/Utils/PromQL/RE2CharacterClass.d.ts +24 -0
- package/Utils/PromQL/RE2CharacterClass.js +532 -0
- package/Utils/PromQL/RE2CharacterClass.mjs +16 -0
- package/Utils/RequestFailedDetailsUtil.d.mts +15 -0
- package/Utils/RequestFailedDetailsUtil.d.ts +15 -0
- package/Utils/RequestFailedDetailsUtil.js +452 -0
- package/Utils/RequestFailedDetailsUtil.mjs +2 -0
- package/Utils/Rum/PathInSentence.d.mts +5 -0
- package/Utils/Rum/PathInSentence.d.ts +5 -0
- package/Utils/Rum/PathInSentence.js +46 -0
- package/Utils/Rum/PathInSentence.mjs +6 -0
- package/Utils/Rum/UrlScrubber.d.mts +5 -1
- package/Utils/Rum/UrlScrubber.d.ts +5 -1
- package/Utils/Rum/UrlScrubber.js +153 -7
- package/Utils/Rum/UserFlow.d.mts +1 -1
- package/Utils/Rum/UserFlow.d.ts +1 -1
- package/Utils/Rum/UserFlow.js +202 -29
- package/Utils/Rum/UserFlow.mjs +1 -1
- package/Utils/Runbook/RunbookStepsSignature.d.mts +3 -0
- package/Utils/Runbook/RunbookStepsSignature.d.ts +3 -0
- package/Utils/Runbook/RunbookStepsSignature.js +30 -0
- package/Utils/Runbook/RunbookStepsSignature.mjs +3 -0
- package/Utils/Schema/TypeSchemas.js +6 -0
- package/Utils/SecurityCase/SecurityOverviewMetrics.d.mts +11 -1
- package/Utils/SecurityCase/SecurityOverviewMetrics.d.ts +11 -1
- package/Utils/SecurityCase/SecurityOverviewMetrics.js +99 -17
- package/Utils/SecurityCase/SecurityOverviewMetrics.mjs +3 -0
- package/Utils/Slo/SloDuration.d.mts +5 -2
- package/Utils/Slo/SloDuration.d.ts +5 -2
- package/Utils/Slo/SloDuration.js +11 -6
- package/Utils/Slo/SloHealth.js +1 -1
- package/Utils/Sms/OnCallPageSms.d.mts +2 -0
- package/Utils/Sms/OnCallPageSms.d.ts +2 -0
- package/Utils/Sms/OnCallPageSms.js +3 -1
- package/Utils/StateListType.d.mts +11 -0
- package/Utils/StateListType.d.ts +11 -0
- package/Utils/StateListType.js +21 -0
- package/Utils/StateListType.mjs +2 -0
- package/Utils/StateOrder.d.mts +8 -11
- package/Utils/StateOrder.d.ts +8 -11
- package/Utils/StateOrder.js +50 -88
- package/Utils/StateOrder.mjs +2 -0
- package/Utils/StateTimeline/StateTimelineRowDelete.js +1 -1
- package/Utils/Suggestions/ActionItemCodeTaskSuggestion.d.mts +9 -0
- package/Utils/Suggestions/ActionItemCodeTaskSuggestion.d.ts +9 -0
- package/Utils/Suggestions/ActionItemCodeTaskSuggestion.js +25 -0
- package/Utils/Suggestions/ActionItemCodeTaskSuggestion.mjs +2 -0
- package/Utils/Suggestions/VerifiedFixRunbookSuggestion.d.mts +5 -0
- package/Utils/Suggestions/VerifiedFixRunbookSuggestion.d.ts +5 -0
- package/Utils/Suggestions/VerifiedFixRunbookSuggestion.js +39 -0
- package/Utils/Suggestions/VerifiedFixRunbookSuggestion.mjs +2 -0
- package/Utils/Syslog/SyslogMessageParser.js +16 -6
- package/Utils/Telemetry/HeartbeatAvailability.d.mts +4 -0
- package/Utils/Telemetry/HeartbeatAvailability.d.ts +4 -0
- package/Utils/Telemetry/HeartbeatAvailability.js +113 -26
- package/Utils/Uptime/DayUptimeGraphUtil.js +2 -2
- package/Utils/ValueFormatter.d.mts +1 -0
- package/Utils/ValueFormatter.d.ts +1 -0
- package/Utils/ValueFormatter.js +258 -18
- package/package.json +1 -1
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
const axios_1 = __importDefault(require("axios"));
|
|
40
|
+
const ApiException_1 = __importDefault(require("../Types/Exception/ApiException"));
|
|
41
|
+
const EgressGuardException_1 = __importStar(require("../Types/Exception/EgressGuardException"));
|
|
42
|
+
const RequestFailedDetails_1 = require("../Types/Probe/RequestFailedDetails");
|
|
43
|
+
const API_1 = __importDefault(require("./API"));
|
|
44
|
+
const HostAddressUtil_1 = __importDefault(require("./HostAddressUtil"));
|
|
45
|
+
const RequestFailureDescriptions_1 = require("./Monitor/RequestFailureDescriptions");
|
|
46
|
+
const ProbeNetworkFailureUtil_1 = __importStar(require("./ProbeNetworkFailureUtil"));
|
|
47
|
+
// What a probe-side failure calls the target when the error has no request URL.
|
|
48
|
+
const UNKNOWN_REQUEST_HOST = "the server";
|
|
49
|
+
// How far down an error's `cause` / `errors` the connect addresses are read.
|
|
50
|
+
const MAX_CONNECT_ADDRESS_DEPTH = 5;
|
|
51
|
+
/*
|
|
52
|
+
* The code a probe-side failure is reported under. Taken from the
|
|
53
|
+
* classification rather than the thrown error because fetch's TypeError and
|
|
54
|
+
* the API monitor's APIException have no usable code of their own, and an
|
|
55
|
+
* aggregate carries only its first attempt's. NoRouteToHost never comes out
|
|
56
|
+
* of a TCP connect; it is listed so the map stays total.
|
|
57
|
+
*/
|
|
58
|
+
const PROBE_NETWORK_FAILURE_ERROR_CODES = {
|
|
59
|
+
[ProbeNetworkFailureUtil_1.ProbeNetworkFailureKind.NoSourceAddress]: "EADDRNOTAVAIL",
|
|
60
|
+
[ProbeNetworkFailureUtil_1.ProbeNetworkFailureKind.AddressFamilyNotSupported]: "EAFNOSUPPORT",
|
|
61
|
+
[ProbeNetworkFailureUtil_1.ProbeNetworkFailureKind.NetworkUnreachable]: "ENETUNREACH",
|
|
62
|
+
[ProbeNetworkFailureUtil_1.ProbeNetworkFailureKind.NoRouteToHost]: "EHOSTUNREACH",
|
|
63
|
+
};
|
|
64
|
+
class RequestFailedDetailsUtil {
|
|
65
|
+
/**
|
|
66
|
+
* Extracts detailed error information from an axios error or generic error.
|
|
67
|
+
* This provides more context about where and why a request failed.
|
|
68
|
+
*/
|
|
69
|
+
static getRequestFailedDetails(error) {
|
|
70
|
+
const axiosError = axios_1.default.isAxiosError(error)
|
|
71
|
+
? error
|
|
72
|
+
: null;
|
|
73
|
+
const nativeErrorCode = typeof error === "object" && error !== null && "code" in error
|
|
74
|
+
? error.code
|
|
75
|
+
: undefined;
|
|
76
|
+
const errorCode = typeof nativeErrorCode === "string" ? nativeErrorCode : undefined;
|
|
77
|
+
const rawErrorMessage = (error === null || error === void 0 ? void 0 : error.message) || String(error) || "Unknown error";
|
|
78
|
+
/*
|
|
79
|
+
* The egress guard refuses a target BEFORE any socket is opened, and for
|
|
80
|
+
* tenant-facing callers it sanitizes its message down to one sentence that
|
|
81
|
+
* matches none of the patterns below. Left to the fall-through, every such
|
|
82
|
+
* failure was reported as phase "Unknown" with the sanitized sentence
|
|
83
|
+
* echoed back as its own explanation — which is exactly what a monitor
|
|
84
|
+
* incident showed for a host whose DNS had hiccuped. Classify it here
|
|
85
|
+
* instead, from the exception TYPE rather than from its text.
|
|
86
|
+
*/
|
|
87
|
+
if (error instanceof EgressGuardException_1.default) {
|
|
88
|
+
return {
|
|
89
|
+
failedPhase: RequestFailedDetails_1.RequestFailedPhase.TargetResolution,
|
|
90
|
+
errorCode: error.reason === EgressGuardException_1.EgressFailureReason.InvalidTarget
|
|
91
|
+
? "INVALID_TARGET"
|
|
92
|
+
: "TARGET_UNREACHABLE",
|
|
93
|
+
/*
|
|
94
|
+
* One constant description for every unreachable reason. It names all
|
|
95
|
+
* the possibilities without saying which occurred, so it stays useful
|
|
96
|
+
* without telling a tenant on a shared probe whether a hostname
|
|
97
|
+
* resolved — that difference is the enumeration oracle the guard's
|
|
98
|
+
* sanitized message exists to close.
|
|
99
|
+
*/
|
|
100
|
+
errorDescription: error.reason === EgressGuardException_1.EgressFailureReason.InvalidTarget
|
|
101
|
+
? (0, RequestFailureDescriptions_1.writeRequestFailureDescription)(RequestFailureDescriptions_1.RequestFailureDescription.InvalidTarget, { message: rawErrorMessage })
|
|
102
|
+
: (0, RequestFailureDescriptions_1.writeRequestFailureDescription)(RequestFailureDescriptions_1.RequestFailureDescription.TargetUnreachable),
|
|
103
|
+
rawErrorMessage,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
/*
|
|
107
|
+
* The connect failed on the probe, before the request left it. Checked
|
|
108
|
+
* ahead of the string rules below because none of them describe it:
|
|
109
|
+
* EADDRNOTAVAIL matched nothing and fell through to "The request was sent
|
|
110
|
+
* but no response was returned", when nothing was sent at all, and a
|
|
111
|
+
* probe with no IPv6 was told there was no route to the network where the
|
|
112
|
+
* server resides. Still the TCP connection phase, since connect() is what
|
|
113
|
+
* failed. The failure cause the monitor reports alongside this already
|
|
114
|
+
* quotes the OS error (getProbeNetworkFailureDescription), so this only
|
|
115
|
+
* says what it means for the request.
|
|
116
|
+
*/
|
|
117
|
+
const probeSideFailure = RequestFailedDetailsUtil.getProbeSideRequestFailure(error);
|
|
118
|
+
if (probeSideFailure) {
|
|
119
|
+
return {
|
|
120
|
+
failedPhase: RequestFailedDetails_1.RequestFailedPhase.TCPConnection,
|
|
121
|
+
errorCode: PROBE_NETWORK_FAILURE_ERROR_CODES[probeSideFailure.failure.kind],
|
|
122
|
+
errorDescription: (0, RequestFailureDescriptions_1.writeRequestFailureDescription)(RequestFailedDetailsUtil.getProbeSideFailureDescription(probeSideFailure)),
|
|
123
|
+
rawErrorMessage,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
// Helper to determine the phase and description based on error code/message
|
|
127
|
+
const lowerMessage = rawErrorMessage.toLowerCase();
|
|
128
|
+
// DNS resolution failures
|
|
129
|
+
if (errorCode === "ENOTFOUND" || lowerMessage.includes("enotfound")) {
|
|
130
|
+
return {
|
|
131
|
+
failedPhase: RequestFailedDetails_1.RequestFailedPhase.DNSResolution,
|
|
132
|
+
errorCode: errorCode || "ENOTFOUND",
|
|
133
|
+
errorDescription: (0, RequestFailureDescriptions_1.writeRequestFailureDescription)(RequestFailureDescriptions_1.RequestFailureDescription.DnsResolutionFailed),
|
|
134
|
+
rawErrorMessage,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
// Connection refused
|
|
138
|
+
if (errorCode === "ECONNREFUSED" || lowerMessage.includes("econnrefused")) {
|
|
139
|
+
return {
|
|
140
|
+
failedPhase: RequestFailedDetails_1.RequestFailedPhase.TCPConnection,
|
|
141
|
+
errorCode: errorCode || "ECONNREFUSED",
|
|
142
|
+
errorDescription: (0, RequestFailureDescriptions_1.writeRequestFailureDescription)(RequestFailureDescriptions_1.RequestFailureDescription.ConnectionRefused),
|
|
143
|
+
rawErrorMessage,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
// Connection reset
|
|
147
|
+
if (errorCode === "ECONNRESET" ||
|
|
148
|
+
lowerMessage.includes("econnreset") ||
|
|
149
|
+
lowerMessage.includes("connection reset")) {
|
|
150
|
+
return {
|
|
151
|
+
failedPhase: RequestFailedDetails_1.RequestFailedPhase.TCPConnection,
|
|
152
|
+
errorCode: errorCode || "ECONNRESET",
|
|
153
|
+
errorDescription: (0, RequestFailureDescriptions_1.writeRequestFailureDescription)(RequestFailureDescriptions_1.RequestFailureDescription.ConnectionReset),
|
|
154
|
+
rawErrorMessage,
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
// Connection aborted
|
|
158
|
+
if (errorCode === "ECONNABORTED" ||
|
|
159
|
+
lowerMessage.includes("econnaborted") ||
|
|
160
|
+
lowerMessage.includes("connection aborted")) {
|
|
161
|
+
return {
|
|
162
|
+
failedPhase: RequestFailedDetails_1.RequestFailedPhase.RequestAborted,
|
|
163
|
+
errorCode: errorCode || "ECONNABORTED",
|
|
164
|
+
errorDescription: (0, RequestFailureDescriptions_1.writeRequestFailureDescription)(RequestFailureDescriptions_1.RequestFailureDescription.ConnectionAborted),
|
|
165
|
+
rawErrorMessage,
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
// Timeout errors
|
|
169
|
+
if (errorCode === "ETIMEDOUT" ||
|
|
170
|
+
errorCode === "ESOCKETTIMEDOUT" ||
|
|
171
|
+
lowerMessage.includes("timeout") ||
|
|
172
|
+
lowerMessage.includes("exceeded")) {
|
|
173
|
+
return {
|
|
174
|
+
failedPhase: RequestFailedDetails_1.RequestFailedPhase.RequestTimeout,
|
|
175
|
+
errorCode: errorCode || "TIMEOUT",
|
|
176
|
+
errorDescription: (0, RequestFailureDescriptions_1.writeRequestFailureDescription)(RequestFailureDescriptions_1.RequestFailureDescription.RequestTimedOut),
|
|
177
|
+
rawErrorMessage,
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
// SSL/TLS Certificate errors
|
|
181
|
+
if (errorCode === "CERT_REVOKED" ||
|
|
182
|
+
lowerMessage.includes("certificate has been revoked") ||
|
|
183
|
+
lowerMessage.includes("cert_revoked")) {
|
|
184
|
+
return {
|
|
185
|
+
failedPhase: RequestFailedDetails_1.RequestFailedPhase.CertificateError,
|
|
186
|
+
errorCode: "CERT_REVOKED",
|
|
187
|
+
errorDescription: (0, RequestFailureDescriptions_1.writeRequestFailureDescription)(RequestFailureDescriptions_1.RequestFailureDescription.CertificateRevoked),
|
|
188
|
+
rawErrorMessage,
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
if (lowerMessage.includes("certificate has expired") ||
|
|
192
|
+
lowerMessage.includes("cert_has_expired")) {
|
|
193
|
+
return {
|
|
194
|
+
failedPhase: RequestFailedDetails_1.RequestFailedPhase.CertificateError,
|
|
195
|
+
errorCode: "CERT_HAS_EXPIRED",
|
|
196
|
+
errorDescription: (0, RequestFailureDescriptions_1.writeRequestFailureDescription)(RequestFailureDescriptions_1.RequestFailureDescription.CertificateExpired),
|
|
197
|
+
rawErrorMessage,
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
if (lowerMessage.includes("self-signed certificate") ||
|
|
201
|
+
lowerMessage.includes("self signed certificate") ||
|
|
202
|
+
lowerMessage.includes("depth_zero_self_signed_cert")) {
|
|
203
|
+
return {
|
|
204
|
+
failedPhase: RequestFailedDetails_1.RequestFailedPhase.CertificateError,
|
|
205
|
+
errorCode: "SELF_SIGNED_CERT",
|
|
206
|
+
errorDescription: (0, RequestFailureDescriptions_1.writeRequestFailureDescription)(RequestFailureDescriptions_1.RequestFailureDescription.SelfSignedCertificate),
|
|
207
|
+
rawErrorMessage,
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
if (lowerMessage.includes("certificate signed by unknown authority") ||
|
|
211
|
+
lowerMessage.includes("unable_to_verify_leaf_signature") ||
|
|
212
|
+
lowerMessage.includes("unable to verify")) {
|
|
213
|
+
return {
|
|
214
|
+
failedPhase: RequestFailedDetails_1.RequestFailedPhase.CertificateError,
|
|
215
|
+
errorCode: "CERT_UNKNOWN_AUTHORITY",
|
|
216
|
+
errorDescription: (0, RequestFailureDescriptions_1.writeRequestFailureDescription)(RequestFailureDescriptions_1.RequestFailureDescription.CertificateUnknownAuthority),
|
|
217
|
+
rawErrorMessage,
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
if (lowerMessage.includes("ssl") ||
|
|
221
|
+
lowerMessage.includes("tls") ||
|
|
222
|
+
lowerMessage.includes("certificate") ||
|
|
223
|
+
lowerMessage.includes("handshake")) {
|
|
224
|
+
return {
|
|
225
|
+
failedPhase: RequestFailedDetails_1.RequestFailedPhase.TLSHandshake,
|
|
226
|
+
errorCode: errorCode || "TLS_ERROR",
|
|
227
|
+
errorDescription: (0, RequestFailureDescriptions_1.writeRequestFailureDescription)(RequestFailureDescriptions_1.RequestFailureDescription.TlsHandshakeFailed),
|
|
228
|
+
rawErrorMessage,
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
// Network errors
|
|
232
|
+
if (lowerMessage.includes("network error") || errorCode === "ERR_NETWORK") {
|
|
233
|
+
return {
|
|
234
|
+
failedPhase: RequestFailedDetails_1.RequestFailedPhase.NetworkError,
|
|
235
|
+
errorCode: errorCode || "NETWORK_ERROR",
|
|
236
|
+
errorDescription: (0, RequestFailureDescriptions_1.writeRequestFailureDescription)(RequestFailureDescriptions_1.RequestFailureDescription.NetworkError),
|
|
237
|
+
rawErrorMessage,
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
// Host unreachable
|
|
241
|
+
if (errorCode === "EHOSTUNREACH" ||
|
|
242
|
+
lowerMessage.includes("host unreachable")) {
|
|
243
|
+
return {
|
|
244
|
+
failedPhase: RequestFailedDetails_1.RequestFailedPhase.TCPConnection,
|
|
245
|
+
errorCode: errorCode || "EHOSTUNREACH",
|
|
246
|
+
errorDescription: (0, RequestFailureDescriptions_1.writeRequestFailureDescription)(RequestFailureDescriptions_1.RequestFailureDescription.HostUnreachable),
|
|
247
|
+
rawErrorMessage,
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
// Network unreachable
|
|
251
|
+
if (errorCode === "ENETUNREACH" ||
|
|
252
|
+
lowerMessage.includes("network unreachable")) {
|
|
253
|
+
return {
|
|
254
|
+
failedPhase: RequestFailedDetails_1.RequestFailedPhase.TCPConnection,
|
|
255
|
+
errorCode: errorCode || "ENETUNREACH",
|
|
256
|
+
errorDescription: (0, RequestFailureDescriptions_1.writeRequestFailureDescription)(RequestFailureDescriptions_1.RequestFailureDescription.NetworkUnreachable),
|
|
257
|
+
rawErrorMessage,
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
// Server responded with error status
|
|
261
|
+
if (axiosError === null || axiosError === void 0 ? void 0 : axiosError.response) {
|
|
262
|
+
const status = axiosError.response.status;
|
|
263
|
+
return {
|
|
264
|
+
failedPhase: RequestFailedDetails_1.RequestFailedPhase.ServerResponse,
|
|
265
|
+
errorCode: `HTTP_${status}`,
|
|
266
|
+
errorDescription: (0, RequestFailureDescriptions_1.writeRequestFailureDescription)(RequestFailedDetailsUtil.getHttpStatusDescription(status), { status: status }),
|
|
267
|
+
rawErrorMessage,
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
// Request was made but no response received
|
|
271
|
+
if ((axiosError === null || axiosError === void 0 ? void 0 : axiosError.request) && !(axiosError === null || axiosError === void 0 ? void 0 : axiosError.response)) {
|
|
272
|
+
return {
|
|
273
|
+
failedPhase: RequestFailedDetails_1.RequestFailedPhase.NetworkError,
|
|
274
|
+
errorCode: errorCode || "NO_RESPONSE",
|
|
275
|
+
errorDescription: (0, RequestFailureDescriptions_1.writeRequestFailureDescription)(RequestFailureDescriptions_1.RequestFailureDescription.NoResponse),
|
|
276
|
+
rawErrorMessage,
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
// Default/Unknown error
|
|
280
|
+
return {
|
|
281
|
+
failedPhase: RequestFailedDetails_1.RequestFailedPhase.Unknown,
|
|
282
|
+
errorCode: errorCode,
|
|
283
|
+
errorDescription: (0, RequestFailureDescriptions_1.writeRequestFailureDescription)(RequestFailureDescriptions_1.RequestFailureDescription.RequestFailed, {
|
|
284
|
+
message: API_1.default.getFriendlyErrorMessage(error),
|
|
285
|
+
}),
|
|
286
|
+
rawErrorMessage,
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
/*
|
|
290
|
+
* The failure cause for a monitor request that failed on the probe itself,
|
|
291
|
+
* in the shared probe-side wording (which quotes the OS error), or null for
|
|
292
|
+
* any other failure. A probe with no usable IPv6 fails every IPv6 URL with
|
|
293
|
+
* a bare "connect EADDRNOTAVAIL ...", which reads as the customer's site
|
|
294
|
+
* being down while it may be answering perfectly well.
|
|
295
|
+
*
|
|
296
|
+
* ENETUNREACH from a TCP connect can also be a router's "no route" to the
|
|
297
|
+
* destination, so it is only reworded for an IPv6 destination, where the
|
|
298
|
+
* shared wording says "most likely". Otherwise it keeps its message.
|
|
299
|
+
*
|
|
300
|
+
* Separate from getFriendlyErrorMessage on purpose: that one is also used
|
|
301
|
+
* by the dashboard and by the server's own outbound requests, where "this
|
|
302
|
+
* probe" would be false. Only the Website and API monitors call this.
|
|
303
|
+
*/
|
|
304
|
+
static getProbeNetworkFailureDescription(error) {
|
|
305
|
+
const probeSideFailure = RequestFailedDetailsUtil.getProbeSideRequestFailure(error);
|
|
306
|
+
if (!probeSideFailure ||
|
|
307
|
+
(!probeSideFailure.failure.isCertain &&
|
|
308
|
+
!probeSideFailure.isIPv6Destination)) {
|
|
309
|
+
return null;
|
|
310
|
+
}
|
|
311
|
+
return ProbeNetworkFailureUtil_1.default.describe({
|
|
312
|
+
host: probeSideFailure.host,
|
|
313
|
+
failure: probeSideFailure.failure,
|
|
314
|
+
isIPv6Destination: probeSideFailure.isIPv6Destination,
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
/*
|
|
318
|
+
* Classifies a request error as a connect that failed on the probe, with
|
|
319
|
+
* the host to name and whether to word it as IPv6.
|
|
320
|
+
*
|
|
321
|
+
* IPv6 wording needs evidence. It is used when every address the probe
|
|
322
|
+
* tried to connect to was IPv6 or, when the error names no address, when
|
|
323
|
+
* the request URL's host is an IPv6 literal. A dual-stack name whose IPv4
|
|
324
|
+
* attempt failed as well is not an IPv6 problem, and neither is an IPv4
|
|
325
|
+
* proxy the probe could not reach on the way to an IPv6 target.
|
|
326
|
+
*/
|
|
327
|
+
static getProbeSideRequestFailure(error) {
|
|
328
|
+
// The guard refuses before any socket exists; its message is its own.
|
|
329
|
+
if (error instanceof EgressGuardException_1.default) {
|
|
330
|
+
return null;
|
|
331
|
+
}
|
|
332
|
+
/*
|
|
333
|
+
* The API monitor gets the AxiosError wrapped in an APIException (see
|
|
334
|
+
* getErrorResponse). The wrapper's own code is an ExceptionCode number
|
|
335
|
+
* and its message carries the errno but not the OS text, so the
|
|
336
|
+
* classifier would find nothing on it.
|
|
337
|
+
*/
|
|
338
|
+
const requestError = error instanceof ApiException_1.default && error.error ? error.error : error;
|
|
339
|
+
const failure = ProbeNetworkFailureUtil_1.default.classifyError({
|
|
340
|
+
error: requestError,
|
|
341
|
+
operation: ProbeNetworkFailureUtil_1.ProbeNetworkOperation.TcpConnect,
|
|
342
|
+
});
|
|
343
|
+
if (!failure) {
|
|
344
|
+
return null;
|
|
345
|
+
}
|
|
346
|
+
const requestHost = RequestFailedDetailsUtil.getRequestHost(requestError);
|
|
347
|
+
const connectAddresses = [];
|
|
348
|
+
RequestFailedDetailsUtil.collectConnectAddresses(requestError, 0, connectAddresses);
|
|
349
|
+
const isIPv6Destination = connectAddresses.length > 0
|
|
350
|
+
? connectAddresses.every((address) => {
|
|
351
|
+
return HostAddressUtil_1.default.isIPv6(address);
|
|
352
|
+
})
|
|
353
|
+
: Boolean(requestHost && HostAddressUtil_1.default.isIPv6(requestHost));
|
|
354
|
+
return {
|
|
355
|
+
failure: failure,
|
|
356
|
+
host: requestHost || UNKNOWN_REQUEST_HOST,
|
|
357
|
+
isIPv6Destination: isIPv6Destination,
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
/*
|
|
361
|
+
* The "Error Details" explanation of a probe-side failure. ENETUNREACH
|
|
362
|
+
* that is not towards IPv6 keeps the family-neutral description it
|
|
363
|
+
* always had.
|
|
364
|
+
*/
|
|
365
|
+
static getProbeSideFailureDescription(probeSideFailure) {
|
|
366
|
+
const failure = probeSideFailure.failure;
|
|
367
|
+
if (!probeSideFailure.isIPv6Destination) {
|
|
368
|
+
return failure.isCertain
|
|
369
|
+
? RequestFailureDescriptions_1.RequestFailureDescription.ProbeCouldNotConnect
|
|
370
|
+
: RequestFailureDescriptions_1.RequestFailureDescription.NetworkUnreachable;
|
|
371
|
+
}
|
|
372
|
+
/*
|
|
373
|
+
* EADDRNOTAVAIL from a TCP connect is also what a probe that has run
|
|
374
|
+
* out of local ports gets, IPv6 or not, so it is not stated as missing
|
|
375
|
+
* IPv6.
|
|
376
|
+
*/
|
|
377
|
+
if (failure.isCertain && failure.isCauseAmbiguous) {
|
|
378
|
+
return RequestFailureDescriptions_1.RequestFailureDescription.ProbeCouldNotConnectOverIPv6;
|
|
379
|
+
}
|
|
380
|
+
if (failure.isCertain) {
|
|
381
|
+
return RequestFailureDescriptions_1.RequestFailureDescription.ProbeCannotSendIPv6;
|
|
382
|
+
}
|
|
383
|
+
return RequestFailureDescriptions_1.RequestFailureDescription.NoIPv6Route;
|
|
384
|
+
}
|
|
385
|
+
/*
|
|
386
|
+
* What a server's HTTP status means, as the request's explanation says
|
|
387
|
+
* it after "Server responded with HTTP status 503.".
|
|
388
|
+
*/
|
|
389
|
+
static getHttpStatusDescription(status) {
|
|
390
|
+
if (status >= 500) {
|
|
391
|
+
return RequestFailureDescriptions_1.RequestFailureDescription.HttpServerError;
|
|
392
|
+
}
|
|
393
|
+
if (status === 404) {
|
|
394
|
+
return RequestFailureDescriptions_1.RequestFailureDescription.HttpNotFound;
|
|
395
|
+
}
|
|
396
|
+
if (status === 403) {
|
|
397
|
+
return RequestFailureDescriptions_1.RequestFailureDescription.HttpForbidden;
|
|
398
|
+
}
|
|
399
|
+
if (status === 401) {
|
|
400
|
+
return RequestFailureDescriptions_1.RequestFailureDescription.HttpUnauthorized;
|
|
401
|
+
}
|
|
402
|
+
if (status === 400) {
|
|
403
|
+
return RequestFailureDescriptions_1.RequestFailureDescription.HttpBadRequest;
|
|
404
|
+
}
|
|
405
|
+
if (status >= 400) {
|
|
406
|
+
return RequestFailureDescriptions_1.RequestFailureDescription.HttpClientError;
|
|
407
|
+
}
|
|
408
|
+
return RequestFailureDescriptions_1.RequestFailureDescription.HttpStatus;
|
|
409
|
+
}
|
|
410
|
+
/*
|
|
411
|
+
* The host of the URL an axios request was sent to, without IPv6
|
|
412
|
+
* brackets, or null when the error is not an axios one or has no usable
|
|
413
|
+
* URL. It is the hop that failed, which after a redirect is not
|
|
414
|
+
* necessarily the monitor's own URL.
|
|
415
|
+
*/
|
|
416
|
+
static getRequestHost(error) {
|
|
417
|
+
var _a;
|
|
418
|
+
if (!axios_1.default.isAxiosError(error) || !((_a = error.config) === null || _a === void 0 ? void 0 : _a.url)) {
|
|
419
|
+
return null;
|
|
420
|
+
}
|
|
421
|
+
try {
|
|
422
|
+
const requestUrl = new globalThis.URL(error.config.url, error.config.baseURL || undefined);
|
|
423
|
+
return HostAddressUtil_1.default.stripBrackets(requestUrl.hostname) || null;
|
|
424
|
+
}
|
|
425
|
+
catch (_b) {
|
|
426
|
+
return null;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
/*
|
|
430
|
+
* Every `address` a socket error in the chain names: the error's own, its
|
|
431
|
+
* cause's (axios and fetch keep the socket error there) and each attempt
|
|
432
|
+
* of an aggregate (Node's happy-eyeballs connect, one error per address).
|
|
433
|
+
*/
|
|
434
|
+
static collectConnectAddresses(value, depth, addresses) {
|
|
435
|
+
if (!value ||
|
|
436
|
+
typeof value !== "object" ||
|
|
437
|
+
depth > MAX_CONNECT_ADDRESS_DEPTH) {
|
|
438
|
+
return;
|
|
439
|
+
}
|
|
440
|
+
const errorLike = value;
|
|
441
|
+
if (typeof errorLike.address === "string" && errorLike.address) {
|
|
442
|
+
addresses.push(HostAddressUtil_1.default.stripBrackets(errorLike.address));
|
|
443
|
+
}
|
|
444
|
+
if (Array.isArray(errorLike.errors)) {
|
|
445
|
+
for (const attempt of errorLike.errors) {
|
|
446
|
+
RequestFailedDetailsUtil.collectConnectAddresses(attempt, depth + 1, addresses);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
RequestFailedDetailsUtil.collectConnectAddresses(errorLike.cause, depth + 1, addresses);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
exports.default = RequestFailedDetailsUtil;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const PATH_LEFT_TO_RIGHT_ISOLATE: string;
|
|
2
|
+
export declare const PATH_POP_DIRECTIONAL_ISOLATE: string;
|
|
3
|
+
export declare const PATH_DIRECTION_SCAN_LENGTH: number;
|
|
4
|
+
export declare function isPathSetApartInSentence(path: string): boolean;
|
|
5
|
+
export declare function setPathApartInSentence(path: string): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const PATH_LEFT_TO_RIGHT_ISOLATE: string;
|
|
2
|
+
export declare const PATH_POP_DIRECTIONAL_ISOLATE: string;
|
|
3
|
+
export declare const PATH_DIRECTION_SCAN_LENGTH: number;
|
|
4
|
+
export declare function isPathSetApartInSentence(path: string): boolean;
|
|
5
|
+
export declare function setPathApartInSentence(path: string): string;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* A PATH IN A SENTENCE READ FROM THE LEFT, SET APART.
|
|
4
|
+
*
|
|
5
|
+
* A path reads from the left on every page, its "/" first, and the Arabic
|
|
6
|
+
* or Persian words in it still read from the right (RFC 3987's
|
|
7
|
+
* bidirectional IRIs, as a browser's address bar draws them). A path with
|
|
8
|
+
* a letter of a script read from the right is set apart, left to right,
|
|
9
|
+
* in a Unicode isolate (LRI ... PDI); a path in letters read from the left
|
|
10
|
+
* comes back as it is.
|
|
11
|
+
*
|
|
12
|
+
* This is Types/ReadingDirection's isSetApartInSentence(path,
|
|
13
|
+
* LEFT_TO_RIGHT), wrapped in Types/CodeInSentence's LEFT_TO_RIGHT_ISOLATE,
|
|
14
|
+
* written out here because a module in Common/{Utils,Types}/Rum imports
|
|
15
|
+
* nothing from the rest of Common: the browser recorder inlines these
|
|
16
|
+
* modules into the page it is served to, and its SourceHygiene test holds
|
|
17
|
+
* every one of them to that. Tests/Utils/Rum/PathInSentence.test.ts holds
|
|
18
|
+
* this copy to ReadingDirection's rule, code point by code point.
|
|
19
|
+
*/
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.PATH_DIRECTION_SCAN_LENGTH = exports.PATH_POP_DIRECTIONAL_ISOLATE = exports.PATH_LEFT_TO_RIGHT_ISOLATE = void 0;
|
|
22
|
+
exports.isPathSetApartInSentence = isPathSetApartInSentence;
|
|
23
|
+
exports.setPathApartInSentence = setPathApartInSentence;
|
|
24
|
+
// Types/CodeInSentence's LEFT_TO_RIGHT_ISOLATE (LRI).
|
|
25
|
+
exports.PATH_LEFT_TO_RIGHT_ISOLATE = String.fromCharCode(0x2066);
|
|
26
|
+
// Types/ReadingDirection's POP_DIRECTIONAL_ISOLATE (PDI).
|
|
27
|
+
exports.PATH_POP_DIRECTIONAL_ISOLATE = String.fromCharCode(0x2069);
|
|
28
|
+
/*
|
|
29
|
+
* Types/ReadingDirection's TEXT_DIRECTION_SCAN_LENGTH: only the start of a
|
|
30
|
+
* path is read.
|
|
31
|
+
*/
|
|
32
|
+
exports.PATH_DIRECTION_SCAN_LENGTH = 4096;
|
|
33
|
+
/*
|
|
34
|
+
* A letter of a script written from right to left, by the scripts that use
|
|
35
|
+
* it: Types/ReadingDirection's RIGHT_TO_LEFT_LETTER_REGEX, which says why
|
|
36
|
+
* script extensions decide it, and only for a letter.
|
|
37
|
+
*/
|
|
38
|
+
const RIGHT_TO_LEFT_LETTER_REGEX = /(?=\p{L})[\p{Script_Extensions=Arabic}\p{Script_Extensions=Hebrew}\p{Script_Extensions=Syriac}\p{Script_Extensions=Thaana}\p{Script_Extensions=Nko}\p{Script_Extensions=Adlam}\p{Script_Extensions=Hanifi_Rohingya}\p{Script_Extensions=Mandaic}\p{Script_Extensions=Samaritan}]/u;
|
|
39
|
+
function isPathSetApartInSentence(path) {
|
|
40
|
+
return RIGHT_TO_LEFT_LETTER_REGEX.test(path.slice(0, exports.PATH_DIRECTION_SCAN_LENGTH));
|
|
41
|
+
}
|
|
42
|
+
function setPathApartInSentence(path) {
|
|
43
|
+
return isPathSetApartInSentence(path)
|
|
44
|
+
? `${exports.PATH_LEFT_TO_RIGHT_ISOLATE}${path}${exports.PATH_POP_DIRECTIONAL_ISOLATE}`
|
|
45
|
+
: path;
|
|
46
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import commonJsModule from "./PathInSentence.js";
|
|
2
|
+
export const PATH_DIRECTION_SCAN_LENGTH = commonJsModule.PATH_DIRECTION_SCAN_LENGTH;
|
|
3
|
+
export const PATH_LEFT_TO_RIGHT_ISOLATE = commonJsModule.PATH_LEFT_TO_RIGHT_ISOLATE;
|
|
4
|
+
export const PATH_POP_DIRECTIONAL_ISOLATE = commonJsModule.PATH_POP_DIRECTIONAL_ISOLATE;
|
|
5
|
+
export const isPathSetApartInSentence = commonJsModule.isPathSetApartInSentence;
|
|
6
|
+
export const setPathApartInSentence = commonJsModule.setPathApartInSentence;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export default class UrlScrubber {
|
|
2
2
|
static scrub(rawUrl: string, allowlistedQueryParams?: Array<string> | undefined): string;
|
|
3
|
+
static scrubHashRoute(hash: string): string;
|
|
4
|
+
static getHashRoute(hash: string): string | null;
|
|
5
|
+
static normalizePathSpelling(path: string): string;
|
|
6
|
+
private static spellWords;
|
|
3
7
|
static scrubPath(pathname: string): string;
|
|
4
8
|
static scrubQuery(params: URLSearchParams, allowlistedQueryParams?: Array<string> | undefined): string;
|
|
5
|
-
static
|
|
9
|
+
static getScrubbedPage(rawUrl: string): string;
|
|
6
10
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export default class UrlScrubber {
|
|
2
2
|
static scrub(rawUrl: string, allowlistedQueryParams?: Array<string> | undefined): string;
|
|
3
|
+
static scrubHashRoute(hash: string): string;
|
|
4
|
+
static getHashRoute(hash: string): string | null;
|
|
5
|
+
static normalizePathSpelling(path: string): string;
|
|
6
|
+
private static spellWords;
|
|
3
7
|
static scrubPath(pathname: string): string;
|
|
4
8
|
static scrubQuery(params: URLSearchParams, allowlistedQueryParams?: Array<string> | undefined): string;
|
|
5
|
-
static
|
|
9
|
+
static getScrubbedPage(rawUrl: string): string;
|
|
6
10
|
}
|