@jitsu/js 1.1.0-canary.227.20230222142636 → 1.1.0
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/.turbo/turbo-build.log +8 -8
- package/.turbo/turbo-clean.log +2 -2
- package/__tests__/node/nodejs.test.ts +0 -3
- package/dist/jitsu.cjs.js +1 -1
- package/dist/jitsu.d.ts +1 -1
- package/dist/jitsu.es.js +1 -1
- package/dist/web/p.js.txt +1 -1
- package/package.json +5 -4
- package/src/analytics-plugin.ts +1 -1
- package/src/jitsu.ts +1 -1
- package/.pnpm-debug.log +0 -23
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
@jitsu/js:build: cache hit, replaying output [
|
|
1
|
+
@jitsu/js:build: cache hit, replaying output [2m126f0e7238465aa8[0m
|
|
2
2
|
[33m@jitsu/js:build: [0m
|
|
3
|
-
[33m@jitsu/js:build: [0m> @jitsu/js@0.0.0 build /Users/
|
|
3
|
+
[33m@jitsu/js:build: [0m> @jitsu/js@0.0.0 build /Users/vklmn/dev2/onetag/libs/jitsu-js
|
|
4
4
|
[33m@jitsu/js:build: [0m> tsc -p . && rollup -c && cp compiled/src/*.d.ts dist
|
|
5
5
|
[33m@jitsu/js:build: [0m
|
|
6
6
|
[33m@jitsu/js:build: [0m[36m
|
|
7
7
|
[33m@jitsu/js:build: [0m[1m./compiled/src/browser.js[22m → [1mdist/web/p.js.txt[22m...[39m
|
|
8
8
|
[33m@jitsu/js:build: [0m[1m[33m(!) "this" has been rewritten to "undefined"[39m[22m
|
|
9
|
-
[33m@jitsu/js:build: [0m[90mhttps://rollupjs.org/
|
|
9
|
+
[33m@jitsu/js:build: [0m[90mhttps://rollupjs.org/troubleshooting/#error-this-is-undefined[39m
|
|
10
10
|
[33m@jitsu/js:build: [0m[1mcompiled/src/analytics-plugin.js[22m
|
|
11
11
|
[33m@jitsu/js:build: [0m[90m1: /* global analytics */
|
|
12
12
|
[33m@jitsu/js:build: [0m2: var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
[33m@jitsu/js:build: [0mcompiled/src/index.js -> compiled/src/analytics-plugin.js -> compiled/src/index.js
|
|
25
25
|
[33m@jitsu/js:build: [0mcompiled/src/analytics-plugin.js -> compiled/src/destination-plugins.js -> compiled/src/analytics-plugin.js
|
|
26
26
|
[33m@jitsu/js:build: [0m[1m[33m(!) Use of eval is strongly discouraged[39m[22m
|
|
27
|
-
[33m@jitsu/js:build: [0m[90mhttps://rollupjs.org/
|
|
27
|
+
[33m@jitsu/js:build: [0m[90mhttps://rollupjs.org/troubleshooting/#avoiding-eval[39m
|
|
28
28
|
[33m@jitsu/js:build: [0m[1mcompiled/src/destination-plugins.js[22m
|
|
29
29
|
[33m@jitsu/js:build: [0m[90m75: })()`;
|
|
30
30
|
[33m@jitsu/js:build: [0m76: try {
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
[33m@jitsu/js:build: [0m ^
|
|
33
33
|
[33m@jitsu/js:build: [0m78: }
|
|
34
34
|
[33m@jitsu/js:build: [0m79: catch (e) {[39m
|
|
35
|
-
[33m@jitsu/js:build: [0m[32mcreated [1mdist/web/p.js.txt[22m in [
|
|
35
|
+
[33m@jitsu/js:build: [0m[32mcreated [1mdist/web/p.js.txt[22m in [1m872ms[22m[39m
|
|
36
36
|
[33m@jitsu/js:build: [0m[36m
|
|
37
37
|
[33m@jitsu/js:build: [0m[1m./compiled/src/index.js, ./compiled/src/jitsu.js, ./compiled/src/analytics-plugin.js[22m → [1mdist/jitsu.es.js, dist/jitsu.cjs.js[22m...[39m
|
|
38
38
|
[33m@jitsu/js:build: [0m[1m[33m(!) "this" has been rewritten to "undefined"[39m[22m
|
|
39
|
-
[33m@jitsu/js:build: [0m[90mhttps://rollupjs.org/
|
|
39
|
+
[33m@jitsu/js:build: [0m[90mhttps://rollupjs.org/troubleshooting/#error-this-is-undefined[39m
|
|
40
40
|
[33m@jitsu/js:build: [0m[1mcompiled/src/analytics-plugin.js[22m
|
|
41
41
|
[33m@jitsu/js:build: [0m[90m1: /* global analytics */
|
|
42
42
|
[33m@jitsu/js:build: [0m2: var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
[33m@jitsu/js:build: [0mcompiled/src/index.js -> compiled/src/analytics-plugin.js -> compiled/src/index.js
|
|
55
55
|
[33m@jitsu/js:build: [0mcompiled/src/analytics-plugin.js -> compiled/src/destination-plugins.js -> compiled/src/analytics-plugin.js
|
|
56
56
|
[33m@jitsu/js:build: [0m[1m[33m(!) Use of eval is strongly discouraged[39m[22m
|
|
57
|
-
[33m@jitsu/js:build: [0m[90mhttps://rollupjs.org/
|
|
57
|
+
[33m@jitsu/js:build: [0m[90mhttps://rollupjs.org/troubleshooting/#avoiding-eval[39m
|
|
58
58
|
[33m@jitsu/js:build: [0m[1mcompiled/src/destination-plugins.js[22m
|
|
59
59
|
[33m@jitsu/js:build: [0m[90m75: })()`;
|
|
60
60
|
[33m@jitsu/js:build: [0m76: try {
|
|
@@ -62,4 +62,4 @@
|
|
|
62
62
|
[33m@jitsu/js:build: [0m ^
|
|
63
63
|
[33m@jitsu/js:build: [0m78: }
|
|
64
64
|
[33m@jitsu/js:build: [0m79: catch (e) {[39m
|
|
65
|
-
[33m@jitsu/js:build: [0m[32mcreated [1mdist/jitsu.es.js, dist/jitsu.cjs.js[22m in [
|
|
65
|
+
[33m@jitsu/js:build: [0m[32mcreated [1mdist/jitsu.es.js, dist/jitsu.cjs.js[22m in [1m504ms[22m[39m
|
package/.turbo/turbo-clean.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@jitsu/js:clean: cache hit, replaying output [
|
|
1
|
+
@jitsu/js:clean: cache hit, replaying output [2ma45f0a4478c12277[0m
|
|
2
2
|
[33m@jitsu/js:clean: [0m
|
|
3
|
-
[33m@jitsu/js:clean: [0m> @jitsu/js@0.0.0 clean /Users/
|
|
3
|
+
[33m@jitsu/js:clean: [0m> @jitsu/js@0.0.0 clean /Users/vklmn/dev2/onetag/libs/jitsu-js
|
|
4
4
|
[33m@jitsu/js:clean: [0m> rm -rf ./dist
|
|
5
5
|
[33m@jitsu/js:clean: [0m
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import fs from "fs";
|
|
2
|
-
import path from "path";
|
|
3
1
|
import { createServer, SimpleSyrup } from "../simple-syrup";
|
|
4
|
-
import process from "process";
|
|
5
2
|
import { AnalyticsClientEvent, AnalyticsInterface } from "@jitsu/protocols/analytics";
|
|
6
3
|
|
|
7
4
|
const jitsuAnalytics = require("../../dist/jitsu.cjs.js").jitsuAnalytics;
|
package/dist/jitsu.cjs.js
CHANGED
|
@@ -528,12 +528,12 @@ function send(method, payload, jitsuConfig, instance, store) {
|
|
|
528
528
|
if (!fetch) {
|
|
529
529
|
throw new Error("Please specify fetch function in jitsu plugin initialization, fetch isn't available in global scope");
|
|
530
530
|
}
|
|
531
|
-
const authHeader = {};
|
|
532
531
|
const debugHeader = jitsuConfig.debug ? { "X-Enable-Debug": "true" } : {};
|
|
533
532
|
// if (jitsuConfig.debug) {
|
|
534
533
|
// console.log(`[JITSU] Sending event to ${url}: `, JSON.stringify(payload, null, 2));
|
|
535
534
|
// }
|
|
536
535
|
const adjustedPayload = adjustPayload(payload, jitsuConfig, store);
|
|
536
|
+
const authHeader = adjustedPayload.writeKey ? { "X-Write-Key": adjustedPayload.writeKey } : {};
|
|
537
537
|
return fetch(url, {
|
|
538
538
|
method: "POST",
|
|
539
539
|
headers: Object.assign(Object.assign({ "Content-Type": "application/json" }, authHeader), debugHeader),
|
package/dist/jitsu.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ type JitsuOptions = {
|
|
|
15
15
|
*/
|
|
16
16
|
debug?: boolean;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Explicitly specify cookie domain. If not set, cookie domain will be set to top level
|
|
19
19
|
* of the current domain. Example: if JS lives on "app.example.com", cookie domain will be
|
|
20
20
|
* set to ".example.com". If it lives on "example.com", cookie domain will be set to ".example.com" too
|
|
21
21
|
*/
|
package/dist/jitsu.es.js
CHANGED
|
@@ -526,12 +526,12 @@ function send(method, payload, jitsuConfig, instance, store) {
|
|
|
526
526
|
if (!fetch) {
|
|
527
527
|
throw new Error("Please specify fetch function in jitsu plugin initialization, fetch isn't available in global scope");
|
|
528
528
|
}
|
|
529
|
-
const authHeader = {};
|
|
530
529
|
const debugHeader = jitsuConfig.debug ? { "X-Enable-Debug": "true" } : {};
|
|
531
530
|
// if (jitsuConfig.debug) {
|
|
532
531
|
// console.log(`[JITSU] Sending event to ${url}: `, JSON.stringify(payload, null, 2));
|
|
533
532
|
// }
|
|
534
533
|
const adjustedPayload = adjustPayload(payload, jitsuConfig, store);
|
|
534
|
+
const authHeader = adjustedPayload.writeKey ? { "X-Write-Key": adjustedPayload.writeKey } : {};
|
|
535
535
|
return fetch(url, {
|
|
536
536
|
method: "POST",
|
|
537
537
|
headers: Object.assign(Object.assign({ "Content-Type": "application/json" }, authHeader), debugHeader),
|
package/dist/web/p.js.txt
CHANGED
|
@@ -529,12 +529,12 @@
|
|
|
529
529
|
if (!fetch) {
|
|
530
530
|
throw new Error("Please specify fetch function in jitsu plugin initialization, fetch isn't available in global scope");
|
|
531
531
|
}
|
|
532
|
-
const authHeader = {};
|
|
533
532
|
const debugHeader = jitsuConfig.debug ? { "X-Enable-Debug": "true" } : {};
|
|
534
533
|
// if (jitsuConfig.debug) {
|
|
535
534
|
// console.log(`[JITSU] Sending event to ${url}: `, JSON.stringify(payload, null, 2));
|
|
536
535
|
// }
|
|
537
536
|
const adjustedPayload = adjustPayload(payload, jitsuConfig, store);
|
|
537
|
+
const authHeader = adjustedPayload.writeKey ? { "X-Write-Key": adjustedPayload.writeKey } : {};
|
|
538
538
|
return fetch(url, {
|
|
539
539
|
method: "POST",
|
|
540
540
|
headers: Object.assign(Object.assign({ "Content-Type": "application/json" }, authHeader), debugHeader),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jitsu/js",
|
|
3
|
-
"version": "1.1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Jitsu Dev Team <dev@jitsu.com>",
|
|
6
6
|
"main": "dist/jitsu.cjs.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"private": false,
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@playwright/test": "
|
|
15
|
+
"@playwright/test": "1.31.2",
|
|
16
16
|
"@rollup/plugin-commonjs": "^23.0.2",
|
|
17
17
|
"@rollup/plugin-json": "^5.0.1",
|
|
18
18
|
"@rollup/plugin-multi-entry": "^6.0.0",
|
|
@@ -32,8 +32,9 @@
|
|
|
32
32
|
"node-forge": "^1.3.1",
|
|
33
33
|
"raw-loader": "^4.0.2",
|
|
34
34
|
"rollup": "^3.2.5",
|
|
35
|
-
"ts-jest": "
|
|
36
|
-
"
|
|
35
|
+
"ts-jest": "29.0.5",
|
|
36
|
+
"typescript": "^4.9.5",
|
|
37
|
+
"@jitsu/protocols": "1.1.0"
|
|
37
38
|
},
|
|
38
39
|
"dependencies": {
|
|
39
40
|
"analytics": "^0.8.1"
|
package/src/analytics-plugin.ts
CHANGED
|
@@ -402,13 +402,13 @@ function send(
|
|
|
402
402
|
"Please specify fetch function in jitsu plugin initialization, fetch isn't available in global scope"
|
|
403
403
|
);
|
|
404
404
|
}
|
|
405
|
-
const authHeader = {};
|
|
406
405
|
const debugHeader = jitsuConfig.debug ? { "X-Enable-Debug": "true" } : {};
|
|
407
406
|
|
|
408
407
|
// if (jitsuConfig.debug) {
|
|
409
408
|
// console.log(`[JITSU] Sending event to ${url}: `, JSON.stringify(payload, null, 2));
|
|
410
409
|
// }
|
|
411
410
|
const adjustedPayload = adjustPayload(payload, jitsuConfig, store);
|
|
411
|
+
const authHeader = adjustedPayload.writeKey ? { "X-Write-Key": adjustedPayload.writeKey } : {};
|
|
412
412
|
return fetch(url, {
|
|
413
413
|
method: "POST",
|
|
414
414
|
headers: {
|
package/src/jitsu.ts
CHANGED
|
@@ -16,7 +16,7 @@ type JitsuOptions = {
|
|
|
16
16
|
*/
|
|
17
17
|
debug?: boolean;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Explicitly specify cookie domain. If not set, cookie domain will be set to top level
|
|
20
20
|
* of the current domain. Example: if JS lives on "app.example.com", cookie domain will be
|
|
21
21
|
* set to ".example.com". If it lives on "example.com", cookie domain will be set to ".example.com" too
|
|
22
22
|
*/
|
package/.pnpm-debug.log
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"0 debug pnpm:scope": {
|
|
3
|
-
"selected": 1,
|
|
4
|
-
"workspacePrefix": "/Users/ildarnurislamov/Projects/onetag"
|
|
5
|
-
},
|
|
6
|
-
"1 error pnpm": {
|
|
7
|
-
"code": "ELIFECYCLE",
|
|
8
|
-
"errno": "ENOENT",
|
|
9
|
-
"syscall": "spawn",
|
|
10
|
-
"file": "sh",
|
|
11
|
-
"pkgid": "@jitsu/js@0.0.0",
|
|
12
|
-
"stage": "build",
|
|
13
|
-
"script": "tsc -p . && rollup -c && cp src/jitsu.d.ts dist",
|
|
14
|
-
"pkgname": "@jitsu/js",
|
|
15
|
-
"err": {
|
|
16
|
-
"name": "pnpm",
|
|
17
|
-
"message": "@jitsu/js@0.0.0 build: `tsc -p . && rollup -c && cp src/jitsu.d.ts dist`\nspawn ENOENT",
|
|
18
|
-
"code": "ELIFECYCLE",
|
|
19
|
-
"stack": "pnpm: @jitsu/js@0.0.0 build: `tsc -p . && rollup -c && cp src/jitsu.d.ts dist`\nspawn ENOENT\n at ChildProcess.<anonymous> (/opt/homebrew/lib/node_modules/pnpm/dist/pnpm.cjs:93535:22)\n at ChildProcess.emit (node:events:527:28)\n at maybeClose (node:internal/child_process:1092:16)\n at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)"
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
"2 warn pnpm:global": " Local package.json exists, but node_modules missing, did you mean to install?"
|
|
23
|
-
}
|