@speedkit/cli 2.76.2 → 2.78.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/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ # [2.78.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v2.77.0...v2.78.0) (2025-02-12)
2
+
3
+
4
+ ### Features
5
+
6
+ * **customer-config:** add oxid eshop specific page type tracking ([129c08c](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/129c08cda03d15a085982c33e391d3a6751cb775))
7
+ * **customer-config:** add oxid eshop specifics ([5ef91ac](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/5ef91ac15a759d5b76075badbe105bffc13a1c02))
8
+
9
+ # [2.77.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v2.76.2...v2.77.0) (2025-02-07)
10
+
11
+
12
+ ### Features
13
+
14
+ * **onboarding:** create compatibility for videoPoster in docHandlerLocalMode ([2c35494](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/2c3549499e79ea7a1ae323ff02c1258900b2a7d5))
15
+
1
16
  ## [2.76.2](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v2.76.1...v2.76.2) (2025-02-05)
2
17
 
3
18
 
package/README.md CHANGED
@@ -21,7 +21,7 @@ $ npm install -g @speedkit/cli
21
21
  $ sk COMMAND
22
22
  running command...
23
23
  $ sk (--version)
24
- @speedkit/cli/2.76.2 linux-x64 node-v20.18.2
24
+ @speedkit/cli/2.78.0 linux-x64 node-v20.18.3
25
25
  $ sk --help [COMMAND]
26
26
  USAGE
27
27
  $ sk COMMAND
@@ -8,6 +8,7 @@ export declare enum ShopSystem {
8
8
  SHOPIFY = "Shopify",
9
9
  SHOPWARE = "Shopware",
10
10
  SALESFORCE = "Salesforce Commerce Cloud",
11
+ OXID = "OXID eShop",
11
12
  PLENTYMARKETS = "Plentymarkets"
12
13
  }
13
14
  export declare enum EnvironmentType {
@@ -40,6 +41,7 @@ export interface CustomerConfigSettings {
40
41
  isShopify?: boolean;
41
42
  isShopware?: boolean;
42
43
  isSalesforce?: boolean;
44
+ isOxid?: boolean;
43
45
  isPlentymarkets?: boolean;
44
46
  shopifyId?: string;
45
47
  }
@@ -13,6 +13,7 @@ var ShopSystem;
13
13
  ShopSystem["SHOPIFY"] = "Shopify";
14
14
  ShopSystem["SHOPWARE"] = "Shopware";
15
15
  ShopSystem["SALESFORCE"] = "Salesforce Commerce Cloud";
16
+ ShopSystem["OXID"] = "OXID eShop";
16
17
  ShopSystem["PLENTYMARKETS"] = "Plentymarkets";
17
18
  })(ShopSystem || (exports.ShopSystem = ShopSystem = {}));
18
19
  var EnvironmentType;
@@ -136,7 +136,7 @@ class CustomerConfigService {
136
136
  return true;
137
137
  }
