@forge/manifest 13.7.1-next.2 → 13.8.0-next.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/out/mapping/module-to-scope-mapping.d.ts.map +1 -1
  3. package/out/mapping/module-to-scope-mapping.js +2 -1
  4. package/out/schema/display-conditions-schema.json +37 -0
  5. package/out/schema/manifest-schema.json +385 -305
  6. package/out/schema/manifest.d.ts +166 -96
  7. package/out/text/errors.d.ts +1 -9
  8. package/out/text/errors.d.ts.map +1 -1
  9. package/out/text/errors.js +1 -9
  10. package/out/types/display-condition-types.d.ts +8 -0
  11. package/out/types/display-condition-types.d.ts.map +1 -1
  12. package/out/types/module-types.d.ts +1 -2
  13. package/out/types/module-types.d.ts.map +1 -1
  14. package/out/types/module-types.js +1 -2
  15. package/out/validators/display-conditions-validator.d.ts +2 -0
  16. package/out/validators/display-conditions-validator.d.ts.map +1 -1
  17. package/out/validators/display-conditions-validator.js +20 -1
  18. package/out/validators/modules-validator.d.ts.map +1 -1
  19. package/out/validators/modules-validator.js +1 -2
  20. package/out/validators/modules-validators/bitbucket/validateBackendModuleEndpoints.d.ts.map +1 -1
  21. package/out/validators/modules-validators/bitbucket/validateBackendModuleEndpoints.js +4 -1
  22. package/out/validators/modules-validators/confluence/index.d.ts.map +1 -1
  23. package/out/validators/modules-validators/confluence/index.js +1 -8
  24. package/package.json +1 -1
  25. package/out/validators/modules-validators/confluence/validateFullPage.d.ts +0 -4
  26. package/out/validators/modules-validators/confluence/validateFullPage.d.ts.map +0 -1
  27. package/out/validators/modules-validators/confluence/validateFullPage.js +0 -30
  28. package/out/validators/modules-validators/jira/validate-full-page-module.d.ts +0 -4
  29. package/out/validators/modules-validators/jira/validate-full-page-module.d.ts.map +0 -1
  30. package/out/validators/modules-validators/jira/validate-full-page-module.js +0 -51
@@ -17,7 +17,6 @@ const bitbucket_1 = require("./modules-validators/bitbucket");
17
17
  const rovo_1 = require("./modules-validators/rovo");
18
18
  const validate_workflow_1 = require("./modules-validators/jira/validate-workflow");
19
19
  const validate_full_page_1 = require("./modules-validators/jira/validate-full-page");
20
- const validate_full_page_module_1 = require("./modules-validators/jira/validate-full-page-module");
21
20
  const validate_custom_field_1 = require("./modules-validators/jira/validate-custom-field");
22
21
  const validate_trigger_1 = require("./modules-validators/jira/validate-trigger");
23
22
  const validate_command_1 = require("./modules-validators/jira/validate-command");
