@memlab/cli 1.0.8 → 1.0.10

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 (155) hide show
  1. package/dist/BaseCommand.d.ts +1 -1
  2. package/dist/BaseCommand.js +1 -1
  3. package/dist/CommandLoader.d.ts +1 -1
  4. package/dist/CommandLoader.js +1 -1
  5. package/dist/Dispatcher.d.ts +1 -1
  6. package/dist/Dispatcher.js +1 -1
  7. package/dist/TypesThirdParty.d.ts +1 -1
  8. package/dist/TypesThirdParty.js +1 -1
  9. package/dist/commands/CleanLoggerDataCommand.d.ts +1 -1
  10. package/dist/commands/CleanLoggerDataCommand.js +1 -1
  11. package/dist/commands/CleanRunDataCommand.d.ts +1 -1
  12. package/dist/commands/CleanRunDataCommand.js +1 -1
  13. package/dist/commands/GetVersionCommand.d.ts +1 -1
  14. package/dist/commands/GetVersionCommand.js +1 -1
  15. package/dist/commands/InitDirectoryCommand.d.ts +1 -1
  16. package/dist/commands/InitDirectoryCommand.js +1 -1
  17. package/dist/commands/ListScenariosCommand.d.ts +1 -1
  18. package/dist/commands/ListScenariosCommand.js +1 -1
  19. package/dist/commands/MemLabRunCommand.d.ts +1 -1
  20. package/dist/commands/MemLabRunCommand.js +1 -1
  21. package/dist/commands/PrintSummaryCommand.d.ts +1 -1
  22. package/dist/commands/PrintSummaryCommand.js +1 -1
  23. package/dist/commands/ResetDirectoryCommand.d.ts +1 -1
  24. package/dist/commands/ResetDirectoryCommand.js +1 -1
  25. package/dist/commands/RunMeasureCommand.d.ts +1 -1
  26. package/dist/commands/RunMeasureCommand.js +1 -1
  27. package/dist/commands/WarmupAppCommand.d.ts +1 -1
  28. package/dist/commands/WarmupAppCommand.js +1 -1
  29. package/dist/commands/heap/CheckLeakCommand.d.ts +1 -1
  30. package/dist/commands/heap/CheckLeakCommand.js +1 -1
  31. package/dist/commands/heap/GetRetainerTraceCommand.d.ts +1 -1
  32. package/dist/commands/heap/GetRetainerTraceCommand.js +1 -1
  33. package/dist/commands/heap/HeapAnalysisCommand.d.ts +1 -1
  34. package/dist/commands/heap/HeapAnalysisCommand.js +1 -1
  35. package/dist/commands/heap/HeapAnalysisSubCommandWrapper.d.ts +1 -1
  36. package/dist/commands/heap/HeapAnalysisSubCommandWrapper.js +1 -1
  37. package/dist/commands/heap/interactive/InteractiveCommandLoader.d.ts +1 -1
  38. package/dist/commands/heap/interactive/InteractiveCommandLoader.js +1 -1
  39. package/dist/commands/heap/interactive/InteractiveHeapCommand.d.ts +6 -1
  40. package/dist/commands/heap/interactive/InteractiveHeapCommand.js +54 -15
  41. package/dist/commands/heap/interactive/InteractiveHeapExploreCommand.d.ts +26 -0
  42. package/dist/commands/heap/interactive/InteractiveHeapExploreCommand.js +145 -0
  43. package/dist/commands/heap/interactive/ui-components/CliScreen.d.ts +38 -0
  44. package/dist/commands/heap/interactive/ui-components/CliScreen.js +234 -0
  45. package/dist/commands/heap/interactive/ui-components/HeapViewController.d.ts +58 -0
  46. package/dist/commands/heap/interactive/ui-components/HeapViewController.js +251 -0
  47. package/dist/commands/heap/interactive/ui-components/HeapViewUtils.d.ts +29 -0
  48. package/dist/commands/heap/interactive/ui-components/HeapViewUtils.js +84 -0
  49. package/dist/commands/heap/interactive/ui-components/ListComponent.d.ts +62 -0
  50. package/dist/commands/heap/interactive/ui-components/ListComponent.js +220 -0
  51. package/dist/commands/helper/GenerateCLIDocCommand.d.ts +1 -1
  52. package/dist/commands/helper/GenerateCLIDocCommand.js +1 -1
  53. package/dist/commands/helper/HelperCommand.d.ts +1 -1
  54. package/dist/commands/helper/HelperCommand.js +1 -1
  55. package/dist/commands/helper/lib/CommandOrder.d.ts +1 -1
  56. package/dist/commands/helper/lib/CommandOrder.js +1 -1
  57. package/dist/commands/helper/lib/Types.d.ts +1 -1
  58. package/dist/commands/helper/lib/Types.js +1 -1
  59. package/dist/commands/query/QueryDefaultWorkDirCommand.d.ts +1 -1
  60. package/dist/commands/query/QueryDefaultWorkDirCommand.js +1 -1
  61. package/dist/commands/snapshot/CheckXvfbSupportCommand.d.ts +1 -1
  62. package/dist/commands/snapshot/CheckXvfbSupportCommand.js +1 -1
  63. package/dist/commands/snapshot/Snapshot.d.ts +1 -1
  64. package/dist/commands/snapshot/Snapshot.js +1 -1
  65. package/dist/commands/snapshot/TakeSnapshotCommand.d.ts +1 -1
  66. package/dist/commands/snapshot/TakeSnapshotCommand.js +1 -1
  67. package/dist/commands/snapshot/WarmupAndSnapshotCommand.d.ts +1 -1
  68. package/dist/commands/snapshot/WarmupAndSnapshotCommand.js +1 -1
  69. package/dist/index.d.ts +1 -1
  70. package/dist/index.js +1 -1
  71. package/dist/options/AppOption.d.ts +1 -1
  72. package/dist/options/AppOption.js +1 -1
  73. package/dist/options/DebugOption.d.ts +1 -1
  74. package/dist/options/DebugOption.js +1 -1
  75. package/dist/options/DisableXvfbOption.d.ts +1 -1
  76. package/dist/options/DisableXvfbOption.js +1 -1
  77. package/dist/options/FullExecutionOption.d.ts +1 -1
  78. package/dist/options/FullExecutionOption.js +1 -1
  79. package/dist/options/HeadfulBrowserOption.d.ts +1 -1
  80. package/dist/options/HeadfulBrowserOption.js +1 -1
  81. package/dist/options/HeapNodeIdOption.d.ts +1 -1
  82. package/dist/options/HeapNodeIdOption.js +1 -1
  83. package/dist/options/HelperOption.d.ts +1 -1
  84. package/dist/options/HelperOption.js +1 -1
  85. package/dist/options/InteractionOption.d.ts +1 -1
  86. package/dist/options/InteractionOption.js +1 -1
  87. package/dist/options/MLClusteringLinkageMaxDistanceOption.d.ts +1 -1
  88. package/dist/options/MLClusteringLinkageMaxDistanceOption.js +1 -1
  89. package/dist/options/MLClusteringMaxDFOption.d.ts +1 -1
  90. package/dist/options/MLClusteringMaxDFOption.js +1 -1
  91. package/dist/options/MLClusteringOption.d.ts +1 -1
  92. package/dist/options/MLClusteringOption.js +1 -1
  93. package/dist/options/NumberOfRunsOption.d.ts +1 -1
  94. package/dist/options/NumberOfRunsOption.js +1 -1
  95. package/dist/options/RemoteBrowserDebugOption.d.ts +1 -1
  96. package/dist/options/RemoteBrowserDebugOption.js +1 -1
  97. package/dist/options/RunningModeOption.d.ts +1 -1
  98. package/dist/options/RunningModeOption.js +1 -1
  99. package/dist/options/ScenarioFileOption.d.ts +1 -1
  100. package/dist/options/ScenarioFileOption.js +1 -1
  101. package/dist/options/SetContinuousTestOption.d.ts +1 -1
  102. package/dist/options/SetContinuousTestOption.js +1 -1
  103. package/dist/options/SetDeviceOption.d.ts +1 -1
  104. package/dist/options/SetDeviceOption.js +1 -1
  105. package/dist/options/SetWorkingDirectoryOption.d.ts +1 -1
  106. package/dist/options/SetWorkingDirectoryOption.js +1 -1
  107. package/dist/options/SilentOption.d.ts +1 -1
  108. package/dist/options/SilentOption.js +1 -1
  109. package/dist/options/SkipExtraOperationOption.d.ts +1 -1
  110. package/dist/options/SkipExtraOperationOption.js +1 -1
  111. package/dist/options/SkipGCOption.d.ts +1 -1
  112. package/dist/options/SkipGCOption.js +1 -1
  113. package/dist/options/SkipScreenshotOption.d.ts +1 -1
  114. package/dist/options/SkipScreenshotOption.js +1 -1
  115. package/dist/options/SkipScrollOption.d.ts +1 -1
  116. package/dist/options/SkipScrollOption.js +1 -1
  117. package/dist/options/SkipSnapshotOption.d.ts +1 -1
  118. package/dist/options/SkipSnapshotOption.js +1 -1
  119. package/dist/options/SkipWarmupOption.d.ts +1 -1
  120. package/dist/options/SkipWarmupOption.js +1 -1
  121. package/dist/options/VerboseOption.d.ts +1 -1
  122. package/dist/options/VerboseOption.js +1 -1
  123. package/dist/options/heap/BaselineFileOption.d.ts +1 -1
  124. package/dist/options/heap/BaselineFileOption.js +1 -1
  125. package/dist/options/heap/FinalFileOption.d.ts +1 -1
  126. package/dist/options/heap/FinalFileOption.js +1 -1
  127. package/dist/options/heap/JSEngineOption.d.ts +1 -1
  128. package/dist/options/heap/JSEngineOption.js +1 -1
  129. package/dist/options/heap/LeakClusterSizeThresholdOption.d.ts +1 -1
  130. package/dist/options/heap/LeakClusterSizeThresholdOption.js +1 -1
  131. package/dist/options/heap/LogTraceAsClusterOption.d.ts +1 -1
  132. package/dist/options/heap/LogTraceAsClusterOption.js +1 -1
  133. package/dist/options/heap/OversizeThresholdOption.d.ts +1 -1
  134. package/dist/options/heap/OversizeThresholdOption.js +1 -1
  135. package/dist/options/heap/SnapshotDirectoryOption.d.ts +1 -1
  136. package/dist/options/heap/SnapshotDirectoryOption.js +1 -1
  137. package/dist/options/heap/SnapshotFileOption.d.ts +1 -1
  138. package/dist/options/heap/SnapshotFileOption.js +1 -1
  139. package/dist/options/heap/TargetFileOption.d.ts +1 -1
  140. package/dist/options/heap/TargetFileOption.js +1 -1
  141. package/dist/options/heap/TraceAllObjectsOption.d.ts +1 -1
  142. package/dist/options/heap/TraceAllObjectsOption.js +1 -1
  143. package/dist/options/heap/leak-filter/LeakFilterFileOption.d.ts +1 -1
  144. package/dist/options/heap/leak-filter/LeakFilterFileOption.js +1 -1
  145. package/dist/options/heap/leak-filter/examples/FilterLib.d.ts +1 -1
  146. package/dist/options/heap/leak-filter/examples/FilterLib.js +1 -1
  147. package/dist/options/heap/leak-filter/examples/dup-string-as-leak.example-1.d.ts +1 -1
  148. package/dist/options/heap/leak-filter/examples/dup-string-as-leak.example-1.js +1 -1
  149. package/dist/options/heap/leak-filter/examples/dup-string-as-leak.example-2.d.ts +1 -1
  150. package/dist/options/heap/leak-filter/examples/dup-string-as-leak.example-2.js +1 -1
  151. package/dist/options/lib/UniversalOptions.d.ts +1 -1
  152. package/dist/options/lib/UniversalOptions.js +1 -1
  153. package/dist/runner.d.ts +1 -1
  154. package/dist/runner.js +1 -1
  155. package/package.json +3 -1
