@forge/manifest 4.4.0 → 4.4.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 +12 -0
- package/out/index.d.ts.map +1 -1
- package/out/index.js +2 -1
- package/out/mapping/product-event-to-scope-mapping.json +160 -0
- package/out/text/errors.d.ts +1 -1
- package/out/text/errors.d.ts.map +1 -1
- package/out/text/errors.js +2 -2
- package/out/utils/get-all-modules.js +2 -1
- package/out/utils/line-finder.d.ts +1 -1
- package/out/utils/line-finder.d.ts.map +1 -1
- package/out/utils/line-finder.js +2 -1
- package/out/utils/module-key-cleaner.d.ts +1 -1
- package/out/utils/module-key-cleaner.d.ts.map +1 -1
- package/out/utils/module-key-cleaner.js +4 -2
- package/out/utils/module-references.d.ts +2 -2
- package/out/utils/module-references.d.ts.map +1 -1
- package/out/utils/module-references.js +4 -2
- package/out/validators/connect-authentication-validator.js +1 -1
- package/out/validators/connect-modules-validator.js +3 -3
- package/out/validators/connect-remote-validator.js +4 -3
- package/out/validators/entity-property-validator.js +1 -1
- package/out/validators/modules-validator.js +21 -21
- package/out/validators/modules-validators/confluence/index.d.ts +1 -1
- package/out/validators/modules-validators/confluence/index.d.ts.map +1 -1
- package/out/validators/modules-validators/confluence/index.js +7 -6
- package/out/validators/modules-validators/confluence/validateCrossModulePropertyUniqueness.d.ts +1 -1
- package/out/validators/modules-validators/confluence/validateCrossModulePropertyUniqueness.d.ts.map +1 -1
- package/out/validators/modules-validators/confluence/validateCrossModulePropertyUniqueness.js +6 -5
- package/out/validators/modules-validators/confluence/validateCustomContentHierarchy.d.ts +1 -1
- package/out/validators/modules-validators/confluence/validateCustomContentHierarchy.d.ts.map +1 -1
- package/out/validators/modules-validators/confluence/validateCustomContentHierarchy.js +4 -3
- package/out/validators/modules-validators/confluence/validateKeyboardShortcuts.d.ts +1 -1
- package/out/validators/modules-validators/confluence/validateKeyboardShortcuts.d.ts.map +1 -1
- package/out/validators/modules-validators/confluence/validateKeyboardShortcuts.js +4 -3
- package/out/validators/modules-validators/confluence/validatePropertyUniqueness.d.ts +1 -1
- package/out/validators/modules-validators/confluence/validatePropertyUniqueness.d.ts.map +1 -1
- package/out/validators/modules-validators/confluence/validatePropertyUniqueness.js +3 -2
- package/out/validators/modules-validators/confluence/validateSingleProperty.d.ts +1 -1
- package/out/validators/modules-validators/confluence/validateSingleProperty.d.ts.map +1 -1
- package/out/validators/modules-validators/confluence/validateSingleProperty.js +3 -2
- package/out/validators/modules-validators/jira/ui-modifications.js +1 -1
- package/out/validators/modules-validators/jira/validate-full-admin-page.d.ts +1 -1
- package/out/validators/modules-validators/jira/validate-full-admin-page.d.ts.map +1 -1
- package/out/validators/modules-validators/jira/validate-full-admin-page.js +5 -4
- package/out/validators/modules-validators/jira/validate-subpages-in-module.d.ts +1 -1
- package/out/validators/modules-validators/jira/validate-subpages-in-module.d.ts.map +1 -1
- package/out/validators/modules-validators/jira/validate-subpages-in-module.js +4 -3
- package/out/validators/permissions-validator.js +1 -1
- package/out/validators/product-trigger-scopes-validator.js +2 -2
- package/out/validators/providers-validator.js +4 -4
- package/out/validators/resources-validator.js +15 -15
- package/out/validators/schema-validator.js +3 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @forge/manifest
|
|
2
2
|
|
|
3
|
+
## 4.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 138bb0a: Add scope mappings for Confluence comment and attachment events
|
|
8
|
+
|
|
9
|
+
## 4.4.1-next.0
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 138bb0a: Add scope mappings for Confluence comment and attachment events
|
|
14
|
+
|
|
3
15
|
## 4.4.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/out/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAmB,MAAM,SAAS,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9D,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAEzG,eAAO,MAAM,QAAQ,+BAET,MAAM,GAAG,SAAS,KAC3B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAmB,MAAM,SAAS,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9D,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAEzG,eAAO,MAAM,QAAQ,+BAET,MAAM,GAAG,SAAS,KAC3B,QAAQ,yBAAyB,cAAc,GAAG,mBAAmB,CAAC,CAInD,CAAC"}
|
package/out/index.js
CHANGED
|
@@ -11,7 +11,8 @@ tslib_1.__exportStar(require("./text"), exports);
|
|
|
11
11
|
tslib_1.__exportStar(require("./types"), exports);
|
|
12
12
|
tslib_1.__exportStar(require("./utils"), exports);
|
|
13
13
|
tslib_1.__exportStar(require("./validators"), exports);
|
|
14
|
-
|
|
14
|
+
const validate = (basic = false, manifest = undefined) => builder_1.ProcessorBuilder.instance()
|
|
15
15
|
.withValidation(basic ? types_1.ValidationTypes.BASIC : types_1.ValidationTypes.FULL)
|
|
16
16
|
.build()
|
|
17
17
|
.process(manifest);
|
|
18
|
+
exports.validate = validate;
|
|
@@ -493,6 +493,166 @@
|
|
|
493
493
|
]
|
|
494
494
|
}
|
|
495
495
|
},
|
|
496
|
+
{
|
|
497
|
+
"productEvent": "avi:confluence:updated:comment",
|
|
498
|
+
"oAuthScopes": {
|
|
499
|
+
"beta": [
|
|
500
|
+
"read:comment:confluence",
|
|
501
|
+
"read:page:confluence",
|
|
502
|
+
"read:blogpost:confluence",
|
|
503
|
+
"read:space:confluence",
|
|
504
|
+
"read:user:confluence",
|
|
505
|
+
"read:content.metadata:confluence"
|
|
506
|
+
],
|
|
507
|
+
"current": [
|
|
508
|
+
"read:confluence-content.summary"
|
|
509
|
+
]
|
|
510
|
+
}
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
"productEvent": "avi:confluence:removed:comment",
|
|
514
|
+
"oAuthScopes": {
|
|
515
|
+
"beta": [
|
|
516
|
+
"read:comment:confluence",
|
|
517
|
+
"read:page:confluence",
|
|
518
|
+
"read:blogpost:confluence",
|
|
519
|
+
"read:space:confluence",
|
|
520
|
+
"read:user:confluence",
|
|
521
|
+
"read:content.metadata:confluence"
|
|
522
|
+
],
|
|
523
|
+
"current": [
|
|
524
|
+
"read:confluence-content.summary"
|
|
525
|
+
]
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"productEvent": "avi:confluence:archived:attachment",
|
|
530
|
+
"oAuthScopes": {
|
|
531
|
+
"beta": [
|
|
532
|
+
"read:attachment:confluence",
|
|
533
|
+
"read:page:confluence",
|
|
534
|
+
"read:blogpost:confluence",
|
|
535
|
+
"read:space:confluence",
|
|
536
|
+
"read:user:confluence",
|
|
537
|
+
"read:content.metadata:confluence"
|
|
538
|
+
],
|
|
539
|
+
"current": [
|
|
540
|
+
"read:confluence-content.summary"
|
|
541
|
+
]
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
"productEvent": "avi:confluence:created:attachment",
|
|
546
|
+
"oAuthScopes": {
|
|
547
|
+
"beta": [
|
|
548
|
+
"read:attachment:confluence",
|
|
549
|
+
"read:page:confluence",
|
|
550
|
+
"read:blogpost:confluence",
|
|
551
|
+
"read:space:confluence",
|
|
552
|
+
"read:user:confluence",
|
|
553
|
+
"read:content.metadata:confluence"
|
|
554
|
+
],
|
|
555
|
+
"current": [
|
|
556
|
+
"read:confluence-content.summary"
|
|
557
|
+
]
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
"productEvent": "avi:confluence:removed:attachment",
|
|
562
|
+
"oAuthScopes": {
|
|
563
|
+
"beta": [
|
|
564
|
+
"read:attachment:confluence",
|
|
565
|
+
"read:page:confluence",
|
|
566
|
+
"read:blogpost:confluence",
|
|
567
|
+
"read:space:confluence",
|
|
568
|
+
"read:user:confluence",
|
|
569
|
+
"read:content.metadata:confluence"
|
|
570
|
+
],
|
|
571
|
+
"current": [
|
|
572
|
+
"read:confluence-content.summary"
|
|
573
|
+
]
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
"productEvent": "avi:confluence:restored:attachment",
|
|
578
|
+
"oAuthScopes": {
|
|
579
|
+
"beta": [
|
|
580
|
+
"read:attachment:confluence",
|
|
581
|
+
"read:page:confluence",
|
|
582
|
+
"read:blogpost:confluence",
|
|
583
|
+
"read:space:confluence",
|
|
584
|
+
"read:user:confluence",
|
|
585
|
+
"read:content.metadata:confluence"
|
|
586
|
+
],
|
|
587
|
+
"current": [
|
|
588
|
+
"read:confluence-content.summary"
|
|
589
|
+
]
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
"productEvent": "avi:confluence:trashed:attachment",
|
|
594
|
+
"oAuthScopes": {
|
|
595
|
+
"beta": [
|
|
596
|
+
"read:attachment:confluence",
|
|
597
|
+
"read:page:confluence",
|
|
598
|
+
"read:blogpost:confluence",
|
|
599
|
+
"read:space:confluence",
|
|
600
|
+
"read:user:confluence",
|
|
601
|
+
"read:content.metadata:confluence"
|
|
602
|
+
],
|
|
603
|
+
"current": [
|
|
604
|
+
"read:confluence-content.summary"
|
|
605
|
+
]
|
|
606
|
+
}
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
"productEvent": "avi:confluence:unarchived:attachment",
|
|
610
|
+
"oAuthScopes": {
|
|
611
|
+
"beta": [
|
|
612
|
+
"read:attachment:confluence",
|
|
613
|
+
"read:page:confluence",
|
|
614
|
+
"read:blogpost:confluence",
|
|
615
|
+
"read:space:confluence",
|
|
616
|
+
"read:user:confluence",
|
|
617
|
+
"read:content.metadata:confluence"
|
|
618
|
+
],
|
|
619
|
+
"current": [
|
|
620
|
+
"read:confluence-content.summary"
|
|
621
|
+
]
|
|
622
|
+
}
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
"productEvent": "avi:confluence:updated:attachment",
|
|
626
|
+
"oAuthScopes": {
|
|
627
|
+
"beta": [
|
|
628
|
+
"read:attachment:confluence",
|
|
629
|
+
"read:page:confluence",
|
|
630
|
+
"read:blogpost:confluence",
|
|
631
|
+
"read:space:confluence",
|
|
632
|
+
"read:user:confluence",
|
|
633
|
+
"read:content.metadata:confluence"
|
|
634
|
+
],
|
|
635
|
+
"current": [
|
|
636
|
+
"read:confluence-content.summary"
|
|
637
|
+
]
|
|
638
|
+
}
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
"productEvent": "avi:confluence:viewed:attachment",
|
|
642
|
+
"oAuthScopes": {
|
|
643
|
+
"beta": [
|
|
644
|
+
"read:attachment:confluence",
|
|
645
|
+
"read:page:confluence",
|
|
646
|
+
"read:blogpost:confluence",
|
|
647
|
+
"read:space:confluence",
|
|
648
|
+
"read:user:confluence",
|
|
649
|
+
"read:content.metadata:confluence"
|
|
650
|
+
],
|
|
651
|
+
"current": [
|
|
652
|
+
"read:confluence-content.summary"
|
|
653
|
+
]
|
|
654
|
+
}
|
|
655
|
+
},
|
|
496
656
|
{
|
|
497
657
|
"productEvent": "avi:confluence:viewed:blogpost",
|
|
498
658
|
"oAuthScopes": {
|
package/out/text/errors.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare const errors: {
|
|
|
5
5
|
schema: {
|
|
6
6
|
oneOf: (props: string[][] | undefined) => string;
|
|
7
7
|
enumValues: (props: string[]) => string;
|
|
8
|
-
deprecatedValue: (section: string, field: string, additionalInfo?: string
|
|
8
|
+
deprecatedValue: (section: string, field: string, additionalInfo?: string) => string;
|
|
9
9
|
additionalProperties: (additionalProperty: string) => string;
|
|
10
10
|
};
|
|
11
11
|
permissions: {
|
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,
|
|
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,mBAAmB,MAAM,KAAG,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;6CAEhC,MAAM,KAAG,MAAM;0EAEc,MAAM,KAAG,MAAM;4DAE7B,MAAM,KAAG,MAAM;6DAEd,MAAM,KAAG,MAAM;;yCAGrC,MAAM,KAAG,MAAM;iCAEvB,MAAM,KAAG,MAAM;4CACJ,MAAM,gBAAgB,MAAM,KAAG,MAAM;sCAE3C,MAAM,gBAAgB,MAAM,gBAAgB,MAAM,KAAG,MAAM;;;yCAIxD,MAAM,aAAa,MAAM,QAAQ,MAAM,EAAE,KAAG,MAAM;2CAIhD,MAAM,aAAa,MAAM,QAAQ,MAAM,EAAE,KAAG,MAAM;sDAEvC,MAAM,QAAQ,MAAM,EAAE,KAAG,MAAM;8DAEvB,MAAM,aAAa,MAAM,cAAc,MAAM,KAAG,MAAM;6EAEvC,MAAM,qBAAqB,MAAM,KAAG,MAAM;yEAE9C,MAAM,qBAAqB,MAAM,KAAG,MAAM;;wCAG/E,MAAM;sDACU,MAAM,KAAG,MAAM;iDAEpB,MAAM,KAAG,MAAM;2DAEL,MAAM,KAAG,MAAM;0CAEhC,MAAM,OAAO,MAAM,KAAG,MAAM;yDAEb,MAAM,KAAG,MAAM;uEAED,MAAM,KAAG,MAAM;;;;mCAKjD,MAAM,KAAG,MAAM;mCAEf,MAAM,KAAG,MAAM;;;qCAIb,MAAM,KAAG,MAAM;;;0CAIV,MAAM,KAAG,MAAM;;;mCAItB,MAAM,EAAE,KAAG,MAAM;;;4DAIQ,MAAM,KAAG,MAAM;qCAEtC,MAAM,KAAG,MAAM;2CAET,MAAM,KAAG,MAAM;;;oCAGtB,MAAM,KAAG,MAAM;;oCAEjB,MAAM,SAAS,MAAM,KAAG,MAAM;qCAI7B,MAAM,YAAY,MAAM,KAAG,MAAM;;;;;mCAQ/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
|
@@ -86,8 +86,8 @@ exports.errors = {
|
|
|
86
86
|
function: {
|
|
87
87
|
invalidKeyLength: (key) => `The function key exceeds 23 characters: ‘${key}’.`,
|
|
88
88
|
handler: {
|
|
89
|
-
invalidRegex: (key, regex) => `${utils_1.cleanKey(types_1.AllModuleTypes.CoreFunction)} handler property '${key}' must be in format <module>.<function> (example: index.run).`,
|
|
90
|
-
fileNotExists: (key, fileName) => `${utils_1.cleanKey(types_1.AllModuleTypes.CoreFunction)} handler property '${key}' cannot find associated file with name '${fileName}.[jt](s|sx)'`
|
|
89
|
+
invalidRegex: (key, regex) => `${(0, utils_1.cleanKey)(types_1.AllModuleTypes.CoreFunction)} handler property '${key}' must be in format <module>.<function> (example: index.run).`,
|
|
90
|
+
fileNotExists: (key, fileName) => `${(0, utils_1.cleanKey)(types_1.AllModuleTypes.CoreFunction)} handler property '${key}' cannot find associated file with name '${fileName}.[jt](s|sx)'`
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
},
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getAllModules = void 0;
|
|
4
|
-
|
|
4
|
+
const getAllModules = (allModules) => Object.keys(allModules).reduce((acc, key) => acc.concat(...allModules[key]), []);
|
|
5
|
+
exports.getAllModules = getAllModules;
|
|
@@ -2,6 +2,6 @@ interface Position {
|
|
|
2
2
|
line: number;
|
|
3
3
|
column: number;
|
|
4
4
|
}
|
|
5
|
-
export declare const findPosition: (substring: string, contentByLine: string[] | undefined, section?: string
|
|
5
|
+
export declare const findPosition: (substring: string, contentByLine: string[] | undefined, section?: string) => Position;
|
|
6
6
|
export {};
|
|
7
7
|
//# sourceMappingURL=line-finder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line-finder.d.ts","sourceRoot":"","sources":["../../src/utils/line-finder.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAqBD,eAAO,MAAM,YAAY,cAAe,MAAM,iBAAiB,MAAM,EAAE,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"line-finder.d.ts","sourceRoot":"","sources":["../../src/utils/line-finder.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAqBD,eAAO,MAAM,YAAY,cAAe,MAAM,iBAAiB,MAAM,EAAE,GAAG,SAAS,YAAY,MAAM,KAAG,QA6BvG,CAAC"}
|
package/out/utils/line-finder.js
CHANGED
|
@@ -16,7 +16,7 @@ const locateTargetInLines = (target, lines) => {
|
|
|
16
16
|
}
|
|
17
17
|
return lineNumber;
|
|
18
18
|
};
|
|
19
|
-
|
|
19
|
+
const findPosition = (substring, contentByLine, section) => {
|
|
20
20
|
let lineNumber = 1;
|
|
21
21
|
let columnNumber = 0;
|
|
22
22
|
let sectionLineNumber = 0;
|
|
@@ -42,3 +42,4 @@ exports.findPosition = (substring, contentByLine, section) => {
|
|
|
42
42
|
column: columnNumber
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
|
+
exports.findPosition = findPosition;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Modules } from '../schema/manifest';
|
|
2
2
|
export declare const cleanKey: (key: string) => string;
|
|
3
|
-
export declare const getValidModules: (modules?: Modules
|
|
3
|
+
export declare const getValidModules: (modules?: Modules) => string[];
|
|
4
4
|
//# sourceMappingURL=module-key-cleaner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-key-cleaner.d.ts","sourceRoot":"","sources":["../../src/utils/module-key-cleaner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAG7C,eAAO,MAAM,QAAQ,QAAS,MAAM,KAAG,MAAyC,CAAC;AAEjF,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"module-key-cleaner.d.ts","sourceRoot":"","sources":["../../src/utils/module-key-cleaner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAG7C,eAAO,MAAM,QAAQ,QAAS,MAAM,KAAG,MAAyC,CAAC;AAEjF,eAAO,MAAM,eAAe,aAAc,OAAO,KAAG,MAAM,EACsD,CAAC"}
|
|
@@ -2,5 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getValidModules = exports.cleanKey = void 0;
|
|
4
4
|
const types_1 = require("../types");
|
|
5
|
-
|
|
6
|
-
exports.
|
|
5
|
+
const cleanKey = (key) => key.replace(/(core|xen):/g, '');
|
|
6
|
+
exports.cleanKey = cleanKey;
|
|
7
|
+
const getValidModules = (modules) => modules ? Object.keys(modules).filter((moduleKey) => moduleKey !== (0, exports.cleanKey)(types_1.AllModuleTypes.CoreFunction)) : [];
|
|
8
|
+
exports.getValidModules = getValidModules;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
interface FunctionOrResource {
|
|
2
2
|
key: string;
|
|
3
3
|
}
|
|
4
|
-
export declare const findInvalidFunctionReferences: (module: any, functions?: FunctionOrResource[]
|
|
5
|
-
export declare const findInvalidResourceReferences: (module: any, resources?: FunctionOrResource[]
|
|
4
|
+
export declare const findInvalidFunctionReferences: (module: any, functions?: FunctionOrResource[]) => string[];
|
|
5
|
+
export declare const findInvalidResourceReferences: (module: any, resources?: FunctionOrResource[]) => string[];
|
|
6
6
|
export {};
|
|
7
7
|
//# sourceMappingURL=module-references.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-references.d.ts","sourceRoot":"","sources":["../../src/utils/module-references.ts"],"names":[],"mappings":"AAAA,UAAU,kBAAkB;IAC1B,GAAG,EAAE,MAAM,CAAC;CACb;AAqBD,eAAO,MAAM,6BAA6B,WAAY,GAAG,
|
|
1
|
+
{"version":3,"file":"module-references.d.ts","sourceRoot":"","sources":["../../src/utils/module-references.ts"],"names":[],"mappings":"AAAA,UAAU,kBAAkB;IAC1B,GAAG,EAAE,MAAM,CAAC;CACb;AAqBD,eAAO,MAAM,6BAA6B,WAAY,GAAG,cAAc,kBAAkB,EAAE,aAClC,CAAC;AAC1D,eAAO,MAAM,6BAA6B,WAAY,GAAG,cAAc,kBAAkB,EAAE,aAClC,CAAC"}
|
|
@@ -12,5 +12,7 @@ const findInvalidReferenceKeys = (property, module, functionsOrResources) => {
|
|
|
12
12
|
Object.keys(module).forEach((key) => _checkFunctionKey(module[key][property]));
|
|
13
13
|
return invalidFunctions;
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
exports.
|
|
15
|
+
const findInvalidFunctionReferences = (module, functions) => findInvalidReferenceKeys('function', module, functions);
|
|
16
|
+
exports.findInvalidFunctionReferences = findInvalidFunctionReferences;
|
|
17
|
+
const findInvalidResourceReferences = (module, resources) => findInvalidReferenceKeys('resource', module, resources);
|
|
18
|
+
exports.findInvalidResourceReferences = findInvalidResourceReferences;
|
|
@@ -15,7 +15,7 @@ class ConnectAuthenticationValidator {
|
|
|
15
15
|
const app = manifest.typedContent.app;
|
|
16
16
|
const validationErrors = [];
|
|
17
17
|
if (!manifest.typedContent.connectModules && ((_b = app === null || app === void 0 ? void 0 : app.connect) === null || _b === void 0 ? void 0 : _b.authentication)) {
|
|
18
|
-
validationErrors.push(Object.assign({ message: text_1.errors.app.missingConnectModules(), reference: text_1.References.App, level: 'error' }, utils_1.findPosition('connect', manifest.yamlContentByLine)));
|
|
18
|
+
validationErrors.push(Object.assign({ message: text_1.errors.app.missingConnectModules(), reference: text_1.References.App, level: 'error' }, (0, utils_1.findPosition)('connect', manifest.yamlContentByLine)));
|
|
19
19
|
}
|
|
20
20
|
return {
|
|
21
21
|
success: validationErrors.length === 0,
|
|
@@ -20,20 +20,20 @@ class ConnectModulesValidator {
|
|
|
20
20
|
connectModuleNames
|
|
21
21
|
.filter((name) => !validconnectModuleNames.includes(name))
|
|
22
22
|
.forEach((invalidName) => {
|
|
23
|
-
validationErrors.push(Object.assign({ message: text_1.errors.connectModules.invalidConnectModule(invalidName), reference: text_1.References.ConnectModules, level: 'error' }, utils_1.findPosition(invalidName, yamlContentByLine, 'connectModules')));
|
|
23
|
+
validationErrors.push(Object.assign({ message: text_1.errors.connectModules.invalidConnectModule(invalidName), reference: text_1.References.ConnectModules, level: 'error' }, (0, utils_1.findPosition)(invalidName, yamlContentByLine, 'connectModules')));
|
|
24
24
|
});
|
|
25
25
|
const modules = connectModuleNames.map((moduleName) => connectModules[moduleName]);
|
|
26
26
|
const moduleKeys = [].concat(...modules).map((item) => item.key);
|
|
27
27
|
const duplicateKeys = [...new Set(moduleKeys.filter((item, index) => moduleKeys.indexOf(item) != index))];
|
|
28
28
|
duplicateKeys.forEach((duplicateKey) => {
|
|
29
|
-
validationErrors.push(Object.assign({ message: text_1.errors.connectModules.duplicateKeyFound(duplicateKey), reference: text_1.References.ConnectModules, level: 'error' }, utils_1.findPosition(duplicateKey, yamlContentByLine)));
|
|
29
|
+
validationErrors.push(Object.assign({ message: text_1.errors.connectModules.duplicateKeyFound(duplicateKey), reference: text_1.References.ConnectModules, level: 'error' }, (0, utils_1.findPosition)(duplicateKey, yamlContentByLine)));
|
|
30
30
|
});
|
|
31
31
|
const lifecycleModules = connectModuleNames.filter((m) => m.endsWith(':lifecycle'));
|
|
32
32
|
if (lifecycleModules) {
|
|
33
33
|
lifecycleModules.forEach((lifecycle) => {
|
|
34
34
|
const lifecycleModule = connectModules[lifecycle];
|
|
35
35
|
if (Array.isArray(lifecycleModule) && lifecycleModule.length > 1) {
|
|
36
|
-
validationErrors.push(Object.assign({ message: text_1.errors.connectModules.duplicatateLifecycleFound(lifecycle), reference: text_1.References.ConnectModules, level: 'error' }, utils_1.findPosition(lifecycle, yamlContentByLine)));
|
|
36
|
+
validationErrors.push(Object.assign({ message: text_1.errors.connectModules.duplicatateLifecycleFound(lifecycle), reference: text_1.References.ConnectModules, level: 'error' }, (0, utils_1.findPosition)(lifecycle, yamlContentByLine)));
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
39
|
}
|
|
@@ -15,11 +15,12 @@ class ConnectRemoteValidator {
|
|
|
15
15
|
const app = manifest.typedContent.app;
|
|
16
16
|
const validationErrors = [];
|
|
17
17
|
if (manifest.typedContent.connectModules && !((_b = app.connect) === null || _b === void 0 ? void 0 : _b.remote)) {
|
|
18
|
-
validationErrors.push(Object.assign({ message: text_1.errors.app.missingAppConnectRemote(), reference: text_1.References.App, level: 'error' }, utils_1.findPosition('connect', manifest.yamlContentByLine)));
|
|
18
|
+
validationErrors.push(Object.assign({ message: text_1.errors.app.missingAppConnectRemote(), reference: text_1.References.App, level: 'error' }, (0, utils_1.findPosition)('connect', manifest.yamlContentByLine)));
|
|
19
19
|
}
|
|
20
|
-
if (manifest.typedContent.connectModules &&
|
|
20
|
+
if (manifest.typedContent.connectModules &&
|
|
21
|
+
((_c = app === null || app === void 0 ? void 0 : app.connect) === null || _c === void 0 ? void 0 : _c.remote) &&
|
|
21
22
|
!((_d = manifest.typedContent.remotes) === null || _d === void 0 ? void 0 : _d.find((remote) => { var _a; return remote.key === ((_a = app === null || app === void 0 ? void 0 : app.connect) === null || _a === void 0 ? void 0 : _a.remote); }))) {
|
|
22
|
-
validationErrors.push(Object.assign({ message: text_1.errors.app.missingRemoteForConnect(((_e = app === null || app === void 0 ? void 0 : app.connect) === null || _e === void 0 ? void 0 : _e.remote) || 'undefined'), reference: text_1.References.App, level: 'error' }, utils_1.findPosition('connect', manifest.yamlContentByLine)));
|
|
23
|
+
validationErrors.push(Object.assign({ message: text_1.errors.app.missingRemoteForConnect(((_e = app === null || app === void 0 ? void 0 : app.connect) === null || _e === void 0 ? void 0 : _e.remote) || 'undefined'), reference: text_1.References.App, level: 'error' }, (0, utils_1.findPosition)('connect', manifest.yamlContentByLine)));
|
|
23
24
|
}
|
|
24
25
|
return {
|
|
25
26
|
success: validationErrors.length === 0,
|
|
@@ -22,7 +22,7 @@ class EntityPropertyValidator {
|
|
|
22
22
|
const { yamlContentByLine, typedContent: { modules } } = manifest;
|
|
23
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
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)));
|
|
25
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.jiraEntityProperty.maxExtractionsPerApp(30), reference: text_1.References.Modules, level: 'error' }, (0, utils_1.findPosition)('app', yamlContentByLine)));
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
return {
|
|
@@ -36,24 +36,24 @@ class ModulesValidator {
|
|
|
36
36
|
const { typedContent: { modules }, yamlContentByLine, filePath } = manifest;
|
|
37
37
|
const { function: _function } = modules;
|
|
38
38
|
Object.keys(manifest.typedContent.modules)
|
|
39
|
-
.filter((key) => !types_1.SUPPORTED_MODULES.map((key) => utils_1.cleanKey(key)).includes(key))
|
|
39
|
+
.filter((key) => !types_1.SUPPORTED_MODULES.map((key) => (0, utils_1.cleanKey)(key)).includes(key))
|
|
40
40
|
.forEach((invalidKey) => {
|
|
41
|
-
validationErrors.push(Object.assign({ message: text_1.errors.modules.invalidModule(invalidKey), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition(invalidKey, yamlContentByLine)));
|
|
41
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.invalidModule(invalidKey), reference: text_1.References.Modules, level: 'error' }, (0, utils_1.findPosition)(invalidKey, yamlContentByLine)));
|
|
42
42
|
});
|
|
43
43
|
_function === null || _function === void 0 ? void 0 : _function.forEach((f) => {
|
|
44
44
|
if (f.key.length > 23) {
|
|
45
|
-
validationErrors.push(Object.assign({ message: text_1.errors.modules.function.invalidKeyLength(f.key), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition(f.key, yamlContentByLine)));
|
|
45
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.function.invalidKeyLength(f.key), reference: text_1.References.Modules, level: 'error' }, (0, utils_1.findPosition)(f.key, yamlContentByLine)));
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
|
-
if (Object.keys(modules).filter((moduleKey) => moduleKey !== utils_1.cleanKey(types_1.AllModuleTypes.CoreFunction)).length < 1) {
|
|
49
|
-
validationErrors.push(Object.assign({ message: text_1.errors.modules.missingModule(), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition('app', yamlContentByLine)));
|
|
48
|
+
if (Object.keys(modules).filter((moduleKey) => moduleKey !== (0, utils_1.cleanKey)(types_1.AllModuleTypes.CoreFunction)).length < 1) {
|
|
49
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.missingModule(), reference: text_1.References.Modules, level: 'error' }, (0, utils_1.findPosition)('app', yamlContentByLine)));
|
|
50
50
|
}
|
|
51
|
-
const validModules = Object.keys(modules).filter((moduleKey) => moduleKey !== utils_1.cleanKey(types_1.AllModuleTypes.CoreFunction));
|
|
51
|
+
const validModules = Object.keys(modules).filter((moduleKey) => moduleKey !== (0, utils_1.cleanKey)(types_1.AllModuleTypes.CoreFunction));
|
|
52
52
|
validModules.forEach((moduleKey) => {
|
|
53
53
|
var _a;
|
|
54
54
|
(_a = modules[moduleKey]) === null || _a === void 0 ? void 0 : _a.forEach((module) => {
|
|
55
|
-
utils_1.findInvalidFunctionReferences(module, _function).forEach((functionKey) => {
|
|
56
|
-
validationErrors.push(Object.assign({ message: text_1.errors.modules.wrongFunctionReference(moduleKey, functionKey), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition(moduleKey, yamlContentByLine)));
|
|
55
|
+
(0, utils_1.findInvalidFunctionReferences)(module, _function).forEach((functionKey) => {
|
|
56
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.wrongFunctionReference(moduleKey, functionKey), reference: text_1.References.Modules, level: 'error' }, (0, utils_1.findPosition)(moduleKey, yamlContentByLine)));
|
|
57
57
|
});
|
|
58
58
|
});
|
|
59
59
|
});
|
|
@@ -64,45 +64,45 @@ class ModulesValidator {
|
|
|
64
64
|
});
|
|
65
65
|
const duplicateKeys = [...new Set(moduleKeys.filter((item, index) => moduleKeys.indexOf(item) != index))];
|
|
66
66
|
duplicateKeys.forEach((duplicateKey) => {
|
|
67
|
-
validationErrors.push(Object.assign({ message: text_1.errors.modules.duplicateKeyFound(duplicateKey), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition(duplicateKey, yamlContentByLine)));
|
|
67
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.duplicateKeyFound(duplicateKey), reference: text_1.References.Modules, level: 'error' }, (0, utils_1.findPosition)(duplicateKey, yamlContentByLine)));
|
|
68
68
|
});
|
|
69
69
|
_function === null || _function === void 0 ? void 0 : _function.forEach((func) => {
|
|
70
70
|
if (!this.functionHandlerRegex.test(func.handler)) {
|
|
71
|
-
validationErrors.push(Object.assign({ message: text_1.errors.modules.function.handler.invalidRegex(func.handler, this.functionHandlerRegex), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition(func.handler, yamlContentByLine)));
|
|
71
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.function.handler.invalidRegex(func.handler, this.functionHandlerRegex), reference: text_1.References.Modules, level: 'error' }, (0, utils_1.findPosition)(func.handler, yamlContentByLine)));
|
|
72
72
|
}
|
|
73
73
|
else {
|
|
74
74
|
const matches = this.functionHandlerRegex.exec(func.handler);
|
|
75
75
|
const fileName = matches ? matches[1] : undefined;
|
|
76
76
|
const _checkFileExists = (fileName) => {
|
|
77
|
-
return (['tsx', 'jsx', 'ts', 'js'].find((ext) => fs_1.existsSync(path_1.resolve(path_1.dirname(filePath), 'src', `${fileName}.${ext}`))) !== undefined);
|
|
77
|
+
return (['tsx', 'jsx', 'ts', 'js'].find((ext) => (0, fs_1.existsSync)((0, path_1.resolve)((0, path_1.dirname)(filePath), 'src', `${fileName}.${ext}`))) !== undefined);
|
|
78
78
|
};
|
|
79
79
|
if (!_checkFileExists(fileName)) {
|
|
80
|
-
validationErrors.push(Object.assign({ message: text_1.errors.modules.function.handler.fileNotExists(func.handler, fileName), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition(func.handler, yamlContentByLine)));
|
|
80
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.function.handler.fileNotExists(func.handler, fileName), reference: text_1.References.Modules, level: 'error' }, (0, utils_1.findPosition)(func.handler, yamlContentByLine)));
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
84
|
(_a = modules[types_1.AllModuleTypes.JiraWorkflowValidator]) === null || _a === void 0 ? void 0 : _a.forEach((module) => {
|
|
85
85
|
if (!module.expression && !module.function) {
|
|
86
|
-
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)));
|
|
86
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.jiraWorkflowValidator.missingProperty(module.key), reference: text_1.References.Modules, level: 'error' }, (0, utils_1.findPosition)(module.key, yamlContentByLine)));
|
|
87
87
|
}
|
|
88
88
|
if (module.expression && module.function) {
|
|
89
|
-
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)));
|
|
89
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.jiraWorkflowValidator.invalidProperty(module.key), reference: text_1.References.Modules, level: 'error' }, (0, utils_1.findPosition)(module.key, yamlContentByLine)));
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
92
|
(_b = modules[types_1.AllModuleTypes.JiraWorkflowCondition]) === null || _b === void 0 ? void 0 : _b.forEach((module) => {
|
|
93
93
|
if (!(module.expression && module.expression.trim())) {
|
|
94
|
-
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)));
|
|
94
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.jiraWorkflowCondition.missingExpression(module.key), reference: text_1.References.Modules, level: 'error' }, (0, utils_1.findPosition)(module.key, yamlContentByLine)));
|
|
95
95
|
}
|
|
96
96
|
});
|
|
97
|
-
validationErrors.push(...ui_modifications_1.validateUiModificationsModule(modules, yamlContentByLine));
|
|
98
|
-
validationErrors.push(...validate_full_admin_page_1.validateFullAdminPage(modules, yamlContentByLine));
|
|
97
|
+
validationErrors.push(...(0, ui_modifications_1.validateUiModificationsModule)(modules, yamlContentByLine));
|
|
98
|
+
validationErrors.push(...(0, validate_full_admin_page_1.validateFullAdminPage)(modules, yamlContentByLine));
|
|
99
99
|
[types_1.AllModuleTypes.JiraProjectPage, types_1.AllModuleTypes.JiraProjectSettingsPage, types_1.AllModuleTypes.JiraGlobalPage].forEach((moduleType) => {
|
|
100
100
|
const moduleArray = modules[moduleType];
|
|
101
101
|
if (moduleArray && moduleArray.length > 1) {
|
|
102
|
-
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)));
|
|
102
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.singleEntryOfTheModule(moduleType), reference: text_1.References.Modules, level: 'error' }, (0, utils_1.findPosition)(moduleArray[1].key, yamlContentByLine)));
|
|
103
103
|
}
|
|
104
104
|
if (moduleArray && moduleArray.length === 1) {
|
|
105
|
-
validationErrors.push(...validate_subpages_in_module_1.validateSubpagesInModule(modules, moduleType, yamlContentByLine));
|
|
105
|
+
validationErrors.push(...(0, validate_subpages_in_module_1.validateSubpagesInModule)(modules, moduleType, yamlContentByLine));
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
108
|
[types_1.AllModuleTypes.JiraCustomField, types_1.AllModuleTypes.JiraCustomFieldType].forEach((moduleType) => {
|
|
@@ -117,11 +117,11 @@ class ModulesValidator {
|
|
|
117
117
|
const aliases = getAliases(module.schema.properties);
|
|
118
118
|
const duplicates = Array.from(new Set(aliases.filter((item, index) => aliases.indexOf(item) != index)));
|
|
119
119
|
if (duplicates.length) {
|
|
120
|
-
validationErrors.push(Object.assign({ message: text_1.errors.modules.customFields.searchAlias(duplicates), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition(module.key, yamlContentByLine)));
|
|
120
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.customFields.searchAlias(duplicates), reference: text_1.References.Modules, level: 'error' }, (0, utils_1.findPosition)(module.key, yamlContentByLine)));
|
|
121
121
|
}
|
|
122
122
|
});
|
|
123
123
|
});
|
|
124
|
-
validationErrors.push(...confluence_1.validateConfluenceModules(modules, yamlContentByLine));
|
|
124
|
+
validationErrors.push(...(0, confluence_1.validateConfluenceModules)(modules, yamlContentByLine));
|
|
125
125
|
}
|
|
126
126
|
return {
|
|
127
127
|
success: validationErrors.length === 0,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Modules } from '../../../schema/manifest';
|
|
2
2
|
import { ValidationError } from '../../../types';
|
|
3
|
-
export declare const validateConfluenceModules: (modules: Modules, yamlContentByLine?: string[]
|
|
3
|
+
export declare const validateConfluenceModules: (modules: Modules, yamlContentByLine?: string[]) => ValidationError[];
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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;AAYjE,eAAO,MAAM,yBAAyB,YAAa,OAAO
|
|
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;AAYjE,eAAO,MAAM,yBAAyB,YAAa,OAAO,sBAAsB,MAAM,EAAE,KAAG,eAAe,EA8BzG,CAAC"}
|
|
@@ -11,18 +11,19 @@ const ROUTE = 'route';
|
|
|
11
11
|
const USE_AS_CONFIG = 'useAsConfig';
|
|
12
12
|
const USE_AS_GET_STARTED = 'useAsGetStarted';
|
|
13
13
|
const KEYBOARD_SHORTCUT_ACCELERATOR = 'keyboardShortcut.accelerator';
|
|
14
|
-
|
|
14
|
+
const validateConfluenceModules = (modules, yamlContentByLine) => {
|
|
15
15
|
const validationErrors = [];
|
|
16
16
|
[
|
|
17
17
|
types_1.AllModuleTypes.ConfluenceSpaceSettings,
|
|
18
18
|
types_1.AllModuleTypes.ConfluenceGlobalPage,
|
|
19
19
|
types_1.AllModuleTypes.ConfluenceSpacePage
|
|
20
20
|
].forEach((moduleType) => {
|
|
21
|
-
validationErrors.push(...validatePropertyUniqueness_1.validatePropertyUniqueness(modules, moduleType, ROUTE, yamlContentByLine));
|
|
21
|
+
validationErrors.push(...(0, validatePropertyUniqueness_1.validatePropertyUniqueness)(modules, moduleType, ROUTE, yamlContentByLine));
|
|
22
22
|
});
|
|
23
|
-
validationErrors.push(...validateSingleProperty_1.validateSingleProperty(modules, types_1.AllModuleTypes.ConfluenceGlobalSettings, USE_AS_CONFIG, yamlContentByLine));
|
|
24
|
-
validationErrors.push(...validateSingleProperty_1.validateSingleProperty(modules, types_1.AllModuleTypes.ConfluenceGlobalSettings, USE_AS_GET_STARTED, yamlContentByLine));
|
|
25
|
-
validationErrors.push(...validateCustomContentHierarchy_1.validateCustomContentHierarchy(modules, types_1.AllModuleTypes.ConfluenceCustomContent, yamlContentByLine));
|
|
26
|
-
validationErrors.push(...validateCrossModulePropertyUniqueness_1.validateCrossModulePropertyUniqueness(modules, KEYBOARD_SHORTCUT_ACCELERATOR, yamlContentByLine), ...validateKeyboardShortcuts_1.validateKeyboardShortcuts(modules, yamlContentByLine));
|
|
23
|
+
validationErrors.push(...(0, validateSingleProperty_1.validateSingleProperty)(modules, types_1.AllModuleTypes.ConfluenceGlobalSettings, USE_AS_CONFIG, yamlContentByLine));
|
|
24
|
+
validationErrors.push(...(0, validateSingleProperty_1.validateSingleProperty)(modules, types_1.AllModuleTypes.ConfluenceGlobalSettings, USE_AS_GET_STARTED, yamlContentByLine));
|
|
25
|
+
validationErrors.push(...(0, validateCustomContentHierarchy_1.validateCustomContentHierarchy)(modules, types_1.AllModuleTypes.ConfluenceCustomContent, yamlContentByLine));
|
|
26
|
+
validationErrors.push(...(0, validateCrossModulePropertyUniqueness_1.validateCrossModulePropertyUniqueness)(modules, KEYBOARD_SHORTCUT_ACCELERATOR, yamlContentByLine), ...(0, validateKeyboardShortcuts_1.validateKeyboardShortcuts)(modules, yamlContentByLine));
|
|
27
27
|
return validationErrors;
|
|
28
28
|
};
|
|
29
|
+
exports.validateConfluenceModules = validateConfluenceModules;
|
package/out/validators/modules-validators/confluence/validateCrossModulePropertyUniqueness.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ValidationError } from '../../../types';
|
|
2
2
|
import { Modules } from '../../../schema/manifest';
|
|
3
|
-
export declare const validateCrossModulePropertyUniqueness: (allModules: Modules, property: string, yamlContentByLine?: string[]
|
|
3
|
+
export declare const validateCrossModulePropertyUniqueness: (allModules: Modules, property: string, yamlContentByLine?: string[]) => ValidationError[];
|
|
4
4
|
//# sourceMappingURL=validateCrossModulePropertyUniqueness.d.ts.map
|
package/out/validators/modules-validators/confluence/validateCrossModulePropertyUniqueness.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateCrossModulePropertyUniqueness.d.ts","sourceRoot":"","sources":["../../../../src/validators/modules-validators/confluence/validateCrossModulePropertyUniqueness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AASnD,eAAO,MAAM,qCAAqC,eACpC,OAAO,YACT,MAAM
|
|
1
|
+
{"version":3,"file":"validateCrossModulePropertyUniqueness.d.ts","sourceRoot":"","sources":["../../../../src/validators/modules-validators/confluence/validateCrossModulePropertyUniqueness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AASnD,eAAO,MAAM,qCAAqC,eACpC,OAAO,YACT,MAAM,sBACI,MAAM,EAAE,KAC3B,eAAe,EAuBjB,CAAC"}
|
package/out/validators/modules-validators/confluence/validateCrossModulePropertyUniqueness.js
CHANGED
|
@@ -5,15 +5,16 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const get_1 = tslib_1.__importDefault(require("lodash/get"));
|
|
6
6
|
const text_1 = require("../../../text");
|
|
7
7
|
const utils_1 = require("../../../utils");
|
|
8
|
-
|
|
8
|
+
const validateCrossModulePropertyUniqueness = (allModules, property, yamlContentByLine) => {
|
|
9
9
|
var _a;
|
|
10
10
|
const validationErrors = [];
|
|
11
|
-
const modules = utils_1.getAllModules(allModules) || [];
|
|
12
|
-
const allPropertyValues = modules.map((module) => get_1.default(module, property)).filter((propertyValue) => propertyValue);
|
|
11
|
+
const modules = (0, utils_1.getAllModules)(allModules) || [];
|
|
12
|
+
const allPropertyValues = modules.map((module) => (0, get_1.default)(module, property)).filter((propertyValue) => propertyValue);
|
|
13
13
|
const duplicatePropertyValues = allPropertyValues.filter((propertyValue, index, all) => all.indexOf(propertyValue) !== index);
|
|
14
14
|
if (duplicatePropertyValues.length > 0) {
|
|
15
|
-
const allModulesWithDuplicatedPropertyValues = modules.filter((module) => get_1.default(module, property) === duplicatePropertyValues[0]);
|
|
16
|
-
validationErrors.push(Object.assign({ message: text_1.errors.modules.confluence.crossModulePropertyUniqueness(property, 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
|
+
const allModulesWithDuplicatedPropertyValues = modules.filter((module) => (0, get_1.default)(module, property) === duplicatePropertyValues[0]);
|
|
16
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.confluence.crossModulePropertyUniqueness(property, duplicatePropertyValues), reference: text_1.References.Modules, level: 'error' }, (0, utils_1.findPosition)((_a = allModulesWithDuplicatedPropertyValues === null || allModulesWithDuplicatedPropertyValues === void 0 ? void 0 : allModulesWithDuplicatedPropertyValues[0]) === null || _a === void 0 ? void 0 : _a.key, yamlContentByLine)));
|
|
17
17
|
}
|
|
18
18
|
return validationErrors;
|
|
19
19
|
};
|
|
20
|
+
exports.validateCrossModulePropertyUniqueness = validateCrossModulePropertyUniqueness;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AllModuleTypes, ValidationError } from '../../../types';
|
|
2
2
|
import { Modules } from '../../../schema/manifest';
|
|
3
|
-
export declare const validateCustomContentHierarchy: (allModules: Modules, moduleType: AllModuleTypes, yamlContentByLine?: string[]
|
|
3
|
+
export declare const validateCustomContentHierarchy: (allModules: Modules, moduleType: AllModuleTypes, yamlContentByLine?: string[]) => ValidationError[];
|
|
4
4
|
//# sourceMappingURL=validateCustomContentHierarchy.d.ts.map
|
package/out/validators/modules-validators/confluence/validateCustomContentHierarchy.d.ts.map
CHANGED
|
@@ -1 +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
|
|
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,sBACN,MAAM,EAAE,KAC3B,eAAe,EAyDjB,CAAC"}
|
|
@@ -4,7 +4,7 @@ exports.validateCustomContentHierarchy = void 0;
|
|
|
4
4
|
const text_1 = require("../../../text");
|
|
5
5
|
const utils_1 = require("../../../utils");
|
|
6
6
|
const INNER_TYPE_PREFIX = 'this:';
|
|
7
|
-
|
|
7
|
+
const validateCustomContentHierarchy = (allModules, moduleType, yamlContentByLine) => {
|
|
8
8
|
const validationErrors = [];
|
|
9
9
|
const modules = allModules[moduleType] || [];
|
|
10
10
|
modules.forEach((module) => {
|
|
@@ -28,12 +28,12 @@ exports.validateCustomContentHierarchy = (allModules, moduleType, yamlContentByL
|
|
|
28
28
|
const referredModuleName = value.substring(INNER_TYPE_PREFIX.length);
|
|
29
29
|
const referredModule = modules.find((m) => m.key === referredModuleName);
|
|
30
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)));
|
|
31
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.confluence.validateCustomContentHierarchyUnknown(propName, module.key, referredModuleName), reference: text_1.References.Modules, level: 'error' }, (0, utils_1.findPosition)(module.key, yamlContentByLine)));
|
|
32
32
|
}
|
|
33
33
|
else {
|
|
34
34
|
const referredModuleDependentPropValues = referredModule[dependentPropName] || [];
|
|
35
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)));
|
|
36
|
+
validationErrors.push(Object.assign({ message: dependentReferenceMissingMessage(module.key, referredModule.key), reference: text_1.References.Modules, level: 'error' }, (0, utils_1.findPosition)(module.key, yamlContentByLine)));
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
});
|
|
@@ -41,3 +41,4 @@ exports.validateCustomContentHierarchy = (allModules, moduleType, yamlContentByL
|
|
|
41
41
|
});
|
|
42
42
|
return validationErrors;
|
|
43
43
|
};
|
|
44
|
+
exports.validateCustomContentHierarchy = validateCustomContentHierarchy;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ValidationError } from '../../../types';
|
|
2
2
|
import { Modules } from '../../../schema/manifest';
|
|
3
|
-
export declare const validateKeyboardShortcuts: (allModules: Modules, yamlContentByLine?: string[]
|
|
3
|
+
export declare const validateKeyboardShortcuts: (allModules: Modules, yamlContentByLine?: string[]) => ValidationError[];
|
|
4
4
|
//# sourceMappingURL=validateKeyboardShortcuts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateKeyboardShortcuts.d.ts","sourceRoot":"","sources":["../../../../src/validators/modules-validators/confluence/validateKeyboardShortcuts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAuJnD,eAAO,MAAM,yBAAyB,eAAgB,OAAO
|
|
1
|
+
{"version":3,"file":"validateKeyboardShortcuts.d.ts","sourceRoot":"","sources":["../../../../src/validators/modules-validators/confluence/validateKeyboardShortcuts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAuJnD,eAAO,MAAM,yBAAyB,eAAgB,OAAO,sBAAsB,MAAM,EAAE,KAAG,eAAe,EAwB5G,CAAC"}
|
|
@@ -102,12 +102,13 @@ const validateShortcut = (moduleKey, accelerator) => {
|
|
|
102
102
|
}
|
|
103
103
|
return mapToKeyboardShortcutError(validateKeyCombinationsAndSequences(accelerator), moduleKey);
|
|
104
104
|
};
|
|
105
|
-
|
|
105
|
+
const validateKeyboardShortcuts = (allModules, yamlContentByLine) => {
|
|
106
106
|
const validationErrors = [];
|
|
107
|
-
const modules = utils_1.getAllModules(allModules) || [];
|
|
107
|
+
const modules = (0, utils_1.getAllModules)(allModules) || [];
|
|
108
108
|
const modulesWithKeyboardShortcut = modules.filter((module) => { var _a; return (_a = module === null || module === void 0 ? void 0 : module.keyboardShortcut) === null || _a === void 0 ? void 0 : _a.accelerator; });
|
|
109
109
|
if (modulesWithKeyboardShortcut.length > 0) {
|
|
110
|
-
modulesWithKeyboardShortcut.forEach((m) => validationErrors.push(...validateShortcut(m.key, m.keyboardShortcut.accelerator).map((e) => (Object.assign({ message: e.message, reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition(e.moduleKey, yamlContentByLine))))));
|
|
110
|
+
modulesWithKeyboardShortcut.forEach((m) => validationErrors.push(...validateShortcut(m.key, m.keyboardShortcut.accelerator).map((e) => (Object.assign({ message: e.message, reference: text_1.References.Modules, level: 'error' }, (0, utils_1.findPosition)(e.moduleKey, yamlContentByLine))))));
|
|
111
111
|
}
|
|
112
112
|
return validationErrors;
|
|
113
113
|
};
|
|
114
|
+
exports.validateKeyboardShortcuts = validateKeyboardShortcuts;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AllModuleTypes, ValidationError } from '../../../types';
|
|
2
2
|
import { Modules } from '../../../schema/manifest';
|
|
3
|
-
export declare const validatePropertyUniqueness: (allModules: Modules, moduleType: AllModuleTypes, property: string, yamlContentByLine?: string[]
|
|
3
|
+
export declare const validatePropertyUniqueness: (allModules: Modules, moduleType: AllModuleTypes, property: string, yamlContentByLine?: string[]) => ValidationError[];
|
|
4
4
|
//# sourceMappingURL=validatePropertyUniqueness.d.ts.map
|
|
@@ -1 +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;AAUnD,eAAO,MAAM,0BAA0B,eACzB,OAAO,cACP,cAAc,YAChB,MAAM
|
|
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;AAUnD,eAAO,MAAM,0BAA0B,eACzB,OAAO,cACP,cAAc,YAChB,MAAM,sBACI,MAAM,EAAE,KAC3B,eAAe,EAqBjB,CAAC"}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.validatePropertyUniqueness = void 0;
|
|
4
4
|
const text_1 = require("../../../text");
|
|
5
5
|
const utils_1 = require("../../../utils");
|
|
6
|
-
|
|
6
|
+
const validatePropertyUniqueness = (allModules, moduleType, property, yamlContentByLine) => {
|
|
7
7
|
var _a;
|
|
8
8
|
const validationErrors = [];
|
|
9
9
|
const modules = allModules[moduleType] || [];
|
|
@@ -11,7 +11,8 @@ exports.validatePropertyUniqueness = (allModules, moduleType, property, yamlCont
|
|
|
11
11
|
const duplicatePropertyValues = allPropertyValues.filter((property, index, all) => all.indexOf(property) !== index);
|
|
12
12
|
if (duplicatePropertyValues.length > 0) {
|
|
13
13
|
const allModulesWithDuplicatedPropertyValues = modules.filter((module) => module[property] === duplicatePropertyValues[0]);
|
|
14
|
-
validationErrors.push(Object.assign({ message: text_1.errors.modules.confluence.propertyUniqueness(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)));
|
|
14
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.confluence.propertyUniqueness(property, moduleType, duplicatePropertyValues), reference: text_1.References.Modules, level: 'error' }, (0, utils_1.findPosition)((_a = allModulesWithDuplicatedPropertyValues === null || allModulesWithDuplicatedPropertyValues === void 0 ? void 0 : allModulesWithDuplicatedPropertyValues[0]) === null || _a === void 0 ? void 0 : _a.key, yamlContentByLine)));
|
|
15
15
|
}
|
|
16
16
|
return validationErrors;
|
|
17
17
|
};
|
|
18
|
+
exports.validatePropertyUniqueness = validatePropertyUniqueness;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AllModuleTypes, ValidationError } from '../../../types';
|
|
2
2
|
import { Modules } from '../../../schema/manifest';
|
|
3
|
-
export declare const validateSingleProperty: (allModules: Modules, moduleType: AllModuleTypes, property: string, yamlContentByLine?: string[]
|
|
3
|
+
export declare const validateSingleProperty: (allModules: Modules, moduleType: AllModuleTypes, property: string, yamlContentByLine?: string[]) => ValidationError[];
|
|
4
4
|
//# sourceMappingURL=validateSingleProperty.d.ts.map
|
|
@@ -1 +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;AASnD,eAAO,MAAM,sBAAsB,eACrB,OAAO,cACP,cAAc,YAChB,MAAM
|
|
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;AASnD,eAAO,MAAM,sBAAsB,eACrB,OAAO,cACP,cAAc,YAChB,MAAM,sBACI,MAAM,EAAE,KAC3B,eAAe,EAgBjB,CAAC"}
|
|
@@ -3,13 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.validateSingleProperty = void 0;
|
|
4
4
|
const text_1 = require("../../../text");
|
|
5
5
|
const utils_1 = require("../../../utils");
|
|
6
|
-
|
|
6
|
+
const validateSingleProperty = (allModules, moduleType, property, yamlContentByLine) => {
|
|
7
7
|
const validationErrors = [];
|
|
8
8
|
const modules = allModules[moduleType] || [];
|
|
9
9
|
const modulesWithProperty = modules.filter((module) => module[property]);
|
|
10
10
|
if (modulesWithProperty.length > 1) {
|
|
11
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)));
|
|
12
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.confluence.multipleProperty(property, moduleType, moduleKeys), reference: text_1.References.Modules, level: 'error' }, (0, utils_1.findPosition)(moduleKeys[moduleKeys.length - 1], yamlContentByLine)));
|
|
13
13
|
}
|
|
14
14
|
return validationErrors;
|
|
15
15
|
};
|
|
16
|
+
exports.validateSingleProperty = validateSingleProperty;
|
|
@@ -9,7 +9,7 @@ function validateUiModificationsModule(modules, yamlContentByLine) {
|
|
|
9
9
|
const moduleType = types_1.AllModuleTypes.JiraUiModifications;
|
|
10
10
|
const moduleArray = modules[moduleType];
|
|
11
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)));
|
|
12
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.singleEntryOfTheModule(moduleType), reference: text_1.References.Modules, level: 'error' }, (0, utils_1.findPosition)(moduleArray[1].key, yamlContentByLine)));
|
|
13
13
|
}
|
|
14
14
|
return validationErrors;
|
|
15
15
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ValidationError } from '../../../types';
|
|
2
2
|
import { Modules } from '../../../schema/manifest';
|
|
3
|
-
export declare const validateFullAdminPage: (modules: Modules, yamlContentByLine?: string[]
|
|
3
|
+
export declare const validateFullAdminPage: (modules: Modules, yamlContentByLine?: string[]) => ValidationError[];
|
|
4
4
|
//# sourceMappingURL=validate-full-admin-page.d.ts.map
|
|
@@ -1 +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;AA+CnD,eAAO,MAAM,qBAAqB,YAAa,OAAO
|
|
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;AA+CnD,eAAO,MAAM,qBAAqB,YAAa,OAAO,sBAAsB,MAAM,EAAE,KAAG,eAAe,EA4CrG,CAAC"}
|
|
@@ -9,22 +9,22 @@ const jiraAdminPageType = types_1.AllModuleTypes.JiraAdminPage;
|
|
|
9
9
|
const validateSeparateAdminPageModule = (pageType, modules, currentModule, multiplePagesError, yamlContentByLine) => {
|
|
10
10
|
const validationErrors = [];
|
|
11
11
|
if ((currentModule === null || currentModule === void 0 ? void 0 : currentModule.length) > 1) {
|
|
12
|
-
validationErrors.push(Object.assign({ message: multiplePagesError, reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition(currentModule[1].key, yamlContentByLine)));
|
|
12
|
+
validationErrors.push(Object.assign({ message: multiplePagesError, reference: text_1.References.Modules, level: 'error' }, (0, utils_1.findPosition)(currentModule[1].key, yamlContentByLine)));
|
|
13
13
|
}
|
|
14
14
|
if ((currentModule === null || currentModule === void 0 ? void 0 : currentModule.length) === 1) {
|
|
15
15
|
if (pageType === 'admin') {
|
|
16
16
|
const adminModules = Object.assign(Object.assign({}, modules), { [jiraAdminPageType]: currentModule });
|
|
17
|
-
validationErrors.push(...validate_subpages_in_module_1.validateSubpagesInModule(adminModules, jiraAdminPageType, yamlContentByLine));
|
|
17
|
+
validationErrors.push(...(0, validate_subpages_in_module_1.validateSubpagesInModule)(adminModules, jiraAdminPageType, yamlContentByLine));
|
|
18
18
|
}
|
|
19
19
|
if (['get-started', 'config'].includes(pageType)) {
|
|
20
20
|
const { pages, sections, key } = currentModule[0];
|
|
21
21
|
if (pages || sections)
|
|
22
|
-
validationErrors.push(Object.assign({ message: text_1.errors.modules.subPages.invalidPagesAndSectionsForConfigurePages(jiraAdminPageType), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition(key, yamlContentByLine)));
|
|
22
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.subPages.invalidPagesAndSectionsForConfigurePages(jiraAdminPageType), reference: text_1.References.Modules, level: 'error' }, (0, utils_1.findPosition)(key, yamlContentByLine)));
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
return validationErrors;
|
|
26
26
|
};
|
|
27
|
-
|
|
27
|
+
const validateFullAdminPage = (modules, yamlContentByLine) => {
|
|
28
28
|
const validationErrors = [];
|
|
29
29
|
const moduleArray = modules[jiraAdminPageType];
|
|
30
30
|
const adminPageModules = moduleArray === null || moduleArray === void 0 ? void 0 : moduleArray.filter((module) => !(module === null || module === void 0 ? void 0 : module.useAsGetStarted) && !(module === null || module === void 0 ? void 0 : module.useAsConfig));
|
|
@@ -41,3 +41,4 @@ exports.validateFullAdminPage = (modules, yamlContentByLine) => {
|
|
|
41
41
|
}
|
|
42
42
|
return validationErrors;
|
|
43
43
|
};
|
|
44
|
+
exports.validateFullAdminPage = validateFullAdminPage;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ValidationError } from '../../../types';
|
|
2
2
|
import { Modules } from '../../../schema/manifest';
|
|
3
|
-
export declare const validateSubpagesInModule: (modules: Modules, moduleType: string, yamlContentByLine?: string[]
|
|
3
|
+
export declare const validateSubpagesInModule: (modules: Modules, moduleType: string, yamlContentByLine?: string[]) => ValidationError[];
|
|
4
4
|
//# sourceMappingURL=validate-subpages-in-module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-subpages-in-module.d.ts","sourceRoot":"","sources":["../../../../src/validators/modules-validators/jira/validate-subpages-in-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAEnD,eAAO,MAAM,wBAAwB,YAC1B,OAAO,cACJ,MAAM
|
|
1
|
+
{"version":3,"file":"validate-subpages-in-module.d.ts","sourceRoot":"","sources":["../../../../src/validators/modules-validators/jira/validate-subpages-in-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAEnD,eAAO,MAAM,wBAAwB,YAC1B,OAAO,cACJ,MAAM,sBACE,MAAM,EAAE,KAC3B,eAAe,EA0BjB,CAAC"}
|
|
@@ -3,15 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.validateSubpagesInModule = void 0;
|
|
4
4
|
const text_1 = require("../../../text");
|
|
5
5
|
const utils_1 = require("../../../utils");
|
|
6
|
-
|
|
6
|
+
const validateSubpagesInModule = (modules, moduleType, yamlContentByLine) => {
|
|
7
7
|
const validationErrors = [];
|
|
8
8
|
const moduleArray = modules[moduleType];
|
|
9
9
|
const module = moduleArray[0];
|
|
10
10
|
if (module && (module.pages || module.sections) && module.function) {
|
|
11
|
-
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)));
|
|
11
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.subPages.subPagesWithUIKit(module.key), reference: text_1.References.Modules, level: 'error' }, (0, utils_1.findPosition)(module.key, yamlContentByLine)));
|
|
12
12
|
}
|
|
13
13
|
if (module && module.pages && module.sections) {
|
|
14
|
-
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)));
|
|
14
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.subPages.invalidPagesAndSections(module.key), reference: text_1.References.Modules, level: 'error' }, (0, utils_1.findPosition)(module.key, yamlContentByLine)));
|
|
15
15
|
}
|
|
16
16
|
return validationErrors;
|
|
17
17
|
};
|
|
18
|
+
exports.validateSubpagesInModule = validateSubpagesInModule;
|
|
@@ -48,7 +48,7 @@ class PermissionsValidator {
|
|
|
48
48
|
}
|
|
49
49
|
addValidationErrors(element, values, manifest) {
|
|
50
50
|
values.forEach((value) => {
|
|
51
|
-
this.validationErrors.push(Object.assign({ message: text_1.errors.permissions.invalidPermission(element, value), reference: text_1.References.Permissions, level: 'error' }, utils_1.findPosition(value, manifest.yamlContentByLine)));
|
|
51
|
+
this.validationErrors.push(Object.assign({ message: text_1.errors.permissions.invalidPermission(element, value), reference: text_1.References.Permissions, level: 'error' }, (0, utils_1.findPosition)(value, manifest.yamlContentByLine)));
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
validateExternalPermissionURLs(extPermType, perms, manifest) {
|
|
@@ -25,7 +25,7 @@ class ProductTriggerScopesValidator {
|
|
|
25
25
|
const addValidationError = (scope, event) => {
|
|
26
26
|
validationErrors.push(Object.assign({ message: text_1.errors.permissions.missingPermissionFromScope(scope, event), reference: text_1.References.MissingScopes, level: 'error', metadata: {
|
|
27
27
|
missingPermission: scope
|
|
28
|
-
} }, utils_1.findPosition('scopes', manifest.yamlContentByLine)));
|
|
28
|
+
} }, (0, utils_1.findPosition)('scopes', manifest.yamlContentByLine)));
|
|
29
29
|
};
|
|
30
30
|
if (!manifest.typedContent.modules || !manifest.typedContent.modules.trigger) {
|
|
31
31
|
return {
|
|
@@ -37,7 +37,7 @@ class ProductTriggerScopesValidator {
|
|
|
37
37
|
for (const element of manifest.typedContent.modules.trigger) {
|
|
38
38
|
for (const event of element.events) {
|
|
39
39
|
const requiredScopes = getRequiredScopes(event);
|
|
40
|
-
const missingScopes = await scopes_1.getMissingScopes(manifestScopes, requiredScopes);
|
|
40
|
+
const missingScopes = await (0, scopes_1.getMissingScopes)(manifestScopes, requiredScopes);
|
|
41
41
|
missingScopes.forEach((scope) => addValidationError(scope, event));
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -20,7 +20,7 @@ class ProvidersValidator {
|
|
|
20
20
|
if ('remotes' in provider) {
|
|
21
21
|
const hasMissing = (_a = provider.remotes) === null || _a === void 0 ? void 0 : _a.find((key) => !(remotes === null || remotes === void 0 ? void 0 : remotes.find((item) => item.key === key)));
|
|
22
22
|
if (hasMissing) {
|
|
23
|
-
validationErrors.push(Object.assign({ message: text_1.errors.providers.missingRemote(provider.key, hasMissing), reference: text_1.References.Providers, level: 'error' }, utils_1.findPosition(hasMissing, manifest.yamlContentByLine)));
|
|
23
|
+
validationErrors.push(Object.assign({ message: text_1.errors.providers.missingRemote(provider.key, hasMissing), reference: text_1.References.Providers, level: 'error' }, (0, utils_1.findPosition)(hasMissing, manifest.yamlContentByLine)));
|
|
24
24
|
}
|
|
25
25
|
const missingEgressPermission = (_b = provider.remotes) === null || _b === void 0 ? void 0 : _b.find((key) => {
|
|
26
26
|
var _a, _b, _c;
|
|
@@ -32,7 +32,7 @@ class ProvidersValidator {
|
|
|
32
32
|
return false;
|
|
33
33
|
});
|
|
34
34
|
if (missingEgressPermission) {
|
|
35
|
-
validationErrors.push(Object.assign({ message: text_1.errors.providers.missingEgress(missingEgressPermission), reference: text_1.References.Providers, level: 'error' }, utils_1.findPosition(missingEgressPermission, manifest.yamlContentByLine)));
|
|
35
|
+
validationErrors.push(Object.assign({ message: text_1.errors.providers.missingEgress(missingEgressPermission), reference: text_1.References.Providers, level: 'error' }, (0, utils_1.findPosition)(missingEgressPermission, manifest.yamlContentByLine)));
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
});
|
|
@@ -58,7 +58,7 @@ class ProvidersValidator {
|
|
|
58
58
|
isActionValidRemote(provider, action, manifest, remotes) {
|
|
59
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
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));
|
|
61
|
+
return Object.assign({ message: text_1.errors.providers.missingRemote(provider.key, action.remote), reference: text_1.References.Providers, level: 'error' }, (0, utils_1.findPosition)(action.remote, manifest.yamlContentByLine));
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
isValidProfileRetrieverFunction(provider, manifest) {
|
|
@@ -67,7 +67,7 @@ class ProvidersValidator {
|
|
|
67
67
|
const { function: functionKey } = provider.actions.retrieveProfile;
|
|
68
68
|
const hasFunction = (_c = (_b = (_a = manifest.typedContent) === null || _a === void 0 ? void 0 : _a.modules) === null || _b === void 0 ? void 0 : _b.function) === null || _c === void 0 ? void 0 : _c.find((func) => func.key === functionKey);
|
|
69
69
|
if (!hasFunction) {
|
|
70
|
-
return Object.assign({ message: text_1.errors.providers.missingProfileFunction(provider.key, functionKey), reference: text_1.References.Providers, level: 'error' }, utils_1.findPosition(functionKey, manifest.yamlContentByLine));
|
|
70
|
+
return Object.assign({ message: text_1.errors.providers.missingProfileFunction(provider.key, functionKey), reference: text_1.References.Providers, level: 'error' }, (0, utils_1.findPosition)(functionKey, manifest.yamlContentByLine));
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -26,29 +26,29 @@ class ResourcesValidator {
|
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
if (resources.length > MAX_RESOURCE_COUNT) {
|
|
29
|
-
validationErrors.push(Object.assign({ message: text_1.errors.resources.tooManyResourcesError(MAX_RESOURCE_COUNT), reference: text_1.References.Resources, level: 'error' }, utils_1.findPosition('resource', yamlContentByLine)));
|
|
29
|
+
validationErrors.push(Object.assign({ message: text_1.errors.resources.tooManyResourcesError(MAX_RESOURCE_COUNT), reference: text_1.References.Resources, level: 'error' }, (0, utils_1.findPosition)('resource', yamlContentByLine)));
|
|
30
30
|
}
|
|
31
31
|
if (modules) {
|
|
32
32
|
const resourceMap = new Map(resources.map(({ key, path }) => [key, path]));
|
|
33
|
-
const manifestDir = path_1.dirname(filePath);
|
|
34
|
-
utils_1.getValidModules(modules).forEach((moduleKey) => {
|
|
33
|
+
const manifestDir = (0, path_1.dirname)(filePath);
|
|
34
|
+
(0, utils_1.getValidModules)(modules).forEach((moduleKey) => {
|
|
35
35
|
var _a;
|
|
36
36
|
(_a = modules[moduleKey]) === null || _a === void 0 ? void 0 : _a.forEach((module) => {
|
|
37
|
-
utils_2.findInvalidResourceReferences(module, resources).forEach((resourceKey) => {
|
|
38
|
-
validationErrors.push(Object.assign({ message: text_1.errors.modules.wrongResourceReference(moduleKey, resourceKey), reference: text_1.References.Resources, level: 'error' }, utils_1.findPosition(moduleKey, yamlContentByLine)));
|
|
37
|
+
(0, utils_2.findInvalidResourceReferences)(module, resources).forEach((resourceKey) => {
|
|
38
|
+
validationErrors.push(Object.assign({ message: text_1.errors.modules.wrongResourceReference(moduleKey, resourceKey), reference: text_1.References.Resources, level: 'error' }, (0, utils_1.findPosition)(moduleKey, yamlContentByLine)));
|
|
39
39
|
});
|
|
40
40
|
});
|
|
41
41
|
});
|
|
42
|
-
utils_1.getValidModules(modules).forEach((moduleKey) => {
|
|
42
|
+
(0, utils_1.getValidModules)(modules).forEach((moduleKey) => {
|
|
43
43
|
const uniquePaths = new Set(modules[moduleKey].map(({ resource }) => resourceMap.get(resource)));
|
|
44
44
|
uniquePaths.forEach((path) => {
|
|
45
45
|
var _a, _b, _c;
|
|
46
46
|
if (path) {
|
|
47
|
-
if (!fs_1.default.existsSync(path_1.resolve(manifestDir, path, 'index.html'))) {
|
|
48
|
-
validationErrors.push(Object.assign({ message: text_1.errors.resources.missingEntrypoint(path, moduleKey), reference: text_1.References.Resources, level: 'error' }, utils_1.findPosition(path, yamlContentByLine)));
|
|
47
|
+
if (!fs_1.default.existsSync((0, path_1.resolve)(manifestDir, path, 'index.html'))) {
|
|
48
|
+
validationErrors.push(Object.assign({ message: text_1.errors.resources.missingEntrypoint(path, moduleKey), reference: text_1.References.Resources, level: 'error' }, (0, utils_1.findPosition)(path, yamlContentByLine)));
|
|
49
49
|
}
|
|
50
50
|
else {
|
|
51
|
-
const content = fs_1.default.readFileSync(path_1.resolve(manifestDir, path, 'index.html'));
|
|
51
|
+
const content = fs_1.default.readFileSync((0, path_1.resolve)(manifestDir, path, 'index.html'));
|
|
52
52
|
const $ = cheerio_1.default.load(content);
|
|
53
53
|
const cspContent = $('meta[http-equiv="Content-Security-Policy"]').attr('content');
|
|
54
54
|
if (cspContent) {
|
|
@@ -62,7 +62,7 @@ class ResourcesValidator {
|
|
|
62
62
|
if (shouldShowError) {
|
|
63
63
|
validationErrors.push(Object.assign({ message: text_1.errors.resources.deprecatedCspPolicyDefinition(path), reference: text_1.References.Resources, level: 'error', metadata: {
|
|
64
64
|
missingContentStylePermission: 'unsafe-inline'
|
|
65
|
-
} }, utils_1.findPosition(path, yamlContentByLine)));
|
|
65
|
+
} }, (0, utils_1.findPosition)(path, yamlContentByLine)));
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
}
|
|
@@ -74,12 +74,12 @@ class ResourcesValidator {
|
|
|
74
74
|
const invalidDirectoryErrors = resources
|
|
75
75
|
.map((resource) => {
|
|
76
76
|
const { key, path } = resource;
|
|
77
|
-
const manifestDir = path_1.dirname(filePath);
|
|
78
|
-
if (!fs_1.default.existsSync(path_1.resolve(manifestDir, path))) {
|
|
79
|
-
return Object.assign({ message: text_1.errors.resources.missingDirectory(path, key), reference: text_1.References.Resources, level: 'error' }, utils_1.findPosition(path, yamlContentByLine));
|
|
77
|
+
const manifestDir = (0, path_1.dirname)(filePath);
|
|
78
|
+
if (!fs_1.default.existsSync((0, path_1.resolve)(manifestDir, path))) {
|
|
79
|
+
return Object.assign({ message: text_1.errors.resources.missingDirectory(path, key), reference: text_1.References.Resources, level: 'error' }, (0, utils_1.findPosition)(path, yamlContentByLine));
|
|
80
80
|
}
|
|
81
|
-
else if (fs_1.default.readdirSync(path_1.resolve(manifestDir, path)).length === 0) {
|
|
82
|
-
return Object.assign({ message: text_1.errors.resources.emptyDirectory(path, key), reference: text_1.References.Resources, level: 'error' }, utils_1.findPosition(path, yamlContentByLine));
|
|
81
|
+
else if (fs_1.default.readdirSync((0, path_1.resolve)(manifestDir, path)).length === 0) {
|
|
82
|
+
return Object.assign({ message: text_1.errors.resources.emptyDirectory(path, key), reference: text_1.References.Resources, level: 'error' }, (0, utils_1.findPosition)(path, yamlContentByLine));
|
|
83
83
|
}
|
|
84
84
|
})
|
|
85
85
|
.filter((error) => error !== undefined);
|
|
@@ -46,7 +46,7 @@ class SchemaValidator {
|
|
|
46
46
|
}
|
|
47
47
|
const data = typeof error.data !== 'string' ? undefined : error.data;
|
|
48
48
|
const searchString = data && hasProperty ? `${propertyName}: ${data}` : path[0];
|
|
49
|
-
return Object.assign({ message: text_1.errors.schemaError(data, path, errorMessage), reference: text_1.References.SchemaError, level: 'error' }, utils_1.findPosition(searchString, manifest.yamlContentByLine));
|
|
49
|
+
return Object.assign({ message: text_1.errors.schemaError(data, path, errorMessage), reference: text_1.References.SchemaError, level: 'error' }, (0, utils_1.findPosition)(searchString, manifest.yamlContentByLine));
|
|
50
50
|
};
|
|
51
51
|
this.handleGenericError = (path, error, manifest) => {
|
|
52
52
|
const hasProperty = path.length > 1;
|
|
@@ -60,7 +60,7 @@ class SchemaValidator {
|
|
|
60
60
|
}
|
|
61
61
|
const data = typeof error.data !== 'string' ? undefined : error.data;
|
|
62
62
|
const searchString = error.data && hasProperty ? `${propertyName}: ${error.data}` : propertyName;
|
|
63
|
-
return Object.assign({ message: text_1.errors.schemaError(data, path, errorMessage), reference: text_1.References.SchemaError, level: 'error' }, utils_1.findPosition(searchString, manifest.yamlContentByLine));
|
|
63
|
+
return Object.assign({ message: text_1.errors.schemaError(data, path, errorMessage), reference: text_1.References.SchemaError, level: 'error' }, (0, utils_1.findPosition)(searchString, manifest.yamlContentByLine));
|
|
64
64
|
};
|
|
65
65
|
this.isDeprecatedField = (section, error) => {
|
|
66
66
|
if (error.keyword === 'additionalProperties') {
|
|
@@ -70,7 +70,7 @@ class SchemaValidator {
|
|
|
70
70
|
};
|
|
71
71
|
this.handleDeprecatedField = (section, error, manifest) => {
|
|
72
72
|
const property = error.params.additionalProperty;
|
|
73
|
-
return Object.assign({ message: text_1.errors.schema.deprecatedValue(section, property, this.getDeprecationInfo(section, property)), reference: text_1.References.Deprecated, level: 'warning' }, utils_1.findPosition(`${section}:`, manifest.yamlContentByLine));
|
|
73
|
+
return Object.assign({ message: text_1.errors.schema.deprecatedValue(section, property, this.getDeprecationInfo(section, property)), reference: text_1.References.Deprecated, level: 'warning' }, (0, utils_1.findPosition)(`${section}:`, manifest.yamlContentByLine));
|
|
74
74
|
};
|
|
75
75
|
this.handleError = (path, error, manifest) => {
|
|
76
76
|
const manifestSection = path[0];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/manifest",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.1",
|
|
4
4
|
"description": "Definitions and validations of the Forge manifest",
|
|
5
5
|
"main": "out/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"fetch-config": "yarn run build && node out/config/index.js"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@types/jest": "^
|
|
18
|
+
"@types/jest": "^29.1.2",
|
|
19
19
|
"@types/js-yaml": "^3.12.2",
|
|
20
20
|
"@types/node": "^12.12.63",
|
|
21
21
|
"@types/node-fetch": "^2.5.7"
|