@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 +7 -0
- package/README.md +1 -1
- package/dist/services/integration-api/handler/install-resource-handler.d.ts +0 -7
- package/dist/services/integration-api/handler/install-resource-handler.js +1 -16
- package/dist/services/onboarding/config-renderer/speed-kit-install-context.d.ts +1 -0
- package/dist/services/onboarding/config-renderer/speed-kit-install-context.js +11 -3
- package/dist/services/onboarding/onboarding-model.js +2 -1
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
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
|
@@ -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
|
-
|
|
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.
|
|
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 = {
|
package/oclif.manifest.json
CHANGED