@@ -4,8 +4,8 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @emails oncall+ws_labs
8
7
  * @format
8
+ * @oncall ws_labs
9
9
  */
10
10
  import type { CLIOptions, Nullable } from '@memlab/core';
11
11
  import { BaseOption } from '@memlab/core';
@@ -5,8 +5,8 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
- * @emails oncall+ws_labs
9
8
  * @format
9
+ * @oncall ws_labs
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); }); }
@@ -4,8 +4,8 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @emails oncall+ws_labs
8
7
  * @format
8
+ * @oncall ws_labs
9
9
  */
10
10
  import BaseCommand from './BaseCommand';
11
11
  export default class CommandLoader {
@@ -5,8 +5,8 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
- * @emails oncall+ws_labs
9
8
  * @format
9
+ * @oncall ws_labs
10
10
  */
11
11
  var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -4,8 +4,8 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @emails oncall+ws_labs
8
7
  * @format
8
+ * @oncall ws_labs
9
9
  */
10
10
  import type { ParsedArgs } from 'minimist';
11
11
  import type { AnyRecord, MemLabConfig } from '@memlab/core';
@@ -5,8 +5,8 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
- * @emails oncall+ws_labs
9
8
  * @format
9
+ * @oncall ws_labs
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); }); }
@@ -4,8 +4,8 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @emails oncall+ws_labs
8
7
  * @format
