From 9db43e100a672b6d6932ac68c0fbe503c129138b Mon Sep 17 00:00:00 2001 From: Vijay Aravamudhan Date: Sun, 12 Sep 2021 22:01:51 +0530 Subject: Added a check to verify that the folder name of the recipe matches the recipe id (#708) Use the recipe-id as master to rename internal folder names --- scripts/package.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts/package.js') diff --git a/scripts/package.js b/scripts/package.js index 236cdff..26580d5 100644 --- a/scripts/package.js +++ b/scripts/package.js @@ -102,6 +102,9 @@ const compress = (src, dest) => new Promise((resolve, reject) => { } else if (!/^[a-zA-Z0-9._\-]+$/.test(config.id)) { configErrors.push("The recipe's package.json defines an invalid recipe ID. Please make sure the 'id' field only contains lowercase letters (a-z), numbers (0-9), hyphens (-), periods (.), and underscores (_)"); } + if (config.id !== recipe) { + configErrors.push(`The recipe's id (${config.id}) does not match the folder name (${recipe})`); + } if (!config.name) { configErrors.push("The recipe's package.json contains no 'name' field. This field should contain the name of the service (e.g. 'Google Keep')"); } -- cgit v1.2.3-70-g09d2