@forge/lint 3.3.0-next.8 → 3.3.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 +79 -0
- package/out/lint/lint.d.ts.map +1 -1
- package/out/lint/lint.js +5 -1
- package/out/lint/linters/dynamic-properties-linter/dynamic-properties-generic-warning-linter.d.ts +18 -0
- package/out/lint/linters/dynamic-properties-linter/dynamic-properties-generic-warning-linter.d.ts.map +1 -0
- package/out/lint/linters/dynamic-properties-linter/dynamic-properties-generic-warning-linter.js +35 -0
- package/out/lint/linters/dynamic-properties-linter/dynamic-properties-interface.d.ts +6 -0
- package/out/lint/linters/dynamic-properties-linter/dynamic-properties-interface.d.ts.map +1 -0
- package/out/lint/linters/dynamic-properties-linter/dynamic-properties-interface.js +2 -0
- package/out/lint/linters/dynamic-properties-linter/dynamic-properties-permissions-linter.d.ts +18 -0
- package/out/lint/linters/dynamic-properties-linter/dynamic-properties-permissions-linter.d.ts.map +1 -0
- package/out/lint/linters/dynamic-properties-linter/dynamic-properties-permissions-linter.js +36 -0
- package/out/lint/linters/dynamic-properties-linter/verifiers/abstract-dynamic-properties-verifier.d.ts +7 -0
- package/out/lint/linters/dynamic-properties-linter/verifiers/abstract-dynamic-properties-verifier.d.ts.map +1 -0
- package/out/lint/linters/dynamic-properties-linter/verifiers/abstract-dynamic-properties-verifier.js +23 -0
- package/out/lint/linters/dynamic-properties-linter/verifiers/dynamic-properties-icon-verifier.d.ts +13 -0
- package/out/lint/linters/dynamic-properties-linter/verifiers/dynamic-properties-icon-verifier.d.ts.map +1 -0
- package/out/lint/linters/{permission-linter → dynamic-properties-linter}/verifiers/dynamic-properties-icon-verifier.js +17 -19
- package/out/lint/linters/dynamic-properties-linter/verifiers/generic-warning-verifier.d.ts +11 -0
- package/out/lint/linters/dynamic-properties-linter/verifiers/generic-warning-verifier.d.ts.map +1 -0
- package/out/lint/linters/dynamic-properties-linter/verifiers/generic-warning-verifier.js +29 -0
- package/out/lint/linters/dynamic-properties-linter/visitors/abstract-icon-visitor.d.ts +10 -0
- package/out/lint/linters/dynamic-properties-linter/visitors/abstract-icon-visitor.d.ts.map +1 -0
- package/out/lint/linters/{permission-linter/visitors/dynamic-properties-icon-visitor.js → dynamic-properties-linter/visitors/abstract-icon-visitor.js} +9 -13
- package/out/lint/linters/dynamic-properties-linter/visitors/confluence-icon-visitor.d.ts +6 -0
- package/out/lint/linters/dynamic-properties-linter/visitors/confluence-icon-visitor.d.ts.map +1 -0
- package/out/lint/linters/dynamic-properties-linter/visitors/confluence-icon-visitor.js +19 -0
- package/out/lint/linters/dynamic-properties-linter/visitors/jira-icon-visitor.d.ts +7 -0
- package/out/lint/linters/dynamic-properties-linter/visitors/jira-icon-visitor.d.ts.map +1 -0
- package/out/lint/linters/dynamic-properties-linter/visitors/jira-icon-visitor.js +43 -0
- package/out/lint/linters/permission-linter/api-call-interface.d.ts +2 -7
- package/out/lint/linters/permission-linter/api-call-interface.d.ts.map +1 -1
- package/out/lint/linters/permission-linter/api-call-interface.js +0 -1
- package/out/lint/linters/permission-linter/permission-linter.d.ts +1 -2
- package/out/lint/linters/permission-linter/permission-linter.d.ts.map +1 -1
- package/out/lint/linters/permission-linter/permission-linter.js +3 -11
- package/out/lint/text/messages.d.ts +1 -0
- package/out/lint/text/messages.d.ts.map +1 -1
- package/out/lint/text/messages.js +1 -0
- package/package.json +4 -4
- package/out/lint/linters/permission-linter/verifiers/dynamic-properties-icon-verifier.d.ts +0 -13
- package/out/lint/linters/permission-linter/verifiers/dynamic-properties-icon-verifier.d.ts.map +0 -1
- package/out/lint/linters/permission-linter/visitors/dynamic-properties-icon-visitor.d.ts +0 -10
- package/out/lint/linters/permission-linter/visitors/dynamic-properties-icon-visitor.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,84 @@
|
|
|
1
1
|
# @forge/lint
|
|
2
2
|
|
|
3
|
+
## 3.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d50d90b: Add ability to detect missing image permissions when using Confluence contentByLineItem modules with dynamic properties
|
|
8
|
+
- 5795a3e: Update linter to detect missing egress permissions for Jira Issue Context dynamic properties modules. And fix bug related to Confluence ContentByLineItem modules
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- 2da63a5: Bumping dependencies via Renovate:
|
|
13
|
+
|
|
14
|
+
- atlassian-openapi
|
|
15
|
+
|
|
16
|
+
- ffbb321: Update linter to not reject bundled resources
|
|
17
|
+
- Updated dependencies [9c3f9e4]
|
|
18
|
+
- Updated dependencies [04a9b36]
|
|
19
|
+
- Updated dependencies [f2d9cd7]
|
|
20
|
+
- Updated dependencies [52f15e18]
|
|
21
|
+
- Updated dependencies [87b2440]
|
|
22
|
+
- Updated dependencies [3e7edfb]
|
|
23
|
+
- Updated dependencies [97b57e7]
|
|
24
|
+
- Updated dependencies [3bdedf0]
|
|
25
|
+
- Updated dependencies [0da2b48]
|
|
26
|
+
- Updated dependencies [6e015d7]
|
|
27
|
+
- Updated dependencies [6cb6ad2]
|
|
28
|
+
- Updated dependencies [59c693ee]
|
|
29
|
+
- Updated dependencies [b91c323]
|
|
30
|
+
- @forge/manifest@4.10.0
|
|
31
|
+
- @forge/cli-shared@3.11.0
|
|
32
|
+
- @forge/egress@1.2.0
|
|
33
|
+
|
|
34
|
+
## 3.3.0-next.15
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- Updated dependencies [6cb6ad2]
|
|
39
|
+
- @forge/manifest@4.10.0-next.3
|
|
40
|
+
- @forge/cli-shared@3.11.0-next.10
|
|
41
|
+
|
|
42
|
+
## 3.3.0-next.14
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- Updated dependencies [f2d9cd7]
|
|
47
|
+
- @forge/cli-shared@3.11.0-next.9
|
|
48
|
+
|
|
49
|
+
## 3.3.0-next.13
|
|
50
|
+
|
|
51
|
+
### Patch Changes
|
|
52
|
+
|
|
53
|
+
- Updated dependencies [97b57e7]
|
|
54
|
+
- @forge/cli-shared@3.11.0-next.8
|
|
55
|
+
|
|
56
|
+
## 3.3.0-next.12
|
|
57
|
+
|
|
58
|
+
### Patch Changes
|
|
59
|
+
|
|
60
|
+
- Updated dependencies [3e7edfb]
|
|
61
|
+
- @forge/cli-shared@3.11.0-next.7
|
|
62
|
+
|
|
63
|
+
## 3.3.0-next.11
|
|
64
|
+
|
|
65
|
+
### Patch Changes
|
|
66
|
+
|
|
67
|
+
- ffbb321: Update linter to not reject bundled resources
|
|
68
|
+
|
|
69
|
+
## 3.3.0-next.10
|
|
70
|
+
|
|
71
|
+
### Patch Changes
|
|
72
|
+
|
|
73
|
+
- Updated dependencies [3bdedf0]
|
|
74
|
+
- @forge/egress@1.2.0-next.1
|
|
75
|
+
|
|
76
|
+
## 3.3.0-next.9
|
|
77
|
+
|
|
78
|
+
### Minor Changes
|
|
79
|
+
|
|
80
|
+
- 5795a3e: Update linter to detect missing egress permissions for Jira Issue Context dynamic properties modules. And fix bug related to Confluence ContentByLineItem modules
|
|
81
|
+
|
|
3
82
|
## 3.3.0-next.8
|
|
4
83
|
|
|
5
84
|
### 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;
|
|
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;AAUxG,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,eAAe,oBACN,OAAO,GAAG,QAAQ,CAAC,aAAa,KAChD,QAAQ,SAAS,CAOnB,CAAC;AAEF,eAAO,MAAM,IAAI,gBACF,MAAM,EAAE,YACX,QAAQ,eACL,MAAM,UACX,UAAU,6BAhBR,MAAM,UACR,eAAe,oBACN,OAAO,GAAG,QAAQ,CAAC,aAAa,KAChD,QAAQ,SAAS,CAAC,YAeV,eAAe,EAAE,KASzB,QAAQ,UAAU,EAAE,CAmCtB,CAAC;AAEF,eAAO,MAAM,QAAQ,WACX,UAAU,WACV,eAAe,KACtB,QAAQ,UAAU,EAAE,CAGtB,CAAC"}
|
package/out/lint/lint.js
CHANGED
|
@@ -13,6 +13,8 @@ const full_manifest_linter_1 = require("./linters/manifest-linter/full-manifest-
|
|
|
13
13
|
const permissions_manifest_linter_1 = require("./linters/manifest-linter/permissions-manifest-linter");
|
|
14
14
|
const permission_linter_1 = require("./linters/permission-linter/permission-linter");
|
|
15
15
|
const deprecated_csp_permissions_manifest_linter_1 = require("./linters/manifest-linter/deprecated-csp-permissions-manifest-linter");
|
|
16
|
+
const dynamic_properties_permissions_linter_1 = require("./linters/dynamic-properties-linter/dynamic-properties-permissions-linter");
|
|
17
|
+
const dynamic_properties_generic_warning_linter_1 = require("./linters/dynamic-properties-linter/dynamic-properties-generic-warning-linter");
|
|
16
18
|
class FailedLinterError extends Error {
|
|
17
19
|
}
|
|
18
20
|
exports.FailedLinterError = FailedLinterError;
|
|
@@ -82,7 +84,9 @@ const lint = async (filesToLint, manifest, environment, logger, parseFunction =
|
|
|
82
84
|
new permissions_manifest_linter_1.PermissionsManifestLinter(logger),
|
|
83
85
|
new deprecated_csp_permissions_manifest_linter_1.DeprecatedCspPermissionsManifestLinter(logger),
|
|
84
86
|
new full_manifest_linter_1.FullManifestLinter(logger),
|
|
85
|
-
new handler_linter_1.HandlerLinter(environment, manifest, logger)
|
|
87
|
+
new handler_linter_1.HandlerLinter(environment, manifest, logger),
|
|
88
|
+
new dynamic_properties_permissions_linter_1.DynamicPropertiesPermissionsLinter(environment, manifest, logger),
|
|
89
|
+
new dynamic_properties_generic_warning_linter_1.DynamicPropertiesGenericWarningLinter(environment, manifest, logger)
|
|
86
90
|
]) => {
|
|
87
91
|
const { include, exclude } = await (0, cli_shared_1.listTSConfigIncludeExclude)(new cli_shared_1.FileSystemReader());
|
|
88
92
|
const tsInclude = new Set(include);
|
package/out/lint/linters/dynamic-properties-linter/dynamic-properties-generic-warning-linter.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ManifestSchema as Manifest } from '@forge/manifest';
|
|
2
|
+
import BaseLinter from '../../base-linter';
|
|
3
|
+
import { DynamicPropertiesIconUrl } from './dynamic-properties-interface';
|
|
4
|
+
import { LintFixState, LintLogger, LintResultRule } from '../../linter-interface';
|
|
5
|
+
interface DynamicPropertiesLintCriteriaMatches {
|
|
6
|
+
[key: string]: DynamicPropertiesIconUrl[];
|
|
7
|
+
dynamicPropertiesIcon: DynamicPropertiesIconUrl[];
|
|
8
|
+
}
|
|
9
|
+
export declare class DynamicPropertiesGenericWarningLinter extends BaseLinter<DynamicPropertiesIconUrl, DynamicPropertiesLintCriteriaMatches, DynamicPropertiesIconUrl[]> {
|
|
10
|
+
private manifest;
|
|
11
|
+
constructor(environment: string, manifest: Manifest, logger: LintLogger);
|
|
12
|
+
bootstrap(): Promise<void>;
|
|
13
|
+
protected getFixer(): ((errors: LintResultRule[], warnings: LintResultRule[], state: LintFixState) => Promise<LintFixState>) | undefined;
|
|
14
|
+
protected setupMatchesMap(filepath: string): void;
|
|
15
|
+
protected addLintCriteriaMatch(dynamicPropertiesIconUrl: DynamicPropertiesIconUrl, filepath: string): void;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=dynamic-properties-generic-warning-linter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic-properties-generic-warning-linter.d.ts","sourceRoot":"","sources":["../../../../src/lint/linters/dynamic-properties-linter/dynamic-properties-generic-warning-linter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE7D,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAKlF,UAAU,oCAAoC;IAC5C,CAAC,GAAG,EAAE,MAAM,GAAG,wBAAwB,EAAE,CAAC;IAC1C,qBAAqB,EAAE,wBAAwB,EAAE,CAAC;CACnD;AAED,qBAAa,qCAAsC,SAAQ,UAAU,CACnE,wBAAwB,EACxB,oCAAoC,EACpC,wBAAwB,EAAE,CAC3B;IACkC,OAAO,CAAC,QAAQ;gBAArC,WAAW,EAAE,MAAM,EAAU,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU;IAIlE,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IASvC,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,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAMjD,SAAS,CAAC,oBAAoB,CAAC,wBAAwB,EAAE,wBAAwB,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;CAK3G"}
|
package/out/lint/linters/dynamic-properties-linter/dynamic-properties-generic-warning-linter.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DynamicPropertiesGenericWarningLinter = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const cli_shared_1 = require("@forge/cli-shared");
|
|
6
|
+
const base_linter_1 = tslib_1.__importDefault(require("../../base-linter"));
|
|
7
|
+
const generic_warning_verifier_1 = require("./verifiers/generic-warning-verifier");
|
|
8
|
+
const confluence_icon_visitor_1 = require("./visitors/confluence-icon-visitor");
|
|
9
|
+
const jira_icon_visitor_1 = require("./visitors/jira-icon-visitor");
|
|
10
|
+
class DynamicPropertiesGenericWarningLinter extends base_linter_1.default {
|
|
11
|
+
constructor(environment, manifest, logger) {
|
|
12
|
+
super(environment, logger);
|
|
13
|
+
this.manifest = manifest;
|
|
14
|
+
}
|
|
15
|
+
async bootstrap() {
|
|
16
|
+
this.nodeVisitors = [new confluence_icon_visitor_1.ConfluenceIconVisitor(), new jira_icon_visitor_1.JiraIconVisitor()];
|
|
17
|
+
const humanReadableEnvironment = (0, cli_shared_1.environmentToOption)(this.environment);
|
|
18
|
+
this.verifiers = {
|
|
19
|
+
dynamicPropertiesIcon: new generic_warning_verifier_1.GenericWarningVerifier(humanReadableEnvironment, this.manifest)
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
getFixer() {
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
setupMatchesMap(filepath) {
|
|
26
|
+
this.matches.set(filepath, {
|
|
27
|
+
dynamicPropertiesIcon: []
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
addLintCriteriaMatch(dynamicPropertiesIconUrl, filepath) {
|
|
31
|
+
const criteriaMatches = this.matches.get(filepath);
|
|
32
|
+
criteriaMatches.dynamicPropertiesIcon.push(dynamicPropertiesIconUrl);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.DynamicPropertiesGenericWarningLinter = DynamicPropertiesGenericWarningLinter;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic-properties-interface.d.ts","sourceRoot":"","sources":["../../../../src/lint/linters/dynamic-properties-linter/dynamic-properties-interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,WAAW,wBAAyB,SAAQ,iBAAiB;IACjE,IAAI,EAAE,yBAAyB,CAAC;IAChC,GAAG,EAAE,MAAM,CAAC;CACb"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ManifestSchema as Manifest } from '@forge/manifest';
|
|
2
|
+
import BaseLinter from '../../base-linter';
|
|
3
|
+
import { DynamicPropertiesIconUrl } from './dynamic-properties-interface';
|
|
4
|
+
import { LintFixState, LintLogger, LintResultRule } from '../../linter-interface';
|
|
5
|
+
interface DynamicPropertiesLintCriteriaMatches {
|
|
6
|
+
[key: string]: DynamicPropertiesIconUrl[];
|
|
7
|
+
dynamicPropertiesIcon: DynamicPropertiesIconUrl[];
|
|
8
|
+
}
|
|
9
|
+
export declare class DynamicPropertiesPermissionsLinter extends BaseLinter<DynamicPropertiesIconUrl, DynamicPropertiesLintCriteriaMatches, DynamicPropertiesIconUrl[]> {
|
|
10
|
+
private manifest;
|
|
11
|
+
constructor(environment: string, manifest: Manifest, logger: LintLogger);
|
|
12
|
+
bootstrap(): Promise<void>;
|
|
13
|
+
protected getFixer(): ((errors: LintResultRule[], warnings: LintResultRule[], state: LintFixState) => Promise<LintFixState>) | undefined;
|
|
14
|
+
protected setupMatchesMap(filepath: string): void;
|
|
15
|
+
protected addLintCriteriaMatch(dynamicPropertiesIconUrl: DynamicPropertiesIconUrl, filepath: string): void;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=dynamic-properties-permissions-linter.d.ts.map
|
package/out/lint/linters/dynamic-properties-linter/dynamic-properties-permissions-linter.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic-properties-permissions-linter.d.ts","sourceRoot":"","sources":["../../../../src/lint/linters/dynamic-properties-linter/dynamic-properties-permissions-linter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE7D,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAG1E,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAIlF,UAAU,oCAAoC;IAC5C,CAAC,GAAG,EAAE,MAAM,GAAG,wBAAwB,EAAE,CAAC;IAC1C,qBAAqB,EAAE,wBAAwB,EAAE,CAAC;CACnD;AAED,qBAAa,kCAAmC,SAAQ,UAAU,CAChE,wBAAwB,EACxB,oCAAoC,EACpC,wBAAwB,EAAE,CAC3B;IACkC,OAAO,CAAC,QAAQ;gBAArC,WAAW,EAAE,MAAM,EAAU,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU;IAIlE,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IASvC,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,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAMjD,SAAS,CAAC,oBAAoB,CAAC,wBAAwB,EAAE,wBAAwB,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;CAK3G"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DynamicPropertiesPermissionsLinter = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const cli_shared_1 = require("@forge/cli-shared");
|
|
6
|
+
const base_linter_1 = tslib_1.__importDefault(require("../../base-linter"));
|
|
7
|
+
const dynamic_properties_icon_verifier_1 = require("./verifiers/dynamic-properties-icon-verifier");
|
|
8
|
+
const confluence_icon_visitor_1 = require("./visitors/confluence-icon-visitor");
|
|
9
|
+
const permission_linter_1 = require("../permission-linter/permission-linter");
|
|
10
|
+
const jira_icon_visitor_1 = require("./visitors/jira-icon-visitor");
|
|
11
|
+
class DynamicPropertiesPermissionsLinter extends base_linter_1.default {
|
|
12
|
+
constructor(environment, manifest, logger) {
|
|
13
|
+
super(environment, logger);
|
|
14
|
+
this.manifest = manifest;
|
|
15
|
+
}
|
|
16
|
+
async bootstrap() {
|
|
17
|
+
this.nodeVisitors = [new confluence_icon_visitor_1.ConfluenceIconVisitor(), new jira_icon_visitor_1.JiraIconVisitor()];
|
|
18
|
+
const humanReadableEnvironment = (0, cli_shared_1.environmentToOption)(this.environment);
|
|
19
|
+
this.verifiers = {
|
|
20
|
+
dynamicPropertiesIcon: new dynamic_properties_icon_verifier_1.DynamicPropertiesIconVerifier(humanReadableEnvironment, this.manifest)
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
getFixer() {
|
|
24
|
+
return permission_linter_1.fixMissingPermissions;
|
|
25
|
+
}
|
|
26
|
+
setupMatchesMap(filepath) {
|
|
27
|
+
this.matches.set(filepath, {
|
|
28
|
+
dynamicPropertiesIcon: []
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
addLintCriteriaMatch(dynamicPropertiesIconUrl, filepath) {
|
|
32
|
+
const criteriaMatches = this.matches.get(filepath);
|
|
33
|
+
criteriaMatches.dynamicPropertiesIcon.push(dynamicPropertiesIconUrl);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.DynamicPropertiesPermissionsLinter = DynamicPropertiesPermissionsLinter;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ManifestSchema as Manifest } from '@forge/manifest';
|
|
2
|
+
import { BaseLintIssueVerifier } from '../../verifier-interface';
|
|
3
|
+
export declare class AbstractDynamicPropertiesVerifier extends BaseLintIssueVerifier {
|
|
4
|
+
protected shouldRunCheck: boolean;
|
|
5
|
+
constructor(environment: string, manifest: Manifest);
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=abstract-dynamic-properties-verifier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstract-dynamic-properties-verifier.d.ts","sourceRoot":"","sources":["../../../../../src/lint/linters/dynamic-properties-linter/verifiers/abstract-dynamic-properties-verifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,qBAAa,iCAAkC,SAAQ,qBAAqB;IAC1E,SAAS,CAAC,cAAc,UAAS;gBAErB,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ;CAgBpD"}
|
package/out/lint/linters/dynamic-properties-linter/verifiers/abstract-dynamic-properties-verifier.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AbstractDynamicPropertiesVerifier = void 0;
|
|
4
|
+
const verifier_interface_1 = require("../../verifier-interface");
|
|
5
|
+
class AbstractDynamicPropertiesVerifier extends verifier_interface_1.BaseLintIssueVerifier {
|
|
6
|
+
constructor(environment, manifest) {
|
|
7
|
+
super(environment, manifest);
|
|
8
|
+
this.shouldRunCheck = false;
|
|
9
|
+
Object.keys(this.manifest.modules || {}).forEach((moduleType) => {
|
|
10
|
+
var _a, _b;
|
|
11
|
+
switch (moduleType) {
|
|
12
|
+
case 'confluence:contentBylineItem':
|
|
13
|
+
case 'jira:issueGlance':
|
|
14
|
+
case 'jira:issueContext':
|
|
15
|
+
this.shouldRunCheck =
|
|
16
|
+
((_b = (_a = this.manifest.modules) === null || _a === void 0 ? void 0 : _a[moduleType]) === null || _b === void 0 ? void 0 : _b.find((module) => { var _a; return (_a = module.dynamicProperties) === null || _a === void 0 ? void 0 : _a.function; })) !==
|
|
17
|
+
undefined;
|
|
18
|
+
break;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.AbstractDynamicPropertiesVerifier = AbstractDynamicPropertiesVerifier;
|
package/out/lint/linters/dynamic-properties-linter/verifiers/dynamic-properties-icon-verifier.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ManifestSchema as Manifest } from '@forge/manifest';
|
|
2
|
+
import { LintClass, LintResultRule } from '../../../linter-interface';
|
|
3
|
+
import { LintIssueVerifier } from '../../verifier-interface';
|
|
4
|
+
import { DynamicPropertiesIconUrl } from '../dynamic-properties-interface';
|
|
5
|
+
import { AbstractDynamicPropertiesVerifier } from './abstract-dynamic-properties-verifier';
|
|
6
|
+
export declare class DynamicPropertiesIconVerifier extends AbstractDynamicPropertiesVerifier implements LintIssueVerifier<DynamicPropertiesIconUrl[]> {
|
|
7
|
+
private egressFilteringService;
|
|
8
|
+
constructor(environment: string, manifest: Manifest);
|
|
9
|
+
protected getLintClass(): LintClass;
|
|
10
|
+
private extractDomain;
|
|
11
|
+
process(iconUrls: DynamicPropertiesIconUrl[]): Promise<LintResultRule[]>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=dynamic-properties-icon-verifier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic-properties-icon-verifier.d.ts","sourceRoot":"","sources":["../../../../../src/lint/linters/dynamic-properties-linter/verifiers/dynamic-properties-icon-verifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGlE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAG7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAE3F,qBAAa,6BACX,SAAQ,iCACR,YAAW,iBAAiB,CAAC,wBAAwB,EAAE,CAAC;IACxD,OAAO,CAAC,sBAAsB,CAAyB;gBAE3C,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ;IASnD,SAAS,CAAC,YAAY,IAAI,SAAS;IAInC,OAAO,CAAC,aAAa,CAMnB;IAEW,OAAO,CAAC,QAAQ,EAAE,wBAAwB,EAAE,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;CAmBtF"}
|
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DynamicPropertiesIconVerifier = void 0;
|
|
4
4
|
const egress_1 = require("@forge/egress");
|
|
5
5
|
const linter_interface_1 = require("../../../linter-interface");
|
|
6
|
-
const verifier_interface_1 = require("../../verifier-interface");
|
|
7
6
|
const text_1 = require("../../../text");
|
|
8
7
|
const url_1 = require("url");
|
|
9
|
-
|
|
8
|
+
const abstract_dynamic_properties_verifier_1 = require("./abstract-dynamic-properties-verifier");
|
|
9
|
+
class DynamicPropertiesIconVerifier extends abstract_dynamic_properties_verifier_1.AbstractDynamicPropertiesVerifier {
|
|
10
10
|
constructor(environment, manifest) {
|
|
11
|
-
var _a, _b, _c, _d
|
|
11
|
+
var _a, _b, _c, _d;
|
|
12
12
|
super(environment, manifest);
|
|
13
13
|
this.extractDomain = (iconUrl) => {
|
|
14
14
|
try {
|
|
@@ -18,13 +18,9 @@ class DynamicPropertiesIconVerifier extends verifier_interface_1.BaseLintIssueVe
|
|
|
18
18
|
return iconUrl.url;
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
|
-
this.shouldRunCheck = false;
|
|
22
21
|
const allowList = (_d = (_c = (_b = (_a = this.manifest) === null || _a === void 0 ? void 0 : _a.permissions) === null || _b === void 0 ? void 0 : _b.external) === null || _c === void 0 ? void 0 : _c.images) !== null && _d !== void 0 ? _d : [];
|
|
23
22
|
const collectedUrls = allowList.filter((item) => typeof item === 'string');
|
|
24
23
|
this.egressFilteringService = new egress_1.EgressFilteringService(collectedUrls);
|
|
25
|
-
if ((_f = (_e = this.manifest.modules) === null || _e === void 0 ? void 0 : _e['confluence:contentBylineItem']) === null || _f === void 0 ? void 0 : _f.find((module) => { var _a; return (_a = module.dynamicProperties) === null || _a === void 0 ? void 0 : _a.function; })) {
|
|
26
|
-
this.shouldRunCheck = true;
|
|
27
|
-
}
|
|
28
24
|
}
|
|
29
25
|
getLintClass() {
|
|
30
26
|
return linter_interface_1.LintClass.Error;
|
|
@@ -33,18 +29,20 @@ class DynamicPropertiesIconVerifier extends verifier_interface_1.BaseLintIssueVe
|
|
|
33
29
|
if (!this.shouldRunCheck) {
|
|
34
30
|
return [];
|
|
35
31
|
}
|
|
36
|
-
return
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
32
|
+
return [
|
|
33
|
+
...iconUrls
|
|
34
|
+
.filter(({ url }) => !this.egressFilteringService.isValidUrl(url))
|
|
35
|
+
.map((iconUrl) => ({
|
|
36
|
+
class: this.getLintClass(),
|
|
37
|
+
message: text_1.messages.verifiers.dynamicPropertiesIcon.message(iconUrl.url),
|
|
38
|
+
reference: text_1.messages.verifiers.dynamicPropertiesIcon.reference,
|
|
39
|
+
column: iconUrl.column,
|
|
40
|
+
line: iconUrl.line,
|
|
41
|
+
metadata: {
|
|
42
|
+
missingExternalImagesPermission: this.extractDomain(iconUrl)
|
|
43
|
+
}
|
|
44
|
+
}))
|
|
45
|
+
];
|
|
48
46
|
}
|
|
49
47
|
}
|
|
50
48
|
exports.DynamicPropertiesIconVerifier = DynamicPropertiesIconVerifier;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ManifestSchema as Manifest } from '@forge/manifest';
|
|
2
|
+
import { LintClass, LintResultRule } from '../../../linter-interface';
|
|
3
|
+
import { LintIssueVerifier } from '../../verifier-interface';
|
|
4
|
+
import { DynamicPropertiesIconUrl } from '../dynamic-properties-interface';
|
|
5
|
+
import { AbstractDynamicPropertiesVerifier } from './abstract-dynamic-properties-verifier';
|
|
6
|
+
export declare class GenericWarningVerifier extends AbstractDynamicPropertiesVerifier implements LintIssueVerifier<DynamicPropertiesIconUrl[]> {
|
|
7
|
+
constructor(environment: string, manifest: Manifest);
|
|
8
|
+
protected getLintClass(): LintClass;
|
|
9
|
+
process(iconUrls: DynamicPropertiesIconUrl[]): Promise<LintResultRule[]>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=generic-warning-verifier.d.ts.map
|
package/out/lint/linters/dynamic-properties-linter/verifiers/generic-warning-verifier.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generic-warning-verifier.d.ts","sourceRoot":"","sources":["../../../../../src/lint/linters/dynamic-properties-linter/verifiers/generic-warning-verifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAElE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAE3F,qBAAa,sBACX,SAAQ,iCACR,YAAW,iBAAiB,CAAC,wBAAwB,EAAE,CAAC;gBAC5C,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ;IAInD,SAAS,CAAC,YAAY,IAAI,SAAS;IAItB,OAAO,CAAC,QAAQ,EAAE,wBAAwB,EAAE,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;CActF"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GenericWarningVerifier = void 0;
|
|
4
|
+
const linter_interface_1 = require("../../../linter-interface");
|
|
5
|
+
const text_1 = require("../../../text");
|
|
6
|
+
const abstract_dynamic_properties_verifier_1 = require("./abstract-dynamic-properties-verifier");
|
|
7
|
+
class GenericWarningVerifier extends abstract_dynamic_properties_verifier_1.AbstractDynamicPropertiesVerifier {
|
|
8
|
+
constructor(environment, manifest) {
|
|
9
|
+
super(environment, manifest);
|
|
10
|
+
}
|
|
11
|
+
getLintClass() {
|
|
12
|
+
return linter_interface_1.LintClass.Warning;
|
|
13
|
+
}
|
|
14
|
+
async process(iconUrls) {
|
|
15
|
+
if (!this.shouldRunCheck) {
|
|
16
|
+
return [];
|
|
17
|
+
}
|
|
18
|
+
return [
|
|
19
|
+
{
|
|
20
|
+
class: this.getLintClass(),
|
|
21
|
+
message: text_1.messages.verifiers.dynamicPropertiesIcon.warning(),
|
|
22
|
+
reference: text_1.messages.verifiers.dynamicPropertiesIcon.reference,
|
|
23
|
+
column: 0,
|
|
24
|
+
line: 0
|
|
25
|
+
}
|
|
26
|
+
];
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.GenericWarningVerifier = GenericWarningVerifier;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NodeVisitor } from '../../node-visitor-interface';
|
|
2
|
+
import { DynamicPropertiesIconUrl } from '../dynamic-properties-interface';
|
|
3
|
+
import { TSESTree } from '@typescript-eslint/typescript-estree';
|
|
4
|
+
export declare abstract class AbstractIconVisitor implements NodeVisitor<DynamicPropertiesIconUrl> {
|
|
5
|
+
visit(node: TSESTree.Node, parent: TSESTree.Node | undefined, callback: (input: DynamicPropertiesIconUrl) => void): void;
|
|
6
|
+
protected abstract getIconDefinitionNode(node: any): any;
|
|
7
|
+
private handleIconNode;
|
|
8
|
+
private transformArgsToIconUrl;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=abstract-icon-visitor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstract-icon-visitor.d.ts","sourceRoot":"","sources":["../../../../../src/lint/linters/dynamic-properties-linter/visitors/abstract-icon-visitor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAkB,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAEhF,8BAAsB,mBAAoB,YAAW,WAAW,CAAC,wBAAwB,CAAC;IACxF,KAAK,CACH,IAAI,EAAE,QAAQ,CAAC,IAAI,EACnB,MAAM,EAAE,QAAQ,CAAC,IAAI,GAAG,SAAS,EACjC,QAAQ,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,IAAI,GAClD,IAAI;IAkBP,SAAS,CAAC,QAAQ,CAAC,qBAAqB,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG;IAExD,OAAO,CAAC,cAAc,CAOpB;IAEF,OAAO,CAAC,sBAAsB,CAK3B;CACJ"}
|
|
@@ -1,44 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.AbstractIconVisitor = void 0;
|
|
4
4
|
const typescript_estree_1 = require("@typescript-eslint/typescript-estree");
|
|
5
|
-
|
|
6
|
-
class DynamicPropertiesIconVisitor {
|
|
5
|
+
class AbstractIconVisitor {
|
|
7
6
|
constructor() {
|
|
8
|
-
this.isIconPropertyDefinition = (node) => {
|
|
9
|
-
return (node.type === typescript_estree_1.AST_NODE_TYPES.Property && node.key.type === typescript_estree_1.AST_NODE_TYPES.Identifier && node.key.name === 'icon');
|
|
10
|
-
};
|
|
11
7
|
this.handleIconNode = (iconNode, callback) => {
|
|
12
8
|
if ((iconNode === null || iconNode === void 0 ? void 0 : iconNode.type) === typescript_estree_1.AST_NODE_TYPES.Literal && typeof (iconNode === null || iconNode === void 0 ? void 0 : iconNode.value) === 'string') {
|
|
13
|
-
if (iconNode.value.trim() !== '') {
|
|
9
|
+
if (iconNode.value.trim() !== '' && !iconNode.value.trim().startsWith('resource:')) {
|
|
14
10
|
const iconUrl = this.transformArgsToIconUrl(iconNode);
|
|
15
11
|
callback(iconUrl);
|
|
16
12
|
}
|
|
17
13
|
}
|
|
18
14
|
};
|
|
19
15
|
this.transformArgsToIconUrl = (iconNode) => ({
|
|
20
|
-
type:
|
|
16
|
+
type: 'DYNAMIC_PROPERTIES_ICON',
|
|
21
17
|
url: iconNode.value,
|
|
22
18
|
line: iconNode.loc.start.line,
|
|
23
19
|
column: iconNode.loc.start.column
|
|
24
20
|
});
|
|
25
21
|
}
|
|
26
22
|
visit(node, parent, callback) {
|
|
27
|
-
var _a, _b
|
|
23
|
+
var _a, _b;
|
|
28
24
|
switch (node.type) {
|
|
29
25
|
case typescript_estree_1.AST_NODE_TYPES.ArrowFunctionExpression:
|
|
30
26
|
if (((_a = node.body) === null || _a === void 0 ? void 0 : _a.type) === typescript_estree_1.AST_NODE_TYPES.ObjectExpression) {
|
|
31
|
-
const iconDefinitionNode = (
|
|
27
|
+
const iconDefinitionNode = this.getIconDefinitionNode(node.body);
|
|
32
28
|
this.handleIconNode(iconDefinitionNode === null || iconDefinitionNode === void 0 ? void 0 : iconDefinitionNode.value, callback);
|
|
33
29
|
}
|
|
34
30
|
break;
|
|
35
31
|
case typescript_estree_1.AST_NODE_TYPES.ReturnStatement:
|
|
36
|
-
if (((
|
|
37
|
-
const iconDefinitionNode = (
|
|
32
|
+
if (((_b = node.argument) === null || _b === void 0 ? void 0 : _b.type) === typescript_estree_1.AST_NODE_TYPES.ObjectExpression) {
|
|
33
|
+
const iconDefinitionNode = this.getIconDefinitionNode(node.argument);
|
|
38
34
|
this.handleIconNode(iconDefinitionNode === null || iconDefinitionNode === void 0 ? void 0 : iconDefinitionNode.value, callback);
|
|
39
35
|
}
|
|
40
36
|
break;
|
|
41
37
|
}
|
|
42
38
|
}
|
|
43
39
|
}
|
|
44
|
-
exports.
|
|
40
|
+
exports.AbstractIconVisitor = AbstractIconVisitor;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AbstractIconVisitor } from './abstract-icon-visitor';
|
|
2
|
+
export declare class ConfluenceIconVisitor extends AbstractIconVisitor {
|
|
3
|
+
protected getIconDefinitionNode(node: any): any;
|
|
4
|
+
private isIconPropertyDefinition;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=confluence-icon-visitor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confluence-icon-visitor.d.ts","sourceRoot":"","sources":["../../../../../src/lint/linters/dynamic-properties-linter/visitors/confluence-icon-visitor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,qBAAa,qBAAsB,SAAQ,mBAAmB;IAY5D,SAAS,CAAC,qBAAqB,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG;IAI/C,OAAO,CAAC,wBAAwB,CAM9B;CACH"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConfluenceIconVisitor = void 0;
|
|
4
|
+
const typescript_estree_1 = require("@typescript-eslint/typescript-estree");
|
|
5
|
+
const abstract_icon_visitor_1 = require("./abstract-icon-visitor");
|
|
6
|
+
class ConfluenceIconVisitor extends abstract_icon_visitor_1.AbstractIconVisitor {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.isIconPropertyDefinition = (node) => {
|
|
10
|
+
return (node.type === typescript_estree_1.AST_NODE_TYPES.Property &&
|
|
11
|
+
((node.key.type === typescript_estree_1.AST_NODE_TYPES.Identifier && node.key.name === 'icon') ||
|
|
12
|
+
(node.key.type === typescript_estree_1.AST_NODE_TYPES.Literal && node.key.value === 'icon')));
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
getIconDefinitionNode(node) {
|
|
16
|
+
return node.properties.find(this.isIconPropertyDefinition);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.ConfluenceIconVisitor = ConfluenceIconVisitor;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AbstractIconVisitor } from './abstract-icon-visitor';
|
|
2
|
+
export declare class JiraIconVisitor extends AbstractIconVisitor {
|
|
3
|
+
protected getIconDefinitionNode(node: any): any;
|
|
4
|
+
private isStatusPropertyDefinition;
|
|
5
|
+
private extractIconDefinition;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=jira-icon-visitor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jira-icon-visitor.d.ts","sourceRoot":"","sources":["../../../../../src/lint/linters/dynamic-properties-linter/visitors/jira-icon-visitor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,qBAAa,eAAgB,SAAQ,mBAAmB;IAsBtD,SAAS,CAAC,qBAAqB,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG;IAK/C,OAAO,CAAC,0BAA0B,CAgBhC;IAEF,OAAO,CAAC,qBAAqB,CAoB3B;CACH"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.JiraIconVisitor = void 0;
|
|
4
|
+
const typescript_estree_1 = require("@typescript-eslint/typescript-estree");
|
|
5
|
+
const abstract_icon_visitor_1 = require("./abstract-icon-visitor");
|
|
6
|
+
class JiraIconVisitor extends abstract_icon_visitor_1.AbstractIconVisitor {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.isStatusPropertyDefinition = (node) => {
|
|
10
|
+
return (node.type === typescript_estree_1.AST_NODE_TYPES.Property &&
|
|
11
|
+
((node.key.type === typescript_estree_1.AST_NODE_TYPES.Literal && node.key.value === 'status') ||
|
|
12
|
+
(node.key.type === typescript_estree_1.AST_NODE_TYPES.Identifier && node.key.name === 'status')) &&
|
|
13
|
+
node.value.type === typescript_estree_1.AST_NODE_TYPES.ObjectExpression &&
|
|
14
|
+
node.value.properties.find((prop) => {
|
|
15
|
+
return (prop.type === typescript_estree_1.AST_NODE_TYPES.Property &&
|
|
16
|
+
((prop.key.type === typescript_estree_1.AST_NODE_TYPES.Literal && prop.key.value === 'type') ||
|
|
17
|
+
(prop.key.type === typescript_estree_1.AST_NODE_TYPES.Identifier && prop.key.name === 'type')) &&
|
|
18
|
+
((prop.value.type === typescript_estree_1.AST_NODE_TYPES.Literal && prop.value.value === 'icon') ||
|
|
19
|
+
(prop.value.type === typescript_estree_1.AST_NODE_TYPES.Identifier && prop.value.name === 'icon')));
|
|
20
|
+
}) !== undefined);
|
|
21
|
+
};
|
|
22
|
+
this.extractIconDefinition = (node) => {
|
|
23
|
+
if (!node) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
const valueDefinitionNode = node === null || node === void 0 ? void 0 : node.value.properties.find((prop) => {
|
|
27
|
+
return (prop.type === typescript_estree_1.AST_NODE_TYPES.Property &&
|
|
28
|
+
((prop.key.type === typescript_estree_1.AST_NODE_TYPES.Literal && prop.key.value === 'value') ||
|
|
29
|
+
(prop.key.type === typescript_estree_1.AST_NODE_TYPES.Identifier && prop.key.name === 'value')));
|
|
30
|
+
});
|
|
31
|
+
return valueDefinitionNode.value.properties.find((prop) => {
|
|
32
|
+
return (prop.type === typescript_estree_1.AST_NODE_TYPES.Property &&
|
|
33
|
+
((prop.key.type === typescript_estree_1.AST_NODE_TYPES.Literal && prop.key.value === 'url') ||
|
|
34
|
+
(prop.key.type === typescript_estree_1.AST_NODE_TYPES.Identifier && prop.key.name === 'url')));
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
getIconDefinitionNode(node) {
|
|
39
|
+
const statusPropertyNode = node.properties.find(this.isStatusPropertyDefinition);
|
|
40
|
+
return this.extractIconDefinition(statusPropertyNode);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.JiraIconVisitor = JiraIconVisitor;
|
|
@@ -4,8 +4,7 @@ export declare enum ApiCallTypes {
|
|
|
4
4
|
'HOOK' = 1,
|
|
5
5
|
'STORAGE' = 2,
|
|
6
6
|
'EXTERNAL' = 3,
|
|
7
|
-
'CONTENT_PROPERTY' = 4
|
|
8
|
-
'DYNAMIC_PROPERTIES_ICON' = 5
|
|
7
|
+
'CONTENT_PROPERTY' = 4
|
|
9
8
|
}
|
|
10
9
|
export interface ProductApiCall extends LintCriteriaMatch {
|
|
11
10
|
type: ApiCallTypes.PRODUCT;
|
|
@@ -25,14 +24,10 @@ export interface ExternalApiCall extends LintCriteriaMatch {
|
|
|
25
24
|
type: ApiCallTypes.EXTERNAL;
|
|
26
25
|
url: string;
|
|
27
26
|
}
|
|
28
|
-
export interface DynamicPropertiesIconUrl extends LintCriteriaMatch {
|
|
29
|
-
type: ApiCallTypes.DYNAMIC_PROPERTIES_ICON;
|
|
30
|
-
url: string;
|
|
31
|
-
}
|
|
32
27
|
export interface ContentPropertyApiCall extends LintCriteriaMatch {
|
|
33
28
|
type: ApiCallTypes.CONTENT_PROPERTY;
|
|
34
29
|
context: string;
|
|
35
30
|
method: string;
|
|
36
31
|
}
|
|
37
|
-
export declare type ApiCall = ProductApiCall | UIHookApiCall | StorageApiCall | ExternalApiCall | ContentPropertyApiCall
|
|
32
|
+
export declare type ApiCall = ProductApiCall | UIHookApiCall | StorageApiCall | ExternalApiCall | ContentPropertyApiCall;
|
|
38
33
|
//# sourceMappingURL=api-call-interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-call-interface.d.ts","sourceRoot":"","sources":["../../../../src/lint/linters/permission-linter/api-call-interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,oBAAY,YAAY;IACtB,SAAS,IAAA;IACT,MAAM,IAAA;IACN,SAAS,IAAA;IACT,UAAU,IAAA;IACV,kBAAkB,IAAA;
|
|
1
|
+
{"version":3,"file":"api-call-interface.d.ts","sourceRoot":"","sources":["../../../../src/lint/linters/permission-linter/api-call-interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,oBAAY,YAAY;IACtB,SAAS,IAAA;IACT,MAAM,IAAA;IACN,SAAS,IAAA;IACT,UAAU,IAAA;IACV,kBAAkB,IAAA;CACnB;AAED,MAAM,WAAW,cAAe,SAAQ,iBAAiB;IACvD,IAAI,EAAE,YAAY,CAAC,OAAO,CAAC;IAC3B,OAAO,EAAE,MAAM,GAAG,YAAY,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACtD,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,cAAe,SAAQ,iBAAiB;IACvD,IAAI,EAAE,YAAY,CAAC,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,eAAgB,SAAQ,iBAAiB;IACxD,IAAI,EAAE,YAAY,CAAC,QAAQ,CAAC;IAC5B,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,sBAAuB,SAAQ,iBAAiB;IAC/D,IAAI,EAAE,YAAY,CAAC,gBAAgB,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,oBAAY,OAAO,GAAG,cAAc,GAAG,aAAa,GAAG,cAAc,GAAG,eAAe,GAAG,sBAAsB,CAAC"}
|
|
@@ -8,5 +8,4 @@ var ApiCallTypes;
|
|
|
8
8
|
ApiCallTypes[ApiCallTypes["STORAGE"] = 2] = "STORAGE";
|
|
9
9
|
ApiCallTypes[ApiCallTypes["EXTERNAL"] = 3] = "EXTERNAL";
|
|
10
10
|
ApiCallTypes[ApiCallTypes["CONTENT_PROPERTY"] = 4] = "CONTENT_PROPERTY";
|
|
11
|
-
ApiCallTypes[ApiCallTypes["DYNAMIC_PROPERTIES_ICON"] = 5] = "DYNAMIC_PROPERTIES_ICON";
|
|
12
11
|
})(ApiCallTypes = exports.ApiCallTypes || (exports.ApiCallTypes = {}));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ManifestSchema as Manifest } from '@forge/manifest';
|
|
2
2
|
import BaseLinter from '../../base-linter';
|
|
3
3
|
import { LintFixState, LintLogger, LintResultRule } from '../../linter-interface';
|
|
4
|
-
import { ApiCall,
|
|
4
|
+
import { ApiCall, ExternalApiCall, ProductApiCall, StorageApiCall, UIHookApiCall } from './api-call-interface';
|
|
5
5
|
import { PathMethods } from './verifiers';
|
|
6
6
|
interface SwaggerFormat {
|
|
7
7
|
paths: {
|
|
@@ -18,7 +18,6 @@ interface PermissionLintCriteriaMatches {
|
|
|
18
18
|
storage: StorageApiCall[];
|
|
19
19
|
uiHook: UIHookApiCall[];
|
|
20
20
|
external: ExternalApiCall[];
|
|
21
|
-
dynamicPropertiesIcon: DynamicPropertiesIconUrl[];
|
|
22
21
|
}
|
|
23
22
|
export declare class PermissionLinter extends BaseLinter<ApiCall, PermissionLintCriteriaMatches, ApiCall[]> {
|
|
24
23
|
private manifest;
|
|
@@ -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,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAClF,OAAO,EACL,OAAO,EAEP,
|
|
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,mBAEtB,mBAAmB,GACnB,gCAAgC,GAChC,+BAA+B,GAC/B,iCAAiC,UAC7B,YAAY,KACnB,IAAI,MAAM,CAkBZ,CAAC;AAEF,eAAO,MAAM,qBAAqB,WACxB,cAAc,EAAE,YACd,cAAc,EAAE,SACnB,YAAY,KAClB,QAAQ,YAAY,CAgEtB,CAAC;AAEF,UAAU,6BAA6B;IACrC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,EAAE,CAAC;IACzB,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,IAAI,EAAE,cAAc,EAAE,CAAC;IACvB,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC7B;AAED,qBAAa,gBAAiB,SAAQ,UAAU,CAAC,OAAO,EAAE,6BAA6B,EAAE,OAAO,EAAE,CAAC;IAUhE,OAAO,CAAC,QAAQ;IATjD,MAAM,CAAC,cAAc,SAAgC;IACrD,MAAM,CAAC,aAAa,SAA+B;IACnD,MAAM,CAAC,aAAa,SAA+B;IACnD,MAAM,CAAC,oBAAoB,SAAsC;IAEjE,OAAO,CAAC,IAAI,CAAC,CAA0B;IACvC,OAAO,CAAC,UAAU,CAAC,CAA0B;IAC7C,OAAO,CAAC,KAAK,CAAC,CAAa;gBAEf,WAAW,EAAE,MAAM,EAAU,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU;IAIlE,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAgEvC,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"}
|
|
@@ -9,8 +9,6 @@ const api_call_interface_1 = require("./api-call-interface");
|
|
|
9
9
|
const verifiers_1 = require("./verifiers");
|
|
10
10
|
const visitors_1 = require("./visitors");
|
|
11
11
|
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
12
|
-
const dynamic_properties_icon_verifier_1 = require("./verifiers/dynamic-properties-icon-verifier");
|
|
13
|
-
const dynamic_properties_icon_visitor_1 = require("./visitors/dynamic-properties-icon-visitor");
|
|
14
12
|
exports.NON_FWD_SLASH_REGEX = '[^\\/\\s]*';
|
|
15
13
|
const CACHE_KEY = 'PERMISSIONS_LINTER';
|
|
16
14
|
const ONE_HOUR_MS = 1000 * 60 * 60;
|
|
@@ -111,8 +109,7 @@ class PermissionLinter extends base_linter_1.default {
|
|
|
111
109
|
new visitors_1.UIHookNodeVisitor(),
|
|
112
110
|
new visitors_1.StorageAPINodeVisitor(),
|
|
113
111
|
new visitors_1.ExternalApiCallVisitor(),
|
|
114
|
-
new visitors_1.ContentPropertyVisitor()
|
|
115
|
-
new dynamic_properties_icon_visitor_1.DynamicPropertiesIconVisitor()
|
|
112
|
+
new visitors_1.ContentPropertyVisitor()
|
|
116
113
|
];
|
|
117
114
|
const humanReadableEnvironment = (0, cli_shared_1.environmentToOption)(this.environment);
|
|
118
115
|
this.verifiers = {
|
|
@@ -121,8 +118,7 @@ class PermissionLinter extends base_linter_1.default {
|
|
|
121
118
|
storage: new verifiers_1.StorageAPIVerifier(humanReadableEnvironment, this.manifest),
|
|
122
119
|
uiHook: new verifiers_1.UIHookVerifier(humanReadableEnvironment, this.manifest),
|
|
123
120
|
external: new verifiers_1.ExternalFetchVerifier(humanReadableEnvironment, this.manifest),
|
|
124
|
-
contentProperty: new verifiers_1.ContentPropertyVerifier(humanReadableEnvironment, this.manifest)
|
|
125
|
-
dynamicPropertiesIcon: new dynamic_properties_icon_verifier_1.DynamicPropertiesIconVerifier(humanReadableEnvironment, this.manifest)
|
|
121
|
+
contentProperty: new verifiers_1.ContentPropertyVerifier(humanReadableEnvironment, this.manifest)
|
|
126
122
|
};
|
|
127
123
|
}
|
|
128
124
|
setupMatchesMap(filepath) {
|
|
@@ -134,8 +130,7 @@ class PermissionLinter extends base_linter_1.default {
|
|
|
134
130
|
uiHook: [],
|
|
135
131
|
storage: [],
|
|
136
132
|
external: [],
|
|
137
|
-
contentProperty: []
|
|
138
|
-
dynamicPropertiesIcon: []
|
|
133
|
+
contentProperty: []
|
|
139
134
|
});
|
|
140
135
|
}
|
|
141
136
|
getFixer() {
|
|
@@ -159,9 +154,6 @@ class PermissionLinter extends base_linter_1.default {
|
|
|
159
154
|
case api_call_interface_1.ApiCallTypes.CONTENT_PROPERTY:
|
|
160
155
|
criteriaMatches.contentProperty.push(apiCall);
|
|
161
156
|
break;
|
|
162
|
-
case api_call_interface_1.ApiCallTypes.DYNAMIC_PROPERTIES_ICON:
|
|
163
|
-
criteriaMatches.dynamicPropertiesIcon.push(apiCall);
|
|
164
|
-
break;
|
|
165
157
|
}
|
|
166
158
|
}
|
|
167
159
|
async getProductPaths(cacheKey, url) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/lint/text/messages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;+BAGI,MAAM,UAAU,MAAM,SAAS,MAAM,KAAG,MAAM;;;;2BAKlD,MAAM;;;;2BAIN,MAAM;;;;
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/lint/text/messages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;+BAGI,MAAM,UAAU,MAAM,SAAS,MAAM,KAAG,MAAM;;;;2BAKlD,MAAM;;;;2BAIN,MAAM;2BAER,MAAM;;;;8BAKD,MAAM,OAAO,MAAM;;;;+BAKlB,MAAM,UAAU,MAAM,QAAQ,MAAM,GAAG,SAAS,SAAS,MAAM;;;;6BAKjE,MAAM;;;;+BAIJ,MAAM,QAAQ,MAAM,SAAS,MAAM;;;;CAK3D,CAAC"}
|
|
@@ -13,6 +13,7 @@ exports.messages = {
|
|
|
13
13
|
},
|
|
14
14
|
dynamicPropertiesIcon: {
|
|
15
15
|
message: (url) => `The domain ${url} is not included in the external images permissions of your app manifest`,
|
|
16
|
+
warning: () => `When using dynamic content properties along with icons, make sure to add the icon URL into the external images permissions of your app manifest. Otherwise, the icon will not be rendered.`,
|
|
16
17
|
reference: 'egress-permission-required'
|
|
17
18
|
},
|
|
18
19
|
handler: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/lint",
|
|
3
|
-
"version": "3.3.0
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "Linting for forge apps",
|
|
5
5
|
"main": "out/index.js",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"@types/node-fetch": "^2.5.7"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@forge/cli-shared": "3.11.0
|
|
21
|
-
"@forge/egress": "1.
|
|
22
|
-
"@forge/manifest": "4.10.0
|
|
20
|
+
"@forge/cli-shared": "3.11.0",
|
|
21
|
+
"@forge/egress": "1.2.0",
|
|
22
|
+
"@forge/manifest": "4.10.0",
|
|
23
23
|
"@typescript-eslint/typescript-estree": "^5.40.0",
|
|
24
24
|
"array.prototype.flatmap": "^1.2.3",
|
|
25
25
|
"atlassian-openapi": "^1.0.17",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ManifestSchema as Manifest } from '@forge/manifest';
|
|
2
|
-
import { LintClass, LintResultRule } from '../../../linter-interface';
|
|
3
|
-
import { BaseLintIssueVerifier, LintIssueVerifier } from '../../verifier-interface';
|
|
4
|
-
import { DynamicPropertiesIconUrl } from '../api-call-interface';
|
|
5
|
-
export declare class DynamicPropertiesIconVerifier extends BaseLintIssueVerifier implements LintIssueVerifier<DynamicPropertiesIconUrl[]> {
|
|
6
|
-
private egressFilteringService;
|
|
7
|
-
private readonly shouldRunCheck;
|
|
8
|
-
constructor(environment: string, manifest: Manifest);
|
|
9
|
-
protected getLintClass(): LintClass;
|
|
10
|
-
private extractDomain;
|
|
11
|
-
process(iconUrls: DynamicPropertiesIconUrl[]): Promise<LintResultRule[]>;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=dynamic-properties-icon-verifier.d.ts.map
|
package/out/lint/linters/permission-linter/verifiers/dynamic-properties-icon-verifier.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-properties-icon-verifier.d.ts","sourceRoot":"","sources":["../../../../../src/lint/linters/permission-linter/verifiers/dynamic-properties-icon-verifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGlE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACpF,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAIjE,qBAAa,6BACX,SAAQ,qBACR,YAAW,iBAAiB,CAAC,wBAAwB,EAAE,CAAC;IACxD,OAAO,CAAC,sBAAsB,CAAyB;IACvD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAU;gBAE7B,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ;IAcnD,SAAS,CAAC,YAAY,IAAI,SAAS;IAInC,OAAO,CAAC,aAAa,CAMnB;IAEW,OAAO,CAAC,QAAQ,EAAE,wBAAwB,EAAE,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;CAiBtF"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { TSESTree } from '@typescript-eslint/typescript-estree';
|
|
2
|
-
import { NodeVisitor } from '../../node-visitor-interface';
|
|
3
|
-
import { ApiCall } from '../api-call-interface';
|
|
4
|
-
export declare class DynamicPropertiesIconVisitor implements NodeVisitor<ApiCall> {
|
|
5
|
-
visit(node: TSESTree.Node, parent: TSESTree.Node | undefined, callback: (iconUrl: ApiCall) => void): void;
|
|
6
|
-
private isIconPropertyDefinition;
|
|
7
|
-
private handleIconNode;
|
|
8
|
-
private transformArgsToIconUrl;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=dynamic-properties-icon-visitor.d.ts.map
|
package/out/lint/linters/permission-linter/visitors/dynamic-properties-icon-visitor.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-properties-icon-visitor.d.ts","sourceRoot":"","sources":["../../../../../src/lint/linters/permission-linter/visitors/dynamic-properties-icon-visitor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAEhF,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAgB,MAAM,uBAAuB,CAAC;AAE9D,qBAAa,4BAA6B,YAAW,WAAW,CAAC,OAAO,CAAC;IAChE,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,GAAG,SAAS,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,GAAG,IAAI;IA4BhH,OAAO,CAAC,wBAAwB,CAI9B;IAEF,OAAO,CAAC,cAAc,CAOpB;IAEF,OAAO,CAAC,sBAAsB,CAK3B;CACJ"}
|