@forge/manifest 3.5.0-next.1 → 3.5.0-next.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @forge/manifest
2
2
 
3
+ ## 3.5.0-next.4
4
+
5
+ ### Patch Changes
6
+
7
+ - e411a29: Update manifest definitions
8
+
9
+ ## 3.5.0-next.3
10
+
11
+ ### Minor Changes
12
+
13
+ - d094c69: [CONFDEV-79785] Add manifest validation for confluence:globalSettings new, optional, useAsConfig property to ensure it's only designated once
14
+
15
+ ## 3.5.0-next.2
16
+
17
+ ### Patch Changes
18
+
19
+ - 02839be: Update manifest definitions
20
+
3
21
  ## 3.5.0-next.1
4
22
 
5
23
  ### Patch Changes
@@ -1111,6 +1111,16 @@
1111
1111
  "displayConditions": {
1112
1112
  "type": "object"
1113
1113
  },
1114
+ "useAsConfig": {
1115
+ "type": "boolean",
1116
+ "default": false,
1117
+ "description": "A flag indicating whether this settings instance will be used as the app's configuration"
1118
+ },
1119
+ "useAsGetStarted": {
1120
+ "type": "boolean",
1121
+ "default": false,
1122
+ "description": "A flag indicating whether this settings instance will be used as the app's \"Get Started\""
1123
+ },
1114
1124
  "key": {
1115
1125
  "$ref": "#/definitions/ModuleKeySchema"
1116
1126
  }
@@ -1158,6 +1168,16 @@
1158
1168
  "displayConditions": {
1159
1169
  "type": "object"
1160
1170
  },
1171
+ "useAsConfig": {
1172
+ "type": "boolean",
1173
+ "default": false,
1174
+ "description": "A flag indicating whether this settings instance will be used as the app's configuration"
1175
+ },
1176
+ "useAsGetStarted": {
1177
+ "type": "boolean",
1178
+ "default": false,
1179
+ "description": "A flag indicating whether this settings instance will be used as the app's \"Get Started\""
1180
+ },
1161
1181
  "key": {
1162
1182
  "$ref": "#/definitions/ModuleKeySchema"
1163
1183
  }
@@ -1305,7 +1325,22 @@
1305
1325
  "type": "string"
1306
1326
  },
1307
1327
  "errorMessage": {
1308
- "type": "string"
1328
+ "anyOf": [
1329
+ {
1330
+ "type": "object",
1331
+ "properties": {
1332
+ "expression": {
1333
+ "type": "string"
1334
+ }
1335
+ },
1336
+ "required": [
1337
+ "expression"
1338
+ ]
1339
+ },
1340
+ {
1341
+ "type": "string"
1342
+ }
1343
+ ]
1309
1344
  },