8
+ * @oncall ws_labs
9
9
  */
10
10
  /// <reference types="node" />
11
11
  declare module 'html-inline' {
@@ -5,6 +5,6 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
- * @emails oncall+ws_labs
9
8
  * @format
9
+ * @oncall ws_labs
10
10
  */
@@ -4,8 +4,8 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @emails oncall+ws_labs
8
7
  * @format
8
+ * @oncall ws_labs
9
9
  */
10
10
  import type { CLIOptions } from '@memlab/core';
11
11
  import BaseCommand from '../BaseCommand';
@@ -5,8 +5,8 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
- * @emails oncall+ws_labs
9
8
  * @format
9
+ * @oncall ws_labs
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); }); }
@@ -4,8 +4,8 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @emails oncall+ws_labs
8
7
  * @format
8
+ * @oncall ws_labs
9
9
  */
10
10
  import type { CLIOptions } from '@memlab/core';
11
11
  import BaseCommand from '../BaseCommand';
@@ -5,8 +5,8 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
- * @emails oncall+ws_labs
9
8
  * @format
9
+ * @oncall ws_labs
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); }); }
@@ -4,8 +4,8 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @emails oncall+ws_labs
8
7
  * @format
8
+ * @oncall ws_labs
9
9
  */
10
10
  import type { CLIOptions } from '@memlab/core';
