@speedkit/cli 2.39.0 → 2.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [2.41.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v2.40.0...v2.41.0) (2024-07-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **customer-config:** update dh config template ([f0b0fc5](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/f0b0fc59452d49cb75980a60dc545b993353cc64))
|
|
7
|
+
|
|
8
|
+
# [2.40.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v2.39.0...v2.40.0) (2024-07-05)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **config:** add a command to easily edit cliConfigFile ([0094337](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/00943377f5b9d88d7d8da7c9ed90a88bfc43a6d8))
|
|
14
|
+
|
|
1
15
|
# [2.39.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v2.38.0...v2.39.0) (2024-07-05)
|
|
2
16
|
|
|
3
17
|
|
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/2.
|
|
24
|
+
@speedkit/cli/2.41.0 linux-x64 node-v20.15.0
|
|
25
25
|
$ sk --help [COMMAND]
|
|
26
26
|
USAGE
|
|
27
27
|
$ sk COMMAND
|
|
@@ -68,6 +68,7 @@ By either...
|
|
|
68
68
|
* [`sk autocomplete [SHELL]`](#sk-autocomplete-shell)
|
|
69
69
|
* [`sk build-parameter-query CUSTOMERPATH`](#sk-build-parameter-query-customerpath)
|
|
70
70
|
* [`sk build-prewarm-query CUSTOMERPATH`](#sk-build-prewarm-query-customerpath)
|
|
71
|
+
* [`sk config edit`](#sk-config-edit)
|
|
71
72
|
* [`sk deploy CUSTOMERPATH`](#sk-deploy-customerpath)
|
|
72
73
|
* [`sk diff-url-parameters PAGEURL`](#sk-diff-url-parameters-pageurl)
|
|
73
74
|
* [`sk document-handler CUSTOMERPATH`](#sk-document-handler-customerpath)
|
|
@@ -159,6 +160,21 @@ EXAMPLES
|
|
|
159
160
|
$ sk build-prewarm-query customers/decathlon.de -c production
|
|
160
161
|
```
|
|
161
162
|
|
|
163
|
+
## `sk config edit`
|
|
164
|
+
|
|
165
|
+
Edit cli config
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
USAGE
|
|
169
|
+
$ sk config edit
|
|
170
|
+
|
|
171
|
+
DESCRIPTION
|
|
172
|
+
Edit cli config
|
|
173
|
+
|
|
174
|
+
EXAMPLES
|
|
175
|
+
$ sk config edit
|
|
176
|
+
```
|
|
177
|
+
|
|
162
178
|
## `sk deploy CUSTOMERPATH`
|
|
163
179
|
|
|
164
180
|
Deploys the specified customer config while comparing to the live version before
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const core_1 = require("@oclif/core");
|
|
5
|
+
const node_path_1 = tslib_1.__importDefault(require("node:path"));
|
|
6
|
+
const node_child_process_1 = require("node:child_process");
|
|
7
|
+
const dotenv = tslib_1.__importStar(require("dotenv"));
|
|
8
|
+
dotenv.config();
|
|
9
|
+
class Edit extends core_1.Command {
|
|
10
|
+
static description = "Edit cli config";
|
|
11
|
+
static examples = [`$ sk config edit`];
|
|
12
|
+
async run() {
|
|
13
|
+
const editor = process.env.EDITOR || "nano";
|
|
14
|
+
const editorSpawn = (0, node_child_process_1.spawn)(editor, [node_path_1.default.resolve(this.config.configDir, "config.json")], {
|
|
15
|
+
stdio: "inherit",
|
|
16
|
+
detached: true,
|
|
17
|
+
});
|
|
18
|
+
editorSpawn.on("data", function (data) {
|
|
19
|
+
process.stdout.pipe(data);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.default = Edit;
|
|
@@ -44,21 +44,22 @@
|
|
|
44
44
|
{{/if}}
|
|
45
45
|
{{/unless}}
|
|
46
46
|
const config = {
|
|
47
|
-
rejectHTML({db, {{#if addPreRendering}}document{{
|
|
47
|
+
rejectHTML({db, html, {{#if addPreRendering}}document, {{/if}}variation, url, headers}) {
|
|
48
48
|
/* Use to configure guards to prevent e.g. error and captcha pages from being cached */
|
|
49
49
|
return false;
|
|
50
50
|
},
|
|
51
|
-
blacklistHTML({db, {{#if addPreRendering}}document{{
|
|
51
|
+
blacklistHTML({db, html, {{#if addPreRendering}}document, {{/if}}variation, url, headers}) {
|
|
52
52
|
/* Use to configure guards to black-list e.g. specific page types */
|
|
53
53
|
{{#if addPreRendering}}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
// dynamically blacklist unsupported variations as they are not covered in lambda
|
|
55
|
+
if (variation.toUpperCase() === "TABLET") {
|
|
56
|
+
return `Tablet viewport is unsupported: ${url}`;
|
|
57
|
+
}
|
|
58
|
+
|
|
58
59
|
{{/if}}
|
|
59
60
|
return false;
|
|
60
61
|
},
|
|
61
|
-
shouldTransform({db, {{#if addPreRendering}}document{{
|
|
62
|
+
shouldTransform({db, html, {{#if addPreRendering}}document, {{/if}}variation, url, headers}) {
|
|
62
63
|
return true;
|
|
63
64
|
},
|
|
64
65
|
shouldDelayDom({db, {{#if addPreRendering}}document{{else}}html{{/if}}, variation, url, headers}) {
|
package/oclif.manifest.json
CHANGED
|
@@ -686,7 +686,31 @@
|
|
|
686
686
|
"commands",
|
|
687
687
|
"wpt-launcher.js"
|
|
688
688
|
]
|
|
689
|
+
},
|
|
690
|
+
"config:edit": {
|
|
691
|
+
"aliases": [],
|
|
692
|
+
"args": {},
|
|
693
|
+
"description": "Edit cli config",
|
|
694
|
+
"examples": [
|
|
695
|
+
"$ sk config edit"
|
|
696
|
+
],
|
|
697
|
+
"flags": {},
|
|
698
|
+
"hasDynamicHelp": false,
|
|
699
|
+
"hiddenAliases": [],
|
|
700
|
+
"id": "config:edit",
|
|
701
|
+
"pluginAlias": "@speedkit/cli",
|
|
702
|
+
"pluginName": "@speedkit/cli",
|
|
703
|
+
"pluginType": "core",
|
|
704
|
+
"strict": true,
|
|
705
|
+
"enableJsonFlag": false,
|
|
706
|
+
"isESM": false,
|
|
707
|
+
"relativePath": [
|
|
708
|
+
"dist",
|
|
709
|
+
"commands",
|
|
710
|
+
"config",
|
|
711
|
+
"edit.js"
|
|
712
|
+
]
|
|
689
713
|
}
|
|
690
714
|
},
|
|
691
|
-
"version": "2.
|
|
715
|
+
"version": "2.41.0"
|
|
692
716
|
}
|