138
138
  async getConfigSettings() {
139
- let { production, staging, activateScopedDeployments, subRouteScope, includeServiceWorker, activateImageOptimisation, removeLazyLoading, addPreRendering, supportShadowDomInPreRendering, shadowDomCustomElementPrefix, activateRumTracking, useGATracking, useScrapingBee, withGoogleOptimize, activateCfRocketLoaderWorkaround, hasSoftNavigations, isShopify, isShopware, isSalesforce, isPlentymarkets, shopifyId, } = {};
139
+ let { production, staging, activateScopedDeployments, subRouteScope, includeServiceWorker, activateImageOptimisation, removeLazyLoading, addPreRendering, supportShadowDomInPreRendering, shadowDomCustomElementPrefix, activateRumTracking, useGATracking, useScrapingBee, withGoogleOptimize, activateCfRocketLoaderWorkaround, hasSoftNavigations, isShopify, isShopware, isSalesforce, isOxid, isPlentymarkets, shopifyId, } = {};
140
140
  this.appName = await this.cli.prompt(`[App Name] Enter desired SK app name:`, {
141
141
  validator: (input) => /^[\da-z]+(?:-[\da-z]+)*$/.test(input) ? "" : "No valid kebab-case",
142
142
  defaultAnswer: this.appName,
@@ -158,6 +158,10 @@ class CustomerConfigService {
158
158
  isSalesforce = true;
159
159
  break;
160
160
  }
161
+ case customer_config_service_model_1.ShopSystem.OXID: {
162
+ isOxid = true;
163
+ break;
164
+ }
161
165
  case customer_config_service_model_1.ShopSystem.PLENTYMARKETS: {
162
166
  isPlentymarkets = true;
163
167
  }
@@ -227,6 +231,7 @@ class CustomerConfigService {
227
231
  isShopify,
228
232
  isShopware,
229
233
  isSalesforce,
234
+ isOxid,
230
235
  isPlentymarkets,
231
236
  shopifyId,
232
237
  };
@@ -241,6 +241,19 @@
241
241
  ],
242
242
  },
243
243
  {{/if}}
244
+ {{#if isOxid}}
245
+
246
+ // OXID eShop specific:
247
+ {
248
+ url: [
249
+ /[?&]cl=/i,
250
+ // "cl" parameter specifying the OXID controller class, which can affect the entire page layout and content
251
+ // – common values: start, alist, details, basket, order, register, login
252
+ // TODO: check in the fine-tuning phase at the latest whether the resulting blacklisted rate is not too high
253
+ /[?&]searchparam/i,
254
+ ],
255
+ },
256
+ {{/if}}
244
257
  {{#if isPlentymarkets}}
245
258
 
246
259
  // Plentymarkets specific:
@@ -6,6 +6,8 @@
6
6
  * - Shopware
7
7
  {{else if isSalesforce}}
8
8
  * - Salesforce Commerce Cloud
9
+ {{else if isOxid}}
10
+ * - OXID eShop
9
11
  {{else if isPlentymarkets}}
10
12
  * - Plentymarkets
11
13
  {{else}}
@@ -17,6 +17,10 @@ import { PredictivePreloading } from 'predictive-preloading/predictivePreloading
17
17
  var softLcpPending = false;
18
18
  var latestUrl = location.href;
19
19
  {{/if}}
20
+ {{#if isOxid}}
21
+
22
+ var pageTypeSent = false;
23
+ {{/if}}
20
24
 
21
25
  window.SpeedKit = window.SpeedKit || {};
22
26
  SpeedKit.rumPlugins = SpeedKit.rumPlugins || [];
@@ -192,18 +196,61 @@ import { PredictivePreloading } from 'predictive-preloading/predictivePreloading
192
196
  {{else}}
193
197
  {{#if useGATracking}}
194
198
  on: 'dataLayer',
195
- set: function(pushedEvent) {
199
+ set: function (pushedEvent) {
196
200
  // TODO: verify event property
201
+ {{#if isOxid}}
202
+ var pageType = pushedEvent?.ecomm_pagetype;
203
+ if (pageType) {
204
+ pageTypeSent = true;
205
+ return pageType;
206
+ }
207
+ {{else}}
197
208
  return pushedEvent?.pageCategory;
209
+ {{/if}}
198
210
  },
199
211
  {{else}}
200
212
  // TODO: set proper 'on' event listener
201
213
  set: function() {
214
+ {{#if isOxid}}
215
+ var pageType; // TODO: assign value
216
+ if (pageType) {
217
+ pageTypeSent = true;
218
+ return pageType;
219
+ }
220
+ {{else}}
202
221
  // TODO: return value
222
+ {{/if}}
203
223
  },
204
224
  {{/if}}
205
225
  {{/if}}
206
226
  },
227
+ {{#if isOxid}}
228
+ // OXID eShop specific fallback tracking for page type using URL:
229
+ {
230
+ key: "pageType",
231
+ type: "PiDimension",
232
+ on: "leavePage",
233
+ set: function () {
234
+ if (pageTypeSent) return;
235
+
236
+ var pageType = "";
237
+
238
+ // Use first segment of the url path as page type if pageType was not identified yet
239
+ var firstPathnameSegment = location.pathname.match(/^\/([^/]+)/);
240
+ if (firstPathnameSegment) {
241
+ pageType = firstPathnameSegment[1];
242
+ }
243
+
244
+ // Extend page type by value of cl query parameter as it also can point to the type of the page
245
+ var clParam = new URL(location.href).searchParams.get("cl");
246
+ if (clParam) {
247
+ pageType += "_" + clParam;
248
+ }
249
+
250
+ return pageType.toLowerCase();
251
+ },
252
+ },
253
+ {{/if}}
207
254
  {{#if useGATracking}}
208
255
 
209
256
  // TODO: remove or adapt if events are not properly covered by GAEcommerceTrackingPlugin
@@ -175,6 +175,7 @@ class DocumentHandlerServer {
175
175
  URL: URL,
176
176
  fetch: this.createFetchMock(),
177
177
  Buffer: Buffer,
178
+ Blob: Blob,
178
179
  };
179
180
  if (this.verboseLevel) {
180
181
  context["console"] = console;
@@ -712,5 +712,5 @@
712
712
  ]
713
713
  }
714
714
  },
715
- "version": "2.76.2"
715
+ "version": "2.78.0"
716
716
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@speedkit/cli",
3
3
  "description": "Speed Kit CLI",
4
- "version": "2.76.2",
4
+ "version": "2.78.0",
5
5
  "author": {
6
6
  "name": "Baqend.com",
7
7
  "email": "info@baqend.com"
@@ -81,6 +81,7 @@
81
81
  "dom-serializer": "2.0.0",
82
82
  "domhandler": "5.0.3",
83
83
  "domutils": "^3.1",
84
+ "fluent-ffmpeg": "^2.1.3",
84
85
  "dotenv": "^16.4.7",
85
86
  "extract-zip": "^2.0.1",
86
87
  "fs-extra": "^11.2.0",