@memlab/cli 1.0.15 → 1.0.19

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 (169) hide show
  1. package/README.md +2 -2
  2. package/bin/memlab.js +2 -2
  3. package/bin/preinstall +1 -1
  4. package/dist/BaseCommand.d.ts +1 -1
  5. package/dist/BaseCommand.js +1 -1
  6. package/dist/CommandLoader.d.ts +1 -1
  7. package/dist/CommandLoader.js +2 -2
  8. package/dist/Dispatcher.d.ts +1 -1
  9. package/dist/Dispatcher.js +1 -1
  10. package/dist/TypesThirdParty.d.ts +1 -1
  11. package/dist/TypesThirdParty.js +1 -1
  12. package/dist/commands/CleanLoggerDataCommand.d.ts +1 -1
  13. package/dist/commands/CleanLoggerDataCommand.js +1 -1
  14. package/dist/commands/CleanRunDataCommand.d.ts +1 -1
  15. package/dist/commands/CleanRunDataCommand.js +1 -1
  16. package/dist/commands/GetVersionCommand.d.ts +1 -1
  17. package/dist/commands/GetVersionCommand.js +1 -1
  18. package/dist/commands/InitDirectoryCommand.d.ts +1 -1
  19. package/dist/commands/InitDirectoryCommand.js +1 -1
  20. package/dist/commands/ListScenariosCommand.d.ts +1 -1
  21. package/dist/commands/ListScenariosCommand.js +1 -1
  22. package/dist/commands/MemLabRunCommand.d.ts +1 -1
  23. package/dist/commands/MemLabRunCommand.js +1 -1
  24. package/dist/commands/PrintSummaryCommand.d.ts +1 -1
  25. package/dist/commands/PrintSummaryCommand.js +1 -1
  26. package/dist/commands/ResetDirectoryCommand.d.ts +1 -1
  27. package/dist/commands/ResetDirectoryCommand.js +1 -1
  28. package/dist/commands/RunMeasureCommand.d.ts +1 -1
  29. package/dist/commands/RunMeasureCommand.js +5 -1
  30. package/dist/commands/WarmupAppCommand.d.ts +1 -1
  31. package/dist/commands/WarmupAppCommand.js +5 -1
  32. package/dist/commands/heap/CheckLeakCommand.d.ts +1 -1
  33. package/dist/commands/heap/CheckLeakCommand.js +1 -1
  34. package/dist/commands/heap/GetRetainerTraceCommand.d.ts +1 -1
  35. package/dist/commands/heap/GetRetainerTraceCommand.js +1 -1
  36. package/dist/commands/heap/HeapAnalysisCommand.d.ts +1 -1
  37. package/dist/commands/heap/HeapAnalysisCommand.js +1 -1
  38. package/dist/commands/heap/HeapAnalysisSubCommandWrapper.d.ts +1 -1
  39. package/dist/commands/heap/HeapAnalysisSubCommandWrapper.js +1 -1
  40. package/dist/commands/heap/interactive/InteractiveCommandLoader.d.ts +1 -1
  41. package/dist/commands/heap/interactive/InteractiveCommandLoader.js +1 -1
  42. package/dist/commands/heap/interactive/InteractiveHeapCommand.d.ts +1 -1
  43. package/dist/commands/heap/interactive/InteractiveHeapCommand.js +1 -1
  44. package/dist/commands/heap/interactive/InteractiveHeapExploreCommand.d.ts +1 -1
  45. package/dist/commands/heap/interactive/InteractiveHeapExploreCommand.js +1 -1
  46. package/dist/commands/heap/interactive/ui-components/CliScreen.d.ts +5 -0
  47. package/dist/commands/heap/interactive/ui-components/CliScreen.js +47 -7
  48. package/dist/commands/heap/interactive/ui-components/HeapViewController.d.ts +1 -1
  49. package/dist/commands/heap/interactive/ui-components/HeapViewController.js +19 -0
  50. package/dist/commands/heap/interactive/ui-components/HeapViewUtils.d.ts +1 -1
  51. package/dist/commands/heap/interactive/ui-components/ListComponent.d.ts +1 -1
  52. package/dist/commands/helper/GenerateCLIDocCommand.d.ts +1 -1
  53. package/dist/commands/helper/GenerateCLIDocCommand.js +1 -1
  54. package/dist/commands/helper/HelperCommand.d.ts +1 -1
  55. package/dist/commands/helper/HelperCommand.js +1 -1
  56. package/dist/commands/helper/lib/CommandOrder.d.ts +1 -1
  57. package/dist/commands/helper/lib/CommandOrder.js +1 -1
  58. package/dist/commands/helper/lib/Types.d.ts +1 -1
  59. package/dist/commands/helper/lib/Types.js +1 -1
  60. package/dist/commands/query/QueryDefaultWorkDirCommand.d.ts +1 -1
  61. package/dist/commands/query/QueryDefaultWorkDirCommand.js +1 -1
  62. package/dist/commands/snapshot/CheckXvfbSupportCommand.d.ts +1 -1
  63. package/dist/commands/snapshot/CheckXvfbSupportCommand.js +1 -1
  64. package/dist/commands/snapshot/Snapshot.d.ts +1 -1
  65. package/dist/commands/snapshot/Snapshot.js +1 -1
  66. package/dist/commands/snapshot/TakeSnapshotCommand.d.ts +1 -1
  67. package/dist/commands/snapshot/TakeSnapshotCommand.js +5 -1
  68. package/dist/commands/snapshot/WarmupAndSnapshotCommand.d.ts +1 -1
  69. package/dist/commands/snapshot/WarmupAndSnapshotCommand.js +1 -1
  70. package/dist/index.d.ts +1 -1
  71. package/dist/index.js +1 -1
  72. package/dist/options/DebugOption.d.ts +1 -1
  73. package/dist/options/DebugOption.js +7 -3
  74. package/dist/options/HelperOption.d.ts +1 -1
  75. package/dist/options/HelperOption.js +7 -3
  76. package/dist/options/MLClusteringLinkageMaxDistanceOption.d.ts +1 -1
  77. package/dist/options/MLClusteringLinkageMaxDistanceOption.js +10 -4
  78. package/dist/options/MLClusteringMaxDFOption.d.ts +1 -1
  79. package/dist/options/MLClusteringMaxDFOption.js +10 -4
  80. package/dist/options/MLClusteringOption.d.ts +1 -1
  81. package/dist/options/MLClusteringOption.js +8 -3
  82. package/dist/options/NumberOfRunsOption.d.ts +1 -1
  83. package/dist/options/NumberOfRunsOption.js +6 -2
  84. package/dist/options/SetContinuousTestOption.d.ts +1 -1
  85. package/dist/options/SetContinuousTestOption.js +8 -3
  86. package/dist/options/SetWorkingDirectoryOption.d.ts +1 -1
  87. package/dist/options/SetWorkingDirectoryOption.js +6 -2
  88. package/dist/options/SilentOption.d.ts +1 -1
  89. package/dist/options/SilentOption.js +7 -3
  90. package/dist/options/VerboseOption.d.ts +1 -1
  91. package/dist/options/VerboseOption.js +7 -3
  92. package/dist/options/constant.d.ts +50 -0
  93. package/dist/options/constant.js +52 -0
  94. package/dist/options/e2e/AppOption.d.ts +1 -1
  95. package/dist/options/e2e/AppOption.js +10 -6
  96. package/dist/options/e2e/DisableWebSecurityOption.d.ts +18 -0
  97. package/dist/options/e2e/DisableWebSecurityOption.js +42 -0
  98. package/dist/options/e2e/DisableXvfbOption.d.ts +1 -1
  99. package/dist/options/e2e/DisableXvfbOption.js +7 -3
  100. package/dist/options/e2e/EnableJSInterceptOption.d.ts +18 -0
  101. package/dist/options/e2e/EnableJSInterceptOption.js +42 -0
  102. package/dist/options/e2e/EnableJSRewriteOption.d.ts +18 -0
  103. package/dist/options/e2e/EnableJSRewriteOption.js +44 -0
  104. package/dist/options/e2e/FullExecutionOption.d.ts +1 -1
  105. package/dist/options/e2e/FullExecutionOption.js +7 -3
  106. package/dist/options/e2e/HeadfulBrowserOption.d.ts +1 -1
  107. package/dist/options/e2e/HeadfulBrowserOption.js +6 -2
  108. package/dist/options/e2e/InteractionOption.d.ts +1 -1
  109. package/dist/options/e2e/InteractionOption.js +10 -6
  110. package/dist/options/e2e/RemoteBrowserDebugOption.d.ts +1 -1
  111. package/dist/options/e2e/RemoteBrowserDebugOption.js +7 -3
  112. package/dist/options/e2e/RunningModeOption.d.ts +1 -1
  113. package/dist/options/e2e/RunningModeOption.js +7 -3
  114. package/dist/options/e2e/ScenarioFileOption.d.ts +1 -1
  115. package/dist/options/e2e/ScenarioFileOption.js +10 -4
  116. package/dist/options/e2e/SetDeviceOption.d.ts +1 -1
  117. package/dist/options/e2e/SetDeviceOption.js +10 -4
  118. package/dist/options/e2e/SetUserAgentOption.d.ts +1 -1
  119. package/dist/options/e2e/SetUserAgentOption.js +6 -2
  120. package/dist/options/e2e/SkipExtraOperationOption.d.ts +1 -1
  121. package/dist/options/e2e/SkipExtraOperationOption.js +8 -3
  122. package/dist/options/e2e/SkipGCOption.d.ts +1 -1
  123. package/dist/options/e2e/SkipGCOption.js +6 -2
  124. package/dist/options/e2e/SkipScreenshotOption.d.ts +1 -1
  125. package/dist/options/e2e/SkipScreenshotOption.js +7 -3
  126. package/dist/options/e2e/SkipScrollOption.d.ts +1 -1
  127. package/dist/options/e2e/SkipScrollOption.js +7 -3
  128. package/dist/options/e2e/SkipSnapshotOption.d.ts +1 -1
  129. package/dist/options/e2e/SkipSnapshotOption.js +7 -3
  130. package/dist/options/e2e/SkipWarmupOption.d.ts +1 -1
  131. package/dist/options/e2e/SkipWarmupOption.js +6 -2
  132. package/dist/options/heap/BaselineFileOption.d.ts +1 -1
  133. package/dist/options/heap/BaselineFileOption.js +6 -4
  134. package/dist/options/heap/FinalFileOption.d.ts +1 -1
  135. package/dist/options/heap/FinalFileOption.js +6 -4
  136. package/dist/options/heap/HeapNodeIdOption.d.ts +1 -1
  137. package/dist/options/heap/HeapNodeIdOption.js +6 -2
  138. package/dist/options/heap/JSEngineOption.d.ts +1 -1
  139. package/dist/options/heap/JSEngineOption.js +9 -4
  140. package/dist/options/heap/LeakClusterSizeThresholdOption.d.ts +1 -1
  141. package/dist/options/heap/LeakClusterSizeThresholdOption.js +6 -2
  142. package/dist/options/heap/LogTraceAsClusterOption.d.ts +1 -1
  143. package/dist/options/heap/LogTraceAsClusterOption.js +6 -2
  144. package/dist/options/heap/OversizeThresholdOption.d.ts +1 -1
  145. package/dist/options/heap/OversizeThresholdOption.js +6 -2
  146. package/dist/options/heap/SnapshotDirectoryOption.d.ts +1 -1
  147. package/dist/options/heap/SnapshotDirectoryOption.js +6 -4
  148. package/dist/options/heap/SnapshotFileOption.d.ts +1 -1
  149. package/dist/options/heap/SnapshotFileOption.js +6 -4
  150. package/dist/options/heap/TargetFileOption.d.ts +1 -1
  151. package/dist/options/heap/TargetFileOption.js +6 -4
  152. package/dist/options/heap/TraceAllObjectsOption.d.ts +1 -1
  153. package/dist/options/heap/TraceAllObjectsOption.js +6 -2
  154. package/dist/options/heap/leak-filter/LeakFilterFileOption.d.ts +1 -1
  155. package/dist/options/heap/leak-filter/LeakFilterFileOption.js +6 -2
  156. package/dist/options/heap/leak-filter/examples/FilterLib.d.ts +1 -1
  157. package/dist/options/heap/leak-filter/examples/FilterLib.js +1 -1
  158. package/dist/options/heap/leak-filter/examples/dup-string-as-leak.example-1.d.ts +1 -1
  159. package/dist/options/heap/leak-filter/examples/dup-string-as-leak.example-1.js +1 -1
  160. package/dist/options/heap/leak-filter/examples/dup-string-as-leak.example-2.d.ts +1 -1
  161. package/dist/options/heap/leak-filter/examples/dup-string-as-leak.example-2.js +1 -1
  162. package/dist/options/heap/leak-filter/examples/large-object-as-leak.example.js +1 -1
  163. package/dist/options/lib/OptionConstant.d.ts +116 -0
  164. package/dist/options/lib/OptionConstant.js +67 -0
  165. package/dist/options/lib/UniversalOptions.d.ts +1 -1
  166. package/dist/options/lib/UniversalOptions.js +1 -1
  167. package/dist/runner.d.ts +1 -1
  168. package/dist/runner.js +1 -1
  169. package/package.json +5 -5
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall ws_labs
9
+ * @oncall web_perf_infra
10
10
  */