11
11
  import BaseCommand from '../BaseCommand';
@@ -5,8 +5,8 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
- * @emails oncall+ws_labs
9
8
  * @format
9
+ * @oncall ws_labs
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); }); }
@@ -4,8 +4,8 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @emails oncall+ws_labs
8
7
  * @format
8
+ * @oncall ws_labs
9
9
  */
10
10
  import type { CLIOptions } from '@memlab/core';
11
11
  import BaseCommand from '../BaseCommand';
@@ -5,8 +5,8 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
- * @emails oncall+ws_labs
9
8
  * @format
9
+ * @oncall ws_labs
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); }); }
@@ -4,8 +4,8 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @emails oncall+ws_labs
8
7
  * @format
8
+ * @oncall ws_labs
9
9
  */
10
10
  import type { CLIOptions } from '@memlab/core';
11
11
  import BaseCommand from '../BaseCommand';
@@ -5,8 +5,8 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
- * @emails oncall+ws_labs
9
8
  * @format
9
+ * @oncall ws_labs
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); }); }
@@ -4,8 +4,8 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @emails oncall+ws_labs
8
7
  * @format
8
+ * @oncall ws_labs
9
9
  */
10
10
  import type { BaseOption, CLIOptions } from '@memlab/core';
11
11
  import BaseCommand, { CommandCategory } from '../BaseCommand';
