@speedkit/cli 4.26.0 → 4.27.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.
Files changed (147) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +186 -15
  3. package/dist/commands/auto-prewarm.d.ts +8 -1
  4. package/dist/commands/auto-prewarm.js +18 -7
  5. package/dist/commands/generate-pop-config.d.ts +1 -0
  6. package/dist/commands/generate-pop-config.js +9 -3
  7. package/dist/commands/prewarm.js +3 -1
  8. package/dist/commands/query/parameter.d.ts +26 -0
  9. package/dist/commands/query/parameter.js +27 -0
  10. package/dist/commands/query/prewarm.d.ts +31 -0
  11. package/dist/commands/query/prewarm.js +31 -0
  12. package/dist/helpers/clipboard.d.ts +19 -0
  13. package/dist/helpers/clipboard.js +70 -0
  14. package/dist/helpers/evaluate-speed-kit-config.d.ts +8 -18
  15. package/dist/helpers/evaluate-speed-kit-config.js +8 -6
  16. package/dist/helpers/evaluate-speed-kit-config.spec.d.ts +1 -0
  17. package/dist/helpers/evaluate-speed-kit-config.spec.js +78 -0
  18. package/dist/models/cli-parameters.d.ts +73 -0
  19. package/dist/models/cli-parameters.js +151 -0
  20. package/dist/models/cli-parameters.spec.d.ts +1 -0
  21. package/dist/models/cli-parameters.spec.js +47 -0
  22. package/dist/services/athena/athena-service.d.ts +2 -0
  23. package/dist/services/athena/athena-service.js +15 -4
  24. package/dist/services/athena/athena-service.spec.d.ts +1 -0
  25. package/dist/services/athena/athena-service.spec.js +74 -0
  26. package/dist/services/deploy/handler/install-resource-handler.js +3 -4
  27. package/dist/services/onboarding/onboarding-service-factory.js +2 -2
  28. package/dist/services/pop-config/pop-config-service.d.ts +8 -1
  29. package/dist/services/pop-config/pop-config-service.js +16 -28
  30. package/dist/services/prewarm/assets/asset-api-client.d.ts +1 -1
  31. package/dist/services/prewarm/assets/asset-api-client.js +5 -4
  32. package/dist/services/prewarm/auto-pre-warm-factory.d.ts +12 -2
  33. package/dist/services/prewarm/auto-pre-warm-factory.js +20 -6
  34. package/dist/services/prewarm/csv-reader.d.ts +21 -2
  35. package/dist/services/prewarm/csv-reader.js +71 -9
  36. package/dist/services/prewarm/csv-reader.spec.d.ts +1 -0
  37. package/dist/services/prewarm/csv-reader.spec.js +75 -0
  38. package/dist/services/prewarm/index.d.ts +1 -0
  39. package/dist/services/prewarm/index.js +1 -0
  40. package/dist/services/prewarm/pre-warm-factory.d.ts +0 -2
  41. package/dist/services/prewarm/pre-warm-factory.js +8 -11
  42. package/dist/services/prewarm/pre-warm-model.d.ts +14 -1
  43. package/dist/services/prewarm/pre-warm-model.js +0 -1
  44. package/dist/services/prewarm/pre-warm-service.d.ts +9 -4
  45. package/dist/services/prewarm/pre-warm-service.js +18 -14
  46. package/dist/services/prewarm/prewarm-targets.d.ts +12 -0
  47. package/dist/services/prewarm/prewarm-targets.js +18 -0
  48. package/dist/services/prewarm/prewarm-targets.spec.d.ts +1 -0
  49. package/dist/services/prewarm/prewarm-targets.spec.js +29 -0
  50. package/dist/services/query-builder/error/match-matches-nothing-error.d.ts +11 -0
  51. package/dist/services/query-builder/error/match-matches-nothing-error.js +17 -0
  52. package/dist/services/query-builder/queries/device.d.ts +21 -0
  53. package/dist/services/query-builder/queries/device.js +26 -0
  54. package/dist/services/query-builder/queries/index.d.ts +6 -0
  55. package/dist/services/query-builder/queries/index.js +6 -0
  56. package/dist/services/query-builder/queries/page-filter.d.ts +39 -0
  57. package/dist/services/query-builder/queries/page-filter.js +135 -0
  58. package/dist/services/query-builder/queries/page-source.d.ts +30 -0
  59. package/dist/services/query-builder/queries/page-source.js +79 -0
  60. package/dist/services/query-builder/queries/parameter-query.d.ts +14 -0
  61. package/dist/services/query-builder/queries/parameter-query.js +142 -0
  62. package/dist/services/query-builder/queries/pops-query.d.ts +27 -0
  63. package/dist/services/query-builder/queries/pops-query.js +65 -0
  64. package/dist/services/query-builder/queries/prewarm-query.d.ts +18 -0
  65. package/dist/services/query-builder/queries/prewarm-query.js +227 -0
  66. package/dist/services/query-builder/queries/query-model.d.ts +97 -0
  67. package/dist/services/query-builder/queries/query-model.js +19 -0
  68. package/dist/services/query-builder/queries/spec/golden-configs.d.ts +18 -0
  69. package/dist/services/query-builder/queries/spec/golden-configs.js +116 -0
  70. package/dist/services/query-builder/queries/spec/golden.spec.d.ts +1 -0
  71. package/dist/services/query-builder/queries/spec/golden.spec.js +161 -0
  72. package/dist/services/query-builder/queries/spec/pops-query.spec.d.ts +1 -0
  73. package/dist/services/query-builder/queries/spec/pops-query.spec.js +58 -0
  74. package/dist/services/query-builder/queries/spec/queries.spec.d.ts +1 -0
  75. package/dist/services/query-builder/queries/spec/queries.spec.js +312 -0
  76. package/dist/services/query-builder/queries/spec/reported-bugs.spec.d.ts +1 -0
  77. package/dist/services/query-builder/queries/spec/reported-bugs.spec.js +86 -0
  78. package/dist/services/query-builder/query-builder-factory.d.ts +2 -2
  79. package/dist/services/query-builder/query-builder-factory.js +35 -7
  80. package/dist/services/query-builder/query-builder-model.d.ts +31 -19
  81. package/dist/services/query-builder/query-builder-model.js +5 -5
  82. package/dist/services/query-builder/query-builder-service.d.ts +26 -5
  83. package/dist/services/query-builder/query-builder-service.js +157 -44
  84. package/dist/services/query-builder/query-command.d.ts +26 -0
  85. package/dist/services/query-builder/query-command.js +35 -0
  86. package/dist/services/query-builder/rules/index.d.ts +8 -0
  87. package/dist/services/query-builder/rules/index.js +8 -0
  88. package/dist/services/query-builder/rules/match-pattern.d.ts +51 -0
  89. package/dist/services/query-builder/rules/match-pattern.js +141 -0
  90. package/dist/services/query-builder/rules/pattern-language.d.ts +59 -0
  91. package/dist/services/query-builder/rules/pattern-language.js +159 -0
  92. package/dist/services/query-builder/rules/rule-model.d.ts +107 -0
  93. package/dist/services/query-builder/rules/rule-model.js +54 -0
  94. package/dist/services/query-builder/rules/rule-parser.d.ts +33 -0
  95. package/dist/services/query-builder/rules/rule-parser.js +189 -0
  96. package/dist/services/query-builder/rules/rule-reducer.d.ts +71 -0
  97. package/dist/services/query-builder/rules/rule-reducer.js +383 -0
  98. package/dist/services/query-builder/rules/rule-relevance.d.ts +43 -0
  99. package/dist/services/query-builder/rules/rule-relevance.js +69 -0
  100. package/dist/services/query-builder/rules/rule-to-sql.d.ts +51 -0
  101. package/dist/services/query-builder/rules/rule-to-sql.js +75 -0
  102. package/dist/services/query-builder/rules/spec/pattern-language.spec.d.ts +1 -0
  103. package/dist/services/query-builder/rules/spec/pattern-language.spec.js +90 -0
  104. package/dist/services/query-builder/rules/spec/rule-parser.spec.d.ts +1 -0
  105. package/dist/services/query-builder/rules/spec/rule-parser.spec.js +150 -0
  106. package/dist/services/query-builder/rules/spec/rule-reducer.spec.d.ts +1 -0
  107. package/dist/services/query-builder/rules/spec/rule-reducer.spec.js +169 -0
  108. package/dist/services/query-builder/rules/spec/rule-relevance.spec.d.ts +1 -0
  109. package/dist/services/query-builder/rules/spec/rule-relevance.spec.js +88 -0
  110. package/dist/services/query-builder/rules/spec/rule-to-sql.spec.d.ts +1 -0
  111. package/dist/services/query-builder/rules/spec/rule-to-sql.spec.js +110 -0
  112. package/dist/services/query-builder/rules/spec/runtime-semantics.spec.d.ts +1 -0
  113. package/dist/services/query-builder/rules/spec/runtime-semantics.spec.js +55 -0
  114. package/dist/services/query-builder/rules/spec/strip-parameters.spec.d.ts +1 -0
  115. package/dist/services/query-builder/rules/spec/strip-parameters.spec.js +85 -0
  116. package/dist/services/query-builder/rules/strip-parameters.d.ts +39 -0
  117. package/dist/services/query-builder/rules/strip-parameters.js +197 -0
  118. package/dist/services/query-builder/sql/expression.d.ts +73 -0
  119. package/dist/services/query-builder/sql/expression.js +133 -0
  120. package/dist/services/query-builder/sql/format.d.ts +14 -0
  121. package/dist/services/query-builder/sql/format.js +48 -0
  122. package/dist/services/query-builder/sql/index.d.ts +4 -0
  123. package/dist/services/query-builder/sql/index.js +4 -0
  124. package/dist/services/query-builder/sql/predicate.d.ts +66 -0
  125. package/dist/services/query-builder/sql/predicate.js +124 -0
  126. package/dist/services/query-builder/sql/regex.d.ts +28 -0
  127. package/dist/services/query-builder/sql/regex.js +81 -0
  128. package/dist/services/query-builder/sql/spec/expression.spec.d.ts +1 -0
  129. package/dist/services/query-builder/sql/spec/expression.spec.js +75 -0
  130. package/dist/services/query-builder/sql/spec/format.spec.d.ts +1 -0
  131. package/dist/services/query-builder/sql/spec/format.spec.js +37 -0
  132. package/dist/services/query-builder/sql/spec/predicate.spec.d.ts +1 -0
  133. package/dist/services/query-builder/sql/spec/predicate.spec.js +78 -0
  134. package/dist/services/query-builder/sql/spec/regex.spec.d.ts +1 -0
  135. package/dist/services/query-builder/sql/spec/regex.spec.js +62 -0
  136. package/oclif.manifest.json +350 -100
  137. package/package.json +11 -2
  138. package/dist/commands/build-parameter-query.d.ts +0 -14
  139. package/dist/commands/build-parameter-query.js +0 -25
  140. package/dist/commands/build-prewarm-query.d.ts +0 -16
  141. package/dist/commands/build-prewarm-query.js +0 -37
  142. package/dist/helpers/build-query-helper.d.ts +0 -32
  143. package/dist/helpers/build-query-helper.js +0 -223
  144. package/dist/helpers/get-parsed-config.d.ts +0 -15
  145. package/dist/helpers/get-parsed-config.js +0 -62
  146. package/dist/services/onboarding/dashboard/parameter-query-builder.d.ts +0 -8
  147. package/dist/services/onboarding/dashboard/parameter-query-builder.js +0 -63
