sitepong 0.2.13 → 0.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/sitepong.min.js +5 -5
- package/dist/cdn/sitepong.min.js.map +1 -1
- package/dist/entries/rn.d.ts +28 -1
- package/dist/entries/rn.js +44 -5
- package/dist/entries/rn.js.map +1 -1
- package/dist/entries/web.js +30 -2
- package/dist/entries/web.js.map +1 -1
- package/dist/entries/web.mjs +30 -2
- package/dist/entries/web.mjs.map +1 -1
- package/dist/index.d.mts +25 -2
- package/dist/index.d.ts +25 -2
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -1
- package/dist/index.mjs.map +1 -1
- package/dist/react/index.js +5 -1
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +5 -1
- package/dist/react/index.mjs.map +1 -1
- package/ios/ScreenRecorder/ScreenRecorderModule.swift +9 -3
- package/ios/WatchtowerCore/StructuralRecorder.swift +163 -19
- package/ios/WatchtowerCore/TapEvent.swift +5 -0
- package/ios/WatchtowerCore/Watchtower.swift +48 -3
- package/ios/WatchtowerCore/WatchtowerEngine.swift +26 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -222,6 +222,17 @@ interface WatchtowerCaptureConfig {
|
|
|
222
222
|
/** CSS selector whose text is masked in the snapshot. */
|
|
223
223
|
maskSelector?: string;
|
|
224
224
|
debug?: boolean;
|
|
225
|
+
/**
|
|
226
|
+
* Release channel / environment to tag events with (development | preview |
|
|
227
|
+
* production | …). Defaults to 'production' on web. A channel listed in
|
|
228
|
+
* `ignoreChannels` suppresses capture entirely.
|
|
229
|
+
*/
|
|
230
|
+
channel?: string;
|
|
231
|
+
/**
|
|
232
|
+
* Channels for which capture is a complete no-op (default ['development']).
|
|
233
|
+
* Set to [] to capture every channel.
|
|
234
|
+
*/
|
|
235
|
+
ignoreChannels?: string[];
|
|
225
236
|
/** Injectable rasterizer (tests). Defaults to the DOM SVG-foreignObject rasterizer. */
|
|
226
237
|
rasterizer?: PageRasterizer;
|
|
227
238
|
/** Injectable transport (tests). Defaults to fetch. */
|
|
@@ -234,6 +245,10 @@ declare class WatchtowerWebCapture {
|
|
|
234
245
|
private flushTimer;
|
|
235
246
|
private flushFailures;
|
|
236
247
|
private disabled;
|
|
248
|
+
/** Resolved release channel tagged on every event. */
|
|
249
|
+
private channel;
|
|
250
|
+
/** When true, this channel is ignored → start() is a complete no-op. */
|
|
251
|
+
private channelSuppressed;
|
|
237
252
|
private active;
|
|
238
253
|
private distinctId;
|
|
239
254
|
private currentScreen;
|
|
@@ -1216,6 +1231,14 @@ interface SitePongInitConfig extends SitePongConfig {
|
|
|
1216
1231
|
blockSelector?: string;
|
|
1217
1232
|
/** CSS selector whose text is masked in the screen template */
|
|
1218
1233
|
maskSelector?: string;
|
|
1234
|
+
/**
|
|
1235
|
+
* Release channel / environment tagged on events (development | preview |
|
|
1236
|
+
* production | …). Defaults to the SDK `environment` (usually 'production').
|
|
1237
|
+
* A channel in `ignoreChannels` suppresses capture entirely.
|
|
1238
|
+
*/
|
|
1239
|
+
channel?: string;
|
|
1240
|
+
/** Channels for which capture is a no-op (default ['development']). */
|
|
1241
|
+
ignoreChannels?: string[];
|
|
1219
1242
|
};
|
|
1220
1243
|
/** Cron monitoring configuration */
|
|
1221
1244
|
crons?: {
|
|
@@ -1319,7 +1342,7 @@ declare class SitePongClient {
|
|
|
1319
1342
|
* Register a callback invoked whenever identify(userId) is called.
|
|
1320
1343
|
* Used by platform entries (e.g. RN) to wire side effects like push re-registration.
|
|
1321
1344
|
*/
|
|
1322
|
-
registerIdentifyHook(hook: (userId: string) => void): () => void;
|
|
1345
|
+
registerIdentifyHook(hook: (userId: string, traits?: UserTraits) => void): () => void;
|
|
1323
1346
|
group(groupId: string, traits?: GroupTraits): void;
|
|
1324
1347
|
resetAnalytics(): void;
|
|
1325
1348
|
getVisitorId(): Promise<VisitorIdResult>;
|
|
@@ -1473,6 +1496,6 @@ declare const flushProfiles: () => Promise<void>;
|
|
|
1473
1496
|
declare const getRemoteConfig: () => RemoteConfig | null;
|
|
1474
1497
|
declare const isRemoteConfigFeatureEnabled: (key: string, defaultValue?: boolean) => boolean;
|
|
1475
1498
|
declare const onRemoteConfigChange: (listener: (config: RemoteConfig) => void) => () => void;
|
|
1476
|
-
declare const registerIdentifyHook: (hook: (userId: string) => void) => () => void;
|
|
1499
|
+
declare const registerIdentifyHook: (hook: (userId: string, traits?: UserTraits) => void) => () => void;
|
|
1477
1500
|
|
|
1478
1501
|
export { type CapturedError, type CronCheckinOptions, type CronHandle, DEFAULT_SUPERLINK_ENDPOINT, type DatabaseQueryEvent, type DatabaseTrackerConfig, type DeferredDeepLinkHandler, type DeviceInfo, type DeviceSignals, type EnvironmentAdapter, type ErrorContext, type FraudCheckResult, GroupTraits, type MetricOptions, type MutableRNEnvironmentAdapter, type PerformanceConfig, type PerformanceSpan, type PerformanceTransaction, type PlatformName, type ProfileData, type ProfileFrame, type ProfilerConfig, type RemoteConfig, type RemoteConfigFeatures, type RemoteConfigSampling, ReplayConfig, type ResourceTimingBreakdown, type SitePongConfig, type SitePongInitConfig, SuperLinkClient, type SuperLinkConfig, type SuperLinkDeepLink, type SuperLinkEventType, type SuperLinkFingerprint, type SuperLinkIdentityMetadata, type SuperLinkMatchRequest, type SuperLinkMatchResponse, type SuperLinkMatchType, type SuperLinkPlatform, type TraceContext, TracePropagator, TrackProperties, UserTraits, type VisitorIdResult, type WebManagerFactories, type WebVitals, addBreadcrumb, areFlagsReady, captureError, captureMessage, captureWebDeepLink, clearAnonymousId, clearUser, sitepong as client, completeFromScan, createTraceContext, cronCheckin, cronStart, cronWrap, dbTrack, dbTrackSync, sitepong as default, endSpan, endTransaction, extractIdentityMetadata, extractTrace, flush, flushMetrics, flushProfiles, generateSpanId, generateTraceId, getAllFlags, getAnonymousId, getDbNPlusOnePatterns, getDbQueryCount, getDeepLink, getDeviceSignals, getFlag, getFraudCheck, getLatestProfile, getMatchedDeepLink, getProfiles, getRemoteConfig, getReplaySessionId, getVariant, getVariantPayload, getVisitorId, getWebVitals, group, identify, init, initRN, initSuperLink, isInitialized, isRemoteConfigFeatureEnabled, isReplayRecording, metricDistribution, metricGauge, metricHistogram, metricIncrement, metricStartTimer, metricTime, onDeferredDeepLink, onRemoteConfigChange, parseUniversalLink, profile, propagateTrace, refreshFlags, registerIdentifyHook, registerWebManagerFactories, resetAnalytics, resetDbQueryCount, setAnonymousId, setContext, setCurrentScreen, setEnvironment, setRNGetCurrentScreen, setTags, setUser, startProfileSpan, startReplay, startSpan, startTransaction, startWatchtowerCapture, stopReplay, stopWatchtowerCapture, superlinkClient, identify$1 as superlinkIdentify, track, trackPageView, waitForFlags, writeClipboardToken };
|
package/dist/index.d.ts
CHANGED
|
@@ -222,6 +222,17 @@ interface WatchtowerCaptureConfig {
|
|
|
222
222
|
/** CSS selector whose text is masked in the snapshot. */
|
|
223
223
|
maskSelector?: string;
|
|
224
224
|
debug?: boolean;
|
|
225
|
+
/**
|
|
226
|
+
* Release channel / environment to tag events with (development | preview |
|
|
227
|
+
* production | …). Defaults to 'production' on web. A channel listed in
|
|
228
|
+
* `ignoreChannels` suppresses capture entirely.
|
|
229
|
+
*/
|
|
230
|
+
channel?: string;
|
|
231
|
+
/**
|
|
232
|
+
* Channels for which capture is a complete no-op (default ['development']).
|
|
233
|
+
* Set to [] to capture every channel.
|
|
234
|
+
*/
|
|
235
|
+
ignoreChannels?: string[];
|
|
225
236
|
/** Injectable rasterizer (tests). Defaults to the DOM SVG-foreignObject rasterizer. */
|
|
226
237
|
rasterizer?: PageRasterizer;
|
|
227
238
|
/** Injectable transport (tests). Defaults to fetch. */
|
|
@@ -234,6 +245,10 @@ declare class WatchtowerWebCapture {
|
|
|
234
245
|
private flushTimer;
|
|
235
246
|
private flushFailures;
|
|
236
247
|
private disabled;
|
|
248
|
+
/** Resolved release channel tagged on every event. */
|
|
249
|
+
private channel;
|
|
250
|
+
/** When true, this channel is ignored → start() is a complete no-op. */
|
|
251
|
+
private channelSuppressed;
|
|
237
252
|
private active;
|
|
238
253
|
private distinctId;
|
|
239
254
|
private currentScreen;
|
|
@@ -1216,6 +1231,14 @@ interface SitePongInitConfig extends SitePongConfig {
|
|
|
1216
1231
|
blockSelector?: string;
|
|
1217
1232
|
/** CSS selector whose text is masked in the screen template */
|
|
1218
1233
|
maskSelector?: string;
|
|
1234
|
+
/**
|
|
1235
|
+
* Release channel / environment tagged on events (development | preview |
|
|
1236
|
+
* production | …). Defaults to the SDK `environment` (usually 'production').
|
|
1237
|
+
* A channel in `ignoreChannels` suppresses capture entirely.
|
|
1238
|
+
*/
|
|
1239
|
+
channel?: string;
|
|
1240
|
+
/** Channels for which capture is a no-op (default ['development']). */
|
|
1241
|
+
ignoreChannels?: string[];
|
|
1219
1242
|
};
|
|
1220
1243
|
/** Cron monitoring configuration */
|
|
1221
1244
|
crons?: {
|
|
@@ -1319,7 +1342,7 @@ declare class SitePongClient {
|
|
|
1319
1342
|
* Register a callback invoked whenever identify(userId) is called.
|
|
1320
1343
|
* Used by platform entries (e.g. RN) to wire side effects like push re-registration.
|
|
1321
1344
|
*/
|
|
1322
|
-
registerIdentifyHook(hook: (userId: string) => void): () => void;
|
|
1345
|
+
registerIdentifyHook(hook: (userId: string, traits?: UserTraits) => void): () => void;
|
|
1323
1346
|
group(groupId: string, traits?: GroupTraits): void;
|
|
1324
1347
|
resetAnalytics(): void;
|
|
1325
1348
|
getVisitorId(): Promise<VisitorIdResult>;
|
|
@@ -1473,6 +1496,6 @@ declare const flushProfiles: () => Promise<void>;
|
|
|
1473
1496
|
declare const getRemoteConfig: () => RemoteConfig | null;
|
|
1474
1497
|
declare const isRemoteConfigFeatureEnabled: (key: string, defaultValue?: boolean) => boolean;
|
|
1475
1498
|
declare const onRemoteConfigChange: (listener: (config: RemoteConfig) => void) => () => void;
|
|
1476
|
-
declare const registerIdentifyHook: (hook: (userId: string) => void) => () => void;
|
|
1499
|
+
declare const registerIdentifyHook: (hook: (userId: string, traits?: UserTraits) => void) => () => void;
|
|
1477
1500
|
|
|
1478
1501
|
export { type CapturedError, type CronCheckinOptions, type CronHandle, DEFAULT_SUPERLINK_ENDPOINT, type DatabaseQueryEvent, type DatabaseTrackerConfig, type DeferredDeepLinkHandler, type DeviceInfo, type DeviceSignals, type EnvironmentAdapter, type ErrorContext, type FraudCheckResult, GroupTraits, type MetricOptions, type MutableRNEnvironmentAdapter, type PerformanceConfig, type PerformanceSpan, type PerformanceTransaction, type PlatformName, type ProfileData, type ProfileFrame, type ProfilerConfig, type RemoteConfig, type RemoteConfigFeatures, type RemoteConfigSampling, ReplayConfig, type ResourceTimingBreakdown, type SitePongConfig, type SitePongInitConfig, SuperLinkClient, type SuperLinkConfig, type SuperLinkDeepLink, type SuperLinkEventType, type SuperLinkFingerprint, type SuperLinkIdentityMetadata, type SuperLinkMatchRequest, type SuperLinkMatchResponse, type SuperLinkMatchType, type SuperLinkPlatform, type TraceContext, TracePropagator, TrackProperties, UserTraits, type VisitorIdResult, type WebManagerFactories, type WebVitals, addBreadcrumb, areFlagsReady, captureError, captureMessage, captureWebDeepLink, clearAnonymousId, clearUser, sitepong as client, completeFromScan, createTraceContext, cronCheckin, cronStart, cronWrap, dbTrack, dbTrackSync, sitepong as default, endSpan, endTransaction, extractIdentityMetadata, extractTrace, flush, flushMetrics, flushProfiles, generateSpanId, generateTraceId, getAllFlags, getAnonymousId, getDbNPlusOnePatterns, getDbQueryCount, getDeepLink, getDeviceSignals, getFlag, getFraudCheck, getLatestProfile, getMatchedDeepLink, getProfiles, getRemoteConfig, getReplaySessionId, getVariant, getVariantPayload, getVisitorId, getWebVitals, group, identify, init, initRN, initSuperLink, isInitialized, isRemoteConfigFeatureEnabled, isReplayRecording, metricDistribution, metricGauge, metricHistogram, metricIncrement, metricStartTimer, metricTime, onDeferredDeepLink, onRemoteConfigChange, parseUniversalLink, profile, propagateTrace, refreshFlags, registerIdentifyHook, registerWebManagerFactories, resetAnalytics, resetDbQueryCount, setAnonymousId, setContext, setCurrentScreen, setEnvironment, setRNGetCurrentScreen, setTags, setUser, startProfileSpan, startReplay, startSpan, startTransaction, startWatchtowerCapture, stopReplay, stopWatchtowerCapture, superlinkClient, identify$1 as superlinkIdentify, track, trackPageView, waitForFlags, writeClipboardToken };
|
package/dist/index.js
CHANGED
|
@@ -2770,7 +2770,7 @@ var SitePongClient = class {
|
|
|
2770
2770
|
}
|
|
2771
2771
|
for (const hook of this.identifyHooks) {
|
|
2772
2772
|
try {
|
|
2773
|
-
hook(userId);
|
|
2773
|
+
hook(userId, traits);
|
|
2774
2774
|
} catch (err) {
|
|
2775
2775
|
this.log("identify hook failed:", err);
|
|
2776
2776
|
}
|
|
@@ -2876,6 +2876,10 @@ var SitePongClient = class {
|
|
|
2876
2876
|
flushInterval: opts.flushInterval,
|
|
2877
2877
|
blockSelector: opts.blockSelector,
|
|
2878
2878
|
maskSelector: opts.maskSelector,
|
|
2879
|
+
// Channel defaults to the SDK environment; ignoreChannels defaults to
|
|
2880
|
+
// ['development'] inside the capture when omitted.
|
|
2881
|
+
channel: opts.channel ?? this.config.environment,
|
|
2882
|
+
ignoreChannels: opts.ignoreChannels,
|
|
2879
2883
|
debug: this.config.debug
|
|
2880
2884
|
});
|
|
2881
2885
|
this.watchtowerCapture.start(this.analyticsManager?.getAutocaptureModule() ?? null);
|