@posthog/browser 0.4.0 → 0.4.1
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/ARCHITECTURE.md +17 -1
- package/dist/{core.d.ts → composition/npm/core.d.ts} +7 -7
- package/dist/{core.js → composition/npm/core.js} +6 -6
- package/dist/composition/npm/core.mjs +5 -0
- package/dist/{index.d.ts → composition/npm/index.d.ts} +11 -11
- package/dist/{index.js → composition/npm/index.js} +6 -6
- package/dist/{index.mjs → composition/npm/index.mjs} +3 -3
- package/dist/{root-composition.d.ts → composition/npm/root-composition.d.ts} +3 -3
- package/dist/{root-composition.js → composition/npm/root-composition.js} +13 -13
- package/dist/{root-composition.mjs → composition/npm/root-composition.mjs} +9 -9
- package/dist/{browser-client.d.ts → core/context/browser-client.d.ts} +7 -7
- package/dist/{posthog.d.ts → core/posthog.d.ts} +1 -1
- package/dist/{posthog.js → core/posthog.js} +15 -15
- package/dist/{posthog.mjs → core/posthog.mjs} +7 -7
- package/dist/{remote-config.d.ts → core/remote-config.d.ts} +1 -1
- package/dist/{remote-config.js → core/remote-config.js} +2 -2
- package/dist/{remote-config.mjs → core/remote-config.mjs} +1 -1
- package/dist/{bot-filter.d.ts → core/state/bot-filter.d.ts} +1 -1
- package/dist/{key-value-store.d.ts → core/state/key-value-store.d.ts} +1 -1
- package/dist/{state.d.ts → core/state/state.d.ts} +1 -1
- package/dist/{state.js → core/state/state.js} +6 -6
- package/dist/{state.mjs → core/state/state.mjs} +1 -1
- package/dist/{types.d.ts → core/types.d.ts} +6 -6
- package/dist/{request.d.ts → platform/request.d.ts} +1 -1
- package/dist/{version.js → primitives/version.js} +1 -1
- package/dist/primitives/version.mjs +2 -0
- package/dist/{capture-summary.d.ts → products/analytics/admission/capture-summary.d.ts} +1 -1
- package/dist/{capture-summary.js → products/analytics/admission/capture-summary.js} +2 -2
- package/dist/{capture-summary.mjs → products/analytics/admission/capture-summary.mjs} +1 -1
- package/dist/{analytics-api.d.ts → products/analytics/analytics-api.d.ts} +2 -2
- package/dist/{analytics-extension.d.ts → products/analytics/analytics-extension.d.ts} +2 -2
- package/dist/{analytics-extension.js → products/analytics/analytics-extension.js} +35 -35
- package/dist/{analytics-extension.mjs → products/analytics/analytics-extension.mjs} +11 -11
- package/dist/{analytics-internal.d.ts → products/analytics/analytics-internal.d.ts} +7 -7
- package/dist/{analytics.js → products/analytics/analytics.js} +2 -2
- package/dist/{analytics.mjs → products/analytics/analytics.mjs} +1 -1
- package/dist/{automatic-analytics.js → products/analytics/automatic-analytics.js} +1 -1
- package/dist/{automatic-analytics.mjs → products/analytics/automatic-analytics.mjs} +1 -1
- package/dist/{analytics-delivery.d.ts → products/analytics/delivery/analytics-delivery.d.ts} +1 -1
- package/dist/{analytics-delivery.js → products/analytics/delivery/analytics-delivery.js} +2 -2
- package/dist/{analytics-delivery.mjs → products/analytics/delivery/analytics-delivery.mjs} +1 -1
- package/dist/{capture-v1.d.ts → products/analytics/delivery/capture-v1.d.ts} +2 -2
- package/dist/{capture-v1.js → products/analytics/delivery/capture-v1.js} +13 -13
- package/dist/{capture-v1.mjs → products/analytics/delivery/capture-v1.mjs} +4 -4
- package/dist/{lane.d.ts → products/analytics/delivery/lane.d.ts} +1 -1
- package/dist/{person-processing.d.ts → products/analytics/properties/person-processing.d.ts} +1 -1
- package/dist/{autocapture.d.ts → products/autocapture/autocapture.d.ts} +1 -1
- package/dist/{flags-token.d.ts → products/flags/flags-token.d.ts} +1 -1
- package/dist/{logs-internal.d.ts → products/logs/logs-internal.d.ts} +1 -1
- package/dist/{surveys-internal.d.ts → products/surveys/surveys-internal.d.ts} +1 -1
- package/package.json +25 -25
- package/dist/core.mjs +0 -5
- package/dist/version.mjs +0 -2
- /package/dist/{browser-client.js → core/context/browser-client.js} +0 -0
- /package/dist/{browser-client.mjs → core/context/browser-client.mjs} +0 -0
- /package/dist/{extensions → core/extensions}/registry.d.ts +0 -0
- /package/dist/{extensions → core/extensions}/registry.js +0 -0
- /package/dist/{extensions → core/extensions}/registry.mjs +0 -0
- /package/dist/{bot-filter.js → core/state/bot-filter.js} +0 -0
- /package/dist/{bot-filter.mjs → core/state/bot-filter.mjs} +0 -0
- /package/dist/{key-value-store.js → core/state/key-value-store.js} +0 -0
- /package/dist/{key-value-store.mjs → core/state/key-value-store.mjs} +0 -0
- /package/dist/{types.js → core/types.js} +0 -0
- /package/dist/{types.mjs → core/types.mjs} +0 -0
- /package/dist/{logger.d.ts → platform/logger.d.ts} +0 -0
- /package/dist/{logger.js → platform/logger.js} +0 -0
- /package/dist/{logger.mjs → platform/logger.mjs} +0 -0
- /package/dist/{request.js → platform/request.js} +0 -0
- /package/dist/{request.mjs → platform/request.mjs} +0 -0
- /package/dist/{id.d.ts → primitives/id.d.ts} +0 -0
- /package/dist/{id.js → primitives/id.js} +0 -0
- /package/dist/{id.mjs → primitives/id.mjs} +0 -0
- /package/dist/{immutable.d.ts → primitives/immutable.d.ts} +0 -0
- /package/dist/{immutable.js → primitives/immutable.js} +0 -0
- /package/dist/{immutable.mjs → primitives/immutable.mjs} +0 -0
- /package/dist/{named-error.d.ts → primitives/named-error.d.ts} +0 -0
- /package/dist/{named-error.js → primitives/named-error.js} +0 -0
- /package/dist/{named-error.mjs → primitives/named-error.mjs} +0 -0
- /package/dist/{utf8.d.ts → primitives/utf8.d.ts} +0 -0
- /package/dist/{utf8.js → primitives/utf8.js} +0 -0
- /package/dist/{utf8.mjs → primitives/utf8.mjs} +0 -0
- /package/dist/{version.d.ts → primitives/version.d.ts} +0 -0
- /package/dist/{capture-properties.d.ts → products/analytics/admission/capture-properties.d.ts} +0 -0
- /package/dist/{capture-properties.js → products/analytics/admission/capture-properties.js} +0 -0
- /package/dist/{capture-properties.mjs → products/analytics/admission/capture-properties.mjs} +0 -0
- /package/dist/{event-buffer.d.ts → products/analytics/admission/event-buffer.d.ts} +0 -0
- /package/dist/{event-buffer.js → products/analytics/admission/event-buffer.js} +0 -0
- /package/dist/{event-buffer.mjs → products/analytics/admission/event-buffer.mjs} +0 -0
- /package/dist/{rate-limiter.d.ts → products/analytics/admission/rate-limiter.d.ts} +0 -0
- /package/dist/{rate-limiter.js → products/analytics/admission/rate-limiter.js} +0 -0
- /package/dist/{rate-limiter.mjs → products/analytics/admission/rate-limiter.mjs} +0 -0
- /package/dist/{analytics-api.js → products/analytics/analytics-api.js} +0 -0
- /package/dist/{analytics-api.mjs → products/analytics/analytics-api.mjs} +0 -0
- /package/dist/{analytics-buffer.d.ts → products/analytics/analytics-buffer.d.ts} +0 -0
- /package/dist/{analytics-buffer.js → products/analytics/analytics-buffer.js} +0 -0
- /package/dist/{analytics-buffer.mjs → products/analytics/analytics-buffer.mjs} +0 -0
- /package/dist/{analytics-internal.js → products/analytics/analytics-internal.js} +0 -0
- /package/dist/{analytics-internal.mjs → products/analytics/analytics-internal.mjs} +0 -0
- /package/dist/{analytics-options.d.ts → products/analytics/analytics-options.d.ts} +0 -0
- /package/dist/{analytics-options.js → products/analytics/analytics-options.js} +0 -0
- /package/dist/{analytics-options.mjs → products/analytics/analytics-options.mjs} +0 -0
- /package/dist/{analytics.d.ts → products/analytics/analytics.d.ts} +0 -0
- /package/dist/{automatic-analytics.d.ts → products/analytics/automatic-analytics.d.ts} +0 -0
- /package/dist/{lane.js → products/analytics/delivery/lane.js} +0 -0
- /package/dist/{lane.mjs → products/analytics/delivery/lane.mjs} +0 -0
- /package/dist/{analytics-properties.d.ts → products/analytics/properties/analytics-properties.d.ts} +0 -0
- /package/dist/{analytics-properties.js → products/analytics/properties/analytics-properties.js} +0 -0
- /package/dist/{analytics-properties.mjs → products/analytics/properties/analytics-properties.mjs} +0 -0
- /package/dist/{analytics-session-properties.d.ts → products/analytics/properties/analytics-session-properties.d.ts} +0 -0
- /package/dist/{analytics-session-properties.js → products/analytics/properties/analytics-session-properties.js} +0 -0
- /package/dist/{analytics-session-properties.mjs → products/analytics/properties/analytics-session-properties.mjs} +0 -0
- /package/dist/{person-processing.js → products/analytics/properties/person-processing.js} +0 -0
- /package/dist/{person-processing.mjs → products/analytics/properties/person-processing.mjs} +0 -0
- /package/dist/{autocapture-options.d.ts → products/autocapture/autocapture-options.d.ts} +0 -0
- /package/dist/{autocapture-options.js → products/autocapture/autocapture-options.js} +0 -0
- /package/dist/{autocapture-options.mjs → products/autocapture/autocapture-options.mjs} +0 -0
- /package/dist/{autocapture.js → products/autocapture/autocapture.js} +0 -0
- /package/dist/{autocapture.mjs → products/autocapture/autocapture.mjs} +0 -0
- /package/dist/{flags-internal.d.ts → products/flags/flags-internal.d.ts} +0 -0
- /package/dist/{flags-internal.js → products/flags/flags-internal.js} +0 -0
- /package/dist/{flags-internal.mjs → products/flags/flags-internal.mjs} +0 -0
- /package/dist/{flags-options.d.ts → products/flags/flags-options.d.ts} +0 -0
- /package/dist/{flags-options.js → products/flags/flags-options.js} +0 -0
- /package/dist/{flags-options.mjs → products/flags/flags-options.mjs} +0 -0
- /package/dist/{flags-token.js → products/flags/flags-token.js} +0 -0
- /package/dist/{flags-token.mjs → products/flags/flags-token.mjs} +0 -0
- /package/dist/{flags.d.ts → products/flags/flags.d.ts} +0 -0
- /package/dist/{flags.js → products/flags/flags.js} +0 -0
- /package/dist/{flags.mjs → products/flags/flags.mjs} +0 -0
- /package/dist/{logs-internal.js → products/logs/logs-internal.js} +0 -0
- /package/dist/{logs-internal.mjs → products/logs/logs-internal.mjs} +0 -0
- /package/dist/{logs-options.d.ts → products/logs/logs-options.d.ts} +0 -0
- /package/dist/{logs-options.js → products/logs/logs-options.js} +0 -0
- /package/dist/{logs-options.mjs → products/logs/logs-options.mjs} +0 -0
- /package/dist/{logs.d.ts → products/logs/logs.d.ts} +0 -0
- /package/dist/{logs.js → products/logs/logs.js} +0 -0
- /package/dist/{logs.mjs → products/logs/logs.mjs} +0 -0
- /package/dist/{automatic-surveys.d.ts → products/surveys/automatic-surveys.d.ts} +0 -0
- /package/dist/{automatic-surveys.js → products/surveys/automatic-surveys.js} +0 -0
- /package/dist/{automatic-surveys.mjs → products/surveys/automatic-surveys.mjs} +0 -0
- /package/dist/{surveys-extension.d.ts → products/surveys/surveys-extension.d.ts} +0 -0
- /package/dist/{surveys-extension.js → products/surveys/surveys-extension.js} +0 -0
- /package/dist/{surveys-extension.mjs → products/surveys/surveys-extension.mjs} +0 -0
- /package/dist/{surveys-internal.js → products/surveys/surveys-internal.js} +0 -0
- /package/dist/{surveys-internal.mjs → products/surveys/surveys-internal.mjs} +0 -0
- /package/dist/{surveys-options.d.ts → products/surveys/surveys-options.d.ts} +0 -0
- /package/dist/{surveys-options.js → products/surveys/surveys-options.js} +0 -0
- /package/dist/{surveys-options.mjs → products/surveys/surveys-options.mjs} +0 -0
- /package/dist/{surveys.d.ts → products/surveys/surveys.d.ts} +0 -0
- /package/dist/{surveys.js → products/surveys/surveys.js} +0 -0
- /package/dist/{surveys.mjs → products/surveys/surveys.mjs} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CaptureOptions, CapturedEventInfo, Disposable, Listener } from '@posthog/browser-common';
|
|
2
|
-
import type { BrowserExtension } from '
|
|
3
|
-
import type { CaptureSummary } from '
|
|
2
|
+
import type { BrowserExtension } from '../../core/context/browser-client';
|
|
3
|
+
import type { CaptureSummary } from '../../core/types';
|
|
4
4
|
/** Application-facing analytics operations on one installed product instance. */
|
|
5
5
|
export interface IAnalytics extends BrowserExtension {
|
|
6
6
|
readonly isRateLimited: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { CaptureOptions, CapturedEventInfo, Disposable, Listener } from '@posthog/browser-common';
|
|
2
2
|
import { type AnalyticsCaptureHost, type AnalyticsDeliveryFactory, type IAnalyticsExtension, type CaptureHost } from './analytics-internal';
|
|
3
|
-
import type { IPostHogInternal } from '
|
|
3
|
+
import type { IPostHogInternal } from '../../core/context/browser-client';
|
|
4
4
|
import type { AutomaticAnalyticsOptions } from './analytics-options';
|
|
5
|
-
import type { CaptureSummary } from '
|
|
5
|
+
import type { CaptureSummary } from '../../core/types';
|
|
6
6
|
/** One product instance owns analytics operations, admission, buffering and delivery coordination. */
|
|
7
7
|
export declare class Analytics implements IAnalyticsExtension {
|
|
8
8
|
readonly name: import("@posthog/browser-common").ExtensionToken<IAnalyticsExtension>;
|
|
@@ -31,17 +31,17 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
31
31
|
Analytics: ()=>Analytics
|
|
32
32
|
});
|
|
33
33
|
const external_analytics_internal_js_namespaceObject = require("./analytics-internal.js");
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
34
|
+
const event_buffer_js_namespaceObject = require("./admission/event-buffer.js");
|
|
35
|
+
const capture_summary_js_namespaceObject = require("./admission/capture-summary.js");
|
|
36
|
+
const id_js_namespaceObject = require("../../primitives/id.js");
|
|
37
|
+
const immutable_js_namespaceObject = require("../../primitives/immutable.js");
|
|
38
|
+
const rate_limiter_js_namespaceObject = require("./admission/rate-limiter.js");
|
|
39
|
+
const capture_properties_js_namespaceObject = require("./admission/capture-properties.js");
|
|
40
|
+
const analytics_session_properties_js_namespaceObject = require("./properties/analytics-session-properties.js");
|
|
41
|
+
const analytics_properties_js_namespaceObject = require("./properties/analytics-properties.js");
|
|
42
|
+
const person_processing_js_namespaceObject = require("./properties/person-processing.js");
|
|
43
|
+
const version_js_namespaceObject = require("../../primitives/version.js");
|
|
44
|
+
const utf8_js_namespaceObject = require("../../primitives/utf8.js");
|
|
45
45
|
const numberOption = (read, fallback, minimum, maximum)=>{
|
|
46
46
|
try {
|
|
47
47
|
const value = read();
|
|
@@ -78,12 +78,12 @@ class Analytics {
|
|
|
78
78
|
this._teardownCallbacks = new Set();
|
|
79
79
|
this.bindCaptureHost = (host)=>{
|
|
80
80
|
this._host = host;
|
|
81
|
-
this._sessionProperties = new
|
|
81
|
+
this._sessionProperties = new analytics_session_properties_js_namespaceObject.SessionRegisteredProperties(host.sessionKv);
|
|
82
82
|
};
|
|
83
83
|
this.setup = (value)=>{
|
|
84
84
|
this._client = value.sharedClient;
|
|
85
85
|
this._kv = value.kv;
|
|
86
|
-
this._registeredProperties = new
|
|
86
|
+
this._registeredProperties = new analytics_properties_js_namespaceObject.RegisteredProperties(value.kv);
|
|
87
87
|
};
|
|
88
88
|
this.initialize = (host)=>{
|
|
89
89
|
this._deliveryHost = host;
|
|
@@ -151,10 +151,10 @@ class Analytics {
|
|
|
151
151
|
try {
|
|
152
152
|
const authority = this._host?.authority();
|
|
153
153
|
const message = this._admitCapture(event, properties, options, false, true);
|
|
154
|
-
if (!message) return
|
|
154
|
+
if (!message) return capture_summary_js_namespaceObject.EMPTY_CAPTURE_SUMMARY;
|
|
155
155
|
return await this._deliverImmediate(message, ()=>this._host?.authority() === authority);
|
|
156
156
|
} catch (error) {
|
|
157
|
-
return (0,
|
|
157
|
+
return (0, capture_summary_js_namespaceObject.captureFailure)(error);
|
|
158
158
|
}
|
|
159
159
|
};
|
|
160
160
|
this.createPersonProfile = ()=>{
|
|
@@ -162,14 +162,14 @@ class Analytics {
|
|
|
162
162
|
if (this._disposed || !host?.canMutate()) return;
|
|
163
163
|
host.state.prepare();
|
|
164
164
|
if (this._hasPersonProcessing()) return;
|
|
165
|
-
const properties = (0,
|
|
165
|
+
const properties = (0, person_processing_js_namespaceObject.snapshotPersonProperties)(host.state.distinctId, {}, {});
|
|
166
166
|
if (properties) this._setPersonProperties(properties);
|
|
167
167
|
};
|
|
168
168
|
this.setPersonProperties = (set, setOnce)=>{
|
|
169
169
|
const host = this._host;
|
|
170
170
|
if (this._disposed || !host?.canMutate()) return;
|
|
171
171
|
host.state.prepare();
|
|
172
|
-
const properties = (0,
|
|
172
|
+
const properties = (0, person_processing_js_namespaceObject.snapshotPersonProperties)(host.state.distinctId, set, setOnce);
|
|
173
173
|
if (!properties) return void host.logger.warn('Person properties must be JSON-serializable objects');
|
|
174
174
|
if (!(Object.keys(properties.set).length || Object.keys(properties.setOnce).length)) return;
|
|
175
175
|
this._setPersonProperties(properties);
|
|
@@ -177,7 +177,7 @@ class Analytics {
|
|
|
177
177
|
this.unsetPersonProperties = (names)=>{
|
|
178
178
|
const host = this._host;
|
|
179
179
|
if (this._disposed || !host?.canMutate()) return;
|
|
180
|
-
const properties = (0,
|
|
180
|
+
const properties = (0, person_processing_js_namespaceObject.personPropertyNames)(names);
|
|
181
181
|
if (!properties.length || !this._requirePersonProcessing()) return;
|
|
182
182
|
host.state.prepare();
|
|
183
183
|
this._lastPersonProperties = void 0;
|
|
@@ -204,7 +204,7 @@ class Analytics {
|
|
|
204
204
|
const wasIdentified = host.state.isIdentified;
|
|
205
205
|
const hasProperties = !!set || !!setOnce;
|
|
206
206
|
if (distinctId !== previousDistinctId || !wasIdentified) host.state.identify(distinctId);
|
|
207
|
-
const properties = (0,
|
|
207
|
+
const properties = (0, person_processing_js_namespaceObject.snapshotPersonProperties)(distinctId, set, setOnce);
|
|
208
208
|
if (!properties) {
|
|
209
209
|
host.logger.warn('Person properties must be JSON-serializable objects');
|
|
210
210
|
if (distinctId !== previousDistinctId || !wasIdentified || hasProperties) host.publishIdentify({
|
|
@@ -340,9 +340,9 @@ class Analytics {
|
|
|
340
340
|
flushAt: numberOption(()=>options.flushAt, 20, 1, external_analytics_internal_js_namespaceObject.MAX_ANALYTICS_BATCH_EVENTS),
|
|
341
341
|
flushInterval: numberOption(()=>options.flushInterval, 3000, 0, Number.MAX_SAFE_INTEGER)
|
|
342
342
|
};
|
|
343
|
-
this._buffer = new
|
|
344
|
-
this._personProfiles = (0,
|
|
345
|
-
this._rateLimiter = new
|
|
343
|
+
this._buffer = new event_buffer_js_namespaceObject.EventBuffer(1000, (total, count = 1, reason = 'overflow')=>this._deliveryHost.reportWarning(`Analytics queue dropped ${count} ${reason} event${1 === count ? '' : 's'} (${total} total)`), external_analytics_internal_js_namespaceObject.MAX_ANALYTICS_BYTES, 3600000);
|
|
344
|
+
this._personProfiles = (0, person_processing_js_namespaceObject.snapshotPersonProfileMode)(()=>options.personProfiles);
|
|
345
|
+
this._rateLimiter = new rate_limiter_js_namespaceObject.ClientRateLimiter();
|
|
346
346
|
Object.defineProperty(this, 'isRateLimited', {
|
|
347
347
|
configurable: true,
|
|
348
348
|
enumerable: true,
|
|
@@ -399,8 +399,8 @@ class Analytics {
|
|
|
399
399
|
} catch {
|
|
400
400
|
deliverImmediate = void 0;
|
|
401
401
|
}
|
|
402
|
-
if (!canContinue()) return (0,
|
|
403
|
-
if (!this._driver || 'function' != typeof deliverImmediate || this._disposed) return (0,
|
|
402
|
+
if (!canContinue()) return (0, capture_summary_js_namespaceObject.captureFailure)(new Error('Immediate analytics delivery was cancelled'));
|
|
403
|
+
if (!this._driver || 'function' != typeof deliverImmediate || this._disposed) return (0, capture_summary_js_namespaceObject.captureFailure)(new Error('Immediate analytics delivery is unavailable'));
|
|
404
404
|
return deliverImmediate.call(this._driver, [
|
|
405
405
|
message
|
|
406
406
|
], canContinue);
|
|
@@ -462,7 +462,7 @@ class Analytics {
|
|
|
462
462
|
_snapshotProperties(properties, options) {
|
|
463
463
|
const dynamic = this._dynamicProperties();
|
|
464
464
|
try {
|
|
465
|
-
return (0,
|
|
465
|
+
return (0, capture_properties_js_namespaceObject.snapshotCaptureProperties)(this._registeredProperties?.values(), dynamic, properties, options);
|
|
466
466
|
} catch (error) {
|
|
467
467
|
this._host?.logger.error('Event properties are not JSON-serializable', error);
|
|
468
468
|
return;
|
|
@@ -484,11 +484,11 @@ class Analytics {
|
|
|
484
484
|
$session_id: session.sessionId,
|
|
485
485
|
$window_id: session.windowId,
|
|
486
486
|
$lib: 'web',
|
|
487
|
-
$lib_version:
|
|
487
|
+
$lib_version: version_js_namespaceObject.version,
|
|
488
488
|
$process_person_profile: processPersonProfile
|
|
489
489
|
};
|
|
490
490
|
const message = {
|
|
491
|
-
uuid: snapshot.uuid ?? (0,
|
|
491
|
+
uuid: snapshot.uuid ?? (0, id_js_namespaceObject.createId)(),
|
|
492
492
|
event,
|
|
493
493
|
distinct_id: distinctId,
|
|
494
494
|
properties: {
|
|
@@ -514,14 +514,14 @@ class Analytics {
|
|
|
514
514
|
}
|
|
515
515
|
_enrichAndMeasure(message, snapshot, metadata, sessionId) {
|
|
516
516
|
try {
|
|
517
|
-
let bytes = (0,
|
|
517
|
+
let bytes = (0, utf8_js_namespaceObject.utf8Bytes)(JSON.stringify(message));
|
|
518
518
|
if (!this._fitsUnavoidableProperties(message, snapshot, metadata, bytes)) return;
|
|
519
|
-
const changed = (0,
|
|
519
|
+
const changed = (0, capture_properties_js_namespaceObject.applySessionProperties)(snapshot, this._sessionProperties?.values(sessionId) ?? {});
|
|
520
520
|
message.properties = {
|
|
521
521
|
...snapshot.message,
|
|
522
522
|
...metadata
|
|
523
523
|
};
|
|
524
|
-
if (changed) bytes = (0,
|
|
524
|
+
if (changed) bytes = (0, utf8_js_namespaceObject.utf8Bytes)(JSON.stringify(message));
|
|
525
525
|
return bytes;
|
|
526
526
|
} catch (error) {
|
|
527
527
|
this._host?.logger.error('The finalized event could not be measured', error);
|
|
@@ -530,9 +530,9 @@ class Analytics {
|
|
|
530
530
|
}
|
|
531
531
|
_fitsUnavoidableProperties(message, snapshot, metadata, bytes) {
|
|
532
532
|
if (bytes <= external_analytics_internal_js_namespaceObject.MAX_ANALYTICS_BYTES) return true;
|
|
533
|
-
const minimum = (0,
|
|
533
|
+
const minimum = (0, utf8_js_namespaceObject.utf8Bytes)(JSON.stringify({
|
|
534
534
|
...message,
|
|
535
|
-
properties: (0,
|
|
535
|
+
properties: (0, capture_properties_js_namespaceObject.unavoidableProperties)(snapshot, metadata)
|
|
536
536
|
}));
|
|
537
537
|
if (minimum <= external_analytics_internal_js_namespaceObject.MAX_ANALYTICS_BYTES) return true;
|
|
538
538
|
this._warnOversized(message.event, bytes);
|
|
@@ -569,7 +569,7 @@ class Analytics {
|
|
|
569
569
|
...session,
|
|
570
570
|
reason: preparedSession.reason
|
|
571
571
|
});
|
|
572
|
-
host.publishEvent((0,
|
|
572
|
+
host.publishEvent((0, immutable_js_namespaceObject.deepFreeze)({
|
|
573
573
|
event: message.event,
|
|
574
574
|
properties: observedProperties
|
|
575
575
|
}));
|
|
@@ -578,7 +578,7 @@ class Analytics {
|
|
|
578
578
|
const host = this._host;
|
|
579
579
|
if (!host) return false;
|
|
580
580
|
const enabled = this._kv?.get('personProcessingEnabled') === true;
|
|
581
|
-
return (0,
|
|
581
|
+
return (0, person_processing_js_namespaceObject.shouldProcessPerson)(this._personProfiles, host.state.isIdentified, Object.keys(host.state.groups).length > 0, enabled);
|
|
582
582
|
}
|
|
583
583
|
_requirePersonProcessing() {
|
|
584
584
|
if ('never' === this._personProfiles) {
|
|
@@ -631,7 +631,7 @@ class Analytics {
|
|
|
631
631
|
_prepareRegistration(properties) {
|
|
632
632
|
const store = this._propertyStore();
|
|
633
633
|
if (!store) return;
|
|
634
|
-
const snapshot = (0,
|
|
634
|
+
const snapshot = (0, analytics_properties_js_namespaceObject.snapshotRegisteredProperties)(properties);
|
|
635
635
|
if (this._propertyStore() !== store) return;
|
|
636
636
|
if (!snapshot) return void this._host?.logger.warn('Super properties must serialize to an object');
|
|
637
637
|
return {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Analytics, MAX_ANALYTICS_BATCH_EVENTS, MAX_ANALYTICS_BYTES } from "./analytics-internal.mjs";
|
|
2
|
-
import { EventBuffer } from "./event-buffer.mjs";
|
|
3
|
-
import { EMPTY_CAPTURE_SUMMARY, captureFailure } from "./capture-summary.mjs";
|
|
4
|
-
import { createId } from "
|
|
5
|
-
import { deepFreeze } from "
|
|
6
|
-
import { ClientRateLimiter } from "./rate-limiter.mjs";
|
|
7
|
-
import { applySessionProperties, snapshotCaptureProperties, unavoidableProperties } from "./capture-properties.mjs";
|
|
8
|
-
import { SessionRegisteredProperties } from "./analytics-session-properties.mjs";
|
|
9
|
-
import { RegisteredProperties, snapshotRegisteredProperties } from "./analytics-properties.mjs";
|
|
10
|
-
import { personPropertyNames, shouldProcessPerson, snapshotPersonProfileMode, snapshotPersonProperties } from "./person-processing.mjs";
|
|
11
|
-
import { version } from "
|
|
12
|
-
import { utf8Bytes } from "
|
|
2
|
+
import { EventBuffer } from "./admission/event-buffer.mjs";
|
|
3
|
+
import { EMPTY_CAPTURE_SUMMARY, captureFailure } from "./admission/capture-summary.mjs";
|
|
4
|
+
import { createId } from "../../primitives/id.mjs";
|
|
5
|
+
import { deepFreeze } from "../../primitives/immutable.mjs";
|
|
6
|
+
import { ClientRateLimiter } from "./admission/rate-limiter.mjs";
|
|
7
|
+
import { applySessionProperties, snapshotCaptureProperties, unavoidableProperties } from "./admission/capture-properties.mjs";
|
|
8
|
+
import { SessionRegisteredProperties } from "./properties/analytics-session-properties.mjs";
|
|
9
|
+
import { RegisteredProperties, snapshotRegisteredProperties } from "./properties/analytics-properties.mjs";
|
|
10
|
+
import { personPropertyNames, shouldProcessPerson, snapshotPersonProfileMode, snapshotPersonProperties } from "./properties/person-processing.mjs";
|
|
11
|
+
import { version } from "../../primitives/version.mjs";
|
|
12
|
+
import { utf8Bytes } from "../../primitives/utf8.mjs";
|
|
13
13
|
const numberOption = (read, fallback, minimum, maximum)=>{
|
|
14
14
|
try {
|
|
15
15
|
const value = read();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { Client, CapturedEventInfo, ExtensionToken, Listener } from '@posthog/browser-common';
|
|
2
|
-
import type { BrowserExtension, ChangePropertiesInfo, GroupInfo, IdentifyInfo } from '
|
|
2
|
+
import type { BrowserExtension, ChangePropertiesInfo, GroupInfo, IdentifyInfo } from '../../core/context/browser-client';
|
|
3
3
|
import type { IAnalytics } from './analytics-api';
|
|
4
|
-
import type { BrowserState } from '
|
|
5
|
-
import type { NewSessionInfo } from '
|
|
4
|
+
import type { BrowserState } from '../../core/state/state';
|
|
5
|
+
import type { NewSessionInfo } from '../../core/types';
|
|
6
6
|
import type { AnalyticsOptions } from './analytics-options';
|
|
7
|
-
import type { EventBuffer } from './event-buffer';
|
|
8
|
-
import type { LaneDelivery } from './lane';
|
|
9
|
-
import type { RequestRuntime } from '
|
|
10
|
-
import type { CaptureSummary } from '
|
|
7
|
+
import type { EventBuffer } from './admission/event-buffer';
|
|
8
|
+
import type { LaneDelivery } from './delivery/lane';
|
|
9
|
+
import type { RequestRuntime } from '../../platform/request';
|
|
10
|
+
import type { CaptureSummary } from '../../core/types';
|
|
11
11
|
export interface AnalyticsMessage {
|
|
12
12
|
event: string;
|
|
13
13
|
uuid: string;
|
|
@@ -31,8 +31,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
31
31
|
analytics: ()=>analytics
|
|
32
32
|
});
|
|
33
33
|
const external_analytics_buffer_js_namespaceObject = require("./analytics-buffer.js");
|
|
34
|
-
const
|
|
35
|
-
const analytics = (options = {})=>(0, external_analytics_buffer_js_namespaceObject.createAnalyticsExtension)(options, void 0,
|
|
34
|
+
const analytics_delivery_js_namespaceObject = require("./delivery/analytics-delivery.js");
|
|
35
|
+
const analytics = (options = {})=>(0, external_analytics_buffer_js_namespaceObject.createAnalyticsExtension)(options, void 0, analytics_delivery_js_namespaceObject.createAnalyticsDelivery);
|
|
36
36
|
exports.analytics = __webpack_exports__.analytics;
|
|
37
37
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
38
38
|
"analytics"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createAnalyticsExtension } from "./analytics-buffer.mjs";
|
|
2
|
-
import { createAnalyticsDelivery } from "./analytics-delivery.mjs";
|
|
2
|
+
import { createAnalyticsDelivery } from "./delivery/analytics-delivery.mjs";
|
|
3
3
|
const analytics = (options = {})=>createAnalyticsExtension(options, void 0, createAnalyticsDelivery);
|
|
4
4
|
export { analytics };
|
|
@@ -32,7 +32,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
32
32
|
});
|
|
33
33
|
const external_analytics_buffer_js_namespaceObject = require("./analytics-buffer.js");
|
|
34
34
|
const analytics = (options)=>(0, external_analytics_buffer_js_namespaceObject.createAnalyticsExtension)(options, async ()=>{
|
|
35
|
-
const { createAnalyticsDelivery } = await import("./analytics-delivery.js");
|
|
35
|
+
const { createAnalyticsDelivery } = await import("./delivery/analytics-delivery.js");
|
|
36
36
|
return createAnalyticsDelivery;
|
|
37
37
|
});
|
|
38
38
|
exports.analytics = __webpack_exports__.analytics;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createAnalyticsExtension } from "./analytics-buffer.mjs";
|
|
2
2
|
const analytics = (options)=>createAnalyticsExtension(options, async ()=>{
|
|
3
|
-
const { createAnalyticsDelivery } = await import("./analytics-delivery.mjs");
|
|
3
|
+
const { createAnalyticsDelivery } = await import("./delivery/analytics-delivery.mjs");
|
|
4
4
|
return createAnalyticsDelivery;
|
|
5
5
|
});
|
|
6
6
|
export { analytics };
|
package/dist/{analytics-delivery.d.ts → products/analytics/delivery/analytics-delivery.d.ts}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { AnalyticsDeliveryFactory } from '
|
|
1
|
+
import type { AnalyticsDeliveryFactory } from '../analytics-internal';
|
|
2
2
|
/** Attaches delivery machinery to the analytics extension's existing event buffer. */
|
|
3
3
|
export declare const createAnalyticsDelivery: AnalyticsDeliveryFactory;
|
|
@@ -31,7 +31,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
31
31
|
createAnalyticsDelivery: ()=>createAnalyticsDelivery
|
|
32
32
|
});
|
|
33
33
|
const external_lane_js_namespaceObject = require("./lane.js");
|
|
34
|
-
const
|
|
34
|
+
const capture_summary_js_namespaceObject = require("../admission/capture-summary.js");
|
|
35
35
|
const external_capture_v1_js_namespaceObject = require("./capture-v1.js");
|
|
36
36
|
const isOnline = (context)=>{
|
|
37
37
|
try {
|
|
@@ -196,7 +196,7 @@ const createAnalyticsDelivery = (buffer, client, host, options, beforeTeardown)=
|
|
|
196
196
|
} : {}
|
|
197
197
|
});
|
|
198
198
|
const summary = summarizeCapture(messages, result.outcomes);
|
|
199
|
-
if (void 0 !== result.terminalError) return (0,
|
|
199
|
+
if (void 0 !== result.terminalError) return (0, capture_summary_js_namespaceObject.captureFailure)(result.terminalError, summary);
|
|
200
200
|
return summary;
|
|
201
201
|
} finally{
|
|
202
202
|
if (controller) immediateControllers.delete(controller);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Lane } from "./lane.mjs";
|
|
2
|
-
import { captureFailure } from "
|
|
2
|
+
import { captureFailure } from "../admission/capture-summary.mjs";
|
|
3
3
|
import { CAPTURE_V1_MAX_BATCH_EVENTS, CAPTURE_V1_TEARDOWN_BUDGET_BYTES, sendCaptureV1Batches, sendCaptureV1TeardownBatches } from "./capture-v1.mjs";
|
|
4
4
|
const isOnline = (context)=>{
|
|
5
5
|
try {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ApiResponse } from '@posthog/browser-common';
|
|
2
|
-
import { type AnalyticsMessage } from '
|
|
3
|
-
import type { RequestRuntime } from '
|
|
2
|
+
import { type AnalyticsMessage } from '../analytics-internal';
|
|
3
|
+
import type { RequestRuntime } from '../../../platform/request';
|
|
4
4
|
export declare const CAPTURE_V1_MAX_BATCH_EVENTS = 100;
|
|
5
5
|
export declare const CAPTURE_V1_BATCH_TARGET_BYTES: number;
|
|
6
6
|
export declare const CAPTURE_V1_COMPRESSION_THRESHOLD_BYTES = 1024;
|
|
@@ -37,10 +37,10 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
37
37
|
sendCaptureV1Batches: ()=>sendCaptureV1Batches,
|
|
38
38
|
sendCaptureV1TeardownBatches: ()=>sendCaptureV1TeardownBatches
|
|
39
39
|
});
|
|
40
|
-
const external_analytics_internal_js_namespaceObject = require("
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const
|
|
40
|
+
const external_analytics_internal_js_namespaceObject = require("../analytics-internal.js");
|
|
41
|
+
const id_js_namespaceObject = require("../../../primitives/id.js");
|
|
42
|
+
const named_error_js_namespaceObject = require("../../../primitives/named-error.js");
|
|
43
|
+
const utf8_js_namespaceObject = require("../../../primitives/utf8.js");
|
|
44
44
|
const RETRYABLE_STATUSES = [
|
|
45
45
|
408,
|
|
46
46
|
500,
|
|
@@ -82,13 +82,13 @@ const prepareEvents = (messages)=>messages.map((source)=>{
|
|
|
82
82
|
event,
|
|
83
83
|
uuid: event.uuid,
|
|
84
84
|
json,
|
|
85
|
-
bytes: (0,
|
|
85
|
+
bytes: (0, utf8_js_namespaceObject.utf8Bytes)(json)
|
|
86
86
|
};
|
|
87
87
|
});
|
|
88
88
|
const serializeEnvelope = (createdAt, events)=>`{"created_at":${JSON.stringify(createdAt)},"batch":[${events.map(({ json })=>json).join(',')}]}`;
|
|
89
89
|
const partitionEvents = (events, createdAt, maxBatchEvents, targetBatchBytes)=>{
|
|
90
90
|
const batches = [];
|
|
91
|
-
const emptyBytes = (0,
|
|
91
|
+
const emptyBytes = (0, utf8_js_namespaceObject.utf8Bytes)(serializeEnvelope(createdAt, []));
|
|
92
92
|
let batch = [];
|
|
93
93
|
let bytes = emptyBytes;
|
|
94
94
|
for (const event of events){
|
|
@@ -344,14 +344,14 @@ const attemptOnce = async (runtime, events, libraryVersion, createdAt, requestId
|
|
|
344
344
|
'PostHog-Request-Timestamp': isoNow(now)
|
|
345
345
|
};
|
|
346
346
|
let requestBody = body;
|
|
347
|
-
if (compressionEnabled && (0,
|
|
347
|
+
if (compressionEnabled && (0, utf8_js_namespaceObject.utf8Bytes)(body) >= compressionThresholdBytes) {
|
|
348
348
|
const compressed = await compressWithDeadline(body, Math.max(1, Math.min(compressionTimeoutMs, remainingTime())), signal, compress);
|
|
349
349
|
if (signal?.aborted || !canContinue(continuationCheck)) return [
|
|
350
350
|
failedResult(events, cancellationError()),
|
|
351
351
|
events,
|
|
352
352
|
void 0
|
|
353
353
|
];
|
|
354
|
-
if (compressed && compressed.size < (0,
|
|
354
|
+
if (compressed && compressed.size < (0, utf8_js_namespaceObject.utf8Bytes)(body)) {
|
|
355
355
|
requestBody = compressed;
|
|
356
356
|
headers['Content-Encoding'] = 'gzip';
|
|
357
357
|
}
|
|
@@ -386,7 +386,7 @@ const attemptOnce = async (runtime, events, libraryVersion, createdAt, requestId
|
|
|
386
386
|
timer = globalThis.setTimeout(()=>{
|
|
387
387
|
timedOut = true;
|
|
388
388
|
const error = new Error(`Capture V1 request timed out ${timeoutPhase} after ${attemptTimeoutMs}ms`);
|
|
389
|
-
(0,
|
|
389
|
+
(0, named_error_js_namespaceObject.defineErrorName)(error, 'AbortError');
|
|
390
390
|
reject(error);
|
|
391
391
|
try {
|
|
392
392
|
controller?.abort(error);
|
|
@@ -527,7 +527,7 @@ const sendCaptureV1Batch = async (runtime, messages, libraryVersion, options = {
|
|
|
527
527
|
const remainingTime = ()=>maxElapsedMs - Math.max(0, safeNow(elapsedNow) - startedAt);
|
|
528
528
|
let requestId;
|
|
529
529
|
try {
|
|
530
|
-
requestId = (options.generateRequestId ??
|
|
530
|
+
requestId = (options.generateRequestId ?? id_js_namespaceObject.createId)();
|
|
531
531
|
} catch {
|
|
532
532
|
requestId = `capture-${isoNow(now)}`;
|
|
533
533
|
}
|
|
@@ -620,14 +620,14 @@ const sendCaptureV1TeardownBatches = (runtime, messages, libraryVersion, options
|
|
|
620
620
|
const createdAt = isoNow(now);
|
|
621
621
|
const batch = [];
|
|
622
622
|
let body = serializeEnvelope(createdAt, batch);
|
|
623
|
-
let bodyBytes = (0,
|
|
623
|
+
let bodyBytes = (0, utf8_js_namespaceObject.utf8Bytes)(body);
|
|
624
624
|
while(index + batch.length < prepared.length && batch.length < CAPTURE_V1_MAX_BATCH_EVENTS){
|
|
625
625
|
const candidate = prepared[index + batch.length];
|
|
626
626
|
const candidateBody = serializeEnvelope(createdAt, [
|
|
627
627
|
...batch,
|
|
628
628
|
candidate
|
|
629
629
|
]);
|
|
630
|
-
const candidateBytes = (0,
|
|
630
|
+
const candidateBytes = (0, utf8_js_namespaceObject.utf8Bytes)(candidateBody);
|
|
631
631
|
if (candidateBytes > remaining || batch.length > 0 && candidateBytes > CAPTURE_V1_BATCH_TARGET_BYTES) break;
|
|
632
632
|
batch.push(candidate);
|
|
633
633
|
body = candidateBody;
|
|
@@ -643,7 +643,7 @@ const sendCaptureV1TeardownBatches = (runtime, messages, libraryVersion, options
|
|
|
643
643
|
index += batch.length;
|
|
644
644
|
let requestId;
|
|
645
645
|
try {
|
|
646
|
-
requestId = (options.generateRequestId ??
|
|
646
|
+
requestId = (options.generateRequestId ?? id_js_namespaceObject.createId)();
|
|
647
647
|
} catch {
|
|
648
648
|
requestId = `capture-${createdAt}`;
|
|
649
649
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MAX_ANALYTICS_BATCH_EVENTS } from "
|
|
2
|
-
import { createId } from "
|
|
3
|
-
import { defineErrorName } from "
|
|
4
|
-
import { utf8Bytes } from "
|
|
1
|
+
import { MAX_ANALYTICS_BATCH_EVENTS } from "../analytics-internal.mjs";
|
|
2
|
+
import { createId } from "../../../primitives/id.mjs";
|
|
3
|
+
import { defineErrorName } from "../../../primitives/named-error.mjs";
|
|
4
|
+
import { utf8Bytes } from "../../../primitives/utf8.mjs";
|
|
5
5
|
const RETRYABLE_STATUSES = [
|
|
6
6
|
408,
|
|
7
7
|
500,
|
package/dist/{person-processing.d.ts → products/analytics/properties/person-processing.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PersonProfileMode } from '
|
|
1
|
+
import type { PersonProfileMode } from '../analytics-options';
|
|
2
2
|
export declare const snapshotPersonProfileMode: (read: () => unknown) => PersonProfileMode;
|
|
3
3
|
export declare const shouldProcessPerson: (mode: PersonProfileMode, identified: boolean, grouped: boolean, explicitlyEnabled: boolean) => boolean;
|
|
4
4
|
export interface PersonProperties {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BrowserProducts } from '
|
|
1
|
+
import type { BrowserProducts } from '../../core/context/browser-client';
|
|
2
2
|
import { type AutocaptureOptions } from './autocapture-options';
|
|
3
3
|
export type { AutocaptureOptions, RageclickOptions } from './autocapture-options';
|
|
4
4
|
/** Include DOM autocapture statically instead of loading it during initialization. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Disposable, ExtensionToken } from '@posthog/browser-common';
|
|
2
2
|
import type { FeatureFlagResult, FeatureFlagsReloadResult, FlagsCallback, JsonType } from './flags-options';
|
|
3
|
-
import type { IPostHogInternal, BrowserExtension } from '
|
|
3
|
+
import type { IPostHogInternal, BrowserExtension } from '../../core/context/browser-client';
|
|
4
4
|
export interface FeatureFlags extends BrowserExtension {
|
|
5
5
|
setup(client: IPostHogInternal): void | Promise<void>;
|
|
6
6
|
getFeatureFlag(key: string): FeatureFlagResult | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BrowserExtension } from '
|
|
1
|
+
import type { BrowserExtension } from '../../core/context/browser-client';
|
|
2
2
|
import type { CaptureLogOptions } from '@posthog/types';
|
|
3
3
|
export interface LogsExtension extends BrowserExtension {
|
|
4
4
|
captureLog(options: CaptureLogOptions): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Disposable } from '@posthog/browser-common';
|
|
2
|
-
import type { BrowserExtension } from '
|
|
2
|
+
import type { BrowserExtension } from '../../core/context/browser-client';
|
|
3
3
|
import type { SurveyCallback, DisplaySurveyOptions, SurveyRenderReason } from './surveys-options';
|
|
4
4
|
export interface SurveysExtension extends BrowserExtension {
|
|
5
5
|
getElementSelectors(): Set<string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@posthog/browser",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "A small, extension-based PostHog client for modern browsers",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -14,44 +14,44 @@
|
|
|
14
14
|
"ARCHITECTURE.md",
|
|
15
15
|
"README.md"
|
|
16
16
|
],
|
|
17
|
-
"main": "dist/index.js",
|
|
18
|
-
"module": "dist/index.mjs",
|
|
19
|
-
"types": "dist/index.d.ts",
|
|
17
|
+
"main": "dist/composition/npm/index.js",
|
|
18
|
+
"module": "dist/composition/npm/index.mjs",
|
|
19
|
+
"types": "dist/composition/npm/index.d.ts",
|
|
20
20
|
"exports": {
|
|
21
21
|
".": {
|
|
22
|
-
"types": "./dist/index.d.ts",
|
|
23
|
-
"require": "./dist/index.js",
|
|
24
|
-
"import": "./dist/index.mjs"
|
|
22
|
+
"types": "./dist/composition/npm/index.d.ts",
|
|
23
|
+
"require": "./dist/composition/npm/index.js",
|
|
24
|
+
"import": "./dist/composition/npm/index.mjs"
|
|
25
25
|
},
|
|
26
26
|
"./core": {
|
|
27
|
-
"types": "./dist/core.d.ts",
|
|
28
|
-
"require": "./dist/core.js",
|
|
29
|
-
"import": "./dist/core.mjs"
|
|
27
|
+
"types": "./dist/composition/npm/core.d.ts",
|
|
28
|
+
"require": "./dist/composition/npm/core.js",
|
|
29
|
+
"import": "./dist/composition/npm/core.mjs"
|
|
30
30
|
},
|
|
31
31
|
"./flags": {
|
|
32
|
-
"types": "./dist/flags.d.ts",
|
|
33
|
-
"require": "./dist/flags.js",
|
|
34
|
-
"import": "./dist/flags.mjs"
|
|
32
|
+
"types": "./dist/products/flags/flags.d.ts",
|
|
33
|
+
"require": "./dist/products/flags/flags.js",
|
|
34
|
+
"import": "./dist/products/flags/flags.mjs"
|
|
35
35
|
},
|
|
36
36
|
"./analytics": {
|
|
37
|
-
"types": "./dist/analytics.d.ts",
|
|
38
|
-
"require": "./dist/analytics.js",
|
|
39
|
-
"import": "./dist/analytics.mjs"
|
|
37
|
+
"types": "./dist/products/analytics/analytics.d.ts",
|
|
38
|
+
"require": "./dist/products/analytics/analytics.js",
|
|
39
|
+
"import": "./dist/products/analytics/analytics.mjs"
|
|
40
40
|
},
|
|
41
41
|
"./logs": {
|
|
42
|
-
"types": "./dist/logs.d.ts",
|
|
43
|
-
"import": "./dist/logs.mjs",
|
|
44
|
-
"require": "./dist/logs.js"
|
|
42
|
+
"types": "./dist/products/logs/logs.d.ts",
|
|
43
|
+
"import": "./dist/products/logs/logs.mjs",
|
|
44
|
+
"require": "./dist/products/logs/logs.js"
|
|
45
45
|
},
|
|
46
46
|
"./surveys": {
|
|
47
|
-
"types": "./dist/surveys.d.ts",
|
|
48
|
-
"require": "./dist/surveys.js",
|
|
49
|
-
"import": "./dist/surveys.mjs"
|
|
47
|
+
"types": "./dist/products/surveys/surveys.d.ts",
|
|
48
|
+
"require": "./dist/products/surveys/surveys.js",
|
|
49
|
+
"import": "./dist/products/surveys/surveys.mjs"
|
|
50
50
|
},
|
|
51
51
|
"./autocapture": {
|
|
52
|
-
"types": "./dist/autocapture.d.ts",
|
|
53
|
-
"require": "./dist/autocapture.js",
|
|
54
|
-
"import": "./dist/autocapture.mjs"
|
|
52
|
+
"types": "./dist/products/autocapture/autocapture.d.ts",
|
|
53
|
+
"require": "./dist/products/autocapture/autocapture.js",
|
|
54
|
+
"import": "./dist/products/autocapture/autocapture.mjs"
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
package/dist/core.mjs
DELETED
package/dist/version.mjs
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|