@jitsu/functions-lib 2.14.0-canary.20260128.21613fb → 2.15.0-beta.106
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 +12 -9
- package/dist/index.es.js +12 -9
- package/dist/lib/functions.d.ts +1 -1
- package/package.json +11 -5
package/dist/index.cjs.js
CHANGED
|
@@ -268,15 +268,18 @@ function anonymizeIp(ip) {
|
|
|
268
268
|
return `${parts[0]}.${parts[1]}.${parts[2]}.0`;
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
function toJitsuClassic(event, ctx) {
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
271
|
+
function toJitsuClassic(event, ctx, bulker = false) {
|
|
272
|
+
let transferFunc = transfer;
|
|
273
|
+
if (bulker) {
|
|
274
|
+
const keepOriginalNames = !!ctx?.props?.keepOriginalNames;
|
|
275
|
+
const fileStorage = ctx?.destination?.type === "s3" || ctx?.destination?.type === "gcs";
|
|
276
|
+
transferFunc = transferAsSnakeCase;
|
|
277
|
+
if (keepOriginalNames) {
|
|
278
|
+
if (fileStorage) {
|
|
279
|
+
transferFunc = transfer;
|
|
280
|
+
} else {
|
|
281
|
+
transferFunc = transferAsClassic;
|
|
282
|
+
}
|
|
280
283
|
}
|
|
281
284
|
}
|
|
282
285
|
let url = void 0;
|
package/dist/index.es.js
CHANGED
|
@@ -224,15 +224,18 @@ function anonymizeIp(ip) {
|
|
|
224
224
|
return `${parts[0]}.${parts[1]}.${parts[2]}.0`;
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
|
-
function toJitsuClassic(event, ctx) {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
227
|
+
function toJitsuClassic(event, ctx, bulker = false) {
|
|
228
|
+
let transferFunc = transfer;
|
|
229
|
+
if (bulker) {
|
|
230
|
+
const keepOriginalNames = !!ctx?.props?.keepOriginalNames;
|
|
231
|
+
const fileStorage = ctx?.destination?.type === "s3" || ctx?.destination?.type === "gcs";
|
|
232
|
+
transferFunc = transferAsSnakeCase;
|
|
233
|
+
if (keepOriginalNames) {
|
|
234
|
+
if (fileStorage) {
|
|
235
|
+
transferFunc = transfer;
|
|
236
|
+
} else {
|
|
237
|
+
transferFunc = transferAsClassic;
|
|
238
|
+
}
|
|
236
239
|
}
|
|
237
240
|
}
|
|
238
241
|
let url = void 0;
|
package/dist/lib/functions.d.ts
CHANGED
|
@@ -42,5 +42,5 @@ export declare class HTTPError extends Error {
|
|
|
42
42
|
response: string;
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
export declare function toJitsuClassic(event: AnalyticsServerEvent, ctx: FullContext): AnyEvent;
|
|
45
|
+
export declare function toJitsuClassic(event: AnalyticsServerEvent, ctx: FullContext, bulker?: boolean): AnyEvent;
|
|
46
46
|
export declare function fromJitsuClassic(event: AnyEvent): AnyEvent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jitsu/functions-lib",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.15.0-beta.106",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/jitsucom/jitsu",
|
|
7
|
+
"directory": "libs/functions"
|
|
8
|
+
},
|
|
4
9
|
"main": "dist/index.cjs.js",
|
|
5
10
|
"types": "dist/index.d.ts",
|
|
6
11
|
"description": "",
|
|
@@ -15,15 +20,16 @@
|
|
|
15
20
|
"license": "MIT",
|
|
16
21
|
"private": false,
|
|
17
22
|
"devDependencies": {
|
|
18
|
-
"esbuild": "^0.
|
|
23
|
+
"esbuild": "^0.28.1",
|
|
19
24
|
"tsx": "^4.21.0",
|
|
20
25
|
"@types/node": "^18.15.3",
|
|
21
|
-
"@vitest/ui": "^
|
|
26
|
+
"@vitest/ui": "^4.1.12",
|
|
22
27
|
"tslib": "^2.6.3",
|
|
23
28
|
"@jitsu/sdk-js": "^3.1.5",
|
|
24
|
-
"vitest": "^
|
|
29
|
+
"vitest": "^4.1.12",
|
|
30
|
+
"vite": "^6.4.4",
|
|
25
31
|
"@jitsu/common-config": "0.0.0",
|
|
26
|
-
"@jitsu/protocols": "2.
|
|
32
|
+
"@jitsu/protocols": "2.15.0-beta.106"
|
|
27
33
|
},
|
|
28
34
|
"scripts": {
|
|
29
35
|
"//build-deps": "Required by turbo ^build-deps - builds dist/ for workspace packages that import this",
|