@forge/manifest 0.0.0-experimental-9489df9 → 0.0.0-experimental-fbe27f8
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 +8 -5
- package/out/mapping/product-event-to-scope-mapping.json +0 -8
- package/out/text/errors.d.ts +4 -0
- package/out/text/errors.d.ts.map +1 -1
- package/out/text/errors.js +4 -0
- package/out/types/module-types.d.ts +0 -1
- package/out/types/module-types.d.ts.map +1 -1
- package/out/types/module-types.js +0 -1
- package/out/validators/modules-validator.d.ts.map +1 -1
- package/out/validators/modules-validator.js +3 -6
- package/out/validators/modules-validators/jira/validate-full-admin-page.d.ts +4 -0
- package/out/validators/modules-validators/jira/validate-full-admin-page.d.ts.map +1 -0
- package/out/validators/modules-validators/jira/validate-full-admin-page.js +62 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @forge/manifest
|
|
2
2
|
|
|
3
|
-
## 0.0.0-experimental-
|
|
3
|
+
## 0.0.0-experimental-fbe27f8
|
|
4
4
|
|
|
5
5
|
### Major Changes
|
|
6
6
|
|
|
@@ -8,16 +8,19 @@
|
|
|
8
8
|
|
|
9
9
|
### Minor Changes
|
|
10
10
|
|
|
11
|
-
-
|
|
12
|
-
- 0da5775: Add following Jira Service Management modules:
|
|
13
|
-
|
|
14
|
-
- jiraServiceManagement:portalRequestCreatePropertyPanel module
|
|
11
|
+
- c0c88f0: BCAT-1386 Remove scopes mapping for bitbucket repo created event
|
|
15
12
|
|
|
16
13
|
### Patch Changes
|
|
17
14
|
|
|
18
15
|
- c1c93a4: Update manifest definitions
|
|
19
16
|
- b1684fd: Update manifest definitions
|
|
20
17
|
|
|
18
|
+
## 4.0.0-next.5
|
|
19
|
+
|
|
20
|
+
### Minor Changes
|
|
21
|
+
|
|
22
|
+
- c0c88f09: BCAT-1386 Remove scopes mapping for bitbucket repo created event
|
|
23
|
+
|
|
21
24
|
## 4.0.0-next.4
|
|
22
25
|
|
|
23
26
|
### Patch Changes
|
package/out/text/errors.d.ts
CHANGED
|
@@ -27,6 +27,9 @@ export declare const errors: {
|
|
|
27
27
|
wrongFunctionReference: (module: string, functionKey: string) => string;
|
|
28
28
|
wrongResourceReference: (module: string, resourceKey: string) => string;
|
|
29
29
|
singleEntryOfTheModule: (moduleType: string) => string;
|
|
30
|
+
singleEntryOfModuleWithoutConfigureAndStartedParams: (moduleType: string) => string;
|
|
31
|
+
singleEntryOfModuleWithConfigureParam: (moduleType: string) => string;
|
|
32
|
+
singleEntryOfModuleWithGetStartedParam: (moduleType: string) => string;
|
|
30
33
|
displayConditions: {
|
|
31
34
|
overcomplicated: (moduleKey: string) => string;
|
|
32
35
|
invalid: (moduleKey: string) => string;
|
|
@@ -62,6 +65,7 @@ export declare const errors: {
|
|
|
62
65
|
searchAlias: (aliases: string[]) => string;
|
|
63
66
|
};
|
|
64
67
|
subPages: {
|
|
68
|
+
invalidPagesAndSectionsForConfigurePages: (key: string) => string;
|
|
65
69
|
subPagesWithUIKit: (key: string) => string;
|
|
66
70
|
invalidPagesAndSections: (key: string) => string;
|
|
67
71
|
};
|
package/out/text/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/text/errors.ts"],"names":[],"mappings":"AAGA,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,0CAA4B,MAAM;mDAIvC,MAAM,KAAG,MAAM;;;qCAI7B,MAAM,SAAS,MAAM,KAAG,MAAM;4CAEvB,MAAM,SAAS,MAAM,KAAG,MAAM;wCAElC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eAAe,wBAAwB;IACvC,WAAW,4BAA4B;IACvC,WAAW,+BAA+B;IAC1C,aAAa,8BAA8B;IAC3C,OAAO,0BAA0B;IACjC,cAAc,kCAAkC;IAChD,mBAAmB,0BAA0B;IAC7C,SAAS,4BAA4B;IACrC,SAAS,4BAA4B;IACrC,UAAU,wBAAwB;IAClC,GAAG,8BAA8B;CAClC"}
|
package/out/text/errors.js
CHANGED
|
@@ -39,6 +39,9 @@ exports.errors = {
|
|
|
39
39
|
wrongFunctionReference: (module, functionKey) => `${module} references undefined function module with key '${functionKey}'`,
|
|
40
40
|
wrongResourceReference: (module, resourceKey) => `missing resource key '${resourceKey}' is being referenced by ${module} module`,
|
|
41
41
|
singleEntryOfTheModule: (moduleType) => `Only a single entry of the ${moduleType} module can be defined in the manifest`,
|
|
42
|
+
singleEntryOfModuleWithoutConfigureAndStartedParams: (moduleType) => `There can be only one ${moduleType} entry without either useAsConfig or useAsGetStarted parameters. For a new ${moduleType} entry, include the following parameters: useAsConfig or useAsGetStarted.`,
|
|
43
|
+
singleEntryOfModuleWithConfigureParam: (moduleType) => `There can be only one ${moduleType} entry containing useAsConfig parameter. For a new ${moduleType} entry, remove the useAsConfig parameter.`,
|
|
44
|
+
singleEntryOfModuleWithGetStartedParam: (moduleType) => `There can be only one ${moduleType} entry containing useAsGetStarted parameter. For a new ${moduleType} entry, remove the useAsGetStarted parameter.`,
|
|
42
45
|
displayConditions: {
|
|
43
46
|
overcomplicated: (moduleKey) => `Nesting of display conditions of the "${moduleKey}" module exceeds 10 levels.`,
|
|
44
47
|
invalid: (moduleKey) => `Display conditions of the "${moduleKey}" module are invalid.`,
|
|
@@ -74,6 +77,7 @@ exports.errors = {
|
|
|
74
77
|
searchAlias: (aliases) => `Search alias should be always unique per field. Found duplicates: ${aliases.join(', ')}.`
|
|
75
78
|
},
|
|
76
79
|
subPages: {
|
|
80
|
+
invalidPagesAndSectionsForConfigurePages: (key) => `${key} entry with 'useAsConfig' or 'useAsGetStarted' can’t include 'pages' and 'sections' parameters.`,
|
|
77
81
|
subPagesWithUIKit: (key) => `Subpages in UI kit are not supported. Use Custom UI in the '${key}' module instead.`,
|
|
78
82
|
invalidPagesAndSections: (key) => `'pages' cannot be used with 'sections' in the module '${key}'.`
|
|
79
83
|
},
|
|
@@ -48,7 +48,6 @@ export declare enum AllModuleTypes {
|
|
|
48
48
|
JiraServiceManagementPortalProfilePanel = "jiraServiceManagement:portalProfilePanel",
|
|
49
49
|
JiraServiceManagementPortalRequestViewAction = "jiraServiceManagement:portalRequestViewAction",
|
|
50
50
|
JiraServiceManagementPortalUserMenuAction = "jiraServiceManagement:portalUserMenuAction",
|
|
51
|
-
JiraServiceManagementPortalRequestCreatePropertyPanel = "jiraServiceManagement:portalRequestCreatePropertyPanel",
|
|
52
51
|
ConnectJiraAdminPages = "connect-jira:adminPages",
|
|
53
52
|
ConnectJiraJiraBackgroundScripts = "connect-jira:jiraBackgroundScripts",
|
|
54
53
|
ConnectJiraGeneralPages = "connect-jira:generalPages",
|
|
@@ -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,0BAA0B;IAC9C,QAAQ,cAAc;IACtB,uBAAuB,6BAA6B;IACpD,2BAA2B,iCAAiC;IAC5D,qBAAqB,2BAA2B;IAChD,uBAAuB,6BAA6B;IACpD,wBAAwB,8BAA8B;IACtD,oBAAoB,0BAA0B;IAC9C,sBAAsB,4BAA4B;IAClD,mBAAmB,yBAAyB;IAC5C,uBAAuB,6BAA6B;IACpD,kBAAkB,wBAAwB;IAC1C,qBAAqB,2BAA2B;IAChD,qBAAqB,2BAA2B;IAChD,wBAAwB,8BAA8B;IACtD,eAAe,qBAAqB;IACpC,mBAAmB,yBAAyB;IAC5C,eAAe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ACrE,oCAAoC,2CAA2C;IAC/E,yBAAyB,gCAAgC;IACzD,0BAA0B,iCAAiC;IAC3D,4BAA4B,mCAAmC;IAC/D,yBAAyB,gCAAgC;IACzD,wBAAwB,+BAA+B;IACvD,kBAAkB,yBAAyB;IAC3C,gCAAgC,uCAAuC;IACvE,qCAAqC,4CAA4C;IACjF,8BAA8B,qCAAqC;IACnE,+BAA+B,sCAAsC;IACrE,sCAAsC,6CAA6C;IACnF,4BAA4B,mCAAmC;IAC/D,6BAA6B,oCAAoC;IACjE,yBAAyB,gCAAgC;IACzD,2BAA2B,kCAAkC;IAC7D,iCAAiC,wCAAwC;IACzE,sBAAsB,6BAA6B;IACnD,iCAAiC,wCAAwC;IACzE,oCAAoC,2CAA2C;IAC/E,iCAAiC,wCAAwC;IACzE,0BAA0B,iCAAiC;IAC3D,oBAAoB,2BAA2B;IAC/C,sBAAsB,6BAA6B;IACnD,mBAAmB,0BAA0B;IAC7C,0BAA0B,iCAAiC;IAC3D,8BAA8B,uBAAuB;IACrD,6BAA6B,sBAAsB;IACnD,6BAA6B,sBAAsB;IACnD,gCAAgC,yBAAyB;IACzD,wCAAwC,iCAAiC;IACzE,+BAA+B,wBAAwB;CACxD;AAED,eAAO,MAAM,iBAAiB,kBAAgC,CAAC;AAE/D,eAAO,MAAM,uBAAuB,UAAwE,CAAC"}
|
|
@@ -52,7 +52,6 @@ var AllModuleTypes;
|
|
|
52
52
|
AllModuleTypes["JiraServiceManagementPortalProfilePanel"] = "jiraServiceManagement:portalProfilePanel";
|
|
53
53
|
AllModuleTypes["JiraServiceManagementPortalRequestViewAction"] = "jiraServiceManagement:portalRequestViewAction";
|
|
54
54
|
AllModuleTypes["JiraServiceManagementPortalUserMenuAction"] = "jiraServiceManagement:portalUserMenuAction";
|
|
55
|
-
AllModuleTypes["JiraServiceManagementPortalRequestCreatePropertyPanel"] = "jiraServiceManagement:portalRequestCreatePropertyPanel";
|
|
56
55
|
AllModuleTypes["ConnectJiraAdminPages"] = "connect-jira:adminPages";
|
|
57
56
|
AllModuleTypes["ConnectJiraJiraBackgroundScripts"] = "connect-jira:jiraBackgroundScripts";
|
|
58
57
|
AllModuleTypes["ConnectJiraGeneralPages"] = "connect-jira:generalPages";
|
|
@@ -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,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;
|
|
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,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAO3D,qBAAa,gBACX,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;IACzF,OAAO,CAAC,oBAAoB,CAA0C;IAEhE,QAAQ,CACZ,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,GACnD,OAAO,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC;CA6OrD"}
|
|
@@ -8,6 +8,7 @@ const fs_1 = require("fs");
|
|
|
8
8
|
const path_1 = require("path");
|
|
9
9
|
const ui_modifications_1 = require("./modules-validators/jira/ui-modifications");
|
|
10
10
|
const confluence_1 = require("./modules-validators/confluence");
|
|
11
|
+
const validate_full_admin_page_1 = require("./modules-validators/jira/validate-full-admin-page");
|
|
11
12
|
class ModulesValidator {
|
|
12
13
|
constructor() {
|
|
13
14
|
this.functionHandlerRegex = /^([a-zA-Z0-9-_]+)\.([a-zA-Z0-9-_]+)$/;
|
|
@@ -93,12 +94,8 @@ class ModulesValidator {
|
|
|
93
94
|
}
|
|
94
95
|
});
|
|
95
96
|
validationErrors.push(...ui_modifications_1.validateUiModificationsModule(modules, yamlContentByLine));
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
types_1.AllModuleTypes.JiraProjectPage,
|
|
99
|
-
types_1.AllModuleTypes.JiraProjectSettingsPage,
|
|
100
|
-
types_1.AllModuleTypes.JiraGlobalPage
|
|
101
|
-
].forEach((moduleType) => {
|
|
97
|
+
validationErrors.push(...validate_full_admin_page_1.validateFullAdminPage(modules, yamlContentByLine));
|
|
98
|
+
[types_1.AllModuleTypes.JiraProjectPage, types_1.AllModuleTypes.JiraProjectSettingsPage, types_1.AllModuleTypes.JiraGlobalPage].forEach((moduleType) => {
|
|
102
99
|
const moduleArray = modules[moduleType];
|
|
103
100
|
if (moduleArray && moduleArray.length > 1) {
|
|
104
101
|
validationErrors.push(Object.assign({ message: text_1.errors.modules.singleEntryOfTheModule(moduleType), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition(moduleArray[1].key, yamlContentByLine)));
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ValidationError } from '../../../types';
|
|
2
|
+
import { Modules } from '../../../schema/manifest';
|
|
3
|
+
export declare const validateFullAdminPage: (modules: Modules, yamlContentByLine?: string[] | undefined) => ValidationError[];
|
|
4
|
+
//# sourceMappingURL=validate-full-admin-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-full-admin-page.d.ts","sourceRoot":"","sources":["../../../../src/validators/modules-validators/jira/validate-full-admin-page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAiHnD,eAAO,MAAM,qBAAqB,YAAa,OAAO,+CAAiC,eAAe,EAWrG,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateFullAdminPage = void 0;
|
|
4
|
+
const types_1 = require("../../../types");
|
|
5
|
+
const text_1 = require("../../../text");
|
|
6
|
+
const utils_1 = require("../../../utils");
|
|
7
|
+
const validateModuleBasicAdminPage = (moduleArray, moduleType, yamlContentByLine) => {
|
|
8
|
+
const validationErrors = [];
|
|
9
|
+
const moduleBasicAdminPage = moduleArray.filter(({ useAsGetStarted, useAsConfig }) => !useAsGetStarted && !useAsConfig);
|
|
10
|
+
if ((moduleBasicAdminPage === null || moduleBasicAdminPage === void 0 ? void 0 : moduleBasicAdminPage.length) > 1) {
|
|
11
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.singleEntryOfModuleWithoutConfigureAndStartedParams(moduleType), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition(moduleBasicAdminPage[1].key, yamlContentByLine)));
|
|
12
|
+
}
|
|
13
|
+
if ((moduleBasicAdminPage === null || moduleBasicAdminPage === void 0 ? void 0 : moduleBasicAdminPage.length) === 1) {
|
|
14
|
+
const module = moduleBasicAdminPage[0];
|
|
15
|
+
if (module && (module.pages || module.sections) && module.function) {
|
|
16
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.subPages.subPagesWithUIKit(module.key), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition(module.key, yamlContentByLine)));
|
|
17
|
+
}
|
|
18
|
+
if (module && module.pages && module.sections) {
|
|
19
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.subPages.invalidPagesAndSections(module.key), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition(module.key, yamlContentByLine)));
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return validationErrors;
|
|
23
|
+
};
|
|
24
|
+
const validateModuleIncludesUseAsConfigProp = (moduleArray, moduleType, yamlContentByLine) => {
|
|
25
|
+
const validationErrors = [];
|
|
26
|
+
const modulesWithUseAsConfigProp = moduleArray.filter((module) => module['useAsConfig']);
|
|
27
|
+
if (modulesWithUseAsConfigProp.length > 1) {
|
|
28
|
+
const { key } = modulesWithUseAsConfigProp[1];
|
|
29
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.singleEntryOfModuleWithConfigureParam(moduleType), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition(key, yamlContentByLine)));
|
|
30
|
+
}
|
|
31
|
+
if (modulesWithUseAsConfigProp.length === 1) {
|
|
32
|
+
const { pages, sections, key } = modulesWithUseAsConfigProp[0];
|
|
33
|
+
if (pages || sections)
|
|
34
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.subPages.invalidPagesAndSectionsForConfigurePages(moduleType), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition(key, yamlContentByLine)));
|
|
35
|
+
}
|
|
36
|
+
return validationErrors;
|
|
37
|
+
};
|
|
38
|
+
const validateModuleIncludesUseAsGetStartedProp = (moduleArray, moduleType, yamlContentByLine) => {
|
|
39
|
+
const validationErrors = [];
|
|
40
|
+
const modulesWithUseGetStartedProp = moduleArray.filter((module) => module['useAsGetStarted']);
|
|
41
|
+
if (modulesWithUseGetStartedProp.length > 1) {
|
|
42
|
+
const { key } = modulesWithUseGetStartedProp[1];
|
|
43
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.singleEntryOfModuleWithGetStartedParam(moduleType), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition(key, yamlContentByLine)));
|
|
44
|
+
}
|
|
45
|
+
if (modulesWithUseGetStartedProp.length === 1) {
|
|
46
|
+
const { pages, sections, key } = modulesWithUseGetStartedProp[0];
|
|
47
|
+
if (pages || sections)
|
|
48
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.subPages.invalidPagesAndSectionsForConfigurePages(moduleType), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition(key, yamlContentByLine)));
|
|
49
|
+
}
|
|
50
|
+
return validationErrors;
|
|
51
|
+
};
|
|
52
|
+
exports.validateFullAdminPage = (modules, yamlContentByLine) => {
|
|
53
|
+
const validationErrors = [];
|
|
54
|
+
const moduleType = types_1.AllModuleTypes.JiraAdminPage;
|
|
55
|
+
const moduleArray = modules[moduleType];
|
|
56
|
+
if (moduleArray && moduleArray.length) {
|
|
57
|
+
validationErrors.push(...validateModuleBasicAdminPage(moduleArray, moduleType, yamlContentByLine));
|
|
58
|
+
validationErrors.push(...validateModuleIncludesUseAsConfigProp(moduleArray, moduleType, yamlContentByLine));
|
|
59
|
+
validationErrors.push(...validateModuleIncludesUseAsGetStartedProp(moduleArray, moduleType, yamlContentByLine));
|
|
60
|
+
}
|
|
61
|
+
return validationErrors;
|
|
62
|
+
};
|