@jitsu/js 1.1.0-canary.205 → 1.1.0-canary.211.20230220172137

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/index.d.ts CHANGED
@@ -1,5 +1,12 @@
1
1
  import { AnalyticsInterface, JitsuOptions } from "./jitsu";
2
2
  export default function parse(input: any): any;
3
+ export declare const emptyAnalytics: {
4
+ track: () => Promise<void>;
5
+ page: () => Promise<void>;
6
+ user: () => {};
7
+ identify: () => Promise<{}>;
8
+ reset: () => Promise<{}>;
9
+ };
3
10
  export declare function jitsuAnalytics(opts: JitsuOptions): AnalyticsInterface;
4
11
  export * from "./jitsu";
5
12
  export * from "./analytics-plugin";
package/dist/jitsu.cjs.js CHANGED
@@ -664,6 +664,13 @@ function parse(input) {
664
664
  }
665
665
  return value;
666
666
  }
667
+ const emptyAnalytics = {
668
+ track: () => Promise.resolve(),
669
+ page: () => Promise.resolve(),
670
+ user: () => ({}),
671
+ identify: () => Promise.resolve({}),
672
+ reset: () => Promise.resolve({}),
673
+ };
667
674
  function createUnderlyingAnalyticsInstance(opts, rt, plugins = []) {
668
675
  const analytics = analyticsLib({
669
676
  app: "test",
@@ -710,6 +717,7 @@ function jitsuAnalytics(opts) {
710
717
  // }
711
718
  }
712
719
 
720
+ exports.emptyAnalytics = emptyAnalytics;
713
721
  exports.emptyRuntime = emptyRuntime;
714
722
  exports.getTopLevelDomain = getTopLevelDomain;
715
723
  exports.isInBrowser = isInBrowser;
package/dist/jitsu.es.js CHANGED
@@ -662,6 +662,13 @@ function parse(input) {
662
662
  }
663
663
  return value;
664
664
  }
665
+ const emptyAnalytics = {
666
+ track: () => Promise.resolve(),
667
+ page: () => Promise.resolve(),
668
+ user: () => ({}),
669
+ identify: () => Promise.resolve({}),
670
+ reset: () => Promise.resolve({}),
671
+ };
665
672
  function createUnderlyingAnalyticsInstance(opts, rt, plugins = []) {
666
673
  const analytics = analyticsLib({
667
674
  app: "test",
@@ -708,4 +715,4 @@ function jitsuAnalytics(opts) {
708
715
  // }
709
716
  }
710
717
 
711
- export { emptyRuntime, getTopLevelDomain, isInBrowser, jitsuAnalytics, parseQuery, randomId, windowRuntime };
718
+ export { emptyAnalytics, emptyRuntime, getTopLevelDomain, isInBrowser, jitsuAnalytics, parseQuery, randomId, windowRuntime };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jitsu/js",
3
- "version": "1.1.0-canary.205",
3
+ "version": "1.1.0-canary.211.20230220172137",
4
4
  "description": "",
5
5
  "author": "Jitsu Dev Team <dev@jitsu.com>",
6
6
  "main": "dist/jitsu.cjs.js",
@@ -32,10 +32,10 @@
32
32
  "node-forge": "^1.3.1",
33
33
  "raw-loader": "^4.0.2",
34
34
  "rollup": "^3.2.5",
35
- "ts-jest": "^29.0.3"
35
+ "ts-jest": "^29.0.3",
36
+ "@jitsu/protocols": "1.1.0-canary.211.20230220172137"
36
37
  },
37
38
  "dependencies": {
38
- "@jitsu/protocols": "1.1.0-canary.205",
39
39
  "analytics": "^0.8.1"
40
40
  },
41
41
  "scripts": {
package/src/index.ts CHANGED
@@ -24,6 +24,14 @@ export default function parse(input) {
24
24
  return value;
25
25
  }
26
26
 
27
+ export const emptyAnalytics = {
28
+ track: () => Promise.resolve(),
29
+ page: () => Promise.resolve(),
30
+ user: () => ({}),
31
+ identify: () => Promise.resolve({}),
32
+ reset: () => Promise.resolve({}),
33
+ };
34
+
27
35
  function createUnderlyingAnalyticsInstance(
28
36
  opts: JitsuOptions,
29
37
  rt: RuntimeFacade,
@@ -1,65 +0,0 @@
1
- @jitsu/js:build: cache hit, replaying output f3b801c8a9ae72dd
2
- @jitsu/js:build: 
3
- @jitsu/js:build: > @jitsu/js@0.0.0 build /Users/vklmn/dev2/onetag/libs/jitsu-js
4
- @jitsu/js:build: > tsc -p . && rollup -c && cp compiled/src/*.d.ts dist
5
- @jitsu/js:build: 
6
- @jitsu/js:build: 
7
- @jitsu/js:build: ./compiled/src/browser.js → dist/web/p.js.txt...
8
- @jitsu/js:build: (!) "this" has been rewritten to "undefined"
9
- @jitsu/js:build: https://rollupjs.org/guide/en/#error-this-is-undefined
10
- @jitsu/js:build: compiled/src/analytics-plugin.js
11
- @jitsu/js:build: 1: /* global analytics */
12
- @jitsu/js:build: 2: var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
- @jitsu/js:build:  ^
14
- @jitsu/js:build: 3: function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15
- @jitsu/js:build: 4: return new (P || (P = Promise))(function (resolve, reject) {
16
- @jitsu/js:build: ...and 1 other occurrence
17
- @jitsu/js:build: compiled/src/destination-plugins.js
18
- @jitsu/js:build: 1: var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
19
- @jitsu/js:build:  ^
20
- @jitsu/js:build: 2: function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
21
- @jitsu/js:build: 3: return new (P || (P = Promise))(function (resolve, reject) {
22
- @jitsu/js:build: ...and 1 other occurrence
23
- @jitsu/js:build: (!) Circular dependencies
24
- @jitsu/js:build: compiled/src/index.js -> compiled/src/analytics-plugin.js -> compiled/src/index.js
25
- @jitsu/js:build: compiled/src/analytics-plugin.js -> compiled/src/destination-plugins.js -> compiled/src/analytics-plugin.js
26
- @jitsu/js:build: (!) Use of eval is strongly discouraged
27
- @jitsu/js:build: https://rollupjs.org/guide/en/#avoiding-eval
28
- @jitsu/js:build: compiled/src/destination-plugins.js
29
- @jitsu/js:build: 75: })()`;
30
- @jitsu/js:build: 76: try {
31
- @jitsu/js:build: 77: eval(iif);
32
- @jitsu/js:build:  ^
33
- @jitsu/js:build: 78: }
34
- @jitsu/js:build: 79: catch (e) {
35
- @jitsu/js:build: created dist/web/p.js.txt in 280ms
36
- @jitsu/js:build: 
37
- @jitsu/js:build: ./compiled/src/index.js, ./compiled/src/jitsu.js, ./compiled/src/analytics-plugin.js → dist/jitsu.es.js, dist/jitsu.cjs.js...
38
- @jitsu/js:build: (!) "this" has been rewritten to "undefined"
39
- @jitsu/js:build: https://rollupjs.org/guide/en/#error-this-is-undefined
40
- @jitsu/js:build: compiled/src/analytics-plugin.js
41
- @jitsu/js:build: 1: /* global analytics */
42
- @jitsu/js:build: 2: var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
43
- @jitsu/js:build:  ^
44
- @jitsu/js:build: 3: function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
45
- @jitsu/js:build: 4: return new (P || (P = Promise))(function (resolve, reject) {
46
- @jitsu/js:build: ...and 1 other occurrence
47
- @jitsu/js:build: compiled/src/destination-plugins.js
48
- @jitsu/js:build: 1: var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
49
- @jitsu/js:build:  ^
50
- @jitsu/js:build: 2: function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
51
- @jitsu/js:build: 3: return new (P || (P = Promise))(function (resolve, reject) {
52
- @jitsu/js:build: ...and 1 other occurrence
53
- @jitsu/js:build: (!) Circular dependencies
54
- @jitsu/js:build: compiled/src/index.js -> compiled/src/analytics-plugin.js -> compiled/src/index.js
55
- @jitsu/js:build: compiled/src/analytics-plugin.js -> compiled/src/destination-plugins.js -> compiled/src/analytics-plugin.js
56
- @jitsu/js:build: (!) Use of eval is strongly discouraged
57
- @jitsu/js:build: https://rollupjs.org/guide/en/#avoiding-eval
58
- @jitsu/js:build: compiled/src/destination-plugins.js
59
- @jitsu/js:build: 75: })()`;
60
- @jitsu/js:build: 76: try {
61
- @jitsu/js:build: 77: eval(iif);
62
- @jitsu/js:build:  ^
63
- @jitsu/js:build: 78: }
64
- @jitsu/js:build: 79: catch (e) {
65
- @jitsu/js:build: created dist/jitsu.es.js, dist/jitsu.cjs.js in 150ms
@@ -1,5 +0,0 @@
1
- @jitsu/js:clean: cache hit, replaying output 8490bc419d33a874
2
- @jitsu/js:clean: 
3
- @jitsu/js:clean: > @jitsu/js@0.0.0 clean /Users/vklmn/dev2/onetag/libs/jitsu-js
4
- @jitsu/js:clean: > rm -rf ./dist
5
- @jitsu/js:clean: