@speedkit/cli 3.2.0 → 3.3.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,11 @@
1
+ # [3.3.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v3.2.0...v3.3.0) (2025-08-14)
2
+
3
+
4
+ ### Features
5
+
6
+ * **wizard:** extend questionnaire ([b36eb9f](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/b36eb9f595f904bd342907408bf40d1ba80c923b))
7
+ * **wizard:** extend questionnaire ([c1770cd](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/c1770cd8642e71c69310659cae9835e4e4db838f))
8
+
1
9
  # [3.2.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v3.1.2...v3.2.0) (2025-08-13)
2
10
 
3
11
 
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/3.2.0 linux-x64 node-v20.19.4
24
+ @speedkit/cli/3.3.0 linux-x64 node-v20.19.4
25
25
  $ sk --help [COMMAND]
26
26
  USAGE
27
27
  $ sk COMMAND
@@ -30,6 +30,7 @@ export interface CustomerConfigSettings {
30
30
  activateImageOptimisation?: boolean;
31
31
  removeLazyLoading?: boolean;
32
32
  addPreRendering?: boolean;
33
+ addUADetection?: boolean;
33
34
  supportShadowDomInPreRendering?: boolean;
34
35
  shadowDomCustomElementPrefix?: string;
35
36
  activateRumTracking?: boolean;
@@ -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, isOxid, isPlentymarkets, } = {};
139
+ let { production, staging, activateScopedDeployments, subRouteScope, includeServiceWorker, activateImageOptimisation, removeLazyLoading, addPreRendering, addUADetection, supportShadowDomInPreRendering, shadowDomCustomElementPrefix, activateRumTracking, useGATracking, useScrapingBee, withGoogleOptimize, activateCfRocketLoaderWorkaround, hasSoftNavigations, isShopify, isShopware, isSalesforce, isOxid, isPlentymarkets, } = {};
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,
@@ -181,6 +181,7 @@ class CustomerConfigService {
181
181
  if (await this.cli.confirm("[Service Worker] Is there a Service Worker which needs to be included?", false)) {
182
182
  includeServiceWorker = await this.cli.prompt("[Service Worker] Enter path of Service Worker to be included:", { defaultAnswer: "/sw.js" });
183
183
  }
184
+ addUADetection = await this.cli.confirm("[Variation handling] Do mobile and desktop versions of the website differ in their HTML structure, which would require us to add variations?", false);
184
185
  activateImageOptimisation = await this.cli.confirm("[IO] Should image optimisation be activated?", false);
185
186
  removeLazyLoading = await this.cli.confirm("[Lazy-Loading] Does the shop require us to resolve lazy-loaded content?");
186
187
  if (await this.cli.confirm("[Lambda-SSR] Add server-side-rendering? This requires a set-up Lambda function to work. Also requires usage of the DOM-based DocumentHandler.", false)) {
@@ -217,6 +218,7 @@ class CustomerConfigService {
217
218
  activateImageOptimisation,
218
219
  removeLazyLoading,
219
220
  addPreRendering,
221
+ addUADetection,
220
222
  supportShadowDomInPreRendering,
221
223
  shadowDomCustomElementPrefix,
222
224
  activateRumTracking,
@@ -70,6 +70,14 @@
70
70
  {{#if addPreRendering}}
71
71
  // Lambda SSR specific: detect device to cover different resolutions when rendered in lambda
72
72
  userAgentDetection: true,
73
+ {{else if addUADetection}}
74
+ userAgentDetection: true,
75
+ {{/if}}
76
+ {{#if addUADetection}}
77
+ detectDevice: function(doc) {
78
+ // TODO adjust condition to your needs
79
+ return doc.querySelector('<mobile-specific-element>') ? "mobile" : "desktop";
80
+ },
73
81
  {{/if}}
74
82
  split: CURRENT_HOST_CONFIG.split,
75
83
  splitTestId: CURRENT_HOST_CONFIG.splitTestId,
@@ -8,7 +8,12 @@
8
8
  // ssr container
9
9
  prerendered: [{ selector: "body > .speed-kit-shadow-app-root" }],
10
10
  {{/if}}
11
-
11
+ {{#if addUADetection}}
12
+ detectDevice: (doc) => {
13
+ // TODO adjust condition to your needs
14
+ return doc.querySelector('<mobile-specific-element>') ? "mobile" : "desktop";
15
+ },
16
+ {{/if}}
12
17
  blocks: [
13
18
  // TODO: adjust/replace this exemplary list
14
19
  {
@@ -732,5 +732,5 @@
732
732
  ]
733
733
  }
734
734
  },
735
- "version": "3.2.0"
735
+ "version": "3.3.0"
736
736
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@speedkit/cli",
3
3
  "description": "Speed Kit CLI",
4
- "version": "3.2.0",
4
+ "version": "3.3.0",
5
5
  "author": {
6
6
  "name": "Baqend.com",
7
7
  "email": "info@baqend.com"