@speedkit/cli 2.78.0 → 2.80.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.80.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v2.79.0...v2.80.0) (2025-02-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **wizard:** add ssr default container as prerender so its not removed and body as db can be used ([3c4702f](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/3c4702fa13aad2619a6c6c5266de4abc53014676))
|
|
7
|
+
* **wizard:** extend ssr handling by handling customElements better, remove unneeded code ([f686e1a](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/f686e1aed720351375f3f834d3797ef573e87cf7))
|
|
8
|
+
|
|
9
|
+
# [2.79.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v2.78.0...v2.79.0) (2025-02-12)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* **customer-config:** add blacklist block for CORS image domains ([78a8802](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/78a8802f6f91496c52ac16d3c808786ea0426eb1))
|
|
15
|
+
|
|
1
16
|
# [2.78.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v2.77.0...v2.78.0) (2025-02-12)
|
|
2
17
|
|
|
3
18
|
|
package/README.md
CHANGED
|
@@ -389,12 +389,16 @@ export const post = async (db, req, res) => {
|
|
|
389
389
|
*/
|
|
390
390
|
async function waitForCallback() {
|
|
391
391
|
const undefinedElements = document.querySelectorAll(":not(:defined)");
|
|
392
|
+
// need to be defined here as they are sent to the lambda function
|
|
393
|
+
const customElementNames = [
|
|
394
|
+
// TODO add correct custom element names (find them by executing document.querySelectorAll(":not(:defined)"))
|
|
395
|
+
];
|
|
392
396
|
|
|
393
397
|
const promises = [...undefinedElements]
|
|
394
|
-
.filter((
|
|
395
|
-
.map((
|
|
398
|
+
.filter((element) => customElementNames.some((name) => element.localName.includes(name)))
|
|
399
|
+
.map((element) => {
|
|
396
400
|
// eslint-disable-next-line no-undef
|
|
397
|
-
return customElements.whenDefined(
|
|
401
|
+
return customElements.whenDefined(element.localName);
|
|
398
402
|
});
|
|
399
403
|
|
|
400
404
|
return await Promise.race([
|
|
@@ -499,7 +503,6 @@ export const post = async (db, req, res) => {
|
|
|
499
503
|
function walkPreRenderedElements(document) {
|
|
500
504
|
const customShadowElements = getCustomShadowElements(document);
|
|
501
505
|
walkElements(customShadowElements, (element) => {
|
|
502
|
-
addStaticContextForPrerenderedElements(element);
|
|
503
506
|
// TODO extend if shadow-doms should be modified, as access to the shadow dom is not possible via querySelectors from the outside
|
|
504
507
|
});
|
|
505
508
|
}
|
|
@@ -520,21 +523,6 @@ export const post = async (db, req, res) => {
|
|
|
520
523
|
}
|
|
521
524
|
});
|
|
522
525
|
}
|
|
523
|
-
|
|
524
|
-
/**
|
|
525
|
-
* Adds static context for prerendered elements.
|
|
526
|
-
*
|
|
527
|
-
* @param {Element} element The element to add static context for.
|
|
528
|
-
*/
|
|
529
|
-
function addStaticContextForPrerenderedElements(element) {
|
|
530
|
-
if (
|
|
531
|
-
"name" in element &&
|
|
532
|
-
element.name !== undefined &&
|
|
533
|
-
element.name.startsWith("{{shadowDomCustomElementPrefix}}")
|
|
534
|
-
) {
|
|
535
|
-
element.setAttribute("data-sk-static", "1");
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
526
|
{{else}}
|
|
539
527
|
{{/if}}
|
|
540
528
|
{{/if}}
|
|
@@ -10,16 +10,14 @@
|
|
|
10
10
|
// keep aligned with DocumentHandler's config.ignoreAssets
|
|
11
11
|
],
|
|
12
12
|
},
|
|
13
|
+
// ssr container
|
|
14
|
+
prerendered: [{ selector: "body > .speed-kit-shadow-app-root" }],
|
|
13
15
|
{{/if}}
|
|
14
16
|
|
|
15
17
|
blocks: [
|
|
16
18
|
// TODO: adjust/replace this exemplary list
|
|
17
19
|
{
|
|
18
|
-
{{#if addPreRendering}}
|
|
19
|
-
selector: ".prerendered-top-level-element",
|
|
20
|
-
{{else}}
|
|
21
20
|
selector: "body",
|
|
22
|
-
{{/if}}
|
|
23
21
|
detectChanges: [
|
|
24
22
|
// Main Headline:
|
|
25
23
|
{
|
|
@@ -72,19 +70,12 @@
|
|
|
72
70
|
}],
|
|
73
71
|
},
|
|
74
72
|
// Cover all the other high-level Shopify sections:
|
|
75
|
-
{{#if addPreRendering}}
|
|
76
|
-
{
|
|
77
|
-
selector: "body > .shopify-section[id]",
|
|
78
|
-
idAttribute: "id",
|
|
79
|
-
},
|
|
80
|
-
{{else}}
|
|
81
73
|
// TODO: activate if body is not the main block
|
|
82
74
|
// {
|
|
83
75
|
// selector: "body > .shopify-section[id]",
|
|
84
76
|
// idAttribute: "id",
|
|
85
77
|
// },
|
|
86
78
|
{{/if}}
|
|
87
|
-
{{/if}}
|
|
88
79
|
{{#if isPlentymarkets}}
|
|
89
80
|
|
|
90
81
|
// Plentymarkets specific:
|
package/oclif.manifest.json
CHANGED