@jitsu/js 1.10.0 → 1.10.1-canary.1321.20250430101335

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/js",
3
- "version": "1.10.0",
3
+ "version": "1.10.1-canary.1321.20250430101335",
4
4
  "description": "",
5
5
  "author": "Jitsu Dev Team <dev@jitsu.com>",
6
6
  "main": "dist/jitsu.cjs.js",
@@ -38,20 +38,20 @@
38
38
  "rollup": "^3.29.5",
39
39
  "ts-jest": "29.0.5",
40
40
  "typescript": "^5.6.3",
41
- "jsondiffpatch": "1.10.0"
41
+ "jsondiffpatch": "1.10.1-canary.1321.20250430101335"
42
42
  },
43
43
  "peerDependencies": {
44
- "@jitsu/protocols": "1.10.0"
44
+ "@jitsu/protocols": "1.10.1-canary.1321.20250430101335"
45
45
  },
46
46
  "dependencies": {
47
47
  "analytics": "0.8.9"
48
48
  },
49
49
  "scripts": {
50
- "clean": "rm -rf ./dist",
50
+ "clean": "rm -rf ./dist ./compiled",
51
51
  "test:node": "jest",
52
52
  "test:playwright": "playwright test ./__tests__/playwright",
53
53
  "test": "pnpm run test:node && pnpm run test:playwright",
54
54
  "compile": "tsc -p .",
55
- "build": "tsc -p . && rollup -c && cp compiled/src/*.d.ts dist"
55
+ "build": "pnpm run clean && pnpm run compile && rollup -c && cp compiled/src/*.d.ts dist"
56
56
  }
57
57
  }
package/dist/jitsu.d.ts DELETED
@@ -1,87 +0,0 @@
1
- import type { AnalyticsInterface } from "@jitsu/protocols/analytics";
2
- type JitsuOptions = {
3
- /**
4
- * API Key. Optional. If not set, Jitsu will send event to the server without auth, and server
5
- * will link the call to configured source by domain name
6
- */
7
- writeKey?: string;
8
- /**
9
- * API Host. Default value: same host as script origin
10
- */
11
- host?: string;
12
- /**
13
- * To enable debug logging
14
- */
15
- debug?: boolean;
16
- /**
17
- * Explicitly specify cookie domain. If not set, cookie domain will be set to top level
18
- * of the current domain. Example: if JS lives on "app.example.com", cookie domain will be
19
- * set to ".example.com". If it lives on "example.com", cookie domain will be set to ".example.com" too
20
- */
21
- cookieDomain?: string;
22
- /**
23
- * Provide fetch implementation. It is required if you want to use Jitsu in NodeJS
24
- */
25
- fetch?: typeof fetch;
26
- /**
27
- * Which runtime to use. Runtime is used for obtaining context of the event: cookes,
28
- * url, etc. At the moment, Jitsu supports browser runtime and NodeJS runtime, but you
29
- * can provide your own implementation.
30
- *
31
- * If it's not set, the runtime will be detected automatically by presense of `window` object
32
- */
33
- runtime?: RuntimeFacade;
34
- /**
35
- * If set to true, jitsu will output events in console. In this case you don't need to set
36
- * writeKey / host. It's useful for debugging development environment
37
- */
38
- echoEvents?: boolean;
39
- /**
40
- * If true, events will go to s2s endpoints like ${host}/api/s/s2s/{type}. Otherwise they'll go to ${host}/api/s/{type}.
41
- *
42
- * If not set at all, it will be detected automatically by presence of `window` object
43
- */
44
- s2s?: boolean;
45
- /**
46
- * Timeout for fetch requests. Default value: 5000
47
- */
48
- fetchTimeoutMs?: number;
49
- /**
50
- * Endpoint that makes sure that Jitsu anonymousId cookie is set as server (httpOnly) cookie.
51
- * Endpoint must be hosted on the same domain as the site where Jitsu code is installed.
52
- * Required to overcome Safari ITP restrictions.
53
- */
54
- idEndpoint?: string;
55
- enabled?: boolean;
56
- enableAnonymousId?: boolean;
57
- enableThirdPartIds?: boolean;
58
- ipPolicy?: "keep" | "remove" | "stripLastOctet";
59
- };
60
- type DynamicJitsuOptions = Pick<JitsuOptions, "enableAnonymousId" | "enableThirdPartIds" | "ipPolicy" | "debug" | "echoEvents" | "enabled">;
61
- type PersistentStorage = {
62
- getItem: (key: string, options?: any) => any;
63
- setItem: (key: string, value: any, options?: any) => void;
64
- removeItem: (key: string, options?: any) => void;
65
- reset: () => void;
66
- };
67
- type RuntimeFacade = {
68
- store(): PersistentStorage;
69
- userAgent(): string | undefined;
70
- language(): string | undefined;
71
- pageUrl(): string | undefined;
72
- documentEncoding(): string | undefined;
73
- getCookie(name: string): string | undefined;
74
- getCookies(): Record<string, string>;
75
- timezoneOffset(): number | undefined;
76
- screen(): {
77
- width: number;
78
- height: number;
79
- innerWidth: number;
80
- innerHeight: number;
81
- density: number;
82
- } | undefined;
83
- referrer(): string | undefined;
84
- pageTitle(): string | undefined;
85
- };
86
- export declare function jitsuAnalytics(opts: JitsuOptions): AnalyticsInterface;
87
- export { AnalyticsInterface, JitsuOptions, DynamicJitsuOptions, PersistentStorage, RuntimeFacade };