1310
1345
  "view": {
1311
1346
  "type": "object",
@@ -2769,63 +2804,64 @@
2769
2804
  {
2770
2805
  "type": "object",
2771
2806
  "properties": {
2807
+ "function": {
2808
+ "type": "string",
2809
+ "minLength": 1,
2810
+ "maxLength": 255,
2811
+ "pattern": "^[a-zA-Z0-9-_]+$"
2812
+ },
2813
+ "edit": {
2814
+ "type": "object",
2815
+ "properties": {
2816
+ "function": {
2817
+ "type": "string",
2818
+ "minLength": 1,
2819
+ "maxLength": 255,
2820
+ "pattern": "^[a-zA-Z0-9-_]+$"
2821
+ }
2822
+ },
2823
+ "required": [
2824
+ "function"
2825
+ ]
2826
+ },
2772
2827
  "title": {
2773
- "oneOf": [
2828
+ "minLength": 1,
2829
+ "maxLength": 255,
2830
+ "anyOf": [
2774
2831
  {
2775
2832
  "type": "object",
2776
2833
  "properties": {
2777
2834
  "text": {
2778
- "type": "string",
2779
2835
  "minLength": 1,
2780
- "maxLength": 255
2836
+ "maxLength": 255,
2837
+ "type": "string"
2781
2838
  },
2782
2839
  "href": {
2783
- "type": "string",
2784
2840
  "minLength": 1,
2785
- "maxLength": 1000
2841
+ "maxLength": 1000,
2842
+ "type": "string"
2786
2843
  }
2787
2844
  },
2788
2845
  "required": [
2846
+ "href",
2789
2847
  "text"
2790
2848
  ]
2791
2849
  },
2792
2850
  {
2793
- "type": "string",
2794
- "minLength": 1,
2795
- "maxLength": 255
2851
+ "type": "string"
2796
2852
  }
2797
2853
  ]
2798
2854
  },
2799
2855
  "description": {
2800
- "type": "string",
2801
2856
  "minLength": 1,
2802
- "maxLength": 255
2857
+ "maxLength": 255,
2858
+ "type": "string"
2803
2859
  },
2804
2860
  "thumbnail": {
2805
2861
  "type": "string",
2806
2862
  "minLength": 1,
2807
2863
  "maxLength": 255
2808
2864
  },
2809
- "function": {
2810
- "type": "string",
2811
- "minLength": 1,
2812
- "maxLength": 255,
2813
- "pattern": "^[a-zA-Z0-9-_]+$"
2814
- },
2815
- "edit": {
2816
- "type": "object",
2817
- "properties": {
2818
- "function": {
2819
- "type": "string",
2820
- "minLength": 1,
2821
- "maxLength": 255,
2822
- "pattern": "^[a-zA-Z0-9-_]+$"
2823
- }
2824
- },
2825
- "required": [
2826
- "function"
2827
- ]
2828
- },
2829
2865
  "displayConditions": {
2830
2866
  "type": "object",
2831
2867
  "properties": {}
@@ -2835,10 +2871,9 @@
2835
2871
  }
2836
2872
  },
2837
2873
  "required": [
2838
- "title",
2839
2874
  "description",
2840
- "thumbnail",
2841
2875
  "function",
2876
+ "title",
2842
2877
  "key"
2843
2878
  ]
2844
2879
  },
@@ -2866,63 +2901,58 @@
2866
2901
  "function"
2867
2902
  ]
2868
2903
  },
2904
+ "edit": {
2905
+ "type": "object",
2906
+ "properties": {
2907
+ "resource": {
2908
+ "type": "string",
2909
+ "minLength": 1,
2910
+ "maxLength": 23,
2911
+ "pattern": "^[a-zA-Z0-9_\\-]+$"
2912
+ }
2913
+ },
2914
+ "required": [
2915
+ "resource"
2916
+ ]
2917
+ },
2869
2918
  "title": {
2870
- "oneOf": [
2919
+ "minLength": 1,
2920
+ "maxLength": 255,
2921
+ "anyOf": [
2871
2922
  {
2872
2923
  "type": "object",
2873
2924
  "properties": {
2874
2925
  "text": {
2875
- "type": "string",
2876
2926
  "minLength": 1,
2877
- "maxLength": 255
2927
+ "maxLength": 255,
2928
+ "type": "string"
2878
2929
  },
2879
2930
  "href": {
2880
- "type": "string",
2881
2931
  "minLength": 1,
2882
- "maxLength": 1000
2932
+ "maxLength": 1000,
2933
+ "type": "string"
2883
2934
  }
2884
2935
  },
2885
2936
  "required": [
2937
+ "href",
2886
2938
  "text"
2887
2939
  ]
2888
2940
  },
2889
2941
  {
2890
- "type": "string",
2891
- "minLength": 1,
2892
- "maxLength": 255
2942
+ "type": "string"
2893
2943
  }
2894
2944
  ]
2895
2945
  },
2896
2946
  "description": {
2897
- "type": "string",
2898
2947
  "minLength": 1,
2899
- "maxLength": 255
2948
+ "maxLength": 255,
2949
+ "type": "string"
2900
2950
  },
2901
2951
  "thumbnail": {
2902
2952
  "type": "string",
2903
2953
  "minLength": 1,
2904
2954
  "maxLength": 255
2905
2955
  },
2906
- "function": {
2907
- "type": "string",
2908
- "minLength": 1,
2909
- "maxLength": 255,
2910
- "pattern": "^[a-zA-Z0-9-_]+$"
2911
- },
2912
- "edit": {
2913
- "type": "object",
2914
- "properties": {
2915
- "resource": {
2916
- "type": "string",
2917
- "minLength": 1,
2918
- "maxLength": 23,
2919
- "pattern": "^[a-zA-Z0-9_\\-]+$"
2920
- }
2921
- },
2922
- "required": [
2923
- "resource"
2924
- ]
2925
- },
2926
2956
  "displayConditions": {
2927
2957
  "type": "object",
2928
2958
  "properties": {}
@@ -2932,10 +2962,9 @@
2932
2962
  }
2933
2963
  },
