@huloglobal/vendure-plugin-visitor-analytics 0.15.0 → 0.15.2

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/CHANGELOG.md CHANGED
@@ -5,6 +5,21 @@ documented here. The format follows
5
5
  [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project
6
6
  adheres to [semantic versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.15.2] — 2026-09-02
9
+
10
+ ### Changed
11
+ - **Licence SDK ^0.11.0.** Master licences (one key that activates every HULO plugin) and hardware-bound keys are now accepted by the runtime licence check.
12
+ - **Branding.** Refreshed HULO Global logo (inline HG monogram) in the admin UI.
13
+
14
+ ## [0.15.1] — 2026-09-01
15
+
16
+ ### Fixed
17
+ - **Premium background jobs now respect the tier.** The abandoned-cart
18
+ sweep (with its Slack notifications) and the recommendations co-view
19
+ aggregation kept running after the evaluation ended; both now check
20
+ premium access on every tick — and re-enable instantly when a licence
21
+ is activated, no restart needed. Admin endpoints were already gated.
22
+
8
23
  ## [0.15.0] — 2026-08-25
9
24
 
10
25
  ### Added
@@ -1 +1 @@
1
- {"version":3,"file":"abandoned-cart.scanner.d.ts","sourceRoot":"","sources":["../src/abandoned-cart.scanner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAInE;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBACa,oBAAqB,YAAW,sBAAsB,EAAE,qBAAqB;IAKlF,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,cAAc;IANnC,OAAO,CAAC,SAAS,CAA+B;IAChD,OAAO,CAAC,SAAS,CAA+B;gBAG3B,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,sBAAsB,EAC/B,cAAc,EAAE,cAAc;IAGnD,sBAAsB;IAyBtB,qBAAqB;CAIxB"}
1
+ {"version":3,"file":"abandoned-cart.scanner.d.ts","sourceRoot":"","sources":["../src/abandoned-cart.scanner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAInE;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBACa,oBAAqB,YAAW,sBAAsB,EAAE,qBAAqB;IAKlF,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,cAAc;IANnC,OAAO,CAAC,SAAS,CAA+B;IAChD,OAAO,CAAC,SAAS,CAA+B;gBAG3B,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,sBAAsB,EAC/B,cAAc,EAAE,cAAc;IAGnD,sBAAsB;IAuCtB,qBAAqB;CAIxB"}
@@ -47,17 +47,33 @@ let AbandonedCartScanner = class AbandonedCartScanner {
47
47
  // than throwing — a mono-process dev setup still works.
48
48
  if (!this.processContext.isWorker)
49
49
  return;
50
+ // Abandoned-cart detection (and its Slack notifications) and the
51
+ // recommendations aggregation are premium features: checked every
52
+ // tick — not once at boot — so activating a licence (or the eval
53
+ // window opening) enables them without a restart, and an expired
54
+ // evaluation stops them at the next tick.
55
+ const premium = () => {
56
+ // Lazy import avoids a static plugin<->scanner cycle at load time.
57
+ const { VisitorAnalyticsPlugin } = require('./plugin');
58
+ return VisitorAnalyticsPlugin.hasPremiumAccess();
59
+ };
50
60
  this.cartTimer = setInterval(() => {
61
+ if (!premium())
62
+ return;
51
63
  this.cartSvc.scan().catch((e) => {
52
64
  common_1.Logger.error(`Abandoned-cart scan failed: ${e === null || e === void 0 ? void 0 : e.message}`, loggerCtx);
53
65
  });
54
66
  }, 5 * 60000);
55
67
  // Fire once at boot so a fresh install doesn't wait 5 min for
56
68
  // its first sweep.
57
- this.cartSvc.scan().catch((e) => {
58
- common_1.Logger.error(`Initial abandoned-cart scan failed: ${e === null || e === void 0 ? void 0 : e.message}`, loggerCtx);
59
- });
69
+ if (premium()) {
70
+ this.cartSvc.scan().catch((e) => {
71
+ common_1.Logger.error(`Initial abandoned-cart scan failed: ${e === null || e === void 0 ? void 0 : e.message}`, loggerCtx);
72
+ });
73
+ }
60
74
  this.recsTimer = setInterval(() => {
75
+ if (!premium())
76
+ return;
61
77
  this.recsSvc.aggregateCoViews(6).catch((e) => {
62
78
  common_1.Logger.error(`Co-view aggregation failed: ${e === null || e === void 0 ? void 0 : e.message}`, loggerCtx);
63
79
  });
@@ -1 +1 @@
1
- {"version":3,"file":"abandoned-cart.scanner.js","sourceRoot":"","sources":["../src/abandoned-cart.scanner.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAmG;AACnG,wCAA+C;AAC/C,qEAAgE;AAChE,uEAAmE;AAEnE,MAAM,SAAS,GAAG,sBAAsB,CAAC;AAEzC;;;;;;;;;;;;;;;;;;GAkBG;AAEI,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAI7B,YACqB,OAA6B,EAC7B,OAA+B,EAC/B,cAA8B;QAF9B,YAAO,GAAP,OAAO,CAAsB;QAC7B,YAAO,GAAP,OAAO,CAAwB;QAC/B,mBAAc,GAAd,cAAc,CAAgB;QAN3C,cAAS,GAA0B,IAAI,CAAC;QACxC,cAAS,GAA0B,IAAI,CAAC;IAM7C,CAAC;IAEJ,sBAAsB;QAClB,6DAA6D;QAC7D,wDAAwD;QACxD,I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AE,CAAC;YAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QAAC,CAAC;IACjF,CAAC;CACJ,CAAA;AArDY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAMqB,6CAAoB;QACpB,gDAAsB;QACf,qBAAc;GAP1C,oBAAoB,CAqDhC"}
@@ -1,26 +1,16 @@
1
1
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-label="HULO Global">
2
2
  <title>HULO Global</title>
3
- <!-- Shared HULO frame: rounded 14px navy square. Everything below
4
- is the HG monogram tuned so both letters read cleanly at 20px
5
- favicon size without ligature ambiguity. -->
3
+ <!-- HULO frame: rounded navy square. The HG monogram sits inline —
4
+ both letters share the cap height (y17.5) and baseline (y46.5)
5
+ so the mark reads as a word, not a stack. Tuned to stay legible
6
+ at 20px favicon size. -->
6
7
  <rect width="64" height="64" rx="14" fill="#0f1419"/>
7
-
8
- <!-- H — two verticals + a crossbar. Kept slim (5px stroke on 64px
9
- viewport) so the counter-space between letters stays legible. -->
10
- <path d="M14 16 h5 v13 h11 v-13 h5 v32 h-5 v-14 h-11 v14 h-5 z"
11
- fill="#ffffff"/>
12
-
13
- <!-- G — a rounded arc that reads as an incomplete circle plus the
14
- amber tick that closes it off. The tick is the HULO accent
15
- colour so the mark carries brand pigment even at tiny sizes. -->
16
- <path d="M50 24
17
- A11 11 0 1 0 50 42
18
- L50 34
19
- L44 34
20
- L44 30"
8
+ <!-- H — slab strokes, 5px bars. -->
9
+ <path d="M7.5 17.5 h5 v12 h8 v-12 h5 v29 h-5 v-12.5 h-8 v12.5 h-5 z" fill="#ffffff"/>
10
+ <!-- G — full-height bowl with the classic inward bar. -->
11
+ <path d="M50.5 22 A12.25 12.25 0 1 0 50.5 42 L50.5 33.1 L43.9 33.1 L43.9 28.7"
21
12
  fill="none" stroke="#ffffff" stroke-width="4.5"
22
13
  stroke-linecap="round" stroke-linejoin="round"/>
23
- <!-- Amber accent tick — closes the G bowl and provides the brand
24
- colour anchor. Drawn last so it lays on top. -->
25
- <circle cx="50" cy="33" r="2.5" fill="#f59e0b"/>
14
+ <!-- Amber accent dot — the brand pigment anchor at the G's opening. -->
15
+ <circle cx="50.5" cy="32" r="2.6" fill="#f59e0b"/>
26
16
  </svg>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@huloglobal/vendure-plugin-visitor-analytics",
3
- "version": "0.15.0",
4
- "description": "Full-funnel visitor analytics for Vendure storefronts \u2014 pageviews, time-on-page, session journey, exit pages, funnel drop-off, and per-visitor profile drawer with parsed user-agent + MaxMind GeoLite2 enrichment. Auto-issues visitor + session cookies on first request; logs guest and signed-in events against the same visitor id so the journey survives login.",
3
+ "version": "0.15.2",
4
+ "description": "Full-funnel visitor analytics for Vendure storefronts — pageviews, time-on-page, session journey, exit pages, funnel drop-off, and per-visitor profile drawer with parsed user-agent + MaxMind GeoLite2 enrichment. Auto-issues visitor + session cookies on first request; logs guest and signed-in events against the same visitor id so the journey survives login.",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "author": "Wayne Garrison <wayne@garrison.me.uk>",
7
7
  "homepage": "https://github.com/exceeded/vendure-plugin-visitor-analytics",
@@ -31,7 +31,7 @@
31
31
  "geolite2-redist": "^3.1.0",
32
32
  "graphql-tag": "^2.12.7",
33
33
  "ua-parser-js": "^1.0.37",
34
- "@huloglobal/vendure-licence-sdk": "^0.10.0"
34
+ "@huloglobal/vendure-licence-sdk": "^0.11.0"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "@nestjs/common": ">=10.0.0",
@@ -54,4 +54,4 @@
54
54
  "funnel",
55
55
  "session-journey"
56
56
  ]
57
- }
57
+ }