11
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -17,11 +17,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
17
17
  step((generator = generator.apply(thisArg, _arguments || [])).next());
18
18
  });
19
19
  };
20
+ var __importDefault = (this && this.__importDefault) || function (mod) {
21
+ return (mod && mod.__esModule) ? mod : { "default": mod };
22
+ };
20
23
  Object.defineProperty(exports, "__esModule", { value: true });
21
24
  const core_1 = require("@memlab/core");
25
+ const OptionConstant_1 = __importDefault(require("../lib/OptionConstant"));
22
26
  class RunningModeOption extends core_1.BaseOption {
23
27
  getOptionName() {
24
- return 'run-mode';
28
+ return OptionConstant_1.default.optionNames.RUN_MODE;
25
29
  }
26
30
  getDescription() {
27
31
  return 'set running mode';
@@ -31,7 +35,7 @@ class RunningModeOption extends core_1.BaseOption {
31
35
  }
32
36
  parse(config, args) {
33
37
  return __awaiter(this, void 0, void 0, function* () {
34
- if (args['run-mode']) {
38
+ if (args[this.getOptionName()]) {
35
39
  config.runningMode = core_1.modes.get(args['run-mode'], config);
36
40
  }
37
41
  });
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall ws_labs
8
+ * @oncall web_perf_infra
9
9
  */
10
10
  import type { ParsedArgs } from 'minimist';
11
11
  import type { MemLabConfig } from '@memlab/core';
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall ws_labs
9
+ * @oncall web_perf_infra
10
10
  */
11
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -17,12 +17,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
17
17
  step((generator = generator.apply(thisArg, _arguments || [])).next());
18
18
  });
19
19
  };
20
+ var __importDefault = (this && this.__importDefault) || function (mod) {
21
+ return (mod && mod.__esModule) ? mod : { "default": mod };
22
+ };
20
23
  Object.defineProperty(exports, "__esModule", { value: true });
21
24
  const core_1 = require("@memlab/core");
22
25
  const e2e_1 = require("@memlab/e2e");
26
+ const OptionConstant_1 = __importDefault(require("../lib/OptionConstant"));
23
27
  class ScenarioFileOption extends core_1.BaseOption {
24
28
  getOptionName() {
25
- return 'scenario';
29
+ return OptionConstant_1.default.optionNames.SCENARIO;
26
30
  }
27
31
  getDescription() {
28
32
  return 'set file path loading test scenario';
@@ -32,11 +36,13 @@ class ScenarioFileOption extends core_1.BaseOption {
32
36
  }
33
37
  parse(config, args) {
34
38
  return __awaiter(this, void 0, void 0, function* () {
35
- if (args.scenario) {
36
- const scenarioFile = args.scenario;
39
+ const name = this.getOptionName();
40
+ if (args[name]) {
41
+ const scenarioFile = args[name];
37
42
  // load scenario file and get target app name
38
43
  config.scenario = core_1.utils.loadScenario(scenarioFile);
39
44
  config.targetApp = e2e_1.E2EUtils.getScenarioAppName(config.scenario);
45
+ config.targetTab = core_1.constant.unset;
40
46
  }
41
47
  });
42
48
  }
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall ws_labs
8
+ * @oncall web_perf_infra
9
9
  */
10
10
  import type { ParsedArgs } from 'minimist';
11
11
  import type { MemLabConfig } from '@memlab/core';
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall ws_labs
9
+ * @oncall web_perf_infra
10
10
  */
11
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -17,8 +17,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
17
17
  step((generator = generator.apply(thisArg, _arguments || [])).next());
18
18
  });
19
19
  };
20
+ var __importDefault = (this && this.__importDefault) || function (mod) {
21
+ return (mod && mod.__esModule) ? mod : { "default": mod };
22
+ };
20
23
  Object.defineProperty(exports, "__esModule", { value: true });
21
24
  const core_1 = require("@memlab/core");
25
+ const OptionConstant_1 = __importDefault(require("../lib/OptionConstant"));
22
26
  const devices = core_1.constant.isFRL
23
27
  ? {}
24
28
  : core_1.constant.isFB
@@ -27,7 +31,7 @@ const devices = core_1.constant.isFRL
27
31
  require('puppeteer').devices;
28
32
  class SetDeviceOption extends core_1.BaseOption {
29
33
  getOptionName() {
30
- return 'device';
34
+ return OptionConstant_1.default.optionNames.DEVICE;
31
35
  }
32
36
  getDescription() {
33
37
  return 'set the device type to emulate';
@@ -37,8 +41,10 @@ class SetDeviceOption extends core_1.BaseOption {
37
41
  }
38
42
  parse(config, args) {
39
43
  return __awaiter(this, void 0, void 0, function* () {
40
- if (args.device) {
41
- config.setDevice(args.device, { manualOverride: true });
44
+ const name = this.getOptionName();
45
+ const arg = args[name];
46
+ if (arg) {
47
+ config.setDevice(arg, { manualOverride: true });
42
48
  }
43
49
  });
44
50
  }
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall ws_labs
8
+ * @oncall web_perf_infra
9
9
  */
10
10
  import type { ParsedArgs } from 'minimist';
11
11
  import type { MemLabConfig } from '@memlab/core';
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall ws_labs
9
+ * @oncall web_perf_infra
10
10
  */
11
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -17,11 +17,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
17
17
  step((generator = generator.apply(thisArg, _arguments || [])).next());
18
18
  });
19
19
  };
20
+ var __importDefault = (this && this.__importDefault) || function (mod) {
21
+ return (mod && mod.__esModule) ? mod : { "default": mod };
22
+ };
20
23
  Object.defineProperty(exports, "__esModule", { value: true });
21
24
  const core_1 = require("@memlab/core");
25
+ const OptionConstant_1 = __importDefault(require("../lib/OptionConstant"));
22
26
  class SetUserAgentOption extends core_1.BaseOption {
23
27
  getOptionName() {
24
- return 'user-agent';
28
+ return OptionConstant_1.default.optionNames.USER_AGENT;
25
29
  }
26
30
  getDescription() {
27
31
  return ('set the UserAgent string in browser (for E2E interaction), ' +
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall ws_labs
8
+ * @oncall web_perf_infra
9
9
  */
10
10
  import type { ParsedArgs } from 'minimist';
11
11
  import type { MemLabConfig } from '@memlab/core';
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall ws_labs
9
+ * @oncall web_perf_infra
10
10
  */
11
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -17,18 +17,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
17
17
  step((generator = generator.apply(thisArg, _arguments || [])).next());
18
18
  });
19
19
  };
20
+ var __importDefault = (this && this.__importDefault) || function (mod) {
21
+ return (mod && mod.__esModule) ? mod : { "default": mod };
22
+ };
20
23
  Object.defineProperty(exports, "__esModule", { value: true });
21
24
  const core_1 = require("@memlab/core");
25
+ const OptionConstant_1 = __importDefault(require("../lib/OptionConstant"));
22
26
  class SkipExtraOperationOption extends core_1.BaseOption {
23
27
  getOptionName() {
24
- return 'skip-extra-ops';
28
+ return OptionConstant_1.default.optionNames.SKIP_EXTRA_OPS;
25
29
  }
26
30
  getDescription() {
27
31
  return 'skip doing extra interactions (e.g., scrolling and waiting) on target and final page';
28
32
  }
29
33
  parse(config, args) {
30
34
  return __awaiter(this, void 0, void 0, function* () {
31
- if (args['skip-extra-ops'] || args['skip-extra-op']) {
35
+ if (args[this.getOptionName()] ||
36
+ args[OptionConstant_1.default.optionNames.SKIP_EXTRA_OP]) {
32
37
  config.skipExtraOps = true;
33
38
  }
34
39
  });
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall ws_labs
8
+ * @oncall web_perf_infra
9
9
  */
10
10
  import type { ParsedArgs } from 'minimist';
11
11
  import type { MemLabConfig } from '@memlab/core';
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall ws_labs
9
+ * @oncall web_perf_infra
10
10
  */
11
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -17,11 +17,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
17
17
  step((generator = generator.apply(thisArg, _arguments || [])).next());
18
18
  });
19
19
  };
20
+ var __importDefault = (this && this.__importDefault) || function (mod) {
21
+ return (mod && mod.__esModule) ? mod : { "default": mod };
22
+ };
20
23
  Object.defineProperty(exports, "__esModule", { value: true });
21
24
  const core_1 = require("@memlab/core");
25
+ const OptionConstant_1 = __importDefault(require("../lib/OptionConstant"));
22
26
  class SkipGCOption extends core_1.BaseOption {
23
27
  getOptionName() {
24
- return 'skip-gc';
28
+ return OptionConstant_1.default.optionNames.SKIP_GC;
25
29
  }
26
30
  getDescription() {
27
31
  return 'skip doing garbage collection in browser';
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall ws_labs
8
+ * @oncall web_perf_infra
9
9
  */
10
10
  import type { ParsedArgs } from 'minimist';
11
11
  import type { MemLabConfig } from '@memlab/core';
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall ws_labs
9
+ * @oncall web_perf_infra
10
10
  */
11
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -17,18 +17,22 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
17
17
  step((generator = generator.apply(thisArg, _arguments || [])).next());
18
18
  });
19
19
  };
