Skip to content

Commit

Permalink
Revert "GitHub actions revised" (#2)
Browse files Browse the repository at this point in the history
Revert "GitHub actions revised"
  • Loading branch information
pklaschka authored Dec 12, 2019
2 parents 3ba5d9c + 93625e5 commit 222bf03
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 87 deletions.
71 changes: 0 additions & 71 deletions .github/workflows/cli-test.yml

This file was deleted.

3 changes: 1 addition & 2 deletions lib/manifestSchema.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const manifestScema = {
required: ["id", "name", "version", "icons", "host", "uiEntryPoints"],
required: ["id", "name", "version", "host", "uiEntryPoints"],
properties: {
id: {
type: "string",
Expand All @@ -20,7 +20,6 @@ const manifestScema = {
minItems: 2,
uniqueItems: true,
items: {
type: "object",
required: ["path", "width", "height"],
properties: {
path: {
Expand Down
20 changes: 7 additions & 13 deletions lib/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,23 @@ function validate(manifest, { root, id } = {}) {
let errors = [];
var validate = ajv.compile(manifestScema);
var valid = validate(manifest);

if ( id && manifest.id !== id ) {
errors.push(
`F1001: Manifest 'id' does not match expected id. Saw '${manifest.id}', expected '${id}'.`
);
}

if (!valid) {
errors = validate.errors.map(
e => `${e.dataPath} (${JSON.stringify(e.params)}) -> ${e.message} `
);
}

if (manifest.icons) {
manifest.icons.forEach((icon, idx) => {
if (!fs.existsSync(path.join(root || ".", icon.path))) {
errors.push(
`W2004: Icon ${idx} has path ${icon.path}, but no icon was found there.`
);
}
});
}

manifest.icons.forEach((icon, idx) => {
if (!fs.existsSync(path.join(root || ".", icon.path))) {
errors.push(
`W2004: Icon ${idx} has path ${icon.path}, but no icon was found there.`
);
}
});
return errors;
}

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 222bf03

Please sign in to comment.