@forge/manifest 12.0.0-next.3-experimental-3c69930 → 12.0.0-next.5

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,21 +1,16 @@
1
1
  # @forge/manifest
2
2
 
3
- ## 12.0.0-next.3-experimental-3c69930
4
-
5
- ### Major Changes
6
-
7
- - 6b7a4ef: Added GraphConnector module Auth Provider reference validation
8
- - dfa2aa6: Added GraphConnector module Auth Provider reference validation
3
+ ## 12.0.0-next.5
9
4
 
10
5
  ### Minor Changes
11
6
 
12
- - e21f32f: Remove remote oauth scopes lint check as scopes are no longer required in manifest
7
+ - ea28254: Added linting for icon
8
+
9
+ ## 12.0.0-next.4
13
10
 
14
11
  ### Patch Changes
15
12
 
16
- - 545ecc1: Update manifest definitions
17
- - eadb4a6: Update manifest definitions
18
- - 8db2311: Update manifest definitions
13
+ - 9418d29: Update manifest definitions
19
14
 
20
15
  ## 12.0.0-next.3
21
16
 
@@ -2305,11 +2305,17 @@
2305
2305
  "medium",
2306
2306
  "large",
2307
2307
  "xlarge",
2308
- "max"
2308
+ "max",
2309
+ "fullscreen"
2309
2310
  ]
2310
2311
  },
2311
2312
  "openOnInsert": {
2312
2313
  "type": "boolean"
2314
+ },
2315
+ "icon": {
2316
+ "type": "string",
2317
+ "minLength": 1,
2318
+ "maxLength": 255
2313
2319
  }
2314
2320
  },
