@speedkit/cli 3.36.0 → 3.37.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 +7 -0
- package/README.md +4 -2
- package/dist/commands/onboarding.js +2 -2
- package/dist/services/onboarding/onboarding-model.d.ts +4 -2
- package/dist/services/onboarding/onboarding-model.js +13 -5
- package/dist/services/onboarding/onboarding-service-factory.js +5 -2
- package/oclif.manifest.json +7 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [3.37.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v3.36.0...v3.37.0) (2026-03-30)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **onboarding:** headless ([4f6e1b0](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/4f6e1b0c89861a2bf93027028081a6b7d664e9a8))
|
|
7
|
+
|
|
1
8
|
# [3.36.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v3.35.0...v3.36.0) (2026-03-27)
|
|
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/3.
|
|
24
|
+
@speedkit/cli/3.37.0 linux-x64 node-v20.20.2
|
|
25
25
|
$ sk --help [COMMAND]
|
|
26
26
|
USAGE
|
|
27
27
|
$ sk COMMAND
|
|
@@ -383,7 +383,7 @@ Start a local dev environment for building and testing the Speed Kit configurati
|
|
|
383
383
|
|
|
384
384
|
```
|
|
385
385
|
USAGE
|
|
386
|
-
$ sk onboarding CUSTOMERPATH [-c <value>] [-t] [-d <value>] [-l] [-p] [-v] [-s]
|
|
386
|
+
$ sk onboarding CUSTOMERPATH [-c <value>] [-t] [-d <value>] [-l] [-p] [-v] [-s] [--headless]
|
|
387
387
|
|
|
388
388
|
ARGUMENTS
|
|
389
389
|
CUSTOMERPATH The customer config path
|
|
@@ -396,6 +396,8 @@ FLAGS
|
|
|
396
396
|
-s, --ignoreContentSecurityPolicy Removes header/meta "content-security-policy" for origin-responses
|
|
397
397
|
-t, --useTestConfig Override app with configured testApp
|
|
398
398
|
-v, --verboseLevel Show all messages
|
|
399
|
+
--headless Run Chrome in headless mode (for CI environments). Implicitly enables remote
|
|
400
|
+
debugging port.
|
|
399
401
|
|
|
400
402
|
DESCRIPTION
|
|
401
403
|
Start a local dev environment for building and testing the Speed Kit configuration
|
|
@@ -13,8 +13,8 @@ class Onboarding extends core_1.Command {
|
|
|
13
13
|
`$ sk onboarding ${cli_parameters_1.CLIParametersExample.CustomerPath} -${cli_parameters_1.CLIParametersChar.ConfigName} ${cli_parameters_1.CLIParametersExample.ConfigName} -${cli_parameters_1.CLIParametersChar.Domain} ${cli_parameters_1.CLIParametersExample.Domain}`,
|
|
14
14
|
];
|
|
15
15
|
async run() {
|
|
16
|
-
const { args: { customerPath }, flags: { configName, domain, local, verboseLevel, ignoreContentSecurityPolicy, useTestConfig, debuggingPort, }, } = await this.parse(Onboarding);
|
|
17
|
-
const service = await new onboarding_1.OnboardingServiceFactory(new onboarding_1.OnboardingContext(customerPath, configName, domain, local, ignoreContentSecurityPolicy, this.config.root, verboseLevel, useTestConfig, debuggingPort), new cli_config_1.CliConfig(this.config).load(customerPath)).getService();
|
|
16
|
+
const { args: { customerPath }, flags: { configName, domain, local, verboseLevel, ignoreContentSecurityPolicy, useTestConfig, debuggingPort, headless, }, } = await this.parse(Onboarding);
|
|
17
|
+
const service = await new onboarding_1.OnboardingServiceFactory(new onboarding_1.OnboardingContext(customerPath, configName, domain, local, ignoreContentSecurityPolicy, this.config.root, verboseLevel, useTestConfig, debuggingPort, headless), new cli_config_1.CliConfig(this.config).load(customerPath)).getService();
|
|
18
18
|
await service.run();
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -37,9 +37,10 @@ export declare class BrowserContext {
|
|
|
37
37
|
readonly userConfig?: UserCliConfig;
|
|
38
38
|
userAgent?: string;
|
|
39
39
|
readonly debuggingPort: boolean;
|
|
40
|
+
readonly headless: boolean;
|
|
40
41
|
readonly browserArgs: string[];
|
|
41
42
|
readonly chromePath: string;
|
|
42
|
-
constructor(domain: string, browserVersionString?: string, chromeFlags?: string[], userConfig?: UserCliConfig, userAgent?: string, debuggingPort?: boolean);
|
|
43
|
+
constructor(domain: string, browserVersionString?: string, chromeFlags?: string[], userConfig?: UserCliConfig, userAgent?: string, debuggingPort?: boolean, headless?: boolean);
|
|
43
44
|
private isChromeBrowser;
|
|
44
45
|
private getBrowserExtensionPath;
|
|
45
46
|
getPuppeteerLaunchOptions(): Parameters<VanillaPuppeteer["launch"]>[0];
|
|
@@ -58,12 +59,13 @@ export declare class OnboardingContext {
|
|
|
58
59
|
readonly verboseLevel?: boolean;
|
|
59
60
|
readonly useTestConfig: boolean;
|
|
60
61
|
readonly debuggingPort: boolean;
|
|
62
|
+
readonly headless: boolean;
|
|
61
63
|
static flags: FlagInput;
|
|
62
64
|
readonly DEFAULT_DF_PATH = "https://www.baqend.com/speed-kit/latest/dynamic-fetcher.js";
|
|
63
65
|
readonly DEFAULT_DOCUMENT_HANDLER_PATH = "https://www.baqend.com/speed-kit-handler/latest/DocumentHandler.js";
|
|
64
66
|
readonly DEFAULT_SNIPPET_PATH = "https://www.baqend.com/speed-kit/latest/snippet.js";
|
|
65
67
|
readonly DEFAULT_SW_PATH = "https://www.baqend.com/speed-kit/latest/sw.js";
|
|
66
|
-
constructor(customerPath: string, configName: string, domain: string, local: boolean, ignoreContentSecurityPolicy: boolean, cliPath: string, verboseLevel?: boolean, useTestConfig?: boolean, debuggingPort?: boolean);
|
|
68
|
+
constructor(customerPath: string, configName: string, domain: string, local: boolean, ignoreContentSecurityPolicy: boolean, cliPath: string, verboseLevel?: boolean, useTestConfig?: boolean, debuggingPort?: boolean, headless?: boolean);
|
|
67
69
|
}
|
|
68
70
|
export type SpeedKitServerConfigAuthentication = {
|
|
69
71
|
password: string;
|
|
@@ -45,15 +45,17 @@ class BrowserContext {
|
|
|
45
45
|
userConfig;
|
|
46
46
|
userAgent;
|
|
47
47
|
debuggingPort;
|
|
48
|
+
headless;
|
|
48
49
|
browserArgs;
|
|
49
50
|
chromePath;
|
|
50
|
-
constructor(domain, browserVersionString = "unknown", chromeFlags, userConfig, userAgent, debuggingPort = false) {
|
|
51
|
+
constructor(domain, browserVersionString = "unknown", chromeFlags, userConfig, userAgent, debuggingPort = false, headless = false) {
|
|
51
52
|
this.domain = domain;
|
|
52
53
|
this.browserVersionString = browserVersionString;
|
|
53
54
|
this.chromeFlags = chromeFlags;
|
|
54
55
|
this.userConfig = userConfig;
|
|
55
56
|
this.userAgent = userAgent;
|
|
56
57
|
this.debuggingPort = debuggingPort;
|
|
58
|
+
this.headless = headless;
|
|
57
59
|
this.domain = domain;
|
|
58
60
|
this.chromeFlags = chromeFlags || [];
|
|
59
61
|
this.chromePath = (0, node_path_1.resolve)(userConfig.chromePath);
|
|
@@ -83,10 +85,10 @@ class BrowserContext {
|
|
|
83
85
|
}
|
|
84
86
|
getPuppeteerLaunchOptions() {
|
|
85
87
|
const options = {
|
|
86
|
-
devtools:
|
|
88
|
+
devtools: !this.headless,
|
|
87
89
|
timeout: 0,
|
|
88
90
|
defaultViewport: null,
|
|
89
|
-
headless:
|
|
91
|
+
headless: this.headless,
|
|
90
92
|
executablePath: this.chromePath,
|
|
91
93
|
args: this.browserArgs,
|
|
92
94
|
};
|
|
@@ -100,7 +102,7 @@ class BrowserContext {
|
|
|
100
102
|
options.args.push(`--load-extension=${this.userConfig?.chromeExtensionPaths}`, `--disable-extensions-except=${this.userConfig?.chromeExtensionPaths}`);
|
|
101
103
|
}
|
|
102
104
|
}
|
|
103
|
-
if (this.debuggingPort) {
|
|
105
|
+
if (this.debuggingPort || this.headless) {
|
|
104
106
|
options.args.push("--remote-debugging-port=9222");
|
|
105
107
|
}
|
|
106
108
|
return options;
|
|
@@ -117,6 +119,7 @@ class OnboardingContext {
|
|
|
117
119
|
verboseLevel;
|
|
118
120
|
useTestConfig;
|
|
119
121
|
debuggingPort;
|
|
122
|
+
headless;
|
|
120
123
|
static flags = {
|
|
121
124
|
...cli_parameters_1.CLI_CONFIG_NAME,
|
|
122
125
|
...cli_parameters_1.CLI_CONFIG_IS_TEST,
|
|
@@ -144,12 +147,16 @@ class OnboardingContext {
|
|
|
144
147
|
default: false,
|
|
145
148
|
description: `Removes header/meta "content-security-policy" for origin-responses`,
|
|
146
149
|
}),
|
|
150
|
+
headless: core_1.Flags.boolean({
|
|
151
|
+
default: false,
|
|
152
|
+
description: "Run Chrome in headless mode (for CI environments). Implicitly enables remote debugging port.",
|
|
153
|
+
}),
|
|
147
154
|
};
|
|
148
155
|
DEFAULT_DF_PATH = "https://www.baqend.com/speed-kit/latest/dynamic-fetcher.js";
|
|
149
156
|
DEFAULT_DOCUMENT_HANDLER_PATH = "https://www.baqend.com/speed-kit-handler/latest/DocumentHandler.js";
|
|
150
157
|
DEFAULT_SNIPPET_PATH = "https://www.baqend.com/speed-kit/latest/snippet.js";
|
|
151
158
|
DEFAULT_SW_PATH = "https://www.baqend.com/speed-kit/latest/sw.js";
|
|
152
|
-
constructor(customerPath, configName, domain, local, ignoreContentSecurityPolicy = false, cliPath, verboseLevel, useTestConfig = false, debuggingPort = false) {
|
|
159
|
+
constructor(customerPath, configName, domain, local, ignoreContentSecurityPolicy = false, cliPath, verboseLevel, useTestConfig = false, debuggingPort = false, headless = false) {
|
|
153
160
|
this.customerPath = customerPath;
|
|
154
161
|
this.configName = configName;
|
|
155
162
|
this.domain = domain;
|
|
@@ -159,6 +166,7 @@ class OnboardingContext {
|
|
|
159
166
|
this.verboseLevel = verboseLevel;
|
|
160
167
|
this.useTestConfig = useTestConfig;
|
|
161
168
|
this.debuggingPort = debuggingPort;
|
|
169
|
+
this.headless = headless;
|
|
162
170
|
}
|
|
163
171
|
}
|
|
164
172
|
exports.OnboardingContext = OnboardingContext;
|
|
@@ -75,10 +75,13 @@ class OnboardingServiceFactory {
|
|
|
75
75
|
this.cliConfig.chromeExtensionPaths = extensionPaths.join(",");
|
|
76
76
|
const browserValidator = new executable_validator_1.ExecutableValidator(this.cliConfig, cli);
|
|
77
77
|
const browserVersionString = await browserValidator.validateOrInstall();
|
|
78
|
-
const browserContext = new onboarding_model_1.BrowserContext(domainToStart, browserVersionString, customerConfig.chromeFlags || [], this.cliConfig, undefined, this.context.debuggingPort);
|
|
79
|
-
if (this.context.debuggingPort) {
|
|
78
|
+
const browserContext = new onboarding_model_1.BrowserContext(domainToStart, browserVersionString, customerConfig.chromeFlags || [], this.cliConfig, undefined, this.context.debuggingPort, this.context.headless);
|
|
79
|
+
if (this.context.debuggingPort || this.context.headless) {
|
|
80
80
|
cli.writeWarning("Chrome remote debugging enabled on port 9222.");
|
|
81
81
|
}
|
|
82
|
+
if (this.context.headless) {
|
|
83
|
+
cli.writeWarning("Running in headless mode.");
|
|
84
|
+
}
|
|
82
85
|
const fileWatcher = new file_watcher_1.FileWatcher(cli, customerConfig, files, documentHandler, browserContext, cache);
|
|
83
86
|
const athenaClient = (await this.getAthenaClient()) || null;
|
|
84
87
|
const fetchHandler = await this.getFetchEventHandler(files, customerConfig, documentHandler, cache, cli, browserContext, athenaClient);
|
package/oclif.manifest.json
CHANGED
|
@@ -513,6 +513,12 @@
|
|
|
513
513
|
"name": "ignoreContentSecurityPolicy",
|
|
514
514
|
"allowNo": false,
|
|
515
515
|
"type": "boolean"
|
|
516
|
+
},
|
|
517
|
+
"headless": {
|
|
518
|
+
"description": "Run Chrome in headless mode (for CI environments). Implicitly enables remote debugging port.",
|
|
519
|
+
"name": "headless",
|
|
520
|
+
"allowNo": false,
|
|
521
|
+
"type": "boolean"
|
|
516
522
|
}
|
|
517
523
|
},
|
|
518
524
|
"hasDynamicHelp": false,
|
|
@@ -745,5 +751,5 @@
|
|
|
745
751
|
]
|
|
746
752
|
}
|
|
747
753
|
},
|
|
748
|
-
"version": "3.
|
|
754
|
+
"version": "3.37.0"
|
|
749
755
|
}
|