@jitsu/functions-lib 1.9.13 → 1.9.14

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,4 +1,4 @@
1
- @jitsu/functions-lib:build: cache hit, replaying output 969825d49164950f
1
+ @jitsu/functions-lib:build: cache hit, replaying output 3d138cf314267d54
2
2
  @jitsu/functions-lib:build: 
3
3
  @jitsu/functions-lib:build: > @jitsu/functions-lib@0.0.0 build /Users/ildarnurislamov/Projects/newjitsu/libs/functions
4
4
  @jitsu/functions-lib:build: > pnpm compile && rollup -c
@@ -9,4 +9,4 @@
9
9
  @jitsu/functions-lib:build: 
10
10
  @jitsu/functions-lib:build: 
11
11
  @jitsu/functions-lib:build: ./src/index.ts → dist/index.es.js, dist/index.cjs.js...
12
- @jitsu/functions-lib:build: created dist/index.es.js, dist/index.cjs.js in 804ms
12
+ @jitsu/functions-lib:build: created dist/index.es.js, dist/index.cjs.js in 782ms
@@ -1,8 +1,14 @@
1
- @jitsu/functions-lib:test: cache hit, replaying output 32ed70ba58410b49
1
+ @jitsu/functions-lib:test: cache hit, replaying output d53e1e8f48ce28cc
2
2
  @jitsu/functions-lib:test: 
3
3
  @jitsu/functions-lib:test: > @jitsu/functions-lib@0.0.0 test /Users/ildarnurislamov/Projects/newjitsu/libs/functions
4
4
  @jitsu/functions-lib:test: > tsc -p . && jest --verbose
5
5
  @jitsu/functions-lib:test: 
6
+ @jitsu/functions-lib:test: watchman warning: Recrawled this watch 1 time, most recently because:
7
+ @jitsu/functions-lib:test: MustScanSubDirs UserDroppedTo resolve, please review the information on
8
+ @jitsu/functions-lib:test: https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
9
+ @jitsu/functions-lib:test: To clear this warning, run:
10
+ @jitsu/functions-lib:test: `watchman watch-del '/Users/ildarnurislamov/Projects/newjitsu' ; watchman watch-project '/Users/ildarnurislamov/Projects/newjitsu'`
11
+ @jitsu/functions-lib:test: 
6
12
  @jitsu/functions-lib:test: ts-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
13
  @jitsu/functions-lib:test: {
8
14
  @jitsu/functions-lib:test:  "anon_ip": "141.136.89.0",
@@ -147,12 +153,12 @@
147
153
  @jitsu/functions-lib:test:  "name": "test-page"
148
154
  @jitsu/functions-lib:test: }
149
155
  @jitsu/functions-lib:test: PASS __tests__/classic-mapping.test.ts
150
- @jitsu/functions-lib:test:  ✓ legacy event s3 (3 ms)
156
+ @jitsu/functions-lib:test:  ✓ legacy event s3 (2 ms)
151
157
  @jitsu/functions-lib:test:  ✓ legacy event warehouse (1 ms)
152
- @jitsu/functions-lib:test:  ✓ classic events mapping (1 ms)
158
+ @jitsu/functions-lib:test:  ✓ classic events mapping (9 ms)
153
159
  @jitsu/functions-lib:test: 
154
160
  @jitsu/functions-lib:test: Test Suites: 1 passed, 1 total
155
161
  @jitsu/functions-lib:test: Tests: 3 passed, 3 total
156
162
  @jitsu/functions-lib:test: Snapshots: 0 total
157
- @jitsu/functions-lib:test: Time: 1.374 s
163
+ @jitsu/functions-lib:test: Time: 1.586 s
158
164
  @jitsu/functions-lib:test: Ran all test suites.
package/dist/index.cjs.js CHANGED
@@ -294,18 +294,19 @@ function toJitsuClassic(event, ctx) {
294
294
  }
295
295
  : undefined,
296
296
  ids: Object.keys(ids).length > 0 ? ids : undefined,