20
+ var __importDefault = (this && this.__importDefault) || function (mod) {
21
+ return (mod && mod.__esModule) ? mod : { "default": mod };
22
+ };
20
23
  Object.defineProperty(exports, "__esModule", { value: true });
21
24
  const core_1 = require("@memlab/core");
25
+ const OptionConstant_1 = __importDefault(require("../lib/OptionConstant"));
22
26
  class SkipScreenshotOption extends core_1.BaseOption {
23
27
  getOptionName() {
24
- return 'skip-screenshot';
28
+ return OptionConstant_1.default.optionNames.SKIP_SCREENSHOT;
25
29
  }
26
30
  getDescription() {
27
31
  return 'skip taking screenshots';
28
32
  }
29
33
  parse(config, args) {
30
34
  return __awaiter(this, void 0, void 0, function* () {
31
- if (args['skip-screenshot']) {
35
+ if (args[this.getOptionName()]) {
32
36
  config.skipScreenshot = true;
33
37
  }
34
38
  });
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall ws_labs
8
+ * @oncall web_perf_infra
9
9
  */
10
10
  import type { ParsedArgs } from 'minimist';
11
11
  import type { MemLabConfig } from '@memlab/core';
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall ws_labs
9
+ * @oncall web_perf_infra
10
10
  */
11
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -17,18 +17,22 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
17
17
  step((generator = generator.apply(thisArg, _arguments || [])).next());
18
18
  });
19
19
  };