@@ -40,7 +39,7 @@ class ModulesValidator {
40
39
  let validationErrors = [...this.connectModuleValidation(manifest)];
41
40
  if (manifest.typedContent.modules) {
42
41
  const { typedContent: { modules, connectModules, remotes, permissions, services, providers }, yamlContentByLine, filePath } = manifest;
43
- validationErrors = validationErrors.concat(this.checkUnsupportedModules(manifest.typedContent.modules, yamlContentByLine), this.functionKeyLength(modules, yamlContentByLine), this.minimumModuleCountValidation(modules, yamlContentByLine), this.functionKeyDefinedValidation(modules, yamlContentByLine), this.endpointValidations(modules, yamlContentByLine, remotes, permissions?.scopes || [], services), this.duplicateModuleKeyValidation(modules, connectModules || {}, yamlContentByLine), this.functionHandlerValidation(modules, yamlContentByLine, filePath, (0, utils_1.getHandlersDirectory)(manifest.typedContent)), (0, validate_workflow_1.validateJiraWorkflowValidator)(modules, yamlContentByLine), (0, validate_workflow_1.validateJiraWorkflowCondition)(modules, yamlContentByLine), (0, ui_modifications_1.validateUiModificationsModule)(modules, yamlContentByLine), (0, validate_full_admin_page_1.validateJiraFullAdminPage)(modules, yamlContentByLine), (0, validate_full_page_1.validateJiraFullPage)(modules, yamlContentByLine), (0, validate_full_page_module_1.validateJiraFullPageModule)(modules, yamlContentByLine), (0, validate_custom_field_1.validateJiraCustomField)(modules, yamlContentByLine), (0, confluence_1.validateConfluenceModules)(modules, yamlContentByLine), (0, bitbucket_1.validateBitbucketModules)(modules, yamlContentByLine), (0, validate_trigger_1.validateJiraTriggers)(modules, yamlContentByLine), (0, remote_1.validateRemoteModules)(modules, yamlContentByLine), (0, dataResidency_1.validateMigrationDataResidencyModule)(modules, remotes, yamlContentByLine), (0, validateModuleScopes_1.validateModuleScopes)(modules, yamlContentByLine, permissions), (0, rovo_1.validateRovoModules)(modules, (0, path_1.dirname)(filePath), yamlContentByLine), (0, automation_1.validateAutomationModules)(modules, yamlContentByLine), (0, validate_timetrackingprovider_module_1.validateJiraTimeTrackingModule)(modules, yamlContentByLine), (0, validate_command_1.validateJiraCommandModule)(modules, yamlContentByLine), (0, validate_action_validator_1.validateJiraActionValidator)(modules, yamlContentByLine), (0, validate_global_background_script_1.validateJiraGlobalBackgroundScript)(modules, yamlContentByLine), (0, graph_1.validateGraphModules)(modules, providers, yamlContentByLine), (0, dashboards_1.validateDashboardModules)(modules, yamlContentByLine), (0, validate_global_ui_1.validateGlobalUi)(modules, yamlContentByLine), (0, validate_global_full_page_1.validateGlobalFullPage)(modules, yamlContentByLine));
42
+ validationErrors = validationErrors.concat(this.checkUnsupportedModules(manifest.typedContent.modules, yamlContentByLine), this.functionKeyLength(modules, yamlContentByLine), this.minimumModuleCountValidation(modules, yamlContentByLine), this.functionKeyDefinedValidation(modules, yamlContentByLine), this.endpointValidations(modules, yamlContentByLine, remotes, permissions?.scopes || [], services), this.duplicateModuleKeyValidation(modules, connectModules || {}, yamlContentByLine), this.functionHandlerValidation(modules, yamlContentByLine, filePath, (0, utils_1.getHandlersDirectory)(manifest.typedContent)), (0, validate_workflow_1.validateJiraWorkflowValidator)(modules, yamlContentByLine), (0, validate_workflow_1.validateJiraWorkflowCondition)(modules, yamlContentByLine), (0, ui_modifications_1.validateUiModificationsModule)(modules, yamlContentByLine), (0, validate_full_admin_page_1.validateJiraFullAdminPage)(modules, yamlContentByLine), (0, validate_full_page_1.validateJiraFullPage)(modules, yamlContentByLine), (0, validate_custom_field_1.validateJiraCustomField)(modules, yamlContentByLine), (0, confluence_1.validateConfluenceModules)(modules, yamlContentByLine), (0, bitbucket_1.validateBitbucketModules)(modules, yamlContentByLine), (0, validate_trigger_1.validateJiraTriggers)(modules, yamlContentByLine), (0, remote_1.validateRemoteModules)(modules, yamlContentByLine), (0, dataResidency_1.validateMigrationDataResidencyModule)(modules, remotes, yamlContentByLine), (0, validateModuleScopes_1.validateModuleScopes)(modules, yamlContentByLine, permissions), (0, rovo_1.validateRovoModules)(modules, (0, path_1.dirname)(filePath), yamlContentByLine), (0, automation_1.validateAutomationModules)(modules, yamlContentByLine), (0, validate_timetrackingprovider_module_1.validateJiraTimeTrackingModule)(modules, yamlContentByLine), (0, validate_command_1.validateJiraCommandModule)(modules, yamlContentByLine), (0, validate_action_validator_1.validateJiraActionValidator)(modules, yamlContentByLine), (0, validate_global_background_script_1.validateJiraGlobalBackgroundScript)(modules, yamlContentByLine), (0, graph_1.validateGraphModules)(modules, providers, yamlContentByLine), (0, dashboards_1.validateDashboardModules)(modules, yamlContentByLine), (0, validate_global_ui_1.validateGlobalUi)(modules, yamlContentByLine), (0, validate_global_full_page_1.validateGlobalFullPage)(modules, yamlContentByLine));
44
43
  }
45
44
  else {
46
45
  const { typedContent: { connectModules }, yamlContentByLine } = manifest;
@@ -1 +1 @@
1
- {"version":3,"file":"validateBackendModuleEndpoints.d.ts","sourceRoot":"","sources":["../../../../src/validators/modules-validators/bitbucket/validateBackendModuleEndpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO,EAAkB,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjE,eAAO,MAAM,8BAA8B,GAAI,SAAS,OAAO,EAAE,oBAAoB,MAAM,EAAE,KAAG,eAAe,EA6B9G,CAAC"}
1
+ {"version":3,"file":"validateBackendModuleEndpoints.d.ts","sourceRoot":"","sources":["../../../../src/validators/modules-validators/bitbucket/validateBackendModuleEndpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO,EAAkB,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjE,eAAO,MAAM,8BAA8B,GAAI,SAAS,OAAO,EAAE,oBAAoB,MAAM,EAAE,KAAG,eAAe,EA+B9G,CAAC"}
@@ -7,7 +7,10 @@ const utils_1 = require("../../../utils");
7
7
  const validateBackendModuleEndpoints = (modules, yamlContentByLine) => {
8
8
  const endpoints = modules.endpoint ?? [];
9
9
  const validationErrors = [];
10
- const backendModulesWithEndpoint = modules[types_1.AllModuleTypes.BitbucketMergeCheck]?.filter((module) => module.endpoint != null) || [];
10
+ const backendModulesWithEndpoint = [
11
+ ...(modules[types_1.AllModuleTypes.BitbucketMergeCheck]?.filter((module) => module.endpoint != null) || []),
12
+ ...(modules[types_1.AllModuleTypes.BitbucketDeploymentCheck]?.filter((module) => module.endpoint != null) || [])
13
+ ];
11
14
  backendModulesWithEndpoint.forEach((module) => {
12
15
  const endpointModule = endpoints?.find((remoteEndpoint) => remoteEndpoint.key === module.endpoint);
13
16
  if (endpointModule) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/validators/modules-validators/confluence/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAkB,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAcjE,eAAO,MAAM,yBAAyB,GAAI,SAAS,OAAO,EAAE,oBAAoB,MAAM,EAAE,KAAG,eAAe,EAwCzG,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/validators/modules-validators/confluence/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAkB,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAYjE,eAAO,MAAM,yBAAyB,GAAI,SAAS,OAAO,EAAE,oBAAoB,MAAM,EAAE,KAAG,eAAe,EAiCzG,CAAC"}
@@ -8,30 +8,23 @@ const validateKeyboardShortcuts_1 = require("./validateKeyboardShortcuts");
8
8
  const validateCrossModulePropertyUniqueness_1 = require("./validateCrossModulePropertyUniqueness");
9
9
  const validateCustomContentHierarchy_1 = require("./validateCustomContentHierarchy");
10
10
  const validateMacroAutoConvert_1 = require("./validateMacroAutoConvert");
11
- const validateFullPage_1 = require("./validateFullPage");
12
11
  const constants_1 = require("../constants");
13
12
  const ROUTE = 'route';
14
- const ROUTE_FULL_PAGE = 'routePrefix';
15
13
  const KEYBOARD_SHORTCUT_ACCELERATOR = 'keyboardShortcut.accelerator';
16
14
  const validateConfluenceModules = (modules, yamlContentByLine) => {
17
15
  const validationErrors = [];
18
16
  [
19
17
  types_1.AllModuleTypes.ConfluenceSpaceSettings,
20
18
  types_1.AllModuleTypes.ConfluenceGlobalPage,
21
- types_1.AllModuleTypes.ConfluenceSpacePage,
22
- types_1.AllModuleTypes.ConfluenceFullPage
19
+ types_1.AllModuleTypes.ConfluenceSpacePage
23
20
  ].forEach((moduleType) => {
24
21
  validationErrors.push(...(0, validatePropertyUniqueness_1.validatePropertyUniqueness)(modules, moduleType, ROUTE, yamlContentByLine));
25
22
  });
26
- [types_1.AllModuleTypes.ConfluenceFullPage].forEach((moduleType) => {
27
- validationErrors.push(...(0, validatePropertyUniqueness_1.validatePropertyUniqueness)(modules, moduleType, ROUTE_FULL_PAGE, yamlContentByLine));
28
- });
29
23
  validationErrors.push(...(0, validateSingleProperty_1.validateSingleProperty)(modules, types_1.AllModuleTypes.ConfluenceGlobalSettings, constants_1.USE_AS_CONFIG, yamlContentByLine));
30
24
  validationErrors.push(...(0, validateSingleProperty_1.validateSingleProperty)(modules, types_1.AllModuleTypes.ConfluenceGlobalSettings, constants_1.USE_AS_GET_STARTED, yamlContentByLine));
31
25
  validationErrors.push(...(0, validateCustomContentHierarchy_1.validateCustomContentHierarchy)(modules, types_1.AllModuleTypes.ConfluenceCustomContent, yamlContentByLine));
32
26
  validationErrors.push(...(0, validateCrossModulePropertyUniqueness_1.validateCrossModulePropertyUniqueness)(modules, KEYBOARD_SHORTCUT_ACCELERATOR, yamlContentByLine), ...(0, validateKeyboardShortcuts_1.validateKeyboardShortcuts)(modules, yamlContentByLine));
33
27
  validationErrors.push(...(0, validateMacroAutoConvert_1.validateMacroAutoConvert)(modules, yamlContentByLine));
34
- validationErrors.push(...(0, validateFullPage_1.validateFullPage)(modules, yamlContentByLine));
35
28
  return validationErrors;
36
29
  };
37
30
  exports.validateConfluenceModules = validateConfluenceModules;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/manifest",
3
- "version": "13.7.1-next.2",
3
+ "version": "13.8.0-next.10",
4
4
  "description": "Definitions and validations of the Forge manifest",
5
5
  "main": "out/index.js",
6
6
  "types": "out/index.d.ts",
@@ -1,4 +0,0 @@
1
- import { ValidationError } from '../../../types';
2
- import { Modules } from '../../../schema/manifest';
3
- export declare const validateFullPage: (modules: Modules, yamlContentByLine?: string[]) => ValidationError[];
4
- //# sourceMappingURL=validateFullPage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validateFullPage.d.ts","sourceRoot":"","sources":["../../../../src/validators/modules-validators/confluence/validateFullPage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAyBnD,eAAO,MAAM,gBAAgB,GAAI,SAAS,OAAO,EAAE,oBAAoB,MAAM,EAAE,KAAG,eAAe,EAgChG,CAAC"}
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateFullPage = void 0;
4
- const types_1 = require("../../../types");
5
- const text_1 = require("../../../text");
6
- const utils_1 = require("../../../utils");
7
- const validateGlobalModules_1 = require("../../../utils/global/validateGlobalModules");
8
- const errorMessages = text_1.errors.modules.confluence.fullPage;
9
- const validateFullPage = (modules, yamlContentByLine) => {
10
- const validationErrors = [];
11
- const moduleType = types_1.AllModuleTypes.ConfluenceFullPage;
12
- const fullPageModules = modules[moduleType] || [];
13
- fullPageModules.forEach((module, index) => {
14
- validationErrors.push(...(0, validateGlobalModules_1.validateRoute)(module.key, module.routePrefix, index, errorMessages).map((error) => ({
15
- message: error.message,
16
- reference: text_1.References.Modules,
17
- level: 'error',
18
- ...(0, utils_1.findPosition)(error.moduleKey, yamlContentByLine)
19
- })), ...(module.icon
20
- ? (0, validateGlobalModules_1.validateIcon)(module.key, module.icon, index, errorMessages).map((error) => ({
21
- message: error.message,
22
- reference: text_1.References.Modules,
23
- level: 'error',
24
- ...(0, utils_1.findPosition)(error.moduleKey, yamlContentByLine)
25
- }))
26
- : []));
27
- });
28
- return validationErrors;
29
- };
30
- exports.validateFullPage = validateFullPage;
@@ -1,4 +0,0 @@
1
- import { ValidationError } from '../../../types';
2
- import { Modules } from '../../../schema/manifest';
3
- export declare const validateJiraFullPageModule: (modules: Modules, yamlContentByLine?: string[]) => ValidationError[];
4
- //# sourceMappingURL=validate-full-page-module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validate-full-page-module.d.ts","sourceRoot":"","sources":["../../../../src/validators/modules-validators/jira/validate-full-page-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAsDnD,eAAO,MAAM,0BAA0B,GAAI,SAAS,OAAO,EAAE,oBAAoB,MAAM,EAAE,KAAG,eAAe,EAuC1G,CAAC"}
@@ -1,51 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateJiraFullPageModule = void 0;
4
- const types_1 = require("../../../types");
5
- const text_1 = require("../../../text");
6
- const utils_1 = require("../../../utils");
7
- const validateGlobalModules_1 = require("../../../utils/global/validateGlobalModules");
8
- const ROUTE_FULL_PAGE = 'routePrefix';
9
- const errorMessages = text_1.errors.modules.jiraFullPageModule;
10
- const validatePropertyUniqueness = (allModules, moduleType, property, yamlContentByLine) => {
11
- const validationErrors = [];
12
- const modules = allModules[moduleType] || [];
13
- const allPropertyValues = modules.map((module) => module[property]).filter((property) => property);
14
- const duplicatePropertyValues = allPropertyValues.filter((property, index, all) => all.indexOf(property) !== index);
15
- if (duplicatePropertyValues.length > 0) {
16
- const allModulesWithDuplicatedPropertyValues = modules.filter((module) => module[property] === duplicatePropertyValues[0]);
17
- validationErrors.push({
18
- message: errorMessages.propertyUniqueness(property, moduleType, duplicatePropertyValues),
19
- reference: text_1.References.Modules,
20
- level: 'error',
21
- ...(0, utils_1.findPosition)(allModulesWithDuplicatedPropertyValues?.[0]?.key, yamlContentByLine)
22
- });
23
- }
24
- return validationErrors;
25
- };
26
- const validateJiraFullPageModule = (modules, yamlContentByLine) => {
27
- const validationErrors = [];
28
- const moduleType = types_1.AllModuleTypes.JiraFullPage;
29
- const fullPageModules = modules[moduleType] || [];
30
- validationErrors.push(...validatePropertyUniqueness(modules, moduleType, ROUTE_FULL_PAGE, yamlContentByLine));
31
- if (validationErrors.length) {
32
- return validationErrors;
33
- }
34
- fullPageModules.forEach((module, index) => {
35
- validationErrors.push(...(0, validateGlobalModules_1.validateRoute)(module.key, module.routePrefix, index, errorMessages).map((error) => ({
36
- message: error.message,
37
- reference: text_1.References.Modules,
38
- level: 'error',
39
- ...(0, utils_1.findPosition)(error.moduleKey, yamlContentByLine)
40
- })), ...(module.icon
41
- ? (0, validateGlobalModules_1.validateIcon)(module.key, module.icon, index, errorMessages).map((error) => ({
42
- message: error.message,
43
- reference: text_1.References.Modules,
44
- level: 'error',
45
- ...(0, utils_1.findPosition)(error.moduleKey, yamlContentByLine)
46
- }))
47
- : []));
48
- });
49
- return validationErrors;
50
- };
51
- exports.validateJiraFullPageModule = validateJiraFullPageModule;