Skip to content

Make entrypoint not required #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/ConfigParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ function checkContactsFields(fields, place, required = false) {

place[field] = [];
} else if (typeof place[field] === 'string' || Array.isArray(place[field])) {

} else {
throw new TemplateParseException(`${field} field must be a list or string`);
}
Expand Down Expand Up @@ -226,7 +226,7 @@ ConfigParser.prototype.validateJson = function () {
}
// Extra check for the macversion field, as it currently only supports 1 and 2
if (this.data['macversion'] !== 1 && this.data['macversion'] !== 2) {
throw new TemplateParseException('Invalid value for the macversion field (currently only 1 or 2 are supported)');
throw new TemplateParseException('Invalid value for the macversion field (currently only 1 or 2 are supported)');
}
// TODO ???checkStringFields(['type'], this.data, true)
// Normalize/check preferences and properties (only for widgets and operators)
Expand All @@ -250,7 +250,7 @@ ConfigParser.prototype.validateJson = function () {

if (this.data['type'] === 'widget') {
if (this.data['macversion'] > 1) {
checkStringFields(['entrypoint'], this.data, true);
checkStringFields(['entrypoint'], this.data);
}

checkArrayFields(['altcontents'], this.data);
Expand All @@ -266,7 +266,7 @@ ConfigParser.prototype.validateJson = function () {
}
} else if (this.data['type'] === 'operator') {
if (this.data['macversion'] > 1) {
checkStringFields(['entrypoint'], this.data, true);
checkStringFields(['entrypoint'], this.data);
}
} else if (this.data['type'] === 'mashup') {
checkArrayFields(['params', 'tabs', 'embedded'], this.data);
Expand Down