npm package diff

Package: @forge/manifest

Versions: 7.5.2-next.0-experimental-10722bc - 7.7.0-next.13

File: package/out/validators/modules-validators/jira/validate-full-page.js

Index: package/out/validators/modules-validators/jira/validate-full-page.js
===================================================================
--- package/out/validators/modules-validators/jira/validate-full-page.js
+++ package/out/validators/modules-validators/jira/validate-full-page.js
@@ -0,0 +1,26 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.validateJiraFullPage = void 0;
+const types_1 = require("../../../types");
+const text_1 = require("../../../text");
+const utils_1 = require("../../../utils");
+const validate_subpages_in_module_1 = require("./validate-subpages-in-module");
+function validateJiraFullPage(modules, yamlContentByLine) {
+    const validationErrors = [];
+    [types_1.AllModuleTypes.JiraProjectPage, types_1.AllModuleTypes.JiraProjectSettingsPage, types_1.AllModuleTypes.JiraGlobalPage].forEach((moduleType) => {
+        const moduleArray = modules[moduleType];
+        if (moduleArray && moduleArray.length > 1) {
+            validationErrors.push({
+                message: text_1.errors.modules.singleEntryOfTheModule(moduleType),
+                reference: text_1.References.Modules,
+                level: 'error',
+                ...(0, utils_1.findPosition)(moduleArray[1].key, yamlContentByLine)
+            });
+        }
+        if (moduleArray && moduleArray.length === 1) {
+            validationErrors.push(...(0, validate_subpages_in_module_1.validateSubpagesInModule)(modules, moduleType, yamlContentByLine));
+        }
+    });
+    return validationErrors;
+}
+exports.validateJiraFullPage = validateJiraFullPage;