diff options
author | 2021-09-12 22:01:51 +0530 | |
---|---|---|
committer | 2021-09-12 22:06:03 +0530 | |
commit | 9db43e100a672b6d6932ac68c0fbe503c129138b (patch) | |
tree | 4f6a31d25a7345c5d92dbd8b80d30ce7d129944f /scripts | |
parent | New recipe: 'stackoverflow' (#707) (diff) | |
download | ferdium-recipes-9db43e100a672b6d6932ac68c0fbe503c129138b.tar.gz ferdium-recipes-9db43e100a672b6d6932ac68c0fbe503c129138b.tar.zst ferdium-recipes-9db43e100a672b6d6932ac68c0fbe503c129138b.zip |
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
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/package.js | 3 |
1 files changed, 3 insertions, 0 deletions
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) => { | |||
102 | } else if (!/^[a-zA-Z0-9._\-]+$/.test(config.id)) { | 102 | } else if (!/^[a-zA-Z0-9._\-]+$/.test(config.id)) { |
103 | 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 (_)"); | 103 | 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 (_)"); |
104 | } | 104 | } |
105 | if (config.id !== recipe) { | ||
106 | configErrors.push(`The recipe's id (${config.id}) does not match the folder name (${recipe})`); | ||
107 | } | ||
105 | if (!config.name) { | 108 | if (!config.name) { |
106 | configErrors.push("The recipe's package.json contains no 'name' field. This field should contain the name of the service (e.g. 'Google Keep')"); | 109 | configErrors.push("The recipe's package.json contains no 'name' field. This field should contain the name of the service (e.g. 'Google Keep')"); |
107 | } | 110 | } |