@speedkit/cli 2.91.0 → 2.92.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 +14 -0
- package/README.md +1 -1
- package/dist/services/customer-config/templates/config_loadHandler.js.hbs +0 -60
- package/dist/services/document-handler-runtime/server/document-handler-response.d.ts +1 -0
- package/dist/services/document-handler-runtime/server/document-handler-response.js +3 -0
- package/dist/services/integration-api/validator/customer-config-validator.d.ts +1 -0
- package/dist/services/integration-api/validator/customer-config-validator.js +8 -0
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [2.92.1](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v2.92.0...v2.92.1) (2025-07-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **configFileValidation:** check config_customer.origins for spaces ([fe5aaf1](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/fe5aaf1755e8fc7456e72244b2f7eeacbf92943c))
|
|
7
|
+
|
|
8
|
+
# [2.92.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v2.91.0...v2.92.0) (2025-07-22)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **onboarding:** support setHeader in config_documentHandler ([b772fa2](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/b772fa24573c04af0e3e4c4f06bf115d28364f25))
|
|
14
|
+
|
|
1
15
|
# [2.91.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v2.90.0...v2.91.0) (2025-07-08)
|
|
2
16
|
|
|
3
17
|
|
package/README.md
CHANGED
|
@@ -41,59 +41,6 @@ import { PredictivePreloading } from 'predictive-preloading/predictivePreloading
|
|
|
41
41
|
}),
|
|
42
42
|
{{/if}}
|
|
43
43
|
|
|
44
|
-
{{#if addPreRendering}}
|
|
45
|
-
{
|
|
46
|
-
key: "isPreRendered",
|
|
47
|
-
type: "PiDimension",
|
|
48
|
-
on: "load",
|
|
49
|
-
set: function () {
|
|
50
|
-
return !!document.querySelector(".speed-kit-pre-rendered");
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
on: onPrerenderReady,
|
|
55
|
-
track: function (controller, custom, event) {
|
|
56
|
-
var measure = performance.measure("sk-prerender-observe-runtime", {
|
|
57
|
-
start: "sk-prerender-observe-start",
|
|
58
|
-
end: "sk-prerender-observe-end",
|
|
59
|
-
});
|
|
60
|
-
var timing = {
|
|
61
|
-
start: measure.startTime,
|
|
62
|
-
duration: measure.duration,
|
|
63
|
-
url: window.location.href,
|
|
64
|
-
element: event?.detail?.element,
|
|
65
|
-
};
|
|
66
|
-
controller.trackCustomEvent(
|
|
67
|
-
"skPrerenderReady",
|
|
68
|
-
JSON.stringify(timing),
|
|
69
|
-
timing.duration,
|
|
70
|
-
);
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
on: onPrerenderReady,
|
|
75
|
-
track: function (controller) {
|
|
76
|
-
var measure = performance.measure(
|
|
77
|
-
"sk-prerender-observe-change-detection",
|
|
78
|
-
{
|
|
79
|
-
start: "sk-prerender-change-detection-start",
|
|
80
|
-
end: "sk-prerender-change-detection-end",
|
|
81
|
-
},
|
|
82
|
-
);
|
|
83
|
-
var timing = {
|
|
84
|
-
start: measure.startTime,
|
|
85
|
-
duration: measure.duration,
|
|
86
|
-
url: window.location.href,
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
controller.trackCustomEvent(
|
|
90
|
-
"skPrerenderChangeDetection",
|
|
91
|
-
JSON.stringify(timing),
|
|
92
|
-
timing.duration,
|
|
93
|
-
);
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
{{/if}}
|
|
97
44
|
{
|
|
98
45
|
key: 'language',
|
|
99
46
|
type: 'SessionDimension',
|
|
@@ -623,13 +570,6 @@ import { PredictivePreloading } from 'predictive-preloading/predictivePreloading
|
|
|
623
570
|
blacklistIfLoggedIn();
|
|
624
571
|
});
|
|
625
572
|
{{/if}}
|
|
626
|
-
{{#if addPreRendering}}
|
|
627
|
-
function onPrerenderReady(cb, controller) {
|
|
628
|
-
document.addEventListener("speed-kit-prerender-ready", (event) => {
|
|
629
|
-
cb(controller, event);
|
|
630
|
-
});
|
|
631
|
-
}
|
|
632
|
-
{{/if}}
|
|
633
573
|
|
|
634
574
|
{{#if hasSoftNavigations}}
|
|
635
575
|
new PredictivePreloading({
|
|
@@ -5,6 +5,7 @@ export declare class DocumentHandlerResponse {
|
|
|
5
5
|
body: string;
|
|
6
6
|
resolve: (resolvable: unknown) => void;
|
|
7
7
|
header(key: string, value: string): void;
|
|
8
|
+
setHeader(key: string, value: string): void;
|
|
8
9
|
set(key: string, value: string): void;
|
|
9
10
|
send(html: string): void;
|
|
10
11
|
}
|
|
@@ -25,6 +25,9 @@ class CustomerConfigValidator {
|
|
|
25
25
|
if (this.hasPathCheck(config.origins)) {
|
|
26
26
|
throw new origin_error_1.default("There was at least one origin having a path. Origin must have the following format: https://domain.tld");
|
|
27
27
|
}
|
|
28
|
+
if (this.containsWhiteSpace(config.origins)) {
|
|
29
|
+
throw new origin_error_1.default(`There was at least one origin having spaces. Origin must have the following format: "https://domain.tld" without spaces`);
|
|
30
|
+
}
|
|
28
31
|
}
|
|
29
32
|
checkIfDuplicateExists(origins) {
|
|
30
33
|
return new Set(origins).size !== origins.length;
|
|
@@ -39,5 +42,10 @@ class CustomerConfigValidator {
|
|
|
39
42
|
const withoutProtocol = origins.filter((origin) => !origin.startsWith("http"));
|
|
40
43
|
return withoutProtocol.length > 0;
|
|
41
44
|
}
|
|
45
|
+
containsWhiteSpace(origins) {
|
|
46
|
+
return origins.some((origin) => {
|
|
47
|
+
return /\s/.test(origin);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
42
50
|
}
|
|
43
51
|
exports.default = CustomerConfigValidator;
|
package/oclif.manifest.json
CHANGED