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.
@@ -1,28 +1,28 @@
1
- jitsu-cli:build: cache hit, replaying output b7f21d7de1fc0e30
2
- jitsu-cli:build: 
3
- jitsu-cli:build: > jitsu-cli@0.0.0 build /Users/ildarnurislamov/Projects/newjitsu/cli/jitsu-cli
4
- jitsu-cli:build: > pnpm compile && webpack
5
- jitsu-cli:build: 
6
- jitsu-cli:build: 
7
- jitsu-cli:build: > jitsu-cli@0.0.0 compile /Users/ildarnurislamov/Projects/newjitsu/cli/jitsu-cli
8
- jitsu-cli:build: > tsc -p .
9
- jitsu-cli:build: 
10
- jitsu-cli:build: asset main.js 3.5 MiB [emitted] (name: main) 1 related asset
11
- jitsu-cli:build: asset 233.js 130 KiB [emitted] (id hint: vendors) 1 related asset
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
- jitsu-cli:build: asset 140.js 10 KiB [emitted] 1 related asset
14
- jitsu-cli:build: orphan modules 568 KiB [orphan] 99 modules
15
- jitsu-cli:build: runtime modules 3.62 KiB 10 modules
16
- jitsu-cli:build: cacheable modules 2.9 MiB (javascript) 37.3 KiB (asset)
17
- jitsu-cli:build:  javascript modules 2.54 MiB 422 modules
18
- jitsu-cli:build:  json modules 363 KiB
19
- jitsu-cli:build:  modules by path ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/ 86.7 KiB
20
- jitsu-cli:build:  ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/tab...(truncated) 8.78 KiB [built] [code generated]
21
- jitsu-cli:build:  + 7 modules
22
- jitsu-cli:build:  + 4 modules
23
- jitsu-cli:build:  ../../node_modules/.pnpm/@rollup+plugin-typescript@11.1.6_rollup@3.29.5_tslib@2....(truncated) 42 bytes (javascript) 37.3 KiB (asset) [built] [code generated]
24
- jitsu-cli:build: optional modules 84 bytes [optional]
25
- jitsu-cli:build:  external "worker_threads" 42 bytes [optional] [built] [code generated]
26
- jitsu-cli:build:  external "node:stream/web" 42 bytes [optional] [built] [code generated]
27
- jitsu-cli:build: + 26 modules
28
- jitsu-cli:build: webpack 5.95.0 compiled successfully in 3486 ms
1
+ jitsu-cli:build: cache hit, replaying output e406f4cc71cec53a
2
+ jitsu-cli:build: 
3
+ jitsu-cli:build: > jitsu-cli@0.0.0 build /Users/ildarnurislamov/Projects/newjitsu/cli/jitsu-cli
4
+ jitsu-cli:build: > pnpm compile && webpack
5
+ jitsu-cli:build: 
6
+ jitsu-cli:build: 
7
+ jitsu-cli:build: > jitsu-cli@0.0.0 compile /Users/ildarnurislamov/Projects/newjitsu/cli/jitsu-cli
8
+ jitsu-cli:build: > tsc -p .
9
+ jitsu-cli:build: 
10
+ jitsu-cli:build: asset main.js 3.5 MiB [emitted] (name: main) 1 related asset
11
+ jitsu-cli:build: asset 233.js 130 KiB [emitted] (id hint: vendors) 1 related asset
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
+ jitsu-cli:build: asset 140.js 10 KiB [emitted] 1 related asset
14
+ jitsu-cli:build: orphan modules 569 KiB [orphan] 99 modules
15
+ jitsu-cli:build: runtime modules 3.62 KiB 10 modules
16
+ jitsu-cli:build: cacheable modules 2.9 MiB (javascript) 37.3 KiB (asset)
17
+ jitsu-cli:build:  javascript modules 2.54 MiB 422 modules
18
+ jitsu-cli:build:  json modules 363 KiB
19
+ jitsu-cli:build:  modules by path ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/ 86.7 KiB
20
+ jitsu-cli:build:  ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/tab...(truncated) 8.78 KiB [built] [code generated]
21
+ jitsu-cli:build:  + 7 modules
22
+ jitsu-cli:build:  + 4 modules
23
+ jitsu-cli:build:  ../../node_modules/.pnpm/@rollup+plugin-typescript@11.1.6_rollup@3.29.5_tslib@2....(truncated) 42 bytes (javascript) 37.3 KiB (asset) [built] [code generated]
24
+ jitsu-cli:build: optional modules 84 bytes [optional]
25
+ jitsu-cli:build:  external "worker_threads" 42 bytes [optional] [built] [code generated]
26
+ jitsu-cli:build:  external "node:stream/web" 42 bytes [optional] [built] [code generated]
27
+ jitsu-cli:build: + 26 modules
28
+ jitsu-cli:build: webpack 5.95.0 compiled successfully in 3727 ms
@@ -1,5 +1,5 @@
1
- jitsu-cli:clean: cache hit, replaying output 5df322ef0caf8c3f
2
- jitsu-cli:clean: 
3
- jitsu-cli:clean: > jitsu-cli@0.0.0 clean /Users/ildarnurislamov/Projects/newjitsu/cli/jitsu-cli
4
- jitsu-cli:clean: > rm -rf ./dist
5
- jitsu-cli:clean: 
1
+ jitsu-cli:clean: cache hit, replaying output e4fe6f1a3d5c8c28
2
+ jitsu-cli:clean: 
3
+ jitsu-cli:clean: > jitsu-cli@0.0.0 clean /Users/ildarnurislamov/Projects/newjitsu/cli/jitsu-cli
4
+ jitsu-cli:clean: > rm -rf ./dist
5
+ jitsu-cli:clean: 
@@ -44,7 +44,7 @@ export const config = {
44
44
  description: ""
45
45
  };