20
+ var __importDefault = (this && this.__importDefault) || function (mod) {
21
+ return (mod && mod.__esModule) ? mod : { "default": mod };
22
+ };
20
23
  Object.defineProperty(exports, "__esModule", { value: true });
21
24
  const core_1 = require("@memlab/core");
25
+ const OptionConstant_1 = __importDefault(require("../lib/OptionConstant"));
22
26
  class SkipScrollOption extends core_1.BaseOption {
23
27
  getOptionName() {
24
- return 'skip-scroll';
28
+ return OptionConstant_1.default.optionNames.SKIP_SCROLL;
25
29
  }
26
30
  getDescription() {
27
31
  return 'skip scrolling target page in browser';
28
32
  }
29
33
  parse(config, args) {
30
34
  return __awaiter(this, void 0, void 0, function* () {
31
- if (args['skip-scroll']) {
35
+ if (args[this.getOptionName()]) {
32
36
  config.skipScroll = true;
33
37
  }
34
38
  });
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall ws_labs
8
+ * @oncall web_perf_infra
9
9
  */
10
10
  import type { ParsedArgs } from 'minimist';
11
11
  import type { MemLabConfig } from '@memlab/core';
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall ws_labs
9
+ * @oncall web_perf_infra
10
10
  */
11
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -17,18 +17,22 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
17
17
  step((generator = generator.apply(thisArg, _arguments || [])).next());
18
18
  });
19
19
  };
