@amplitude/plugin-session-replay-browser 1.6.16 → 1.6.18

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.
@@ -1,19 +1,17 @@
1
- import { BrowserClient, BrowserConfig, DestinationPlugin, Event, Result } from '@amplitude/analytics-types';
1
+ import { BrowserConfig, EnrichmentPlugin, Event } from '@amplitude/analytics-types';
2
2
  import { SessionReplayOptions } from './typings/session-replay';
3
- export declare class SessionReplayPlugin implements DestinationPlugin {
3
+ export declare class SessionReplayPlugin implements EnrichmentPlugin {
4
4
  name: string;
5
- type: "destination";
6
- clientRemove: BrowserClient['remove'];
5
+ type: "enrichment";
7
6
  config: BrowserConfig;
8
7
  options: SessionReplayOptions;
9
8
  constructor(options?: SessionReplayOptions);
10
- setup(config: BrowserConfig, client?: BrowserClient): Promise<void>;
11
- execute(event: Event): Promise<Result>;
12
- flush(): Promise<void>;
9
+ setup(config: BrowserConfig): Promise<void>;
10
+ execute(event: Event): Promise<Event>;
13
11
  teardown(): Promise<void>;
14
12
  getSessionReplayProperties(): {
15
13
  [key: string]: string | boolean | null;
16
14
  };
17
15
  }
18
- export declare const sessionReplayPlugin: (options?: SessionReplayOptions) => DestinationPlugin;
16
+ export declare const sessionReplayPlugin: (options?: SessionReplayOptions) => EnrichmentPlugin;
19
17
  //# sourceMappingURL=session-replay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"session-replay.d.ts","sourceRoot":"","sources":["../../src/session-replay.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,aAAa,EACb,iBAAiB,EAEjB,KAAK,EACL,MAAM,EACP,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAqChE,qBAAa,mBAAoB,YAAW,iBAAiB;IAC3D,IAAI,SAA8C;IAClD,IAAI,gBAA0B;IAI9B,YAAY,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IAItC,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,oBAAoB,CAAC;gBAElB,OAAO,CAAC,EAAE,oBAAoB;IAQpC,KAAK,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,EAAE,aAAa;IAuDnD,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC;IAQtC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAItB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAa/B,0BAA0B;;;CAG3B;AAED,eAAO,MAAM,mBAAmB,EAAE,CAAC,OAAO,CAAC,EAAE,oBAAoB,KAAK,iBAIrE,CAAC"}
1
+ {"version":3,"file":"session-replay.d.ts","sourceRoot":"","sources":["../../src/session-replay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAEpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGhE,qBAAa,mBAAoB,YAAW,gBAAgB;IAC1D,IAAI,SAA8C;IAClD,IAAI,eAAyB;IAI7B,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,oBAAoB,CAAC;gBAElB,OAAO,CAAC,EAAE,oBAAoB;IAQpC,KAAK,CAAC,MAAM,EAAE,aAAa;IA8C3B,OAAO,CAAC,KAAK,EAAE,KAAK;IAmBpB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAS/B,0BAA0B;;;CAG3B;AAED,eAAO,MAAM,mBAAmB,EAAE,CAAC,OAAO,CAAC,EAAE,oBAAoB,KAAK,gBAIrE,CAAC"}
@@ -3,67 +3,23 @@ exports.sessionReplayPlugin = exports.SessionReplayPlugin = void 0;
3
3
  var tslib_1 = require("tslib");
4
4
  var sessionReplay = tslib_1.__importStar(require("@amplitude/session-replay-browser"));
5
5
  var version_1 = require("./version");
6
- var ENRICHMENT_PLUGIN_NAME = '@amplitude/plugin-session-replay-enrichment-browser';
7
- var SessionReplayEnrichmentPlugin = /** @class */ (function () {
8
- function SessionReplayEnrichmentPlugin() {
9
- this.name = ENRICHMENT_PLUGIN_NAME;
10
- this.type = 'enrichment';
11
- }
12
- SessionReplayEnrichmentPlugin.prototype.setup = function (_config, _client) {
13
- return tslib_1.__awaiter(this, void 0, void 0, function () {
14
- return tslib_1.__generator(this, function (_a) {
15
- this.config = _config;
16
- return [2 /*return*/];
17
- });
18
- });
19
- };
20
- SessionReplayEnrichmentPlugin.prototype.execute = function (event) {
21
- return tslib_1.__awaiter(this, void 0, void 0, function () {
22
- var sessionRecordingProperties;
23
- return tslib_1.__generator(this, function (_a) {
24
- switch (_a.label) {
25
- case 0:
26
- if (!(this.config.sessionId && this.config.sessionId !== sessionReplay.getSessionId())) return [3 /*break*/, 2];
27
- return [4 /*yield*/, sessionReplay.setSessionId(this.config.sessionId).promise];
28
- case 1:
29
- _a.sent();
30
- _a.label = 2;
31
- case 2:
32
- // Treating config.sessionId as source of truth, if the event's session id doesn't match, the
33
- // event is not of the current session (offline/late events). In that case, don't tag the events
34
- if (this.config.sessionId && this.config.sessionId === event.session_id) {
35
- sessionRecordingProperties = sessionReplay.getSessionReplayProperties();
36
- event.event_properties = tslib_1.__assign(tslib_1.__assign({}, event.event_properties), sessionRecordingProperties);
37
- }
38
- return [2 /*return*/, Promise.resolve(event)];
39
- }
40
- });
41
- });
42
- };
43
- return SessionReplayEnrichmentPlugin;
44
- }());
45
6
  var SessionReplayPlugin = /** @class */ (function () {
46
7
  function SessionReplayPlugin(options) {
47
8
  this.name = '@amplitude/plugin-session-replay-browser';
48
- this.type = 'destination';
9
+ this.type = 'enrichment';
49
10
  this.options = tslib_1.__assign({}, options);
50
11
  // The user did not explicitly configure forceSessionTracking to false, default to true.
51
12
  if (this.options.forceSessionTracking !== false) {
52
13
  this.options.forceSessionTracking = true;
53
14
  }
54
15
  }
55
- SessionReplayPlugin.prototype.setup = function (config, client) {
16
+ SessionReplayPlugin.prototype.setup = function (config) {
56
17
  var _a, _b, _c, _d;
57
18
  return tslib_1.__awaiter(this, void 0, void 0, function () {
58
19
  return tslib_1.__generator(this, function (_e) {
59
20
  switch (_e.label) {
60
21
  case 0:
61
- if (!client) {
62
- config.loggerProvider.error('SessionReplayPlugin requires v1.9.1+ of the Amplitude SDK.');
63
- return [2 /*return*/];
64
- }
65
22
  config.loggerProvider.log("Installing @amplitude/plugin-session-replay, version ".concat(version_1.VERSION, "."));
66
- this.clientRemove = client.remove.bind(client);
67
23
  this.config = config;
68
24
  if (this.options.forceSessionTracking) {
69
25
  if (typeof config.defaultTracking === 'boolean') {
@@ -102,11 +58,6 @@ var SessionReplayPlugin = /** @class */ (function () {
102
58
  version: { type: 'plugin', version: version_1.VERSION },
103
59
  }).promise];
104
60
  case 1:
105
- _e.sent();
106
- // add enrichment plugin to add session replay properties to events
107
- return [4 /*yield*/, client.add(new SessionReplayEnrichmentPlugin()).promise];
108
- case 2:
109
- // add enrichment plugin to add session replay properties to events
110
61
  _e.sent();
111
62
  return [2 /*return*/];
112
63
  }
@@ -115,23 +66,23 @@ var SessionReplayPlugin = /** @class */ (function () {
115
66
  };
116
67
  SessionReplayPlugin.prototype.execute = function (event) {
117
68
  return tslib_1.__awaiter(this, void 0, void 0, function () {
118
- return tslib_1.__generator(this, function (_a) {
119
- return [2 /*return*/, Promise.resolve({
120
- event: event,
121
- code: 200,
122
- message: 'success',
123
- })];
124
- });
125
- });
126
- };
127
- SessionReplayPlugin.prototype.flush = function () {
128
- return tslib_1.__awaiter(this, void 0, void 0, function () {
69
+ var sessionRecordingProperties;
129
70
  return tslib_1.__generator(this, function (_a) {
130
71
  switch (_a.label) {
131
- case 0: return [4 /*yield*/, sessionReplay.flush(false)];
72
+ case 0:
73
+ if (!(this.config.sessionId && this.config.sessionId !== sessionReplay.getSessionId())) return [3 /*break*/, 2];
74
+ return [4 /*yield*/, sessionReplay.setSessionId(this.config.sessionId).promise];
132
75
  case 1:
133
76
  _a.sent();
134
- return [2 /*return*/];
77
+ _a.label = 2;
78
+ case 2:
79
+ // Treating config.sessionId as source of truth, if the event's session id doesn't match, the
80
+ // event is not of the current session (offline/late events). In that case, don't tag the events
81
+ if (this.config.sessionId && this.config.sessionId === event.session_id) {
82
+ sessionRecordingProperties = sessionReplay.getSessionReplayProperties();
83
+ event.event_properties = tslib_1.__assign(tslib_1.__assign({}, event.event_properties), sessionRecordingProperties);
84
+ }
85
+ return [2 /*return*/, Promise.resolve(event)];
135
86
  }
136
87
  });
137
88
  });
@@ -139,21 +90,13 @@ var SessionReplayPlugin = /** @class */ (function () {
139
90
  SessionReplayPlugin.prototype.teardown = function () {
140
91
  return tslib_1.__awaiter(this, void 0, void 0, function () {
141
92
  return tslib_1.__generator(this, function (_a) {
142
- switch (_a.label) {
143
- case 0: return [4 /*yield*/, this.clientRemove(ENRICHMENT_PLUGIN_NAME).promise];
144
- case 1:
145
- _a.sent();
146
- sessionReplay.shutdown();
147
- // the following are initialized in setup() which will always be called first
148
- // here we reset them to null to prevent memory leaks
149
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
150
- // @ts-ignore
151
- this.config = null;
152
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
153
- // @ts-ignore
154
- this.clientRemove = null;
155
- return [2 /*return*/];
156
- }
93
+ sessionReplay.shutdown();
94
+ // the following are initialized in setup() which will always be called first
95
+ // here we reset them to null to prevent memory leaks
96
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
97
+ // @ts-ignore
98
+ this.config = null;
99
+ return [2 /*return*/];
157
100
  });
158
101
  });
159
102
  };
@@ -1 +1 @@
1
- {"version":3,"file":"session-replay.js","sourceRoot":"","sources":["../../src/session-replay.ts"],"names":[],"mappings":";;;AAQA,uFAAmE;AAEnE,qCAAoC;AACpC,IAAM,sBAAsB,GAAG,qDAAqD,CAAC;AAErF;IAAA;QACE,SAAI,GAAG,sBAAsB,CAAC;QAC9B,SAAI,GAAG,YAAqB,CAAC;IA6B/B,CAAC;IA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aAAa;wBACb,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;;;;;KAC1B;IAED,wDAA0B,GAA1B;QACE,OAAO,aAAa,CAAC,0BAA0B,EAAE,CAAC;IACpD,CAAC;IACH,0BAAC;AAAD,CAAC,AAxGD,IAwGC;AAxGY,kDAAmB;AA0GzB,IAAM,mBAAmB,GAA0D,UACxF,OAA8B;IAE9B,OAAO,IAAI,mBAAmB,CAAC,OAAO,CAAC,CAAC;AAC1C,CAAC,CAAC;AAJW,QAAA,mBAAmB,uBAI9B","sourcesContent":["import {\n BrowserClient,\n BrowserConfig,\n DestinationPlugin,\n EnrichmentPlugin,\n Event,\n Result,\n} from '@amplitude/analytics-types';\nimport * as sessionReplay from '@amplitude/session-replay-browser';\nimport { SessionReplayOptions } from './typings/session-replay';\nimport { VERSION } from './version';\nconst ENRICHMENT_PLUGIN_NAME = '@amplitude/plugin-session-replay-enrichment-browser';\n\nclass SessionReplayEnrichmentPlugin implements EnrichmentPlugin {\n name = ENRICHMENT_PLUGIN_NAME;\n type = 'enrichment' as const;\n // this.config is defined in setup() which will always be called first\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n config: BrowserConfig;\n\n async setup(_config: BrowserConfig, _client: BrowserClient) {\n this.config = _config;\n }\n\n async execute(event: Event) {\n // On event, synchronize the session id to the what's on the browserConfig (source of truth)\n // Choosing not to read from event object here, concerned about offline/delayed events messing up the state stored\n // in SR.\n if (this.config.sessionId && this.config.sessionId !== sessionReplay.getSessionId()) {\n await sessionReplay.setSessionId(this.config.sessionId).promise;\n }\n\n // Treating config.sessionId as source of truth, if the event's session id doesn't match, the\n // event is not of the current session (offline/late events). In that case, don't tag the events\n if (this.config.sessionId && this.config.sessionId === event.session_id) {\n const sessionRecordingProperties = sessionReplay.getSessionReplayProperties();\n event.event_properties = {\n ...event.event_properties,\n ...sessionRecordingProperties,\n };\n }\n return Promise.resolve(event);\n }\n}\n\nexport class SessionReplayPlugin implements DestinationPlugin {\n name = '@amplitude/plugin-session-replay-browser';\n type = 'destination' as const;\n // this.client is defined in setup() which will always be called first\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n clientRemove: BrowserClient['remove'];\n // this.config is defined in setup() which will always be called first\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n config: BrowserConfig;\n options: SessionReplayOptions;\n\n constructor(options?: SessionReplayOptions) {\n this.options = { ...options };\n // The user did not explicitly configure forceSessionTracking to false, default to true.\n if (this.options.forceSessionTracking !== false) {\n this.options.forceSessionTracking = true;\n }\n }\n\n async setup(config: BrowserConfig, client?: BrowserClient) {\n if (!client) {\n config.loggerProvider.error('SessionReplayPlugin requires v1.9.1+ of the Amplitude SDK.');\n return;\n }\n\n config.loggerProvider.log(`Installing @amplitude/plugin-session-replay, version ${VERSION}.`);\n\n this.clientRemove = client.remove.bind(client);\n this.config = config;\n\n if (this.options.forceSessionTracking) {\n if (typeof config.defaultTracking === 'boolean') {\n if (config.defaultTracking === false) {\n config.defaultTracking = {\n pageViews: false,\n formInteractions: false,\n fileDownloads: false,\n sessions: true,\n };\n }\n } else {\n config.defaultTracking = {\n ...config.defaultTracking,\n sessions: true,\n };\n }\n }\n\n await sessionReplay.init(config.apiKey, {\n instanceName: this.config.instanceName,\n deviceId: this.config.deviceId,\n optOut: this.config.optOut,\n sessionId: this.config.sessionId,\n loggerProvider: this.config.loggerProvider,\n logLevel: this.config.logLevel,\n flushMaxRetries: this.config.flushMaxRetries,\n serverZone: this.config.serverZone,\n sampleRate: this.options.sampleRate,\n privacyConfig: {\n blockSelector: this.options.privacyConfig?.blockSelector,\n maskSelector: this.options.privacyConfig?.maskSelector,\n unmaskSelector: this.options.privacyConfig?.unmaskSelector,\n defaultMaskLevel: this.options.privacyConfig?.defaultMaskLevel,\n },\n debugMode: this.options.debugMode,\n configEndpointUrl: this.options.configEndpointUrl,\n shouldInlineStylesheet: this.options.shouldInlineStylesheet,\n version: { type: 'plugin', version: VERSION },\n }).promise;\n\n // add enrichment plugin to add session replay properties to events\n await client.add(new SessionReplayEnrichmentPlugin()).promise;\n }\n\n async execute(event: Event): Promise<Result> {\n return Promise.resolve({\n event,\n code: 200,\n message: 'success',\n });\n }\n\n async flush(): Promise<void> {\n await sessionReplay.flush(false);\n }\n\n async teardown(): Promise<void> {\n await this.clientRemove(ENRICHMENT_PLUGIN_NAME).promise;\n sessionReplay.shutdown();\n // the following are initialized in setup() which will always be called first\n // here we reset them to null to prevent memory leaks\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.config = null;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.clientRemove = null;\n }\n\n getSessionReplayProperties() {\n return sessionReplay.getSessionReplayProperties();\n }\n}\n\nexport const sessionReplayPlugin: (options?: SessionReplayOptions) => DestinationPlugin = (\n options?: SessionReplayOptions,\n) => {\n return new SessionReplayPlugin(options);\n};\n"]}
1
+ {"version":3,"file":"session-replay.js","sourceRoot":"","sources":["../../src/session-replay.ts"],"names":[],"mappings":";;;AACA,uFAAmE;AAEnE,qCAAoC;AAEpC;IASE,6BAAY,OAA8B;QAR1C,SAAI,GAAG,0CAA0C,CAAC;QAClD,SAAI,GAAG,YAAqB,CAAC;QAQ3B,IAAI,CAAC,OAAO,wBAAQ,OAAO,CAAE,CAAC;QAC9B,wFAAwF;QACxF,IAAI,IAAI,CAAC,OAAO,CAAC,oBAAoB,KAAK,KAAK,EAAE;YAC/C,IAAI,CAAC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;SAC1C;IACH,CAAC;IAEK,mCAAK,GAAX,UAAY,MAAqB;;;;;;wBAC/B,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,+DAAwD,iBAAO,MAAG,CAAC,CAAC;wBAE9F,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;wBAErB,IAAI,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE;4BACrC,IAAI,OAAO,MAAM,CAAC,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AI,mBAAmB,CAAC,OAAO,CAAC,CAAC;AAC1C,CAAC,CAAC;AAJW,QAAA,mBAAmB,uBAI9B","sourcesContent":["import { BrowserConfig, EnrichmentPlugin, Event } from '@amplitude/analytics-types';\nimport * as sessionReplay from '@amplitude/session-replay-browser';\nimport { SessionReplayOptions } from './typings/session-replay';\nimport { VERSION } from './version';\n\nexport class SessionReplayPlugin implements EnrichmentPlugin {\n name = '@amplitude/plugin-session-replay-browser';\n type = 'enrichment' as const;\n // this.config is defined in setup() which will always be called first\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n config: BrowserConfig;\n options: SessionReplayOptions;\n\n constructor(options?: SessionReplayOptions) {\n this.options = { ...options };\n // The user did not explicitly configure forceSessionTracking to false, default to true.\n if (this.options.forceSessionTracking !== false) {\n this.options.forceSessionTracking = true;\n }\n }\n\n async setup(config: BrowserConfig) {\n config.loggerProvider.log(`Installing @amplitude/plugin-session-replay, version ${VERSION}.`);\n\n this.config = config;\n\n if (this.options.forceSessionTracking) {\n if (typeof config.defaultTracking === 'boolean') {\n if (config.defaultTracking === false) {\n config.defaultTracking = {\n pageViews: false,\n formInteractions: false,\n fileDownloads: false,\n sessions: true,\n };\n }\n } else {\n config.defaultTracking = {\n ...config.defaultTracking,\n sessions: true,\n };\n }\n }\n\n await sessionReplay.init(config.apiKey, {\n instanceName: this.config.instanceName,\n deviceId: this.config.deviceId,\n optOut: this.config.optOut,\n sessionId: this.config.sessionId,\n loggerProvider: this.config.loggerProvider,\n logLevel: this.config.logLevel,\n flushMaxRetries: this.config.flushMaxRetries,\n serverZone: this.config.serverZone,\n sampleRate: this.options.sampleRate,\n privacyConfig: {\n blockSelector: this.options.privacyConfig?.blockSelector,\n maskSelector: this.options.privacyConfig?.maskSelector,\n unmaskSelector: this.options.privacyConfig?.unmaskSelector,\n defaultMaskLevel: this.options.privacyConfig?.defaultMaskLevel,\n },\n debugMode: this.options.debugMode,\n configEndpointUrl: this.options.configEndpointUrl,\n shouldInlineStylesheet: this.options.shouldInlineStylesheet,\n version: { type: 'plugin', version: VERSION },\n }).promise;\n }\n\n async execute(event: Event) {\n // On event, synchronize the session id to the what's on the browserConfig (source of truth)\n // Choosing not to read from event object here, concerned about offline/delayed events messing up the state stored\n // in SR.\n if (this.config.sessionId && this.config.sessionId !== sessionReplay.getSessionId()) {\n await sessionReplay.setSessionId(this.config.sessionId).promise;\n }\n // Treating config.sessionId as source of truth, if the event's session id doesn't match, the\n // event is not of the current session (offline/late events). In that case, don't tag the events\n if (this.config.sessionId && this.config.sessionId === event.session_id) {\n const sessionRecordingProperties = sessionReplay.getSessionReplayProperties();\n event.event_properties = {\n ...event.event_properties,\n ...sessionRecordingProperties,\n };\n }\n return Promise.resolve(event);\n }\n\n async teardown(): Promise<void> {\n sessionReplay.shutdown();\n // the following are initialized in setup() which will always be called first\n // here we reset them to null to prevent memory leaks\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.config = null;\n }\n\n getSessionReplayProperties() {\n return sessionReplay.getSessionReplayProperties();\n }\n}\n\nexport const sessionReplayPlugin: (options?: SessionReplayOptions) => EnrichmentPlugin = (\n options?: SessionReplayOptions,\n) => {\n return new SessionReplayPlugin(options);\n};\n"]}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.6.16";
1
+ export declare const VERSION = "1.6.18";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, "__esModule", { value: true });
2
2
  exports.VERSION = void 0;
3
3
  // Autogenerated by `yarn version-file`. DO NOT EDIT
4
- exports.VERSION = '1.6.16';
4
+ exports.VERSION = '1.6.18';
5
5
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";;AAAA,oDAAoD;AACvC,QAAA,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["// Autogenerated by `yarn version-file`. DO NOT EDIT\nexport const VERSION = '1.6.16';\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";;AAAA,oDAAoD;AACvC,QAAA,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["// Autogenerated by `yarn version-file`. DO NOT EDIT\nexport const VERSION = '1.6.18';\n"]}
@@ -1,19 +1,17 @@
1
- import { BrowserClient, BrowserConfig, DestinationPlugin, Event, Result } from '@amplitude/analytics-types';
1
+ import { BrowserConfig, EnrichmentPlugin, Event } from '@amplitude/analytics-types';
2
2
  import { SessionReplayOptions } from './typings/session-replay';
3
- export declare class SessionReplayPlugin implements DestinationPlugin {
3
+ export declare class SessionReplayPlugin implements EnrichmentPlugin {
4
4
  name: string;
5
- type: "destination";
6
- clientRemove: BrowserClient['remove'];
5
+ type: "enrichment";
7
6
  config: BrowserConfig;
8
7
  options: SessionReplayOptions;
9
8
  constructor(options?: SessionReplayOptions);
10
- setup(config: BrowserConfig, client?: BrowserClient): Promise<void>;
11
- execute(event: Event): Promise<Result>;
12
- flush(): Promise<void>;
9
+ setup(config: BrowserConfig): Promise<void>;
10
+ execute(event: Event): Promise<Event>;
13
11
  teardown(): Promise<void>;
14
12
  getSessionReplayProperties(): {
15
13
  [key: string]: string | boolean | null;
16
14
  };
17
15
  }
18
- export declare const sessionReplayPlugin: (options?: SessionReplayOptions) => DestinationPlugin;
16
+ export declare const sessionReplayPlugin: (options?: SessionReplayOptions) => EnrichmentPlugin;
19
17
  //# sourceMappingURL=session-replay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"session-replay.d.ts","sourceRoot":"","sources":["../../src/session-replay.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,aAAa,EACb,iBAAiB,EAEjB,KAAK,EACL,MAAM,EACP,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAqChE,qBAAa,mBAAoB,YAAW,iBAAiB;IAC3D,IAAI,SAA8C;IAClD,IAAI,gBAA0B;IAI9B,YAAY,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IAItC,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,oBAAoB,CAAC;gBAElB,OAAO,CAAC,EAAE,oBAAoB;IAQpC,KAAK,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,EAAE,aAAa;IAuDnD,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC;IAQtC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAItB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAa/B,0BAA0B;;;CAG3B;AAED,eAAO,MAAM,mBAAmB,EAAE,CAAC,OAAO,CAAC,EAAE,oBAAoB,KAAK,iBAIrE,CAAC"}
1
+ {"version":3,"file":"session-replay.d.ts","sourceRoot":"","sources":["../../src/session-replay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAEpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGhE,qBAAa,mBAAoB,YAAW,gBAAgB;IAC1D,IAAI,SAA8C;IAClD,IAAI,eAAyB;IAI7B,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,oBAAoB,CAAC;gBAElB,OAAO,CAAC,EAAE,oBAAoB;IAQpC,KAAK,CAAC,MAAM,EAAE,aAAa;IA8C3B,OAAO,CAAC,KAAK,EAAE,KAAK;IAmBpB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAS/B,0BAA0B;;;CAG3B;AAED,eAAO,MAAM,mBAAmB,EAAE,CAAC,OAAO,CAAC,EAAE,oBAAoB,KAAK,gBAIrE,CAAC"}
@@ -1,67 +1,23 @@
1
1
  import { __assign, __awaiter, __generator } from "tslib";
2
2
  import * as sessionReplay from '@amplitude/session-replay-browser';
3
3
  import { VERSION } from './version';
4
- var ENRICHMENT_PLUGIN_NAME = '@amplitude/plugin-session-replay-enrichment-browser';
5
- var SessionReplayEnrichmentPlugin = /** @class */ (function () {
6
- function SessionReplayEnrichmentPlugin() {
7
- this.name = ENRICHMENT_PLUGIN_NAME;
8
- this.type = 'enrichment';
9
- }
10
- SessionReplayEnrichmentPlugin.prototype.setup = function (_config, _client) {
11
- return __awaiter(this, void 0, void 0, function () {
12
- return __generator(this, function (_a) {
13
- this.config = _config;
14
- return [2 /*return*/];
15
- });
16
- });
17
- };
18
- SessionReplayEnrichmentPlugin.prototype.execute = function (event) {
19
- return __awaiter(this, void 0, void 0, function () {
20
- var sessionRecordingProperties;
21
- return __generator(this, function (_a) {
22
- switch (_a.label) {
23
- case 0:
24
- if (!(this.config.sessionId && this.config.sessionId !== sessionReplay.getSessionId())) return [3 /*break*/, 2];
25
- return [4 /*yield*/, sessionReplay.setSessionId(this.config.sessionId).promise];
26
- case 1:
27
- _a.sent();
28
- _a.label = 2;
29
- case 2:
30
- // Treating config.sessionId as source of truth, if the event's session id doesn't match, the
31
- // event is not of the current session (offline/late events). In that case, don't tag the events
32
- if (this.config.sessionId && this.config.sessionId === event.session_id) {
33
- sessionRecordingProperties = sessionReplay.getSessionReplayProperties();
34
- event.event_properties = __assign(__assign({}, event.event_properties), sessionRecordingProperties);
35
- }
36
- return [2 /*return*/, Promise.resolve(event)];
37
- }
38
- });
39
- });
40
- };
41
- return SessionReplayEnrichmentPlugin;
42
- }());
43
4
  var SessionReplayPlugin = /** @class */ (function () {
44
5
  function SessionReplayPlugin(options) {
45
6
  this.name = '@amplitude/plugin-session-replay-browser';
46
- this.type = 'destination';
7
+ this.type = 'enrichment';
47
8
  this.options = __assign({}, options);
48
9
  // The user did not explicitly configure forceSessionTracking to false, default to true.
49
10
  if (this.options.forceSessionTracking !== false) {
50
11
  this.options.forceSessionTracking = true;
51
12
  }
52
13
  }
53
- SessionReplayPlugin.prototype.setup = function (config, client) {
14
+ SessionReplayPlugin.prototype.setup = function (config) {
54
15
  var _a, _b, _c, _d;
55
16
  return __awaiter(this, void 0, void 0, function () {
56
17
  return __generator(this, function (_e) {
57
18
  switch (_e.label) {
58
19
  case 0:
59
- if (!client) {
60
- config.loggerProvider.error('SessionReplayPlugin requires v1.9.1+ of the Amplitude SDK.');
61
- return [2 /*return*/];
62
- }
63
20
  config.loggerProvider.log("Installing @amplitude/plugin-session-replay, version ".concat(VERSION, "."));
64
- this.clientRemove = client.remove.bind(client);
65
21
  this.config = config;
66
22
  if (this.options.forceSessionTracking) {
67
23
  if (typeof config.defaultTracking === 'boolean') {
@@ -100,11 +56,6 @@ var SessionReplayPlugin = /** @class */ (function () {
100
56
  version: { type: 'plugin', version: VERSION },
101
57
  }).promise];
102
58
  case 1:
103
- _e.sent();
104
- // add enrichment plugin to add session replay properties to events
105
- return [4 /*yield*/, client.add(new SessionReplayEnrichmentPlugin()).promise];
106
- case 2:
107
- // add enrichment plugin to add session replay properties to events
108
59
  _e.sent();
109
60
  return [2 /*return*/];
110
61
  }
@@ -113,23 +64,23 @@ var SessionReplayPlugin = /** @class */ (function () {
113
64
  };
114
65
  SessionReplayPlugin.prototype.execute = function (event) {
115
66
  return __awaiter(this, void 0, void 0, function () {
116
- return __generator(this, function (_a) {
117
- return [2 /*return*/, Promise.resolve({
118
- event: event,
119
- code: 200,
120
- message: 'success',
121
- })];
122
- });
123
- });
124
- };
125
- SessionReplayPlugin.prototype.flush = function () {
126
- return __awaiter(this, void 0, void 0, function () {
67
+ var sessionRecordingProperties;
127
68
  return __generator(this, function (_a) {
128
69
  switch (_a.label) {
129
- case 0: return [4 /*yield*/, sessionReplay.flush(false)];
70
+ case 0:
71
+ if (!(this.config.sessionId && this.config.sessionId !== sessionReplay.getSessionId())) return [3 /*break*/, 2];
72
+ return [4 /*yield*/, sessionReplay.setSessionId(this.config.sessionId).promise];
130
73
  case 1:
131
74
  _a.sent();
132
- return [2 /*return*/];
75
+ _a.label = 2;
76
+ case 2:
77
+ // Treating config.sessionId as source of truth, if the event's session id doesn't match, the
78
+ // event is not of the current session (offline/late events). In that case, don't tag the events
79
+ if (this.config.sessionId && this.config.sessionId === event.session_id) {
80
+ sessionRecordingProperties = sessionReplay.getSessionReplayProperties();
81
+ event.event_properties = __assign(__assign({}, event.event_properties), sessionRecordingProperties);
82
+ }
83
+ return [2 /*return*/, Promise.resolve(event)];
133
84
  }
134
85
  });
135
86
  });
@@ -137,21 +88,13 @@ var SessionReplayPlugin = /** @class */ (function () {
137
88
  SessionReplayPlugin.prototype.teardown = function () {
138
89
  return __awaiter(this, void 0, void 0, function () {
139
90
  return __generator(this, function (_a) {
140
- switch (_a.label) {
141
- case 0: return [4 /*yield*/, this.clientRemove(ENRICHMENT_PLUGIN_NAME).promise];
142
- case 1:
143
- _a.sent();
144
- sessionReplay.shutdown();
145
- // the following are initialized in setup() which will always be called first
146
- // here we reset them to null to prevent memory leaks
147
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
148
- // @ts-ignore
149
- this.config = null;
150
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
151
- // @ts-ignore
152
- this.clientRemove = null;
153
- return [2 /*return*/];
154
- }
91
+ sessionReplay.shutdown();
92
+ // the following are initialized in setup() which will always be called first
93
+ // here we reset them to null to prevent memory leaks
94
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
95
+ // @ts-ignore
96
+ this.config = null;
97
+ return [2 /*return*/];
155
98
  });
156
99
  });
157
100
  };
@@ -1 +1 @@
1
- {"version":3,"file":"session-replay.js","sourceRoot":"","sources":["../../src/session-replay.ts"],"names":[],"mappings":";AAQA,OAAO,KAAK,aAAa,MAAM,mCAAmC,CAAC;AAEnE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,IAAM,sBAAsB,GAAG,qDAAqD,CAAC;AAErF;IAAA;QACE,SAAI,GAAG,sBAAsB,CAAC;QAC9B,SAAI,GAAG,YAAqB,CAAC;IA6B/B,CAAC;IAvBO,6CAAK,GAAX,UAAY,OAAs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AAG,IAAI,CAAC;;;;;KAC1B;IAED,wDAA0B,GAA1B;QACE,OAAO,aAAa,CAAC,0BAA0B,EAAE,CAAC;IACpD,CAAC;IACH,0BAAC;AAAD,CAAC,AAxGD,IAwGC;;AAED,MAAM,CAAC,IAAM,mBAAmB,GAA0D,UACxF,OAA8B;IAE9B,OAAO,IAAI,mBAAmB,CAAC,OAAO,CAAC,CAAC;AAC1C,CAAC,CAAC","sourcesContent":["import {\n BrowserClient,\n BrowserConfig,\n DestinationPlugin,\n EnrichmentPlugin,\n Event,\n Result,\n} from '@amplitude/analytics-types';\nimport * as sessionReplay from '@amplitude/session-replay-browser';\nimport { SessionReplayOptions } from './typings/session-replay';\nimport { VERSION } from './version';\nconst ENRICHMENT_PLUGIN_NAME = '@amplitude/plugin-session-replay-enrichment-browser';\n\nclass SessionReplayEnrichmentPlugin implements EnrichmentPlugin {\n name = ENRICHMENT_PLUGIN_NAME;\n type = 'enrichment' as const;\n // this.config is defined in setup() which will always be called first\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n config: BrowserConfig;\n\n async setup(_config: BrowserConfig, _client: BrowserClient) {\n this.config = _config;\n }\n\n async execute(event: Event) {\n // On event, synchronize the session id to the what's on the browserConfig (source of truth)\n // Choosing not to read from event object here, concerned about offline/delayed events messing up the state stored\n // in SR.\n if (this.config.sessionId && this.config.sessionId !== sessionReplay.getSessionId()) {\n await sessionReplay.setSessionId(this.config.sessionId).promise;\n }\n\n // Treating config.sessionId as source of truth, if the event's session id doesn't match, the\n // event is not of the current session (offline/late events). In that case, don't tag the events\n if (this.config.sessionId && this.config.sessionId === event.session_id) {\n const sessionRecordingProperties = sessionReplay.getSessionReplayProperties();\n event.event_properties = {\n ...event.event_properties,\n ...sessionRecordingProperties,\n };\n }\n return Promise.resolve(event);\n }\n}\n\nexport class SessionReplayPlugin implements DestinationPlugin {\n name = '@amplitude/plugin-session-replay-browser';\n type = 'destination' as const;\n // this.client is defined in setup() which will always be called first\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n clientRemove: BrowserClient['remove'];\n // this.config is defined in setup() which will always be called first\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n config: BrowserConfig;\n options: SessionReplayOptions;\n\n constructor(options?: SessionReplayOptions) {\n this.options = { ...options };\n // The user did not explicitly configure forceSessionTracking to false, default to true.\n if (this.options.forceSessionTracking !== false) {\n this.options.forceSessionTracking = true;\n }\n }\n\n async setup(config: BrowserConfig, client?: BrowserClient) {\n if (!client) {\n config.loggerProvider.error('SessionReplayPlugin requires v1.9.1+ of the Amplitude SDK.');\n return;\n }\n\n config.loggerProvider.log(`Installing @amplitude/plugin-session-replay, version ${VERSION}.`);\n\n this.clientRemove = client.remove.bind(client);\n this.config = config;\n\n if (this.options.forceSessionTracking) {\n if (typeof config.defaultTracking === 'boolean') {\n if (config.defaultTracking === false) {\n config.defaultTracking = {\n pageViews: false,\n formInteractions: false,\n fileDownloads: false,\n sessions: true,\n };\n }\n } else {\n config.defaultTracking = {\n ...config.defaultTracking,\n sessions: true,\n };\n }\n }\n\n await sessionReplay.init(config.apiKey, {\n instanceName: this.config.instanceName,\n deviceId: this.config.deviceId,\n optOut: this.config.optOut,\n sessionId: this.config.sessionId,\n loggerProvider: this.config.loggerProvider,\n logLevel: this.config.logLevel,\n flushMaxRetries: this.config.flushMaxRetries,\n serverZone: this.config.serverZone,\n sampleRate: this.options.sampleRate,\n privacyConfig: {\n blockSelector: this.options.privacyConfig?.blockSelector,\n maskSelector: this.options.privacyConfig?.maskSelector,\n unmaskSelector: this.options.privacyConfig?.unmaskSelector,\n defaultMaskLevel: this.options.privacyConfig?.defaultMaskLevel,\n },\n debugMode: this.options.debugMode,\n configEndpointUrl: this.options.configEndpointUrl,\n shouldInlineStylesheet: this.options.shouldInlineStylesheet,\n version: { type: 'plugin', version: VERSION },\n }).promise;\n\n // add enrichment plugin to add session replay properties to events\n await client.add(new SessionReplayEnrichmentPlugin()).promise;\n }\n\n async execute(event: Event): Promise<Result> {\n return Promise.resolve({\n event,\n code: 200,\n message: 'success',\n });\n }\n\n async flush(): Promise<void> {\n await sessionReplay.flush(false);\n }\n\n async teardown(): Promise<void> {\n await this.clientRemove(ENRICHMENT_PLUGIN_NAME).promise;\n sessionReplay.shutdown();\n // the following are initialized in setup() which will always be called first\n // here we reset them to null to prevent memory leaks\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.config = null;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.clientRemove = null;\n }\n\n getSessionReplayProperties() {\n return sessionReplay.getSessionReplayProperties();\n }\n}\n\nexport const sessionReplayPlugin: (options?: SessionReplayOptions) => DestinationPlugin = (\n options?: SessionReplayOptions,\n) => {\n return new SessionReplayPlugin(options);\n};\n"]}
1
+ {"version":3,"file":"session-replay.js","sourceRoot":"","sources":["../../src/session-replay.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,aAAa,MAAM,mCAAmC,CAAC;AAEnE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC;IASE,6BAAY,OAA8B;QAR1C,SAAI,GAAG,0CAA0C,CAAC;QAClD,SAAI,GAAG,YAAqB,CAAC;QAQ3B,IAAI,CAAC,OAAO,gBAAQ,OAAO,CAAE,CAAC;QAC9B,wFAAwF;QACxF,IAAI,IAAI,CAAC,OAAO,CAAC,oBAAoB,KAAK,KAAK,EAAE;YAC/C,IAAI,CAAC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;SAC1C;IACH,CAAC;IAEK,mCAAK,GAAX,UAAY,MAAqB;;;;;;wBAC/B,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,+DAAwD,OAAO,MAAG,CAAC,CAAC;wBAE9F,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;wBAErB,IAAI,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE;4BACrC,IAAI,OAAO,MAAM,CAAC,eAAe,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AAC,OAAO,CAAC,CAAC;AAC1C,CAAC,CAAC","sourcesContent":["import { BrowserConfig, EnrichmentPlugin, Event } from '@amplitude/analytics-types';\nimport * as sessionReplay from '@amplitude/session-replay-browser';\nimport { SessionReplayOptions } from './typings/session-replay';\nimport { VERSION } from './version';\n\nexport class SessionReplayPlugin implements EnrichmentPlugin {\n name = '@amplitude/plugin-session-replay-browser';\n type = 'enrichment' as const;\n // this.config is defined in setup() which will always be called first\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n config: BrowserConfig;\n options: SessionReplayOptions;\n\n constructor(options?: SessionReplayOptions) {\n this.options = { ...options };\n // The user did not explicitly configure forceSessionTracking to false, default to true.\n if (this.options.forceSessionTracking !== false) {\n this.options.forceSessionTracking = true;\n }\n }\n\n async setup(config: BrowserConfig) {\n config.loggerProvider.log(`Installing @amplitude/plugin-session-replay, version ${VERSION}.`);\n\n this.config = config;\n\n if (this.options.forceSessionTracking) {\n if (typeof config.defaultTracking === 'boolean') {\n if (config.defaultTracking === false) {\n config.defaultTracking = {\n pageViews: false,\n formInteractions: false,\n fileDownloads: false,\n sessions: true,\n };\n }\n } else {\n config.defaultTracking = {\n ...config.defaultTracking,\n sessions: true,\n };\n }\n }\n\n await sessionReplay.init(config.apiKey, {\n instanceName: this.config.instanceName,\n deviceId: this.config.deviceId,\n optOut: this.config.optOut,\n sessionId: this.config.sessionId,\n loggerProvider: this.config.loggerProvider,\n logLevel: this.config.logLevel,\n flushMaxRetries: this.config.flushMaxRetries,\n serverZone: this.config.serverZone,\n sampleRate: this.options.sampleRate,\n privacyConfig: {\n blockSelector: this.options.privacyConfig?.blockSelector,\n maskSelector: this.options.privacyConfig?.maskSelector,\n unmaskSelector: this.options.privacyConfig?.unmaskSelector,\n defaultMaskLevel: this.options.privacyConfig?.defaultMaskLevel,\n },\n debugMode: this.options.debugMode,\n configEndpointUrl: this.options.configEndpointUrl,\n shouldInlineStylesheet: this.options.shouldInlineStylesheet,\n version: { type: 'plugin', version: VERSION },\n }).promise;\n }\n\n async execute(event: Event) {\n // On event, synchronize the session id to the what's on the browserConfig (source of truth)\n // Choosing not to read from event object here, concerned about offline/delayed events messing up the state stored\n // in SR.\n if (this.config.sessionId && this.config.sessionId !== sessionReplay.getSessionId()) {\n await sessionReplay.setSessionId(this.config.sessionId).promise;\n }\n // Treating config.sessionId as source of truth, if the event's session id doesn't match, the\n // event is not of the current session (offline/late events). In that case, don't tag the events\n if (this.config.sessionId && this.config.sessionId === event.session_id) {\n const sessionRecordingProperties = sessionReplay.getSessionReplayProperties();\n event.event_properties = {\n ...event.event_properties,\n ...sessionRecordingProperties,\n };\n }\n return Promise.resolve(event);\n }\n\n async teardown(): Promise<void> {\n sessionReplay.shutdown();\n // the following are initialized in setup() which will always be called first\n // here we reset them to null to prevent memory leaks\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.config = null;\n }\n\n getSessionReplayProperties() {\n return sessionReplay.getSessionReplayProperties();\n }\n}\n\nexport const sessionReplayPlugin: (options?: SessionReplayOptions) => EnrichmentPlugin = (\n options?: SessionReplayOptions,\n) => {\n return new SessionReplayPlugin(options);\n};\n"]}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.6.16";
1
+ export declare const VERSION = "1.6.18";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1,3 +1,3 @@
1
1
  // Autogenerated by `yarn version-file`. DO NOT EDIT
2
- export var VERSION = '1.6.16';
2
+ export var VERSION = '1.6.18';
3
3
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,MAAM,CAAC,IAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["// Autogenerated by `yarn version-file`. DO NOT EDIT\nexport const VERSION = '1.6.16';\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,MAAM,CAAC,IAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["// Autogenerated by `yarn version-file`. DO NOT EDIT\nexport const VERSION = '1.6.18';\n"]}