@speedkit/cli 2.9.0 → 2.10.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,10 @@
1
+ # [2.10.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v2.9.0...v2.10.0) (2024-03-15)
2
+
3
+
4
+ ### Features
5
+
6
+ * update dependencies ([30f8889](https://gitlab.orestes.info/baqend/speed-kit-cli/commit/30f88894848e224546747d1aeed566ea15607bb9))
7
+
1
8
  # [2.9.0](https://gitlab.orestes.info/baqend/speed-kit-cli/compare/v2.8.0...v2.9.0) (2024-03-15)
2
9
 
3
10
 
package/README.md CHANGED
@@ -74,7 +74,7 @@ $ npm install -g @speedkit/cli
74
74
  $ sk COMMAND
75
75
  running command...
76
76
  $ sk (--version)
77
- @speedkit/cli/2.9.0 linux-x64 node-v20.11.1
77
+ @speedkit/cli/2.10.0 linux-x64 node-v20.11.1
78
78
  $ sk --help [COMMAND]
79
79
  USAGE
80
80
  $ sk COMMAND
@@ -91,7 +91,7 @@ USAGE
91
91
  * [`sk find-pops APP`](#sk-find-pops-app)
92
92
  * [`sk generate-customer-config`](#sk-generate-customer-config)
93
93
  * [`sk generate-pop-config APP`](#sk-generate-pop-config-app)
94
- * [`sk help [COMMANDS]`](#sk-help-commands)
94
+ * [`sk help [COMMAND]`](#sk-help-command)
95
95
  * [`sk login [APP]`](#sk-login-app)
96
96
  * [`sk onboarding CUSTOMERPATH`](#sk-onboarding-customerpath)
97
97
  * [`sk param-diff PAGEURL`](#sk-param-diff-pageurl)
@@ -309,16 +309,16 @@ EXAMPLES
309
309
  $ sk generate-pop-config --coverage 95 --pop-limit 6 --traffic-share 2 --deploy appName
310
310
  ```
311
311
 
312
- ## `sk help [COMMANDS]`
312
+ ## `sk help [COMMAND]`
313
313
 
314
314
  Display help for sk.
315
315
 
316
316
  ```
317
317
  USAGE
318
- $ sk help [COMMANDS] [-n]
318
+ $ sk help [COMMAND] [-n]
319
319
 
320
320
  ARGUMENTS
321
- COMMANDS Command to show help for.
321
+ COMMAND Command to show help for.
322
322
 
323
323
  FLAGS
324
324
  -n, --nested-commands Include all nested commands in the output.
@@ -327,7 +327,7 @@ DESCRIPTION
327
327
  Display help for sk.
328
328
  ```
329
329
 
330
- _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.0.5/src/commands/help.ts)_
330
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.0.18/src/commands/help.ts)_
331
331
 
332
332
  ## `sk login [APP]`
333
333
 
@@ -17,9 +17,9 @@ class FindPops extends core_1.Command {
17
17
  static description = 'Get IPs for all fastly PoPs';
18
18
  static args = {
19
19
  [cli_parameters_1.CLIParameters.AppName]: core_1.Args.string({
20
- name: cli_parameters_1.CLIParameters.AppName,
21
- required: true,
22
- description: 'The customers appName',
20
+ name: cli_parameters_1.CLIParameters.AppName, // name of arg to show in help and reference with args[name]
21
+ required: true, // make the arg required with `required: true`
22
+ description: 'The customers appName', // help description
23
23
  hidden: false, // hide this arg from help
24
24
  }),
25
25
  };
@@ -65,7 +65,7 @@ class FindPops extends core_1.Command {
65
65
  Host: `${app}.app.baqend.com`,
66
66
  authorization: `BAT ${token}`,
67
67
  },
68
- timeout: 10000,
68
+ timeout: 10_000,
69
69
  });
70
70
  const servedBy = resp.headers.get('x-served-by');
71
71
  if (resp.status !== 200 || !servedBy) {
@@ -68,9 +68,9 @@ const percentageFormatter = new Intl.NumberFormat("en-US", {
68
68
  class GeneratePopConfig extends core_1.Command {
69
69
  static args = {
70
70
  [cli_parameters_1.CLIParameters.AppName]: core_1.Args.string({
71
- description: "The customers appName",
72
- hidden: false,
73
- name: cli_parameters_1.CLIParameters.AppName,
71
+ description: "The customers appName", // help description
72
+ hidden: false, // hide this arg from help
73
+ name: cli_parameters_1.CLIParameters.AppName, // name of arg to show in help and reference with args[name]
74
74
  required: true, // make the arg required with `required: true`
75
75
  }),
76
76
  };
@@ -10,7 +10,7 @@ class Login extends core_1.Command {
10
10
  static description = 'Login to your app';
11
11
  static args = {
12
12
  [cli_parameters_1.CLIParameters.AppName]: core_1.Args.string({
13
- name: cli_parameters_1.CLIParameters.AppName,
13
+ name: cli_parameters_1.CLIParameters.AppName, // name of arg to show in help and reference with args[name]
14
14
  required: false,
15
15
  default: 'bbq',
16
16
  description: 'The customers appName', // help description
@@ -11,9 +11,9 @@ class PopPrewarm extends core_1.Command {
11
11
  static description = 'Pre-warm Fastly PoPs';
12
12
  static args = {
13
13
  [cli_parameters_1.CLIParameters.AppName]: core_1.Args.string({
14
- name: cli_parameters_1.CLIParameters.AppName,
15
- required: true,
16
- description: 'The customers appName',
14
+ name: cli_parameters_1.CLIParameters.AppName, // name of arg to show in help and reference with args[name]
15
+ required: true, // make the arg required with `required: true`
16
+ description: 'The customers appName', // help description
17
17
  hidden: false, // hide this arg from help
18
18
  }),
19
19
  };
@@ -13,13 +13,13 @@ class Prewarm extends core_1.Command {
13
13
  static description = 'Pre-warm Fastly';
14
14
  static args = {
15
15
  [cli_parameters_1.CLIParameters.AppName]: core_1.Args.string({
16
- name: cli_parameters_1.CLIParameters.AppName,
17
- required: true,
16
+ name: cli_parameters_1.CLIParameters.AppName, // name of arg to show in help and reference with args[name]
17
+ required: true, // make the arg required with `required: true`
18
18
  description: 'The customer app name', // help description
19
19
  }),
20
20
  [cli_parameters_1.CLIParameters.Path]: core_1.Args.string({
21
- name: cli_parameters_1.CLIParameters.Path,
22
- required: true,
21
+ name: cli_parameters_1.CLIParameters.Path, // name of arg to show in help and reference with args[name]
22
+ required: true, // make the arg required with `required: true`
23
23
  description: 'path to prewarmFile', // help description
24
24
  }),
25
25
  };
@@ -9,11 +9,11 @@ class WptLauncher extends core_1.Command {
9
9
  static description = 'Analyze the performance impact that Speed Kit has compared to the original version.';
10
10
  static args = {
11
11
  [cli_parameters_1.CLIParameters.Urls]: core_1.Args.string({
12
- name: cli_parameters_1.CLIParameters.Urls,
12
+ name: cli_parameters_1.CLIParameters.Urls, // name of arg to show in help and reference with args[name]
13
13
  required: true, // make the arg required with `required: true`
14
14
  }),
15
15
  [cli_parameters_1.CLIParameters.TestId]: core_1.Args.string({
16
- name: cli_parameters_1.CLIParameters.TestId,
16
+ name: cli_parameters_1.CLIParameters.TestId, // name of arg to show in help and reference with args[name]
17
17
  required: true, // make the arg required with `required: true`
18
18
  }),
19
19
  };
@@ -75,8 +75,8 @@ exports.CLI_CONFIG_NAME = {
75
75
  };
76
76
  exports.CLI_CUSTOMER_CONFIG = {
77
77
  [CLIParameters.CustomerPath]: core_1.Args.directory({
78
- name: CLIParameters.CustomerPath,
79
- required: true,
78
+ name: CLIParameters.CustomerPath, // name of arg to show in help and reference with args[name]
79
+ required: true, // make the arg required with `required: true`
80
80
  description: 'The customer config path', // help description
81
81
  }),
82
82
  };
@@ -6,10 +6,10 @@ export declare class CliService implements CliServiceInterface {
6
6
  style: chalk.Chalk & chalk.ChalkFunction & {
7
7
  supportsColor: false | chalk.ColorSupport;
8
8
  Level: chalk.Level;
9
- Color: ("black" | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "blackBright" | "redBright" | "greenBright" | "yellowBright" | "blueBright" | "magentaBright" | "cyanBright" | "whiteBright") | ("bgBlack" | "bgRed" | "bgGreen" | "bgYellow" | "bgBlue" | "bgMagenta" | "bgCyan" | "bgWhite" | "bgGray" | "bgGrey" | "bgBlackBright" | "bgRedBright" | "bgGreenBright" | "bgYellowBright" | "bgBlueBright" | "bgMagentaBright" | "bgCyanBright" | "bgWhiteBright");
10
- ForegroundColor: "black" | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "blackBright" | "redBright" | "greenBright" | "yellowBright" | "blueBright" | "magentaBright" | "cyanBright" | "whiteBright";
11
- BackgroundColor: "bgBlack" | "bgRed" | "bgGreen" | "bgYellow" | "bgBlue" | "bgMagenta" | "bgCyan" | "bgWhite" | "bgGray" | "bgGrey" | "bgBlackBright" | "bgRedBright" | "bgGreenBright" | "bgYellowBright" | "bgBlueBright" | "bgMagentaBright" | "bgCyanBright" | "bgWhiteBright";
12
- Modifiers: "hidden" | "bold" | "reset" | "dim" | "italic" | "underline" | "inverse" | "strikethrough" | "visible";
9
+ Color: ("white" | "black" | "blue" | "yellow" | "green" | "red" | "magenta" | "cyan" | "gray" | "blackBright" | "redBright" | "greenBright" | "yellowBright" | "blueBright" | "magentaBright" | "cyanBright" | "whiteBright" | "grey") | ("bgBlack" | "bgRed" | "bgGreen" | "bgYellow" | "bgBlue" | "bgMagenta" | "bgCyan" | "bgWhite" | "bgGray" | "bgBlackBright" | "bgRedBright" | "bgGreenBright" | "bgYellowBright" | "bgBlueBright" | "bgMagentaBright" | "bgCyanBright" | "bgWhiteBright" | "bgGrey");
10
+ ForegroundColor: "white" | "black" | "blue" | "yellow" | "green" | "red" | "magenta" | "cyan" | "gray" | "blackBright" | "redBright" | "greenBright" | "yellowBright" | "blueBright" | "magentaBright" | "cyanBright" | "whiteBright" | "grey";
11
+ BackgroundColor: "bgBlack" | "bgRed" | "bgGreen" | "bgYellow" | "bgBlue" | "bgMagenta" | "bgCyan" | "bgWhite" | "bgGray" | "bgBlackBright" | "bgRedBright" | "bgGreenBright" | "bgYellowBright" | "bgBlueBright" | "bgMagentaBright" | "bgCyanBright" | "bgWhiteBright" | "bgGrey";
12
+ Modifiers: "hidden" | "bold" | "underline" | "dim" | "italic" | "strikethrough" | "visible" | "reset" | "inverse";
13
13
  stderr: chalk.Chalk & {
14
14
  supportsColor: false | chalk.ColorSupport;
15
15
  };
@@ -5,7 +5,7 @@ const https_1 = require("https");
5
5
  const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
6
6
  const deepmerge_1 = tslib_1.__importDefault(require("deepmerge"));
7
7
  const race_1 = require("../../helpers/race");
8
- const REQUEST_TIMEOUT = 10000;
8
+ const REQUEST_TIMEOUT = 10_000;
9
9
  const CONTENT_TYPE = 'application/json;charset=UTF-8';
10
10
  class Client {
11
11
  entityManagerFactory;
@@ -24,7 +24,7 @@ class ConfigApiService {
24
24
  authorization: `BAT ${this.db.token}`,
25
25
  'Content-Type': 'application/json;charset=UTF-8',
26
26
  },
27
- timeout: 10000,
27
+ timeout: 10_000,
28
28
  };
29
29
  }
30
30
  async fetchActiveInstall(configName) {
@@ -34,7 +34,7 @@ class CustomerConfigHandler extends file_handler_1.default {
34
34
  throw new customer_config_error_1.default('please specify env TEST_APP in your .env or configFile file');
35
35
  }
36
36
  const customerConfigContext = {
37
- module: { exports: {} },
37
+ module: { exports: {} }, // make TEST_APP available for vm
38
38
  process: {
39
39
  env: { TEST_APP: this.testApp } // make TEST_APP available for vm
40
40
  }
@@ -18,7 +18,7 @@ class CustomerConfigFile extends file_1.default {
18
18
  }
19
19
  updateConfigByContent() {
20
20
  const customerConfigContext = {
21
- module: { exports: {} },
21
+ module: { exports: {} }, // make TEST_APP available for vm
22
22
  process: {
23
23
  env: { TEST_APP: process.env.TEST_APP } // make TEST_APP available for vm
24
24
  }
@@ -42,7 +42,7 @@ class OnboardingService {
42
42
  const browser = await puppeteer_extra_1.default.launch({
43
43
  devtools: true,
44
44
  defaultViewport: null,
45
- headless: false,
45
+ headless: false, /* ignoreDefaultArgs: true, */
46
46
  executablePath: this.browserContext.chromePath,
47
47
  args: this.browserContext.browserArgs,
48
48
  });
@@ -23,7 +23,7 @@ class PrewarmService {
23
23
  authorization: `BAT ${token}`,
24
24
  'Accept-Encoding': 'gzip, deflate, br',
25
25
  },
26
- timeout: 10000,
26
+ timeout: 10_000,
27
27
  });
28
28
  }
29
29
  // eslint-disable-next-line max-params
@@ -41,7 +41,7 @@ class PrewarmService {
41
41
  authorization: `BAT ${token}`,
42
42
  'Accept-Encoding': 'gzip, deflate, br',
43
43
  },
44
- timeout: 10000,
44
+ timeout: 10_000,
45
45
  });
46
46
  }
47
47
  static chunk(arr, len) {
@@ -696,5 +696,5 @@
696
696
  ]
697
697
  }
698
698
  },
699
- "version": "2.9.0"
699
+ "version": "2.10.0"
700
700
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@speedkit/cli",
3
3
  "description": "Speed Kit CLI",
4
- "version": "2.9.0",
4
+ "version": "2.10.0",
5
5
  "author": {
6
6
  "name": "Baqend.com",
7
7
  "email": "info@baqend.com"
@@ -59,14 +59,14 @@
59
59
  "types": "dist/index.d.ts",
60
60
  "type": "commonjs",
61
61
  "dependencies": {
62
- "@aws-sdk/client-athena": "^3.204.0",
62
+ "@aws-sdk/client-athena": "^3.529",
63
63
  "@inquirer/prompts": "^3.0",
64
- "@oclif/core": "^3.20",
64
+ "@oclif/core": "^3.23",
65
65
  "@oclif/plugin-autocomplete": "^3.0",
66
66
  "@oclif/plugin-help": "^6.0",
67
67
  "@oclif/plugin-not-found": "^3.0",
68
68
  "@oclif/plugin-warn-if-update-available": "^3.0",
69
- "axios": "^1.4.0",
69
+ "axios": "^1.6",
70
70
  "baqend": "^3.4",
71
71
  "chalk": "^4",
72
72
  "clipboardy-cjs": "^3.0.0",
@@ -75,23 +75,21 @@
75
75
  "diff": "^5.1.0",
76
76
  "dom-serializer": "2.0.0",
77
77
  "domhandler": "5.0.3",
78
- "domutils": "3.0.1",
79
- "dotenv": "^16.0.3",
78
+ "domutils": "^3.1",
79
+ "dotenv": "^16.4",
80
80
  "extract-zip": "^2.0.1",
81
81
  "fs-extra": "^10.1.0",
82
82
  "handlebars": "^4.7",
83
83
  "htmlparser2": "8.0",
84
84
  "json2csv": "^6.0.0-alpha.2",
85
- "nock": "^13.3.8",
86
85
  "node-fetch": "^2.6",
87
86
  "parse5": "7.1",
88
87
  "parse5-htmlparser2-tree-adapter": "7.0.0",
89
- "puppeteer": "^21.5",
90
- "puppeteer-core": "^21.3",
88
+ "puppeteer": "^21.11",
89
+ "puppeteer-core": "^22.4",
91
90
  "puppeteer-extra": "^3.3",
92
91
  "puppeteer-extra-plugin-user-preferences": "^2.4",
93
92
  "strip-comments": "^2.0.1",
94
- "ts-sinon": "^2.0.2",
95
93
  "uuid": "^8.3.2"
96
94
  },
97
95
  "devDependencies": {
@@ -102,31 +100,33 @@
102
100
  "@oclif/test": "^3",
103
101
  "@types/chai": "^4.3.10",
104
102
  "@types/fs-extra": "^9.0.13",
105
- "@types/mocha": "^10.0.4",
103
+ "@types/mocha": "^10.0",
106
104
  "@types/mock-fs": "^4.13.4",
107
- "@types/node": "^18.7.13",
105
+ "@types/node": "^18.19",
108
106
  "@types/uuid": "^8.3.4",
109
- "chai": "^4.3.6",
107
+ "chai": "^4.4",
110
108
  "copyfiles": "^2.4.1",
111
- "esbuild": "^0.15.5",
112
- "eslint": "^8.22.0",
113
- "eslint-config-oclif": "^5.0.0",
114
- "eslint-config-oclif-typescript": "^3.0.13",
115
- "eslint-config-prettier": "^9.0.0",
116
- "eslint-plugin-prettier": "^5.0.0",
109
+ "esbuild": "^0.20",
110
+ "eslint": "^8.57",
111
+ "eslint-config-oclif": "^5.1",
112
+ "eslint-config-oclif-typescript": "^3.1",
113
+ "eslint-config-prettier": "^9.1",
114
+ "eslint-plugin-prettier": "^5.1",
117
115
  "globby": "^11",
118
116
  "husky": "^8.0.3",
119
117
  "lint-staged": "^14.0.1",
120
118
  "mocha": "^10.1.0",
121
119
  "mocha-junit-reporter": "^2.2.1",
120
+ "nock": "^13.5",
121
+ "ts-sinon": "^2.0.2",
122
122
  "mock-fs": "^5.2.0",
123
123
  "nyc": "^15.1.0",
124
- "oclif": "^4.0.3",
124
+ "oclif": "^4.5",
125
125
  "shx": "^0.3.4",
126
126
  "ts-mocha": "^10.0.0",
127
- "ts-node": "^10.9.1",
128
- "tslib": "^2.4.0",
129
- "typescript": "^5.2.2",
127
+ "ts-node": "^10.9",
128
+ "tslib": "^2.6",
129
+ "typescript": "^5.4",
130
130
  "typescript-json-serializer": "^4.3.0"
131
131
  },
132
132
  "lint-staged": {