297
- parsed_ua: Object.keys(ua).length > 0
298
- ? {
299
- os_family: ua.os?.name,
300
- os_version: ua.os?.version,
301
- ua_family: ua.browser?.name,
302
- ua_version: ua.browser?.version,
303
- device_brand: ua.device?.vendor,
304
- device_type: ua.device?.type,
305
- device_model: ua.device?.model,
306
- bot: ua.bot,
307
- }
308
- : undefined,
297
+ parsed_ua: event.parsed_ua ||
298
+ (Object.keys(ua).length > 0
299
+ ? {
300
+ os_family: ua.os?.name,
301
+ os_version: ua.os?.version,
302
+ ua_family: ua.browser?.name,
303
+ ua_version: ua.browser?.version,
304
+ device_brand: ua.device?.vendor,
305
+ device_type: ua.device?.type,
306
+ device_model: ua.device?.model,
307
+ bot: ua.bot,
308
+ }
309
+ : undefined),
309
310
  user_agent: analyticsContext.userAgent,
310
311
  user_language: analyticsContext.locale,
311
312
  utc_time: event.timestamp,
package/dist/index.es.js CHANGED
@@ -292,18 +292,19 @@ function toJitsuClassic(event, ctx) {
292
292
  }
293
293
  : undefined,
294
294
  ids: Object.keys(ids).length > 0 ? ids : undefined,
295
- parsed_ua: Object.keys(ua).length > 0
296
- ? {
297
- os_family: ua.os?.name,
298
- os_version: ua.os?.version,
299
- ua_family: ua.browser?.name,
300
- ua_version: ua.browser?.version,
301
- device_brand: ua.device?.vendor,
302
- device_type: ua.device?.type,
303
- device_model: ua.device?.model,
304
- bot: ua.bot,
305
- }
306
- : undefined,
295
+ parsed_ua: event.parsed_ua ||
296
+ (Object.keys(ua).length > 0
297
+ ? {
298
+ os_family: ua.os?.name,
299
+ os_version: ua.os?.version,
300
+ ua_family: ua.browser?.name,
301
+ ua_version: ua.browser?.version,
302
+ device_brand: ua.device?.vendor,
303
+ device_type: ua.device?.type,
304
+ device_model: ua.device?.model,
305
+ bot: ua.bot,
306
+ }
307
+ : undefined),
307
308
  user_agent: analyticsContext.userAgent,
308
309
  user_language: analyticsContext.locale,
309
310
  utc_time: event.timestamp,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jitsu/functions-lib",
3
- "version": "1.9.13",
3
+ "version": "1.9.14",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",
@@ -22,7 +22,7 @@
22
22
  "ts-jest": "29.0.5",
23
23
  "tslib": "^2.6.3",
24
24
  "@jitsu/sdk-js": "^3.1.5",
25
- "@jitsu/protocols": "1.9.13"
25
+ "@jitsu/protocols": "1.9.14"
26
26
  },
27
27
  "scripts": {
28
28
  "compile": "tsc -p .",
@@ -146,7 +146,8 @@ export function toJitsuClassic(event: AnalyticsServerEvent, ctx: FullContext): A
146
146
  : undefined,
147
147
  ids: Object.keys(ids).length > 0 ? ids : undefined,
148
148
  parsed_ua:
149
- Object.keys(ua).length > 0
149
+ event.parsed_ua ||
150
+ (Object.keys(ua).length > 0
150
151
  ? {
151
152
  os_family: ua.os?.name,
152
153
  os_version: ua.os?.version,
@@ -157,7 +158,7 @@ export function toJitsuClassic(event: AnalyticsServerEvent, ctx: FullContext): A
157
158
  device_model: ua.device?.model,
158
159
  bot: ua.bot,
159
160
  }
160
- : undefined,
161
+ : undefined),
161
162
  user_agent: analyticsContext.userAgent,
162
163
  user_language: analyticsContext.locale,
163
164
  utc_time: event.timestamp,