2315
2321
  "required": [
@@ -12426,8 +12426,9 @@ export interface Modules {
12426
12426
  title__i18n?: string;
12427
12427
  resource: string;
12428
12428
  render?: 'native' | 'default';
12429
- viewportSize?: 'small' | 'medium' | 'large' | 'xlarge' | 'max';
12429
+ viewportSize?: 'small' | 'medium' | 'large' | 'xlarge' | 'max' | 'fullscreen';
12430
12430
  openOnInsert?: boolean;
12431
+ icon?: string;
12431
12432
  };
12432
12433
  autoConvert?: {
12433
12434
  matchers: [
@@ -12539,8 +12540,9 @@ export interface Modules {
12539
12540
  title__i18n?: string;
12540
12541
  resource: string;
12541
12542
  render?: 'native' | 'default';
12542
- viewportSize?: 'small' | 'medium' | 'large' | 'xlarge' | 'max';
12543
+ viewportSize?: 'small' | 'medium' | 'large' | 'xlarge' | 'max' | 'fullscreen';
12543
12544
  openOnInsert?: boolean;
12545
+ icon?: string;
12544
12546
  };
12545
12547
  autoConvert?: {
12546
12548
  matchers: [
@@ -78,6 +78,7 @@ export declare const errors: {
78
78
  };
79
79
  fullPage: {
80
80
  invalidRouteRegex: (pattern: string, keyName: string, index: number) => string;
81
+ invalidIcon: (pattern: string, keyName: string, index: number) => string;
81
82
  };
82
83
  };
83
84
  jiraWorkflowValidator: {
@@ -101,6 +102,7 @@ export declare const errors: {
101
102
  jiraFullPageModule: {
102
103
  invalidRouteRegex: (pattern: string, keyName: string, index: number) => string;
103
104
  propertyUniqueness: (property: string, moduleKey: string, keys: string[]) => string;
105
+ invalidIcon: (icon: string, keyName: string, index: number) => string;
104
106
  };
105
107
  moduleScopesValidator: {
106
108
  missingScopes: (moduleType: AllModuleTypes, key: string, scopes: string[]) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/text/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACnE,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,KAAG,MAAM;4BAEtC,MAAM,EAAE,GAAG,SAAS,KAAG,MAAM;+CAIV,MAAM;6CACR,MAA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3B,MAAM,SAAS,MAAM,KAAG,MAAM;gDAE1B,MAAM,aAAa,MAAM,KAAG,MAAM;4CAEtC,MAAM,SAAS,MAAM,KAAG,MAAM;;;;;gCAM1C,MAAM;;;;;;;;;0DAWwB,wBAAwB,KAAG,MAAM;sDAErC,wBAAwB,KAAG,MAAM;kDAErC,wBAAwB,QAAQ,MAAM,KAAG,MAAM;mDAE9C,wBAAwB,KAAG,MAAM;mCAEjD,MAAM,KAAG,MAAM;;oDAEE,MAAM,aAAa,MAAM,KAAG,MAAM;4CAE1C,MAAM,sBAAsB,wBAAwB,YAAY,MAAM;;;;mCAKjF,MAAM;;;CAQlC,CAAC;AAEF,oBAAY,UAAU;IACpB,eAAe,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;CAClC"}
@@ -89,7 +89,8 @@ exports.errors = {
89
89
  emptyMatcherArray: (keyName) => `Macro autoConvert matchers array for key '${keyName}' must not be empty array.`
90
90
  },
91
91
  fullPage: {
92
- invalidRouteRegex: (pattern, keyName, index) => `The routePrefix '${pattern}' at index '${index}' for key '${keyName}' needs to be in a valid URL route between 1-255 characters and contain only URL safe characters such as: a-z, 0-9 and '\' and '-'.`
92
+ invalidRouteRegex: (pattern, keyName, index) => `The routePrefix '${pattern}' at index '${index}' for key '${keyName}' needs to be in a valid URL route between 1-255 characters and contain only URL safe characters such as: a-z, 0-9 and '\' and '-'.`,
93
+ invalidIcon: (pattern, keyName, index) => `The icon '${pattern}' at index '${index}' for key '${keyName}' needs to be a defined resource of file type svg.`
93
94
  }
94
95
  },
95
96
  jiraWorkflowValidator: {
@@ -112,7 +113,8 @@ exports.errors = {
112
113
  },
113
114
  jiraFullPageModule: {
114
115
  invalidRouteRegex: (pattern, keyName, index) => `The routePrefix '${pattern}' at index '${index}' for key '${keyName}' needs to be in a valid URL route between 1-255 characters and contain only URL safe characters such as: a-z, 0-9 and '\' and '-'.`,
115
- propertyUniqueness: (property, moduleKey, keys) => `${property} should be unique across all ${moduleKey} modules. Found duplicates: ${keys.join(', ')}`
116
+ propertyUniqueness: (property, moduleKey, keys) => `${property} should be unique across all ${moduleKey} modules. Found duplicates: ${keys.join(', ')}`,
117
+ invalidIcon: (icon, keyName, index) => `The icon '${icon}' at index '${index}' for key '${keyName}' needs to be a defined resource of file type svg.`
116
118
  },
117
119
  moduleScopesValidator: {
118
120
  missingScopes: (moduleType, key, scopes) => `${moduleType} module '${key}' requires '${scopes.join(', ')}' scope(s).`
@@ -0,0 +1,7 @@
1
+ export declare type FullPageError = {
2
+ moduleKey: string;
3
+ message: string;
4
+ };
5
+ export declare const validateRoute: (moduleKey: string, pattern: string, index: number, errorMessages: any) => FullPageError[];
6
+ export declare const validateIcon: (moduleKey: string, icon: string, index: number, errorMessages: any) => FullPageError[];
7
+ //# sourceMappingURL=validateGlobalModules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateGlobalModules.d.ts","sourceRoot":"","sources":["../../../src/utils/global/validateGlobalModules.ts"],"names":[],"mappings":"AACA,oBAAY,aAAa,GAAG;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAgCF,eAAO,MAAM,aAAa,cACb,MAAM,WACR,MAAM,SACR,MAAM,iBACE,GAAG,KACjB,aAAa,EAMf,CAAC;AAEF,eAAO,MAAM,YAAY,cAAe,MAAM,QAAQ,MAAM,SAAS,MAAM,iBAAiB,GAAG,KAAG,aAAa,EAM9G,CAAC"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateIcon = exports.validateRoute = void 0;
4
+ const VALID_ROUTE_PATTERN = new RegExp(/^[a-z0-9\\-]+$/);
5
+ const mapToFullPageError = (validationErrors, moduleKey) => validationErrors.map((message) => ({ moduleKey, message }));
6
+ const validateRegex = (pattern, moduleKey, index, errorMessages) => {
7
+ const validationErrors = [];
8
+ if (!VALID_ROUTE_PATTERN.test(pattern)) {
9
+ validationErrors.push(errorMessages.invalidRouteRegex(pattern, moduleKey, index));
10
+ }
11
+ return validationErrors;
12
+ };
13
+ const iconCheck = (icon, moduleKey, index, errorMessages) => {
14
+ const validationErrors = [];
15
+ if (!icon.startsWith('resource:') || !icon.endsWith('.svg')) {
16
+ validationErrors.push(errorMessages.invalidIcon(icon, moduleKey, index));
17
+ }
18
+ return validationErrors;
19
+ };
20
+ const validateRoute = (moduleKey, pattern, index, errorMessages) => {
21
+ const validationErrors = [];
22
+ validationErrors.push(...validateRegex(pattern, moduleKey, index, errorMessages));
23
+ return mapToFullPageError(validationErrors, moduleKey);
24
+ };
25
+ exports.validateRoute = validateRoute;
26
+ const validateIcon = (moduleKey, icon, index, errorMessages) => {
27
+ const validationErrors = [];
28
+ validationErrors.push(...iconCheck(icon, moduleKey, index, errorMessages));
29
+ return mapToFullPageError(validationErrors, moduleKey);
30
+ };
31
+ exports.validateIcon = validateIcon;
@@ -1 +1 @@
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;AAuDnD,eAAO,MAAM,gBAAgB,YAAa,OAAO,sBAAsB,MAAM,EAAE,KAAG,eAAe,EAqBhG,CAAC"}
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,YAAa,OAAO,sBAAsB,MAAM,EAAE,KAAG,eAAe,EAgChG,CAAC"}
@@ -4,32 +4,26 @@ exports.validateFullPage = void 0;
4
4
  const types_1 = require("../../../types");
5
5
  const text_1 = require("../../../text");
6
6
  const utils_1 = require("../../../utils");
7
- const VALID_ROUTE_PATTERN = new RegExp(/^[a-z0-9\\-]+$/);
7
+ const validateGlobalModules_1 = require("../../../utils/global/validateGlobalModules");
8
8
  const errorMessages = text_1.errors.modules.confluence.fullPage;
9
- const mapToFullPageError = (validationErrors, moduleKey) => validationErrors.map((message) => ({ moduleKey, message }));
10
- const validateRegex = (pattern, moduleKey, index) => {
11
- const validationErrors = [];
12
- if (!VALID_ROUTE_PATTERN.test(pattern)) {
13
- validationErrors.push(errorMessages.invalidRouteRegex(pattern, moduleKey, index));
14
- }
15
- return validationErrors;
16
- };
17
- const validateRoute = (moduleKey, pattern, index) => {
18
- const validationErrors = [];
19
- validationErrors.push(...validateRegex(pattern, moduleKey, index));
20
- return mapToFullPageError(validationErrors, moduleKey);
21
- };
22
9
  const validateFullPage = (modules, yamlContentByLine) => {
23
10
  const validationErrors = [];
24
11
  const moduleType = types_1.AllModuleTypes.ConfluenceFullPage;
25
12
  const fullPageModules = modules[moduleType] || [];
26
13
  fullPageModules.forEach((module, index) => {
27
- validationErrors.push(...validateRoute(module.key, module.routePrefix, index).map((error) => ({
14
+ validationErrors.push(...(0, validateGlobalModules_1.validateRoute)(module.key, module.routePrefix, index, errorMessages).map((error) => ({
28
15
  message: error.message,
29
16
  reference: text_1.References.Modules,
30
17
  level: 'error',
31
18
  ...(0, utils_1.findPosition)(error.moduleKey, yamlContentByLine)
32
- })));
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
+ : []));
33
27
  });
34
28
  return validationErrors;
35
29
  };
@@ -1 +1 @@
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;AAoFnD,eAAO,MAAM,0BAA0B,YAAa,OAAO,sBAAsB,MAAM,EAAE,KAAG,eAAe,EA4B1G,CAAC"}
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,YAAa,OAAO,sBAAsB,MAAM,EAAE,KAAG,eAAe,EAuC1G,CAAC"}
@@ -4,22 +4,9 @@ exports.validateJiraFullPageModule = void 0;
4
4
  const types_1 = require("../../../types");
5
5
  const text_1 = require("../../../text");
6
6
  const utils_1 = require("../../../utils");
7
- const VALID_ROUTE_PATTERN = new RegExp(/^[a-z0-9\\-]+$/);
7
+ const validateGlobalModules_1 = require("../../../utils/global/validateGlobalModules");
8
8
  const ROUTE_FULL_PAGE = 'routePrefix';
9
9
  const errorMessages = text_1.errors.modules.jiraFullPageModule;
10
- const mapToFullPageError = (validationErrors, moduleKey) => validationErrors.map((message) => ({ moduleKey, message }));
11
- const validateRegex = (pattern, moduleKey, index) => {
12
- const validationErrors = [];
13
- if (!VALID_ROUTE_PATTERN.test(pattern)) {
14
- validationErrors.push(errorMessages.invalidRouteRegex(pattern, moduleKey, index));
15
- }
16
- return validationErrors;
17
- };
18
- const validateRoute = (moduleKey, pattern, index) => {
19
- const validationErrors = [];
20
- validationErrors.push(...validateRegex(pattern, moduleKey, index));
21
- return mapToFullPageError(validationErrors, moduleKey);
22
- };
23
10
  const validatePropertyUniqueness = (allModules, moduleType, property, yamlContentByLine) => {
24
11
  const validationErrors = [];
25
12
  const modules = allModules[moduleType] || [];
@@ -28,7 +15,7 @@ const validatePropertyUniqueness = (allModules, moduleType, property, yamlConten
28
15
  if (duplicatePropertyValues.length > 0) {
29
16
  const allModulesWithDuplicatedPropertyValues = modules.filter((module) => module[property] === duplicatePropertyValues[0]);
30
17
  validationErrors.push({
31
- message: text_1.errors.modules.jiraFullPageModule.propertyUniqueness(property, moduleType, duplicatePropertyValues),
18
+ message: errorMessages.propertyUniqueness(property, moduleType, duplicatePropertyValues),
32
19
  reference: text_1.References.Modules,
33
20
  level: 'error',
34
21
  ...(0, utils_1.findPosition)(allModulesWithDuplicatedPropertyValues?.[0]?.key, yamlContentByLine)
@@ -45,12 +32,19 @@ const validateJiraFullPageModule = (modules, yamlContentByLine) => {
45
32
  return validationErrors;
46
33
  }
47
34
  fullPageModules.forEach((module, index) => {
48
- validationErrors.push(...validateRoute(module.key, module.routePrefix, index).map((error) => ({
35
+ validationErrors.push(...(0, validateGlobalModules_1.validateRoute)(module.key, module.routePrefix, index, errorMessages).map((error) => ({
49
36
  message: error.message,
50
37
  reference: text_1.References.Modules,
51
38
  level: 'error',
52
39
  ...(0, utils_1.findPosition)(error.moduleKey, yamlContentByLine)
53
- })));
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
+ : []));
54
48
  });
55
49
  return validationErrors;
56
50
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/manifest",
3
- "version": "12.0.0-next.3-experimental-3c69930",
3
+ "version": "12.0.0-next.5",
4
4
  "description": "Definitions and validations of the Forge manifest",
5
5
  "main": "out/index.js",
6
6
  "scripts": {