package/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ # [4.27.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v4.26.0...v4.27.0) (2026-09-11)
2
+
3
+
4
+ ### Features
5
+
6
+ * **prewarm:** add --count to check how many urls will get prewarmed ([551b5e6](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/551b5e60f220e0046b7e8d755ca561679a2baefc))
7
+ * **prewarm:** carry the variation in the list instead of crossing it ([1679a2c](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/1679a2cdad3764b64a92bae2690299d0ca3f0d4e))
8
+ * **querybuilder:** add --match flag to narrow the prewarm list ([d59bcd5](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/d59bcd5c1690b7141e429e0b79eff1bc791dc29e))
9
+ * **querybuilder:** recreate querybuilder ([9304097](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/93040978433a3e2b7ec6ad66a746606b8776e308))
10
+
1
11
  # [4.26.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v4.25.2...v4.26.0) (2026-09-09)
2
12
 
3
13
 
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.26.0 linux-x64 node-v22.23.2
24
+ @speedkit/cli/4.27.0 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,17 +103,32 @@ 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 [-c <value>] [-p <value> | -v <value>] [-k] [-q] [--verbose]
106
+ $ sk auto-prewarm CUSTOMERPATH [-c <value>] [-d <value>] [--excludeNoindex] [--excludeSuspicious] [--explain]
107
+ [--hardNavigationsOnly] [--match <value>...] [-p <value> | [--device desktop|mobile|tablet... | -v <value>...] | ]
108
+ [-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> [default: default]
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
+ --excludeSuspicious Exclude page impressions Speed Kit classified as suspicious
126
+ --explain Account for every rule the query leaves out, reduces or approximates
127
+ --hardNavigationsOnly Exclude soft (SPA) navigations
128
+ --match=<value>... Keep only urls whose path matches this regular expression, e.g. '^/p/'. The path is
129
+ matched with its query string, the way a version 1 pathname rule matches it, so
130
+ '[?&]size=' works too. Repeat the flag to keep the urls matching any of several patterns,
131
+ and start a pattern with (?i) to match case-insensitively
115
132
  --verbose Log information about failed requests
116
133
 
117
134
  DESCRIPTION
@@ -123,6 +140,8 @@ EXAMPLES
123
140
 
124
141
  $ sk auto-prewarm customers/decathlon.de -c production
125
142
 
143
+ $ sk auto-prewarm customers/decathlon.de --device desktop,mobile
144
+
126
145
  $ sk auto-prewarm customers/decathlon.de -v MOBILE,DESKTOP
127
146
  ```
128
147
 
@@ -233,21 +252,37 @@ Build a parameter query that can be executed in Athena
233
252
 
234
253
  ```
235
254
  USAGE
236
- $ sk build-parameter-query CUSTOMERPATH [-c <value>]
255
+ $ sk build-parameter-query CUSTOMERPATH [-c <value>] [-d <value>] [--excludeNoindex] [--excludeSuspicious] [--explain]
256
+ [--hardNavigationsOnly] [-e] [-q] [--bySet] [--minImpressions <value>]
237
257
 
238
258
  ARGUMENTS
239
259
  CUSTOMERPATH The customer config path
240
260
 
241
261
  FLAGS
242
- -c, --configName=<value> [default: production] The costumer config name
262
+ -c, --configName=<value> [default: production] The costumer config name
263
+ -d, --days=<value> Number of days the query looks back
264
+ -e, --execute Execute the query directly and write the result to a <app>-<date>-<query>.csv file
265
+ -q, --quiet Output only the raw query without clipboard copy or styling
266
+ --bySet Rank whole sets of parameters instead of single parameters, to see which ones travel
267
+ together
268
+ --excludeNoindex Exclude page impressions of pages marked noindex
269
+ --excludeSuspicious Exclude page impressions Speed Kit classified as suspicious
270
+ --explain Account for every rule the query leaves out, reduces or approximates
271
+ --hardNavigationsOnly Exclude soft (SPA) navigations
272
+ --minImpressions=<value> Leave out parameters seen on fewer page impressions than this
243
273
 
244
274
  DESCRIPTION
245
275
  Build a parameter query that can be executed in Athena
246
276
 
277
+ ALIASES
278
+ $ sk build-parameter-query
279
+
247
280
  EXAMPLES
248
- $ sk build-parameter-query <customerPath> -c <configName>
281
+ $ sk query parameter <customerPath> -c <configName>
282
+
283
+ $ sk query parameter customers/decathlon.de -c production
249
284
 
250
- $ sk build-parameter-query customers/decathlon.de -c production
285
+ $ sk query parameter customers/decathlon.de --explain
251
286
  ```
252
287
 
253
288
  ## `sk build-prewarm-query CUSTOMERPATH`
@@ -256,23 +291,58 @@ Build a prewarm query that can be executed in Athena
256
291
 
257
292
  ```
258
293
  USAGE
259
- $ sk build-prewarm-query CUSTOMERPATH [-c <value>] [-q] [-e]
294
+ $ sk build-prewarm-query CUSTOMERPATH [-c <value>] [-d <value>] [--excludeNoindex] [--excludeSuspicious] [--explain]
295
+ [--hardNavigationsOnly] [-q] [--device desktop|mobile|tablet... | -v <value>...] [--count | -e] [--excludeNotFound]
296
+ [--limit <value>] [--match <value>...] [--minHits <value>]
260
297
 
261
298
  ARGUMENTS
262
299
  CUSTOMERPATH The customer config path
263
300
 
264
301
  FLAGS
265
- -c, --configName=<value> [default: production] The costumer config name
266
- -e, --execute Execute the query directly and write the result to a <app>-<date>-prewarm.csv file
267
- -q, --quiet Output only the raw query without clipboard copy or styling
302
+ -c, --configName=<value> [default: production] The costumer config name
303
+ -d, --days=<value> Number of days the query looks back
304
+ -e, --execute Execute the query directly and write the result to a <app>-<date>-<query>.csv file
305
+ -q, --quiet Output only the raw query without clipboard copy or styling
306
+ -v, --variation=<value>... Pair every url of the list with each of these variations. For the custom variations no
307
+ traffic can reveal, e.g. 'desktop-pdp-a,mobile-pdp-a'
308
+ --count Run the query and report how large the list is instead of what is in it: urls, the
309
+ impressions they stand for, and a row per variation where the list carries variations.
310
+ Every other flag still applies, so this counts the list the same command would produce
311
+ --device=<option>... Split the list by device class, so every url is warmed in the variations it was actually
312
+ requested in. A class not named is left out
313
+ <options: desktop|mobile|tablet>
314
+ --excludeNoindex Exclude page impressions of pages marked noindex
315
+ --excludeNotFound Leave out urls the origin answers with a 404 more often than not
316
+ --excludeSuspicious Exclude page impressions Speed Kit classified as suspicious
317
+ --explain Account for every rule the query leaves out, reduces or approximates
318
+ --hardNavigationsOnly Exclude soft (SPA) navigations
319
+ --limit=<value> Keep only the most requested urls
320
+ --match=<value>... Keep only urls whose path matches this regular expression, e.g. '^/p/'. The path is
321
+ matched with its query string, the way a version 1 pathname rule matches it, so
322
+ '[?&]size=' works too. Repeat the flag to keep the urls matching any of several patterns,
323
+ and start a pattern with (?i) to match case-insensitively
324
+ --minHits=<value> Keep only urls requested at least this often in the window
268
325
 
269
326
  DESCRIPTION
270
327
  Build a prewarm query that can be executed in Athena
271
328
 
329
+ ALIASES
330
+ $ sk build-prewarm-query
331
+
272
332
  EXAMPLES
273
- $ sk build-prewarm-query <customerPath> -c <configName>
333
+ $ sk query prewarm <customerPath> -c <configName>
334
+
335
+ $ sk query prewarm customers/decathlon.de -c production
336
+
337
+ $ sk query prewarm customers/decathlon.de --explain
338
+
339
+ $ sk query prewarm customers/decathlon.de --match '^/p/'
274
340
 
275
- $ sk build-prewarm-query customers/decathlon.de -c production
341
+ $ sk query prewarm customers/decathlon.de --device desktop,mobile
342
+
343
+ $ sk query prewarm customers/decathlon.de -v MOBILE,DESKTOP
344
+
345
+ $ sk query prewarm customers/decathlon.de --count
276
346
  ```
277
347
 
278
348
  ## `sk config edit`
@@ -516,7 +586,7 @@ Generate a pop config for the given app
516
586
 
517
587
  ```
518
588
  USAGE
519
- $ sk generate-pop-config APP [-c <value>] [-d] [-p <value>] [-t <value>] [-r] [-s]
589
+ $ sk generate-pop-config APP [--days <value>] [-c <value>] [-d] [-p <value>] [-t <value>] [-r] [-s]
520
590
 
521
591
  ARGUMENTS
522
592
  APP The customers appName
@@ -530,6 +600,7 @@ FLAGS
530
600
  -s, --force-shield Force a shield based prewarming config.
531
601
  -t, --traffic-share=<value> [default: 5] The minimum traffic share in percent a pop must have to be actually
532
602
  prewarmed.
603
+ --days=<value> Number of days the query looks back
533
604
 
534
605
  DESCRIPTION
535
606
  Generate a pop config for the given app
@@ -700,7 +771,8 @@ FLAGS
700
771
  -k, --keepParameterSorting Prevents alphabetical sorting of the URL parameters
701
772
  -p, --variationPath=<value> path to variations.csv
702
773
  -q, --quiet less output non interactive
703
- -v, --variation=<value> [default: default]
774
+ -v, --variation=<value> Warm every url of the list in each of these variations, e.g. 'desktop,mobile'. Ignored
775
+ for a list that names a variation itself
704
776
  --verbose Log information about failed requests
705
777
 
706
778
  DESCRIPTION
@@ -747,6 +819,105 @@ EXAMPLES
747
819
  $ sk pull customers/decathlon.de -c production
748
820
  ```
749
821
 
822
+ ## `sk query parameter CUSTOMERPATH`
823
+
824
+ Build a parameter query that can be executed in Athena
825
+
826
+ ```
827
+ USAGE
828
+ $ sk query parameter CUSTOMERPATH [-c <value>] [-d <value>] [--excludeNoindex] [--excludeSuspicious] [--explain]
829
+ [--hardNavigationsOnly] [-e] [-q] [--bySet] [--minImpressions <value>]
830
+
831
+ ARGUMENTS
832
+ CUSTOMERPATH The customer config path
833
+
834
+ FLAGS
835
+ -c, --configName=<value> [default: production] The costumer config name
836
+ -d, --days=<value> Number of days the query looks back
837
+ -e, --execute Execute the query directly and write the result to a <app>-<date>-<query>.csv file
838
+ -q, --quiet Output only the raw query without clipboard copy or styling
839
+ --bySet Rank whole sets of parameters instead of single parameters, to see which ones travel
840
+ together
841
+ --excludeNoindex Exclude page impressions of pages marked noindex
842
+ --excludeSuspicious Exclude page impressions Speed Kit classified as suspicious
843
+ --explain Account for every rule the query leaves out, reduces or approximates
844
+ --hardNavigationsOnly Exclude soft (SPA) navigations
845
+ --minImpressions=<value> Leave out parameters seen on fewer page impressions than this
846
+
847
+ DESCRIPTION
848
+ Build a parameter query that can be executed in Athena
849
+
850
+ ALIASES
851
+ $ sk build-parameter-query
852
+
853
+ EXAMPLES
854
+ $ sk query parameter <customerPath> -c <configName>
855
+
856
+ $ sk query parameter customers/decathlon.de -c production
857
+
858
+ $ sk query parameter customers/decathlon.de --explain
859
+ ```
860
+
861
+ ## `sk query prewarm CUSTOMERPATH`
862
+
863
+ Build a prewarm query that can be executed in Athena
864
+
865
+ ```
866
+ USAGE
867
+ $ sk query prewarm CUSTOMERPATH [-c <value>] [-d <value>] [--excludeNoindex] [--excludeSuspicious] [--explain]
868
+ [--hardNavigationsOnly] [-q] [--device desktop|mobile|tablet... | -v <value>...] [--count | -e] [--excludeNotFound]
869
+ [--limit <value>] [--match <value>...] [--minHits <value>]
870
+
871
+ ARGUMENTS
872
+ CUSTOMERPATH The customer config path
873
+
874
+ FLAGS
875
+ -c, --configName=<value> [default: production] The costumer config name
876
+ -d, --days=<value> Number of days the query looks back
877
+ -e, --execute Execute the query directly and write the result to a <app>-<date>-<query>.csv file
878
+ -q, --quiet Output only the raw query without clipboard copy or styling
879
+ -v, --variation=<value>... Pair every url of the list with each of these variations. For the custom variations no
880
+ traffic can reveal, e.g. 'desktop-pdp-a,mobile-pdp-a'
881
+ --count Run the query and report how large the list is instead of what is in it: urls, the
882
+ impressions they stand for, and a row per variation where the list carries variations.
883
+ Every other flag still applies, so this counts the list the same command would produce
884
+ --device=<option>... Split the list by device class, so every url is warmed in the variations it was actually
885
+ requested in. A class not named is left out
886
+ <options: desktop|mobile|tablet>
887
+ --excludeNoindex Exclude page impressions of pages marked noindex
888
+ --excludeNotFound Leave out urls the origin answers with a 404 more often than not
889
+ --excludeSuspicious Exclude page impressions Speed Kit classified as suspicious
890
+ --explain Account for every rule the query leaves out, reduces or approximates
891
+ --hardNavigationsOnly Exclude soft (SPA) navigations
892
+ --limit=<value> Keep only the most requested urls
893
+ --match=<value>... Keep only urls whose path matches this regular expression, e.g. '^/p/'. The path is
894
+ matched with its query string, the way a version 1 pathname rule matches it, so
895
+ '[?&]size=' works too. Repeat the flag to keep the urls matching any of several patterns,
896
+ and start a pattern with (?i) to match case-insensitively
897
+ --minHits=<value> Keep only urls requested at least this often in the window
898
+
899
+ DESCRIPTION
900
+ Build a prewarm query that can be executed in Athena
901
+
902
+ ALIASES
903
+ $ sk build-prewarm-query
904
+
905
+ EXAMPLES
906
+ $ sk query prewarm <customerPath> -c <configName>
907
+
908
+ $ sk query prewarm customers/decathlon.de -c production
909
+
910
+ $ sk query prewarm customers/decathlon.de --explain
911
+
912
+ $ sk query prewarm customers/decathlon.de --match '^/p/'
913
+
914
+ $ sk query prewarm customers/decathlon.de --device desktop,mobile
915
+
916
+ $ sk query prewarm customers/decathlon.de -v MOBILE,DESKTOP
917
+
918
+ $ sk query prewarm customers/decathlon.de --count
919
+ ```
920
+
750
921
  ## `sk revalidate APP`
751
922
 
752
923
  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,11 +8,18 @@ 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>;
11
+ match: import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
12
+ device: import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
13
+ variation: import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
12
14
  variationPath: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
13
15
  keepParameterSorting: import("@oclif/core/interfaces").BooleanFlag<boolean>;
14
16
  quiet: import("@oclif/core/interfaces").BooleanFlag<boolean>;
15
17
  verbose: 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>;
16
23
  configName: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
17
24
  };
18
25
  run(): Promise<void>;
@@ -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_CONFIG_NAME, CLI_CUSTOMER_CONFIG, CLI_QUERY_DAYS, CLI_QUERY_FILTERS, CLI_QUERY_PREWARM, CLI_QUERY_VARIATIONS, 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,23 @@ 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}`,
12
13
  ];