20
+ var __importDefault = (this && this.__importDefault) || function (mod) {
21
+ return (mod && mod.__esModule) ? mod : { "default": mod };
22
+ };
20
23
  Object.defineProperty(exports, "__esModule", { value: true });
21
24
  const core_1 = require("@memlab/core");
25
+ const OptionConstant_1 = __importDefault(require("../lib/OptionConstant"));
22
26
  class SkipSnapshotOption extends core_1.BaseOption {
23
27
  getOptionName() {
24
- return 'skip-snapshot';
28
+ return OptionConstant_1.default.optionNames.SKIP_SNAPSHOT;
25
29
  }
26
30
  getDescription() {
27
31
  return 'skip taking heap snapshots';
28
32
  }
29
33
  parse(config, args) {
30
34
  return __awaiter(this, void 0, void 0, function* () {
31
- if (args['skip-snapshot']) {
35
+ if (args[this.getOptionName()]) {
32
36
  config.skipSnapshot = true;
33
37
  }
34
38
  });
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall ws_labs
8
+ * @oncall web_perf_infra
9
9
  */
10
10
  import type { ParsedArgs } from 'minimist';
11
11
  import type { MemLabConfig } from '@memlab/core';
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall ws_labs
9
+ * @oncall web_perf_infra
10
10
  */
11
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -17,11 +17,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
17
17
  step((generator = generator.apply(thisArg, _arguments || [])).next());
18
18
  });
19
19
  };
