bit-bin
Version:
<a href="https://opensource.org/licenses/Apache-2.0"><img alt="apache" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"></a> <a href="https://github.com/teambit/bit/blob/master/CONTRIBUTING.md"><img alt="prs" src="https://img.shields.io/b
53 lines (40 loc) • 1.28 kB
JavaScript
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function _defineProperty2() {
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
_defineProperty2 = function () {
return data;
};
return data;
}
function _scope() {
const data = require("../../../api/scope");
_scope = function () {
return data;
};
return data;
}
class CatObject {
constructor() {
(0, _defineProperty2().default)(this, "name", 'cat-object <hash>');
(0, _defineProperty2().default)(this, "description", 'cat a bit object by hash');
(0, _defineProperty2().default)(this, "private", true);
(0, _defineProperty2().default)(this, "alias", '');
(0, _defineProperty2().default)(this, "opts", [['p', 'pretty', 'pretty print for the objects'], ['s', 'stringify', 'JSON.stringify the object to see special characters, such as "\n"']]);
}
action([hash], {
pretty,
stringify
}) {
// @TODO - import should support multiple bits
return (0, _scope().catObject)(hash, pretty, stringify);
}
report(file) {
return file.toString();
}
}
exports.default = CatObject;
;