13
14
  static flags = {
14
15
  ...CLI_CONFIG_NAME,
15
- [CLIParameters.Variation]: Flags.string({
16
- char: CLIParametersChar.Variation,
17
- default: "default",
18
- }),
16
+ ...CLI_QUERY_DAYS,
17
+ ...CLI_QUERY_FILTERS,
18
+ // The same narrowing and the same splitting the query command offers; the
19
+ // rest of the pre-warm flags shape a list this command does not write.
20
+ [CLIParameters.Match]: CLI_QUERY_PREWARM[CLIParameters.Match],
21
+ [CLIParameters.Device]: CLI_QUERY_VARIATIONS[CLIParameters.Device],
22
+ [CLIParameters.Variation]: CLI_QUERY_VARIATIONS[CLIParameters.Variation],
23
+ // A variations file says what `--variation` says, read from disk.
19
24
  [CLIParameters.VariationPath]: Flags.file({
20
25
  char: CLIParametersChar.VariationPath,
21
- exclusive: [CLIParameters.Variation],
22
26
  description: "path to variations.csv",
27
+ exclusive: [CLIParameters.Device, CLIParameters.Variation],
23
28
  }),
24
29
  [CLIParameters.KeepParameterSorting]: Flags.boolean({
25
30
  char: CLIParametersChar.KeepParameterSorting,
@@ -37,10 +42,16 @@ export default class AutoPrewarm extends Command {
37
42
  }),
38
43
  };
39
44
  async run() {
40
- const { args: { customerPath }, flags: { configName, variation, variationPath, keepParameterSorting, quiet, verbose, }, } = await this.parse(AutoPrewarm);
45
+ const { args: { customerPath }, flags: { configName, days, device, excludeNoindex, excludeSuspicious, hardNavigationsOnly, keepParameterSorting, match, quiet, variation, variationPath, verbose, }, } = await this.parse(AutoPrewarm);
41
46
  const service = await new AutoPreWarmFactory({
42
47
  customerPath,
43
48
  configName,
49
+ days,
50
+ device,
51
+ excludeNoindex,
52
+ excludeSuspicious,
53
+ hardNavigationsOnly,
54
+ match,
44
55
  variation,
45
56
  variationPath,
46
57
  sortParameters: !keepParameterSorting,
@@ -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)
@@ -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
- default: "default",
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,26 @@
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
+ };
25
+ run(): Promise<void>;
26
+ }
@@ -0,0 +1,27 @@
1
+ import { Command } from "@oclif/core";
2
+ import { 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_CONFIG_NAME,
18
+ ...CLI_QUERY_DAYS,
19
+ ...CLI_QUERY_FILTERS,
20
+ ...CLI_QUERY_OUTPUT,
21
+ ...CLI_QUERY_PARAMETER,
22
+ };
23
+ async run() {
24
+ const { args: { customerPath }, flags, } = await this.parse(QueryParameter);
25
+ await runQuery(QueryType.parameter, customerPath, flags, this.config);
26
+ }
27
+ }
@@ -0,0 +1,31 @@
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
+ };
30
+ run(): Promise<void>;
31
+ }
@@ -0,0 +1,31 @@
1
+ import { Command } from "@oclif/core";
2
+ import { 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_CONFIG_NAME,
22
+ ...CLI_QUERY_DAYS,
23
+ ...CLI_QUERY_FILTERS,
24
+ ...CLI_QUERY_OUTPUT,
25
+ ...CLI_QUERY_PREWARM,
26
+ };
27
+ async run() {
28
+ const { args: { customerPath }, flags, } = await this.parse(QueryPrewarm);
29
+ await runQuery(QueryType.prewarm, customerPath, flags, this.config);
30
+ }
31
+ }
@@ -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>;