couchbase-index-manager
Version:
Manage Couchbase indexes during the CI/CD process
18 lines • 838 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.IndexDefinitionBase = void 0;
const lodash_1 = require("lodash");
const index_manager_1 = require("../index-manager");
class IndexDefinitionBase {
constructor(configuration) {
var _a, _b;
if (!configuration.name || !(0, lodash_1.isString)(configuration.name)) {
throw new Error('Index definition does not have a \'name\'');
}
this.name = configuration.name;
this.scope = (_a = configuration.scope) !== null && _a !== void 0 ? _a : index_manager_1.DEFAULT_SCOPE;
this.collection = (_b = configuration.collection) !== null && _b !== void 0 ? _b : index_manager_1.DEFAULT_COLLECTION;
}
}
exports.IndexDefinitionBase = IndexDefinitionBase;
//# sourceMappingURL=index-definition-base.js.map