@forge/manifest 8.1.0 → 8.2.0-next.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @forge/manifest
2
2
 
3
+ ## 8.2.0-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 39aaa43: Update i18n unit tests to ensure test only apply to modules mantained locally.
8
+
9
+ ## 8.2.0-next.0
10
+
11
+ ### Minor Changes
12
+
13
+ - df04fc6: Added command pallete module
14
+ - 94c1eda: Add warning for un-necessary usage of egress permissions
15
+
16
+ ### Patch Changes
17
+
18
+ - 08e248c: jira:command - add property to i18n test
19
+ - c01ab1f: Update manifest definitions
20
+
3
21
  ## 8.1.0
4
22
 
5
23
  ### Minor Changes
@@ -12975,6 +12975,115 @@
12975
12975
  },
12976
12976
  "minItems": 1
12977
12977
  },
12978
+ "jira:command": {
12979
+ "type": "array",
12980
+ "items": {
12981
+ "additionalProperties": false,
12982
+ "type": "object",
12983
+ "properties": {
12984
+ "title": {
12985
+ "anyOf": [
12986
+ {
12987
+ "type": "string",
12988
+ "minLength": 1,
12989
+ "maxLength": 255
12990
+ },
12991
+ {
12992
+ "additionalProperties": false,
12993
+ "type": "object",
12994
+ "properties": {
12995
+ "i18n": {
12996
+ "type": "string",
12997
+ "minLength": 1,
12998
+ "maxLength": 300,
12999
+ "pattern": "^[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)*$"
13000
+ }
13001
+ },
13002
+ "required": [
13003
+ "i18n"
13004
+ ]
13005
+ }
13006
+ ]
13007
+ },
13008
+ "title__i18n": {
13009
+ "type": "string",
13010
+ "minLength": 1,
13011
+ "maxLength": 300,
13012
+ "pattern": "^[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)*$"
13013
+ },
13014
+ "icon": {
13015
+ "minLength": 1,
13016
+ "maxLength": 255,
13017
+ "type": "string"
13018
+ },
13019
+ "shortcut": {
13020
+ "type": "string"
13021
+ },
13022
+ "keywords": {
13023
+ "type": "array",
13024
+ "items": {
13025
+ "type": "string"
13026
+ }
13027
+ },
13028
+ "target": {
13029
+ "anyOf": [
13030
+ {
13031
+ "type": "object",
13032
+ "properties": {
13033
+ "page": {
13034
+ "type": "string"
13035
+ }
13036
+ },
13037
+ "required": [
13038
+ "page"
13039
+ ]
13040
+ },
13041
+ {
13042
+ "type": "object",
13043
+ "properties": {
13044
+ "resource": {
13045
+ "type": "string",
13046
+ "minLength": 1,
13047
+ "maxLength": 23,
13048
+ "pattern": "^[a-zA-Z0-9_\\-]+$"
13049
+ },
13050
+ "render": {
13051
+ "default": "default",
13052
+ "enum": [
13053
+ "default",
13054
+ "native"
13055
+ ],
13056
+ "type": "string"
13057
+ }
13058
+ },
13059
+ "required": [
13060
+ "resource"
13061
+ ]
13062
+ }
13063
+ ]
13064
+ },
13065
+ "resourceUploadId": {
13066
+ "type": "string",
13067
+ "minLength": 1,
13068
+ "maxLength": 255
13069
+ },
13070
+ "key": {
13071
+ "$ref": "#/definitions/ModuleKeySchema"
13072
+ }
13073
+ },
13074
+ "required": [
13075
+ "target",
13076
+ "title",
13077
+ "key"
13078
+ ],
13079
+ "not": {
13080
+ "required": [
13081
+ "unlicensedAccess"
13082
+ ]
13083
+ }
13084
+ },
13085
+ "minItems": 1
13086
+ },
12978
13087
  "jira:boardAction": {
12979
13088
  "type": "array",
12980
13089
  "items": {
@@ -6693,6 +6693,54 @@ export interface Modules {
6693
6693
  key: ModuleKeySchema;
6694
6694
  }[]
6695
6695
  ];
6696
+ 'jira:command'?: [
6697
+ {
6698
+ title:
6699
+ | string
6700
+ | {
6701
+ i18n: string;
6702
+ };
6703
+ title__i18n?: string;
6704
+ icon?: string;
6705
+ shortcut?: string;
6706
+ keywords?: string[];
6707
+ target:
6708
+ | {
6709
+ page: string;
6710
+ [k: string]: unknown;
6711
+ }
6712
+ | {
6713
+ resource: string;
6714
+ render?: 'default' | 'native';
6715
+ [k: string]: unknown;
6716
+ };
6717
+ resourceUploadId?: string;
6718
+ key: ModuleKeySchema;
6719
+ },
6720
+ ...{
6721
+ title:
6722
+ | string
6723
+ | {
6724
+ i18n: string;
6725
+ };
6726
+ title__i18n?: string;
6727
+ icon?: string;
6728
+ shortcut?: string;
6729
+ keywords?: string[];
6730
+ target:
6731
+ | {
6732
+ page: string;
6733
+ [k: string]: unknown;
6734
+ }
6735
+ | {
6736
+ resource: string;
6737
+ render?: 'default' | 'native';
6738
+ [k: string]: unknown;
6739
+ };
6740
+ resourceUploadId?: string;
6741
+ key: ModuleKeySchema;
6742
+ }[]
6743
+ ];
6696
6744
  'jira:boardAction'?: [
6697
6745
  {
6698
6746
  icon?: string;
@@ -22,6 +22,9 @@ export declare const errors: {
22
22
  missingEndpointPermissionFromScope: (scope: string, key: string) => string;
23
23
  missingRemotePermissionFromScope: (scope: string, key: string) => string;
24
24
  deprecatedPermission: (element: string, value: string[]) => string;
25
+ globalUrlNotRecommended: (element: string) => string;
26
+ imageUrlNotRecommended: (element: string, value: string) => string;
27
+ fontAndStylesNotRecommended: (element: string) => string;
25
28
  };
26
29
  connectModules: {
27
30
  invalidConnectModule: (module: string) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/text/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1C,eAAO,MAAM,MAAM;8BACS,MAAM,KAAG,MAAM;2BACpB,MAAM;yBAEN,MAAM,GAAG,SAAS,QAAQ,MAAM,EAAE,UAAU,MAAM,GAAG,SAAS,KAAG,MAAM;;uBAO3E,MAAM,EAAE,EAAE,GAAG,SAAS,KAAG,MAAM;4BAI1B,MAAM,EAAE,KAAG,MAAM;mCACV,MAAM,SAAS,MAAM,mBAAmB,MAAM,KAAG,MAAM;mDAIvC,MAAM,KA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Ae,2BAA2B;IAC1C,eAAe,wBAAwB;IACvC,WAAW,4BAA4B;IACvC,WAAW,+BAA+B;IAC1C,aAAa,8BAA8B;IAC3C,OAAO,0BAA0B;IACjC,cAAc,kCAAkC;IAChD,SAAS,4BAA4B;IACrC,SAAS,4BAA4B;IACrC,UAAU,wBAAwB;IAClC,GAAG,8BAA8B;IACjC,eAAe,0BAA0B;CAC1C"}
@@ -33,7 +33,10 @@ exports.errors = {
33
33
  missingPermissionFromScope: (scope, event) => `Trigger event: '${event}' requires '${scope}' scope`,
34
34
  missingEndpointPermissionFromScope: (scope, key) => `Endpoint module: '${key}' requires '${scope}' scope.`,
35
35
  missingRemotePermissionFromScope: (scope, key) => `Remote: '${key}' requires '${scope}' scope.`,
36
- deprecatedPermission: (element, value) => `There are deprecated scopes '${element}' in the manifest.yml file: '${value.join(', ')}'. You need to update this app to use new scopes and remove the deprecated scopes. Learn more at: https://go.atlassian.com/forge-permissions.`
36
+ deprecatedPermission: (element, value) => `There are deprecated scopes '${element}' in the manifest.yml file: '${value.join(', ')}'. You need to update this app to use new scopes and remove the deprecated scopes. Learn more at: https://go.atlassian.com/forge-permissions.`,
37
+ globalUrlNotRecommended: (element) => `Global URL usage detected for '${element}' permission in the manifest.yml file. We recommend using a more specific URL.`,
38
+ imageUrlNotRecommended: (element, value) => `Unnecessary URL detected for '${element}' permission in the manifest.yml file. Your app should not need the URL '${value}' to work properly.`,
39
+ fontAndStylesNotRecommended: (element) => `Unnecessary usage of '${element}' permission in the manifest.yml file. You can avoid using this permission by packaging the fonts and styles with your app code.`
37
40
  },
38
41
  connectModules: {
39
42
  invalidConnectModule: (module) => `invalid value '${module}' in connectModules`,
@@ -1,4 +1,6 @@
1
1
  export declare const EGRESS_TYPES: {
2
2
  ALLOWED_CSP_TYPES: string[];
3
3
  };
4
+ export declare const GLOBAL_URL = "*";
5
+ export declare const AVATAR_URLS: string[];
4
6
  //# sourceMappingURL=egress-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"egress-types.d.ts","sourceRoot":"","sources":["../../src/types/egress-types.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY;;CAExB,CAAC"}
1
+ {"version":3,"file":"egress-types.d.ts","sourceRoot":"","sources":["../../src/types/egress-types.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY;;CAExB,CAAC;AAEF,eAAO,MAAM,UAAU,MAAM,CAAC;AAE9B,eAAO,MAAM,WAAW,UAAmD,CAAC"}
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EGRESS_TYPES = void 0;
3
+ exports.AVATAR_URLS = exports.GLOBAL_URL = exports.EGRESS_TYPES = void 0;
4
4
  const ALLOWED_CSP_UNSAFE_SOURCES = ['unsafe-eval', 'unsafe-hashes', 'unsafe-inline'];
5
5
  const ALLOWED_CSP_SCHEMA_SOURCES = ['blob:'];
6
6
  exports.EGRESS_TYPES = {
7
7
  ALLOWED_CSP_TYPES: [...ALLOWED_CSP_UNSAFE_SOURCES, ...ALLOWED_CSP_SCHEMA_SOURCES]
8
8
  };
9
+ exports.GLOBAL_URL = '*';
10
+ exports.AVATAR_URLS = ['*.gravatar.com', '*.wp.com', '*.atl-paas.net'];
@@ -47,6 +47,7 @@ export declare enum AllModuleTypes {
47
47
  JiraPersonalSettingsPage = "jira:personalSettingsPage",
48
48
  JiraBoardAction = "jira:boardAction",
49
49
  JiraSprintAction = "jira:sprintAction",
50
+ JiraCommand = "jira:command",
50
51
  CompassAdminPage = "compass:adminPage",
51
52
  CompassComponentPage = "compass:componentPage",
52
53
  CompassGlobalPage = "compass:globalPage",
@@ -1 +1 @@
1
- {"version":3,"file":"module-types.d.ts","sourceRoot":"","sources":["../../src/types/module-types.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,YAAY,kBAAkB;IAC9B,WAAW,iBAAiB;IAC5B,cAAc,oBAAoB;IAClC,YAAY,kBAAkB;IAC9B,oBAAoB,0BAA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C,qDAAqD;IACnG,yCAAyC,gDAAgD;IACzF,4BAA4B,mCAAmC;IAC/D,+BAA+B,sCAAsC;IACrE,sBAAsB,6BAA6B;IACnD,2BAA2B,kCAAkC;IAE7D,8BAA8B,uBAAuB;IACrD,6BAA6B,sBAAsB;IACnD,6BAA6B,sBAAsB;IACnD,gCAAgC,yBAAyB;IACzD,wCAAwC,iCAAiC;IACzE,+BAA+B,wBAAwB;IACvD,2BAA2B,oBAAoB;IAE/C,SAAS,eAAe;IACxB,UAAU,gBAAgB;CAC3B;AAED,eAAO,MAAM,iBAAiB,kBAAgC,CAAC;AAE/D,eAAO,MAAM,uBAAuB,UAAwE,CAAC"}
@@ -51,6 +51,7 @@ var AllModuleTypes;
51
51
  AllModuleTypes["JiraPersonalSettingsPage"] = "jira:personalSettingsPage";
52
52
  AllModuleTypes["JiraBoardAction"] = "jira:boardAction";
53
53
  AllModuleTypes["JiraSprintAction"] = "jira:sprintAction";
54
+ AllModuleTypes["JiraCommand"] = "jira:command";
54
55
  AllModuleTypes["CompassAdminPage"] = "compass:adminPage";
55
56
  AllModuleTypes["CompassComponentPage"] = "compass:componentPage";
56
57
  AllModuleTypes["CompassGlobalPage"] = "compass:globalPage";
@@ -1 +1 @@
1
- {"version":3,"file":"modules-validator.d.ts","sourceRoot":"","sources":["../../src/validators/modules-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,cAAc,EAAE,wBAAwB,EAAsC,MAAM,UAAU,CAAC;AAGxH,OAAO,EAAkB,cAAc,EAAqC,MAAM,oBAAoB,CAAC;AACvG,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAoB3D,qBAAa,gBACX,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;IAEzF,OAAO,CAAC,oBAAoB,CAA0C;IAEhE,QAAQ,CACZ,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,GACnD,OAAO,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC;IA2DpD,OAAO,CAAC,uBAAuB;IAO/B,OAAO,CAAC,iBAAiB;IAkBzB,OAAO,CAAC,4BAA4B;IAapC,OAAO,CAAC,uBAAuB;IAe/B,OAAO,CAAC,uBAAuB;IAiB/B,OAAO,CAAC,4BAA4B;IA0BpC,OAAO,CAAC,mBAAmB;IA2G3B,OAAO,CAAC,4BAA4B;IA2BpC,OAAO,CAAC,yBAAyB;CAkClC"}
1
+ {"version":3,"file":"modules-validator.d.ts","sourceRoot":"","sources":["../../src/validators/modules-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,cAAc,EAAE,wBAAwB,EAAsC,MAAM,UAAU,CAAC;AAGxH,OAAO,EAAkB,cAAc,EAAqC,MAAM,oBAAoB,CAAC;AACvG,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAqB3D,qBAAa,gBACX,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;IAEzF,OAAO,CAAC,oBAAoB,CAA0C;IAEhE,QAAQ,CACZ,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,GACnD,OAAO,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC;IA4DpD,OAAO,CAAC,uBAAuB;IAO/B,OAAO,CAAC,iBAAiB;IAkBzB,OAAO,CAAC,4BAA4B;IAapC,OAAO,CAAC,uBAAuB;IAe/B,OAAO,CAAC,uBAAuB;IAiB/B,OAAO,CAAC,4BAA4B;IA0BpC,OAAO,CAAC,mBAAmB;IA2G3B,OAAO,CAAC,4BAA4B;IA2BpC,OAAO,CAAC,yBAAyB;CAkClC"}
@@ -19,6 +19,7 @@ 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
20
  const validate_custom_field_1 = require("./modules-validators/jira/validate-custom-field");
21
21
  const validate_trigger_1 = require("./modules-validators/jira/validate-trigger");
22
+ const validate_command_1 = require("./modules-validators/jira/validate-command");
22
23
  class ModulesValidator {
23
24
  functionHandlerRegex = /^([a-zA-Z0-9-_]+)\.([a-zA-Z0-9-_]+)$/;
24
25
  async validate(manifest) {
@@ -31,7 +32,7 @@ class ModulesValidator {
31
32
  let validationErrors = [...this.connectModuleValidation(manifest)];
32
33
  if (manifest.typedContent.modules) {
33
34
  const { typedContent: { modules, connectModules, remotes, permissions }, yamlContentByLine, filePath } = manifest;
34
- 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 || []), this.duplicateModuleKeyValidation(modules, connectModules || {}, yamlContentByLine), this.functionHandlerValidation(modules, yamlContentByLine, filePath), (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, yamlContentByLine), (0, validate_timetrackingprovider_module_1.validateJiraTimeTrackingModule)(modules, yamlContentByLine));
35
+ 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 || []), this.duplicateModuleKeyValidation(modules, connectModules || {}, yamlContentByLine), this.functionHandlerValidation(modules, yamlContentByLine, filePath), (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, yamlContentByLine), (0, validate_timetrackingprovider_module_1.validateJiraTimeTrackingModule)(modules, yamlContentByLine), (0, validate_command_1.validateJiraCommandModule)(modules, yamlContentByLine));
35
36
  }
36
37
  else {
37
38
  const { typedContent: { connectModules }, yamlContentByLine } = manifest;
@@ -0,0 +1,4 @@
1
+ import { Modules } from '../../../schema/manifest';
2
+ import { ValidationError } from '../../../types';
3
+ export declare const validateJiraCommandModule: (modules: Modules, yamlContentByLine?: string[]) => ValidationError[];
4
+ //# sourceMappingURL=validate-command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-command.d.ts","sourceRoot":"","sources":["../../../../src/validators/modules-validators/jira/validate-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD,eAAO,MAAM,yBAAyB,YAAa,OAAO,sBAAsB,MAAM,EAAE,KAAG,eAAe,EAiBzG,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateJiraCommandModule = void 0;
4
+ const validate_module_key_references_1 = require("./validate-module-key-references");
5
+ const validateJiraCommandModule = (modules, yamlContentByLine) => {
6
+ if (!modules['jira:command'])
7
+ return [];
8
+ const keyReferences = modules['jira:command']
9
+ .filter((module) => 'page' in module.target)
10
+ .map((module) => {
11
+ return { moduleKey: module.key, referencedModuleKey: module.target.page };
12
+ });
13
+ if (keyReferences?.length === 0)
14
+ return [];
15
+ return (0, validate_module_key_references_1.validateModuleReferences)(modules, ['jira:globalPage', 'jira:adminPage', 'jira:projectPage', 'jira:projectSettingsPage'], keyReferences, yamlContentByLine);
16
+ };
17
+ exports.validateJiraCommandModule = validateJiraCommandModule;
@@ -0,0 +1,8 @@
1
+ import { ValidationError } from '../../../types';
2
+ import { Modules } from '../../../schema/manifest';
3
+ export declare const ALLOWED_REFERENCED_MODULE_TYPES: readonly ["jira:adminPage", "jira:globalPage", "jira:projectPage", "jira:projectSettingsPage"];
4
+ export declare const validateModuleReferences: (modules: Modules, expectedTypes: Array<(typeof ALLOWED_REFERENCED_MODULE_TYPES)[number]>, keyReferences: {
5
+ moduleKey: string;
6
+ referencedModuleKey: string;
7
+ }[], yamlContentByLine?: string[]) => ValidationError[];
8
+ //# sourceMappingURL=validate-module-key-references.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-module-key-references.d.ts","sourceRoot":"","sources":["../../../../src/validators/modules-validators/jira/validate-module-key-references.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAEnD,eAAO,MAAM,+BAA+B,gGAKlC,CAAC;AA8BX,eAAO,MAAM,wBAAwB,YAC1B,OAAO,iBACD,MAAM,CAAC,sCAAsC,CAAC,CAAC,MAAM,CAAC,CAAC,iBACvD;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,mBAAmB,EAAE,MAAM,CAAA;CAAE,EAAE,sBAC/C,MAAM,EAAE,KAC3B,eAAe,EAcjB,CAAC"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateModuleReferences = exports.ALLOWED_REFERENCED_MODULE_TYPES = void 0;
4
+ const text_1 = require("../../../text");
5
+ const utils_1 = require("../../../utils");
6
+ exports.ALLOWED_REFERENCED_MODULE_TYPES = [
7
+ 'jira:adminPage',
8
+ 'jira:globalPage',
9
+ 'jira:projectPage',
10
+ 'jira:projectSettingsPage'
11
+ ];
12
+ const validateModuleLink = ({ key, modulesOfValidType, referencedModuleKey, yamlContentByLine, validReferencedModuleTypes }) => {
13
+ const validReferencedModuleExists = modulesOfValidType.some((m) => referencedModuleKey === m.key);
14
+ if (validReferencedModuleExists) {
15
+ return [];
16
+ }
17
+ return [
18
+ {
19
+ message: `Module with key ${referencedModuleKey} does not exist or is not ${validReferencedModuleTypes.length > 1 ? 'one of the allowed types:' : 'of the allowed type'} ${validReferencedModuleTypes.join(', ')}`,
20
+ reference: text_1.References.Modules,
21
+ level: 'error',
22
+ ...(0, utils_1.findPosition)(key, yamlContentByLine)
23
+ }
24
+ ];
25
+ };
26
+ const validateModuleReferences = (modules, expectedTypes, keyReferences, yamlContentByLine) => {
27
+ const modulesOfValidType = expectedTypes.flatMap((expectedType) => {
28
+ return modules[expectedType]?.map((module) => ({ key: module.key })) || [];
29
+ });
30
+ return keyReferences.flatMap((keyReference) => validateModuleLink({
31
+ key: keyReference.moduleKey,
32
+ modulesOfValidType,
33
+ referencedModuleKey: keyReference.referencedModuleKey,
34
+ validReferencedModuleTypes: expectedTypes,
35
+ yamlContentByLine
36
+ }));
37
+ };
38
+ exports.validateModuleReferences = validateModuleReferences;
@@ -1 +1 @@
1
- {"version":3,"file":"validate-timetrackingprovider-module.d.ts","sourceRoot":"","sources":["../../../../src/validators/modules-validators/jira/validate-timetrackingprovider-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AA+BjD,eAAO,MAAM,8BAA8B,YAAa,OAAO,sBAAsB,MAAM,EAAE,KAAG,eAAe,EAuB9G,CAAC"}
1
+ {"version":3,"file":"validate-timetrackingprovider-module.d.ts","sourceRoot":"","sources":["../../../../src/validators/modules-validators/jira/validate-timetrackingprovider-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD,eAAO,MAAM,8BAA8B,YAAa,OAAO,sBAAsB,MAAM,EAAE,KAAG,eAAe,EAY9G,CAAC"}
@@ -1,37 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.validateJiraTimeTrackingModule = void 0;
4
- const text_1 = require("../../../text");
5
- const utils_1 = require("../../../utils");
6
- const validateModuleLink = ({ key, modulesOfValidType, referencedModuleKey, yamlContentByLine, validReferencedModuleType }) => {
7
- if (modulesOfValidType.find((m) => referencedModuleKey === m.key)) {
8
- return [];
9
- }
10
- return [
11
- {
12
- message: `Module with key ${referencedModuleKey} does not exist or is not of the allowed type ${validReferencedModuleType}`,
13
- reference: text_1.References.Modules,
14
- level: 'error',
15
- ...(0, utils_1.findPosition)(key, yamlContentByLine)
16
- }
17
- ];
18
- };
4
+ const validate_module_key_references_1 = require("./validate-module-key-references");
19
5
  const validateJiraTimeTrackingModule = (modules, yamlContentByLine) => {
20
- const validationErrors = [];
21
- modules['jira:timeTrackingProvider']?.forEach((module) => {
22
- const adminPage = module?.adminPage;
23
- if (adminPage) {
24
- const expectedType = 'jira:adminPage';
25
- const modulesOfValidType = modules[expectedType]?.map((mod) => ({ key: mod.key })) || [];
26
- validationErrors.push(...validateModuleLink({
27
- key: module.key,
28
- modulesOfValidType,
29
- referencedModuleKey: adminPage,
30
- validReferencedModuleType: expectedType,
31
- yamlContentByLine
32
- }));
33
- }
6
+ if (!modules['jira:timeTrackingProvider'])
7
+ return [];
8
+ const keyReferences = modules['jira:timeTrackingProvider']
9
+ .filter((module) => 'adminPage' in module)
10
+ .map((module) => {
11
+ return { moduleKey: module.key, referencedModuleKey: module.adminPage };
34
12
  });
35
- return validationErrors;
13
+ if (keyReferences?.length === 0)
14
+ return [];
15
+ return (0, validate_module_key_references_1.validateModuleReferences)(modules, ['jira:adminPage'], keyReferences, yamlContentByLine);
36
16
  };
37
17
  exports.validateJiraTimeTrackingModule = validateJiraTimeTrackingModule;
@@ -1 +1 @@
1
- {"version":3,"file":"permissions-validator.d.ts","sourceRoot":"","sources":["../../src/validators/permissions-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAmB,MAAM,UAAU,CAAC;AAGrF,OAAO,EAAE,cAAc,EAAU,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAM3D,qBAAa,oBACX,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;IAEzF,OAAO,CAAC,UAAU;IA+BlB,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,mBAAmB;IAgB3B,OAAO,CAAC,8BAA8B;IAYhC,QAAQ,CACZ,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,GACnD,OAAO,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC;CA+GrD"}
1
+ {"version":3,"file":"permissions-validator.d.ts","sourceRoot":"","sources":["../../src/validators/permissions-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAmB,MAAM,UAAU,CAAC;AAGrF,OAAO,EAAE,cAAc,EAAU,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAM3D,qBAAa,oBACX,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;IAEzF,OAAO,CAAC,UAAU;IA+BlB,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,mBAAmB;IAgB3B,OAAO,CAAC,8BAA8B;IA6ChC,QAAQ,CACZ,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,GACnD,OAAO,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC;CAoGrD"}
@@ -58,6 +58,36 @@ class PermissionsValidator {
58
58
  if (invalidPerms?.length) {
59
59
  this.addValidationErrors(result, extPermType, invalidPerms, manifest);
60
60
  }
61
+ const globalUrl = perms?.find((key) => key === egress_types_1.GLOBAL_URL);
62
+ if (globalUrl) {
63
+ result.push({
64
+ message: text_1.errors.permissions.globalUrlNotRecommended(extPermType),
65
+ reference: text_1.References.Permissions,
66
+ level: 'warning',
67
+ ...(0, utils_1.findPosition)(extPermType.split('.')[1], manifest.yamlContentByLine)
68
+ });
69
+ }
70
+ if (['external.styles', 'external.fonts'].includes(extPermType) && perms?.length) {
71
+ result.push({
72
+ message: text_1.errors.permissions.fontAndStylesNotRecommended(extPermType),
73
+ reference: text_1.References.Permissions,
74
+ level: 'warning',
75
+ ...(0, utils_1.findPosition)(extPermType.split('.')[1], manifest.yamlContentByLine)
76
+ });
77
+ }
78
+ if (extPermType === 'external.images') {
79
+ const invalidImageUrls = perms?.filter((key) => egress_types_1.AVATAR_URLS.includes(key));
80
+ if (invalidImageUrls?.length) {
81
+ invalidImageUrls.forEach((imageUrl) => {
82
+ result.push({
83
+ message: text_1.errors.permissions.imageUrlNotRecommended(extPermType, imageUrl),
84
+ reference: text_1.References.Permissions,
85
+ level: 'warning',
86
+ ...(0, utils_1.findPosition)(extPermType.split('.')[1], manifest.yamlContentByLine)
87
+ });
88
+ });
89
+ }
90
+ }
61
91
  }
62
92
  async validate(manifest) {
63
93
  if (!manifest || !manifest.typedContent || !manifest.typedContent.permissions) {
@@ -76,10 +106,45 @@ class PermissionsValidator {
76
106
  if (invalidScripts?.length) {
77
107
  this.addValidationErrors(errors, 'content.scripts', invalidScripts, manifest);
78
108
  }
79
- const invalidBackendStrings = manifest.typedContent.permissions.external?.fetch?.backend?.filter((item) => typeof item === 'string' && !this.isValidURL(item));
80
- if (invalidBackendStrings?.length) {
81
- this.addValidationErrors(errors, 'external.fetch.backend', invalidBackendStrings, manifest);
82
- }
109
+ const mapping = [
110
+ {
111
+ element: 'external.fetch.backend',
112
+ perms: manifest.typedContent.permissions.external?.fetch?.backend?.filter((key) => typeof key === 'string')
113
+ },
114
+ {
115
+ element: 'external.fetch.client',
116
+ perms: manifest.typedContent.permissions.external?.fetch?.client?.filter((key) => typeof key === 'string')
117
+ },
118
+ {
119
+ element: 'external.navigation',
120
+ perms: manifest.typedContent.permissions.external?.navigation
121
+ },
122
+ {
123
+ element: 'external.styles',
124
+ perms: manifest.typedContent.permissions.external?.styles
125
+ },
126
+ {
127
+ element: 'external.frames',
128
+ perms: manifest.typedContent.permissions.external?.frames
129
+ },
130
+ {
131
+ element: 'external.fonts',
132
+ perms: manifest.typedContent.permissions.external?.fonts
133
+ },
134
+ {
135
+ element: 'external.images',
136
+ perms: manifest.typedContent.permissions.external?.images
137
+ },
138
+ {
139
+ element: 'external.media',
140
+ perms: manifest.typedContent.permissions.external?.media
141
+ },
142
+ {
143
+ element: 'external.scripts',
144
+ perms: manifest.typedContent.permissions.external?.scripts
145
+ }
146
+ ];
147
+ mapping.forEach((item) => this.validateExternalPermissionURLs(errors, item.element, item.perms, manifest));
83
148
  const remoteMap = manifest.typedContent.remotes?.reduce((prev, item) => {
84
149
  const baseUrl = typeof item.baseUrl === 'string' ? item.baseUrl : item.baseUrl.default;
85
150
  return prev.set(item.key, baseUrl);
@@ -91,24 +156,13 @@ class PermissionsValidator {
91
156
  if (invalidBackendRemotes?.length) {
92
157
  this.addValidationErrors(errors, 'external.fetch.backend', invalidBackendRemotes, manifest);
93
158
  }
94
- const invalidClientStrings = manifest.typedContent.permissions.external?.fetch?.client?.filter((item) => typeof item === 'string' && !this.isValidURL(item));
95
- if (invalidClientStrings) {
96
- this.addValidationErrors(errors, 'external.fetch.client', invalidClientStrings, manifest);
97
- }
98
- const invalidClients = manifest.typedContent.permissions.external?.fetch?.client
159
+ const invalidClientRemotes = manifest.typedContent.permissions.external?.fetch?.client
99
160
  ?.filter((item) => typeof item === 'object' &&
100
161
  (!remoteMap || !remoteMap.has(item.remote) || !this.isValidURL(remoteMap.get(item.remote))))
101
162
  .map((item) => item.remote);
102
- if (invalidClients) {
103
- this.addValidationErrors(errors, 'external.fetch.client', invalidClients, manifest);
163
+ if (invalidClientRemotes?.length) {
164
+ this.addValidationErrors(errors, 'external.fetch.client', invalidClientRemotes, manifest);
104
165
  }
105
- this.validateExternalPermissionURLs(errors, 'external.navigation', manifest.typedContent.permissions.external?.navigation, manifest);
106
- this.validateExternalPermissionURLs(errors, 'external.images', manifest.typedContent.permissions.external?.images, manifest);
107
- this.validateExternalPermissionURLs(errors, 'external.frames', manifest.typedContent.permissions.external?.frames, manifest);
108
- this.validateExternalPermissionURLs(errors, 'external.scripts', manifest.typedContent.permissions.external?.scripts, manifest);
109
- this.validateExternalPermissionURLs(errors, 'external.styles', manifest.typedContent.permissions.external?.styles, manifest);
110
- this.validateExternalPermissionURLs(errors, 'external.media', manifest.typedContent.permissions.external?.media, manifest);
111
- this.validateExternalPermissionURLs(errors, 'external.fonts', manifest.typedContent.permissions.external?.fonts, manifest);
112
166
  return {
113
167
  success: errors.length === 0,
114
168
  errors
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/manifest",
3
- "version": "8.1.0",
3
+ "version": "8.2.0-next.1",
4
4
  "description": "Definitions and validations of the Forge manifest",
5
5
  "main": "out/index.js",
6
6
  "scripts": {