@jitsu/functions-lib 1.10.4 → 2.14.0-beta.10
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.cjs.js +26 -8
- package/dist/index.es.js +25 -9
- package/dist/lib/functions.d.ts +13 -0
- package/package.json +16 -13
- package/src/lib/functions.ts +27 -0
- package/tsconfig.json +4 -5
- package/vitest.config.ts +8 -0
- package/.turbo/turbo-build.log +0 -12
- package/.turbo/turbo-test.log +0 -158
- package/LICENSE +0 -21
- package/__tests__/data/classic-events-private.ts +0 -904
- package/jest.config.js +0 -8
- package/jest.setup.js +0 -8
package/dist/index.cjs.js
CHANGED
|
@@ -23,8 +23,6 @@ function idToSnakeCaseFast(id) {
|
|
|
23
23
|
res += id.substring(concatIndex, i) + "_";
|
|
24
24
|
concatIndex = i + 1;
|
|
25
25
|
}
|
|
26
|
-
// needUnderscore is used in case next char is a capital latin letter
|
|
27
|
-
// we add underscore only between latin letters
|
|
28
26
|
needUnderscore = (c >= aCode && c <= zCode) || (c >= ACode && c <= ZCode);
|
|
29
27
|
}
|
|
30
28
|
if (concatIndex == 0) {
|
|
@@ -159,10 +157,8 @@ function transferValue(target, property, source) {
|
|
|
159
157
|
const TableNameParameter = "JITSU_TABLE_NAME";
|
|
160
158
|
const DropRetryErrorName = "Drop & RetryError";
|
|
161
159
|
const RetryErrorName = "RetryError";
|
|
160
|
+
const NoRetryErrorName = "NoRetryError";
|
|
162
161
|
class RetryError extends Error {
|
|
163
|
-
status;
|
|
164
|
-
response;
|
|
165
|
-
message;
|
|
166
162
|
constructor(message, options) {
|
|
167
163
|
if (typeof message === "object") {
|
|
168
164
|
super(message.message);
|
|
@@ -185,10 +181,30 @@ class RetryError extends Error {
|
|
|
185
181
|
};
|
|
186
182
|
}
|
|
187
183
|
}
|
|
184
|
+
class NoRetryError extends Error {
|
|
185
|
+
constructor(message) {
|
|
186
|
+
if (typeof message === "object") {
|
|
187
|
+
super(message.message);
|
|
188
|
+
this.message = message.message;
|
|
189
|
+
this.status = message.status;
|
|
190
|
+
this.response = message.response;
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
super(message);
|
|
194
|
+
this.message = message;
|
|
195
|
+
}
|
|
196
|
+
this.name = "NoRetryError";
|
|
197
|
+
}
|
|
198
|
+
toJSON() {
|
|
199
|
+
return {
|
|
200
|
+
name: this.name,
|
|
201
|
+
message: this.message,
|
|
202
|
+
status: this.status,
|
|
203
|
+
response: this.response,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
}
|
|
188
207
|
class HTTPError extends Error {
|
|
189
|
-
status;
|
|
190
|
-
response;
|
|
191
|
-
message;
|
|
192
208
|
constructor(message, status, response) {
|
|
193
209
|
super(message);
|
|
194
210
|
this.message = message;
|
|
@@ -485,6 +501,8 @@ function fromJitsuClassic(event) {
|
|
|
485
501
|
|
|
486
502
|
exports.DropRetryErrorName = DropRetryErrorName;
|
|
487
503
|
exports.HTTPError = HTTPError;
|
|
504
|
+
exports.NoRetryError = NoRetryError;
|
|
505
|
+
exports.NoRetryErrorName = NoRetryErrorName;
|
|
488
506
|
exports.RetryError = RetryError;
|
|
489
507
|
exports.RetryErrorName = RetryErrorName;
|
|
490
508
|
exports.TableNameParameter = TableNameParameter;
|
package/dist/index.es.js
CHANGED
|
@@ -21,8 +21,6 @@ function idToSnakeCaseFast(id) {
|
|
|
21
21
|
res += id.substring(concatIndex, i) + "_";
|
|
22
22
|
concatIndex = i + 1;
|
|
23
23
|
}
|
|
24
|
-
// needUnderscore is used in case next char is a capital latin letter
|
|
25
|
-
// we add underscore only between latin letters
|
|
26
24
|
needUnderscore = (c >= aCode && c <= zCode) || (c >= ACode && c <= ZCode);
|
|
27
25
|
}
|
|
28
26
|
if (concatIndex == 0) {
|
|
@@ -157,10 +155,8 @@ function transferValue(target, property, source) {
|
|
|
157
155
|
const TableNameParameter = "JITSU_TABLE_NAME";
|
|
158
156
|
const DropRetryErrorName = "Drop & RetryError";
|
|
159
157
|
const RetryErrorName = "RetryError";
|
|
158
|
+
const NoRetryErrorName = "NoRetryError";
|
|
160
159
|
class RetryError extends Error {
|
|
161
|
-
status;
|
|
162
|
-
response;
|
|
163
|
-
message;
|
|
164
160
|
constructor(message, options) {
|
|
165
161
|
if (typeof message === "object") {
|
|
166
162
|
super(message.message);
|
|
@@ -183,10 +179,30 @@ class RetryError extends Error {
|
|
|
183
179
|
};
|
|
184
180
|
}
|
|
185
181
|
}
|
|
182
|
+
class NoRetryError extends Error {
|
|
183
|
+
constructor(message) {
|
|
184
|
+
if (typeof message === "object") {
|
|
185
|
+
super(message.message);
|
|
186
|
+
this.message = message.message;
|
|
187
|
+
this.status = message.status;
|
|
188
|
+
this.response = message.response;
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
super(message);
|
|
192
|
+
this.message = message;
|
|
193
|
+
}
|
|
194
|
+
this.name = "NoRetryError";
|
|
195
|
+
}
|
|
196
|
+
toJSON() {
|
|
197
|
+
return {
|
|
198
|
+
name: this.name,
|
|
199
|
+
message: this.message,
|
|
200
|
+
status: this.status,
|
|
201
|
+
response: this.response,
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
}
|
|
186
205
|
class HTTPError extends Error {
|
|
187
|
-
status;
|
|
188
|
-
response;
|
|
189
|
-
message;
|
|
190
206
|
constructor(message, status, response) {
|
|
191
207
|
super(message);
|
|
192
208
|
this.message = message;
|
|
@@ -481,4 +497,4 @@ function fromJitsuClassic(event) {
|
|
|
481
497
|
});
|
|
482
498
|
}
|
|
483
499
|
|
|
484
|
-
export { DropRetryErrorName, HTTPError, RetryError, RetryErrorName, TableNameParameter, fromJitsuClassic, idToClassic, idToSnakeCaseFast, removeUndefined, toClassic, toJitsuClassic, toSnakeCase, transfer, transferAsClassic, transferAsSnakeCase, transferValue, transferValueAsSnakeCase };
|
|
500
|
+
export { DropRetryErrorName, HTTPError, NoRetryError, NoRetryErrorName, RetryError, RetryErrorName, TableNameParameter, fromJitsuClassic, idToClassic, idToSnakeCaseFast, removeUndefined, toClassic, toJitsuClassic, toSnakeCase, transfer, transferAsClassic, transferAsSnakeCase, transferValue, transferValueAsSnakeCase };
|
package/dist/lib/functions.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { AnalyticsServerEvent } from "@jitsu/protocols/analytics";
|
|
|
3
3
|
export declare const TableNameParameter = "JITSU_TABLE_NAME";
|
|
4
4
|
export declare const DropRetryErrorName = "Drop & RetryError";
|
|
5
5
|
export declare const RetryErrorName = "RetryError";
|
|
6
|
+
export declare const NoRetryErrorName = "NoRetryError";
|
|
6
7
|
export declare class RetryError extends Error {
|
|
7
8
|
status: number;
|
|
8
9
|
response: string;
|
|
@@ -17,6 +18,18 @@ export declare class RetryError extends Error {
|
|
|
17
18
|
response: string;
|
|
18
19
|
};
|
|
19
20
|
}
|
|
21
|
+
export declare class NoRetryError extends Error {
|
|
22
|
+
status: number;
|
|
23
|
+
response: string;
|
|
24
|
+
message: string;
|
|
25
|
+
constructor(message?: any);
|
|
26
|
+
toJSON(): {
|
|
27
|
+
name: string;
|
|
28
|
+
message: string;
|
|
29
|
+
status: number;
|
|
30
|
+
response: string;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
20
33
|
export declare class HTTPError extends Error {
|
|
21
34
|
status: number;
|
|
22
35
|
response: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jitsu/functions-lib",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.14.0-beta.10",
|
|
4
4
|
"main": "dist/index.cjs.js",
|
|
5
5
|
"module": "dist/index.es.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -11,22 +11,25 @@
|
|
|
11
11
|
},
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"private": false,
|
|
14
|
+
"scripts": {
|
|
15
|
+
"//build-deps": "Required by turbo ^build-deps - builds dist/ for workspace packages that import this",
|
|
16
|
+
"build-deps": "pnpm run build",
|
|
17
|
+
"//typecheck": "Since this module generates types, we should run build during typecheck",
|
|
18
|
+
"typecheck": "tsc -p . && rollup -c",
|
|
19
|
+
"build": "tsc -p . && rollup -c",
|
|
20
|
+
"test": "vitest run"
|
|
21
|
+
},
|
|
14
22
|
"devDependencies": {
|
|
23
|
+
"@jitsu/common-config": "workspace:*",
|
|
24
|
+
"@jitsu/protocols": "workspace:*",
|
|
15
25
|
"rollup": "^4.24.3",
|
|
16
26
|
"@rollup/plugin-typescript": "^11.1.5",
|
|
17
27
|
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
18
28
|
"@rollup/plugin-commonjs": "^28.0.2",
|
|
19
|
-
"@types/
|
|
20
|
-
"@
|
|
21
|
-
"
|
|
22
|
-
"ts-jest": "29.0.5",
|
|
23
|
-
"tslib": "^2.6.3",
|
|
29
|
+
"@types/node": "catalog:",
|
|
30
|
+
"@vitest/ui": "catalog:",
|
|
31
|
+
"tslib": "catalog:",
|
|
24
32
|
"@jitsu/sdk-js": "^3.1.5",
|
|
25
|
-
"
|
|
26
|
-
},
|
|
27
|
-
"scripts": {
|
|
28
|
-
"compile": "tsc -p .",
|
|
29
|
-
"build": "pnpm compile && rollup -c",
|
|
30
|
-
"test": "tsc -p . && jest --verbose"
|
|
33
|
+
"vitest": "catalog:"
|
|
31
34
|
}
|
|
32
|
-
}
|
|
35
|
+
}
|
package/src/lib/functions.ts
CHANGED
|
@@ -6,6 +6,7 @@ export const TableNameParameter = "JITSU_TABLE_NAME";
|
|
|
6
6
|
|
|
7
7
|
export const DropRetryErrorName = "Drop & RetryError";
|
|
8
8
|
export const RetryErrorName = "RetryError";
|
|
9
|
+
export const NoRetryErrorName = "NoRetryError";
|
|
9
10
|
|
|
10
11
|
export class RetryError extends Error {
|
|
11
12
|
status: number;
|
|
@@ -33,6 +34,32 @@ export class RetryError extends Error {
|
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
|
|
37
|
+
export class NoRetryError extends Error {
|
|
38
|
+
status: number;
|
|
39
|
+
response: string;
|
|
40
|
+
message: string;
|
|
41
|
+
constructor(message?: any) {
|
|
42
|
+
if (typeof message === "object") {
|
|
43
|
+
super(message.message);
|
|
44
|
+
this.message = message.message;
|
|
45
|
+
this.status = message.status;
|
|
46
|
+
this.response = message.response;
|
|
47
|
+
} else {
|
|
48
|
+
super(message);
|
|
49
|
+
this.message = message;
|
|
50
|
+
}
|
|
51
|
+
this.name = "NoRetryError";
|
|
52
|
+
}
|
|
53
|
+
toJSON() {
|
|
54
|
+
return {
|
|
55
|
+
name: this.name,
|
|
56
|
+
message: this.message,
|
|
57
|
+
status: this.status,
|
|
58
|
+
response: this.response,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
36
63
|
export class HTTPError extends Error {
|
|
37
64
|
status: number;
|
|
38
65
|
response: string;
|
package/tsconfig.json
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
{
|
|
2
|
+
"extends": "@jitsu/common-config/tsconfig.json",
|
|
2
3
|
"compilerOptions": {
|
|
3
4
|
"lib": ["dom", "esnext"],
|
|
4
5
|
"rootDir": "./src",
|
|
5
6
|
"outDir": "./dist",
|
|
6
7
|
"declaration": true,
|
|
7
|
-
"esModuleInterop": true,
|
|
8
|
-
"moduleResolution": "node",
|
|
9
8
|
"noEmit": true,
|
|
10
|
-
"
|
|
11
|
-
"
|
|
9
|
+
"strictPropertyInitialization": false,
|
|
10
|
+
"strictNullChecks": false
|
|
12
11
|
},
|
|
12
|
+
"include": ["src/**/*"],
|
|
13
13
|
"exclude": [
|
|
14
14
|
"__tests__",
|
|
15
|
-
"node_modules",
|
|
16
15
|
"dist",
|
|
17
16
|
"test_projects",
|
|
18
17
|
"test",
|
package/vitest.config.ts
ADDED
package/.turbo/turbo-build.log
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
@jitsu/functions-lib:build: cache hit, replaying output [2m632430f3e3942c8a[0m
|
|
2
|
-
[34m@jitsu/functions-lib:build: [0m
|
|
3
|
-
[34m@jitsu/functions-lib:build: [0m> @jitsu/functions-lib@0.0.0 build /Users/ildarnurislamov/Projects/newjitsu/libs/functions
|
|
4
|
-
[34m@jitsu/functions-lib:build: [0m> pnpm compile && rollup -c
|
|
5
|
-
[34m@jitsu/functions-lib:build: [0m
|
|
6
|
-
[34m@jitsu/functions-lib:build: [0m
|
|
7
|
-
[34m@jitsu/functions-lib:build: [0m> @jitsu/functions-lib@0.0.0 compile /Users/ildarnurislamov/Projects/newjitsu/libs/functions
|
|
8
|
-
[34m@jitsu/functions-lib:build: [0m> tsc -p .
|
|
9
|
-
[34m@jitsu/functions-lib:build: [0m
|
|
10
|
-
[34m@jitsu/functions-lib:build: [0m[36m
|
|
11
|
-
[34m@jitsu/functions-lib:build: [0m[1m./src/index.ts[22m → [1mdist/index.es.js, dist/index.cjs.js[22m...[39m
|
|
12
|
-
[34m@jitsu/functions-lib:build: [0m[32mcreated [1mdist/index.es.js, dist/index.cjs.js[22m in [1m1s[22m[39m
|
package/.turbo/turbo-test.log
DELETED
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
@jitsu/functions-lib:test: cache hit, replaying output [2m9d86d3cea998628f[0m
|
|
2
|
-
[34m@jitsu/functions-lib:test: [0m
|
|
3
|
-
[34m@jitsu/functions-lib:test: [0m> @jitsu/functions-lib@0.0.0 test /Users/ildarnurislamov/Projects/newjitsu/libs/functions
|
|
4
|
-
[34m@jitsu/functions-lib:test: [0m> tsc -p . && jest --verbose
|
|
5
|
-
[34m@jitsu/functions-lib:test: [0m
|
|
6
|
-
[34m@jitsu/functions-lib:test: [0mts-jest[versions] (WARN) Version 5.6.3 of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=4.3.0 <5.0.0-0). Please do not report issues in ts-jest if you are using unsupported versions.
|
|
7
|
-
[34m@jitsu/functions-lib:test: [0m{
|
|
8
|
-
[34m@jitsu/functions-lib:test: [0m "anon_ip": "141.136.89.0",
|
|
9
|
-
[34m@jitsu/functions-lib:test: [0m "api_key": "writeKey",
|
|
10
|
-
[34m@jitsu/functions-lib:test: [0m "doc_host": "localhost:3088",
|
|
11
|
-
[34m@jitsu/functions-lib:test: [0m "doc_path": "/basic.html",
|
|
12
|
-
[34m@jitsu/functions-lib:test: [0m "doc_search": "?utm_source=source&utm_medium=medium&utm_campaign=campaign",
|
|
13
|
-
[34m@jitsu/functions-lib:test: [0m "eventn_ctx_event_id": "a6c09b16-c2bc-4193-990f-5e2b694ae610",
|
|
14
|
-
[34m@jitsu/functions-lib:test: [0m "event_type": "identify",
|
|
15
|
-
[34m@jitsu/functions-lib:test: [0m "page_title": "Tracking page",
|
|
16
|
-
[34m@jitsu/functions-lib:test: [0m "referer": "https://referrer.com",
|
|
17
|
-
[34m@jitsu/functions-lib:test: [0m "screen_resolution": "1280x720",
|
|
18
|
-
[34m@jitsu/functions-lib:test: [0m "source_ip": "141.136.89.181",
|
|
19
|
-
[34m@jitsu/functions-lib:test: [0m "src": "jitsu",
|
|
20
|
-
[34m@jitsu/functions-lib:test: [0m "url": "https://localhost:3088/basic.html?utm_source=source&utm_medium=medium&utm_campaign=campaign",
|
|
21
|
-
[34m@jitsu/functions-lib:test: [0m "user": {
|
|
22
|
-
[34m@jitsu/functions-lib:test: [0m "id": "userId2",
|
|
23
|
-
[34m@jitsu/functions-lib:test: [0m "anonymous_id": "6638caf0-d2c2-4bc0-aecf-8b290b559a37",
|
|
24
|
-
[34m@jitsu/functions-lib:test: [0m "email": "john.doe2@gmail.com",
|
|
25
|
-
[34m@jitsu/functions-lib:test: [0m "caseName": "basic-identify",
|
|
26
|
-
[34m@jitsu/functions-lib:test: [0m "CaseLastName": "Doe",
|
|
27
|
-
[34m@jitsu/functions-lib:test: [0m "User_Name": "jj"
|
|
28
|
-
[34m@jitsu/functions-lib:test: [0m },
|
|
29
|
-
[34m@jitsu/functions-lib:test: [0m "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/107.0.5304.18 Safari/537.36",
|
|
30
|
-
[34m@jitsu/functions-lib:test: [0m "user_language": "en-US",
|
|
31
|
-
[34m@jitsu/functions-lib:test: [0m "utc_time": "2022-11-14T08:56:34.387Z",
|
|
32
|
-
[34m@jitsu/functions-lib:test: [0m "_timestamp": "2022-11-14T08:56:40.000Z",
|
|
33
|
-
[34m@jitsu/functions-lib:test: [0m "utm": {
|
|
34
|
-
[34m@jitsu/functions-lib:test: [0m "medium": "medium",
|
|
35
|
-
[34m@jitsu/functions-lib:test: [0m "name": "campaign",
|
|
36
|
-
[34m@jitsu/functions-lib:test: [0m "source": "source"
|
|
37
|
-
[34m@jitsu/functions-lib:test: [0m },
|
|
38
|
-
[34m@jitsu/functions-lib:test: [0m "vp_size": "1280x720"
|
|
39
|
-
[34m@jitsu/functions-lib:test: [0m}
|
|
40
|
-
[34m@jitsu/functions-lib:test: [0m{
|
|
41
|
-
[34m@jitsu/functions-lib:test: [0m "api_key": "",
|
|
42
|
-
[34m@jitsu/functions-lib:test: [0m "doc_host": "localhost:3088",
|
|
43
|
-
[34m@jitsu/functions-lib:test: [0m "doc_path": "/basic.html",
|
|
44
|
-
[34m@jitsu/functions-lib:test: [0m "doc_search": "?utm_source=source&utm_medium=medium&utm_campaign=campaign",
|
|
45
|
-
[34m@jitsu/functions-lib:test: [0m "eventn_ctx_event_id": "d0c6abf6-97f7-487a-a197-8f236c728fa8",
|
|
46
|
-
[34m@jitsu/functions-lib:test: [0m "event_type": "page",
|
|
47
|
-
[34m@jitsu/functions-lib:test: [0m "page_title": "Tracking page",
|
|
48
|
-
[34m@jitsu/functions-lib:test: [0m "referer": "https://referrer.com",
|
|
49
|
-
[34m@jitsu/functions-lib:test: [0m "screen_resolution": "1280x720",
|
|
50
|
-
[34m@jitsu/functions-lib:test: [0m "src": "jitsu",
|
|
51
|
-
[34m@jitsu/functions-lib:test: [0m "url": "https://localhost:3088/basic.html?utm_source=source&utm_medium=medium&utm_campaign=campaign",
|
|
52
|
-
[34m@jitsu/functions-lib:test: [0m "user": {
|
|
53
|
-
[34m@jitsu/functions-lib:test: [0m "id": "userId2",
|
|
54
|
-
[34m@jitsu/functions-lib:test: [0m "anonymous_id": "6638caf0-d2c2-4bc0-aecf-8b290b559a37",
|
|
55
|
-
[34m@jitsu/functions-lib:test: [0m "email": "john.doe3@gmail.com",
|
|
56
|
-
[34m@jitsu/functions-lib:test: [0m "caseName": "identify-without-user-id",
|
|
57
|
-
[34m@jitsu/functions-lib:test: [0m "CaseLastName": "Doe",
|
|
58
|
-
[34m@jitsu/functions-lib:test: [0m "User_Name": "jj"
|
|
59
|
-
[34m@jitsu/functions-lib:test: [0m },
|
|
60
|
-
[34m@jitsu/functions-lib:test: [0m "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/107.0.5304.18 Safari/537.36",
|
|
61
|
-
[34m@jitsu/functions-lib:test: [0m "user_language": "en-US",
|
|
62
|
-
[34m@jitsu/functions-lib:test: [0m "utc_time": "2022-11-14T08:56:34.395Z",
|
|
63
|
-
[34m@jitsu/functions-lib:test: [0m "_timestamp": "2022-11-14T08:56:40.000Z",
|
|
64
|
-
[34m@jitsu/functions-lib:test: [0m "utm": {
|
|
65
|
-
[34m@jitsu/functions-lib:test: [0m "medium": "medium",
|
|
66
|
-
[34m@jitsu/functions-lib:test: [0m "name": "campaign",
|
|
67
|
-
[34m@jitsu/functions-lib:test: [0m "source": "source"
|
|
68
|
-
[34m@jitsu/functions-lib:test: [0m },
|
|
69
|
-
[34m@jitsu/functions-lib:test: [0m "vp_size": "1280x720",
|
|
70
|
-
[34m@jitsu/functions-lib:test: [0m "caseName": "page-with-name",
|
|
71
|
-
[34m@jitsu/functions-lib:test: [0m "nestedProp": {
|
|
72
|
-
[34m@jitsu/functions-lib:test: [0m "my-Prop1": "myValue",
|
|
73
|
-
[34m@jitsu/functions-lib:test: [0m "myProp2": "myValue"
|
|
74
|
-
[34m@jitsu/functions-lib:test: [0m },
|
|
75
|
-
[34m@jitsu/functions-lib:test: [0m "hash": "",
|
|
76
|
-
[34m@jitsu/functions-lib:test: [0m "name": "test-page"
|
|
77
|
-
[34m@jitsu/functions-lib:test: [0m}
|
|
78
|
-
[34m@jitsu/functions-lib:test: [0m{
|
|
79
|
-
[34m@jitsu/functions-lib:test: [0m "anon_ip": "141.136.89.0",
|
|
80
|
-
[34m@jitsu/functions-lib:test: [0m "api_key": "writeKey",
|
|
81
|
-
[34m@jitsu/functions-lib:test: [0m "doc_host": "localhost:3088",
|
|
82
|
-
[34m@jitsu/functions-lib:test: [0m "doc_path": "/basic.html",
|
|
83
|
-
[34m@jitsu/functions-lib:test: [0m "doc_search": "?utm_source=source&utm_medium=medium&utm_campaign=campaign",
|
|
84
|
-
[34m@jitsu/functions-lib:test: [0m "eventn_ctx_event_id": "a6c09b16-c2bc-4193-990f-5e2b694ae610",
|
|
85
|
-
[34m@jitsu/functions-lib:test: [0m "event_type": "identify",
|
|
86
|
-
[34m@jitsu/functions-lib:test: [0m "page_title": "Tracking page",
|
|
87
|
-
[34m@jitsu/functions-lib:test: [0m "referer": "https://referrer.com",
|
|
88
|
-
[34m@jitsu/functions-lib:test: [0m "screen_resolution": "1280x720",
|
|
89
|
-
[34m@jitsu/functions-lib:test: [0m "source_ip": "141.136.89.181",
|
|
90
|
-
[34m@jitsu/functions-lib:test: [0m "src": "jitsu",
|
|
91
|
-
[34m@jitsu/functions-lib:test: [0m "url": "https://localhost:3088/basic.html?utm_source=source&utm_medium=medium&utm_campaign=campaign",
|
|
92
|
-
[34m@jitsu/functions-lib:test: [0m "user": {
|
|
93
|
-
[34m@jitsu/functions-lib:test: [0m "id": "userId2",
|
|
94
|
-
[34m@jitsu/functions-lib:test: [0m "anonymous_id": "6638caf0-d2c2-4bc0-aecf-8b290b559a37",
|
|
95
|
-
[34m@jitsu/functions-lib:test: [0m "email": "john.doe2@gmail.com",
|
|
96
|
-
[34m@jitsu/functions-lib:test: [0m "casename": "basic-identify",
|
|
97
|
-
[34m@jitsu/functions-lib:test: [0m "caselastname": "Doe",
|
|
98
|
-
[34m@jitsu/functions-lib:test: [0m "user_name": "jj"
|
|
99
|
-
[34m@jitsu/functions-lib:test: [0m },
|
|
100
|
-
[34m@jitsu/functions-lib:test: [0m "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/107.0.5304.18 Safari/537.36",
|
|
101
|
-
[34m@jitsu/functions-lib:test: [0m "user_language": "en-US",
|
|
102
|
-
[34m@jitsu/functions-lib:test: [0m "utc_time": "2022-11-14T08:56:34.387Z",
|
|
103
|
-
[34m@jitsu/functions-lib:test: [0m "_timestamp": "2022-11-14T08:56:40.000Z",
|
|
104
|
-
[34m@jitsu/functions-lib:test: [0m "utm": {
|
|
105
|
-
[34m@jitsu/functions-lib:test: [0m "medium": "medium",
|
|
106
|
-
[34m@jitsu/functions-lib:test: [0m "name": "campaign",
|
|
107
|
-
[34m@jitsu/functions-lib:test: [0m "source": "source"
|
|
108
|
-
[34m@jitsu/functions-lib:test: [0m },
|
|
109
|
-
[34m@jitsu/functions-lib:test: [0m "vp_size": "1280x720"
|
|
110
|
-
[34m@jitsu/functions-lib:test: [0m}
|
|
111
|
-
[34m@jitsu/functions-lib:test: [0m{
|
|
112
|
-
[34m@jitsu/functions-lib:test: [0m "api_key": "",
|
|
113
|
-
[34m@jitsu/functions-lib:test: [0m "doc_host": "localhost:3088",
|
|
114
|
-
[34m@jitsu/functions-lib:test: [0m "doc_path": "/basic.html",
|
|
115
|
-
[34m@jitsu/functions-lib:test: [0m "doc_search": "?utm_source=source&utm_medium=medium&utm_campaign=campaign",
|
|
116
|
-
[34m@jitsu/functions-lib:test: [0m "eventn_ctx_event_id": "d0c6abf6-97f7-487a-a197-8f236c728fa8",
|
|
117
|
-
[34m@jitsu/functions-lib:test: [0m "event_type": "page",
|
|
118
|
-
[34m@jitsu/functions-lib:test: [0m "page_title": "Tracking page",
|
|
119
|
-
[34m@jitsu/functions-lib:test: [0m "referer": "https://referrer.com",
|
|
120
|
-
[34m@jitsu/functions-lib:test: [0m "screen_resolution": "1280x720",
|
|
121
|
-
[34m@jitsu/functions-lib:test: [0m "src": "jitsu",
|
|
122
|
-
[34m@jitsu/functions-lib:test: [0m "url": "https://localhost:3088/basic.html?utm_source=source&utm_medium=medium&utm_campaign=campaign",
|
|
123
|
-
[34m@jitsu/functions-lib:test: [0m "user": {
|
|
124
|
-
[34m@jitsu/functions-lib:test: [0m "id": "userId2",
|
|
125
|
-
[34m@jitsu/functions-lib:test: [0m "anonymous_id": "6638caf0-d2c2-4bc0-aecf-8b290b559a37",
|
|
126
|
-
[34m@jitsu/functions-lib:test: [0m "email": "john.doe3@gmail.com",
|
|
127
|
-
[34m@jitsu/functions-lib:test: [0m "casename": "identify-without-user-id",
|
|
128
|
-
[34m@jitsu/functions-lib:test: [0m "caselastname": "Doe",
|
|
129
|
-
[34m@jitsu/functions-lib:test: [0m "user_name": "jj"
|
|
130
|
-
[34m@jitsu/functions-lib:test: [0m },
|
|
131
|
-
[34m@jitsu/functions-lib:test: [0m "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/107.0.5304.18 Safari/537.36",
|
|
132
|
-
[34m@jitsu/functions-lib:test: [0m "user_language": "en-US",
|
|
133
|
-
[34m@jitsu/functions-lib:test: [0m "utc_time": "2022-11-14T08:56:34.395Z",
|
|
134
|
-
[34m@jitsu/functions-lib:test: [0m "_timestamp": "2022-11-14T08:56:40.000Z",
|
|
135
|
-
[34m@jitsu/functions-lib:test: [0m "utm": {
|
|
136
|
-
[34m@jitsu/functions-lib:test: [0m "medium": "medium",
|
|
137
|
-
[34m@jitsu/functions-lib:test: [0m "name": "campaign",
|
|
138
|
-
[34m@jitsu/functions-lib:test: [0m "source": "source"
|
|
139
|
-
[34m@jitsu/functions-lib:test: [0m },
|
|
140
|
-
[34m@jitsu/functions-lib:test: [0m "vp_size": "1280x720",
|
|
141
|
-
[34m@jitsu/functions-lib:test: [0m "casename": "page-with-name",
|
|
142
|
-
[34m@jitsu/functions-lib:test: [0m "nestedprop": {
|
|
143
|
-
[34m@jitsu/functions-lib:test: [0m "my_prop1": "myValue",
|
|
144
|
-
[34m@jitsu/functions-lib:test: [0m "myprop2": "myValue"
|
|
145
|
-
[34m@jitsu/functions-lib:test: [0m },
|
|
146
|
-
[34m@jitsu/functions-lib:test: [0m "hash": "",
|
|
147
|
-
[34m@jitsu/functions-lib:test: [0m "name": "test-page"
|
|
148
|
-
[34m@jitsu/functions-lib:test: [0m}
|
|
149
|
-
[34m@jitsu/functions-lib:test: [0mPASS __tests__/classic-mapping.test.ts
|
|
150
|
-
[34m@jitsu/functions-lib:test: [0m ✓ legacy event s3 (5 ms)
|
|
151
|
-
[34m@jitsu/functions-lib:test: [0m ✓ legacy event warehouse (1 ms)
|
|
152
|
-
[34m@jitsu/functions-lib:test: [0m ✓ classic events mapping (1 ms)
|
|
153
|
-
[34m@jitsu/functions-lib:test: [0m
|
|
154
|
-
[34m@jitsu/functions-lib:test: [0mTest Suites: 1 passed, 1 total
|
|
155
|
-
[34m@jitsu/functions-lib:test: [0mTests: 3 passed, 3 total
|
|
156
|
-
[34m@jitsu/functions-lib:test: [0mSnapshots: 0 total
|
|
157
|
-
[34m@jitsu/functions-lib:test: [0mTime: 1.323 s
|
|
158
|
-
[34m@jitsu/functions-lib:test: [0mRan all test suites.
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2021 Jitsu Labs, Inc
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|