@speedkit/cli 4.1.0 → 4.2.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 +15 -0
- package/README.md +3 -3
- package/dist/helpers/html-format-helper.js +1 -2
- package/dist/helpers/java-regex.d.ts +1 -0
- package/dist/helpers/java-regex.js +21 -0
- package/dist/services/onboarding/dashboard/index.d.ts +2 -2
- package/dist/services/onboarding/dashboard/index.js +1 -1
- package/dist/services/onboarding/onboarding-service-factory.d.ts +1 -0
- package/dist/services/onboarding/onboarding-service-factory.js +25 -5
- package/dist/services/onboarding/virtual-orestes-app/crawler.d.ts +37 -0
- package/dist/services/onboarding/virtual-orestes-app/crawler.js +85 -4
- package/dist/services/query-builder/query-builder-service.d.ts +1 -0
- package/dist/services/query-builder/query-builder-service.js +9 -0
- package/oclif.manifest.json +1 -1
- package/package.json +8 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## [4.2.1](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v4.2.0...v4.2.1) (2026-05-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* remove memoryLeaking htmlFormatter ([5472bbb](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/5472bbb58bb24064b857fd30156247429998bc47))
|
|
7
|
+
|
|
8
|
+
# [4.2.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v4.1.0...v4.2.0) (2026-05-08)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **onboarding:** local mode ([0a36f37](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/0a36f376d27f6bb369d38f073e5a5e5811cd1e11))
|
|
14
|
+
* **onboarding:** local mode ([e3e44ef](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/e3e44ef55bd7c6f71e776d978ce5cbd3fcf117e8))
|
|
15
|
+
|
|
1
16
|
# [4.1.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v4.0.0...v4.1.0) (2026-05-06)
|
|
2
17
|
|
|
3
18
|
|
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/4.1
|
|
24
|
+
@speedkit/cli/4.2.1 linux-x64 node-v22.22.2
|
|
25
25
|
$ sk --help [COMMAND]
|
|
26
26
|
USAGE
|
|
27
27
|
$ sk COMMAND
|
|
@@ -112,7 +112,7 @@ EXAMPLES
|
|
|
112
112
|
$ sk autocomplete --refresh-cache
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
-
_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.2.
|
|
115
|
+
_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.2.49/src/commands/autocomplete/index.ts)_
|
|
116
116
|
|
|
117
117
|
## `sk build-parameter-query CUSTOMERPATH`
|
|
118
118
|
|
|
@@ -355,7 +355,7 @@ DESCRIPTION
|
|
|
355
355
|
Display help for sk.
|
|
356
356
|
```
|
|
357
357
|
|
|
358
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/6.2.
|
|
358
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/6.2.48/src/commands/help.ts)_
|
|
359
359
|
|
|
360
360
|
## `sk login [APP]`
|
|
361
361
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function javaRegexToJs(javaRegex: string): RegExp | undefined;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Converts a Java-style regex (e.g. with leading `(?i)` inline flags) into a
|
|
2
|
+
// JS RegExp. Named groups `(?<name>...)` are already supported in JS.
|
|
3
|
+
export function javaRegexToJs(javaRegex) {
|
|
4
|
+
let pattern = javaRegex;
|
|
5
|
+
let flags = "";
|
|
6
|
+
const inlineFlags = pattern.match(/^\(\?([a-zA-Z]+)\)/);
|
|
7
|
+
if (inlineFlags) {
|
|
8
|
+
pattern = pattern.slice(inlineFlags[0].length);
|
|
9
|
+
for (const flag of inlineFlags[1]) {
|
|
10
|
+
if ("imsu".includes(flag) && !flags.includes(flag)) {
|
|
11
|
+
flags += flag;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
try {
|
|
16
|
+
return new RegExp(pattern, flags);
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { BaqendResponse } from "../browser/baqend-response.js";
|
|
2
2
|
import { Protocol } from "devtools-protocol";
|
|
3
|
-
import { ParameterQueryBuilder } from "./parameter-query-builder.js";
|
|
4
3
|
import { CustomerConfig } from "../../integration-api/index.js";
|
|
5
4
|
import { RequestDiffService } from "./request-diff-service.js";
|
|
6
5
|
import { Cache } from "../request-cache/cache.js";
|
|
7
6
|
import { AthenaService } from "../../athena/index.js";
|
|
8
7
|
import { DiffAgainstCurrentPage } from "./diff-against-current-page.js";
|
|
8
|
+
import { QueryBuilderService } from "../../query-builder/query-builder-service.js";
|
|
9
9
|
export declare class Dashboard {
|
|
10
10
|
private customerConfig;
|
|
11
11
|
private parameterQueryBuilder;
|
|
@@ -14,7 +14,7 @@ export declare class Dashboard {
|
|
|
14
14
|
private currentPageDiff;
|
|
15
15
|
private cache;
|
|
16
16
|
private athenaLastResult;
|
|
17
|
-
constructor(customerConfig: CustomerConfig, parameterQueryBuilder:
|
|
17
|
+
constructor(customerConfig: CustomerConfig, parameterQueryBuilder: QueryBuilderService, athenaClient: AthenaService, requestDiffService: RequestDiffService, currentPageDiff: DiffAgainstCurrentPage, cache: Cache);
|
|
18
18
|
getResponse(request: Protocol.Network.Request): Promise<BaqendResponse>;
|
|
19
19
|
private createBaqendResponse;
|
|
20
20
|
}
|
|
@@ -27,7 +27,7 @@ export class Dashboard {
|
|
|
27
27
|
return this.createBaqendResponse(requestOrigin, "unsupported method");
|
|
28
28
|
}
|
|
29
29
|
if (url.pathname.startsWith("/query/create")) {
|
|
30
|
-
return this.createBaqendResponse(requestOrigin, JSON.stringify({ query: this.parameterQueryBuilder.
|
|
30
|
+
return this.createBaqendResponse(requestOrigin, JSON.stringify({ query: this.parameterQueryBuilder.query() }), "application/json; charset=UTF-8");
|
|
31
31
|
}
|
|
32
32
|
if (url.pathname.startsWith("/query/execute")) {
|
|
33
33
|
const postData = request.postData;
|
|
@@ -7,6 +7,7 @@ export declare class OnboardingServiceFactory {
|
|
|
7
7
|
constructor(context: OnboardingContext, cliConfig: UserCliConfig);
|
|
8
8
|
getService(): Promise<OnboardingService>;
|
|
9
9
|
private prepareMessagehandler;
|
|
10
|
+
private getAppToken;
|
|
10
11
|
private buildInstallResource;
|
|
11
12
|
private getAthenaClient;
|
|
12
13
|
private getConfigApi;
|
|
@@ -9,7 +9,6 @@ import { ExternalFileReader, IntegrationApiContext, VirtualFile, ExternalRecipe,
|
|
|
9
9
|
import { InstallFileRecipe } from "./config-renderer/install-file-recipe.js";
|
|
10
10
|
import { SpeedKitInstallContext } from "./config-renderer/speed-kit-install-context.js";
|
|
11
11
|
import { Dashboard } from "./dashboard/index.js";
|
|
12
|
-
import { ParameterQueryBuilder } from "./dashboard/parameter-query-builder.js";
|
|
13
12
|
import { RequestDiffService } from "./dashboard/request-diff-service.js";
|
|
14
13
|
import { FetchEventHandler } from "./fetch-event-handler.js";
|
|
15
14
|
import { CustomerDomainDocumentResponse } from "./fetch-events/customer-domain-document-response.js";
|
|
@@ -26,13 +25,13 @@ import { OnboardingService } from "./onboarding-service.js";
|
|
|
26
25
|
import { Cache } from "./request-cache/cache.js";
|
|
27
26
|
import { InstallSpeedKitHtmlTemplate } from "./templates/install-speed-kit-html-template.js";
|
|
28
27
|
import { InstallSpeedKitJsTemplate } from "./templates/install-speed-kit-js-template.js";
|
|
29
|
-
// import { TodoCollector } from "./todo-collector";
|
|
30
28
|
import { ExtensionValidator } from "./browser/extension/extension-validator.js";
|
|
31
29
|
import { DevtoolsExtensionApi } from "./browser/extension/devtools-extension-api.js";
|
|
32
30
|
import { TodoCollector } from "./todo-collector.js";
|
|
33
31
|
import { Crawler } from "./virtual-orestes-app/crawler.js";
|
|
34
32
|
import { VirtualOrestesApp } from "./virtual-orestes-app/index.js";
|
|
35
33
|
import { ConfigApiContext, ConfigApiServiceFactory, } from "../config-api/index.js";
|
|
34
|
+
import { account } from "baqend/cli";
|
|
36
35
|
import * as fs from "node:fs";
|
|
37
36
|
import * as path from "node:path";
|
|
38
37
|
import { StaticRecipe } from "../integration-api/virtual/static-recipe.js";
|
|
@@ -41,6 +40,8 @@ import { ExtensionDownloader } from "./browser/extension/extension-downloader.js
|
|
|
41
40
|
import { ExecutableValidator } from "./browser/executable/executable-validator.js";
|
|
42
41
|
import { socksDispatcher } from "fetch-socks";
|
|
43
42
|
import crypto from "node:crypto";
|
|
43
|
+
import { QueryBuilderFactory } from "../query-builder/query-builder-factory.js";
|
|
44
|
+
import { QueryTpe } from "../query-builder/query-builder-model.js";
|
|
44
45
|
export class OnboardingServiceFactory {
|
|
45
46
|
context;
|
|
46
47
|
cliConfig;
|
|
@@ -81,10 +82,10 @@ export class OnboardingServiceFactory {
|
|
|
81
82
|
const fileWatcher = new FileWatcher(cli, customerConfig, files, documentHandler, browserContext, cache);
|
|
82
83
|
const athenaClient = (await this.getAthenaClient()) || null;
|
|
83
84
|
const fetchHandler = await this.getFetchEventHandler(files, customerConfig, documentHandler, cache, cli, browserContext, athenaClient);
|
|
84
|
-
const messageHandler = this.prepareMessagehandler(athenaClient, files);
|
|
85
|
+
const messageHandler = await this.prepareMessagehandler(athenaClient, files, customerConfig);
|
|
85
86
|
return new OnboardingService(browserContext, customerConfig, fetchHandler, fileWatcher, cli, messageHandler);
|
|
86
87
|
}
|
|
87
|
-
prepareMessagehandler(athenaClient, files) {
|
|
88
|
+
async prepareMessagehandler(athenaClient, files, customerConfig) {
|
|
88
89
|
const messageHandler = new DevtoolsExtensionApi();
|
|
89
90
|
messageHandler.addMessage({
|
|
90
91
|
id: "athena",
|
|
@@ -95,8 +96,23 @@ export class OnboardingServiceFactory {
|
|
|
95
96
|
id: "todo",
|
|
96
97
|
data: [...fileTodoCollector.getOpenTasks()],
|
|
97
98
|
});
|
|
99
|
+
const appToken = await this.getAppToken(customerConfig.app);
|
|
100
|
+
if (appToken) {
|
|
101
|
+
messageHandler.addMessage({
|
|
102
|
+
id: "appToken",
|
|
103
|
+
data: { app: customerConfig.app, token: appToken },
|
|
104
|
+
});
|
|
105
|
+
}
|
|
98
106
|
return messageHandler;
|
|
99
107
|
}
|
|
108
|
+
async getAppToken(app) {
|
|
109
|
+
// skipInput=true -> fail instead of prompting when no valid login is cached
|
|
110
|
+
const result = await safe(account.login({ app, skipInput: true }));
|
|
111
|
+
if (result.success !== true) {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
return result.data.token ?? null;
|
|
115
|
+
}
|
|
100
116
|
async buildInstallResource(speedKitInstallContext, files, cli) {
|
|
101
117
|
cli.startAction("ONBOARDING:BUILD:INSTALL_RESOURCE", "build file install_resource");
|
|
102
118
|
const installResourceFile = new VirtualFile(INTEGRATION_FILES.BUILD.INSTALL, new InstallFileRecipe(speedKitInstallContext));
|
|
@@ -124,7 +140,11 @@ export class OnboardingServiceFactory {
|
|
|
124
140
|
const serverConfig = await this.getSpeedKitServerConfig(configApi, cli);
|
|
125
141
|
const agent = this.getCrawlerAgent(customerConfig, cli);
|
|
126
142
|
const crawler = new Crawler(cli, agent, serverConfig);
|
|
127
|
-
const parameterQueryBuilder = new
|
|
143
|
+
const parameterQueryBuilder = await new QueryBuilderFactory({
|
|
144
|
+
configName: this.context.configName,
|
|
145
|
+
customerPath: this.context.customerPath,
|
|
146
|
+
isWindows: this.cliConfig.runtimeConfig.windows,
|
|
147
|
+
}, this.cliConfig).buildService(QueryTpe.parameter);
|
|
128
148
|
const DiffService = new DiffServiceFactory(new DiffContext(this.cliConfig.diffExec, this.cliConfig.diffExecTemplate)).getService();
|
|
129
149
|
const requestDiffService = new RequestDiffService(DiffService, documentHandler);
|
|
130
150
|
const handlers = [
|
|
@@ -8,6 +8,43 @@ export declare class Crawler {
|
|
|
8
8
|
constructor(cli: CliService, agentConfig: Agent, speedKitServerConfig?: SpeedKitServerConfig);
|
|
9
9
|
fetchRemote(originUrl: string, variation: string): Promise<Response>;
|
|
10
10
|
private setDefaultUserAgent;
|
|
11
|
+
/**
|
|
12
|
+
* Mirrors how the Baqend asset server applies the `variations` block from
|
|
13
|
+
* the Speed Kit server config to outgoing origin fetches. The cookie /
|
|
14
|
+
* user-agent / etc. headers configured per variation must reach the origin
|
|
15
|
+
* so that the response matches what the variation is supposed to represent
|
|
16
|
+
* (e.g. a logged-in user, a specific store, a mobile device).
|
|
17
|
+
*
|
|
18
|
+
* Resolution order (matches Orestes server behavior):
|
|
19
|
+
* 1. The wildcard `"*"` variation (if any) — its headers always apply.
|
|
20
|
+
* 2. First-match-wins iteration over the remaining variations: for each
|
|
21
|
+
* entry in declaration order, try an exact key match against
|
|
22
|
+
* `variationParameter` first, then fall back to its Java-style
|
|
23
|
+
* `regex` (e.g. `(?i)desktop-fmarkt-variant-(?<storeId>.*)`). The
|
|
24
|
+
* first variation that matches by either means is applied — exact
|
|
25
|
+
* matches do NOT take priority over regex matches in earlier
|
|
26
|
+
* entries. When matched via regex, named capture groups are
|
|
27
|
+
* substituted into header values via `${name}` placeholders, so a
|
|
28
|
+
* cookie like `fmarktcookie=${storeId}` becomes
|
|
29
|
+
* `fmarktcookie=2879130`.
|
|
30
|
+
* 3. Origin-level basic auth fallback (only if no variation matched).
|
|
31
|
+
*/
|
|
11
32
|
private prepareOriginRequest;
|
|
33
|
+
/**
|
|
34
|
+
* Replaces `${name}` placeholders in each header value with the matching
|
|
35
|
+
* named capture group from a regex match. Used by `prepareOriginRequest`
|
|
36
|
+
* to materialize parameterized variation headers — e.g. given:
|
|
37
|
+
*
|
|
38
|
+
* headers = { cookie: "fmarktcookie=${storeId}" }
|
|
39
|
+
* groups = { storeId: "2879130" }
|
|
40
|
+
*
|
|
41
|
+
* the result is `{ cookie: "fmarktcookie=2879130" }`.
|
|
42
|
+
*
|
|
43
|
+
* Placeholders that don't match a captured group are left intact rather
|
|
44
|
+
* than replaced with `undefined`, so a misconfigured variation still
|
|
45
|
+
* produces a recognisable header value instead of a silent corruption.
|
|
46
|
+
* Non-string header values are passed through unchanged.
|
|
47
|
+
*/
|
|
48
|
+
private substituteNamedGroups;
|
|
12
49
|
private prepareAuthRequest;
|
|
13
50
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { USER_AGENT } from "../onboarding-model.js";
|
|
2
2
|
import { safe } from "../../../helpers/safe.js";
|
|
3
|
+
import { javaRegexToJs } from "../../../helpers/java-regex.js";
|
|
3
4
|
import { randomUUID } from "node:crypto";
|
|
4
5
|
export class Crawler {
|
|
5
6
|
cli;
|
|
@@ -41,30 +42,110 @@ export class Crawler {
|
|
|
41
42
|
}
|
|
42
43
|
return USER_AGENT.DESKTOP;
|
|
43
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Mirrors how the Baqend asset server applies the `variations` block from
|
|
47
|
+
* the Speed Kit server config to outgoing origin fetches. The cookie /
|
|
48
|
+
* user-agent / etc. headers configured per variation must reach the origin
|
|
49
|
+
* so that the response matches what the variation is supposed to represent
|
|
50
|
+
* (e.g. a logged-in user, a specific store, a mobile device).
|
|
51
|
+
*
|
|
52
|
+
* Resolution order (matches Orestes server behavior):
|
|
53
|
+
* 1. The wildcard `"*"` variation (if any) — its headers always apply.
|
|
54
|
+
* 2. First-match-wins iteration over the remaining variations: for each
|
|
55
|
+
* entry in declaration order, try an exact key match against
|
|
56
|
+
* `variationParameter` first, then fall back to its Java-style
|
|
57
|
+
* `regex` (e.g. `(?i)desktop-fmarkt-variant-(?<storeId>.*)`). The
|
|
58
|
+
* first variation that matches by either means is applied — exact
|
|
59
|
+
* matches do NOT take priority over regex matches in earlier
|
|
60
|
+
* entries. When matched via regex, named capture groups are
|
|
61
|
+
* substituted into header values via `${name}` placeholders, so a
|
|
62
|
+
* cookie like `fmarktcookie=${storeId}` becomes
|
|
63
|
+
* `fmarktcookie=2879130`.
|
|
64
|
+
* 3. Origin-level basic auth fallback (only if no variation matched).
|
|
65
|
+
*/
|
|
44
66
|
prepareOriginRequest(originUrl, variationParameter, init) {
|
|
45
67
|
if (!this.speedKitServerConfig) {
|
|
46
68
|
return init;
|
|
47
69
|
}
|
|
48
|
-
|
|
49
|
-
|
|
70
|
+
const variations = this.speedKitServerConfig.speedKit.variations;
|
|
71
|
+
// Wildcard variation headers apply to every request, regardless of which
|
|
72
|
+
// specific variation (if any) is requested.
|
|
73
|
+
if (variations?.["*"]) {
|
|
74
|
+
const config = variations["*"];
|
|
50
75
|
init.headers = { ...init.headers, ...config.headers };
|
|
51
76
|
}
|
|
52
77
|
if (!variationParameter) {
|
|
53
78
|
return init;
|
|
54
79
|
}
|
|
55
|
-
|
|
80
|
+
// First-match-wins over the variations in declaration order. Each entry
|
|
81
|
+
// can match by exact key or by its Java-style `regex` field; whichever
|
|
82
|
+
// entry matches first applies its headers and short-circuits the rest.
|
|
83
|
+
for (const variationKey in variations) {
|
|
84
|
+
if (variationKey === "*") {
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
const variationConfig = variations[variationKey];
|
|
56
88
|
if (variationParameter === variationKey) {
|
|
57
|
-
const variationConfig = this.speedKitServerConfig.speedKit.variations[variationKey];
|
|
58
89
|
init.headers = { ...init.headers, ...variationConfig.headers };
|
|
59
90
|
return init;
|
|
60
91
|
}
|
|
92
|
+
if (!variationConfig.regex) {
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
const regex = javaRegexToJs(variationConfig.regex);
|
|
96
|
+
if (!regex) {
|
|
97
|
+
// Unsupported Java regex construct — skip rather than crash so later
|
|
98
|
+
// variations still get a chance to match.
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
const match = variationParameter.match(regex);
|
|
102
|
+
if (!match) {
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
init.headers = {
|
|
106
|
+
...init.headers,
|
|
107
|
+
...this.substituteNamedGroups(variationConfig.headers, match.groups),
|
|
108
|
+
};
|
|
109
|
+
return init;
|
|
61
110
|
}
|
|
111
|
+
// No variation matched: fall back to origin basic auth if configured.
|
|
62
112
|
const authentication = this.prepareAuthRequest(originUrl);
|
|
63
113
|
if (authentication) {
|
|
64
114
|
init.headers["Authorization"] = authentication;
|
|
65
115
|
}
|
|
66
116
|
return init;
|
|
67
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* Replaces `${name}` placeholders in each header value with the matching
|
|
120
|
+
* named capture group from a regex match. Used by `prepareOriginRequest`
|
|
121
|
+
* to materialize parameterized variation headers — e.g. given:
|
|
122
|
+
*
|
|
123
|
+
* headers = { cookie: "fmarktcookie=${storeId}" }
|
|
124
|
+
* groups = { storeId: "2879130" }
|
|
125
|
+
*
|
|
126
|
+
* the result is `{ cookie: "fmarktcookie=2879130" }`.
|
|
127
|
+
*
|
|
128
|
+
* Placeholders that don't match a captured group are left intact rather
|
|
129
|
+
* than replaced with `undefined`, so a misconfigured variation still
|
|
130
|
+
* produces a recognisable header value instead of a silent corruption.
|
|
131
|
+
* Non-string header values are passed through unchanged.
|
|
132
|
+
*/
|
|
133
|
+
substituteNamedGroups(headers, groups) {
|
|
134
|
+
if (!headers) {
|
|
135
|
+
return {};
|
|
136
|
+
}
|
|
137
|
+
if (!groups) {
|
|
138
|
+
return { ...headers };
|
|
139
|
+
}
|
|
140
|
+
const result = {};
|
|
141
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
142
|
+
result[key] =
|
|
143
|
+
typeof value === "string"
|
|
144
|
+
? value.replace(/\$\{(\w+)}/g, (match, name) => groups[name] ?? match)
|
|
145
|
+
: value;
|
|
146
|
+
}
|
|
147
|
+
return result;
|
|
148
|
+
}
|
|
68
149
|
prepareAuthRequest(originUrl) {
|
|
69
150
|
if (!this.speedKitServerConfig ||
|
|
70
151
|
this.speedKitServerConfig.speedKit?.authentications?.length < 1) {
|
|
@@ -43,6 +43,15 @@ export class QueryBuilderService {
|
|
|
43
43
|
this.cli.writeSuccess("Result has been copied to the clipboard 📋");
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
+
query() {
|
|
47
|
+
const parameters = getStrippedParameters(this.speedKitConfig);
|
|
48
|
+
const parameterReplaceFilter = getParameterReplaceFilter(parameters, getSpeedKitConfigVersion(this.speedKitConfig));
|
|
49
|
+
const whitelistedFilter = getWhitelistedFilter(this.speedKitConfig);
|
|
50
|
+
const blacklistedFilter = getBlacklistedFilter(this.speedKitConfig);
|
|
51
|
+
const skConfigVersion = getSpeedKitConfigVersion(this.speedKitConfig);
|
|
52
|
+
const parameterFilter = getParameterFilter(parameters, skConfigVersion);
|
|
53
|
+
return this.buildQuery(this.context.app, parameterFilter, whitelistedFilter, blacklistedFilter, parameterReplaceFilter);
|
|
54
|
+
}
|
|
46
55
|
buildQuery(app, parameterFilter, whitelistedFilter, blacklistedFilter, parameterReplaceFilter) {
|
|
47
56
|
if (this.context.queryType === QueryTpe.prewarm) {
|
|
48
57
|
return new Prewarm(app, whitelistedFilter, blacklistedFilter, parameterReplaceFilter).query;
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@speedkit/cli",
|
|
3
3
|
"description": "Speed Kit CLI",
|
|
4
|
-
"version": "4.1
|
|
4
|
+
"version": "4.2.1",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Baqend.com",
|
|
7
7
|
"email": "info@baqend.com"
|
|
@@ -82,16 +82,16 @@
|
|
|
82
82
|
"types": "dist/index.d.ts",
|
|
83
83
|
"type": "module",
|
|
84
84
|
"dependencies": {
|
|
85
|
-
"@aws-sdk/client-athena": "^3.
|
|
85
|
+
"@aws-sdk/client-athena": "^3.1045.0",
|
|
86
86
|
"@eslint/eslintrc": "^3.3.5",
|
|
87
87
|
"@eslint/js": "^10.0.1",
|
|
88
88
|
"@inquirer/prompts": "^8.4.2",
|
|
89
|
-
"@oclif/core": "^4.10.
|
|
89
|
+
"@oclif/core": "^4.10.6",
|
|
90
90
|
"@oclif/errors": "^1.3.6",
|
|
91
|
-
"@oclif/plugin-autocomplete": "^3.2.
|
|
92
|
-
"@oclif/plugin-help": "^6.2.
|
|
93
|
-
"@oclif/plugin-not-found": "^3.2.
|
|
94
|
-
"@oclif/plugin-warn-if-update-available": "^3.1.
|
|
91
|
+
"@oclif/plugin-autocomplete": "^3.2.46",
|
|
92
|
+
"@oclif/plugin-help": "^6.2.45",
|
|
93
|
+
"@oclif/plugin-not-found": "^3.2.81",
|
|
94
|
+
"@oclif/plugin-warn-if-update-available": "^3.1.61",
|
|
95
95
|
"baqend": "^4.2.5",
|
|
96
96
|
"chalk": "^5.6.2",
|
|
97
97
|
"cli-progress": "^3.12.0",
|
|
@@ -106,11 +106,10 @@
|
|
|
106
106
|
"fluent-ffmpeg": "^2.1.3",
|
|
107
107
|
"fs-extra": "^11.3.4",
|
|
108
108
|
"handlebars": "^4.7.9",
|
|
109
|
-
"htmlfy": "^1.0.1",
|
|
110
109
|
"iconv-lite": "^0.7.2",
|
|
111
110
|
"json2csv": "^6.0.0-alpha.2",
|
|
112
111
|
"node-fetch": "^3.3.2",
|
|
113
|
-
"nypm": "^0.6.
|
|
112
|
+
"nypm": "^0.6.6",
|
|
114
113
|
"puppeteer": "^24.41.0",
|
|
115
114
|
"puppeteer-extra": "^3.3.6",
|
|
116
115
|
"semver": "^7.7.4",
|