@speedkit/cli 4.26.0 → 4.27.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 +17 -0
- package/README.md +203 -15
- package/dist/commands/auto-prewarm.d.ts +12 -1
- package/dist/commands/auto-prewarm.js +26 -7
- package/dist/commands/generate-pop-config.d.ts +1 -0
- package/dist/commands/generate-pop-config.js +9 -3
- package/dist/commands/prewarm.js +3 -1
- package/dist/commands/query/parameter.d.ts +27 -0
- package/dist/commands/query/parameter.js +28 -0
- package/dist/commands/query/prewarm.d.ts +32 -0
- package/dist/commands/query/prewarm.js +32 -0
- package/dist/helpers/clipboard.d.ts +19 -0
- package/dist/helpers/clipboard.js +70 -0
- package/dist/helpers/evaluate-speed-kit-config.d.ts +8 -18
- package/dist/helpers/evaluate-speed-kit-config.js +8 -6
- package/dist/helpers/evaluate-speed-kit-config.spec.d.ts +1 -0
- package/dist/helpers/evaluate-speed-kit-config.spec.js +78 -0
- package/dist/models/cli-parameters.d.ts +106 -0
- package/dist/models/cli-parameters.js +183 -0
- package/dist/models/cli-parameters.spec.d.ts +1 -0
- package/dist/models/cli-parameters.spec.js +47 -0
- package/dist/services/athena/athena-service-factory.d.ts +4 -1
- package/dist/services/athena/athena-service-factory.js +9 -3
- package/dist/services/athena/athena-service.d.ts +13 -1
- package/dist/services/athena/athena-service.js +27 -5
- package/dist/services/athena/athena-service.spec.d.ts +1 -0
- package/dist/services/athena/athena-service.spec.js +93 -0
- package/dist/services/deploy/handler/install-resource-handler.js +3 -4
- package/dist/services/onboarding/onboarding-service-factory.js +2 -2
- package/dist/services/pop-config/pop-config-service.d.ts +8 -1
- package/dist/services/pop-config/pop-config-service.js +16 -28
- package/dist/services/prewarm/assets/asset-api-client.d.ts +1 -1
- package/dist/services/prewarm/assets/asset-api-client.js +5 -4
- package/dist/services/prewarm/auto-pre-warm-factory.d.ts +20 -2
- package/dist/services/prewarm/auto-pre-warm-factory.js +24 -6
- package/dist/services/prewarm/csv-reader.d.ts +21 -2
- package/dist/services/prewarm/csv-reader.js +71 -9
- package/dist/services/prewarm/csv-reader.spec.d.ts +1 -0
- package/dist/services/prewarm/csv-reader.spec.js +75 -0
- package/dist/services/prewarm/index.d.ts +1 -0
- package/dist/services/prewarm/index.js +1 -0
- package/dist/services/prewarm/pre-warm-factory.d.ts +0 -2
- package/dist/services/prewarm/pre-warm-factory.js +8 -11
- package/dist/services/prewarm/pre-warm-model.d.ts +14 -1
- package/dist/services/prewarm/pre-warm-model.js +0 -1
- package/dist/services/prewarm/pre-warm-service.d.ts +9 -4
- package/dist/services/prewarm/pre-warm-service.js +18 -14
- package/dist/services/prewarm/prewarm-targets.d.ts +12 -0
- package/dist/services/prewarm/prewarm-targets.js +18 -0
- package/dist/services/prewarm/prewarm-targets.spec.d.ts +1 -0
- package/dist/services/prewarm/prewarm-targets.spec.js +29 -0
- package/dist/services/query-builder/error/match-matches-nothing-error.d.ts +11 -0
- package/dist/services/query-builder/error/match-matches-nothing-error.js +17 -0
- package/dist/services/query-builder/queries/device.d.ts +21 -0
- package/dist/services/query-builder/queries/device.js +26 -0
- package/dist/services/query-builder/queries/index.d.ts +6 -0
- package/dist/services/query-builder/queries/index.js +6 -0
- package/dist/services/query-builder/queries/page-filter.d.ts +39 -0
- package/dist/services/query-builder/queries/page-filter.js +135 -0
- package/dist/services/query-builder/queries/page-source.d.ts +30 -0
- package/dist/services/query-builder/queries/page-source.js +79 -0
- package/dist/services/query-builder/queries/parameter-query.d.ts +14 -0
- package/dist/services/query-builder/queries/parameter-query.js +142 -0
- package/dist/services/query-builder/queries/pops-query.d.ts +27 -0
- package/dist/services/query-builder/queries/pops-query.js +65 -0
- package/dist/services/query-builder/queries/prewarm-query.d.ts +18 -0
- package/dist/services/query-builder/queries/prewarm-query.js +227 -0
- package/dist/services/query-builder/queries/query-model.d.ts +97 -0
- package/dist/services/query-builder/queries/query-model.js +19 -0
- package/dist/services/query-builder/queries/spec/golden-configs.d.ts +18 -0
- package/dist/services/query-builder/queries/spec/golden-configs.js +116 -0
- package/dist/services/query-builder/queries/spec/golden.spec.d.ts +1 -0
- package/dist/services/query-builder/queries/spec/golden.spec.js +161 -0
- package/dist/services/query-builder/queries/spec/pops-query.spec.d.ts +1 -0
- package/dist/services/query-builder/queries/spec/pops-query.spec.js +58 -0
- package/dist/services/query-builder/queries/spec/queries.spec.d.ts +1 -0
- package/dist/services/query-builder/queries/spec/queries.spec.js +312 -0
- package/dist/services/query-builder/queries/spec/reported-bugs.spec.d.ts +1 -0
- package/dist/services/query-builder/queries/spec/reported-bugs.spec.js +86 -0
- package/dist/services/query-builder/query-builder-factory.d.ts +2 -2
- package/dist/services/query-builder/query-builder-factory.js +36 -8
- package/dist/services/query-builder/query-builder-model.d.ts +33 -19
- package/dist/services/query-builder/query-builder-model.js +5 -5
- package/dist/services/query-builder/query-builder-service.d.ts +26 -5
- package/dist/services/query-builder/query-builder-service.js +157 -44
- package/dist/services/query-builder/query-command.d.ts +27 -0
- package/dist/services/query-builder/query-command.js +36 -0
- package/dist/services/query-builder/rules/index.d.ts +8 -0
- package/dist/services/query-builder/rules/index.js +8 -0
- package/dist/services/query-builder/rules/match-pattern.d.ts +51 -0
- package/dist/services/query-builder/rules/match-pattern.js +141 -0
- package/dist/services/query-builder/rules/pattern-language.d.ts +59 -0
- package/dist/services/query-builder/rules/pattern-language.js +159 -0
- package/dist/services/query-builder/rules/rule-model.d.ts +107 -0
- package/dist/services/query-builder/rules/rule-model.js +54 -0
- package/dist/services/query-builder/rules/rule-parser.d.ts +33 -0
- package/dist/services/query-builder/rules/rule-parser.js +189 -0
- package/dist/services/query-builder/rules/rule-reducer.d.ts +71 -0
- package/dist/services/query-builder/rules/rule-reducer.js +383 -0
- package/dist/services/query-builder/rules/rule-relevance.d.ts +43 -0
- package/dist/services/query-builder/rules/rule-relevance.js +69 -0
- package/dist/services/query-builder/rules/rule-to-sql.d.ts +51 -0
- package/dist/services/query-builder/rules/rule-to-sql.js +75 -0
- package/dist/services/query-builder/rules/spec/pattern-language.spec.d.ts +1 -0
- package/dist/services/query-builder/rules/spec/pattern-language.spec.js +90 -0
- package/dist/services/query-builder/rules/spec/rule-parser.spec.d.ts +1 -0
- package/dist/services/query-builder/rules/spec/rule-parser.spec.js +150 -0
- package/dist/services/query-builder/rules/spec/rule-reducer.spec.d.ts +1 -0
- package/dist/services/query-builder/rules/spec/rule-reducer.spec.js +169 -0
- package/dist/services/query-builder/rules/spec/rule-relevance.spec.d.ts +1 -0
- package/dist/services/query-builder/rules/spec/rule-relevance.spec.js +88 -0
- package/dist/services/query-builder/rules/spec/rule-to-sql.spec.d.ts +1 -0
- package/dist/services/query-builder/rules/spec/rule-to-sql.spec.js +110 -0
- package/dist/services/query-builder/rules/spec/runtime-semantics.spec.d.ts +1 -0
- package/dist/services/query-builder/rules/spec/runtime-semantics.spec.js +55 -0
- package/dist/services/query-builder/rules/spec/strip-parameters.spec.d.ts +1 -0
- package/dist/services/query-builder/rules/spec/strip-parameters.spec.js +85 -0
- package/dist/services/query-builder/rules/strip-parameters.d.ts +39 -0
- package/dist/services/query-builder/rules/strip-parameters.js +197 -0
- package/dist/services/query-builder/sql/expression.d.ts +73 -0
- package/dist/services/query-builder/sql/expression.js +133 -0
- package/dist/services/query-builder/sql/format.d.ts +14 -0
- package/dist/services/query-builder/sql/format.js +48 -0
- package/dist/services/query-builder/sql/index.d.ts +4 -0
- package/dist/services/query-builder/sql/index.js +4 -0
- package/dist/services/query-builder/sql/predicate.d.ts +66 -0
- package/dist/services/query-builder/sql/predicate.js +124 -0
- package/dist/services/query-builder/sql/regex.d.ts +28 -0
- package/dist/services/query-builder/sql/regex.js +81 -0
- package/dist/services/query-builder/sql/spec/expression.spec.d.ts +1 -0
- package/dist/services/query-builder/sql/spec/expression.spec.js +75 -0
- package/dist/services/query-builder/sql/spec/format.spec.d.ts +1 -0
- package/dist/services/query-builder/sql/spec/format.spec.js +37 -0
- package/dist/services/query-builder/sql/spec/predicate.spec.d.ts +1 -0
- package/dist/services/query-builder/sql/spec/predicate.spec.js +78 -0
- package/dist/services/query-builder/sql/spec/regex.spec.d.ts +1 -0
- package/dist/services/query-builder/sql/spec/regex.spec.js +62 -0
- package/oclif.manifest.json +401 -100
- package/package.json +11 -2
- package/dist/commands/build-parameter-query.d.ts +0 -14
- package/dist/commands/build-parameter-query.js +0 -25
- package/dist/commands/build-prewarm-query.d.ts +0 -16
- package/dist/commands/build-prewarm-query.js +0 -37
- package/dist/helpers/build-query-helper.d.ts +0 -32
- package/dist/helpers/build-query-helper.js +0 -223
- package/dist/helpers/get-parsed-config.d.ts +0 -15
- package/dist/helpers/get-parsed-config.js +0 -62
- package/dist/services/onboarding/dashboard/parameter-query-builder.d.ts +0 -8
- package/dist/services/onboarding/dashboard/parameter-query-builder.js +0 -63
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
## [4.27.1](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v4.27.0...v4.27.1) (2026-09-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* transfer flags from query:prewarm to auto-prewarm ([0dc4179](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/0dc41795018edd86fdad4215e66218be28b91654))
|
|
7
|
+
|
|
8
|
+
# [4.27.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v4.26.0...v4.27.0) (2026-09-11)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **prewarm:** add --count to check how many urls will get prewarmed ([551b5e6](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/551b5e60f220e0046b7e8d755ca561679a2baefc))
|
|
14
|
+
* **prewarm:** carry the variation in the list instead of crossing it ([1679a2c](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/1679a2cdad3764b64a92bae2690299d0ca3f0d4e))
|
|
15
|
+
* **querybuilder:** add --match flag to narrow the prewarm list ([d59bcd5](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/d59bcd5c1690b7141e429e0b79eff1bc791dc29e))
|
|
16
|
+
* **querybuilder:** recreate querybuilder ([9304097](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/93040978433a3e2b7ec6ad66a746606b8776e308))
|
|
17
|
+
|
|
1
18
|
# [4.26.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v4.25.2...v4.26.0) (2026-09-09)
|
|
2
19
|
|
|
3
20
|
|
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.
|
|
24
|
+
@speedkit/cli/4.27.1 linux-x64 node-v22.23.2
|
|
25
25
|
$ sk --help [COMMAND]
|
|
26
26
|
USAGE
|
|
27
27
|
$ sk COMMAND
|
|
@@ -92,6 +92,8 @@ By either...
|
|
|
92
92
|
* [`sk param-diff PAGEURL`](#sk-param-diff-pageurl)
|
|
93
93
|
* [`sk prewarm APP PATH`](#sk-prewarm-app-path)
|
|
94
94
|
* [`sk pull CUSTOMERPATH`](#sk-pull-customerpath)
|
|
95
|
+
* [`sk query parameter CUSTOMERPATH`](#sk-query-parameter-customerpath)
|
|
96
|
+
* [`sk query prewarm CUSTOMERPATH`](#sk-query-prewarm-customerpath)
|
|
95
97
|
* [`sk revalidate APP`](#sk-revalidate-app)
|
|
96
98
|
* [`sk wpt-launcher URLS TESTID`](#sk-wpt-launcher-urls-testid)
|
|
97
99
|
|
|
@@ -101,18 +103,38 @@ Build and execute the prewarm query for a customer config and start a prewarm jo
|
|
|
101
103
|
|
|
102
104
|
```
|
|
103
105
|
USAGE
|
|
104
|
-
$ sk auto-prewarm CUSTOMERPATH [
|
|
106
|
+
$ sk auto-prewarm CUSTOMERPATH [--workgroup <value>] [-c <value>] [-d <value>] [--excludeNoindex]
|
|
107
|
+
[--excludeSuspicious] [--explain] [--hardNavigationsOnly] [--excludeNotFound] [--limit <value>] [--match <value>...]
|
|
108
|
+
[--minHits <value>] [-p <value> | [--device desktop|mobile|tablet... | -v <value>...] | ] [-k] [-q] [--verbose]
|
|
105
109
|
|
|
106
110
|
ARGUMENTS
|
|
107
111
|
CUSTOMERPATH The customer config path
|
|
108
112
|
|
|
109
113
|
FLAGS
|
|
110
114
|
-c, --configName=<value> [default: production] The costumer config name
|
|
115
|
+
-d, --days=<value> Number of days the query looks back
|
|
111
116
|
-k, --keepParameterSorting Prevents alphabetical sorting of the URL parameters
|
|
112
117
|
-p, --variationPath=<value> path to variations.csv
|
|
113
118
|
-q, --quiet less output non interactive
|
|
114
|
-
-v, --variation=<value
|
|
119
|
+
-v, --variation=<value>... Pair every url of the list with each of these variations. For the custom variations no
|
|
120
|
+
traffic can reveal, e.g. 'desktop-pdp-a,mobile-pdp-a'
|
|
121
|
+
--device=<option>... Split the list by device class, so every url is warmed in the variations it was actually
|
|
122
|
+
requested in. A class not named is left out
|
|
123
|
+
<options: desktop|mobile|tablet>
|
|
124
|
+
--excludeNoindex Exclude page impressions of pages marked noindex
|
|
125
|
+
--excludeNotFound Leave out urls the origin answers with a 404 more often than not
|
|
126
|
+
--excludeSuspicious Exclude page impressions Speed Kit classified as suspicious
|
|
127
|
+
--explain Account for every rule the query leaves out, reduces or approximates
|
|
128
|
+
--hardNavigationsOnly Exclude soft (SPA) navigations
|
|
129
|
+
--limit=<value> Keep only the most requested urls
|
|
130
|
+
--match=<value>... Keep only urls whose path matches this regular expression, e.g. '^/p/'. The path is
|
|
131
|
+
matched with its query string, the way a version 1 pathname rule matches it, so
|
|
132
|
+
'[?&]size=' works too. Repeat the flag to keep the urls matching any of several patterns,
|
|
133
|
+
and start a pattern with (?i) to match case-insensitively
|
|
134
|
+
--minHits=<value> Keep only urls requested at least this often in the window
|
|
115
135
|
--verbose Log information about failed requests
|
|
136
|
+
--workgroup=<value> [env: SK_ATHENA_WORKGROUP] Athena workgroup to run the query in, e.g. 'prewarming'.
|
|
137
|
+
Defaults to the account's default workgroup
|
|
116
138
|
|
|
117
139
|
DESCRIPTION
|
|
118
140
|
Build and execute the prewarm query for a customer config and start a prewarm job from the resulting URLs — no CSV
|
|
@@ -123,7 +145,13 @@ EXAMPLES
|
|
|
123
145
|
|
|
124
146
|
$ sk auto-prewarm customers/decathlon.de -c production
|
|
125
147
|
|
|
148
|
+
$ sk auto-prewarm customers/decathlon.de --device desktop,mobile
|
|
149
|
+
|
|
126
150
|
$ sk auto-prewarm customers/decathlon.de -v MOBILE,DESKTOP
|
|
151
|
+
|
|
152
|
+
$ sk auto-prewarm customers/decathlon.de --limit 5000 --minHits 5
|
|
153
|
+
|
|
154
|
+
$ sk auto-prewarm customers/decathlon.de --workgroup prewarming
|
|
127
155
|
```
|
|
128
156
|
|
|
129
157
|
## `sk autocomplete [SHELL]`
|
|
@@ -233,21 +261,39 @@ Build a parameter query that can be executed in Athena
|
|
|
233
261
|
|
|
234
262
|
```
|
|
235
263
|
USAGE
|
|
236
|
-
$ sk build-parameter-query CUSTOMERPATH [-c <value>]
|
|
264
|
+
$ sk build-parameter-query CUSTOMERPATH [--workgroup <value>] [-c <value>] [-d <value>] [--excludeNoindex]
|
|
265
|
+
[--excludeSuspicious] [--explain] [--hardNavigationsOnly] [-e] [-q] [--bySet] [--minImpressions <value>]
|
|
237
266
|
|
|
238
267
|
ARGUMENTS
|
|
239
268
|
CUSTOMERPATH The customer config path
|
|
240
269
|
|
|
241
270
|
FLAGS
|
|
242
|
-
-c, --configName=<value>
|
|
271
|
+
-c, --configName=<value> [default: production] The costumer config name
|
|
272
|
+
-d, --days=<value> Number of days the query looks back
|
|
273
|
+
-e, --execute Execute the query directly and write the result to a <app>-<date>-<query>.csv file
|
|
274
|
+
-q, --quiet Output only the raw query without clipboard copy or styling
|
|
275
|
+
--bySet Rank whole sets of parameters instead of single parameters, to see which ones travel
|
|
276
|
+
together
|
|
277
|
+
--excludeNoindex Exclude page impressions of pages marked noindex
|
|
278
|
+
--excludeSuspicious Exclude page impressions Speed Kit classified as suspicious
|
|
279
|
+
--explain Account for every rule the query leaves out, reduces or approximates
|
|
280
|
+
--hardNavigationsOnly Exclude soft (SPA) navigations
|
|
281
|
+
--minImpressions=<value> Leave out parameters seen on fewer page impressions than this
|
|
282
|
+
--workgroup=<value> [env: SK_ATHENA_WORKGROUP] Athena workgroup to run the query in, e.g. 'prewarming'.
|
|
283
|
+
Defaults to the account's default workgroup
|
|
243
284
|
|
|
244
285
|
DESCRIPTION
|
|
245
286
|
Build a parameter query that can be executed in Athena
|
|
246
287
|
|
|
288
|
+
ALIASES
|
|
289
|
+
$ sk build-parameter-query
|
|
290
|
+
|
|
247
291
|
EXAMPLES
|
|
248
|
-
$ sk
|
|
292
|
+
$ sk query parameter <customerPath> -c <configName>
|
|
293
|
+
|
|
294
|
+
$ sk query parameter customers/decathlon.de -c production
|
|
249
295
|
|
|
250
|
-
$ sk
|
|
296
|
+
$ sk query parameter customers/decathlon.de --explain
|
|
251
297
|
```
|
|
252
298
|
|
|
253
299
|
## `sk build-prewarm-query CUSTOMERPATH`
|
|
@@ -256,23 +302,60 @@ Build a prewarm query that can be executed in Athena
|
|
|
256
302
|
|
|
257
303
|
```
|
|
258
304
|
USAGE
|
|
259
|
-
$ sk build-prewarm-query CUSTOMERPATH [-c <value>] [-
|
|
305
|
+
$ sk build-prewarm-query CUSTOMERPATH [--workgroup <value>] [-c <value>] [-d <value>] [--excludeNoindex]
|
|
306
|
+
[--excludeSuspicious] [--explain] [--hardNavigationsOnly] [-q] [--device desktop|mobile|tablet... | -v <value>...]
|
|
307
|
+
[--excludeNotFound] [--limit <value>] [--match <value>...] [--minHits <value>] [--count | -e]
|
|
260
308
|
|
|
261
309
|
ARGUMENTS
|
|
262
310
|
CUSTOMERPATH The customer config path
|
|
263
311
|
|
|
264
312
|
FLAGS
|
|
265
|
-
-c, --configName=<value>
|
|
266
|
-
-
|
|
267
|
-
-
|
|
313
|
+
-c, --configName=<value> [default: production] The costumer config name
|
|
314
|
+
-d, --days=<value> Number of days the query looks back
|
|
315
|
+
-e, --execute Execute the query directly and write the result to a <app>-<date>-<query>.csv file
|
|
316
|
+
-q, --quiet Output only the raw query without clipboard copy or styling
|
|
317
|
+
-v, --variation=<value>... Pair every url of the list with each of these variations. For the custom variations no
|
|
318
|
+
traffic can reveal, e.g. 'desktop-pdp-a,mobile-pdp-a'
|
|
319
|
+
--count Run the query and report how large the list is instead of what is in it: urls, the
|
|
320
|
+
impressions they stand for, and a row per variation where the list carries variations.
|
|
321
|
+
Every other flag still applies, so this counts the list the same command would produce
|
|
322
|
+
--device=<option>... Split the list by device class, so every url is warmed in the variations it was actually
|
|
323
|
+
requested in. A class not named is left out
|
|
324
|
+
<options: desktop|mobile|tablet>
|
|
325
|
+
--excludeNoindex Exclude page impressions of pages marked noindex
|
|
326
|
+
--excludeNotFound Leave out urls the origin answers with a 404 more often than not
|
|
327
|
+
--excludeSuspicious Exclude page impressions Speed Kit classified as suspicious
|
|
328
|
+
--explain Account for every rule the query leaves out, reduces or approximates
|
|
329
|
+
--hardNavigationsOnly Exclude soft (SPA) navigations
|
|
330
|
+
--limit=<value> Keep only the most requested urls
|
|
331
|
+
--match=<value>... Keep only urls whose path matches this regular expression, e.g. '^/p/'. The path is
|
|
332
|
+
matched with its query string, the way a version 1 pathname rule matches it, so
|
|
333
|
+
'[?&]size=' works too. Repeat the flag to keep the urls matching any of several patterns,
|
|
334
|
+
and start a pattern with (?i) to match case-insensitively
|
|
335
|
+
--minHits=<value> Keep only urls requested at least this often in the window
|
|
336
|
+
--workgroup=<value> [env: SK_ATHENA_WORKGROUP] Athena workgroup to run the query in, e.g. 'prewarming'.
|
|
337
|
+
Defaults to the account's default workgroup
|
|
268
338
|
|
|
269
339
|
DESCRIPTION
|
|
270
340
|
Build a prewarm query that can be executed in Athena
|
|
271
341
|
|
|
342
|
+
ALIASES
|
|
343
|
+
$ sk build-prewarm-query
|
|
344
|
+
|
|
272
345
|
EXAMPLES
|
|
273
|
-
$ sk
|
|
346
|
+
$ sk query prewarm <customerPath> -c <configName>
|
|
347
|
+
|
|
348
|
+
$ sk query prewarm customers/decathlon.de -c production
|
|
349
|
+
|
|
350
|
+
$ sk query prewarm customers/decathlon.de --explain
|
|
351
|
+
|
|
352
|
+
$ sk query prewarm customers/decathlon.de --match '^/p/'
|
|
353
|
+
|
|
354
|
+
$ sk query prewarm customers/decathlon.de --device desktop,mobile
|
|
355
|
+
|
|
356
|
+
$ sk query prewarm customers/decathlon.de -v MOBILE,DESKTOP
|
|
274
357
|
|
|
275
|
-
$ sk
|
|
358
|
+
$ sk query prewarm customers/decathlon.de --count
|
|
276
359
|
```
|
|
277
360
|
|
|
278
361
|
## `sk config edit`
|
|
@@ -516,7 +599,7 @@ Generate a pop config for the given app
|
|
|
516
599
|
|
|
517
600
|
```
|
|
518
601
|
USAGE
|
|
519
|
-
$ sk generate-pop-config APP [-c <value>] [-d] [-p <value>] [-t <value>] [-r] [-s]
|
|
602
|
+
$ sk generate-pop-config APP [--days <value>] [-c <value>] [-d] [-p <value>] [-t <value>] [-r] [-s]
|
|
520
603
|
|
|
521
604
|
ARGUMENTS
|
|
522
605
|
APP The customers appName
|
|
@@ -530,6 +613,7 @@ FLAGS
|
|
|
530
613
|
-s, --force-shield Force a shield based prewarming config.
|
|
531
614
|
-t, --traffic-share=<value> [default: 5] The minimum traffic share in percent a pop must have to be actually
|
|
532
615
|
prewarmed.
|
|
616
|
+
--days=<value> Number of days the query looks back
|
|
533
617
|
|
|
534
618
|
DESCRIPTION
|
|
535
619
|
Generate a pop config for the given app
|
|
@@ -700,7 +784,8 @@ FLAGS
|
|
|
700
784
|
-k, --keepParameterSorting Prevents alphabetical sorting of the URL parameters
|
|
701
785
|
-p, --variationPath=<value> path to variations.csv
|
|
702
786
|
-q, --quiet less output non interactive
|
|
703
|
-
-v, --variation=<value>
|
|
787
|
+
-v, --variation=<value> Warm every url of the list in each of these variations, e.g. 'desktop,mobile'. Ignored
|
|
788
|
+
for a list that names a variation itself
|
|
704
789
|
--verbose Log information about failed requests
|
|
705
790
|
|
|
706
791
|
DESCRIPTION
|
|
@@ -747,6 +832,109 @@ EXAMPLES
|
|
|
747
832
|
$ sk pull customers/decathlon.de -c production
|
|
748
833
|
```
|
|
749
834
|
|
|
835
|
+
## `sk query parameter CUSTOMERPATH`
|
|
836
|
+
|
|
837
|
+
Build a parameter query that can be executed in Athena
|
|
838
|
+
|
|
839
|
+
```
|
|
840
|
+
USAGE
|
|
841
|
+
$ sk query parameter CUSTOMERPATH [--workgroup <value>] [-c <value>] [-d <value>] [--excludeNoindex]
|
|
842
|
+
[--excludeSuspicious] [--explain] [--hardNavigationsOnly] [-e] [-q] [--bySet] [--minImpressions <value>]
|
|
843
|
+
|
|
844
|
+
ARGUMENTS
|
|
845
|
+
CUSTOMERPATH The customer config path
|
|
846
|
+
|
|
847
|
+
FLAGS
|
|
848
|
+
-c, --configName=<value> [default: production] The costumer config name
|
|
849
|
+
-d, --days=<value> Number of days the query looks back
|
|
850
|
+
-e, --execute Execute the query directly and write the result to a <app>-<date>-<query>.csv file
|
|
851
|
+
-q, --quiet Output only the raw query without clipboard copy or styling
|
|
852
|
+
--bySet Rank whole sets of parameters instead of single parameters, to see which ones travel
|
|
853
|
+
together
|
|
854
|
+
--excludeNoindex Exclude page impressions of pages marked noindex
|
|
855
|
+
--excludeSuspicious Exclude page impressions Speed Kit classified as suspicious
|
|
856
|
+
--explain Account for every rule the query leaves out, reduces or approximates
|
|
857
|
+
--hardNavigationsOnly Exclude soft (SPA) navigations
|
|
858
|
+
--minImpressions=<value> Leave out parameters seen on fewer page impressions than this
|
|
859
|
+
--workgroup=<value> [env: SK_ATHENA_WORKGROUP] Athena workgroup to run the query in, e.g. 'prewarming'.
|
|
860
|
+
Defaults to the account's default workgroup
|
|
861
|
+
|
|
862
|
+
DESCRIPTION
|
|
863
|
+
Build a parameter query that can be executed in Athena
|
|
864
|
+
|
|
865
|
+
ALIASES
|
|
866
|
+
$ sk build-parameter-query
|
|
867
|
+
|
|
868
|
+
EXAMPLES
|
|
869
|
+
$ sk query parameter <customerPath> -c <configName>
|
|
870
|
+
|
|
871
|
+
$ sk query parameter customers/decathlon.de -c production
|
|
872
|
+
|
|
873
|
+
$ sk query parameter customers/decathlon.de --explain
|
|
874
|
+
```
|
|
875
|
+
|
|
876
|
+
## `sk query prewarm CUSTOMERPATH`
|
|
877
|
+
|
|
878
|
+
Build a prewarm query that can be executed in Athena
|
|
879
|
+
|
|
880
|
+
```
|
|
881
|
+
USAGE
|
|
882
|
+
$ sk query prewarm CUSTOMERPATH [--workgroup <value>] [-c <value>] [-d <value>] [--excludeNoindex]
|
|
883
|
+
[--excludeSuspicious] [--explain] [--hardNavigationsOnly] [-q] [--device desktop|mobile|tablet... | -v <value>...]
|
|
884
|
+
[--excludeNotFound] [--limit <value>] [--match <value>...] [--minHits <value>] [--count | -e]
|
|
885
|
+
|
|
886
|
+
ARGUMENTS
|
|
887
|
+
CUSTOMERPATH The customer config path
|
|
888
|
+
|
|
889
|
+
FLAGS
|
|
890
|
+
-c, --configName=<value> [default: production] The costumer config name
|
|
891
|
+
-d, --days=<value> Number of days the query looks back
|
|
892
|
+
-e, --execute Execute the query directly and write the result to a <app>-<date>-<query>.csv file
|
|
893
|
+
-q, --quiet Output only the raw query without clipboard copy or styling
|
|
894
|
+
-v, --variation=<value>... Pair every url of the list with each of these variations. For the custom variations no
|
|
895
|
+
traffic can reveal, e.g. 'desktop-pdp-a,mobile-pdp-a'
|
|
896
|
+
--count Run the query and report how large the list is instead of what is in it: urls, the
|
|
897
|
+
impressions they stand for, and a row per variation where the list carries variations.
|
|
898
|
+
Every other flag still applies, so this counts the list the same command would produce
|
|
899
|
+
--device=<option>... Split the list by device class, so every url is warmed in the variations it was actually
|
|
900
|
+
requested in. A class not named is left out
|
|
901
|
+
<options: desktop|mobile|tablet>
|
|
902
|
+
--excludeNoindex Exclude page impressions of pages marked noindex
|
|
903
|
+
--excludeNotFound Leave out urls the origin answers with a 404 more often than not
|
|
904
|
+
--excludeSuspicious Exclude page impressions Speed Kit classified as suspicious
|
|
905
|
+
--explain Account for every rule the query leaves out, reduces or approximates
|
|
906
|
+
--hardNavigationsOnly Exclude soft (SPA) navigations
|
|
907
|
+
--limit=<value> Keep only the most requested urls
|
|
908
|
+
--match=<value>... Keep only urls whose path matches this regular expression, e.g. '^/p/'. The path is
|
|
909
|
+
matched with its query string, the way a version 1 pathname rule matches it, so
|
|
910
|
+
'[?&]size=' works too. Repeat the flag to keep the urls matching any of several patterns,
|
|
911
|
+
and start a pattern with (?i) to match case-insensitively
|
|
912
|
+
--minHits=<value> Keep only urls requested at least this often in the window
|
|
913
|
+
--workgroup=<value> [env: SK_ATHENA_WORKGROUP] Athena workgroup to run the query in, e.g. 'prewarming'.
|
|
914
|
+
Defaults to the account's default workgroup
|
|
915
|
+
|
|
916
|
+
DESCRIPTION
|
|
917
|
+
Build a prewarm query that can be executed in Athena
|
|
918
|
+
|
|
919
|
+
ALIASES
|
|
920
|
+
$ sk build-prewarm-query
|
|
921
|
+
|
|
922
|
+
EXAMPLES
|
|
923
|
+
$ sk query prewarm <customerPath> -c <configName>
|
|
924
|
+
|
|
925
|
+
$ sk query prewarm customers/decathlon.de -c production
|
|
926
|
+
|
|
927
|
+
$ sk query prewarm customers/decathlon.de --explain
|
|
928
|
+
|
|
929
|
+
$ sk query prewarm customers/decathlon.de --match '^/p/'
|
|
930
|
+
|
|
931
|
+
$ sk query prewarm customers/decathlon.de --device desktop,mobile
|
|
932
|
+
|
|
933
|
+
$ sk query prewarm customers/decathlon.de -v MOBILE,DESKTOP
|
|
934
|
+
|
|
935
|
+
$ sk query prewarm customers/decathlon.de --count
|
|
936
|
+
```
|
|
937
|
+
|
|
750
938
|
## `sk revalidate APP`
|
|
751
939
|
|
|
752
940
|
Purge or refresh cached assets by prefix and query. Run it after a config that narrows scope goes live, so returning visitors stop receiving the cached HTML.
|
|
@@ -8,12 +8,23 @@ export default class AutoPrewarm extends Command {
|
|
|
8
8
|
static description: string;
|
|
9
9
|
static examples: string[];
|
|
10
10
|
static flags: {
|
|
11
|
-
variation: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
11
|
variationPath: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
12
|
keepParameterSorting: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
13
|
quiet: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
14
|
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
excludeNotFound: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
limit: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
match: import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
minHits: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
device: import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
variation: import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
excludeNoindex: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
22
|
+
excludeSuspicious: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
23
|
+
explain: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
24
|
+
hardNavigationsOnly: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
25
|
+
days: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
26
|
configName: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
27
|
+
workgroup: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
28
|
};
|
|
18
29
|
run(): Promise<void>;
|
|
19
30
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command, Flags } from "@oclif/core";
|
|
2
|
-
import { CLI_CONFIG_NAME, CLI_CUSTOMER_CONFIG, CLIParameters, CLIParametersChar, CLIParametersExample, } from "../models/cli-parameters.js";
|
|
2
|
+
import { CLI_ATHENA, CLI_CONFIG_NAME, CLI_CUSTOMER_CONFIG, CLI_QUERY_DAYS, CLI_QUERY_FILTERS, CLI_QUERY_PREWARM_LIST, CLIParameters, CLIParametersChar, CLIParametersExample, } from "../models/cli-parameters.js";
|
|
3
3
|
import { CliConfig } from "../helpers/cli-config.js";
|
|
4
4
|
import { AutoPreWarmFactory } from "../services/prewarm/index.js";
|
|
5
5
|
export default class AutoPrewarm extends Command {
|
|
@@ -8,18 +8,27 @@ export default class AutoPrewarm extends Command {
|
|
|
8
8
|
static examples = [
|
|
9
9
|
`$ sk auto-prewarm <${CLIParameters.CustomerPath}> -${CLIParametersChar.ConfigName} <${CLIParameters.ConfigName}>`,
|
|
10
10
|
`$ sk auto-prewarm ${CLIParametersExample.CustomerPath} -${CLIParametersChar.ConfigName} ${CLIParametersExample.ConfigName}`,
|
|
11
|
+
`$ sk auto-prewarm ${CLIParametersExample.CustomerPath} --${CLIParameters.Device} ${CLIParametersExample.Devices}`,
|
|
11
12
|
`$ sk auto-prewarm ${CLIParametersExample.CustomerPath} -${CLIParametersChar.Variation} ${CLIParametersExample.Variations}`,
|
|
13
|
+
`$ sk auto-prewarm ${CLIParametersExample.CustomerPath} --${CLIParameters.Limit} 5000 --${CLIParameters.MinHits} 5`,
|
|
14
|
+
`$ sk auto-prewarm ${CLIParametersExample.CustomerPath} --${CLIParameters.Workgroup} prewarming`,
|
|
12
15
|
];
|
|
13
16
|
static flags = {
|
|
17
|
+
...CLI_ATHENA,
|
|
14
18
|
...CLI_CONFIG_NAME,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
...CLI_QUERY_DAYS,
|
|
20
|
+
...CLI_QUERY_FILTERS,
|
|
21
|
+
// Every flag that shapes the pre-warm list, not a subset of them: this
|
|
22
|
+
// command builds the same query `sk query prewarm` does, and a list it
|
|
23
|
+
// could not narrow the same way could not be counted by that command
|
|
24
|
+
// either — the two would describe different runs. `--count` is not among
|
|
25
|
+
// them: this command warms the list rather than reporting its size.
|
|
26
|
+
...CLI_QUERY_PREWARM_LIST,
|
|
27
|
+
// A variations file says what `--variation` says, read from disk.
|
|
19
28
|
[CLIParameters.VariationPath]: Flags.file({
|
|
20
29
|
char: CLIParametersChar.VariationPath,
|
|
21
|
-
exclusive: [CLIParameters.Variation],
|
|
22
30
|
description: "path to variations.csv",
|
|
31
|
+
exclusive: [CLIParameters.Device, CLIParameters.Variation],
|
|
23
32
|
}),
|
|
24
33
|
[CLIParameters.KeepParameterSorting]: Flags.boolean({
|
|
25
34
|
char: CLIParametersChar.KeepParameterSorting,
|
|
@@ -37,15 +46,25 @@ export default class AutoPrewarm extends Command {
|
|
|
37
46
|
}),
|
|
38
47
|
};
|
|
39
48
|
async run() {
|
|
40
|
-
const { args: { customerPath }, flags: { configName,
|
|
49
|
+
const { args: { customerPath }, flags: { configName, days, device, excludeNoindex, excludeNotFound, excludeSuspicious, hardNavigationsOnly, keepParameterSorting, limit, match, minHits, quiet, variation, variationPath, verbose, workgroup, }, } = await this.parse(AutoPrewarm);
|
|
41
50
|
const service = await new AutoPreWarmFactory({
|
|
42
51
|
customerPath,
|
|
43
52
|
configName,
|
|
53
|
+
days,
|
|
54
|
+
device,
|
|
55
|
+
excludeNoindex,
|
|
56
|
+
excludeNotFound,
|
|
57
|
+
excludeSuspicious,
|
|
58
|
+
hardNavigationsOnly,
|
|
59
|
+
limit,
|
|
60
|
+
match,
|
|
61
|
+
minHits,
|
|
44
62
|
variation,
|
|
45
63
|
variationPath,
|
|
46
64
|
sortParameters: !keepParameterSorting,
|
|
47
65
|
quiet,
|
|
48
66
|
verbose,
|
|
67
|
+
workgroup,
|
|
49
68
|
isWindows: this.config.windows,
|
|
50
69
|
}, new CliConfig(this.config).load()).getService();
|
|
51
70
|
await service.run();
|
|
@@ -6,6 +6,7 @@ export default class GeneratePopConfig extends Command {
|
|
|
6
6
|
static description: string;
|
|
7
7
|
static examples: string[];
|
|
8
8
|
static flags: {
|
|
9
|
+
days: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
10
|
coverage: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
11
|
deploy: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
12
|
"pop-limit": import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Args, Command, Flags } from "@oclif/core";
|
|
2
2
|
import { account } from "baqend/cli";
|
|
3
3
|
import { readLocalFile } from "../helpers/file-helper.js";
|
|
4
|
-
import { CLIParameters } from "../models/cli-parameters.js";
|
|
4
|
+
import { CLI_QUERY_DAYS_DESCRIPTION, CLIParameters, } from "../models/cli-parameters.js";
|
|
5
5
|
import { CliServiceFactory } from "../services/cli/index.js";
|
|
6
6
|
import ConfigApiService from "../services/config-api-service.js";
|
|
7
7
|
import { PopConfigFactory, } from "../services/pop-config/index.js";
|
|
@@ -88,6 +88,12 @@ export default class GeneratePopConfig extends Command {
|
|
|
88
88
|
"$ sk generate-pop-config --coverage 95 --pop-limit 6 --traffic-share 2 --deploy appName",
|
|
89
89
|
];
|
|
90
90
|
static flags = {
|
|
91
|
+
// No short flag: `-d` belongs to `--deploy` on this command.
|
|
92
|
+
[CLIParameters.Days]: Flags.integer({
|
|
93
|
+
description: CLI_QUERY_DAYS_DESCRIPTION,
|
|
94
|
+
min: 1,
|
|
95
|
+
required: false,
|
|
96
|
+
}),
|
|
91
97
|
coverage: Flags.integer({
|
|
92
98
|
char: "c",
|
|
93
99
|
default: 95,
|
|
@@ -150,10 +156,10 @@ export default class GeneratePopConfig extends Command {
|
|
|
150
156
|
}
|
|
151
157
|
}
|
|
152
158
|
async run() {
|
|
153
|
-
const { args: { app }, flags: { coverage, deploy, "pop-limit": popLimit, "traffic-share": minimalShare, "use-rum": useRum, "force-shield": forceShield, }, } = await this.parse(GeneratePopConfig);
|
|
159
|
+
const { args: { app }, flags: { coverage, deploy, days, "pop-limit": popLimit, "traffic-share": minimalShare, "use-rum": useRum, "force-shield": forceShield, }, } = await this.parse(GeneratePopConfig);
|
|
154
160
|
// @todo refactor businessCode from this command to src/pop-config/pop-config-service
|
|
155
161
|
const popConfigService = await new PopConfigFactory().getService(app);
|
|
156
|
-
const result = await popConfigService.getUsedPopsPerOrigin(app, useRum);
|
|
162
|
+
const result = await popConfigService.getUsedPopsPerOrigin(app, useRum, days);
|
|
157
163
|
const originStats = this.generateOriginStats(result)
|
|
158
164
|
.filter((stats) => {
|
|
159
165
|
if (stats.hits < 100)
|
package/dist/commands/prewarm.js
CHANGED
|
@@ -16,9 +16,11 @@ export default class Prewarm extends Command {
|
|
|
16
16
|
}),
|
|
17
17
|
};
|
|
18
18
|
static flags = {
|
|
19
|
+
// No default: the list may already name a variation per url, and only a
|
|
20
|
+
// flag the caller really gave should be reported as ignored then.
|
|
19
21
|
[CLIParameters.Variation]: Flags.string({
|
|
20
22
|
char: CLIParametersChar.Variation,
|
|
21
|
-
|
|
23
|
+
description: "Warm every url of the list in each of these variations, e.g. 'desktop,mobile'. Ignored for a list that names a variation itself",
|
|
22
24
|
}),
|
|
23
25
|
[CLIParameters.VariationPath]: Flags.file({
|
|
24
26
|
char: CLIParametersChar.VariationPath,
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Command } from "@oclif/core";
|
|
2
|
+
export default class QueryParameter extends Command {
|
|
3
|
+
static args: {
|
|
4
|
+
customerPath: import("@oclif/core/interfaces").Arg<string, {
|
|
5
|
+
exists?: boolean;
|
|
6
|
+
}>;
|
|
7
|
+
};
|
|
8
|
+
/** The command was `sk build-parameter-query` before it moved under `query`. */
|
|
9
|
+
static aliases: string[];
|
|
10
|
+
static deprecateAliases: boolean;
|
|
11
|
+
static description: string;
|
|
12
|
+
static examples: string[];
|
|
13
|
+
static flags: {
|
|
14
|
+
bySet: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
minImpressions: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
execute: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
|
+
quiet: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
18
|
+
excludeNoindex: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
19
|
+
excludeSuspicious: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
20
|
+
explain: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
21
|
+
hardNavigationsOnly: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
22
|
+
days: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
|
+
configName: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
24
|
+
workgroup: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
25
|
+
};
|
|
26
|
+
run(): Promise<void>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Command } from "@oclif/core";
|
|
2
|
+
import { CLI_ATHENA, CLI_CONFIG_NAME, CLI_CUSTOMER_CONFIG, CLI_QUERY_DAYS, CLI_QUERY_FILTERS, CLI_QUERY_OUTPUT, CLI_QUERY_PARAMETER, CLIParameters, CLIParametersChar, CLIParametersExample, } from "../../models/cli-parameters.js";
|
|
3
|
+
import { QueryType } from "../../services/query-builder/query-builder-model.js";
|
|
4
|
+
import { runQuery } from "../../services/query-builder/query-command.js";
|
|
5
|
+
export default class QueryParameter extends Command {
|
|
6
|
+
static args = CLI_CUSTOMER_CONFIG;
|
|
7
|
+
/** The command was `sk build-parameter-query` before it moved under `query`. */
|
|
8
|
+
static aliases = ["build-parameter-query"];
|
|
9
|
+
static deprecateAliases = true;
|
|
10
|
+
static description = "Build a parameter query that can be executed in Athena";
|
|
11
|
+
static examples = [
|
|
12
|
+
`$ sk query parameter <${CLIParameters.CustomerPath}> -${CLIParametersChar.ConfigName} <${CLIParameters.ConfigName}>`,
|
|
13
|
+
`$ sk query parameter ${CLIParametersExample.CustomerPath} -${CLIParametersChar.ConfigName} ${CLIParametersExample.ConfigName}`,
|
|
14
|
+
`$ sk query parameter ${CLIParametersExample.CustomerPath} --${CLIParameters.Explain}`,
|
|
15
|
+
];
|
|
16
|
+
static flags = {
|
|
17
|
+
...CLI_ATHENA,
|
|
18
|
+
...CLI_CONFIG_NAME,
|
|
19
|
+
...CLI_QUERY_DAYS,
|
|
20
|
+
...CLI_QUERY_FILTERS,
|
|
21
|
+
...CLI_QUERY_OUTPUT,
|
|
22
|
+
...CLI_QUERY_PARAMETER,
|
|
23
|
+
};
|
|
24
|
+
async run() {
|
|
25
|
+
const { args: { customerPath }, flags, } = await this.parse(QueryParameter);
|
|
26
|
+
await runQuery(QueryType.parameter, customerPath, flags, this.config);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Command } from "@oclif/core";
|
|
2
|
+
export default class QueryPrewarm extends Command {
|
|
3
|
+
static args: {
|
|
4
|
+
customerPath: import("@oclif/core/interfaces").Arg<string, {
|
|
5
|
+
exists?: boolean;
|
|
6
|
+
}>;
|
|
7
|
+
};
|
|
8
|
+
/** The command was `sk build-prewarm-query` before it moved under `query`. */
|
|
9
|
+
static aliases: string[];
|
|
10
|
+
static deprecateAliases: boolean;
|
|
11
|
+
static description: string;
|
|
12
|
+
static examples: string[];
|
|
13
|
+
static flags: {
|
|
14
|
+
count: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
excludeNotFound: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
limit: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
match: import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
minHits: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
device: import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
variation: import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
execute: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
22
|
+
quiet: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
23
|
+
excludeNoindex: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
24
|
+
excludeSuspicious: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
25
|
+
explain: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
26
|
+
hardNavigationsOnly: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
27
|
+
days: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
28
|
+
configName: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
29
|
+
workgroup: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
30
|
+
};
|
|
31
|
+
run(): Promise<void>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Command } from "@oclif/core";
|
|
2
|
+
import { CLI_ATHENA, CLI_CONFIG_NAME, CLI_CUSTOMER_CONFIG, CLI_QUERY_DAYS, CLI_QUERY_FILTERS, CLI_QUERY_OUTPUT, CLI_QUERY_PREWARM, CLIParameters, CLIParametersChar, CLIParametersExample, } from "../../models/cli-parameters.js";
|
|
3
|
+
import { QueryType } from "../../services/query-builder/query-builder-model.js";
|
|
4
|
+
import { runQuery } from "../../services/query-builder/query-command.js";
|
|
5
|
+
export default class QueryPrewarm extends Command {
|
|
6
|
+
static args = CLI_CUSTOMER_CONFIG;
|
|
7
|
+
/** The command was `sk build-prewarm-query` before it moved under `query`. */
|
|
8
|
+
static aliases = ["build-prewarm-query"];
|
|
9
|
+
static deprecateAliases = true;
|
|
10
|
+
static description = "Build a prewarm query that can be executed in Athena";
|
|
11
|
+
static examples = [
|
|
12
|
+
`$ sk query prewarm <${CLIParameters.CustomerPath}> -${CLIParametersChar.ConfigName} <${CLIParameters.ConfigName}>`,
|
|
13
|
+
`$ sk query prewarm ${CLIParametersExample.CustomerPath} -${CLIParametersChar.ConfigName} ${CLIParametersExample.ConfigName}`,
|
|
14
|
+
`$ sk query prewarm ${CLIParametersExample.CustomerPath} --${CLIParameters.Explain}`,
|
|
15
|
+
`$ sk query prewarm ${CLIParametersExample.CustomerPath} --${CLIParameters.Match} '${CLIParametersExample.Match}'`,
|
|
16
|
+
`$ sk query prewarm ${CLIParametersExample.CustomerPath} --${CLIParameters.Device} ${CLIParametersExample.Devices}`,
|
|
17
|
+
`$ sk query prewarm ${CLIParametersExample.CustomerPath} -${CLIParametersChar.Variation} ${CLIParametersExample.Variations}`,
|
|
18
|
+
`$ sk query prewarm ${CLIParametersExample.CustomerPath} --${CLIParameters.Count}`,
|
|
19
|
+
];
|
|
20
|
+
static flags = {
|
|
21
|
+
...CLI_ATHENA,
|
|
22
|
+
...CLI_CONFIG_NAME,
|
|
23
|
+
...CLI_QUERY_DAYS,
|
|
24
|
+
...CLI_QUERY_FILTERS,
|
|
25
|
+
...CLI_QUERY_OUTPUT,
|
|
26
|
+
...CLI_QUERY_PREWARM,
|
|
27
|
+
};
|
|
28
|
+
async run() {
|
|
29
|
+
const { args: { customerPath }, flags, } = await this.parse(QueryPrewarm);
|
|
30
|
+
await runQuery(QueryType.prewarm, customerPath, flags, this.config);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Puts text on the system clipboard, and never holds up the CLI.
|
|
3
|
+
*
|
|
4
|
+
* `clipboardy.writeSync` cannot be used on Wayland. It runs `wl-copy` through
|
|
5
|
+
* `execaSync`, and `wl-copy` has to *stay alive* to own the selection — there
|
|
6
|
+
* is no clipboard daemon on Wayland, the source process serves the data. It
|
|
7
|
+
* forks into the background but inherits the pipes `execa` created, so the
|
|
8
|
+
* synchronous wait never returns: the command hangs after the work is done,
|
|
9
|
+
* with the output still unwritten, until the user interrupts it.
|
|
10
|
+
*
|
|
11
|
+
* On Wayland the tool is therefore started the way it wants to be — detached,
|
|
12
|
+
* with its output going nowhere, and unreferenced so Node can exit while it
|
|
13
|
+
* keeps serving the clipboard. Everywhere else `clipboardy` is used as before,
|
|
14
|
+
* behind a timeout, so no clipboard tool can ever be the reason a command
|
|
15
|
+
* appears to do nothing.
|
|
16
|
+
*
|
|
17
|
+
* @returns whether the text reached the clipboard.
|
|
18
|
+
*/
|
|
19
|
+
export declare function copyToClipboard(text: string): Promise<boolean>;
|