jitsu-cli 1.9.9 → 1.9.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.
@@ -1,4 +1,4 @@
1
- jitsu-cli:build: cache hit, replaying output b7f21d7de1fc0e30
1
+ jitsu-cli:build: cache hit, replaying output 239dfa4ad2d56ea3
2
2
  jitsu-cli:build: 
3
3
  jitsu-cli:build: > jitsu-cli@0.0.0 build /Users/ildarnurislamov/Projects/newjitsu/cli/jitsu-cli
4
4
  jitsu-cli:build: > pnpm compile && webpack
@@ -11,7 +11,7 @@ jitsu-cli:build: cache hit, replaying output b7f21d7de1fc0e30
11
11
  jitsu-cli:build: asset 233.js 130 KiB [emitted] (id hint: vendors) 1 related asset
12
12
  jitsu-cli:build: asset 445e7f36f8a19c2bf682.js 37.3 KiB [emitted] [immutable] [from: ../../node_modules/.pnpm/@rollup+plugin-typescript@11.1.6_rollup@3.29.5_tslib@2.8.0_typescript@5.6.3/node_modules/@rollup/plugin-typescript/dist/es/index.js] (auxiliary name: main)
13
13
  jitsu-cli:build: asset 140.js 10 KiB [emitted] 1 related asset
14
- jitsu-cli:build: orphan modules 568 KiB [orphan] 99 modules
14
+ jitsu-cli:build: orphan modules 569 KiB [orphan] 99 modules
15
15
  jitsu-cli:build: runtime modules 3.62 KiB 10 modules
16
16
  jitsu-cli:build: cacheable modules 2.9 MiB (javascript) 37.3 KiB (asset)
17
17
  jitsu-cli:build:  javascript modules 2.54 MiB 422 modules
@@ -25,4 +25,4 @@ jitsu-cli:build: cache hit, replaying output b7f21d7de1fc0e30
25
25
  jitsu-cli:build:  external "worker_threads" 42 bytes [optional] [built] [code generated]
26
26
  jitsu-cli:build:  external "node:stream/web" 42 bytes [optional] [built] [code generated]
27
27
  jitsu-cli:build: + 26 modules
28
- jitsu-cli:build: webpack 5.95.0 compiled successfully in 3486 ms
28
+ jitsu-cli:build: webpack 5.95.0 compiled successfully in 4532 ms
@@ -1,4 +1,4 @@
1
- jitsu-cli:clean: cache hit, replaying output 5df322ef0caf8c3f
1
+ jitsu-cli:clean: cache hit, replaying output 257faca600459f53
2
2
  jitsu-cli:clean: 
3
3
  jitsu-cli:clean: > jitsu-cli@0.0.0 clean /Users/ildarnurislamov/Projects/newjitsu/cli/jitsu-cli
4
4
  jitsu-cli:clean: > rm -rf ./dist
@@ -65,8 +65,8 @@ let profileCode = ({}) => {
65
65
  import { ProfileFunction } from "@jitsu/protocols/profile";
66
66
 
67
67
  export const config = {
68
+ profileBuilderId: "", // Required: id of Profile Builder where this function will be used. Can be found in the Profile Builder Settings UI
68
69
  slug: "profile-example.ts", //id (uniq per workspace) used to identify function in Jitsu
69
- profileBuilderId: "", // id of Profile Builder object where this function will be used
70
70
  description: ""
71
71
  };
72
72
 
@@ -76,10 +76,9 @@ const profileExample: ProfileFunction = async (events, user, context) => {
76
76
  for (const event of events) {
77
77
  profile.lastMessageDate = Math.max(new Date(event.timestamp).getTime(),profile.lastMessageDate??0)
78
78
  }
79
- profile.traits = user.traits
80
79
  profile.anonId = user.anonymousId
81
80
  return {
82
- properties: profile
81
+ traits: profile
83
82
  }
84
83
  };
85
84
 
package/dist/main.js CHANGED
@@ -82210,7 +82210,7 @@ var profileTest = function profileTest(_ref4) {
82210
82210
  };
82211
82211
  var profileCode = function profileCode(_ref5) {
82212
82212
  _objectDestructuringEmpty(_ref5);
82213
- return "\nimport { ProfileFunction } from \"@jitsu/protocols/profile\";\n\nexport const config = {\n slug: \"profile-example.ts\", //id (uniq per workspace) used to identify function in Jitsu\n profileBuilderId: \"\", // id of Profile Builder object where this function will be used\n description: \"\"\n};\n\nconst profileExample: ProfileFunction = async (events, user, context) => {\n context.log.info(\"Profile func: \" + user.id)\n const profile = {} as any\n for (const event of events) {\n profile.lastMessageDate = Math.max(new Date(event.timestamp).getTime(),profile.lastMessageDate??0)\n }\n profile.traits = user.traits\n profile.anonId = user.anonymousId\n return {\n properties: profile\n }\n};\n\nexport default profileExample;\n";
82213
+ return "\nimport { ProfileFunction } from \"@jitsu/protocols/profile\";\n\nexport const config = {\n profileBuilderId: \"\", // Required: id of Profile Builder where this function will be used. Can be found in the Profile Builder Settings UI\n slug: \"profile-example.ts\", //id (uniq per workspace) used to identify function in Jitsu\n description: \"\"\n};\n\nconst profileExample: ProfileFunction = async (events, user, context) => {\n context.log.info(\"Profile func: \" + user.id)\n const profile = {} as any\n for (const event of events) {\n profile.lastMessageDate = Math.max(new Date(event.timestamp).getTime(),profile.lastMessageDate??0)\n }\n profile.anonId = user.anonymousId\n return {\n traits: profile\n }\n};\n\nexport default profileExample;\n";
82214
82214
  };
82215
82215
  var functionProjectTemplate = function functionProjectTemplate(_ref6) {
82216
82216
  var packageName = _ref6.packageName;