@speedkit/cli 3.18.0 → 3.19.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 +7 -0
- package/README.md +1 -1
- package/dist/services/customer-config/customer-config-service-model.d.ts +1 -1
- package/dist/services/customer-config/customer-config-service.js +3 -5
- package/dist/services/customer-config/templates/config_documentHandler.js.hbs +3 -0
- package/dist/services/customer-config/templates/config_dynamicBlocks.es6.hbs +0 -17
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [3.19.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v3.18.0...v3.19.0) (2025-12-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* replace cf rocketloader workaround with our plugin ([1ca3bb4](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/1ca3bb4d5563e22bf9df6d5c7fc263638b412b38))
|
|
7
|
+
|
|
1
8
|
# [3.18.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v3.17.0...v3.18.0) (2025-12-12)
|
|
2
9
|
|
|
3
10
|
|
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ export interface CustomerConfigSettings {
|
|
|
35
35
|
useGATracking?: boolean;
|
|
36
36
|
useScrapingBee?: boolean;
|
|
37
37
|
withGoogleOptimize?: boolean;
|
|
38
|
-
|
|
38
|
+
activateCfRocketLoaderPlugin?: boolean;
|
|
39
39
|
hasSoftNavigations?: boolean;
|
|
40
40
|
isPOV?: boolean;
|
|
41
41
|
isShopify?: 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, addSSR, addSSRInnerShadowDomSupport, addDeviceDetection, useGATracking, useScrapingBee, withGoogleOptimize,
|
|
139
|
+
let { production, staging, activateScopedDeployments, subRouteScope, includeServiceWorker, activateImageOptimisation, removeLazyLoading, addSSR, addSSRInnerShadowDomSupport, addDeviceDetection, useGATracking, useScrapingBee, withGoogleOptimize, activateCfRocketLoaderPlugin, hasSoftNavigations, isShopify, isShopware, isSalesforce, isOxid, isPlentymarkets, isPOV, } = {};
|
|
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,
|
|
@@ -200,9 +200,7 @@ class CustomerConfigService {
|
|
|
200
200
|
hasSoftNavigations = await this.cli.confirm("[Tracking] Add tracking for Soft Navigations?", false);
|
|
201
201
|
isPOV = await this.cli.confirm("[Tracking] Is a POV (proof of value) anticipated, so that additional tracking is needed?", false);
|
|
202
202
|
withGoogleOptimize = await this.cli.confirm("[Services] Is Google Optimize used?", false);
|
|
203
|
-
|
|
204
|
-
? true
|
|
205
|
-
: await this.cli.confirm("[Services] Is Cloudflare's Rocket Loader used, for which we would need to activate a workaround?", false);
|
|
203
|
+
activateCfRocketLoaderPlugin = await this.cli.confirm("[Services] Is Cloudflare's Rocket Loader used, for which we need to activate our rocket loader plugin?", false);
|
|
206
204
|
return {
|
|
207
205
|
appName: this.appName,
|
|
208
206
|
production,
|
|
@@ -218,7 +216,7 @@ class CustomerConfigService {
|
|
|
218
216
|
useGATracking,
|
|
219
217
|
useScrapingBee,
|
|
220
218
|
withGoogleOptimize,
|
|
221
|
-
|
|
219
|
+
activateCfRocketLoaderPlugin,
|
|
222
220
|
hasSoftNavigations,
|
|
223
221
|
isShopify,
|
|
224
222
|
isShopware,
|
|
@@ -119,6 +119,9 @@ const config = {
|
|
|
119
119
|
stripComments: false, // Plentymarkets specific
|
|
120
120
|
{{/if}}
|
|
121
121
|
ignoreAssets: [],
|
|
122
|
+
{{#if activateCfRocketLoaderPlugin}}
|
|
123
|
+
handleRocketLoader: true,
|
|
124
|
+
{{/if}}
|
|
122
125
|
{{#if isShopify}}
|
|
123
126
|
delayScriptPath: "/apps/speed-kit/speed-kit-dom-ready.js", // Shopify specific
|
|
124
127
|
{{else}}
|
|
@@ -89,23 +89,6 @@
|
|
|
89
89
|
detectChanges: [{compare: ['text']}],
|
|
90
90
|
},
|
|
91
91
|
{{/if}}
|
|
92
|
-
{{#if activateCfRocketLoaderWorkaround}}
|
|
93
|
-
|
|
94
|
-
// Workaround for Cloudflare's Rocket Loader (e.g. needed for Shopify)
|
|
95
|
-
{
|
|
96
|
-
selector: "script[data-cf-settings]",
|
|
97
|
-
mergeFunction: function (localBlock, remoteBlock) {
|
|
98
|
-
let cFHash = remoteBlock.getAttribute("data-cf-settings");
|
|
99
|
-
localBlock.setAttribute("data-cf-settings", cFHash);
|
|
100
|
-
let deferScripts = document.querySelectorAll("script[src][defer]");
|
|
101
|
-
deferScripts.forEach((deferScript) => {
|
|
102
|
-
let type = deferScript.type;
|
|
103
|
-
type = type.replace(/[a-f0-9]{24}/, cFHash.split('-')[0]);
|
|
104
|
-
deferScript.type = type;
|
|
105
|
-
})
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
{{/if}}
|
|
109
92
|
|
|
110
93
|
// default entries
|
|
111
94
|
{ selector: 'link[rel="canonical"]'},
|
package/oclif.manifest.json
CHANGED