@@ -5,8 +5,8 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
- * @emails oncall+ws_labs
9
8
  * @format
9
+ * @oncall ws_labs
10
10
  */
11
11
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
12
12
  if (k2 === undefined) k2 = k;
@@ -4,8 +4,8 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @emails oncall+ws_labs
8
7
  * @format
8
+ * @oncall ws_labs
9
9
  */
10
10
  import type { CLIOptions } from '@memlab/core';
11
11
  import BaseCommand from '../BaseCommand';
@@ -5,8 +5,8 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
- * @emails oncall+ws_labs
9
8
  * @format
9
+ * @oncall ws_labs
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); }); }
@@ -4,8 +4,8 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @emails oncall+ws_labs
8
7
  * @format
8
+ * @oncall ws_labs
9
9
  */
10
10
  import type { CLIOptions } from '@memlab/core';
11
11
  import BaseCommand from '../BaseCommand';
@@ -5,8 +5,8 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
- * @emails oncall+ws_labs
9
8
  * @format
9
+ * @oncall ws_labs
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); }); }
@@ -4,8 +4,8 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @emails oncall+ws_labs
8
7
  * @format
8
+ * @oncall ws_labs
9
9
  */
10
10
  import type { CLIOptions } from '@memlab/core';
11
11
  import BaseCommand from '../BaseCommand';
@@ -5,8 +5,8 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
- * @emails oncall+ws_labs
9
8
  * @format
9
+ * @oncall ws_labs
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); }); }
@@ -4,8 +4,8 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @emails oncall+ws_labs
8
7
  * @format
8
+ * @oncall ws_labs
9
9
  */
10
10
  import type { CLIOptions } from '@memlab/core';
11
11
  import { BaseOption } from '@memlab/core';
@@ -5,8 +5,8 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
- * @emails oncall+ws_labs
9
8
  * @format
9
+ * @oncall ws_labs
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); }); }
@@ -4,8 +4,8 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @emails oncall+ws_labs
8
7
  * @format
8
+ * @oncall ws_labs
9
9
  */
10
10
  import type { CLIOptions } from '@memlab/core';
11
11
  import BaseCommand, { CommandCategory } from '../../BaseCommand';
@@ -5,8 +5,8 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
- * @emails oncall+ws_labs
9
8
  * @format
9
+ * @oncall ws_labs
10
10
  */
11
11
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
12
12
  if (k2 === undefined) k2 = k;
@@ -4,8 +4,8 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @emails oncall+ws_labs
8
7
  * @format
8
+ * @oncall ws_labs
9
9
  */
10
10
  import type { CLIOptions } from '@memlab/core';
11
11
  import BaseCommand, { CommandCategory } from '../../BaseCommand';
@@ -5,8 +5,8 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
- * @emails oncall+ws_labs
9
8
  * @format
9
+ * @oncall ws_labs
10
10
  */
11
11
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
12
12
  if (k2 === undefined) k2 = k;
@@ -4,8 +4,8 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @emails oncall+ws_labs
8
7
  * @format
8
+ * @oncall ws_labs
9
9
  */
