@speedkit/cli 2.42.0 → 2.42.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.42.1](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v2.42.0...v2.42.1) (2024-07-19)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **predictivePreloading:** set correct paths to predictivePreloading-module ([552f83a](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/552f83a16dfd8b546553623081f662188a0081d9))
7
+
1
8
  # [2.42.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v2.41.4...v2.42.0) (2024-07-17)
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.42.0 linux-x64 node-v20.15.1
24
+ @speedkit/cli/2.42.1 linux-x64 node-v20.15.1
25
25
  $ sk --help [COMMAND]
26
26
  USAGE
27
27
  $ sk COMMAND
@@ -23,11 +23,4 @@ export default class InstallResourceHandler extends FileHandler {
23
23
  * @private
24
24
  */
25
25
  private getFileContent;
26
- /**
27
- *
28
- *
29
- * @param content
30
- * @private
31
- */
32
- private replaceWithDebugPackage;
33
26
  }
@@ -4,7 +4,6 @@ const tslib_1 = require("tslib");
4
4
  const file_handler_1 = tslib_1.__importDefault(require("./file-handler"));
5
5
  const integration_api_model_1 = require("../integration-api-model");
6
6
  const application_error_1 = tslib_1.__importDefault(require("../../error-handling/error/application-error"));
7
- const PREDICTIVE_PRELOADING = "predictive-preloading";
8
7
  class InstallResourceHandler extends file_handler_1.default {
9
8
  allowedFiles = [
10
9
  "config_SpeedKit",
@@ -48,21 +47,7 @@ class InstallResourceHandler extends file_handler_1.default {
48
47
  * @private
49
48
  */
50
49
  async getFileContent(fileName, filePath) {
51
- const content = await this.fileReader.getContent(filePath);
52
- if (fileName === "config_loadHandler" &&
53
- content.includes(PREDICTIVE_PRELOADING)) {
54
- return this.replaceWithDebugPackage(content);
55
- }
56
- return content;
57
- }
58
- /**
59
- *
60
- *
61
- * @param content
62
- * @private
63
- */
64
- replaceWithDebugPackage(content) {
65
- return content.replace(PREDICTIVE_PRELOADING, `${PREDICTIVE_PRELOADING}.debug.min.js`);
50
+ return await this.fileReader.getContent(filePath);
66
51
  }
67
52
  }
68
53
  exports.default = InstallResourceHandler;
@@ -10,6 +10,7 @@ export declare class SpeedKitInstallContext {
10
10
  private isLocalRuntime;
11
11
  constructor(customerConfig: CustomerConfig, configName: string, files: FileListInterface, bundler: BundleService, skTemplate: InstallSpeedKitJsTemplate, isLocalRuntime?: boolean);
12
12
  getSpeedKitInstallJs(): Promise<string>;
13
+ private prepareConfigLoadHandler;
13
14
  private getConfigSpeedKit;
14
15
  /**
15
16
  * Fetches and returns the latest dynamic fetcher from the code repository. If a new version is available online it is
@@ -36,9 +36,7 @@ class SpeedKitInstallContext {
36
36
  return this.bundler.bundle({
37
37
  basePaths: IMPORT_PATHS,
38
38
  entryPoints: {
39
- "rum.js": this.files
40
- .getByName(files_1.INTEGRATION_FILES.CONFIG.LOAD_HANDLER)
41
- .getContent(),
39
+ "rum.js": this.prepareConfigLoadHandler(),
42
40
  "config.js": configJs,
43
41
  "loader.js": this.files
44
42
  .getByName(files_1.INTEGRATION_FILES.CUSTOM.LOADER)
@@ -51,6 +49,16 @@ class SpeedKitInstallContext {
51
49
  },
52
50
  });
53
51
  }
52
+ prepareConfigLoadHandler() {
53
+ const configFileContent = this.files
54
+ .getByName(files_1.INTEGRATION_FILES.CONFIG.LOAD_HANDLER)
55
+ .getContent();
56
+ if (!configFileContent.includes("predictive-preloading/predictivePreloading.min.js")) {
57
+ return configFileContent;
58
+ }
59
+ // automatically use debug package for sk onboarding
60
+ return configFileContent.replace("predictive-preloading/predictivePreloading.min.js", "predictive-preloading/predictivePreloading.debug.min.js");
61
+ }
54
62
  getConfigSpeedKit() {
55
63
  const configString = this.files
56
64
  .getByName(files_1.INTEGRATION_FILES.CONFIG.SPEED_KIT)
@@ -4,8 +4,9 @@ exports.SpeedKitInstallRegex = exports.USER_AGENT = exports.OnboardingContext =
4
4
  const core_1 = require("@oclif/core");
5
5
  const cli_parameters_1 = require("../../models/cli-parameters");
6
6
  const DEFAULT_BROWSER_ARGS = [
7
- "--enable-features=NetworkService",
7
+ "--enable-features=Translate,NetworkService",
8
8
  "--no-first-run",
9
+ "--no-default-browser-check",
9
10
  "--disable-infobars",
10
11
  ];
11
12
  exports.BROWSER_EVENTS = {
@@ -712,5 +712,5 @@
712
712
  ]
713
713
  }
714
714
  },
715
- "version": "2.42.0"
715
+ "version": "2.42.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.42.0",
4
+ "version": "2.42.1",
5
5
  "author": {
6
6
  "name": "Baqend.com",
7
7
  "email": "info@baqend.com"