aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/api/package.js
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/api/package.js')
-rw-r--r--scripts/api/package.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/api/package.js b/scripts/api/package.js
index 9c3ede5..de7e641 100644
--- a/scripts/api/package.js
+++ b/scripts/api/package.js
@@ -93,9 +93,9 @@ For more information about the package.json file visit https://github.com/getfer
93 } 93 }
94 let configErrors = []; 94 let configErrors = [];
95 if (!config.id) { 95 if (!config.id) {
96 configErrors.push("Your package.json contains no 'id' field. This field should contain a unique ID made of lowercase letters (a-z) and hyphens (-)"); 96 configErrors.push("Your package.json contains no 'id' field. This field should contain a unique ID made of lowercase letters (a-z), numbers (0-9), hyphens (-), periods (.), and underscores (_)");
97 } else if (!/^[a-z._\-]+$/.test(config.id)) { 97 } else if (!/^[a-z0-9._\-]+$/.test(config.id)) {
98 configErrors.push("Your package.json defines an invalid recipe ID. Please make sure the 'id' field only contains lowercase letters (a-z) and hyphens (-)"); 98 configErrors.push("Your 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 (_)");
99 } 99 }
100 if (!config.name) { 100 if (!config.name) {
101 configErrors.push("Your package.json contains no 'name' field. This field should contain the name of the service (e.g. 'Google Keep')"); 101 configErrors.push("Your package.json contains no 'name' field. This field should contain the name of the service (e.g. 'Google Keep')");
@@ -155,9 +155,10 @@ For more information about the webview.js file visit https://github.com/getferdi
155 155
156 // Add recipe to all.json 156 // Add recipe to all.json
157 console.log('[Info] Adding to all.json'); 157 console.log('[Info] Adding to all.json');
158 const isFeatured = packageIndex !== -1 ? all[packageIndex].featured : false;
158 const packageInfo = { 159 const packageInfo = {
159 "author": config.author || '', 160 "author": config.author || '',
160 "featured": false, 161 "featured": isFeatured,
161 "id": config.id, 162 "id": config.id,
162 "name": config.name, 163 "name": config.name,
163 "version": config.version || '1.0.0', 164 "version": config.version || '1.0.0',
@@ -187,4 +188,4 @@ For more information about the webview.js file visit https://github.com/getferdi
187 }); 188 });
188 189
189 console.log(`✅ Successfully packaged and added new recipe "${config.id}"`); 190 console.log(`✅ Successfully packaged and added new recipe "${config.id}"`);
190}; \ No newline at end of file 191};