@forge/lint 2.0.1-next.2 → 3.0.0-next.6
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 +32 -0
- package/out/lint/lint.d.ts.map +1 -1
- package/out/lint/lint.js +3 -1
- package/out/lint/linters/permission-linter/verifiers/content-property-verifier.d.ts +6 -1
- package/out/lint/linters/permission-linter/verifiers/content-property-verifier.d.ts.map +1 -1
- package/out/lint/linters/permission-linter/verifiers/content-property-verifier.js +66 -16
- package/out/lint/linters/permission-linter/verifiers/product-verifier.d.ts +1 -0
- package/out/lint/linters/permission-linter/verifiers/product-verifier.d.ts.map +1 -1
- package/out/lint/linters/permission-linter/verifiers/product-verifier.js +25 -3
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @forge/lint
|
|
2
2
|
|
|
3
|
+
## 3.0.0-next.6
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 4922d09: Only errors set the process exitCode to 1, warnings do not anymore.
|
|
8
|
+
|
|
9
|
+
## 2.0.1-next.5
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [f6901fd]
|
|
14
|
+
- @forge/manifest@3.1.0-next.5
|
|
15
|
+
- @forge/cli-shared@2.2.1-next.5
|
|
16
|
+
|
|
17
|
+
## 2.0.1-next.4
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- 2e70a0b: Accept both granular and deprecated scopes when verifying scopes required for Content Properties.
|
|
22
|
+
- Updated dependencies [d3ccc04]
|
|
23
|
+
- @forge/manifest@3.1.0-next.4
|
|
24
|
+
- @forge/cli-shared@2.2.1-next.4
|
|
25
|
+
|
|
26
|
+
## 2.0.1-next.3
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- 1f7c428: Accept both deprecated scopes and granular scopes when verifying scopes required for REST product endpoints.
|
|
31
|
+
- Updated dependencies [debe251]
|
|
32
|
+
- @forge/manifest@3.1.0-next.3
|
|
33
|
+
- @forge/cli-shared@2.2.1-next.3
|
|
34
|
+
|
|
3
35
|
## 2.0.1-next.2
|
|
4
36
|
|
|
5
37
|
### Patch Changes
|
package/out/lint/lint.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../src/lint/lint.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,MAAM,IAAI,CAAC;AAIpB,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAkB,MAAM,oBAAoB,CAAC;AAQxG,qBAAa,iBAAkB,SAAQ,KAAK;CAAG;AAE/C,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,iBAAiB,WAAY,UAAU,eAAe,UAAU,EAAE,4BAAuB,
|
|
1
|
+
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../src/lint/lint.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,MAAM,IAAI,CAAC;AAIpB,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAkB,MAAM,oBAAoB,CAAC;AAQxG,qBAAa,iBAAkB,SAAQ,KAAK;CAAG;AAE/C,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,iBAAiB,WAAY,UAAU,eAAe,UAAU,EAAE,4BAAuB,IA+CrG,CAAC;AAEF,eAAO,MAAM,YAAY,gBAAiB,UAAU,EAAE,KAAG,YAQxD,CAAC;AAEF,eAAO,MAAM,eAAe,aAChB,MAAM,UACR,OAAO,QAAQ,oBACN,OAAO,EAAE,CAAC,QAAQ,CAAC,aAAa,KAChD,OAAO,CAAC,SAAS,CAOnB,CAAC;AAEF,eAAO,MAAM,IAAI,gBACF,MAAM,EAAE,YACX,QAAQ,eACL,MAAM,UACX,UAAU,6BAhBR,MAAM,UACR,OAAO,QAAQ,oBACN,OAAO,EAAE,CAAC,QAAQ,CAAC,aAAa,KAChD,OAAO,CAAC,SAAS,CAAC,YAeV,eAAe,EAAE,KAOzB,OAAO,CAAC,UAAU,EAAE,CAmCtB,CAAC;AAEF,eAAO,MAAM,QAAQ,WACX,UAAU,WACV,eAAe,KACtB,OAAO,CAAC,UAAU,EAAE,CAGtB,CAAC"}
|
package/out/lint/lint.js
CHANGED
|
@@ -55,7 +55,9 @@ exports.reportLintResults = (logger, lintResults, showSummary = true) => {
|
|
|
55
55
|
logger.info(cli_shared_1.Text.lint.noFixableProblems);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
|
|
58
|
+
if (numErrors) {
|
|
59
|
+
process.exitCode = 1;
|
|
60
|
+
}
|
|
59
61
|
}
|
|
60
62
|
};
|
|
61
63
|
exports.problemCount = (lintResults) => {
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { LintClass, LintResultRule } from '../../../linter-interface';
|
|
2
2
|
import { BaseLintIssueVerifier, LintIssueVerifier } from '../../verifier-interface';
|
|
3
3
|
import { ContentPropertyApiCall } from '../api-call-interface';
|
|
4
|
-
|
|
4
|
+
declare type ContentPropertyPermissions = {
|
|
5
|
+
current: string[];
|
|
6
|
+
deprecated: string[];
|
|
7
|
+
};
|
|
8
|
+
export declare const CONTENT_PROPERTY_PERMISSIONS_MAP: Record<string, Record<string, ContentPropertyPermissions>>;
|
|
5
9
|
export declare class ContentPropertyVerifier extends BaseLintIssueVerifier implements LintIssueVerifier<ContentPropertyApiCall[]> {
|
|
6
10
|
protected getLintClass(): LintClass;
|
|
7
11
|
process(apiCalls: ContentPropertyApiCall[]): Promise<LintResultRule[]>;
|
|
8
12
|
private getMissingScopes;
|
|
9
13
|
}
|
|
14
|
+
export {};
|
|
10
15
|
//# sourceMappingURL=content-property-verifier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-property-verifier.d.ts","sourceRoot":"","sources":["../../../../../src/lint/linters/permission-linter/verifiers/content-property-verifier.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,
|
|
1
|
+
{"version":3,"file":"content-property-verifier.d.ts","sourceRoot":"","sources":["../../../../../src/lint/linters/permission-linter/verifiers/content-property-verifier.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,aAAK,0BAA0B,GAAG;IAChC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAyDvG,CAAC;AAEF,qBAAa,uBACX,SAAQ,qBACR,YAAW,iBAAiB,CAAC,sBAAsB,EAAE,CAAC;IACtD,SAAS,CAAC,YAAY,IAAI,SAAS;IAItB,OAAO,CAAC,QAAQ,EAAE,sBAAsB,EAAE,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAuBnF,OAAO,CAAC,gBAAgB;CAyBzB"}
|
|
@@ -7,24 +7,60 @@ const text_1 = require("../../../text");
|
|
|
7
7
|
const verifier_interface_1 = require("../../verifier-interface");
|
|
8
8
|
exports.CONTENT_PROPERTY_PERMISSIONS_MAP = {
|
|
9
9
|
onJiraIssue: {
|
|
10
|
-
get:
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
get: {
|
|
11
|
+
current: ['read:issue.property:jira'],
|
|
12
|
+
deprecated: ['read:jira-work']
|
|
13
|
+
},
|
|
14
|
+
set: {
|
|
15
|
+
current: ['write:issue.property:jira'],
|
|
16
|
+
deprecated: ['write:jira-work']
|
|
17
|
+
},
|
|
18
|
+
delete: {
|
|
19
|
+
current: ['delete:issue.property:jira'],
|
|
20
|
+
deprecated: ['write:jira-work']
|
|
21
|
+
}
|
|
13
22
|
},
|
|
14
23
|
onJiraProject: {
|
|
15
|
-
get:
|
|
16
|
-
|
|
17
|
-
|
|
24
|
+
get: {
|
|
25
|
+
current: ['read:project.property:jira'],
|
|
26
|
+
deprecated: ['read:jira-work']
|
|
27
|
+
},
|
|
28
|
+
set: {
|
|
29
|
+
current: ['write:project.property:jira'],
|
|
30
|
+
deprecated: ['manage:jira-project']
|
|
31
|
+
},
|
|
32
|
+
delete: {
|
|
33
|
+
current: ['delete:project.property:jira'],
|
|
34
|
+
deprecated: ['manage:jira-project']
|
|
35
|
+
}
|
|
18
36
|
},
|
|
19
37
|
onConfluencePage: {
|
|
20
|
-
get:
|
|
21
|
-
|
|
22
|
-
|
|
38
|
+
get: {
|
|
39
|
+
current: ['read:content-details:confluence'],
|
|
40
|
+
deprecated: ['read:confluence-props']
|
|
41
|
+
},
|
|
42
|
+
set: {
|
|
43
|
+
current: ['read:content.property:confluence', 'write:content.property:confluence'],
|
|
44
|
+
deprecated: ['read:confluence-props', 'write:confluence-props']
|
|
45
|
+
},
|
|
46
|
+
delete: {
|
|
47
|
+
current: ['write:content.property:confluence'],
|
|
48
|
+
deprecated: ['write:confluence-props']
|
|
49
|
+
}
|
|
23
50
|
},
|
|
24
51
|
onConfluenceSpace: {
|
|
25
|
-
get:
|
|
26
|
-
|
|
27
|
-
|
|
52
|
+
get: {
|
|
53
|
+
current: ['read:content-details:confluence'],
|
|
54
|
+
deprecated: ['read:confluence-props']
|
|
55
|
+
},
|
|
56
|
+
set: {
|
|
57
|
+
current: ['read:space.property:confluence', 'write:space.property:confluence'],
|
|
58
|
+
deprecated: ['read:confluence-props', 'write:confluence-props']
|
|
59
|
+
},
|
|
60
|
+
delete: {
|
|
61
|
+
current: ['write:space.property:confluence'],
|
|
62
|
+
deprecated: ['write:confluence-props']
|
|
63
|
+
}
|
|
28
64
|
}
|
|
29
65
|
};
|
|
30
66
|
class ContentPropertyVerifier extends verifier_interface_1.BaseLintIssueVerifier {
|
|
@@ -50,10 +86,24 @@ class ContentPropertyVerifier extends verifier_interface_1.BaseLintIssueVerifier
|
|
|
50
86
|
getMissingScopes({ context, method }) {
|
|
51
87
|
var _a, _b;
|
|
52
88
|
const existingScopes = (_b = (_a = this.manifest) === null || _a === void 0 ? void 0 : _a.permissions) === null || _b === void 0 ? void 0 : _b.scopes;
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
89
|
+
const requiredScopesCurrent = exports.CONTENT_PROPERTY_PERMISSIONS_MAP[context][method]['current'];
|
|
90
|
+
const requiredScopesDeprecated = exports.CONTENT_PROPERTY_PERMISSIONS_MAP[context][method]['deprecated'];
|
|
91
|
+
const missingCurrentPerms = requiredScopesCurrent.filter((perm) => !(existingScopes === null || existingScopes === void 0 ? void 0 : existingScopes.includes(perm)));
|
|
92
|
+
if (missingCurrentPerms.length == 0)
|
|
93
|
+
return [];
|
|
94
|
+
let missingDeprecatedPerms = null;
|
|
95
|
+
if (requiredScopesDeprecated) {
|
|
96
|
+
missingDeprecatedPerms = requiredScopesDeprecated.filter((perm) => !(existingScopes === null || existingScopes === void 0 ? void 0 : existingScopes.includes(perm)));
|
|
97
|
+
if (missingDeprecatedPerms.length == 0)
|
|
98
|
+
return [];
|
|
99
|
+
}
|
|
100
|
+
if (missingCurrentPerms.length < requiredScopesCurrent.length) {
|
|
101
|
+
return missingCurrentPerms;
|
|
102
|
+
}
|
|
103
|
+
if (missingDeprecatedPerms && missingDeprecatedPerms.length < requiredScopesDeprecated.length) {
|
|
104
|
+
return missingDeprecatedPerms;
|
|
105
|
+
}
|
|
106
|
+
return requiredScopesCurrent;
|
|
57
107
|
}
|
|
58
108
|
}
|
|
59
109
|
exports.ContentPropertyVerifier = ContentPropertyVerifier;
|
|
@@ -27,6 +27,7 @@ export declare class ProductVerifier extends BaseLintIssueVerifier implements Li
|
|
|
27
27
|
private lookupApiCall;
|
|
28
28
|
private getMissingPermissionScopes;
|
|
29
29
|
private getRequiredScopes;
|
|
30
|
+
private getRequiredDeprecatedScopes;
|
|
30
31
|
}
|
|
31
32
|
export {};
|
|
32
33
|
//# sourceMappingURL=product-verifier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-verifier.d.ts","sourceRoot":"","sources":["../../../../../src/lint/linters/permission-linter/verifiers/product-verifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAGpF,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE7D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC;AAE7D,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,CAAC,MAAM,EAAE,MAAM,GAAG;QAChB,QAAQ,EAAE,aAAa,EAAE,CAAC;QAC1B,2BAA2B,CAAC,EAAE,qBAAqB,EAAE,CAAC;KACvD,CAAC;CACH;AAED,UAAU,aAAa;IACrB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC9B;AAED,oBAAY,uBAAuB,GAAG,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAEjE,qBAAa,eAAgB,SAAQ,qBAAsB,YAAW,iBAAiB,CAAC,OAAO,EAAE,CAAC;IAI9F,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAHxB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,QAAQ,EACD,OAAO,EAAE,uBAAuB,EAChC,OAAO,EAAE,MAAM;IAKlC,SAAS,CAAC,YAAY,IAAI,SAAS;IAItB,OAAO,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAoC3E,OAAO,CAAC,aAAa;IAerB,OAAO,CAAC,0BAA0B;
|
|
1
|
+
{"version":3,"file":"product-verifier.d.ts","sourceRoot":"","sources":["../../../../../src/lint/linters/permission-linter/verifiers/product-verifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAGpF,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE7D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC;AAE7D,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,CAAC,MAAM,EAAE,MAAM,GAAG;QAChB,QAAQ,EAAE,aAAa,EAAE,CAAC;QAC1B,2BAA2B,CAAC,EAAE,qBAAqB,EAAE,CAAC;KACvD,CAAC;CACH;AAED,UAAU,aAAa;IACrB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC9B;AAED,oBAAY,uBAAuB,GAAG,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAEjE,qBAAa,eAAgB,SAAQ,qBAAsB,YAAW,iBAAiB,CAAC,OAAO,EAAE,CAAC;IAI9F,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAHxB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,QAAQ,EACD,OAAO,EAAE,uBAAuB,EAChC,OAAO,EAAE,MAAM;IAKlC,SAAS,CAAC,YAAY,IAAI,SAAS;IAItB,OAAO,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAoC3E,OAAO,CAAC,aAAa;IAerB,OAAO,CAAC,0BAA0B;IA8BlC,OAAO,CAAC,iBAAiB;IAqBzB,OAAO,CAAC,2BAA2B;CAWpC"}
|
|
@@ -53,11 +53,24 @@ class ProductVerifier extends verifier_interface_1.BaseLintIssueVerifier {
|
|
|
53
53
|
}
|
|
54
54
|
getMissingPermissionScopes(apiCall) {
|
|
55
55
|
var _a, _b, _c;
|
|
56
|
-
const
|
|
56
|
+
const currentScopes = this.getRequiredScopes(apiCall);
|
|
57
|
+
const deprecatedScopes = this.getRequiredDeprecatedScopes(apiCall);
|
|
57
58
|
if (!((_c = (_b = (_a = this.manifest) === null || _a === void 0 ? void 0 : _a.permissions) === null || _b === void 0 ? void 0 : _b.scopes) === null || _c === void 0 ? void 0 : _c.length)) {
|
|
58
|
-
return
|
|
59
|
+
return currentScopes;
|
|
59
60
|
}
|
|
60
|
-
|
|
61
|
+
const missingCurrentScopes = currentScopes.filter((scope) => { var _a, _b; return !((_b = (_a = this.manifest.permissions) === null || _a === void 0 ? void 0 : _a.scopes) === null || _b === void 0 ? void 0 : _b.includes(scope)); });
|
|
62
|
+
if (!missingCurrentScopes.length)
|
|
63
|
+
return [];
|
|
64
|
+
const missingDeprecatedScopes = deprecatedScopes.filter((scope) => { var _a, _b; return !((_b = (_a = this.manifest.permissions) === null || _a === void 0 ? void 0 : _a.scopes) === null || _b === void 0 ? void 0 : _b.includes(scope)); });
|
|
65
|
+
if (deprecatedScopes.length && !missingDeprecatedScopes.length)
|
|
66
|
+
return [];
|
|
67
|
+
if (missingCurrentScopes.length < currentScopes.length) {
|
|
68
|
+
return missingCurrentScopes;
|
|
69
|
+
}
|
|
70
|
+
if (missingDeprecatedScopes.length < deprecatedScopes.length) {
|
|
71
|
+
return missingDeprecatedScopes;
|
|
72
|
+
}
|
|
73
|
+
return missingCurrentScopes;
|
|
61
74
|
}
|
|
62
75
|
getRequiredScopes({ regex, method }) {
|
|
63
76
|
var _a, _b, _c;
|
|
@@ -72,5 +85,14 @@ class ProductVerifier extends verifier_interface_1.BaseLintIssueVerifier {
|
|
|
72
85
|
return [];
|
|
73
86
|
return swaggerEntries === null || swaggerEntries === void 0 ? void 0 : swaggerEntries.reduce((prev, curr) => [...prev, ...(curr['OAuth2'] || []), ...(curr['oAuthDefinitions'] || [])], []);
|
|
74
87
|
}
|
|
88
|
+
getRequiredDeprecatedScopes({ regex, method }) {
|
|
89
|
+
var _a;
|
|
90
|
+
if (!regex)
|
|
91
|
+
return [];
|
|
92
|
+
const oAuth2Scopes = (_a = this.pathMap.get(regex)) === null || _a === void 0 ? void 0 : _a.methods[method]['x-atlassian-oauth2-scopes'];
|
|
93
|
+
if (!oAuth2Scopes)
|
|
94
|
+
return [];
|
|
95
|
+
return array_prototype_flatmap_1.default(oAuth2Scopes.filter((scope) => scope.state === 'Deprecated').map((scope) => scope.scopes), (x) => x);
|
|
96
|
+
}
|
|
75
97
|
}
|
|
76
98
|
exports.ProductVerifier = ProductVerifier;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/lint",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-next.6",
|
|
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.2.1-next.
|
|
18
|
+
"@forge/cli-shared": "2.2.1-next.5",
|
|
19
19
|
"@forge/csp": "1.9.0",
|
|
20
|
-
"@forge/manifest": "3.1.0-next.
|
|
20
|
+
"@forge/manifest": "3.1.0-next.5",
|
|
21
21
|
"@typescript-eslint/typescript-estree": "^3.5.0",
|
|
22
22
|
"cross-spawn": "^7.0.1",
|
|
23
23
|
"node-fetch": "^2.6.1",
|