10
10
  import type { CLIOptions } from '@memlab/core';
11
11
  import BaseCommand, { CommandCategory } from '../../BaseCommand';
@@ -5,8 +5,8 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
- * @emails oncall+ws_labs
9
8
  * @format
9
+ * @oncall ws_labs
10
10
  */
11
11
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
12
12
  if (k2 === undefined) k2 = k;
@@ -4,8 +4,8 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @emails oncall+ws_labs
8
7
  * @format
8
+ * @oncall ws_labs
9
9
  */
10
10
  import type { CLIOptions } from '@memlab/core';
11
11
  import { BaseOption } from '@memlab/core';
@@ -5,8 +5,8 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
- * @emails oncall+ws_labs
9
8
  * @format
9
+ * @oncall ws_labs
10
10
  */
11
11
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
12
12
  if (k2 === undefined) k2 = k;
@@ -4,8 +4,8 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @emails oncall+ws_labs
8
7
  * @format
8
+ * @oncall ws_labs
9
9
  */
10
10
  import BaseCommand from '../../../BaseCommand';
11
11
  import CommandLoader from '../../../CommandLoader';
@@ -5,8 +5,8 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
- * @emails oncall+ws_labs
9
8
  * @format
9
+ * @oncall ws_labs
10
10
  */
11
11
  var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -4,8 +4,8 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @emails oncall+ws_labs
8
7
  * @format
8
+ * @oncall ws_labs
9
9
  */
10
10
  import { CLIOptions } from '@memlab/core';
11
11
  import BaseCommand, { CommandCategory } from '../../../BaseCommand';
@@ -16,7 +16,12 @@ export default class InteractiveHeapCommand extends BaseCommand {
16
16
  getCategory(): CommandCategory;
17
17
  getExamples(): string[];
18
18
  getOptions(): BaseOption[];
19
+ private exitAttempt;
19
20
  private printPromptInfo;
21
+ private quit;
22
+ private initPrompt;
23
+ private setupInterruptHandle;
24
+ private setupCommandHandle;
20
25
  private startInteractiveCLI;
21
26
  run(options: CLIOptions): Promise<void>;
22
27
  }
@@ -5,8 +5,8 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
- * @emails oncall+ws_labs
9
8
  * @format
9
+ * @oncall ws_labs
10
10
  */
11
11
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
12
12
  if (k2 === undefined) k2 = k;
@@ -58,6 +58,10 @@ const heap_analysis_1 = require("@memlab/heap-analysis");
58
58
  const Dispatcher_1 = require("../../../Dispatcher");
59
59
  const InteractiveCommandLoader_1 = __importDefault(require("./InteractiveCommandLoader"));
