@speedkit/cli 2.53.0 → 2.53.1

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,10 @@
1
+ ## [2.53.1](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v2.53.0...v2.53.1) (2024-08-22)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **customer-config:** add prevention for having body as main block for pre-rendering ([132eeb3](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/132eeb37493221b3b90fb16fa4649068a560a607))
7
+
1
8
  # [2.53.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v2.52.0...v2.53.0) (2024-08-22)
2
9
 
3
10
 
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.53.0 linux-x64 node-v20.17.0
24
+ @speedkit/cli/2.53.1 linux-x64 node-v20.17.0
25
25
  $ sk --help [COMMAND]
26
26
  USAGE
27
27
  $ sk COMMAND
@@ -1,32 +1,33 @@
1
1
  (function() {
2
2
  {{#if addPreRendering}}
3
3
  {{#unless supportShadowDomInPreRendering}}
4
- const PRERENDER_TIMEOUT = 30_000; // 30s
5
- const PRERENDER_CHECK_INTERVAL = 300; // 300ms
6
- const preRenderedRootConfig = [
7
- // TODO: adjust/replace this exemplary list
8
- {
9
- selector: "body > #app, #speed-kit-pre-rendered-app",
10
- detectChanges: [
11
- {
12
- // header area
13
- find: "#page-root > div > .aem-container > div:nth-of-type(1)",
14
- detectChanges: [
15
- // main categories
16
- {
17
- find: 'button[id^="menu-button"] p',
18
- compare: ["text"],
19
- },
20
- // logo
21
- {
22
- find: "img[src]",
23
- compare: ["src"],
24
- },
25
- ],
26
- },
27
- ],
28
- },
29
- ];
4
+ const PRERENDER_TIMEOUT = 30_000; // 30s
5
+ const PRERENDER_CHECK_INTERVAL = 300; // 300ms
6
+ const preRenderedRootConfig = [
7
+ // TODO: adjust/replace this exemplary list
8
+ {
9
+ selector: "body > #app, #speed-kit-pre-rendered-app",
10
+ detectChanges: [
11
+ {
12
+ // header area
13
+ find: "#page-root > div > .aem-container > div:nth-of-type(1)",
14
+ detectChanges: [
15
+ // main categories
16
+ {
17
+ find: 'button[id^="menu-button"] p',
18
+ compare: ["text"],
19
+ },
20
+ // logo
21
+ {
22
+ find: "img[src]",
23
+ compare: ["src"],
24
+ },
25
+ ],
26
+ },
27
+ ],
28
+ },
29
+ ];
30
+
30
31
  {{/unless}}
31
32
  {{/if}}
32
33
  /**
@@ -46,23 +47,28 @@
46
47
  {{/if}}
47
48
 
48
49
  blocks: [
49
- // TODO: adjust/replace this exemplary list
50
50
  {{#if addPreRendering}}
51
51
  {{#unless supportShadowDomInPreRendering}}
52
- ...preRenderedRootConfig.map((config) => {
53
- return {
54
- selector: config.selector,
55
- merge: (localBlock, remoteBlock) => {
56
- handlePreRenderBlock(localBlock, remoteBlock);
57
- },
58
- detectChanges: false,
59
- };
60
- }),
52
+ ...preRenderedRootConfig.map((config) => {
53
+ return {
54
+ selector: config.selector,
55
+ merge: (localBlock, remoteBlock) => {
56
+ handlePreRenderBlock(localBlock, remoteBlock);
57
+ },
58
+ detectChanges: false,
59
+ };
60
+ }),
61
+
61
62
  {{/unless}}
62
63
  {{/if}}
64
+ // TODO: adjust/replace this exemplary list
63
65
 
64
66
  {
67
+ {{#if addPreRendering}}
68
+ selector: '#main',
69
+ {{else}}
65
70
  selector: 'body',
71
+ {{/if}}
66
72
  detectChanges: [
67
73
  // Main Headline:
68
74
  {
@@ -93,19 +99,28 @@
93
99
  // Shopify specific:
94
100
  {
95
101
  selector: "#shopify-section-announcement-bar",
102
+ {{#unless addPreRendering}}
96
103
  merge: false, // TODO: remove if body is not the main block
104
+ {{/unless}}
97
105
  detectChanges: [{
98
106
  find: ".announcement-bar--wrapper",
99
107
  compare: ["text"],
100
108
  }],
101
109
  },
102
110
  // Cover all the other high-level Shopify sections:
111
+ {{#if addPreRendering}}
112
+ {
113
+ selector: "body > .shopify-section[id]",
114
+ idAttribute: "id",
115
+ },
116
+ {{else}}
103
117
  // TODO: activate if body is not the main block
104
118
  // {
105
119
  // selector: "body > .shopify-section[id]",
106
120
  // idAttribute: "id",
107
121
  // },
108
122
  {{/if}}
123
+ {{/if}}
109
124
  {{#if isPlentymarkets}}
110
125
 
111
126
  // Plentymarkets specific:
@@ -712,5 +712,5 @@
712
712
  ]
713
713
  }
714
714
  },
715
- "version": "2.53.0"
715
+ "version": "2.53.1"
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.53.0",
4
+ "version": "2.53.1",
5
5
  "author": {
6
6
  "name": "Baqend.com",
7
7
  "email": "info@baqend.com"