kv-test-lib 1.0.23 → 1.0.26

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/kochava.d.ts CHANGED
@@ -29,7 +29,7 @@ export interface KochavaInstance {
29
29
  }
30
30
  export declare class Kochava {
31
31
  #private;
32
- constructor();
32
+ private constructor();
33
33
  static create(): Kochava;
34
34
  static createForNode(): Kochava;
35
35
  static createForReact(): Kochava;
package/dist/kochava.js CHANGED
@@ -22,6 +22,8 @@ import { DEFAULTS, } from "./interfaces";
22
22
  import { deleteAllPersisted, readAndUpdatePersistedValue, updatePersistedValue, PersistKey, checkDuplicateIdLink, addPersistedIdLinks, checkInstallIdChange, readAndUpdateSessionCount, readAndUpdateDeviceId, readAndUpdateUTM, } from "./browser/persist";
23
23
  import * as utils from "./utils/utils";
24
24
  import { getPageName } from "./browser/browser";
25
+ // Update this when releasing a new version of the sdk
26
+ const SDK_VERSION = "WebTracker 3.0.2";
25
27
  export class Kochava {
26
28
  // User will use the below factories instead of directly calling
27
29
  // the constructor
@@ -38,22 +40,22 @@ export class Kochava {
38
40
  }
39
41
  static createForNode() {
40
42
  const kochava = new Kochava();
41
- kochava.executeAdvancedInstruction("wrapper", JSON.stringify({ name: "Node", version: "3.0.0" }));
43
+ kochava.executeAdvancedInstruction("wrapper", JSON.stringify({ name: "Node", version: "" }));
42
44
  return kochava;
43
45
  }
44
46
  static createForReact() {
45
47
  const kochava = new Kochava();
46
- kochava.executeAdvancedInstruction("wrapper", JSON.stringify({ name: "React", version: "3.0.0" }));
48
+ kochava.executeAdvancedInstruction("wrapper", JSON.stringify({ name: "React", version: "" }));
47
49
  return kochava;
48
50
  }
49
51
  static createForVue() {
50
52
  const kochava = new Kochava();
51
- kochava.executeAdvancedInstruction("wrapper", JSON.stringify({ name: "Vue", version: "3.0.0" }));
53
+ kochava.executeAdvancedInstruction("wrapper", JSON.stringify({ name: "Vue", version: "" }));
52
54
  return kochava;
53
55
  }
54
56
  static createForAngular() {
55
57
  const kochava = new Kochava();
56
- kochava.executeAdvancedInstruction("wrapper", JSON.stringify({ name: "Angular", version: "3.0.0" }));
58
+ kochava.executeAdvancedInstruction("wrapper", JSON.stringify({ name: "Angular", version: "1.0.0" }));
57
59
  return kochava;
58
60
  }
59
61
  /*
@@ -159,7 +161,7 @@ export class Kochava {
159
161
  {
160
162
  const wrapperVersion = JSON.parse(valueStr);
161
163
  if (!__classPrivateFieldGet(this, _Kochava_instance, "f").version)
162
- __classPrivateFieldGet(this, _Kochava_instance, "f").version = "WebTracker 3.0.0";
164
+ __classPrivateFieldGet(this, _Kochava_instance, "f").version = SDK_VERSION;
163
165
  switch (wrapperVersion.name) {
164
166
  case "Angular":
165
167
  __classPrivateFieldGet(this, _Kochava_instance, "f").version += ` (${wrapperVersion.name} ${wrapperVersion.version})`;
@@ -261,7 +263,8 @@ export class Kochava {
261
263
  const idLink = {};
262
264
  idLink[name] = identifier;
263
265
  addPersistedIdLinks(name, identifier, __classPrivateFieldGet(this, _Kochava_instance, "f").useCookies);
264
- if (__classPrivateFieldGet(this, _Kochava_instance, "f").installStarted || __classPrivateFieldGet(this, _Kochava_instance, "f").installDone) {
266
+ // if (this.#instance.installStarted || this.#instance.installDone) {
267
+ if (localStorage.getItem("com.kochava.tracker.InstallSentDate")) {
265
268
  // it will be sent standalone
266
269
  __classPrivateFieldGet(this, _Kochava_jobQueue, "f").enqueueIdLink(__classPrivateFieldGet(this, _Kochava_instance, "f"), idLink);
267
270
  }
@@ -361,8 +364,8 @@ _Kochava_instance = new WeakMap(), _Kochava_jobQueue = new WeakMap(), _Kochava_i
361
364
  __classPrivateFieldGet(this, _Kochava_instance, "f").appGuid = appGuid;
362
365
  __classPrivateFieldGet(this, _Kochava_instance, "f").disableAutoPage = __classPrivateFieldGet(this, _Kochava_instance, "f").disableAutoPage || false;
363
366
  __classPrivateFieldGet(this, _Kochava_instance, "f").useCookies = __classPrivateFieldGet(this, _Kochava_instance, "f").useCookies || false;
364
- __classPrivateFieldGet(this, _Kochava_instance, "f").version = __classPrivateFieldGet(this, _Kochava_instance, "f").version || "WebTracker 3.0.0";
365
- __classPrivateFieldGet(this, _Kochava_instance, "f").buildDate = "kbd: 3/31/2022, 10:50:51 AM";
367
+ __classPrivateFieldGet(this, _Kochava_instance, "f").version = __classPrivateFieldGet(this, _Kochava_instance, "f").version || SDK_VERSION;
368
+ __classPrivateFieldGet(this, _Kochava_instance, "f").buildDate = "kbd: 7/1/2022, 9:12:07 AM";
366
369
  __classPrivateFieldGet(this, _Kochava_instance, "f").kochavaSession = utils.uuidv4().substring(0, 5);
367
370
  __classPrivateFieldGet(this, _Kochava_instance, "f").startTimeMS = utils.getCurrTimeMS();
368
371
  __classPrivateFieldGet(this, _Kochava_instance, "f").retryWaterfall = [7, 30, 300, 1800];
@@ -470,4 +473,5 @@ _Kochava_instance = new WeakMap(), _Kochava_jobQueue = new WeakMap(), _Kochava_i
470
473
  Install.onSuccess(__classPrivateFieldGet(this, _Kochava_instance, "f"));
471
474
  updatePersistedValue(PersistKey.IdLinkQueue, JSON.stringify(__classPrivateFieldGet(this, _Kochava_jobQueue, "f").idLinkQueue), false);
472
475
  };
473
- // window.kochava = new Kochava();
476
+ // Only here for generic Web integration
477
+ window.kochava = Kochava.create();
package/package.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
- "type": "module",
3
2
  "name": "kv-test-lib",
4
- "version": "1.0.23",
3
+ "version": "1.0.26",
5
4
  "main": "dist/kochava.js",
6
5
  "files": [
7
6
  "dist/"