@coat/cli
Version:
TODO: See #3
20 lines (19 loc) • 688 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.validateCoatManifestName = validateCoatManifestName;
var _formatPropertyPath = require("../format-property-path");
var _validationIssue = require("../validation-issue");
function* validateCoatManifestName(name) {
// name should either be missing or a string
const validNameTypes = ["undefined", "string"];
if (!validNameTypes.includes(typeof name)) {
yield {
type: _validationIssue.ValidationIssueType.Error,
message: `${(0, _formatPropertyPath.formatPropertyPath)(["name"])} must be a string.`,
propertyPath: ["name"],
shortMessage: "must be a string."
};
}
}