@statsig/web-analytics 3.1.0 → 3.2.0-beta.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/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@statsig/web-analytics",
3
- "version": "3.1.0",
3
+ "version": "3.2.0-beta.1",
4
4
  "dependencies": {
5
- "@statsig/client-core": "3.1.0",
6
- "@statsig/js-client": "3.1.0"
5
+ "@statsig/client-core": "3.2.0-beta.1",
6
+ "@statsig/js-client": "3.2.0-beta.1"
7
7
  },
8
8
  "jsdelivr": "./build/statsig-web-analytics.min.js",
9
9
  "type": "commonjs",
@@ -1,4 +1,8 @@
1
- import { PrecomputedEvaluationsInterface } from '@statsig/client-core';
1
+ import { PrecomputedEvaluationsInterface, StatsigPlugin } from '@statsig/client-core';
2
+ export declare class StatsigAutoCapturePlugin implements StatsigPlugin<PrecomputedEvaluationsInterface> {
3
+ readonly __plugin = "auto-capture";
4
+ bind(client: PrecomputedEvaluationsInterface): void;
5
+ }
2
6
  export declare function runStatsigAutoCapture(client: PrecomputedEvaluationsInterface): AutoCapture;
3
7
  export declare class AutoCapture {
4
8
  private _client;
@@ -1,10 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AutoCapture = exports.runStatsigAutoCapture = void 0;
4
- /* eslint-disable no-console */
3
+ exports.AutoCapture = exports.runStatsigAutoCapture = exports.StatsigAutoCapturePlugin = void 0;
5
4
  const client_core_1 = require("@statsig/client-core");
6
5
  const Utils_1 = require("./Utils");
7
6
  const payloadUtils_1 = require("./payloadUtils");
7
+ class StatsigAutoCapturePlugin {
8
+ constructor() {
9
+ this.__plugin = 'auto-capture';
10
+ }
11
+ bind(client) {
12
+ runStatsigAutoCapture(client);
13
+ }
14
+ }
15
+ exports.StatsigAutoCapturePlugin = StatsigAutoCapturePlugin;
8
16
  function runStatsigAutoCapture(client) {
9
17
  return new AutoCapture(client);
10
18
  }
package/src/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { AutoCapture, runStatsigAutoCapture } from './AutoCapture';
2
- export { AutoCapture, runStatsigAutoCapture };
1
+ import { AutoCapture, StatsigAutoCapturePlugin, runStatsigAutoCapture } from './AutoCapture';
2
+ export { AutoCapture, runStatsigAutoCapture, StatsigAutoCapturePlugin };
3
3
  export default __STATSIG__;
package/src/index.js CHANGED
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.runStatsigAutoCapture = exports.AutoCapture = void 0;
3
+ exports.StatsigAutoCapturePlugin = exports.runStatsigAutoCapture = exports.AutoCapture = void 0;
4
4
  const AutoCapture_1 = require("./AutoCapture");
5
5
  Object.defineProperty(exports, "AutoCapture", { enumerable: true, get: function () { return AutoCapture_1.AutoCapture; } });
6
+ Object.defineProperty(exports, "StatsigAutoCapturePlugin", { enumerable: true, get: function () { return AutoCapture_1.StatsigAutoCapturePlugin; } });
6
7
  Object.defineProperty(exports, "runStatsigAutoCapture", { enumerable: true, get: function () { return AutoCapture_1.runStatsigAutoCapture; } });
7
8
  __STATSIG__ = Object.assign(Object.assign({}, (__STATSIG__ !== null && __STATSIG__ !== void 0 ? __STATSIG__ : {})), { AutoCapture: AutoCapture_1.AutoCapture,
8
- runStatsigAutoCapture: AutoCapture_1.runStatsigAutoCapture });
9
+ runStatsigAutoCapture: AutoCapture_1.runStatsigAutoCapture,
10
+ StatsigAutoCapturePlugin: AutoCapture_1.StatsigAutoCapturePlugin });
9
11
  exports.default = __STATSIG__;