@forge/manifest 0.0.0-experimental-490cfcf → 0.0.0-experimental-e1cefc4
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 +129 -1
- package/out/processor/basic-validation-processor.d.ts.map +1 -1
- package/out/processor/basic-validation-processor.js +2 -1
- package/out/processor/full-validation-processor.d.ts.map +1 -1
- package/out/processor/full-validation-processor.js +2 -1
- package/out/schema/manifest-schema.json +509 -329
- package/out/schema/manifest.d.ts +386 -280
- package/out/scopes/shipyard-scopes.json +18 -0
- package/out/text/errors.d.ts +11 -3
- package/out/text/errors.d.ts.map +1 -1
- package/out/text/errors.js +11 -3
- package/out/types/module-types.d.ts +3 -0
- package/out/types/module-types.d.ts.map +1 -1
- package/out/types/module-types.js +3 -0
- package/out/validators/entity-property-validator.d.ts +6 -0
- package/out/validators/entity-property-validator.d.ts.map +1 -0
- package/out/validators/entity-property-validator.js +35 -0
- package/out/validators/index.d.ts +1 -0
- package/out/validators/index.d.ts.map +1 -1
- package/out/validators/index.js +1 -0
- package/out/validators/modules-validator.d.ts.map +1 -1
- package/out/validators/modules-validator.js +14 -6
- package/out/validators/modules-validators/confluence/index.d.ts +4 -0
- package/out/validators/modules-validators/confluence/index.d.ts.map +1 -0
- package/out/validators/modules-validators/confluence/index.js +22 -0
- package/out/validators/modules-validators/confluence/validatePropertyUniqueness.d.ts +4 -0
- package/out/validators/modules-validators/confluence/validatePropertyUniqueness.d.ts.map +1 -0
- package/out/validators/modules-validators/confluence/validatePropertyUniqueness.js +17 -0
- package/out/validators/modules-validators/confluence/validateSingleProperty.d.ts +4 -0
- package/out/validators/modules-validators/confluence/validateSingleProperty.d.ts.map +1 -0
- package/out/validators/modules-validators/confluence/validateSingleProperty.js +15 -0
- package/out/validators/modules-validators/jira/issue-adjustment.d.ts +4 -0
- package/out/validators/modules-validators/jira/issue-adjustment.d.ts.map +1 -0
- package/out/validators/modules-validators/jira/issue-adjustment.js +16 -0
- package/out/validators/providers-validator.d.ts +2 -1
- package/out/validators/providers-validator.d.ts.map +1 -1
- package/out/validators/providers-validator.js +13 -9
- package/package.json +1 -1
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"delete:avatar:jira",
|
|
12
12
|
"delete:blogpost:confluence",
|
|
13
13
|
"delete:board-scope.admin:jira-software",
|
|
14
|
+
"delete:build-info:jira",
|
|
14
15
|
"delete:comment:confluence",
|
|
15
16
|
"delete:comment:jira",
|
|
16
17
|
"delete:comment.property:jira",
|
|
@@ -20,6 +21,9 @@
|
|
|
20
21
|
"delete:custom-content:confluence",
|
|
21
22
|
"delete:dashboard:jira",
|
|
22
23
|
"delete:dashboard.property:jira",
|
|
24
|
+
"delete:deployment-info:jira",
|
|
25
|
+
"delete:dev-info:jira",
|
|
26
|
+
"delete:feature-flag-info:jira",
|
|
23
27
|
"delete:field-configuration-scheme:jira",
|
|
24
28
|
"delete:field-configuration:jira",
|
|
25
29
|
"delete:field:jira",
|
|
@@ -27,6 +31,7 @@
|
|
|
27
31
|
"delete:filter:jira",
|
|
28
32
|
"delete:filter.column:jira",
|
|
29
33
|
"delete:group:jira",
|
|
34
|
+
"delete:issue-adjustments:jira",
|
|
30
35
|
"delete:issue-link-type:jira",
|
|
31
36
|
"delete:issue-link:jira",
|
|
32
37
|
"delete:issue-type-scheme:jira",
|
|
@@ -51,6 +56,7 @@
|
|
|
51
56
|
"delete:project.avatar:jira",
|
|
52
57
|
"delete:project.component:jira",
|
|
53
58
|
"delete:project.property:jira",
|
|
59
|
+
"delete:remote-link-info:jira",
|
|
54
60
|
"delete:request.feedback:jira-service-management",
|
|
55
61
|
"delete:request.notification:jira-service-management",
|
|
56
62
|
"delete:request.participant:jira-service-management",
|
|
@@ -83,6 +89,7 @@
|
|
|
83
89
|
"read:blogpost:confluence",
|
|
84
90
|
"read:board-scope:jira-software",
|
|
85
91
|
"read:board-scope.admin:jira-software",
|
|
92
|
+
"read:build-info:jira",
|
|
86
93
|
"read:build:jira-software",
|
|
87
94
|
"read:comment:confluence",
|
|
88
95
|
"read:comment:jira",
|
|
@@ -102,9 +109,12 @@
|
|
|
102
109
|
"read:customer:jira-service-management",
|
|
103
110
|
"read:dashboard:jira",
|
|
104
111
|
"read:dashboard.property:jira",
|
|
112
|
+
"read:deployment-info:jira",
|
|
105
113
|
"read:deployment:jira-software",
|
|
114
|
+
"read:dev-info:jira",
|
|
106
115
|
"read:epic:jira-software",
|
|
107
116
|
"read:event:compass",
|
|
117
|
+
"read:feature-flag-info:jira",
|
|
108
118
|
"read:feature-flag:jira-software",
|
|
109
119
|
"read:field-configuration-scheme:jira",
|
|
110
120
|
"read:field-configuration:jira",
|
|
@@ -119,6 +129,7 @@
|
|
|
119
129
|
"read:group:jira",
|
|
120
130
|
"read:inlinetask:confluence",
|
|
121
131
|
"read:instance-configuration:jira",
|
|
132
|
+
"read:issue-adjustments:jira",
|
|
122
133
|
"read:issue-details:jira",
|
|
123
134
|
"read:issue-event:jira",
|
|
124
135
|
"read:issue-field-values:jira",
|
|
@@ -174,6 +185,7 @@
|
|
|
174
185
|
"read:project.property:jira",
|
|
175
186
|
"read:queue:jira-service-management",
|
|
176
187
|
"read:relation:confluence",
|
|
188
|
+
"read:remote-link-info:jira",
|
|
177
189
|
"read:remote-link:jira-software",
|
|
178
190
|
"read:request:jira-service-management",
|
|
179
191
|
"read:request.action:jira-service-management",
|
|
@@ -233,6 +245,7 @@
|
|
|
233
245
|
"write:blogpost:confluence",
|
|
234
246
|
"write:board-scope:jira-software",
|
|
235
247
|
"write:board-scope.admin:jira-software",
|
|
248
|
+
"write:build-info:jira",
|
|
236
249
|
"write:build:jira-software",
|
|
237
250
|
"write:comment:confluence",
|
|
238
251
|
"write:comment:jira",
|
|
@@ -249,9 +262,12 @@
|
|
|
249
262
|
"write:customer:jira-service-management",
|
|
250
263
|
"write:dashboard:jira",
|
|
251
264
|
"write:dashboard.property:jira",
|
|
265
|
+
"write:deployment-info:jira",
|
|
252
266
|
"write:deployment:jira-software",
|
|
267
|
+
"write:dev-info:jira",
|
|
253
268
|
"write:epic:jira-software",
|
|
254
269
|
"write:event:compass",
|
|
270
|
+
"write:feature-flag-info:jira",
|
|
255
271
|
"write:feature-flag:jira-software",
|
|
256
272
|
"write:field-configuration-scheme:jira",
|
|
257
273
|
"write:field-configuration:jira",
|
|
@@ -265,6 +281,7 @@
|
|
|
265
281
|
"write:group:jira",
|
|
266
282
|
"write:inlinetask:confluence",
|
|
267
283
|
"write:instance-configuration:jira",
|
|
284
|
+
"write:issue-adjustments:jira",
|
|
268
285
|
"write:issue-link-type:jira",
|
|
269
286
|
"write:issue-link:jira",
|
|
270
287
|
"write:issue-type-scheme:jira",
|
|
@@ -298,6 +315,7 @@
|
|
|
298
315
|
"write:project.feature:jira",
|
|
299
316
|
"write:project.property:jira",
|
|
300
317
|
"write:relation:confluence",
|
|
318
|
+
"write:remote-link-info:jira",
|
|
301
319
|
"write:remote-link:jira-software",
|
|
302
320
|
"write:request:jira-service-management",
|
|
303
321
|
"write:request.approval:jira-service-management",
|
package/out/text/errors.d.ts
CHANGED
|
@@ -26,18 +26,26 @@ export declare const errors: {
|
|
|
26
26
|
duplicateKeyFound: (key: string) => string;
|
|
27
27
|
wrongFunctionReference: (module: string, functionKey: string) => string;
|
|
28
28
|
wrongResourceReference: (module: string, resourceKey: string) => string;
|
|
29
|
+
singleEntryOfTheModule: (moduleType: string) => string;
|
|
29
30
|
displayConditions: {
|
|
30
31
|
overcomplicated: (moduleKey: string) => string;
|
|
31
32
|
invalid: (moduleKey: string) => string;
|
|
32
33
|
propertyNotAllowed: (moduleKey: string, propertyName: string) => string;
|
|
33
34
|
typeMismatch: (moduleKey: string, propertyName: string, errorDetails: string) => string;
|
|
34
35
|
};
|
|
35
|
-
|
|
36
|
+
confluence: {
|
|
37
|
+
multipleProperty: (property: string, moduleKey: string, keys: string[]) => string;
|
|
38
|
+
propertyUniquenessValidator: (property: string, moduleKey: string, keys: string[]) => string;
|
|
39
|
+
};
|
|
40
|
+
jiraWorkflowValidator: {
|
|
36
41
|
missingProperty: (key: string) => string;
|
|
37
42
|
invalidProperty: (key: string) => string;
|
|
38
43
|
};
|
|
39
|
-
|
|
40
|
-
|
|
44
|
+
jiraWorkflowCondition: {
|
|
45
|
+
missingExpression: (key: string) => string;
|
|
46
|
+
};
|
|
47
|
+
jiraEntityProperty: {
|
|
48
|
+
maxExtractionsPerApp: (limit: number) => string;
|
|
41
49
|
};
|
|
42
50
|
customFields: {
|
|
43
51
|
searchAlias: (aliases: 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,KAAG,MAAM;6BACpB,MAAM;+BACJ,MAAM;iCACF,MAAM,KAAG,MAAM;yCACP,MAAM,eAAe,MAAM,KAAG,MAAM;yCAEpC,MAAM,eAAe,MAAM,KAAG,MAAM;;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/text/errors.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM;8BACS,M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Q/B,MAAM,OAAO,MAAM,KAAG,MAAM;iCAE9B,MAAM,OAAO,MAAM,KAAG,MAAM;oCAEzB,MAAM,OAAO,MAAM,KAAG,MAAM;gDAEhB,MAAM,KAAG,MAAM;uCAExB,MAAM,KAAG,MAAM;;;;;;;;kCAQpB,MAAM,UAAU,MAAM,KAAG,MAAM;gCAEjC,MAAM,KAAG,MAAM;2CAEJ,MAAM,eAAe,MAAM,KAAG,MAAM;;;uCAI1C,MAAM;uCAEJ,MAAM,KAAG,MAAM;qCAEnB,MAAM;;CAGpC,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,mBAAmB,0BAA0B;IAC7C,SAAS,4BAA4B;IACrC,SAAS,4BAA4B;IACrC,UAAU,wBAAwB;IAClC,GAAG,8BAA8B;CAClC"}
|
package/out/text/errors.js
CHANGED
|
@@ -38,18 +38,26 @@ exports.errors = {
|
|
|
38
38
|
duplicateKeyFound: (key) => `found duplicate module key '${key}'`,
|
|
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
|
+
singleEntryOfTheModule: (moduleType) => `Only a single entry of the ${moduleType} module can be defined in the manifest`,
|
|
41
42
|
displayConditions: {
|
|
42
43
|
overcomplicated: (moduleKey) => `Nesting of display conditions of the "${moduleKey}" module exceeds 10 levels.`,
|
|
43
44
|
invalid: (moduleKey) => `Display conditions of the "${moduleKey}" module are invalid.`,
|
|
44
45
|
propertyNotAllowed: (moduleKey, propertyName) => `Display conditions of the "${moduleKey}" module are invalid. "${propertyName}" property is not allowed.`,
|
|
45
46
|
typeMismatch: (moduleKey, propertyName, errorDetails) => `Display conditions of the "${moduleKey}" module are invalid. "${propertyName}" property ${errorDetails}.`
|
|
46
47
|
},
|
|
47
|
-
|
|
48
|
+
confluence: {
|
|
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(', ')}`
|
|
51
|
+
},
|
|
52
|
+
jiraWorkflowValidator: {
|
|
48
53
|
missingProperty: (key) => `${types_1.AllModuleTypes.JiraWorkflowValidator} module '${key}' must have either a function or expression.`,
|
|
49
54
|
invalidProperty: (key) => `${types_1.AllModuleTypes.JiraWorkflowValidator} module '${key}' can only have either a function or expression`
|
|
50
55
|
},
|
|
51
|
-
|
|
52
|
-
|
|
56
|
+
jiraWorkflowCondition: {
|
|
57
|
+
missingExpression: (key) => `${types_1.AllModuleTypes.JiraWorkflowCondition} module '${key}' must have a non-blank expression.`
|
|
58
|
+
},
|
|
59
|
+
jiraEntityProperty: {
|
|
60
|
+
maxExtractionsPerApp: (limit) => `All ${types_1.AllModuleTypes.JiraEntityProperty} modules combined cannot declare more than ${limit} values.`
|
|
53
61
|
},
|
|
54
62
|
customFields: {
|
|
55
63
|
searchAlias: (aliases) => `Search alias should be always unique per field. Found duplicates: ${aliases.join(', ')}.`
|
|
@@ -13,11 +13,14 @@ export declare enum AllModuleTypes {
|
|
|
13
13
|
ConfluenceHomepageFeed = "confluence:homepageFeed",
|
|
14
14
|
ConfluenceSpacePage = "confluence:spacePage",
|
|
15
15
|
ConfluenceSpaceSettings = "confluence:spaceSettings",
|
|
16
|
+
JiraEntityProperty = "jira:entityProperty",
|
|
16
17
|
JiraWorkflowValidator = "jira:workflowValidator",
|
|
18
|
+
JiraWorkflowCondition = "jira:workflowCondition",
|
|
17
19
|
JiraCustomField = "jira:customField",
|
|
18
20
|
JiraCustomFieldType = "jira:customFieldType",
|
|
19
21
|
JiraIssueAction = "jira:issueAction",
|
|
20
22
|
JiraIssueActivity = "jira:issueActivity",
|
|
23
|
+
JiraIssueAdjustment = "jira:issueAdjustment",
|
|
21
24
|
JiraIssueGlance = "jira:issueGlance",
|
|
22
25
|
JiraIssuePanel = "jira:issuePanel",
|
|
23
26
|
JiraAdminPage = "jira:adminPage",
|
|
@@ -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,wBAAwB,8BAA8B;IACtD,oBAAoB,0BAA0B;IAC9C,sBAAsB,4BAA4B;IAClD,mBAAmB,yBAAyB;IAC5C,uBAAuB,6BAA6B;IACpD,qBAAqB,2BAA2B;IAChD,eAAe,qBAAqB;IACpC,mBAAmB,yBAAyB;IAC5C,eAAe,qBAAqB;IACpC,iBAAiB,uBAAuB;IACxC,eAAe,qBAAqB;IACpC,cAAc,oBAAoB;IAClC,aAAa,mBAAmB;IAChC,eAAe,qBAAqB;IACpC,uBAAuB,6BAA6B;IACpD,cAAc,oBAAoB;IAClC,mBAAmB,yBAAyB;IAC5C,gBAAgB,sBAAsB;IACtC,oBAAoB,0BAA0B;IAC9C,iBAAiB,uBAAuB;IACxC,eAAe,qBAAqB;IAEpC,8BAA8B,oCAAoC;IAClE,wCAAwC,8CAA8C;IACtF,6CAA6C,mDAAmD;IAChG,sCAAsC,4CAA4C;IAClF,iCAAiC,uCAAuC;IACxE,oCAAoC,0CAA0C;IAC9E,iCAAiC,uCAAuC;IACxE,uCAAuC,6CAA6C;IAEpF,qBAAqB,4BAA4B;IACjD,gCAAgC,uCAAuC;IACvE,uBA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epageFeed"] = "confluence:homepageFeed";
|
|
18
18
|
AllModuleTypes["ConfluenceSpacePage"] = "confluence:spacePage";
|
|
19
19
|
AllModuleTypes["ConfluenceSpaceSettings"] = "confluence:spaceSettings";
|
|
20
|
+
AllModuleTypes["JiraEntityProperty"] = "jira:entityProperty";
|
|
20
21
|
AllModuleTypes["JiraWorkflowValidator"] = "jira:workflowValidator";
|
|
22
|
+
AllModuleTypes["JiraWorkflowCondition"] = "jira:workflowCondition";
|
|
21
23
|
AllModuleTypes["JiraCustomField"] = "jira:customField";
|
|
22
24
|
AllModuleTypes["JiraCustomFieldType"] = "jira:customFieldType";
|
|
23
25
|
AllModuleTypes["JiraIssueAction"] = "jira:issueAction";
|
|
24
26
|
AllModuleTypes["JiraIssueActivity"] = "jira:issueActivity";
|
|
27
|
+
AllModuleTypes["JiraIssueAdjustment"] = "jira:issueAdjustment";
|
|
25
28
|
AllModuleTypes["JiraIssueGlance"] = "jira:issueGlance";
|
|
26
29
|
AllModuleTypes["JiraIssuePanel"] = "jira:issuePanel";
|
|
27
30
|
AllModuleTypes["JiraAdminPage"] = "jira:adminPage";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ValidatorInterface } from './validator-interface';
|
|
2
|
+
import { ManifestObject, ManifestValidationResult } from '../types';
|
|
3
|
+
export declare class EntityPropertyValidator<T> implements ValidatorInterface<ManifestObject<T> | undefined, T> {
|
|
4
|
+
validate(manifest: ManifestObject<T> | undefined): ManifestValidationResult<T>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=entity-property-validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-property-validator.d.ts","sourceRoot":"","sources":["../../src/validators/entity-property-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAkB,cAAc,EAAE,wBAAwB,EAAmB,MAAM,UAAU,CAAC;AASrG,qBAAa,uBAAuB,CAAC,CAAC,CAAE,YAAW,kBAAkB,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE,CAAC,CAAC;IACrG,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,wBAAwB,CAAC,CAAC,CAAC;CAoC/E"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EntityPropertyValidator = void 0;
|
|
4
|
+
const types_1 = require("../types");
|
|
5
|
+
const text_1 = require("../text");
|
|
6
|
+
const utils_1 = require("../utils");
|
|
7
|
+
const isManifestWithModules = (manifest) => {
|
|
8
|
+
var _a;
|
|
9
|
+
return !!((_a = manifest === null || manifest === void 0 ? void 0 : manifest.typedContent) === null || _a === void 0 ? void 0 : _a['modules']);
|
|
10
|
+
};
|
|
11
|
+
class EntityPropertyValidator {
|
|
12
|
+
validate(manifest) {
|
|
13
|
+
var _a;
|
|
14
|
+
if (!(manifest === null || manifest === void 0 ? void 0 : manifest.typedContent)) {
|
|
15
|
+
return {
|
|
16
|
+
success: false,
|
|
17
|
+
manifestObject: manifest
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
const validationErrors = [];
|
|
21
|
+
if (isManifestWithModules(manifest)) {
|
|
22
|
+
const { yamlContentByLine, typedContent: { modules } } = manifest;
|
|
23
|
+
const appValuesLength = ((_a = modules[types_1.AllModuleTypes.JiraEntityProperty]) === null || _a === void 0 ? void 0 : _a.reduce((acc, module) => acc + module.values.length, 0)) || 0;
|
|
24
|
+
if (appValuesLength > 30) {
|
|
25
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.jiraEntityProperty.maxExtractionsPerApp(30), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition('app', yamlContentByLine)));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
success: validationErrors.length === 0,
|
|
30
|
+
manifestObject: manifest,
|
|
31
|
+
errors: validationErrors
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.EntityPropertyValidator = EntityPropertyValidator;
|
|
@@ -11,4 +11,5 @@ export * from './providers-validator';
|
|
|
11
11
|
export * from './permissions-validator';
|
|
12
12
|
export * from './connect-remote-validator';
|
|
13
13
|
export * from './connect-authentication-validator';
|
|
14
|
+
export * from './entity-property-validator';
|
|
14
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validators/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validators/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC"}
|
package/out/validators/index.js
CHANGED
|
@@ -14,3 +14,4 @@ tslib_1.__exportStar(require("./providers-validator"), exports);
|
|
|
14
14
|
tslib_1.__exportStar(require("./permissions-validator"), exports);
|
|
15
15
|
tslib_1.__exportStar(require("./connect-remote-validator"), exports);
|
|
16
16
|
tslib_1.__exportStar(require("./connect-authentication-validator"), exports);
|
|
17
|
+
tslib_1.__exportStar(require("./entity-property-validator"), exports);
|
|
@@ -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;AAM3D,qBAAa,gBACX,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;IACzF,OAAO,CAAC,oBAAoB,CAA0C;IAEtE,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,GAAG,wBAAwB,CAAC,cAAc,CAAC;CA6OzG"}
|
|
@@ -6,13 +6,14 @@ const utils_1 = require("../utils");
|
|
|
6
6
|
const text_1 = require("../text");
|
|
7
7
|
const fs_1 = require("fs");
|
|
8
8
|
const path_1 = require("path");
|
|
9
|
-
const
|
|
9
|
+
const issue_adjustment_1 = require("./modules-validators/jira/issue-adjustment");
|
|
10
|
+
const confluence_1 = require("./modules-validators/confluence");
|
|
10
11
|
class ModulesValidator {
|
|
11
12
|
constructor() {
|
|
12
13
|
this.functionHandlerRegex = /^([a-zA-Z0-9-_]+)\.([a-zA-Z0-9-_]+)$/;
|
|
13
14
|
}
|
|
14
15
|
validate(manifest) {
|
|
15
|
-
var _a;
|
|
16
|
+
var _a, _b;
|
|
16
17
|
if (!manifest || !manifest.typedContent || !manifest.filePath) {
|
|
17
18
|
return {
|
|
18
19
|
success: false,
|
|
@@ -49,7 +50,7 @@ class ModulesValidator {
|
|
|
49
50
|
validModules.forEach((moduleKey) => {
|
|
50
51
|
var _a;
|
|
51
52
|
(_a = modules[moduleKey]) === null || _a === void 0 ? void 0 : _a.forEach((module) => {
|
|
52
|
-
|
|
53
|
+
utils_1.findInvalidFunctionReferences(module, _function).forEach((functionKey) => {
|
|
53
54
|
validationErrors.push(Object.assign({ message: text_1.errors.modules.wrongFunctionReference(moduleKey, functionKey), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition(moduleKey, yamlContentByLine)));
|
|
54
55
|
});
|
|
55
56
|
});
|
|
@@ -80,12 +81,18 @@ class ModulesValidator {
|
|
|
80
81
|
});
|
|
81
82
|
(_a = modules[types_1.AllModuleTypes.JiraWorkflowValidator]) === null || _a === void 0 ? void 0 : _a.forEach((module) => {
|
|
82
83
|
if (!module.expression && !module.function) {
|
|
83
|
-
validationErrors.push(Object.assign({ message: text_1.errors.modules.
|
|
84
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.jiraWorkflowValidator.missingProperty(module.key), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition(module.key, yamlContentByLine)));
|
|
84
85
|
}
|
|
85
86
|
if (module.expression && module.function) {
|
|
86
|
-
validationErrors.push(Object.assign({ message: text_1.errors.modules.
|
|
87
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.jiraWorkflowValidator.invalidProperty(module.key), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition(module.key, yamlContentByLine)));
|
|
87
88
|
}
|
|
88
89
|
});
|
|
90
|
+
(_b = modules[types_1.AllModuleTypes.JiraWorkflowCondition]) === null || _b === void 0 ? void 0 : _b.forEach((module) => {
|
|
91
|
+
if (!(module.expression && module.expression.trim())) {
|
|
92
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.jiraWorkflowCondition.missingExpression(module.key), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition(module.key, yamlContentByLine)));
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
validationErrors.push(...issue_adjustment_1.validateIssueAdjustmentModule(modules, yamlContentByLine));
|
|
89
96
|
[
|
|
90
97
|
types_1.AllModuleTypes.JiraAdminPage,
|
|
91
98
|
types_1.AllModuleTypes.JiraProjectPage,
|
|
@@ -94,7 +101,7 @@ class ModulesValidator {
|
|
|
94
101
|
].forEach((moduleType) => {
|
|
95
102
|
const moduleArray = modules[moduleType];
|
|
96
103
|
if (moduleArray && moduleArray.length > 1) {
|
|
97
|
-
validationErrors.push(Object.assign({ message: text_1.errors.modules.
|
|
104
|
+
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)));
|
|
98
105
|
}
|
|
99
106
|
if (moduleArray && moduleArray.length === 1) {
|
|
100
107
|
const module = moduleArray[0];
|
|
@@ -122,6 +129,7 @@ class ModulesValidator {
|
|
|
122
129
|
}
|
|
123
130
|
});
|
|
124
131
|
});
|
|
132
|
+
validationErrors.push(...confluence_1.validateConfluenceModules(modules, yamlContentByLine));
|
|
125
133
|
}
|
|
126
134
|
return {
|
|
127
135
|
success: validationErrors.length === 0,
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Modules } from '../../../schema/manifest';
|
|
2
|
+
import { ValidationError } from '../../../types';
|
|
3
|
+
export declare const validateConfluenceModules: (modules: Modules, yamlContentByLine?: string[] | undefined) => ValidationError[];
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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;AAQjE,eAAO,MAAM,yBAAyB,YAAa,OAAO,+CAAiC,eAAe,EAkBzG,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateConfluenceModules = void 0;
|
|
4
|
+
const types_1 = require("../../../types");
|
|
5
|
+
const validateSingleProperty_1 = require("./validateSingleProperty");
|
|
6
|
+
const validatePropertyUniqueness_1 = require("./validatePropertyUniqueness");
|
|
7
|
+
const ROUTE = 'route';
|
|
8
|
+
const USE_AS_CONFIG = 'useAsConfig';
|
|
9
|
+
const USE_AS_GET_STARTED = 'useAsGetStarted';
|
|
10
|
+
exports.validateConfluenceModules = (modules, yamlContentByLine) => {
|
|
11
|
+
const validationErrors = [];
|
|
12
|
+
[
|
|
13
|
+
types_1.AllModuleTypes.ConfluenceSpaceSettings,
|
|
14
|
+
types_1.AllModuleTypes.ConfluenceGlobalPage,
|
|
15
|
+
types_1.AllModuleTypes.ConfluenceSpacePage
|
|
16
|
+
].forEach((moduleType) => {
|
|
17
|
+
validationErrors.push(...validatePropertyUniqueness_1.validatePropertyUniqueness(modules, moduleType, ROUTE, yamlContentByLine));
|
|
18
|
+
});
|
|
19
|
+
validationErrors.push(...validateSingleProperty_1.validateSingleProperty(modules, types_1.AllModuleTypes.ConfluenceGlobalSettings, USE_AS_CONFIG, yamlContentByLine));
|
|
20
|
+
validationErrors.push(...validateSingleProperty_1.validateSingleProperty(modules, types_1.AllModuleTypes.ConfluenceGlobalSettings, USE_AS_GET_STARTED, yamlContentByLine));
|
|
21
|
+
return validationErrors;
|
|
22
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AllModuleTypes, ValidationError } from '../../../types';
|
|
2
|
+
import { Modules } from '../../../schema/manifest';
|
|
3
|
+
export declare const validatePropertyUniqueness: (allModules: Modules, moduleType: AllModuleTypes, property: string, yamlContentByLine?: string[] | undefined) => ValidationError[];
|
|
4
|
+
//# sourceMappingURL=validatePropertyUniqueness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validatePropertyUniqueness.d.ts","sourceRoot":"","sources":["../../../../src/validators/modules-validators/confluence/validatePropertyUniqueness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAEnD,eAAO,MAAM,0BAA0B,eACzB,OAAO,cACP,cAAc,YAChB,MAAM,+CAEf,eAAe,EAqBjB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validatePropertyUniqueness = void 0;
|
|
4
|
+
const text_1 = require("../../../text");
|
|
5
|
+
const utils_1 = require("../../../utils");
|
|
6
|
+
exports.validatePropertyUniqueness = (allModules, moduleType, property, yamlContentByLine) => {
|
|
7
|
+
var _a;
|
|
8
|
+
const validationErrors = [];
|
|
9
|
+
const modules = allModules[moduleType] || [];
|
|
10
|
+
const allPropertyValues = modules.map((module) => module[property]).filter((property) => property);
|
|
11
|
+
const duplicatePropertyValues = allPropertyValues.filter((property, index, all) => all.indexOf(property) !== index);
|
|
12
|
+
if (duplicatePropertyValues.length > 0) {
|
|
13
|
+
const allModulesWithDuplicatedPropertyValues = modules.filter((module) => module[property] === duplicatePropertyValues[0]);
|
|
14
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.confluence.propertyUniquenessValidator(property, moduleType, duplicatePropertyValues), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition((_a = allModulesWithDuplicatedPropertyValues === null || allModulesWithDuplicatedPropertyValues === void 0 ? void 0 : allModulesWithDuplicatedPropertyValues[0]) === null || _a === void 0 ? void 0 : _a.key, yamlContentByLine)));
|
|
15
|
+
}
|
|
16
|
+
return validationErrors;
|
|
17
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AllModuleTypes, ValidationError } from '../../../types';
|
|
2
|
+
import { Modules } from '../../../schema/manifest';
|
|
3
|
+
export declare const validateSingleProperty: (allModules: Modules, moduleType: AllModuleTypes, property: string, yamlContentByLine?: string[] | undefined) => ValidationError[];
|
|
4
|
+
//# sourceMappingURL=validateSingleProperty.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateSingleProperty.d.ts","sourceRoot":"","sources":["../../../../src/validators/modules-validators/confluence/validateSingleProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAEnD,eAAO,MAAM,sBAAsB,eACrB,OAAO,cACP,cAAc,YAChB,MAAM,+CAEf,eAAe,EAgBjB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateSingleProperty = void 0;
|
|
4
|
+
const text_1 = require("../../../text");
|
|
5
|
+
const utils_1 = require("../../../utils");
|
|
6
|
+
exports.validateSingleProperty = (allModules, moduleType, property, yamlContentByLine) => {
|
|
7
|
+
const validationErrors = [];
|
|
8
|
+
const modules = allModules[moduleType] || [];
|
|
9
|
+
const modulesWithProperty = modules.filter((module) => module[property]);
|
|
10
|
+
if (modulesWithProperty.length > 1) {
|
|
11
|
+
const moduleKeys = modulesWithProperty.map((module) => module.key);
|
|
12
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.confluence.multipleProperty(property, moduleType, moduleKeys), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition(moduleKeys[moduleKeys.length - 1], yamlContentByLine)));
|
|
13
|
+
}
|
|
14
|
+
return validationErrors;
|
|
15
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ValidationError } from '../../../types';
|
|
2
|
+
import { Modules } from '../../../schema/manifest';
|
|
3
|
+
export declare function validateIssueAdjustmentModule(modules: Modules, yamlContentByLine?: string[]): ValidationError[];
|
|
4
|
+
//# sourceMappingURL=issue-adjustment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issue-adjustment.d.ts","sourceRoot":"","sources":["../../../../src/validators/modules-validators/jira/issue-adjustment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAEnD,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,OAAO,EAAE,iBAAiB,CAAC,EAAE,MAAM,EAAE,GAAG,eAAe,EAAE,CAe/G"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateIssueAdjustmentModule = void 0;
|
|
4
|
+
const types_1 = require("../../../types");
|
|
5
|
+
const text_1 = require("../../../text");
|
|
6
|
+
const utils_1 = require("../../../utils");
|
|
7
|
+
function validateIssueAdjustmentModule(modules, yamlContentByLine) {
|
|
8
|
+
const validationErrors = [];
|
|
9
|
+
const moduleType = types_1.AllModuleTypes.JiraIssueAdjustment;
|
|
10
|
+
const moduleArray = modules[moduleType];
|
|
11
|
+
if (moduleArray && moduleArray.length > 1) {
|
|
12
|
+
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)));
|
|
13
|
+
}
|
|
14
|
+
return validationErrors;
|
|
15
|
+
}
|
|
16
|
+
exports.validateIssueAdjustmentModule = validateIssueAdjustmentModule;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ManifestObject, ManifestValidationResult } from '../types';
|
|
2
|
-
import { ManifestSchema } from '../schema/manifest';
|
|
2
|
+
import type { ManifestSchema } from '../schema/manifest';
|
|
3
3
|
import { ValidatorInterface } from './validator-interface';
|
|
4
4
|
export declare class ProvidersValidator implements ValidatorInterface<ManifestObject<ManifestSchema> | undefined, ManifestSchema> {
|
|
5
5
|
validate(manifest: ManifestObject<ManifestSchema> | undefined): ManifestValidationResult<ManifestSchema>;
|
|
6
|
+
private isActionValidRemote;
|
|
6
7
|
private isValidProfileRetrieverFunction;
|
|
7
8
|
}
|
|
8
9
|
//# sourceMappingURL=providers-validator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers-validator.d.ts","sourceRoot":"","sources":["../../src/validators/providers-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAmB,MAAM,UAAU,CAAC;AAGrF,OAAO,
|
|
1
|
+
{"version":3,"file":"providers-validator.d.ts","sourceRoot":"","sources":["../../src/validators/providers-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAmB,MAAM,UAAU,CAAC;AAGrF,OAAO,KAAK,EAGV,cAAc,EAGf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,qBAAa,kBACX,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;IACzF,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,GAAG,wBAAwB,CAAC,cAAc,CAAC;IA0ExG,OAAO,CAAC,mBAAmB;IAiB3B,OAAO,CAAC,+BAA+B;CAiBxC"}
|
|
@@ -36,15 +36,13 @@ class ProvidersValidator {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
|
-
auth === null || auth === void 0 ? void 0 : auth.forEach((provider) => {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
});
|
|
47
|
-
}
|
|
39
|
+
auth === null || auth === void 0 ? void 0 : auth.filter((provider) => 'actions' in provider).forEach((provider) => {
|
|
40
|
+
Object.values(provider.actions).forEach((action) => {
|
|
41
|
+
const message = action && this.isActionValidRemote(provider, action, manifest, remotes);
|
|
42
|
+
if (message) {
|
|
43
|
+
validationErrors.push(message);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
48
46
|
});
|
|
49
47
|
auth === null || auth === void 0 ? void 0 : auth.forEach((provider) => {
|
|
50
48
|
const message = this.isValidProfileRetrieverFunction(provider, manifest);
|
|
@@ -57,6 +55,12 @@ class ProvidersValidator {
|
|
|
57
55
|
errors: validationErrors
|
|
58
56
|
};
|
|
59
57
|
}
|
|
58
|
+
isActionValidRemote(provider, action, manifest, remotes) {
|
|
59
|
+
const remote = remotes === null || remotes === void 0 ? void 0 : remotes.find((item) => item.key === (action === null || action === void 0 ? void 0 : action.remote));
|
|
60
|
+
if (action && !remote) {
|
|
61
|
+
return Object.assign({ message: text_1.errors.providers.missingRemote(provider.key, action.remote), reference: text_1.References.Providers, level: 'error' }, utils_1.findPosition(action.remote, manifest.yamlContentByLine));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
60
64
|
isValidProfileRetrieverFunction(provider, manifest) {
|
|
61
65
|
var _a, _b, _c;
|
|
62
66
|
if ('actions' in provider && 'function' in provider.actions.retrieveProfile) {
|