60
60
  class InteractiveHeapCommand extends BaseCommand_1.default {
61
+ constructor() {
62
+ super(...arguments);
63
+ this.exitAttempt = 0;
64
+ }
61
65
  getCommandName() {
62
66
  return 'heap';
63
67
  }
@@ -76,41 +80,76 @@ class InteractiveHeapCommand extends BaseCommand_1.default {
76
80
  printPromptInfo() {
77
81
  core_2.info.topLevel(`Heap Snapshot Loaded: ${chalk_1.default.grey(heap_analysis_1.heapConfig.currentHeapFile)}`);
78
82
  }
79
- startInteractiveCLI() {
80
- const rl = readline_1.default.createInterface({
83
+ quit(exitCode = 1) {
84
+ this.exitAttempt = 0;
85
+ core_2.info.topLevel('');
86
+ process.exit(exitCode);
87
+ }
88
+ initPrompt() {
89
+ return readline_1.default.createInterface({
81
90
  input: process.stdin,
82
91
  output: process.stdout,
83
- prompt: 'memlab > ',
92
+ prompt: chalk_1.default.gray('[') + chalk_1.default.green('memlab') + chalk_1.default.gray(']') + '$ ',
93
+ });
94
+ }
95
+ setupInterruptHandle(rl) {
96
+ // exit when user type Ctrl + C
97
+ rl.on('SIGINT', () => {
98
+ if (this.exitAttempt > 0) {
99
+ this.quit();
100
+ }
101
+ this.exitAttempt++;
102
+ setTimeout(() => {
103
+ this.exitAttempt--;
104
+ }, 5000);
105
+ core_2.info.topLevel('Type Ctrl + C again to exit');
106
+ rl.prompt();
84
107
  });
108
+ }
109
+ setupCommandHandle(rl) {
85
110
  // the interactive cli only supports a subset of memlab commands
86
111
  const dispatcher = new Dispatcher_1.CommandDispatcher({
87
112
  commandLoader: new InteractiveCommandLoader_1.default(),
88
113
  });
89
114
  // do not halt execution when running the interactive command
90
115
  core_2.config.errorHandling = core_1.ErrorHandling.Throw;
91
- // start the interactive prompt
92
- this.printPromptInfo();
93
- rl.prompt();
94
116
  // start interpreting interactive commands
95
117
  rl.on('line', (line) => __awaiter(this, void 0, void 0, function* () {
118
+ let command = '';
96
119
  try {
97
120
  // "memlab <command>" -> "<command>"
98
- const command = line.trim().startsWith('memlab ')
99
- ? line.substring('memlab '.length)
100
- : line;
101
- const args = command.match(/("[^"]+")|('[^']+')|(\S+)/g);
102
- const parsedArgs = (0, minimist_1.default)(args);
103
- yield dispatcher.dispatch(parsedArgs);
121
+ command = line.trim().startsWith('memlab ')
122
+ ? line.substring('memlab '.length).trim()
123
+ : line.trim();
124
+ if (command === 'exit' || command === 'quit') {
125
+ this.quit(0);
126
+ }
127
+ if (command.length > 0) {
128
+ const args = command.match(/("[^"]+")|('[^']+')|(\S+)/g);
129
+ const parsedArgs = (0, minimist_1.default)(args);
130
+ yield dispatcher.dispatch(parsedArgs);
131
+ }
104
132
  }
105
133
  catch (ex) {
106
134
  const error = core_2.utils.getError(ex);
107
135
  core_2.info.topLevel(error.message);
108
136
  }
109
- core_2.info.topLevel('');
110
- this.printPromptInfo();
137
+ if (command.length > 0) {
138
+ core_2.info.topLevel('');
139
+ this.printPromptInfo();
140
+ }
111
141
  rl.prompt();
112
142
  }));
113
143
  }
144
+ startInteractiveCLI() {
145
+ // set up the interactive prompt
146
+ const rl = this.initPrompt();
147
+ this.setupInterruptHandle(rl);
148
+ this.setupCommandHandle(rl);
149
+ // start prompt
150
+ this.printPromptInfo();
151
+ rl.prompt();
152
+ }
114
153
  run(options) {
115
154
  var _a;
116
155
  return __awaiter(this, void 0, void 0, function* () {
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @format
8
+ * @oncall ws_labs
9
+ */
10
+ import type { CLIOptions } from '@memlab/core';
11
+ import BaseCommand, { CommandCategory } from '../../../BaseCommand';
12
+ import { BaseOption } from '@memlab/core';
13
+ export default class InteractiveHeapViewCommand extends BaseCommand {
14
+ getCommandName(): string;
15
+ getDescription(): string;
16
+ getCategory(): CommandCategory;
17
+ getExamples(): string[];
18
+ getOptions(): BaseOption[];
19
+ private getHeap;
20
+ private getNodesToFocus;
21
+ private getDetachedNodes;
22
+ private getNodesWithLargestRetainedSize;
23
+ private getHeapNodes;
24
+ run(options: CLIOptions): Promise<void>;
25
+ }
26
+ //# sourceMappingURL=InteractiveHeapExploreCommand.d.ts.map