jitsu-cli 1.9.9 → 1.9.11
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jitsu-cli",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.11",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Jitsu Dev Team <dev@jitsu.com>",
|
|
6
6
|
"publishConfig": {
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"ts-node": "^10.9.2",
|
|
53
53
|
"webpack": "^5.95.0",
|
|
54
54
|
"webpack-cli": "^5.1.4",
|
|
55
|
-
"@jitsu/
|
|
56
|
-
"
|
|
57
|
-
"
|
|
55
|
+
"@jitsu/functions-lib": "1.9.11",
|
|
56
|
+
"@jitsu/protocols": "1.9.11",
|
|
57
|
+
"juava": "1.9.11"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"clean": "rm -rf ./dist",
|
|
@@ -50,7 +50,7 @@ export const config = {
|
|
|
50
50
|
description: ""
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
-
const helloWorldFunction: JitsuFunction<AnalyticsServerEvent, any> = async (event, { log, fetch,
|
|
53
|
+
const helloWorldFunction: JitsuFunction<AnalyticsServerEvent, any> = async (event, { log, fetch, store, geo, ...meta }) => {
|
|
54
54
|
//output "Hello World!" to logs and return unchanged event
|
|
55
55
|
log.info("Hello World!");
|
|
56
56
|
return event
|
|
@@ -73,8 +73,8 @@ let profileCode = ({}: TemplateVars) => {
|
|
|
73
73
|
import { ProfileFunction } from "@jitsu/protocols/profile";
|
|
74
74
|
|
|
75
75
|
export const config = {
|
|
76
|
+
profileBuilderId: "", // Required: id of Profile Builder where this function will be used. Can be found in the Profile Builder Settings UI
|
|
76
77
|
slug: "profile-example.ts", //id (uniq per workspace) used to identify function in Jitsu
|
|
77
|
-
profileBuilderId: "", // id of Profile Builder object where this function will be used
|
|
78
78
|
description: ""
|
|
79
79
|
};
|
|
80
80
|
|
|
@@ -84,10 +84,9 @@ const profileExample: ProfileFunction = async (events, user, context) => {
|
|
|
84
84
|
for (const event of events) {
|
|
85
85
|
profile.lastMessageDate = Math.max(new Date(event.timestamp).getTime(),profile.lastMessageDate??0)
|
|
86
86
|
}
|
|
87
|
-
profile.traits = user.traits
|
|
88
87
|
profile.anonId = user.anonymousId
|
|
89
88
|
return {
|
|
90
|
-
|
|
89
|
+
traits: profile
|
|
91
90
|
}
|
|
92
91
|
};
|
|
93
92
|
|