2934
2964
  "required": [
2935
- "title",
2936
2965
  "description",
2937
- "thumbnail",
2938
2966
  "resource",
2967
+ "title",
2939
2968
  "key"
2940
2969
  ]
2941
2970
  }
@@ -663,6 +663,14 @@ export interface Modules {
663
663
  displayConditions?: {
664
664
  [k: string]: unknown;
665
665
  };
666
+ /**
667
+ * A flag indicating whether this settings instance will be used as the app's configuration
668
+ */
669
+ useAsConfig?: boolean;
670
+ /**
671
+ * A flag indicating whether this settings instance will be used as the app's "Get Started"
672
+ */
673
+ useAsGetStarted?: boolean;
666
674
  key: ModuleKeySchema;
667
675
  [k: string]: unknown;
668
676
  }
@@ -676,6 +684,14 @@ export interface Modules {
676
684
  displayConditions?: {
677
685
  [k: string]: unknown;
678
686
  };
687
+ /**
688
+ * A flag indicating whether this settings instance will be used as the app's configuration
689
+ */
690
+ useAsConfig?: boolean;
691
+ /**
692
+ * A flag indicating whether this settings instance will be used as the app's "Get Started"
693
+ */
694
+ useAsGetStarted?: boolean;
679
695
  key: ModuleKeySchema;
680
696
  [k: string]: unknown;
681
697
  }
@@ -687,6 +703,14 @@ export interface Modules {
687
703
  displayConditions?: {
688
704
  [k: string]: unknown;
689
705
  };
706
+ /**
707
+ * A flag indicating whether this settings instance will be used as the app's configuration
708
+ */
709
+ useAsConfig?: boolean;
710
+ /**
711
+ * A flag indicating whether this settings instance will be used as the app's "Get Started"
712
+ */
713
+ useAsGetStarted?: boolean;
690
714
  key: ModuleKeySchema;
691
715
  [k: string]: unknown;
692
716
  }
@@ -700,6 +724,14 @@ export interface Modules {
700
724
  displayConditions?: {
701
725
  [k: string]: unknown;
702
726
  };
727
+ /**
728
+ * A flag indicating whether this settings instance will be used as the app's configuration
729
+ */
730
+ useAsConfig?: boolean;
731
+ /**
732
+ * A flag indicating whether this settings instance will be used as the app's "Get Started"
733
+ */
734
+ useAsGetStarted?: boolean;
703
735
  key: ModuleKeySchema;
704
736
  [k: string]: unknown;
705
737
  }
