@speedkit/cli 4.41.2 → 4.42.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,10 @@
1
+ # [4.42.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v4.41.2...v4.42.0) (2026-10-07)
2
+
3
+
4
+ ### Features
5
+
6
+ * **onboarding:** always run the documentHandler locally ([03702f0](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/03702f0a872a7dd3563100b216526ebf87c9fea3))
7
+
1
8
  ## [4.41.2](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v4.41.1...v4.41.2) (2026-10-06)
2
9
 
3
10
 
package/README.md CHANGED
@@ -727,7 +727,7 @@ Start a local dev environment for building and testing the Speed Kit configurati
727
727
 
728
728
  ```
729
729
  USAGE
730
- $ sk onboarding [CUSTOMERPATH] [-c <value>] [-t] [-d <value>] [-l] [-p] [--debugPort <value>] [-v] [-s]
730
+ $ sk onboarding [CUSTOMERPATH] [-c <value>] [-t] [-d <value>] [-p] [--debugPort <value>] [-v] [-s]
731
731
  [--headless] [--browse] [--browserFetch]
732
732
 
733
733
  ARGUMENTS
@@ -736,7 +736,6 @@ ARGUMENTS
736
736
  FLAGS
737
737
  -c, --configName=<value> [default: production] The costumer config name
738
738
  -d, --domain=<value> Startup domain (optional)
739
- -l, --local Run with local documentHandler
740
739
  -p, --debuggingPort Enable remote debugging port (disables speculation rules/prerendering)
741
740
  -s, --ignoreContentSecurityPolicy Removes header/meta "content-security-policy" for origin-responses
742
741
  -t, --useTestConfig Override app with configured testApp
@@ -7,10 +7,10 @@ export declare class SpeedKitInstallContext {
7
7
  private files;
8
8
  private bundler;
9
9
  private skTemplate;
10
- private isLocalRuntime;
11
- constructor(customerConfig: CustomerConfig, configName: string, files: FileListInterface, bundler: BundleService, skTemplate: InstallSpeedKitJsTemplate, isLocalRuntime?: boolean);
10
+ constructor(customerConfig: CustomerConfig, configName: string, files: FileListInterface, bundler: BundleService, skTemplate: InstallSpeedKitJsTemplate);
12
11
  getSpeedKitInstallJs(): Promise<string>;
13
12
  private prepareConfigLoadHandler;
13
+ /** The Speed Kit config, with `delayRacedOrigin` set to 100 ms for the local documentHandler. */
14
14
  private getConfigSpeedKit;
15
15
  /**
16
16
  * Fetches and returns the latest dynamic fetcher from the code repository. If a new version is available online it is
@@ -11,14 +11,12 @@ export class SpeedKitInstallContext {
11
11
  files;
12
12
  bundler;
13
13
  skTemplate;
14
- isLocalRuntime;
15
- constructor(customerConfig, configName, files, bundler, skTemplate, isLocalRuntime = false) {
14
+ constructor(customerConfig, configName, files, bundler, skTemplate) {
16
15
  this.customerConfig = customerConfig;
17
16
  this.configName = configName;
18
17
  this.files = files;
19
18
  this.bundler = bundler;
20
19
  this.skTemplate = skTemplate;
21
- this.isLocalRuntime = isLocalRuntime;
22
20
  }
23
21
  async getSpeedKitInstallJs() {
24
22
  const configJs = this.skTemplate.render({
@@ -64,13 +62,11 @@ export class SpeedKitInstallContext {
64
62
  // `import debugPreloading from "predictive-preloading/predictivePreloading.dev.js"`,
65
63
  // );
66
64
  }
65
+ /** The Speed Kit config, with `delayRacedOrigin` set to 100 ms for the local documentHandler. */
67
66
  getConfigSpeedKit() {
68
67
  const configString = this.files
69
68
  .getByName(INTEGRATION_FILES.CONFIG.SPEED_KIT)
70
69
  .getContent();
71
- if (!this.isLocalRuntime) {
72
- return configString;
73
- }
74
70
  if (configString.includes("delayRacedOrigin")) {
75
71
  return configString.replace(/delayRacedOrigin:[^\d,|](\d*)[^,]*,/, (config, value) => {
76
72
  return config.replace(value, "100");
@@ -20,7 +20,7 @@ export declare class FileWatcher {
20
20
  setCacheRefresher(cacheRefresher: VirtualOrestesApp): void;
21
21
  /**
22
22
  * Drop the dh-cache after a config change. When a cache refresher is wired
23
- * (local mode) the currently open page is re-warmed in the background so it
23
+ * the currently open page is re-warmed in the background so it
24
24
  * stays instant and fresh; otherwise the cache is simply cleared.
25
25
  *
26
26
  * @param page the browser page whose current url should be re-warmed
@@ -12,8 +12,8 @@ export class FileWatcher {
12
12
  documentHandler;
13
13
  browserContext;
14
14
  cache;
15
- // Set in local mode (see OnboardingServiceFactory). When present, config
16
- // changes re-warm the dh-cache in the background instead of just clearing it.
15
+ // Set by OnboardingServiceFactory. When present, config changes re-warm the
16
+ // dh-cache in the background instead of just clearing it.
17
17
  cacheRefresher;
18
18
  constructor(cli, customerConfig, files, documentHandler, browserContext, cache) {
19
19
  this.cli = cli;
@@ -28,7 +28,7 @@ export class FileWatcher {
28
28
  }
29
29
  /**
30
30
  * Drop the dh-cache after a config change. When a cache refresher is wired
31
- * (local mode) the currently open page is re-warmed in the background so it
31
+ * the currently open page is re-warmed in the background so it
32
32
  * stays instant and fresh; otherwise the cache is simply cleared.
33
33
  *
34
34
  * @param page the browser page whose current url should be re-warmed
@@ -136,7 +136,7 @@ export interface SkCliSessionInfo {
136
136
  swPath: string;
137
137
  /** The customer config's `scope`: the URL prefix that service worker controls. */
138
138
  scope: string;
139
- /** `--local`: the documentHandler is built and served from this machine. */
139
+ /** The documentHandler is built and served from this machine. Always true: the panel still reads it. */
140
140
  local: boolean;
141
141
  /** The customer config's `forceInstall`: Speed Kit is installed on every page. */
142
142
  forceInstall: boolean;
@@ -23,7 +23,6 @@ export interface OnboardingServiceBuildContextValues extends CommandContextValue
23
23
  readonly customerPath?: string;
24
24
  readonly configName: string;
25
25
  readonly domain?: string;
26
- readonly local: boolean;
27
26
  readonly ignoreContentSecurityPolicy: boolean;
28
27
  /** Where the CLI is installed, for the templates it ships. */
29
28
  readonly cliPath: string;
@@ -16,10 +16,15 @@ const flags = {
16
16
  char: "d",
17
17
  description: "Startup domain (optional)",
18
18
  }),
19
+ // Accepted so that existing scripts keep working. The documentHandler always runs locally.
20
+ // No default: oclif prints the deprecation for a flag that has a value, passed or not.
19
21
  local: Flags.boolean({
20
22
  char: "l",
21
- default: false,
22
- description: "Run with local documentHandler",
23
+ hidden: true,
24
+ deprecated: {
25
+ message: "The flag -l/--local has no effect: onboarding always runs the documentHandler locally.",
26
+ },
27
+ description: "Deprecated: the documentHandler always runs locally",
23
28
  }),
24
29
  debuggingPort: Flags.boolean({
25
30
  char: "p",
@@ -63,7 +68,6 @@ export class OnboardingServiceBuildContext extends Context() {
63
68
  customerPath: parsedArgs.customerPath,
64
69
  configName: parsedFlags.configName,
65
70
  domain: parsedFlags["domain"],
66
- local: parsedFlags.local,
67
71
  ignoreContentSecurityPolicy: parsedFlags.ignoreContentSecurityPolicy,
68
72
  cliPath: environment.oclif.root,
69
73
  verboseLevel: parsedFlags.verboseLevel,
@@ -152,7 +152,7 @@ export class OnboardingServiceFactory {
152
152
  }), files).buildDocumentHandlerServer();
153
153
  const bundler = new BundleServiceFactory(this.context.customerPath).buildService();
154
154
  const skTemplate = new InstallSpeedKitJsTemplate();
155
- const speedKitInstallContext = new SpeedKitInstallContext(customerConfig, this.context.configName, files, bundler, skTemplate, this.context.local);
155
+ const speedKitInstallContext = new SpeedKitInstallContext(customerConfig, this.context.configName, files, bundler, skTemplate);
156
156
  await this.buildInstallResource(speedKitInstallContext, files, cli);
157
157
  const { browserContext, browserExtensions } = await this.prepareBrowser(domainToStart, customerConfig.chromeFlags);
158
158
  const fileWatcher = new FileWatcher(cli, customerConfig, files, documentHandler, browserContext, cache);
@@ -253,12 +253,10 @@ export class OnboardingServiceFactory {
253
253
  speedKitServiceWorkerJs,
254
254
  new DashboardRequest(new Dashboard(customerConfig, parameterQueryBuilder, athenaClient, requestDiffService, new DiffAgainstCurrentPage(DiffService, documentHandler, crawler, cli), cache)),
255
255
  ];
256
- if (this.context.local) {
257
- const orestesApp = new VirtualOrestesApp(customerConfig, crawler, documentHandler, cache, cli, messageHandler, this.context.ignoreContentSecurityPolicy);
258
- // let config-file changes re-warm the dh-cache in the background
259
- fileWatcher.setCacheRefresher(orestesApp);
260
- handlers.push(new SpeedKitAssetRequest(customerConfig, orestesApp), new SpeedKitRumPiRequest(customerConfig, orestesApp));
261
- }
256
+ const orestesApp = new VirtualOrestesApp(customerConfig, crawler, documentHandler, cache, cli, messageHandler, this.context.ignoreContentSecurityPolicy);
257
+ // let config-file changes re-warm the dh-cache in the background
258
+ fileWatcher.setCacheRefresher(orestesApp);
259
+ handlers.push(new SpeedKitAssetRequest(customerConfig, orestesApp), new SpeedKitRumPiRequest(customerConfig, orestesApp));
262
260
  return new FetchEventHandler(handlers, customerConfig, cli, configApi);
263
261
  }
264
262
  async getSpeedKitServerConfig(configApi, cli) {
@@ -339,7 +337,7 @@ export class OnboardingServiceFactory {
339
337
  origins: customerConfig.origins ?? [],
340
338
  swPath: customerConfig.swPath,
341
339
  scope: customerConfig.scope,
342
- local: Boolean(this.context.local),
340
+ local: true,
343
341
  forceInstall: Boolean(customerConfig.forceInstall),
344
342
  proxy: proxy
345
343
  ? {
@@ -31,7 +31,6 @@ function buildContext(values = {}) {
31
31
  customerPath: undefined,
32
32
  configName: "production",
33
33
  domain: undefined,
34
- local: false,
35
34
  ignoreContentSecurityPolicy: false,
36
35
  cliPath: "/tmp",
37
36
  verboseLevel: false,
@@ -687,7 +687,11 @@
687
687
  },
688
688
  "local": {
689
689
  "char": "l",
690
- "description": "Run with local documentHandler",
690
+ "deprecated": {
691
+ "message": "The flag -l/--local has no effect: onboarding always runs the documentHandler locally."
692
+ },
693
+ "description": "Deprecated: the documentHandler always runs locally",
694
+ "hidden": true,
691
695
  "name": "local",
692
696
  "allowNo": false,
693
697
  "type": "boolean"
@@ -1761,5 +1765,5 @@
1761
1765
  ]
1762
1766
  }
1763
1767
  },
1764
- "version": "4.41.2"
1768
+ "version": "4.42.0"
1765
1769
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@speedkit/cli",
3
3
  "description": "Speed Kit CLI",
4
- "version": "4.41.2",
4
+ "version": "4.42.0",
5
5
  "author": {
6
6
  "name": "Baqend.com",
7
7
  "email": "info@baqend.com"