@memlab/cli 2.0.0 → 2.0.2

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.
@@ -14,6 +14,7 @@ import { BaseAnalysis } from '@memlab/heap-analysis';
14
14
  export default class HeapAnalysisSubCommandWrapper extends BaseCommand {
15
15
  private heapAnalysis;
16
16
  constructor(analysis: BaseAnalysis);
17
+ isInternalCommand(): boolean;
17
18
  getCommandName(): string;
18
19
  getDescription(): string;
19
20
  getCategory(): CommandCategory;
@@ -1 +1 @@
1
- {"version":3,"file":"HeapAnalysisSubCommandWrapper.d.ts","sourceRoot":"","sources":["../../../src/commands/heap/HeapAnalysisSubCommandWrapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,WAAW,EAAE,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAC,YAAY,EAAC,MAAM,uBAAuB,CAAC;AAEnD,MAAM,CAAC,OAAO,OAAO,6BAA8B,SAAQ,WAAW;IACpE,OAAO,CAAC,YAAY,CAAe;gBAEvB,QAAQ,EAAE,YAAY;IAKlC,cAAc,IAAI,MAAM;IAIxB,cAAc,IAAI,MAAM;IAIxB,WAAW,IAAI,eAAe;IAI9B,UAAU,IAAI,UAAU,EAAE;IAIpB,GAAG,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAG9C"}
1
+ {"version":3,"file":"HeapAnalysisSubCommandWrapper.d.ts","sourceRoot":"","sources":["../../../src/commands/heap/HeapAnalysisSubCommandWrapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,WAAW,EAAE,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAC,YAAY,EAAC,MAAM,uBAAuB,CAAC;AAEnD,MAAM,CAAC,OAAO,OAAO,6BAA8B,SAAQ,WAAW;IACpE,OAAO,CAAC,YAAY,CAAe;gBAEvB,QAAQ,EAAE,YAAY;IAKlC,iBAAiB,IAAI,OAAO;IAI5B,cAAc,IAAI,MAAM;IAIxB,cAAc,IAAI,MAAM;IAIxB,WAAW,IAAI,eAAe;IAI9B,UAAU,IAAI,UAAU,EAAE;IAIpB,GAAG,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAG9C"}
@@ -57,6 +57,9 @@ class HeapAnalysisSubCommandWrapper extends BaseCommand_1.default {
57
57
  super();
58
58
  this.heapAnalysis = analysis;
59
59
  }
60
+ isInternalCommand() {
61
+ return this.heapAnalysis.isInternal();
62
+ }
60
63
  getCommandName() {
61
64
  return this.heapAnalysis.getCommandName();
62
65
  }
@@ -116,7 +116,7 @@ class InteractiveHeapViewCommand extends BaseCommand_1.default {
116
116
  getDetachedNodes(heap) {
117
117
  return __awaiter(this, void 0, void 0, function* () {
118
118
  const ret = [];
119
- const idSet = new Set();
119
+ const idSet = new core_1.NumericSet();
120
120
  heap.nodes.forEach(node => {
121
121
  if (core_1.utils.isDetachedDOMNode(node) || core_1.utils.isDetachedFiberNode(node)) {
122
122
  idSet.add(node.id);
@@ -54,7 +54,7 @@ class HeapViewController {
54
54
  }
55
55
  clusterComponentDataItems(nodes) {
56
56
  const ret = [];
57
- const nodeIds = new Set(nodes
57
+ const nodeIds = new core_1.NumericSet(nodes
58
58
  .filter(node => node.heapObject)
59
59
  .map(node => { var _a, _b; return (_b = (_a = node.heapObject) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : -1; }));
60
60
  const clusters = core_1.analysis.clusterHeapObjects(nodeIds, this.heap);
@@ -1 +1 @@
1
- {"version":3,"file":"GenerateCLIDocCommand.d.ts","sourceRoot":"","sources":["../../../src/commands/helper/GenerateCLIDocCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAa,UAAU,EAAuB,MAAM,cAAc,CAAC;AAK/E,OAAO,WAA8B,MAAM,mBAAmB,CAAC;AAI/D,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,WAAW;IAC5D,OAAO,CAAC,OAAO,CAAuC;IACtD,OAAO,CAAC,uBAAuB,CAA0B;IACzD,OAAO,CAAC,gBAAgB,CAAkC;IAE1D,cAAc,IAAI,MAAM;IAIxB,cAAc,IAAI,MAAM;IAIxB,iBAAiB,IAAI,OAAO;IAI5B,aAAa,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC;IAKzC,GAAG,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAM7C,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,sBAAsB;IAmB9B,OAAO,CAAC,aAAa;IAwCrB,OAAO,CAAC,mBAAmB;IAQ3B,OAAO,CAAC,YAAY;IA8CpB,OAAO,CAAC,oBAAoB;IAK5B,OAAO,CAAC,SAAS;IAMjB,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,mBAAmB;CAwB5B"}
1
+ {"version":3,"file":"GenerateCLIDocCommand.d.ts","sourceRoot":"","sources":["../../../src/commands/helper/GenerateCLIDocCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAa,UAAU,EAAuB,MAAM,cAAc,CAAC;AAK/E,OAAO,WAA8B,MAAM,mBAAmB,CAAC;AAI/D,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,WAAW;IAC5D,OAAO,CAAC,OAAO,CAAuC;IACtD,OAAO,CAAC,uBAAuB,CAA0B;IACzD,OAAO,CAAC,gBAAgB,CAAkC;IAE1D,cAAc,IAAI,MAAM;IAIxB,cAAc,IAAI,MAAM;IAIxB,iBAAiB,IAAI,OAAO;IAI5B,aAAa,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC;IAKzC,GAAG,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAM7C,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,sBAAsB;IAmB9B,OAAO,CAAC,aAAa;IAwCrB,OAAO,CAAC,mBAAmB;IAQ3B,OAAO,CAAC,YAAY;IAgDpB,OAAO,CAAC,oBAAoB;IAK5B,OAAO,CAAC,SAAS;IAMjB,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,mBAAmB;CAwB5B"}
@@ -177,7 +177,9 @@ npm install -g memlab
177
177
  this.writeCommandOptions(docFile, command);
178
178
  const subCommands = (_b = command.getSubCommands()) !== null && _b !== void 0 ? _b : [];
179
179
  for (const subCommand of subCommands) {
180
- this.writeCommand(docFile, subCommand, indent + '#');
180
+ if (!subCommand.isInternalCommand()) {
181
+ this.writeCommand(docFile, subCommand, indent + '#');
182
+ }
181
183
  }
182
184
  }
183
185
  writeTextWithNewLine(docFile, content) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memlab/cli",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "license": "MIT",
5
5
  "description": "command line interface for memlab",
6
6
  "author": "Liang Gong <lgong@meta.com>",
@@ -26,10 +26,10 @@
26
26
  "access": "public"
27
27
  },
28
28
  "dependencies": {
29
- "@memlab/api": "^2.0.0",
30
- "@memlab/core": "^2.0.0",
31
- "@memlab/e2e": "^2.0.0",
32
- "@memlab/heap-analysis": "^2.0.0",
29
+ "@memlab/api": "^2.0.2",
30
+ "@memlab/core": "^2.0.2",
31
+ "@memlab/e2e": "^2.0.2",
32
+ "@memlab/heap-analysis": "^2.0.2",
33
33
  "ansi": "^0.3.1",
34
34
  "babar": "^0.2.0",
35
35
  "blessed": "^0.1.81",