@speedkit/cli 3.42.0 → 3.43.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 +9 -0
- package/README.md +1 -1
- package/dist/helpers/evaluate-speed-kit-config.js +5 -1
- package/dist/services/onboarding/fetch-events/customer-service-worker-js.d.ts +1 -1
- package/dist/services/onboarding/fetch-events/customer-service-worker-js.js +7 -1
- package/dist/services/onboarding/onboarding-model.js +8 -2
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
# [3.43.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v3.42.0...v3.43.0) (2026-04-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **deploy-checks:** polyfill setTimeout and addEventListener in sandboxed config evaluation ([4dac3f0](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/4dac3f04fab2d2f60077a5a301aefef016d57b0f))
|
|
7
|
+
* **onboarding:** hide Chrome automation signals to avoid WAF blocks ([6065442](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/60654424e7a980fd4f8858bdb656ab482b0b9ef1))
|
|
8
|
+
* **onboarding:** serve empty service worker for ?empty=1 requests ([403ad50](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/403ad50bfe953868e63b9a2cd101503fdd1b0c56))
|
|
9
|
+
|
|
1
10
|
# [3.42.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v3.41.0...v3.42.0) (2026-04-23)
|
|
2
11
|
|
|
3
12
|
|
package/README.md
CHANGED
|
@@ -44,7 +44,10 @@ function buildBrowserMock(origin, app) {
|
|
|
44
44
|
serviceWorkerUrl: "",
|
|
45
45
|
screen: { width: 0, height: 0 },
|
|
46
46
|
devicePixelRatio: 1,
|
|
47
|
-
setTimeout: (
|
|
47
|
+
setTimeout: () => { },
|
|
48
|
+
clearTimeout: () => { },
|
|
49
|
+
addEventListener: () => { },
|
|
50
|
+
removeEventListener: () => { },
|
|
48
51
|
navigator: {
|
|
49
52
|
userAgent: "",
|
|
50
53
|
connection: {},
|
|
@@ -61,6 +64,7 @@ function buildBrowserMock(origin, app) {
|
|
|
61
64
|
querySelectorAll: () => { },
|
|
62
65
|
createElement: () => { },
|
|
63
66
|
addEventListener: () => { },
|
|
67
|
+
removeEventListener: () => { },
|
|
64
68
|
head: {},
|
|
65
69
|
body: {},
|
|
66
70
|
};
|
|
@@ -10,5 +10,5 @@ export declare class CustomerServiceWorkerJs implements FetchRequestPausedEventH
|
|
|
10
10
|
private customerConfig;
|
|
11
11
|
get patterns(): Protocol.Fetch.RequestPattern[];
|
|
12
12
|
constructor(customerConfig: CustomerConfig);
|
|
13
|
-
handle(): Promise<Partial<Protocol.Fetch.FulfillRequestRequest>>;
|
|
13
|
+
handle(event: Protocol.Fetch.RequestPausedEvent): Promise<Partial<Protocol.Fetch.FulfillRequestRequest>>;
|
|
14
14
|
}
|
|
@@ -22,7 +22,13 @@ class CustomerServiceWorkerJs {
|
|
|
22
22
|
constructor(customerConfig) {
|
|
23
23
|
this.customerConfig = customerConfig;
|
|
24
24
|
}
|
|
25
|
-
async handle() {
|
|
25
|
+
async handle(event) {
|
|
26
|
+
// When the SW is registered with `?empty=1`, the caller wants a no-op
|
|
27
|
+
// service worker on that scope — serve an empty script instead of the
|
|
28
|
+
// skonboarding wrapper that imports Speed Kit's sw.js.
|
|
29
|
+
if (new URL(event.request.url).searchParams.get("empty") === "1") {
|
|
30
|
+
return new baqend_response_1.BaqendResponse("// skonboarding empty sw", "text/javascript; charset=utf-8");
|
|
31
|
+
}
|
|
26
32
|
const wrapperSwCode = `importScripts(\`https://${this.customerConfig.appDomain}/v1/speedkit/sw.js\${location.search}\`); // skonboarding`;
|
|
27
33
|
return new baqend_response_1.BaqendResponse(wrapperSwCode, "text/javascript; charset=utf-8");
|
|
28
34
|
}
|
|
@@ -9,8 +9,11 @@ const DEFAULT_BROWSER_ARGS = [
|
|
|
9
9
|
"--enable-features=Translate,NetworkService",
|
|
10
10
|
"--no-first-run",
|
|
11
11
|
"--no-default-browser-check",
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
// Hides the `navigator.webdriver` fingerprint so customer CDN/WAF rules don't treat the session as a bot.
|
|
13
|
+
"--disable-blink-features=AutomationControlled",
|
|
14
|
+
// Signals a test environment so Chrome suppresses the "unsupported command-line flag" infobar
|
|
15
|
+
// triggered by the flag above. Value is arbitrary and only used as an identifier.
|
|
16
|
+
"--test-type=speed-kit-cli",
|
|
14
17
|
];
|
|
15
18
|
exports.BROWSER_EVENTS = {
|
|
16
19
|
DISCONNECTED: "disconnected",
|
|
@@ -91,6 +94,9 @@ class BrowserContext {
|
|
|
91
94
|
headless: this.headless,
|
|
92
95
|
executablePath: this.chromePath,
|
|
93
96
|
args: this.browserArgs,
|
|
97
|
+
// Strip Puppeteer's default `--enable-automation` so Chrome doesn't show
|
|
98
|
+
// the "Chrome is being controlled by automated test software" infobar.
|
|
99
|
+
ignoreDefaultArgs: ["--enable-automation"],
|
|
94
100
|
};
|
|
95
101
|
if (this.userConfig?.chromeExtensionPaths) {
|
|
96
102
|
if (this.isChromeBrowser()) {
|
package/oclif.manifest.json
CHANGED