@forge/manifest 3.8.1-next.1 → 3.9.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 +20 -0
- package/out/schema/manifest-schema.json +2 -22
- package/out/schema/manifest.d.ts +4 -8
- package/out/text/errors.d.ts +3 -0
- package/out/text/errors.d.ts.map +1 -1
- package/out/text/errors.js +4 -1
- package/out/validators/modules-validators/confluence/index.d.ts.map +1 -1
- package/out/validators/modules-validators/confluence/index.js +2 -0
- package/out/validators/modules-validators/confluence/validateCustomContentHierarchy.d.ts +4 -0
- package/out/validators/modules-validators/confluence/validateCustomContentHierarchy.d.ts.map +1 -0
- package/out/validators/modules-validators/confluence/validateCustomContentHierarchy.js +43 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @forge/manifest
|
|
2
2
|
|
|
3
|
+
## 3.9.0-next.1
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- b447be27: CONFDEV-80332 Added validation for Custom Content modules
|
|
8
|
+
|
|
9
|
+
## 3.8.2-next.0
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 74e00c86: Update manifest definitions
|
|
14
|
+
|
|
15
|
+
## 3.8.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- a85953d8: Add IssueTypeEvent mappings
|
|
20
|
+
- 2c42df96: Add beta (granular) scope for custom field configuration event
|
|
21
|
+
- c52209fd: Update manifest definitions
|
|
22
|
+
|
|
3
23
|
## 3.8.1-next.1
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -1402,7 +1402,7 @@
|
|
|
1402
1402
|
"type": "string",
|
|
1403
1403
|
"enum": [
|
|
1404
1404
|
"read",
|
|
1405
|
-
"
|
|
1405
|
+
"create",
|
|
1406
1406
|
"delete"
|
|
1407
1407
|
]
|
|
1408
1408
|
}
|
|
@@ -1413,16 +1413,6 @@
|
|
|
1413
1413
|
"preventDuplicateTitle": {
|
|
1414
1414
|
"type": "boolean"
|
|
1415
1415
|
},
|
|
1416
|
-
"breadcrumbs": {
|
|
1417
|
-
"type": "array",
|
|
1418
|
-
"minItems": 1,
|
|
1419
|
-
"uniqueItems": true,
|
|
1420
|
-
"items": {
|
|
1421
|
-
"type": "string",
|
|
1422
|
-
"maxLength": 100,
|
|
1423
|
-
"minLength": 1
|
|
1424
|
-
}
|
|
1425
|
-
},
|
|
1426
1416
|
"function": {
|
|
1427
1417
|
"type": "string",
|
|
1428
1418
|
"minLength": 1,
|
|
@@ -1496,7 +1486,7 @@
|
|
|
1496
1486
|
"type": "string",
|
|
1497
1487
|
"enum": [
|
|
1498
1488
|
"read",
|
|
1499
|
-
"
|
|
1489
|
+
"create",
|
|
1500
1490
|
"delete"
|
|
1501
1491
|
]
|
|
1502
1492
|
}
|
|
@@ -1507,16 +1497,6 @@
|
|
|
1507
1497
|
"preventDuplicateTitle": {
|
|
1508
1498
|
"type": "boolean"
|
|
1509
1499
|
},
|
|
1510
|
-
"breadcrumbs": {
|
|
1511
|
-
"type": "array",
|
|
1512
|
-
"minItems": 1,
|
|
1513
|
-
"uniqueItems": true,
|
|
1514
|
-
"items": {
|
|
1515
|
-
"type": "string",
|
|
1516
|
-
"maxLength": 100,
|
|
1517
|
-
"minLength": 1
|
|
1518
|
-
}
|
|
1519
|
-
},
|
|
1520
1500
|
"resolver": {
|
|
1521
1501
|
"additionalProperties": false,
|
|
1522
1502
|
"type": "object",
|
package/out/schema/manifest.d.ts
CHANGED
|
@@ -820,10 +820,9 @@ export interface Modules {
|
|
|
820
820
|
bodyType?: 'raw' | 'storage';
|
|
821
821
|
supportedContainerTypes: [string, ...string[]];
|
|
822
822
|
supportedChildTypes?: [string, ...string[]];
|
|
823
|
-
supportedSpacePermissions?: ['read' | '
|
|
823
|
+
supportedSpacePermissions?: ['read' | 'create' | 'delete', ...('read' | 'create' | 'delete')[]];
|
|
824
824
|
indexing?: boolean;
|
|
825
825
|
preventDuplicateTitle?: boolean;
|
|
826
|
-
breadcrumbs?: [string, ...string[]];
|
|
827
826
|
function: string;
|
|
828
827
|
key: ModuleKeySchema;
|
|
829
828
|
}
|
|
@@ -834,10 +833,9 @@ export interface Modules {
|
|
|
834
833
|
bodyType?: 'raw' | 'storage';
|
|
835
834
|
supportedContainerTypes: [string, ...string[]];
|
|
836
835
|
supportedChildTypes?: [string, ...string[]];
|
|
837
|
-
supportedSpacePermissions?: ['read' | '
|
|
836
|
+
supportedSpacePermissions?: ['read' | 'create' | 'delete', ...('read' | 'create' | 'delete')[]];
|
|
838
837
|
indexing?: boolean;
|
|
839
838
|
preventDuplicateTitle?: boolean;
|
|
840
|
-
breadcrumbs?: [string, ...string[]];
|
|
841
839
|
resolver?: {
|
|
842
840
|
function: string;
|
|
843
841
|
};
|
|
@@ -854,10 +852,9 @@ export interface Modules {
|
|
|
854
852
|
bodyType?: 'raw' | 'storage';
|
|
855
853
|
supportedContainerTypes: [string, ...string[]];
|
|
856
854
|
supportedChildTypes?: [string, ...string[]];
|
|
857
|
-
supportedSpacePermissions?: ['read' | '
|
|
855
|
+
supportedSpacePermissions?: ['read' | 'create' | 'delete', ...('read' | 'create' | 'delete')[]];
|
|
858
856
|
indexing?: boolean;
|
|
859
857
|
preventDuplicateTitle?: boolean;
|
|
860
|
-
breadcrumbs?: [string, ...string[]];
|
|
861
858
|
function: string;
|
|
862
859
|
key: ModuleKeySchema;
|
|
863
860
|
}
|
|
@@ -868,10 +865,9 @@ export interface Modules {
|
|
|
868
865
|
bodyType?: 'raw' | 'storage';
|
|
869
866
|
supportedContainerTypes: [string, ...string[]];
|
|
870
867
|
supportedChildTypes?: [string, ...string[]];
|
|
871
|
-
supportedSpacePermissions?: ['read' | '
|
|
868
|
+
supportedSpacePermissions?: ['read' | 'create' | 'delete', ...('read' | 'create' | 'delete')[]];
|
|
872
869
|
indexing?: boolean;
|
|
873
870
|
preventDuplicateTitle?: boolean;
|
|
874
|
-
breadcrumbs?: [string, ...string[]];
|
|
875
871
|
resolver?: {
|
|
876
872
|
function: string;
|
|
877
873
|
};
|
package/out/text/errors.d.ts
CHANGED
|
@@ -36,6 +36,9 @@ export declare const errors: {
|
|
|
36
36
|
confluence: {
|
|
37
37
|
multipleProperty: (property: string, moduleKey: string, keys: string[]) => string;
|
|
38
38
|
propertyUniquenessValidator: (property: string, moduleKey: string, keys: string[]) => string;
|
|
39
|
+
validateCustomContentHierarchyUnknown: (property: string, moduleKey: string, unknownKey: string) => string;
|
|
40
|
+
validateCustomContentCrossReferenceMissingContainer: (moduleKey: string, referredModuleKey: string) => string;
|
|
41
|
+
validateCustomContentCrossReferenceMissingChild: (moduleKey: string, referredModuleKey: string) => string;
|
|
39
42
|
};
|
|
40
43
|
jiraWorkflowValidator: {
|
|
41
44
|
missingProperty: (key: string) => string;
|
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,MAAM,SAAS,MAAM,EAAE,KAAG,MAAM;;;uCAMjC,MAAM,KAAG,MAAM;oCACpB,MAAM;iCAEP,MAAM,KAAG,MAAM;4CACJ,MAAM,KAAG,MAAM;;;gCAG3B,MAAM,KAA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IACrC,SAAS,4BAA4B;IACrC,UAAU,wBAAwB;IAClC,GAAG,8BAA8B;CAClC"}
|
package/out/text/errors.js
CHANGED
|
@@ -47,7 +47,10 @@ exports.errors = {
|
|
|
47
47
|
},
|
|
48
48
|
confluence: {
|
|
49
49
|
multipleProperty: (property, moduleKey, keys) => `There can be only 1 ${moduleKey} module which designates "${property}": true. Modules containing designation: ${keys.join(', ')}`,
|
|
50
|
-
propertyUniquenessValidator: (property, moduleKey, keys) => `${property} should be unique across all ${moduleKey} modules. Found duplicates: ${keys.join(', ')}
|
|
50
|
+
propertyUniquenessValidator: (property, moduleKey, keys) => `${property} should be unique across all ${moduleKey} modules. Found duplicates: ${keys.join(', ')}`,
|
|
51
|
+
validateCustomContentHierarchyUnknown: (property, moduleKey, unknownKey) => `${property} of the "${moduleKey}" module refers to unknown key: ${unknownKey}`,
|
|
52
|
+
validateCustomContentCrossReferenceMissingContainer: (moduleKey, referredModuleKey) => `supportedContainerTypes of the "${moduleKey}" module refers to "${referredModuleKey}" module. "${referredModuleKey}" module must include "${moduleKey}" in supportedChildTypes`,
|
|
53
|
+
validateCustomContentCrossReferenceMissingChild: (moduleKey, referredModuleKey) => `supportedChildTypes of the "${moduleKey}" module refers to "${referredModuleKey}" module. "${referredModuleKey}" module must include "${moduleKey}" in supportedContainerTypes`
|
|
51
54
|
},
|
|
52
55
|
jiraWorkflowValidator: {
|
|
53
56
|
missingProperty: (key) => `${types_1.AllModuleTypes.JiraWorkflowValidator} module '${key}' must have either a function or expression.`,
|
|
@@ -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;
|
|
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;AASjE,eAAO,MAAM,yBAAyB,YAAa,OAAO,+CAAiC,eAAe,EAsBzG,CAAC"}
|
|
@@ -4,6 +4,7 @@ exports.validateConfluenceModules = void 0;
|
|
|
4
4
|
const types_1 = require("../../../types");
|
|
5
5
|
const validateSingleProperty_1 = require("./validateSingleProperty");
|
|
6
6
|
const validatePropertyUniqueness_1 = require("./validatePropertyUniqueness");
|
|
7
|
+
const validateCustomContentHierarchy_1 = require("./validateCustomContentHierarchy");
|
|
7
8
|
const ROUTE = 'route';
|
|
8
9
|
const USE_AS_CONFIG = 'useAsConfig';
|
|
9
10
|
const USE_AS_GET_STARTED = 'useAsGetStarted';
|
|
@@ -18,5 +19,6 @@ exports.validateConfluenceModules = (modules, yamlContentByLine) => {
|
|
|
18
19
|
});
|
|
19
20
|
validationErrors.push(...validateSingleProperty_1.validateSingleProperty(modules, types_1.AllModuleTypes.ConfluenceGlobalSettings, USE_AS_CONFIG, yamlContentByLine));
|
|
20
21
|
validationErrors.push(...validateSingleProperty_1.validateSingleProperty(modules, types_1.AllModuleTypes.ConfluenceGlobalSettings, USE_AS_GET_STARTED, yamlContentByLine));
|
|
22
|
+
validationErrors.push(...validateCustomContentHierarchy_1.validateCustomContentHierarchy(modules, types_1.AllModuleTypes.ConfluenceCustomContent, yamlContentByLine));
|
|
21
23
|
return validationErrors;
|
|
22
24
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AllModuleTypes, ValidationError } from '../../../types';
|
|
2
|
+
import { Modules } from '../../../schema/manifest';
|
|
3
|
+
export declare const validateCustomContentHierarchy: (allModules: Modules, moduleType: AllModuleTypes, yamlContentByLine?: string[] | undefined) => ValidationError[];
|
|
4
|
+
//# sourceMappingURL=validateCustomContentHierarchy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateCustomContentHierarchy.d.ts","sourceRoot":"","sources":["../../../../src/validators/modules-validators/confluence/validateCustomContentHierarchy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAInD,eAAO,MAAM,8BAA8B,eAC7B,OAAO,cACP,cAAc,+CAEzB,eAAe,EAyDjB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateCustomContentHierarchy = void 0;
|
|
4
|
+
const text_1 = require("../../../text");
|
|
5
|
+
const utils_1 = require("../../../utils");
|
|
6
|
+
const INNER_TYPE_PREFIX = 'this:';
|
|
7
|
+
exports.validateCustomContentHierarchy = (allModules, moduleType, yamlContentByLine) => {
|
|
8
|
+
const validationErrors = [];
|
|
9
|
+
const modules = allModules[moduleType] || [];
|
|
10
|
+
modules.forEach((module) => {
|
|
11
|
+
const supportedContainerTypes = module.supportedContainerTypes || [];
|
|
12
|
+
const supportedChildTypes = module.supportedChildTypes || [];
|
|
13
|
+
[
|
|
14
|
+
{
|
|
15
|
+
propName: 'supportedContainerTypes',
|
|
16
|
+
propInnerValues: supportedContainerTypes.filter((supportedContainerType) => supportedContainerType.startsWith(INNER_TYPE_PREFIX)),
|
|
17
|
+
dependentPropName: 'supportedChildTypes',
|
|
18
|
+
dependentReferenceMissingMessage: text_1.errors.modules.confluence.validateCustomContentCrossReferenceMissingContainer
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
propName: 'supportedChildTypes',
|
|
22
|
+
propInnerValues: supportedChildTypes.filter((supportedChildType) => supportedChildType.startsWith(INNER_TYPE_PREFIX)),
|
|
23
|
+
dependentPropName: 'supportedContainerTypes',
|
|
24
|
+
dependentReferenceMissingMessage: text_1.errors.modules.confluence.validateCustomContentCrossReferenceMissingChild
|
|
25
|
+
}
|
|
26
|
+
].forEach(({ propName, propInnerValues, dependentPropName, dependentReferenceMissingMessage }) => {
|
|
27
|
+
propInnerValues.forEach((value) => {
|
|
28
|
+
const referredModuleName = value.substring(INNER_TYPE_PREFIX.length);
|
|
29
|
+
const referredModule = modules.find((m) => m.key === referredModuleName);
|
|
30
|
+
if (!referredModule) {
|
|
31
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.confluence.validateCustomContentHierarchyUnknown(propName, module.key, referredModuleName), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition(module.key, yamlContentByLine)));
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
const referredModuleDependentPropValues = referredModule[dependentPropName] || [];
|
|
35
|
+
if (!referredModuleDependentPropValues.includes(`${INNER_TYPE_PREFIX}${module.key}`)) {
|
|
36
|
+
validationErrors.push(Object.assign({ message: dependentReferenceMissingMessage(module.key, referredModule.key), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition(module.key, yamlContentByLine)));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
return validationErrors;
|
|
43
|
+
};
|