@@ -765,7 +797,12 @@ export interface Modules {
765
797
  description: string;
766
798
  function?: string;
767
799
  expression?: string;
768
- errorMessage?: string;
800
+ errorMessage?:
801
+ | {
802
+ expression: string;
803
+ [k: string]: unknown;
804
+ }
805
+ | string;
769
806
  view?: {
770
807
  resource: string;
771
808
  [k: string]: unknown;
@@ -786,7 +823,12 @@ export interface Modules {
786
823
  description: string;
787
824
  function?: string;
788
825
  expression?: string;
789
- errorMessage?: string;
826
+ errorMessage?:
827
+ | {
828
+ expression: string;
829
+ [k: string]: unknown;
830
+ }
831
+ | string;
790
832
  view?: {
791
833
  resource: string;
792
834
  [k: string]: unknown;
@@ -1568,20 +1610,20 @@ export interface Modules {
1568
1610
  'jira:dashboardGadget'?: [
1569
1611
  (
1570
1612
  | {
1613
+ function: string;
1614
+ edit?: {
1615
+ function: string;
1616
+ [k: string]: unknown;
1617
+ };
1571
1618
  title:
1572
1619
  | {
1573
1620
  text: string;
1574
- href?: string;
1621
+ href: string;
1575
1622
  [k: string]: unknown;
1576
1623
  }
1577
1624
  | string;
1578
1625
  description: string;
1579
- thumbnail: string;
1580
- function: string;
1581
- edit?: {
1582
- function: string;
1583
- [k: string]: unknown;
1584
- };
1626
+ thumbnail?: string;
1585
1627
  displayConditions?: {
1586
1628
  [k: string]: unknown;
1587
1629
  };
@@ -1593,20 +1635,19 @@ export interface Modules {
1593
1635
  resolver?: {
1594
1636
  function: string;
1595
1637
  };
1638
+ edit?: {
1639
+ resource: string;
1640
+ [k: string]: unknown;
1641
+ };
1596
1642
  title:
1597
1643
  | {
1598
1644
  text: string;
1599
- href?: string;
1645
+ href: string;
1600
1646
  [k: string]: unknown;
1601
1647
  }
1602
1648
  | string;
1603
1649
  description: string;
1604
- thumbnail: string;
1605
- function?: string;
1606
- edit?: {
1607
- resource: string;
1608
- [k: string]: unknown;
1609
- };
1650
+ thumbnail?: string;
1610
1651
  displayConditions?: {
1611
1652
  [k: string]: unknown;
1612
1653
  };
@@ -1616,20 +1657,20 @@ export interface Modules {
1616
1657
  ),
1617
1658
  ...(
1618
1659
  | {
1660
+ function: string;
1661
+ edit?: {
1662
+ function: string;
1663
+ [k: string]: unknown;
1664
+ };
1619
1665
  title:
1620
1666
  | {
1621
1667
  text: string;
1622
- href?: string;
1668
+ href: string;
1623
1669
  [k: string]: unknown;
1624
1670
  }
1625
1671
  | string;
1626
1672
  description: string;
1627
- thumbnail: string;
1628
- function: string;
1629
- edit?: {
1630
- function: string;
1631
- [k: string]: unknown;
1632
- };
1673
+ thumbnail?: string;
1633
1674
  displayConditions?: {
1634
1675
  [k: string]: unknown;
1635
1676
  };
@@ -1641,20 +1682,19 @@ export interface Modules {
1641
1682
  resolver?: {
1642
1683
  function: string;
1643
1684
  };
1685
+ edit?: {
1686
+ resource: string;
1687
+ [k: string]: unknown;
1688
+ };
1644
1689
  title:
1645
1690
  | {
1646
1691
  text: string;
1647
- href?: string;
1692
+ href: string;
1648
1693
  [k: string]: unknown;
1649
1694
  }
1650
1695
  | string;
1651
1696
  description: string;
1652
- thumbnail: string;
1653
- function?: string;
1654
- edit?: {
1655
- resource: string;
1656
- [k: string]: unknown;
1657
- };
1697
+ thumbnail?: string;
1658
1698
  displayConditions?: {
1659
1699
  [k: string]: unknown;
1660
1700
  };
@@ -33,6 +33,11 @@ export declare const errors: {
33
33
  propertyNotAllowed: (moduleKey: string, propertyName: string) => string;
34
34
  typeMismatch: (moduleKey: string, propertyName: string, errorDetails: string) => string;
35
35
  };
36
+ confluence: {
37
+ globalSettingsValidator: {
38
+ multipleUseAsConfig: (keys: string[]) => string;
39
+ };
40
+ };
36
41
  jiraWorkflowValidator: {
37
42
  missingProperty: (key: string) => string;
38
43
  invalidProperty: (key: string) => string;
@@ -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;6CAEhC,MAAM,KAAG,MAAM;;yCAGr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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"}
@@ -45,6 +45,11 @@ exports.errors = {
45
45
  propertyNotAllowed: (moduleKey, propertyName) => `Display conditions of the "${moduleKey}" module are invalid. "${propertyName}" property is not allowed.`,
46
46
  typeMismatch: (moduleKey, propertyName, errorDetails) => `Display conditions of the "${moduleKey}" module are invalid. "${propertyName}" property ${errorDetails}.`
47
47
  },
48
+ confluence: {
49
+ globalSettingsValidator: {
50
+ multipleUseAsConfig: (keys) => `There can be only 1 ${types_1.AllModuleTypes.ConfluenceGlobalSettings} module which designates "useAsConfig": true. Modules containing designation: ${keys.join(', ')}`
51
+ }
52
+ },
48
53
  jiraWorkflowValidator: {
49
54
  missingProperty: (key) => `${types_1.AllModuleTypes.JiraWorkflowValidator} module '${key}' must have either a function or expression.`,
50
55
  invalidProperty: (key) => `${types_1.AllModuleTypes.JiraWorkflowValidator} module '${key}' can only have either a function or expression`
@@ -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;AAK3D,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;CA0OzG"}
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,7 +6,8 @@ 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 issue_adjustment_1 = require("./modules-validators/issue-adjustment");
9
+ const issue_adjustment_1 = require("./modules-validators/jira/issue-adjustment");
10
+ const global_settings_1 = require("./modules-validators/confluence/global-settings");
10
11
  class ModulesValidator {
11
12
  constructor() {
12
13
  this.functionHandlerRegex = /^([a-zA-Z0-9-_]+)\.([a-zA-Z0-9-_]+)$/;
@@ -128,6 +129,7 @@ class ModulesValidator {
128
129
  }
129
130
  });
130
131
  });
132
+ validationErrors.push(...global_settings_1.validateGlobalSettingsModule(modules, yamlContentByLine));
131
133
  }
132
134
  return {
133
135
  success: validationErrors.length === 0,
@@ -0,0 +1,5 @@
1
+ import { ValidationError } from '../../../types';
2
+ import { Modules } from '../../../schema/manifest';
3
+ declare const validateGlobalSettingsModule: (modules: Modules, yamlContentByLine?: string[] | undefined) => ValidationError[];
4
+ export { validateGlobalSettingsModule };
5
+ //# sourceMappingURL=global-settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"global-settings.d.ts","sourceRoot":"","sources":["../../../../src/validators/modules-validators/confluence/global-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAwBnD,QAAA,MAAM,4BAA4B,YAAa,OAAO,+CAAiC,eAAe,EASrG,CAAC;AAEF,OAAO,EAAE,4BAA4B,EAAE,CAAC"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateGlobalSettingsModule = void 0;
4
+ const types_1 = require("../../../types");
5
+ const text_1 = require("../../../text");
6
+ const utils_1 = require("../../../utils");
7
+ const validateMultipleUseAsConfig = (globalSettingsModules, yamlContentByLine) => {
8
+ const validationErrors = [];
9
+ const globalSettingsModulesUsedAsConfig = globalSettingsModules.filter((module) => module.useAsConfig);
10
+ if (globalSettingsModulesUsedAsConfig.length > 1) {
11
+ const moduleKeys = globalSettingsModulesUsedAsConfig.map((module) => module.key);
12
+ validationErrors.push(Object.assign({ message: text_1.errors.modules.confluence.globalSettingsValidator.multipleUseAsConfig(moduleKeys), reference: text_1.References.Modules, level: 'error' }, utils_1.findPosition(moduleKeys[moduleKeys.length - 1], yamlContentByLine)));
13
+ }
14
+ return validationErrors;
15
+ };
16
+ const validateGlobalSettingsModule = (modules, yamlContentByLine) => {
17
+ const validationErrors = [];
18
+ const globalSettingsModules = modules[types_1.AllModuleTypes.ConfluenceGlobalSettings];
19
+ if (globalSettingsModules) {
20
+ validationErrors.push(...validateMultipleUseAsConfig(globalSettingsModules, yamlContentByLine));
21
+ }
22
+ return validationErrors;
23
+ };
24
+ exports.validateGlobalSettingsModule = validateGlobalSettingsModule;
@@ -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"}
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.validateIssueAdjustmentModule = void 0;
4
- const types_1 = require("../../types");
5
- const text_1 = require("../../text");
6
- const utils_1 = require("../../utils");
4
+ const types_1 = require("../../../types");
5
+ const text_1 = require("../../../text");
6
+ const utils_1 = require("../../../utils");
7
7
  function validateIssueAdjustmentModule(modules, yamlContentByLine) {
8
8
  const validationErrors = [];
9
9
  const moduleType = types_1.AllModuleTypes.JiraIssueAdjustment;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/manifest",
3
- "version": "3.5.0-next.1",
3
+ "version": "3.5.0-next.4",
4
4
  "description": "Definitions and validations of the Forge manifest",
5
5
  "main": "out/index.js",
6
6
  "scripts": {
@@ -1,4 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"issue-adjustment.d.ts","sourceRoot":"","sources":["../../../src/validators/modules-validators/issue-adjustment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,eAAe,EAAE,MAAM,aAAa,CAAC;AAG9D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,OAAO,EAAE,iBAAiB,CAAC,EAAE,MAAM,EAAE,GAAG,eAAe,EAAE,CAe/G"}