@vskstudio/takt-astro 0.5.0 → 0.6.0

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.d.ts CHANGED
@@ -9,11 +9,11 @@ export { BadgeGlyph, BadgeOptions, BadgeVariant, EmbedOptions, EmbedTheme, InitO
9
9
  interface TaktOptions {
10
10
  /** Site identifier sent with every event. Defaults to `location.hostname`. */
11
11
  domain?: string;
12
- /** Ingestion endpoint. Defaults to `/api/event`. */
12
+ /** Ingestion endpoint. Defaults to `https://taktlytics.com/api/event` (the hosted Takt origin); pass `/api/event` for a same-origin first-party proxy. */
13
13
  endpoint?: string;
14
14
  /**
15
- * First-party origin to derive the endpoint from (`{origin}/api/event`) — your
16
- * Takt domain or a custom domain to dodge ad-blockers. `endpoint` wins over it.
15
+ * First-party origin to derive the endpoint from (`{origin}/api/event`) — a
16
+ * custom domain you proxy through to dodge ad-blockers. `endpoint` wins over it.
17
17
  */
18
18
  scriptOrigin?: string;
19
19
  /** Auto-track outbound link clicks. */
@@ -39,6 +39,8 @@ interface TaktOptions {
39
39
  trackQuery?: boolean;
40
40
  /** Whitelist of query params to keep when `trackQuery` is off. */
41
41
  queryParams?: string[];
42
+ /** Path prefixes never tracked, e.g. `['/app','/account']`. Segment-bounded: `'/app'` matches `'/app'` and `'/app/…'` but not `'/application'`. */
43
+ exclude?: string[];
42
44
  /**
43
45
  * Rewrite each URL before it is sent (e.g. strip a fragment or PII).
44
46
  * MUST be a self-contained function: it is stringified at build time and
package/dist/index.js CHANGED
@@ -21,6 +21,7 @@ function resolveOptions(options = {}) {
21
21
  sampleRate: options.sampleRate,
22
22
  trackQuery: options.trackQuery,
23
23
  queryParams: options.queryParams,
24
+ exclude: options.exclude,
24
25
  tagged: options.tagged
25
26
  };
26
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vskstudio/takt-astro",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Astro integration for Takt privacy-friendly analytics",
5
5
  "license": "MIT",
6
6
  "author": "VSK Studio",
@@ -45,15 +45,25 @@
45
45
  "engines": {
46
46
  "node": ">=18"
47
47
  },
48
+ "scripts": {
49
+ "build": "tsup",
50
+ "typecheck": "tsc --noEmit",
51
+ "lint": "eslint .",
52
+ "test": "vitest run",
53
+ "e2e": "playwright test",
54
+ "size": "size-limit",
55
+ "prepublishOnly": "pnpm build",
56
+ "release": "pnpm build && changeset publish"
57
+ },
48
58
  "peerDependencies": {
49
- "@vskstudio/takt-core": ">=0.5.0",
59
+ "@vskstudio/takt-core": ">=0.8.0",
50
60
  "astro": ">=4"
51
61
  },
52
62
  "devDependencies": {
53
63
  "@changesets/cli": "^2.31.0",
54
64
  "@playwright/test": "^1.50.0",
55
65
  "@size-limit/preset-small-lib": "^11.1.6",
56
- "@vskstudio/takt-core": "^0.5.0",
66
+ "@vskstudio/takt-core": "^0.8.0",
57
67
  "astro": "^5.0.0",
58
68
  "eslint": "^9.0.0",
59
69
  "size-limit": "^11.1.6",
@@ -62,13 +72,5 @@
62
72
  "typescript-eslint": "^8.0.0",
63
73
  "vitest": "^2.1.0"
64
74
  },
65
- "scripts": {
66
- "build": "tsup",
67
- "typecheck": "tsc --noEmit",
68
- "lint": "eslint .",
69
- "test": "vitest run",
70
- "e2e": "playwright test",
71
- "size": "size-limit",
72
- "release": "pnpm build && changeset publish"
73
- }
74
- }
75
+ "packageManager": "pnpm@9.0.0"
76
+ }