@memlab/cli 1.0.5 → 1.0.6

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.
@@ -0,0 +1,17 @@
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
+ * @emails oncall+ws_labs
8
+ * @format
9
+ */
10
+ import type { CLIOptions } from '@memlab/core';
11
+ import BaseCommand from '../BaseCommand';
12
+ export default class GetVersionCommand extends BaseCommand {
13
+ getCommandName(): string;
14
+ getDescription(): string;
15
+ run(options: CLIOptions): Promise<void>;
16
+ }
17
+ //# sourceMappingURL=GetVersionCommand.d.ts.map
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ *
8
+ * @emails oncall+ws_labs
9
+ * @format
10
+ */
11
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13
+ return new (P || (P = Promise))(function (resolve, reject) {
14
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
15
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
16
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
18
+ });
19
+ };
20
+ var __importDefault = (this && this.__importDefault) || function (mod) {
21
+ return (mod && mod.__esModule) ? mod : { "default": mod };
22
+ };
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ const chalk_1 = __importDefault(require("chalk"));
25
+ const BaseCommand_1 = __importDefault(require("../BaseCommand"));
26
+ const core_1 = require("@memlab/core");
27
+ class GetVersionCommand extends BaseCommand_1.default {
28
+ getCommandName() {
29
+ return 'version';
30
+ }
31
+ getDescription() {
32
+ return 'Show the versions of all memlab packages installed';
33
+ }
34
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
35
+ run(options) {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ const packages = core_1.config._packageInfo;
38
+ core_1.info.topLevel('');
39
+ for (const pkg of packages) {
40
+ const version = chalk_1.default.grey(`@${pkg.version}`);
41
+ core_1.info.topLevel(` ${pkg.name}${version}`);
42
+ if (core_1.config.verbose && pkg.packageLocation) {
43
+ core_1.info.lowLevel(` ${pkg.packageLocation}`);
44
+ }
45
+ }
46
+ core_1.info.topLevel('');
47
+ });
48
+ }
49
+ }
50
+ exports.default = GetVersionCommand;
package/dist/index.d.ts CHANGED
@@ -7,5 +7,7 @@
7
7
  * @emails oncall+ws_labs
8
8
  * @format
9
9
  */
10
+ /** @internal */
11
+ export declare function registerPackage(): Promise<void>;
10
12
  export * from './runner';
11
13
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -22,5 +22,27 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
22
22
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
23
23
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
24
24
  };
25
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
34
+ var __importDefault = (this && this.__importDefault) || function (mod) {
35
+ return (mod && mod.__esModule) ? mod : { "default": mod };
36
+ };
25
37
  Object.defineProperty(exports, "__esModule", { value: true });
38
+ exports.registerPackage = void 0;
39
+ const path_1 = __importDefault(require("path"));
40
+ const core_1 = require("@memlab/core");
41
+ /** @internal */
42
+ function registerPackage() {
43
+ return __awaiter(this, void 0, void 0, function* () {
44
+ return core_1.PackageInfoLoader.registerPackage(path_1.default.join(__dirname, '..'));
45
+ });
46
+ }
47
+ exports.registerPackage = registerPackage;
26
48
  __exportStar(require("./runner"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memlab/cli",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "license": "MIT",
5
5
  "description": "command line interface for memlab",
6
6
  "author": "Liang Gong <lgong@fb.com>",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@memlab/api": "^1.0.0",
28
- "@memlab/core": "^1.0.0",
28
+ "@memlab/core": "^1.1.5",
29
29
  "@memlab/e2e": "^1.0.0",
30
30
  "@memlab/heap-analysis": "^1.0.0",
31
31
  "ansi": "^0.3.1",