20
+ var __importDefault = (this && this.__importDefault) || function (mod) {
21
+ return (mod && mod.__esModule) ? mod : { "default": mod };
22
+ };
20
23
  Object.defineProperty(exports, "__esModule", { value: true });
21
24
  const core_1 = require("@memlab/core");
25
+ const OptionConstant_1 = __importDefault(require("../lib/OptionConstant"));
22
26
  class SkipWarmupOption extends core_1.BaseOption {
23
27
  getOptionName() {
24
- return 'skip-warmup';
28
+ return OptionConstant_1.default.optionNames.SKIP_WARMUP;
25
29
  }
26
30
  getDescription() {
27
31
  return 'skip warming up web server';
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall ws_labs
8
+ * @oncall web_perf_infra
9
9
  */
10
10
  import type { ParsedArgs } from 'minimist';
11
11
  import { BaseOption, MemLabConfig } from '@memlab/core';
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall ws_labs
9
+ * @oncall web_perf_infra
10
10
  */
11
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -23,9 +23,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
23
23
  Object.defineProperty(exports, "__esModule", { value: true });
24
24
  const fs_1 = __importDefault(require("fs"));
25
25
  const core_1 = require("@memlab/core");
26
+ const OptionConstant_1 = __importDefault(require("../lib/OptionConstant"));
26
27
  class BaselineFileOption extends core_1.BaseOption {
27
28
  getOptionName() {
28
- return 'baseline';
29
+ return OptionConstant_1.default.optionNames.BASELINE;
29
30
  }
30
31
  getDescription() {
31
32
  return 'set file path of the baseline heap snapshot';
@@ -35,10 +36,11 @@ class BaselineFileOption extends core_1.BaseOption {
35
36
  }
36
37
  parse(config, args) {
37
38
  return __awaiter(this, void 0, void 0, function* () {
38
- if (!args.baseline) {
39
+ const name = this.getOptionName();
40
+ if (!args[name]) {
39
41
  return;
40
42
  }
41
- const file = args.baseline;
43
+ const file = args[name];
42
44
  if (!fs_1.default.existsSync(file)) {
43
45
  core_1.utils.haltOrThrow(`Invalid snapshot file: ${file}`);
44
46
  }
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall ws_labs
8
+ * @oncall web_perf_infra
9
9
  */
10
10
  import type { ParsedArgs } from 'minimist';
11
11
  import { BaseOption, MemLabConfig } from '@memlab/core';
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall ws_labs
9
+ * @oncall web_perf_infra
10
10
  */
11
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -23,9 +23,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
23
23
  Object.defineProperty(exports, "__esModule", { value: true });
24
24
  const fs_1 = __importDefault(require("fs"));
25
25
  const core_1 = require("@memlab/core");
26
+ const OptionConstant_1 = __importDefault(require("../lib/OptionConstant"));
26
27
  class FinalFileOption extends core_1.BaseOption {
27
28
  getOptionName() {
28
- return 'final';
29
+ return OptionConstant_1.default.optionNames.FINAL;
29
30
  }
30
31
  getDescription() {
31
32
  return 'set file path of the final heap snapshot';
@@ -35,10 +36,11 @@ class FinalFileOption extends core_1.BaseOption {
35
36
  }
36
37
  parse(config, args) {
37
38
  return __awaiter(this, void 0, void 0, function* () {
38
- if (!args.final) {
39
+ const name = this.getOptionName();
40
+ if (!args[name]) {
39
41
  return;
40
42
  }
41
- const file = args.final;
43
+ const file = args[name];
42
44
  if (!fs_1.default.existsSync(file)) {
43
45
  core_1.utils.haltOrThrow(`Invalid snapshot file: ${file}`);
44
46
  }
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall ws_labs
8
+ * @oncall web_perf_infra
9
9
  */
10
10
  import type { ParsedArgs } from 'minimist';
11
11
  import type { MemLabConfig } from '@memlab/core';
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall ws_labs
9
+ * @oncall web_perf_infra
10
10
  */
11
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -17,11 +17,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
17
17
  step((generator = generator.apply(thisArg, _arguments || [])).next());
18
18
  });
19
19
  };
20
+ var __importDefault = (this && this.__importDefault) || function (mod) {
21
+ return (mod && mod.__esModule) ? mod : { "default": mod };
22
+ };
20
23
  Object.defineProperty(exports, "__esModule", { value: true });
21
24
  const core_1 = require("@memlab/core");
25
+ const OptionConstant_1 = __importDefault(require("../lib/OptionConstant"));
22
26
  class HeapNodeIdOption extends core_1.BaseOption {
23
27
  getOptionName() {
24
- return 'node-id';
28
+ return OptionConstant_1.default.optionNames.NODE_ID;
25
29
  }
26
30
  getDescription() {
27
31
  return 'set heap node ID';
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall ws_labs
8
+ * @oncall web_perf_infra
9
9
  */
10
10
  import type { ParsedArgs } from 'minimist';
11
11
  import { BaseOption, MemLabConfig } from '@memlab/core';
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall ws_labs
9
+ * @oncall web_perf_infra
10
10
  */
11
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -17,11 +17,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
17
17
  step((generator = generator.apply(thisArg, _arguments || [])).next());
18
18
  });
19
19
  };
20
+ var __importDefault = (this && this.__importDefault) || function (mod) {
21
+ return (mod && mod.__esModule) ? mod : { "default": mod };
22
+ };
20
23
  Object.defineProperty(exports, "__esModule", { value: true });
21
24
  const core_1 = require("@memlab/core");
25
+ const OptionConstant_1 = __importDefault(require("../lib/OptionConstant"));
22
26
  class JSEngineOption extends core_1.BaseOption {
23
27
  getOptionName() {
24
- return 'engine';
28
+ return OptionConstant_1.default.optionNames.ENGINE;
25
29
  }
26
30
  getDescription() {
27
31
  return 'set the JavaScript engine (default to V8)';
@@ -31,10 +35,11 @@ class JSEngineOption extends core_1.BaseOption {
31
35
  }
32
36
  parse(config, args) {
33
37
  return __awaiter(this, void 0, void 0, function* () {
34
- if (!args.engine) {
38
+ const name = this.getOptionName();
39
+ if (!args[name]) {
35
40
  return;
36
41
  }
37
- config.jsEngine = args.engine;
42
+ config.jsEngine = args[name];
38
43
  config.specifiedEngine = true;
39
44
  if (core_1.constant.supportedEngines.indexOf(config.jsEngine) < 0) {
40
45
  core_1.utils.haltOrThrow(`Invalid engine: ${config.jsEngine} ` +
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall ws_labs
8
+ * @oncall web_perf_infra
9
9
  */
10
10
  import type { ParsedArgs } from 'minimist';
11
11
  import type { MemLabConfig } from '@memlab/core';
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  * @format
9
- * @oncall ws_labs
9
+ * @oncall web_perf_infra
10
10
  */
11
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -17,11 +17,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
17
17
  step((generator = generator.apply(thisArg, _arguments || [])).next());
18
18
  });
19
19
  };
20
+ var __importDefault = (this && this.__importDefault) || function (mod) {
21
+ return (mod && mod.__esModule) ? mod : { "default": mod };
22
+ };
20
23
  Object.defineProperty(exports, "__esModule", { value: true });
21
24
  const core_1 = require("@memlab/core");
25
+ const OptionConstant_1 = __importDefault(require("../lib/OptionConstant"));
22
26
  class LeakClusterSizeThresholdOption extends core_1.BaseOption {
23
27
  getOptionName() {
24
- return 'ignore-leak-cluster-size-below';
28
+ return OptionConstant_1.default.optionNames.IGNORE_LEAK_CLUSTER_SIZE_BELOW;
25
29
  }
26
30
  getDescription() {
27
31
  return 'ignore memory leaks with aggregated retained size smaller than the threshold';
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @format
8
- * @oncall ws_labs
8
+ * @oncall web_perf_infra
9
9
  */
10
10
  import type { ParsedArgs } from 'minimist';
11
11
  import type { MemLabConfig } from '@memlab/core';