@speedkit/cli 3.1.0 → 3.1.2
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,18 @@
|
|
|
1
|
+
## [3.1.2](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v3.1.1...v3.1.2) (2025-08-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **onboarding:** resolvePath to broswserExecutable ([81a7744](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/81a7744bcc3920b78b09c6680862f774684866ce))
|
|
7
|
+
|
|
8
|
+
## [3.1.1](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v3.1.0...v3.1.1) (2025-08-11)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **onboarding:** resolvepath correctly ([1249efb](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/1249efb427b1b879f2fcde3b5155209530052000))
|
|
14
|
+
* **onboarding:** set correctPath for all useCases ([e445d29](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/e445d29415c9e6ff63ecfb5be0b137e6f9cac903))
|
|
15
|
+
|
|
1
16
|
# [3.1.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v3.0.0...v3.1.0) (2025-08-08)
|
|
2
17
|
|
|
3
18
|
|
package/README.md
CHANGED
|
@@ -39,6 +39,7 @@ export declare class BrowserContext {
|
|
|
39
39
|
readonly chromePath: string;
|
|
40
40
|
readonly browserDetails: string;
|
|
41
41
|
constructor(domain: string, chromeFlags?: string[], userConfig?: UserCliConfig, userAgent?: string);
|
|
42
|
+
private cleanPath;
|
|
42
43
|
private checkBrowserDetails;
|
|
43
44
|
private isChromeBrowser;
|
|
44
45
|
private getBrowserExtensionPath;
|
|
@@ -9,6 +9,7 @@ const node_child_process_1 = require("node:child_process");
|
|
|
9
9
|
const safe_1 = require("../../helpers/safe");
|
|
10
10
|
const application_error_1 = tslib_1.__importDefault(require("../error-handling/error/application-error"));
|
|
11
11
|
const node_fs_1 = require("node:fs");
|
|
12
|
+
const node_path_1 = require("node:path");
|
|
12
13
|
const DEFAULT_BROWSER_ARGS = [
|
|
13
14
|
"--enable-features=Translate,NetworkService",
|
|
14
15
|
"--no-first-run",
|
|
@@ -57,9 +58,9 @@ class BrowserContext {
|
|
|
57
58
|
this.userAgent = userAgent;
|
|
58
59
|
this.domain = domain;
|
|
59
60
|
this.chromeFlags = chromeFlags || [];
|
|
60
|
-
this.chromePath = userConfig.chromePath;
|
|
61
|
+
this.chromePath = (0, node_path_1.resolve)(userConfig.chromePath);
|
|
61
62
|
const browserArguments = DEFAULT_BROWSER_ARGS;
|
|
62
|
-
this.browserDetails = this.checkBrowserDetails(
|
|
63
|
+
this.browserDetails = this.checkBrowserDetails(this.chromePath);
|
|
63
64
|
if (userConfig?.chromeUserProfilePath) {
|
|
64
65
|
browserArguments.push(`--user-data-dir=${userConfig?.chromeUserProfilePath}`);
|
|
65
66
|
}
|
|
@@ -74,6 +75,9 @@ class BrowserContext {
|
|
|
74
75
|
...this.chromeFlags,
|
|
75
76
|
];
|
|
76
77
|
}
|
|
78
|
+
cleanPath(path) {
|
|
79
|
+
return path.trim().replaceAll(" ", "\\ ");
|
|
80
|
+
}
|
|
77
81
|
checkBrowserDetails(browserExecutablePath) {
|
|
78
82
|
if (!(0, node_fs_1.existsSync)(browserExecutablePath)) {
|
|
79
83
|
throw new application_error_1.default(`No executable found in ${browserExecutablePath}`, [
|
|
@@ -83,7 +87,7 @@ class BrowserContext {
|
|
|
83
87
|
]);
|
|
84
88
|
}
|
|
85
89
|
const result = (0, safe_1.safe)(() => {
|
|
86
|
-
return (0, node_child_process_1.execSync)(`${browserExecutablePath} --version`).toString();
|
|
90
|
+
return (0, node_child_process_1.execSync)(`${this.cleanPath(browserExecutablePath)} --version`).toString();
|
|
87
91
|
});
|
|
88
92
|
if (result.success === false) {
|
|
89
93
|
throw new application_error_1.default(result.error, [
|
package/oclif.manifest.json
CHANGED