@forge/lint 5.7.3-next.3 → 5.7.3-next.30
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 +209 -0
- package/out/lint/linters/permission-linter/permission-linter.d.ts.map +1 -1
- package/out/lint/linters/permission-linter/permission-linter.js +6 -4
- package/out/lint/linters/permission-linter/verifiers/external-fetch-verifier.d.ts.map +1 -1
- package/out/lint/linters/permission-linter/verifiers/external-fetch-verifier.js +6 -2
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,214 @@
|
|
|
1
1
|
# @forge/lint
|
|
2
2
|
|
|
3
|
+
## 5.7.3-next.30
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [0dd4e3b]
|
|
8
|
+
- @forge/manifest@9.0.0-next.14
|
|
9
|
+
- @forge/cli-shared@6.8.0-next.29
|
|
10
|
+
|
|
11
|
+
## 5.7.3-next.29
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [f12ec8a]
|
|
16
|
+
- @forge/cli-shared@6.8.0-next.28
|
|
17
|
+
|
|
18
|
+
## 5.7.3-next.28
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [d0cb567]
|
|
23
|
+
- @forge/cli-shared@6.8.0-next.27
|
|
24
|
+
|
|
25
|
+
## 5.7.3-next.27
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- Updated dependencies [2c0e151]
|
|
30
|
+
- @forge/cli-shared@6.8.0-next.26
|
|
31
|
+
|
|
32
|
+
## 5.7.3-next.26
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- Updated dependencies [2d5a0e6]
|
|
37
|
+
- Updated dependencies [99739ec]
|
|
38
|
+
- @forge/manifest@9.0.0-next.13
|
|
39
|
+
- @forge/cli-shared@6.8.0-next.25
|
|
40
|
+
|
|
41
|
+
## 5.7.3-next.25
|
|
42
|
+
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- 8c34ca3: Changed manifest to allow egress objects to be a list of string, egress objects containing at least the 'address' field, or a remote reference
|
|
46
|
+
- Updated dependencies [1a9af0b]
|
|
47
|
+
- Updated dependencies [8c34ca3]
|
|
48
|
+
- @forge/cli-shared@6.8.0-next.24
|
|
49
|
+
- @forge/manifest@8.9.0-next.12
|
|
50
|
+
- @forge/csp@3.7.0-next.1
|
|
51
|
+
|
|
52
|
+
## 5.7.3-next.24
|
|
53
|
+
|
|
54
|
+
### Patch Changes
|
|
55
|
+
|
|
56
|
+
- Updated dependencies [0dfb15d]
|
|
57
|
+
- @forge/manifest@8.9.0-next.11
|
|
58
|
+
- @forge/cli-shared@6.8.0-next.23
|
|
59
|
+
|
|
60
|
+
## 5.7.3-next.23
|
|
61
|
+
|
|
62
|
+
### Patch Changes
|
|
63
|
+
|
|
64
|
+
- Updated dependencies [b51be39]
|
|
65
|
+
- @forge/manifest@8.9.0-next.10
|
|
66
|
+
- @forge/cli-shared@6.8.0-next.22
|
|
67
|
+
|
|
68
|
+
## 5.7.3-next.22
|
|
69
|
+
|
|
70
|
+
### Patch Changes
|
|
71
|
+
|
|
72
|
+
- @forge/cli-shared@6.8.0-next.21
|
|
73
|
+
- @forge/manifest@8.9.0-next.9
|
|
74
|
+
|
|
75
|
+
## 5.7.3-next.21
|
|
76
|
+
|
|
77
|
+
### Patch Changes
|
|
78
|
+
|
|
79
|
+
- Updated dependencies [3a510c5]
|
|
80
|
+
- @forge/cli-shared@6.8.0-next.20
|
|
81
|
+
|
|
82
|
+
## 5.7.3-next.20
|
|
83
|
+
|
|
84
|
+
### Patch Changes
|
|
85
|
+
|
|
86
|
+
- Updated dependencies [61f499c]
|
|
87
|
+
- @forge/cli-shared@6.8.0-next.19
|
|
88
|
+
|
|
89
|
+
## 5.7.3-next.19
|
|
90
|
+
|
|
91
|
+
### Patch Changes
|
|
92
|
+
|
|
93
|
+
- Updated dependencies [f9c2880]
|
|
94
|
+
- @forge/cli-shared@6.8.0-next.18
|
|
95
|
+
|
|
96
|
+
## 5.7.3-next.18
|
|
97
|
+
|
|
98
|
+
### Patch Changes
|
|
99
|
+
|
|
100
|
+
- Updated dependencies [7d8339b]
|
|
101
|
+
- @forge/cli-shared@6.8.0-next.17
|
|
102
|
+
|
|
103
|
+
## 5.7.3-next.17
|
|
104
|
+
|
|
105
|
+
### Patch Changes
|
|
106
|
+
|
|
107
|
+
- Updated dependencies [2204d8d]
|
|
108
|
+
- @forge/cli-shared@6.8.0-next.16
|
|
109
|
+
|
|
110
|
+
## 5.7.3-next.16
|
|
111
|
+
|
|
112
|
+
### Patch Changes
|
|
113
|
+
|
|
114
|
+
- Updated dependencies [4b083be]
|
|
115
|
+
- @forge/manifest@8.9.0-next.8
|
|
116
|
+
- @forge/cli-shared@6.8.0-next.15
|
|
117
|
+
|
|
118
|
+
## 5.7.3-next.15
|
|
119
|
+
|
|
120
|
+
### Patch Changes
|
|
121
|
+
|
|
122
|
+
- Updated dependencies [7a83fd9]
|
|
123
|
+
- @forge/cli-shared@6.8.0-next.14
|
|
124
|
+
|
|
125
|
+
## 5.7.3-next.14
|
|
126
|
+
|
|
127
|
+
### Patch Changes
|
|
128
|
+
|
|
129
|
+
- Updated dependencies [c57e34a]
|
|
130
|
+
- @forge/cli-shared@6.8.0-next.13
|
|
131
|
+
|
|
132
|
+
## 5.7.3-next.13
|
|
133
|
+
|
|
134
|
+
### Patch Changes
|
|
135
|
+
|
|
136
|
+
- Updated dependencies [7243788]
|
|
137
|
+
- @forge/cli-shared@6.8.0-next.12
|
|
138
|
+
- @forge/manifest@8.9.0-next.7
|
|
139
|
+
|
|
140
|
+
## 5.7.3-next.12
|
|
141
|
+
|
|
142
|
+
### Patch Changes
|
|
143
|
+
|
|
144
|
+
- Updated dependencies [336f74f]
|
|
145
|
+
- @forge/cli-shared@6.8.0-next.11
|
|
146
|
+
- @forge/manifest@8.9.0-next.6
|
|
147
|
+
|
|
148
|
+
## 5.7.3-next.11
|
|
149
|
+
|
|
150
|
+
### Patch Changes
|
|
151
|
+
|
|
152
|
+
- Updated dependencies [a779dc3]
|
|
153
|
+
- @forge/csp@3.7.0-next.0
|
|
154
|
+
|
|
155
|
+
## 5.7.3-next.10
|
|
156
|
+
|
|
157
|
+
### Patch Changes
|
|
158
|
+
|
|
159
|
+
- Updated dependencies [de0bf46]
|
|
160
|
+
- @forge/manifest@8.9.0-next.5
|
|
161
|
+
- @forge/cli-shared@6.8.0-next.10
|
|
162
|
+
|
|
163
|
+
## 5.7.3-next.9
|
|
164
|
+
|
|
165
|
+
### Patch Changes
|
|
166
|
+
|
|
167
|
+
- Updated dependencies [acf1edf]
|
|
168
|
+
- Updated dependencies [3a703de]
|
|
169
|
+
- @forge/manifest@8.9.0-next.4
|
|
170
|
+
- @forge/cli-shared@6.8.0-next.9
|
|
171
|
+
|
|
172
|
+
## 5.7.3-next.8
|
|
173
|
+
|
|
174
|
+
### Patch Changes
|
|
175
|
+
|
|
176
|
+
- Updated dependencies [0aad197]
|
|
177
|
+
- @forge/cli-shared@6.8.0-next.8
|
|
178
|
+
|
|
179
|
+
## 5.7.3-next.7
|
|
180
|
+
|
|
181
|
+
### Patch Changes
|
|
182
|
+
|
|
183
|
+
- Updated dependencies [9d231e9]
|
|
184
|
+
- Updated dependencies [b503084]
|
|
185
|
+
- @forge/cli-shared@6.8.0-next.7
|
|
186
|
+
- @forge/manifest@8.9.0-next.3
|
|
187
|
+
|
|
188
|
+
## 5.7.3-next.6
|
|
189
|
+
|
|
190
|
+
### Patch Changes
|
|
191
|
+
|
|
192
|
+
- Updated dependencies [a7db2e6]
|
|
193
|
+
- Updated dependencies [003b1ed]
|
|
194
|
+
- @forge/cli-shared@6.8.0-next.6
|
|
195
|
+
- @forge/manifest@8.9.0-next.2
|
|
196
|
+
|
|
197
|
+
## 5.7.3-next.5
|
|
198
|
+
|
|
199
|
+
### Patch Changes
|
|
200
|
+
|
|
201
|
+
- Updated dependencies [210360b]
|
|
202
|
+
- @forge/cli-shared@6.8.0-next.5
|
|
203
|
+
|
|
204
|
+
## 5.7.3-next.4
|
|
205
|
+
|
|
206
|
+
### Patch Changes
|
|
207
|
+
|
|
208
|
+
- Updated dependencies [64daaa5]
|
|
209
|
+
- @forge/manifest@8.9.0-next.1
|
|
210
|
+
- @forge/cli-shared@6.8.0-next.4
|
|
211
|
+
|
|
3
212
|
## 5.7.3-next.3
|
|
4
213
|
|
|
5
214
|
### Patch Changes
|
|
@@ -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,eAAe,EACf,QAAQ,EACR,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,
|
|
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,QAAQ,EACR,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,CAkEtB,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;IAC5B,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB;AAED,qBAAa,gBAAiB,SAAQ,UAAU,CAAC,OAAO,EAAE,6BAA6B,EAAE,OAAO,EAAE,CAAC;IAe/F,OAAO,CAAC,QAAQ;IAdlB,MAAM,CAAC,cAAc,SAAgC;IACrD,MAAM,CAAC,aAAa,SAA+B;IACnD,MAAM,CAAC,aAAa,SAA+B;IACnD,MAAM,CAAC,oBAAoB,SAAsC;IACjE,MAAM,CAAC,uBAAuB,SAAyC;IACvE,MAAM,CAAC,mBAAmB,SAAqC;IAE/D,OAAO,CAAC,IAAI,CAAC,CAA0B;IACvC,OAAO,CAAC,UAAU,CAAC,CAA0B;IAC7C,OAAO,CAAC,SAAS,CAAC,CAA0B;IAC5C,OAAO,CAAC,KAAK,CAAC,CAAa;gBAGzB,WAAW,EAAE,MAAM,EACX,QAAQ,EAAE,QAAQ,EAC1B,MAAM,EAAE,UAAU;IAKP,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IA2FvC,SAAS,CAAC,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAcjD,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"}
|
|
@@ -39,22 +39,24 @@ const fixMissingPermissions = async (errors, warnings, state) => {
|
|
|
39
39
|
const currentPermissions = (await state.configFile.readConfig())?.permissions ?? {};
|
|
40
40
|
const currentRemotes = (await state.configFile.readConfig())?.remotes ?? [];
|
|
41
41
|
const currentScopes = currentPermissions?.scopes ?? [];
|
|
42
|
-
currentScopes.forEach((
|
|
42
|
+
currentScopes.forEach((scope) => missingScopes.add(scope));
|
|
43
43
|
const currentExternalFetchBackend = currentPermissions?.external?.fetch?.backend ?? [];
|
|
44
44
|
currentExternalFetchBackend
|
|
45
45
|
.map((item) => {
|
|
46
46
|
if (typeof item === 'string')
|
|
47
47
|
return item;
|
|
48
|
+
if ('address' in item)
|
|
49
|
+
return item.address;
|
|
48
50
|
return currentRemotes.find((remote) => remote.key == item.remote)?.baseUrl;
|
|
49
51
|
})
|
|
50
52
|
.filter((item) => typeof item === 'string')
|
|
51
|
-
.forEach((
|
|
53
|
+
.forEach((scope) => missingExternalFetchBackend.add(scope));
|
|
52
54
|
const arrayMissingExternalFetchBackend = [...missingExternalFetchBackend];
|
|
53
55
|
const currentContentStyles = currentPermissions?.content?.styles ?? [];
|
|
54
|
-
currentContentStyles.forEach((
|
|
56
|
+
currentContentStyles.forEach((scope) => missingContentStyle.add(scope));
|
|
55
57
|
const arrayMissingContentStyles = [...missingContentStyle];
|
|
56
58
|
const currentExternalImages = currentPermissions?.external?.images ?? [];
|
|
57
|
-
currentExternalImages.forEach((
|
|
59
|
+
currentExternalImages.forEach((scope) => missingExternalImage.add(typeof scope === 'string' ? scope : scope.address));
|
|
58
60
|
const arrayMissingExternalImages = [...missingExternalImage];
|
|
59
61
|
const config = {
|
|
60
62
|
...currentPermissions,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"external-fetch-verifier.d.ts","sourceRoot":"","sources":["../../../../../src/lint/linters/permission-linter/verifiers/external-fetch-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,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAIxD,qBAAa,qBAAsB,SAAQ,qBAAsB,YAAW,iBAAiB,CAAC,eAAe,EAAE,CAAC;IAC9G,OAAO,CAAC,sBAAsB,CAAyB;gBAE3C,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ;
|
|
1
|
+
{"version":3,"file":"external-fetch-verifier.d.ts","sourceRoot":"","sources":["../../../../../src/lint/linters/permission-linter/verifiers/external-fetch-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,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAIxD,qBAAa,qBAAsB,SAAQ,qBAAsB,YAAW,iBAAiB,CAAC,eAAe,EAAE,CAAC;IAC9G,OAAO,CAAC,sBAAsB,CAAyB;gBAE3C,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ;IAuBnD,SAAS,CAAC,YAAY,IAAI,SAAS;IAItB,OAAO,CAAC,UAAU,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;CAc/E"}
|
|
@@ -15,9 +15,13 @@ class ExternalFetchVerifier extends verifier_interface_1.BaseLintIssueVerifier {
|
|
|
15
15
|
...(this.manifest?.permissions?.external?.fetch?.client || [])
|
|
16
16
|
];
|
|
17
17
|
const remoteList = this.manifest?.remotes ?? [];
|
|
18
|
-
const collectedUrls = allowList
|
|
18
|
+
const collectedUrls = allowList
|
|
19
|
+
.map((item) => (typeof item === 'object' && 'address' in item ? item.address : item))
|
|
20
|
+
.filter((item) => typeof item === 'string');
|
|
19
21
|
const collectedRemotes = allowList
|
|
20
|
-
.map((item) => typeof item !== 'string' &&
|
|
22
|
+
.map((item) => typeof item !== 'string' &&
|
|
23
|
+
'remote' in item &&
|
|
24
|
+
remoteList.find((remoteItem) => remoteItem.key === item.remote)?.baseUrl)
|
|
21
25
|
.filter((x) => typeof x === 'string');
|
|
22
26
|
this.egressFilteringService = new egress_1.EgressFilteringService(collectedUrls.concat(collectedRemotes));
|
|
23
27
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/lint",
|
|
3
|
-
"version": "5.7.3-next.
|
|
3
|
+
"version": "5.7.3-next.30",
|
|
4
4
|
"description": "Linting for forge apps",
|
|
5
5
|
"main": "out/index.js",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@atlassian/xen-test-util": "^4.2.0",
|
|
14
|
-
"@forge/api": "^5.
|
|
14
|
+
"@forge/api": "^5.2.0-next.1",
|
|
15
15
|
"@types/array.prototype.flatmap": "^1.2.6",
|
|
16
16
|
"@types/cross-spawn": "^6.0.6",
|
|
17
17
|
"@types/eslint": "8.56.2",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"eslint-plugin-import": "^2.29.1"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@forge/cli-shared": "6.8.0-next.
|
|
23
|
-
"@forge/csp": "3.
|
|
22
|
+
"@forge/cli-shared": "6.8.0-next.29",
|
|
23
|
+
"@forge/csp": "3.7.0-next.1",
|
|
24
24
|
"@forge/egress": "1.4.0",
|
|
25
|
-
"@forge/manifest": "
|
|
25
|
+
"@forge/manifest": "9.0.0-next.14",
|
|
26
26
|
"@typescript-eslint/typescript-estree": "^5.62.0",
|
|
27
27
|
"array.prototype.flatmap": "^1.3.2",
|
|
28
28
|
"atlassian-openapi": "^1.0.18",
|