46
46
 
47
- const helloWorldFunction: JitsuFunction<AnalyticsServerEvent, any> = async (event, { log, fetch, props, store, geo, ...meta }) => {
47
+ const helloWorldFunction: JitsuFunction<AnalyticsServerEvent, any> = async (event, { log, fetch, store, geo, ...meta }) => {
48
48
  //output "Hello World!" to logs and return unchanged event
49
49
  log.info("Hello World!");
50
50
  return event
@@ -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
@@ -82202,7 +82202,7 @@ var functionTest = function functionTest(_ref2) {
82202
82202
  };
82203
82203
  var functionCode = function functionCode(_ref3) {
82204
82204
  _objectDestructuringEmpty(_ref3);
82205
- return "\nimport { JitsuFunction } from \"@jitsu/protocols/functions\";\nimport { RetryError } from \"@jitsu/functions-lib\";\nimport { AnalyticsServerEvent } from \"@jitsu/protocols/analytics\";\n\nexport const config = {\n slug: \"hello.ts\", //id (uniq per workspace) used to identify function in Jitsu\n name: \"Hello World Function\", //human readable name of function\n description: \"\"\n};\n\nconst helloWorldFunction: JitsuFunction<AnalyticsServerEvent, any> = async (event, { log, fetch, props, store, geo, ...meta }) => {\n //output \"Hello World!\" to logs and return unchanged event\n log.info(\"Hello World!\");\n return event\n};\n\nexport default helloWorldFunction;\n";
82205
+ return "\nimport { JitsuFunction } from \"@jitsu/protocols/functions\";\nimport { RetryError } from \"@jitsu/functions-lib\";\nimport { AnalyticsServerEvent } from \"@jitsu/protocols/analytics\";\n\nexport const config = {\n slug: \"hello.ts\", //id (uniq per workspace) used to identify function in Jitsu\n name: \"Hello World Function\", //human readable name of function\n description: \"\"\n};\n\nconst helloWorldFunction: JitsuFunction<AnalyticsServerEvent, any> = async (event, { log, fetch, store, geo, ...meta }) => {\n //output \"Hello World!\" to logs and return unchanged event\n log.info(\"Hello World!\");\n return event\n};\n\nexport default helloWorldFunction;\n";
82206
82206
  };
82207
82207
  var profileTest = function profileTest(_ref4) {
82208
82208
  var packageName = _ref4.packageName;
@@ -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;