npm package diff
Package: @forge/manifest
Versions: 7.7.0-next.12 - 7.5.2-next.0-experimental-204139e
File: package/out/validators/connect-modules-validator.js
Index: package/out/validators/connect-modules-validator.js
===================================================================
--- package/out/validators/connect-modules-validator.js
+++ package/out/validators/connect-modules-validator.js
@@ -26,15 +26,26 @@
level: 'error',
...(0, utils_1.findPosition)(invalidName, yamlContentByLine, 'connectModules')
});
});
+ const modules = connectModuleNames.map((moduleName) => connectModules[moduleName]);
+ const moduleKeys = [].concat(...modules).map((item) => item.key);
+ const duplicateKeys = [...new Set(moduleKeys.filter((item, index) => moduleKeys.indexOf(item) != index))];
+ duplicateKeys.forEach((duplicateKey) => {
+ validationErrors.push({
+ message: text_1.errors.connectModules.duplicateKeyFound(duplicateKey),
+ reference: text_1.References.ConnectModules,
+ level: 'error',
+ ...(0, utils_1.findPosition)(duplicateKey, yamlContentByLine)
+ });
+ });
const lifecycleModules = connectModuleNames.filter((m) => m.endsWith(':lifecycle'));
if (lifecycleModules) {
lifecycleModules.forEach((lifecycle) => {
const lifecycleModule = connectModules[lifecycle];
if (Array.isArray(lifecycleModule) && lifecycleModule.length > 1) {
validationErrors.push({
- message: text_1.errors.connectModules.duplicateLifecycleFound(lifecycle),
+ message: text_1.errors.connectModules.duplicatateLifecycleFound(lifecycle),
reference: text_1.References.ConnectModules,
level: 'error',
...(0, utils_1.findPosition)(lifecycle, yamlContentByLine)
});