@forge/lint 3.1.3-next.4 → 3.2.1-next.0

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,35 @@
1
1
  # @forge/lint
2
2
 
3
+ ## 3.2.1-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [2ae0afe]
8
+ - @forge/manifest@3.9.1-next.0
9
+ - @forge/cli-shared@2.6.1-next.0
10
+
11
+ ## 3.2.0
12
+
13
+ ### Minor Changes
14
+
15
+ - 8309725: FORGEPAPA-959 - Add support for linting against JSW and JSM open api
16
+
17
+ ### Patch Changes
18
+
19
+ - 7fe19b4: More resilient linting against handler exports
20
+ - Updated dependencies [69f42bd]
21
+ - Updated dependencies [b447be2]
22
+ - Updated dependencies [4285fc3]
23
+ - Updated dependencies [74e00c8]
24
+ - @forge/cli-shared@2.6.0
25
+ - @forge/manifest@3.9.0
26
+
27
+ ## 3.2.0-next.5
28
+
29
+ ### Minor Changes
30
+
31
+ - 8309725: FORGEPAPA-959 - Add support for linting against JSW and JSM open api
32
+
3
33
  ## 3.1.3-next.4
4
34
 
5
35
  ### Patch Changes
@@ -22,6 +22,8 @@ interface PermissionLintCriteriaMatches {
22
22
  export declare class PermissionLinter extends BaseLinter<ApiCall, PermissionLintCriteriaMatches, ApiCall[]> {
23
23
  private manifest;
24
24
  static JIRA_CACHE_KEY: string;
25
+ static JSM_CACHE_KEY: string;
26
+ static JSW_CACHE_KEY: string;
25
27
  static CONFLUENCE_CACHE_KEY: string;
26
28
  private jira?;
27
29
  private confluence?;
@@ -1 +1 @@
1
- {"version":3,"file":"permission-linter.d.ts","sourceRoot":"","sources":["../../../../src/lint/linters/permission-linter/permission-linter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,IAAI,QAAQ,EAAe,MAAM,iBAAiB,CAAC;AAE/E,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAC3C,OA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AAU;IAIlE,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IA4CvC,SAAS,CAAC,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAajD,SAAS,CAAC,QAAQ,IACd,CAAC,CAAC,MAAM,EAAE,cAAc,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,KAAK,EAAE,YAAY,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC,GACtG,SAAS;IAIb,SAAS,CAAC,oBAAoB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAsB3D,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAWtE,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAKrE,OAAO,CAAC,YAAY;CAarB"}
1
+ {"version":3,"file":"permission-linter.d.ts","sourceRoot":"","sources":["../../../../src/lint/linters/permission-linter/permission-linter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,IAAI,QAAQ,EAAe,MAAM,iBAAiB,CAAC;AAE/E,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAClF,OAAO,EACL,OAAO,EAEP,eAAe,EACf,cAAc,EACd,cAAc,EACd,aAAa,EACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAML,WAAW,EAGZ,MAAM,aAAa,CAAC;AAUrB,UAAU,aAAa;IACrB,KAAK,EAAE;QACL,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;KAC7B,CAAC;CACH;AAED,eAAO,MAAM,mBAAmB,eAAe,CAAC;AAKhD,eAAO,MAAM,sBAAsB,WACzB,cAAc,EAAE,YACd,cAAc,EAAE,mBACT,mBAAmB,GAAG,gCAAgC,GAAG,+BAA+B,u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Q,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAWtE,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAKrE,OAAO,CAAC,YAAY;CAarB"}
@@ -84,20 +84,29 @@ class PermissionLinter extends base_linter_1.default {
84
84
  this.cache = cli_shared_1.CachedConf.getCache(CACHE_KEY);
85
85
  const LOCAL_CONF_SWAGGER = process.env.LOCAL_CONF_SWAGGER;
86
86
  const LOCAL_JIRA_SWAGGER = process.env.LOCAL_JIRA_SWAGGER;
87
+ const LOCAL_JSM_SWAGGER = process.env.LOCAL_JSM_SWAGGER;
88
+ const LOCAL_JSW_SWAGGER = process.env.LOCAL_JSW_SWAGGER;
87
89
  const USE_LOCAL_SWAGGER = process.env.USE_LOCAL_SWAGGER;
88
90
  let swaggerFiles;
89
- if (USE_LOCAL_SWAGGER && LOCAL_CONF_SWAGGER && LOCAL_JIRA_SWAGGER) {
90
- swaggerFiles = [this.getProductPathsFile(LOCAL_JIRA_SWAGGER), this.getProductPathsFile(LOCAL_CONF_SWAGGER)];
91
+ if (USE_LOCAL_SWAGGER && LOCAL_CONF_SWAGGER && LOCAL_JIRA_SWAGGER && LOCAL_JSM_SWAGGER && LOCAL_JSW_SWAGGER) {
92
+ swaggerFiles = [
93
+ this.getProductPathsFile(LOCAL_JIRA_SWAGGER),
94
+ this.getProductPathsFile(LOCAL_JSM_SWAGGER),
95
+ this.getProductPathsFile(LOCAL_JSW_SWAGGER),
96
+ this.getProductPathsFile(LOCAL_CONF_SWAGGER)
97
+ ];
91
98
  }
92
99
  else {
93
100
  swaggerFiles = [
94
101
  this.getProductPaths(PermissionLinter.JIRA_CACHE_KEY, 'https://developer.atlassian.com/cloud/jira/platform/swagger-v3.v3.json'),
102
+ this.getProductPaths(PermissionLinter.JSM_CACHE_KEY, 'https://developer.atlassian.com/cloud/jira/service-desk/swagger.v3.json'),
103
+ this.getProductPaths(PermissionLinter.JSW_CACHE_KEY, 'https://developer.atlassian.com/cloud/jira/software/swagger.v3.json'),
95
104
  this.getProductPaths(PermissionLinter.CONFLUENCE_CACHE_KEY, 'https://developer.atlassian.com/cloud/confluence/swagger.v3.json')
96
105
  ];
97
106
  }
98
- const [jira, confluence] = await Promise.all(swaggerFiles);
99
- this.jira = this.processPaths(jira.paths);
100
- this.confluence = this.processPaths(confluence.paths);
107
+ const [jiraSwagger, jsmSwagger, jswSwagger, confluenceSwagger] = await Promise.all(swaggerFiles);
108
+ this.jira = this.processPaths(Object.assign(Object.assign(Object.assign({}, jiraSwagger.paths), jsmSwagger.paths), jswSwagger.paths));
109
+ this.confluence = this.processPaths(confluenceSwagger.paths);
101
110
  this.nodeVisitors = [
102
111
  new visitors_1.ProductNodeVisitor(),
103
112
  new visitors_1.UIHookNodeVisitor(),
@@ -176,4 +185,6 @@ class PermissionLinter extends base_linter_1.default {
176
185
  }
177
186
  exports.PermissionLinter = PermissionLinter;
178
187
  PermissionLinter.JIRA_CACHE_KEY = 'permissions-jira-cache-key';
188
+ PermissionLinter.JSM_CACHE_KEY = 'permissions-jsm-cache-key';
189
+ PermissionLinter.JSW_CACHE_KEY = 'permissions-jsw-cache-key';
179
190
  PermissionLinter.CONFLUENCE_CACHE_KEY = 'permissions-confluence-cache-key';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/lint",
3
- "version": "3.1.3-next.4",
3
+ "version": "3.2.1-next.0",
4
4
  "description": "Linting for forge apps",
5
5
  "main": "out/index.js",
6
6
  "license": "UNLICENSED",
@@ -15,9 +15,9 @@
15
15
  "@types/node-fetch": "^2.5.7"
16
16
  },
17
17
  "dependencies": {
18
- "@forge/cli-shared": "2.6.0-next.3",
18
+ "@forge/cli-shared": "2.6.1-next.0",
19
19
  "@forge/csp": "1.11.0",
20
- "@forge/manifest": "3.9.0-next.2",
20
+ "@forge/manifest": "3.9.1-next.0",
21
21
  "@typescript-eslint/typescript-estree": "^3.5.0",
22
22
  "cross-spawn": "^7.0.1",
23
23
  "node-fetch": "2.6.1",