@mushi-mushi/core 1.40.0 → 1.41.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/README.md +1 -1
- package/dist/diagnostics.d.cts +2 -1
- package/dist/diagnostics.d.ts +2 -1
- package/dist/index.cjs +12 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -4
- package/dist/index.d.ts +11 -4
- package/dist/index.js +12 -28
- package/dist/index.js.map +1 -1
- package/dist/reporter-channels.d.cts +1 -1
- package/dist/reporter-channels.d.ts +1 -1
- package/dist/reporter-ui.d.cts +2 -1
- package/dist/reporter-ui.d.ts +2 -1
- package/dist/{types-GBfop58j.d.cts → types-FrXu2B7i.d.cts} +21 -1
- package/dist/{types-GBfop58j.d.ts → types-FrXu2B7i.d.ts} +21 -1
- package/package.json +7 -7
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as MushiApiClient, a as MushiConfig, b as MushiPreFilterConfig, c as MushiReport, d as MushiOfflineConfig, e as MushiEnvironment, f as MushiAnalyticsConfig, g as MushiPropertyValue, h as MushiBreadcrumb } from './types-
|
|
2
|
-
export { i as MushiActivityEvent, j as MushiApiCascadeConfig, k as MushiApiResponse, l as MushiAssistantConfig, m as MushiAssistantReply, n as MushiAssistantStep, o as MushiBannerConfig, p as MushiBannerLink, q as MushiBetaChangelogEntry, r as MushiBetaModeConfig, s as MushiCaptureConfig, t as MushiCaptureEventInput, u as MushiCaptureExceptionOptions, v as MushiConsoleEntry, w as MushiCooldownConfig, x as MushiCrossAppReport, y as MushiCustomCategory, z as MushiDiagnosticsResult, A as MushiDiscoverInventoryConfig, B as MushiDiscoveryEventPayload, C as MushiEventHandler, D as MushiEventType, E as MushiHallOfFameEntry, F as MushiInitConfig, G as MushiIntegrationsConfig, H as MushiLeaderboardEntry, I as MushiNetworkEntry, J as MushiNotificationsConfig, K as MushiOnDeviceClassifier, L as MushiOnDeviceClassifierInput, N as MushiOnDeviceClassifierResult, O as MushiPageContext, P as MushiPerformanceMetrics, Q as MushiPreset, R as MushiPrivacyConfig, S as MushiProactiveConfig, T as MushiProductEventPayload, U as MushiPushSubscriptionJSON, V as MushiReportBuilder, W as MushiReportCategory, X as MushiReportStatus, Y as MushiReporterChannelUnavailable, Z as MushiReporterComment, _ as MushiReporterNotificationPrefs, $ as MushiReporterPrefsUpdate, a0 as MushiReporterReport, a1 as MushiReporterReportDetail, a2 as MushiReporterTimelineItem, a3 as MushiReporterUpdates, a4 as MushiReputationResult, a5 as MushiRewardsConfig, a6 as MushiRuntimeSdkConfig, a7 as MushiRuntimeWidgetConfig, a8 as MushiSDKInstance, a9 as MushiSdkVersionInfo, aa as MushiSelectedElement, ab as MushiSentryConfig, ac as MushiSentryContext, ad as MushiSessionEventPayload, ae as MushiTesterReputation, af as MushiTierResult, ag as MushiTimelineEntry, ah as MushiTimelineKind, ai as MushiTracePropagationConfig, aj as MushiUrlMatcher, ak as MushiWidgetAnchor, al as MushiWidgetConfig } from './types-
|
|
1
|
+
import { M as MushiApiClient, a as MushiConfig, b as MushiPreFilterConfig, c as MushiReport, d as MushiOfflineConfig, e as MushiEnvironment, f as MushiAnalyticsConfig, g as MushiPropertyValue, h as MushiBreadcrumb } from './types-FrXu2B7i.cjs';
|
|
2
|
+
export { i as MushiActivityEvent, j as MushiApiCascadeConfig, k as MushiApiResponse, l as MushiAssistantConfig, m as MushiAssistantReply, n as MushiAssistantStep, o as MushiBannerConfig, p as MushiBannerLink, q as MushiBetaChangelogEntry, r as MushiBetaModeConfig, s as MushiCaptureConfig, t as MushiCaptureEventInput, u as MushiCaptureExceptionOptions, v as MushiConsoleEntry, w as MushiCooldownConfig, x as MushiCrossAppReport, y as MushiCustomCategory, z as MushiDiagnosticsResult, A as MushiDiscoverInventoryConfig, B as MushiDiscoveryEventPayload, C as MushiEventHandler, D as MushiEventType, E as MushiHallOfFameEntry, F as MushiInitConfig, G as MushiIntegrationsConfig, H as MushiLeaderboardEntry, I as MushiNetworkEntry, J as MushiNotificationsConfig, K as MushiOnDeviceClassifier, L as MushiOnDeviceClassifierInput, N as MushiOnDeviceClassifierResult, O as MushiPageContext, P as MushiPerformanceMetrics, Q as MushiPreset, R as MushiPrivacyConfig, S as MushiProactiveConfig, T as MushiProductEventPayload, U as MushiPushSubscriptionJSON, V as MushiReportBuilder, W as MushiReportCategory, X as MushiReportStatus, Y as MushiReporterChannelUnavailable, Z as MushiReporterComment, _ as MushiReporterNotificationPrefs, $ as MushiReporterPrefsUpdate, a0 as MushiReporterReport, a1 as MushiReporterReportDetail, a2 as MushiReporterTimelineItem, a3 as MushiReporterUpdates, a4 as MushiReputationResult, a5 as MushiRewardsConfig, a6 as MushiRuntimeSdkConfig, a7 as MushiRuntimeWidgetConfig, a8 as MushiSDKInstance, a9 as MushiSdkVersionInfo, aa as MushiSelectedElement, ab as MushiSentryConfig, ac as MushiSentryContext, ad as MushiSessionEventPayload, ae as MushiTesterReputation, af as MushiTierResult, ag as MushiTimelineEntry, ah as MushiTimelineKind, ai as MushiTracePropagationConfig, aj as MushiUrlMatcher, ak as MushiWidgetAnchor, al as MushiWidgetConfig } from './types-FrXu2B7i.cjs';
|
|
3
3
|
|
|
4
4
|
/** Replay the in-flight POST via keepalive/beacon during pagehide. */
|
|
5
5
|
declare function flushLastOutboundOnUnload(): boolean;
|
|
@@ -1371,10 +1371,16 @@ interface ProjectFaviconSource {
|
|
|
1371
1371
|
project_slug: string;
|
|
1372
1372
|
/** Operator override — wins over inferred domain when set. */
|
|
1373
1373
|
icon_url?: string | null;
|
|
1374
|
-
/** e.g. https://
|
|
1374
|
+
/** e.g. https://app.example.com — from SDK heartbeat or API key last_seen_origin */
|
|
1375
1375
|
sdk_origin?: string | null;
|
|
1376
1376
|
/** Connected GitHub/GitLab repo — used when SDK has not heartbeated yet. */
|
|
1377
1377
|
repo_url?: string | null;
|
|
1378
|
+
/**
|
|
1379
|
+
* Hosts that serve many apps under paths (the caller's own hosting origin),
|
|
1380
|
+
* so their root favicon belongs to the parent site, not this app. Data from
|
|
1381
|
+
* the caller's config, never a list of tenants here.
|
|
1382
|
+
*/
|
|
1383
|
+
shared_hosts?: readonly string[] | null;
|
|
1378
1384
|
}
|
|
1379
1385
|
declare function isUntrustedFaviconUrl(url: string): boolean;
|
|
1380
1386
|
/** Per-domain favicon URLs — first-party assets only (no CDN globes). */
|
|
@@ -1408,4 +1414,5 @@ declare function projectInitialsThemeIndex(projectId: string): number;
|
|
|
1408
1414
|
*/
|
|
1409
1415
|
declare function readPageFaviconHref(): string | null;
|
|
1410
1416
|
|
|
1411
|
-
export { ACTIVATION_EVENT,
|
|
1417
|
+
export { ACTIVATION_EVENT, DEFAULT_API_ENDPOINT, DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT, EVENT_NAME_RE, EVENT_PROPERTY_LIMITS, HABIT_EVENTS, MAX_REPORT_PAYLOAD_BYTES, MAX_SCREENSHOT_DATA_URL_BYTES, MUSHI_ACCENT_SHADOW, MUSHI_BANNER_BRAND_BORDER, MUSHI_BANNER_NEON, MUSHI_BEACON_MAX_BYTES, MUSHI_BORDER, MUSHI_COLORS_DARK, MUSHI_COLORS_LIGHT, MUSHI_CONTROL_DISABLED, MUSHI_COPY, MUSHI_DURATION, MUSHI_EVENTS, MUSHI_EVENT_NAMES, MUSHI_GEOMETRY, MUSHI_IDENTITY_TOKEN_PREFIX, MUSHI_INTERNAL_HEADER, MUSHI_INTERNAL_INIT_MARKER, MUSHI_INVERSE, MUSHI_LETTER_SPACING, MUSHI_MOTION, MUSHI_ON_ACCENT, MUSHI_OPACITY, MUSHI_PROJECT_HEADER, MUSHI_RADIUS, MUSHI_REPORTER_STATUS, MUSHI_REPORT_TYPE_COLORS, MUSHI_REPORT_TYPE_WASH, MUSHI_SDK_PACKAGE_HEADER, MUSHI_SDK_VERSION_HEADER, MUSHI_SHADOW_INK, MUSHI_SPACING, MUSHI_SURFACES, MUSHI_TIER_COLORS, MUSHI_TYPE, MUSHI_USER_TOKEN_HEADER, MUSHI_Z, MushiAnalyticsConfig, MushiApiClient, MushiBreadcrumb, MushiConfig, MushiEnvironment, MushiOfflineConfig, MushiPreFilterConfig, MushiPropertyValue, MushiReport, REGION_ENDPOINTS, analyticsBlockReason, buildBeaconEnvelope, buildIdentityClaims, buildSdkIngestHeaders, captureEnvironment, checkReportPayloadSize, createApiClient, createBreadcrumbBuffer, createLogger, createOfflineQueue, createPiiScrubber, createPreFilter, createRateLimiter, destroyEventTracker, destroySessionTracker, diagnoseEnvConfig, dntActive, estimateJsonBytes, expandPreset, extractTunnelPath, faviconUrlCandidates, flushEvents, flushLastOutboundOnUnload, formatBytes, getBackoffDelay, getDeviceFingerprintHash, getEventAnonymousId, getReporterToken, getSessionId, githubRepoDomainHint, hmacSha256Hex, initEventTracker, initSessionTracker, isAutomatedBrowser, isEventTrackingActive, isLikelyGenericFavicon, isMushiBeaconEnvelope, isPageUnloading, isSameOriginOrRelative, isUntrustedFaviconUrl, isValidEventName, markPageUnloading, matchesErrorFilter, mushiPalette, mushiTokens, newUuid, noopLogger, normaliseThrown, onAnalyticsConsentChange, originToDomain, parseIdentityToken, parseRetryAfter, projectFaviconUrlCandidates, projectInitials, projectInitialsThemeIndex, propertiesWithinByteLimit, readPageFaviconHref, resolveAnalyticsConsent, resolveEnvConfig, resolveProjectDomain, resolveProjectFaviconDomains, resolveRegionEndpoint, resolveRequestBaseUrl, resolveWidgetAccent, safeWidgetHex, sanitizeEventProperties, scrubPii, scrubUrl, sendOnUnload, setAnalyticsConsent, setEventConsent, sha256Hex, shouldDropCapturedError, trackEvent, trackPageView, updateEventIdentity, updateSessionIdentity, validateConfig };
|
|
1418
|
+
export type { AnalyticsBlockReason, AnalyticsConsentState, ApiClientOptions, BreadcrumbBuffer, BreadcrumbBufferOptions, EnvConfigDiagnostics, EnvNearMiss, EventTrackerOptions, LogEntry, LogFormat, LogLevel, Logger, LoggerOptions, MushiBeaconEnvelope, MushiColorPalette, MushiErrorFilter, MushiEventName, MushiEventProperties, MushiIdentityClaims, MushiInternalRequestKind, MushiRegion, MushiReportTypeId, MushiReportTypeTone, MushiSurface, MushiThemeMode, MushiTokenSnapshot, NormalisedException, OfflineQueue, PayloadGuardResult, PiiScrubberConfig, PreFilterResult, ProjectFaviconSource, RateLimiter, RateLimiterConfig, ResolvedEnvConfig, SessionTrackerOptions };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as MushiApiClient, a as MushiConfig, b as MushiPreFilterConfig, c as MushiReport, d as MushiOfflineConfig, e as MushiEnvironment, f as MushiAnalyticsConfig, g as MushiPropertyValue, h as MushiBreadcrumb } from './types-
|
|
2
|
-
export { i as MushiActivityEvent, j as MushiApiCascadeConfig, k as MushiApiResponse, l as MushiAssistantConfig, m as MushiAssistantReply, n as MushiAssistantStep, o as MushiBannerConfig, p as MushiBannerLink, q as MushiBetaChangelogEntry, r as MushiBetaModeConfig, s as MushiCaptureConfig, t as MushiCaptureEventInput, u as MushiCaptureExceptionOptions, v as MushiConsoleEntry, w as MushiCooldownConfig, x as MushiCrossAppReport, y as MushiCustomCategory, z as MushiDiagnosticsResult, A as MushiDiscoverInventoryConfig, B as MushiDiscoveryEventPayload, C as MushiEventHandler, D as MushiEventType, E as MushiHallOfFameEntry, F as MushiInitConfig, G as MushiIntegrationsConfig, H as MushiLeaderboardEntry, I as MushiNetworkEntry, J as MushiNotificationsConfig, K as MushiOnDeviceClassifier, L as MushiOnDeviceClassifierInput, N as MushiOnDeviceClassifierResult, O as MushiPageContext, P as MushiPerformanceMetrics, Q as MushiPreset, R as MushiPrivacyConfig, S as MushiProactiveConfig, T as MushiProductEventPayload, U as MushiPushSubscriptionJSON, V as MushiReportBuilder, W as MushiReportCategory, X as MushiReportStatus, Y as MushiReporterChannelUnavailable, Z as MushiReporterComment, _ as MushiReporterNotificationPrefs, $ as MushiReporterPrefsUpdate, a0 as MushiReporterReport, a1 as MushiReporterReportDetail, a2 as MushiReporterTimelineItem, a3 as MushiReporterUpdates, a4 as MushiReputationResult, a5 as MushiRewardsConfig, a6 as MushiRuntimeSdkConfig, a7 as MushiRuntimeWidgetConfig, a8 as MushiSDKInstance, a9 as MushiSdkVersionInfo, aa as MushiSelectedElement, ab as MushiSentryConfig, ac as MushiSentryContext, ad as MushiSessionEventPayload, ae as MushiTesterReputation, af as MushiTierResult, ag as MushiTimelineEntry, ah as MushiTimelineKind, ai as MushiTracePropagationConfig, aj as MushiUrlMatcher, ak as MushiWidgetAnchor, al as MushiWidgetConfig } from './types-
|
|
1
|
+
import { M as MushiApiClient, a as MushiConfig, b as MushiPreFilterConfig, c as MushiReport, d as MushiOfflineConfig, e as MushiEnvironment, f as MushiAnalyticsConfig, g as MushiPropertyValue, h as MushiBreadcrumb } from './types-FrXu2B7i.js';
|
|
2
|
+
export { i as MushiActivityEvent, j as MushiApiCascadeConfig, k as MushiApiResponse, l as MushiAssistantConfig, m as MushiAssistantReply, n as MushiAssistantStep, o as MushiBannerConfig, p as MushiBannerLink, q as MushiBetaChangelogEntry, r as MushiBetaModeConfig, s as MushiCaptureConfig, t as MushiCaptureEventInput, u as MushiCaptureExceptionOptions, v as MushiConsoleEntry, w as MushiCooldownConfig, x as MushiCrossAppReport, y as MushiCustomCategory, z as MushiDiagnosticsResult, A as MushiDiscoverInventoryConfig, B as MushiDiscoveryEventPayload, C as MushiEventHandler, D as MushiEventType, E as MushiHallOfFameEntry, F as MushiInitConfig, G as MushiIntegrationsConfig, H as MushiLeaderboardEntry, I as MushiNetworkEntry, J as MushiNotificationsConfig, K as MushiOnDeviceClassifier, L as MushiOnDeviceClassifierInput, N as MushiOnDeviceClassifierResult, O as MushiPageContext, P as MushiPerformanceMetrics, Q as MushiPreset, R as MushiPrivacyConfig, S as MushiProactiveConfig, T as MushiProductEventPayload, U as MushiPushSubscriptionJSON, V as MushiReportBuilder, W as MushiReportCategory, X as MushiReportStatus, Y as MushiReporterChannelUnavailable, Z as MushiReporterComment, _ as MushiReporterNotificationPrefs, $ as MushiReporterPrefsUpdate, a0 as MushiReporterReport, a1 as MushiReporterReportDetail, a2 as MushiReporterTimelineItem, a3 as MushiReporterUpdates, a4 as MushiReputationResult, a5 as MushiRewardsConfig, a6 as MushiRuntimeSdkConfig, a7 as MushiRuntimeWidgetConfig, a8 as MushiSDKInstance, a9 as MushiSdkVersionInfo, aa as MushiSelectedElement, ab as MushiSentryConfig, ac as MushiSentryContext, ad as MushiSessionEventPayload, ae as MushiTesterReputation, af as MushiTierResult, ag as MushiTimelineEntry, ah as MushiTimelineKind, ai as MushiTracePropagationConfig, aj as MushiUrlMatcher, ak as MushiWidgetAnchor, al as MushiWidgetConfig } from './types-FrXu2B7i.js';
|
|
3
3
|
|
|
4
4
|
/** Replay the in-flight POST via keepalive/beacon during pagehide. */
|
|
5
5
|
declare function flushLastOutboundOnUnload(): boolean;
|
|
@@ -1371,10 +1371,16 @@ interface ProjectFaviconSource {
|
|
|
1371
1371
|
project_slug: string;
|
|
1372
1372
|
/** Operator override — wins over inferred domain when set. */
|
|
1373
1373
|
icon_url?: string | null;
|
|
1374
|
-
/** e.g. https://
|
|
1374
|
+
/** e.g. https://app.example.com — from SDK heartbeat or API key last_seen_origin */
|
|
1375
1375
|
sdk_origin?: string | null;
|
|
1376
1376
|
/** Connected GitHub/GitLab repo — used when SDK has not heartbeated yet. */
|
|
1377
1377
|
repo_url?: string | null;
|
|
1378
|
+
/**
|
|
1379
|
+
* Hosts that serve many apps under paths (the caller's own hosting origin),
|
|
1380
|
+
* so their root favicon belongs to the parent site, not this app. Data from
|
|
1381
|
+
* the caller's config, never a list of tenants here.
|
|
1382
|
+
*/
|
|
1383
|
+
shared_hosts?: readonly string[] | null;
|
|
1378
1384
|
}
|
|
1379
1385
|
declare function isUntrustedFaviconUrl(url: string): boolean;
|
|
1380
1386
|
/** Per-domain favicon URLs — first-party assets only (no CDN globes). */
|
|
@@ -1408,4 +1414,5 @@ declare function projectInitialsThemeIndex(projectId: string): number;
|
|
|
1408
1414
|
*/
|
|
1409
1415
|
declare function readPageFaviconHref(): string | null;
|
|
1410
1416
|
|
|
1411
|
-
export { ACTIVATION_EVENT,
|
|
1417
|
+
export { ACTIVATION_EVENT, DEFAULT_API_ENDPOINT, DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT, EVENT_NAME_RE, EVENT_PROPERTY_LIMITS, HABIT_EVENTS, MAX_REPORT_PAYLOAD_BYTES, MAX_SCREENSHOT_DATA_URL_BYTES, MUSHI_ACCENT_SHADOW, MUSHI_BANNER_BRAND_BORDER, MUSHI_BANNER_NEON, MUSHI_BEACON_MAX_BYTES, MUSHI_BORDER, MUSHI_COLORS_DARK, MUSHI_COLORS_LIGHT, MUSHI_CONTROL_DISABLED, MUSHI_COPY, MUSHI_DURATION, MUSHI_EVENTS, MUSHI_EVENT_NAMES, MUSHI_GEOMETRY, MUSHI_IDENTITY_TOKEN_PREFIX, MUSHI_INTERNAL_HEADER, MUSHI_INTERNAL_INIT_MARKER, MUSHI_INVERSE, MUSHI_LETTER_SPACING, MUSHI_MOTION, MUSHI_ON_ACCENT, MUSHI_OPACITY, MUSHI_PROJECT_HEADER, MUSHI_RADIUS, MUSHI_REPORTER_STATUS, MUSHI_REPORT_TYPE_COLORS, MUSHI_REPORT_TYPE_WASH, MUSHI_SDK_PACKAGE_HEADER, MUSHI_SDK_VERSION_HEADER, MUSHI_SHADOW_INK, MUSHI_SPACING, MUSHI_SURFACES, MUSHI_TIER_COLORS, MUSHI_TYPE, MUSHI_USER_TOKEN_HEADER, MUSHI_Z, MushiAnalyticsConfig, MushiApiClient, MushiBreadcrumb, MushiConfig, MushiEnvironment, MushiOfflineConfig, MushiPreFilterConfig, MushiPropertyValue, MushiReport, REGION_ENDPOINTS, analyticsBlockReason, buildBeaconEnvelope, buildIdentityClaims, buildSdkIngestHeaders, captureEnvironment, checkReportPayloadSize, createApiClient, createBreadcrumbBuffer, createLogger, createOfflineQueue, createPiiScrubber, createPreFilter, createRateLimiter, destroyEventTracker, destroySessionTracker, diagnoseEnvConfig, dntActive, estimateJsonBytes, expandPreset, extractTunnelPath, faviconUrlCandidates, flushEvents, flushLastOutboundOnUnload, formatBytes, getBackoffDelay, getDeviceFingerprintHash, getEventAnonymousId, getReporterToken, getSessionId, githubRepoDomainHint, hmacSha256Hex, initEventTracker, initSessionTracker, isAutomatedBrowser, isEventTrackingActive, isLikelyGenericFavicon, isMushiBeaconEnvelope, isPageUnloading, isSameOriginOrRelative, isUntrustedFaviconUrl, isValidEventName, markPageUnloading, matchesErrorFilter, mushiPalette, mushiTokens, newUuid, noopLogger, normaliseThrown, onAnalyticsConsentChange, originToDomain, parseIdentityToken, parseRetryAfter, projectFaviconUrlCandidates, projectInitials, projectInitialsThemeIndex, propertiesWithinByteLimit, readPageFaviconHref, resolveAnalyticsConsent, resolveEnvConfig, resolveProjectDomain, resolveProjectFaviconDomains, resolveRegionEndpoint, resolveRequestBaseUrl, resolveWidgetAccent, safeWidgetHex, sanitizeEventProperties, scrubPii, scrubUrl, sendOnUnload, setAnalyticsConsent, setEventConsent, sha256Hex, shouldDropCapturedError, trackEvent, trackPageView, updateEventIdentity, updateSessionIdentity, validateConfig };
|
|
1418
|
+
export type { AnalyticsBlockReason, AnalyticsConsentState, ApiClientOptions, BreadcrumbBuffer, BreadcrumbBufferOptions, EnvConfigDiagnostics, EnvNearMiss, EventTrackerOptions, LogEntry, LogFormat, LogLevel, Logger, LoggerOptions, MushiBeaconEnvelope, MushiColorPalette, MushiErrorFilter, MushiEventName, MushiEventProperties, MushiIdentityClaims, MushiInternalRequestKind, MushiRegion, MushiReportTypeId, MushiReportTypeTone, MushiSurface, MushiThemeMode, MushiTokenSnapshot, NormalisedException, OfflineQueue, PayloadGuardResult, PiiScrubberConfig, PreFilterResult, ProjectFaviconSource, RateLimiter, RateLimiterConfig, ResolvedEnvConfig, SessionTrackerOptions };
|
package/dist/index.js
CHANGED
|
@@ -281,7 +281,7 @@ function createApiClient(options) {
|
|
|
281
281
|
const errorBody = await response.json().catch(() => ({}));
|
|
282
282
|
if ((response.status === 401 || response.status === 403) && !_credWarningEmitted) {
|
|
283
283
|
_credWarningEmitted = true;
|
|
284
|
-
const where = baseUrl === DEFAULT_API_ENDPOINT ? "Get the correct values at: https://kensaur.us/
|
|
284
|
+
const where = baseUrl === DEFAULT_API_ENDPOINT ? "Get the correct values at: https://mushi.kensaur.us/projects" : "Get the correct values from your Mushi console's Projects page.";
|
|
285
285
|
console.error(
|
|
286
286
|
`[Mushi] Credentials rejected (HTTP ${response.status}). Check your Project ID and API key scope (must be "report:write"). ` + where
|
|
287
287
|
);
|
|
@@ -3154,28 +3154,6 @@ function parseIdentityToken(token) {
|
|
|
3154
3154
|
}
|
|
3155
3155
|
|
|
3156
3156
|
// src/favicon.ts
|
|
3157
|
-
var MULTI_TENANT_PARENT_HOSTS = /* @__PURE__ */ new Set(["kensaur.us", "www.kensaur.us"]);
|
|
3158
|
-
var SLUG_DOMAIN_HINTS = {
|
|
3159
|
-
"glot-it": "glot.it",
|
|
3160
|
-
glotit: "glot.it",
|
|
3161
|
-
"solo-boss-cloud": "solo-boss.kensaur.us",
|
|
3162
|
-
"mushi-mushi": "kensaur.us",
|
|
3163
|
-
"how-to-talk-to-girls": "talk.kensaur.us",
|
|
3164
|
-
htttg: "talk.kensaur.us",
|
|
3165
|
-
tsumagoi: "tsumagoi.kensaur.us"
|
|
3166
|
-
};
|
|
3167
|
-
var SLUG_ICON_URL_HINTS = {
|
|
3168
|
-
"mushi-mushi": "https://kensaur.us/mushi-mushi/admin/favicon.svg",
|
|
3169
|
-
"solo-boss-cloud": "https://solo-boss.kensaur.us/favicon.svg",
|
|
3170
|
-
"glot-it": "https://kensaur.us/glot-it/apple-touch-icon.png",
|
|
3171
|
-
glotit: "https://kensaur.us/glot-it/apple-touch-icon.png",
|
|
3172
|
-
"the-wanting-mind": "https://kensaur.us/the-wanting-mind/pwa-512x512.png",
|
|
3173
|
-
"how-to-talk-to-girls": "https://talk.kensaur.us/pwa-192.png",
|
|
3174
|
-
htttg: "https://talk.kensaur.us/pwa-192.png",
|
|
3175
|
-
tsumagoi: "https://tsumagoi.kensaur.us/apple-touch-icon.png",
|
|
3176
|
-
"help-her-take-photo": "https://kensaur.us/help-her-take-photo/assets/apple-touch-icon.png",
|
|
3177
|
-
"yen-yen": "https://kensaur.us/yen-yen/icon.svg"
|
|
3178
|
-
};
|
|
3179
3157
|
var UNTRUSTED_FAVICON_HOSTS = [
|
|
3180
3158
|
"www.google.com",
|
|
3181
3159
|
"icons.duckduckgo.com",
|
|
@@ -3205,9 +3183,9 @@ function resolveProjectFaviconDomains(source) {
|
|
|
3205
3183
|
out.push(n);
|
|
3206
3184
|
};
|
|
3207
3185
|
add(githubRepoDomainHint(source.repo_url));
|
|
3208
|
-
|
|
3209
|
-
const
|
|
3210
|
-
if (fromOrigin && !
|
|
3186
|
+
const fromOrigin = source.sdk_origin && !mountedUnderPath(source.sdk_origin) ? originToDomain(source.sdk_origin) : null;
|
|
3187
|
+
const shared = new Set((source.shared_hosts ?? []).map((h) => h.trim().toLowerCase()).filter(Boolean));
|
|
3188
|
+
if (fromOrigin && !shared.has(fromOrigin) && !shared.has(fromOrigin.replace(/^www\./, ""))) {
|
|
3211
3189
|
add(fromOrigin);
|
|
3212
3190
|
}
|
|
3213
3191
|
return out;
|
|
@@ -3221,8 +3199,6 @@ function projectFaviconUrlCandidates(source, size = 32) {
|
|
|
3221
3199
|
seen.add(url);
|
|
3222
3200
|
urls.push(url);
|
|
3223
3201
|
};
|
|
3224
|
-
const slugHint = SLUG_ICON_URL_HINTS[source.project_slug.toLowerCase()];
|
|
3225
|
-
if (slugHint) push(slugHint);
|
|
3226
3202
|
for (const domain of resolveProjectFaviconDomains(source)) {
|
|
3227
3203
|
for (const url of faviconUrlCandidates(domain, size)) {
|
|
3228
3204
|
push(url);
|
|
@@ -3230,6 +3206,14 @@ function projectFaviconUrlCandidates(source, size = 32) {
|
|
|
3230
3206
|
}
|
|
3231
3207
|
return urls;
|
|
3232
3208
|
}
|
|
3209
|
+
function mountedUnderPath(origin) {
|
|
3210
|
+
try {
|
|
3211
|
+
const url = new URL(origin.includes("://") ? origin : `https://${origin}`);
|
|
3212
|
+
return url.pathname.replace(/\/+$/, "") !== "";
|
|
3213
|
+
} catch {
|
|
3214
|
+
return false;
|
|
3215
|
+
}
|
|
3216
|
+
}
|
|
3233
3217
|
function originToDomain(origin) {
|
|
3234
3218
|
const trimmed = origin.trim();
|
|
3235
3219
|
if (!trimmed) return null;
|