@forge/lint 5.7.3-next.9 → 5.7.4-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,216 @@
1
1
  # @forge/lint
2
2
 
3
+ ## 5.7.4-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [680704b]
8
+ - @forge/manifest@9.1.0-next.0
9
+ - @forge/cli-shared@6.8.1-next.0
10
+
11
+ ## 5.7.3
12
+
13
+ ### Patch Changes
14
+
15
+ - 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
16
+ - Updated dependencies [f9c2880]
17
+ - Updated dependencies [3a510c5]
18
+ - Updated dependencies [2c0e151]
19
+ - Updated dependencies [a779dc3]
20
+ - Updated dependencies [7243788]
21
+ - Updated dependencies [acf1edf]
22
+ - Updated dependencies [2204d8d]
23
+ - Updated dependencies [2d5a0e6]
24
+ - Updated dependencies [2cdac63]
25
+ - Updated dependencies [c57e34a]
26
+ - Updated dependencies [9d231e9]
27
+ - Updated dependencies [0aad197]
28
+ - Updated dependencies [61f499c]
29
+ - Updated dependencies [b51be39]
30
+ - Updated dependencies [1a9af0b]
31
+ - Updated dependencies [999a9d0]
32
+ - Updated dependencies [d0cb567]
33
+ - Updated dependencies [7d8339b]
34
+ - Updated dependencies [f12ec8a]
35
+ - Updated dependencies [4b083be]
36
+ - Updated dependencies [94e48b9]
37
+ - Updated dependencies [0dfb15d]
38
+ - Updated dependencies [d156658]
39
+ - Updated dependencies [7a83fd9]
40
+ - Updated dependencies [0dd4e3b]
41
+ - Updated dependencies [b503084]
42
+ - Updated dependencies [8c34ca3]
43
+ - Updated dependencies [336f74f]
44
+ - Updated dependencies [210360b]
45
+ - Updated dependencies [a7db2e6]
46
+ - Updated dependencies [64daaa5]
47
+ - Updated dependencies [99739ec]
48
+ - Updated dependencies [3a703de]
49
+ - Updated dependencies [003b1ed]
50
+ - @forge/cli-shared@6.8.0
51
+ - @forge/csp@3.7.0
52
+ - @forge/manifest@9.0.0
53
+
54
+ ## 5.7.3-next.30
55
+
56
+ ### Patch Changes
57
+
58
+ - Updated dependencies [0dd4e3b]
59
+ - @forge/manifest@9.0.0-next.14
60
+ - @forge/cli-shared@6.8.0-next.29
61
+
62
+ ## 5.7.3-next.29
63
+
64
+ ### Patch Changes
65
+
66
+ - Updated dependencies [f12ec8a]
67
+ - @forge/cli-shared@6.8.0-next.28
68
+
69
+ ## 5.7.3-next.28
70
+
71
+ ### Patch Changes
72
+
73
+ - Updated dependencies [d0cb567]
74
+ - @forge/cli-shared@6.8.0-next.27
75
+
76
+ ## 5.7.3-next.27
77
+
78
+ ### Patch Changes
79
+
80
+ - Updated dependencies [2c0e151]
81
+ - @forge/cli-shared@6.8.0-next.26
82
+
83
+ ## 5.7.3-next.26
84
+
85
+ ### Patch Changes
86
+
87
+ - Updated dependencies [2d5a0e6]
88
+ - Updated dependencies [99739ec]
89
+ - @forge/manifest@9.0.0-next.13
90
+ - @forge/cli-shared@6.8.0-next.25
91
+
92
+ ## 5.7.3-next.25
93
+
94
+ ### Patch Changes
95
+
96
+ - 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
97
+ - Updated dependencies [1a9af0b]
98
+ - Updated dependencies [8c34ca3]
99
+ - @forge/cli-shared@6.8.0-next.24
100
+ - @forge/manifest@8.9.0-next.12
101
+ - @forge/csp@3.7.0-next.1
102
+
103
+ ## 5.7.3-next.24
104
+
105
+ ### Patch Changes
106
+
107
+ - Updated dependencies [0dfb15d]
108
+ - @forge/manifest@8.9.0-next.11
109
+ - @forge/cli-shared@6.8.0-next.23
110
+
111
+ ## 5.7.3-next.23
112
+
113
+ ### Patch Changes
114
+
115
+ - Updated dependencies [b51be39]
116
+ - @forge/manifest@8.9.0-next.10
117
+ - @forge/cli-shared@6.8.0-next.22
118
+
119
+ ## 5.7.3-next.22
120
+
121
+ ### Patch Changes
122
+
123
+ - @forge/cli-shared@6.8.0-next.21
124
+ - @forge/manifest@8.9.0-next.9
125
+
126
+ ## 5.7.3-next.21
127
+
128
+ ### Patch Changes
129
+
130
+ - Updated dependencies [3a510c5]
131
+ - @forge/cli-shared@6.8.0-next.20
132
+
133
+ ## 5.7.3-next.20
134
+
135
+ ### Patch Changes
136
+
137
+ - Updated dependencies [61f499c]
138
+ - @forge/cli-shared@6.8.0-next.19
139
+
140
+ ## 5.7.3-next.19
141
+
142
+ ### Patch Changes
143
+
144
+ - Updated dependencies [f9c2880]
145
+ - @forge/cli-shared@6.8.0-next.18
146
+
147
+ ## 5.7.3-next.18
148
+
149
+ ### Patch Changes
150
+
151
+ - Updated dependencies [7d8339b]
152
+ - @forge/cli-shared@6.8.0-next.17
153
+
154
+ ## 5.7.3-next.17
155
+
156
+ ### Patch Changes
157
+
158
+ - Updated dependencies [2204d8d]
159
+ - @forge/cli-shared@6.8.0-next.16
160
+
161
+ ## 5.7.3-next.16
162
+
163
+ ### Patch Changes
164
+
165
+ - Updated dependencies [4b083be]
166
+ - @forge/manifest@8.9.0-next.8
167
+ - @forge/cli-shared@6.8.0-next.15
168
+
169
+ ## 5.7.3-next.15
170
+
171
+ ### Patch Changes
172
+
173
+ - Updated dependencies [7a83fd9]
174
+ - @forge/cli-shared@6.8.0-next.14
175
+
176
+ ## 5.7.3-next.14
177
+
178
+ ### Patch Changes
179
+
180
+ - Updated dependencies [c57e34a]
181
+ - @forge/cli-shared@6.8.0-next.13
182
+
183
+ ## 5.7.3-next.13
184
+
185
+ ### Patch Changes
186
+
187
+ - Updated dependencies [7243788]
188
+ - @forge/cli-shared@6.8.0-next.12
189
+ - @forge/manifest@8.9.0-next.7
190
+
191
+ ## 5.7.3-next.12
192
+
193
+ ### Patch Changes
194
+
195
+ - Updated dependencies [336f74f]
196
+ - @forge/cli-shared@6.8.0-next.11
197
+ - @forge/manifest@8.9.0-next.6
198
+
199
+ ## 5.7.3-next.11
200
+
201
+ ### Patch Changes
202
+
203
+ - Updated dependencies [a779dc3]
204
+ - @forge/csp@3.7.0-next.0
205
+
206
+ ## 5.7.3-next.10
207
+
208
+ ### Patch Changes
209
+
210
+ - Updated dependencies [de0bf46]
211
+ - @forge/manifest@8.9.0-next.5
212
+ - @forge/cli-shared@6.8.0-next.10
213
+
3
214
  ## 5.7.3-next.9
4
215
 
5
216
  ### 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,CAgEtB,CAAC;AAEF,UAAU,6BAA6B;IACrC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,EAAE,CAAC;IACzB,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,IAAI,EAA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,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,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((e) => missingScopes.add(e));
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((e) => missingExternalFetchBackend.add(e));
53
+ .forEach((scope) => missingExternalFetchBackend.add(scope));
52
54
  const arrayMissingExternalFetchBackend = [...missingExternalFetchBackend];
53
55
  const currentContentStyles = currentPermissions?.content?.styles ?? [];
54
- currentContentStyles.forEach((e) => missingContentStyle.add(e));
56
+ currentContentStyles.forEach((scope) => missingContentStyle.add(scope));
55
57
  const arrayMissingContentStyles = [...missingContentStyle];
56
58
  const currentExternalImages = currentPermissions?.external?.images ?? [];
57
- currentExternalImages.forEach((e) => missingExternalImage.add(e));
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;IAkBnD,SAAS,CAAC,YAAY,IAAI,SAAS;IAItB,OAAO,CAAC,UAAU,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;CAc/E"}
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.filter((item) => typeof item === 'string');
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' && remoteList.find((remoteItem) => remoteItem.key === item.remote)?.baseUrl)
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.9",
3
+ "version": "5.7.4-next.0",
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.1.1",
14
+ "@forge/api": "^5.2.0",
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.9",
23
- "@forge/csp": "3.6.2",
22
+ "@forge/cli-shared": "6.8.1-next.0",
23
+ "@forge/csp": "3.7.0",
24
24
  "@forge/egress": "1.4.0",
25
- "@forge/manifest": "8.9.0-next.4",
25
+ "@forge/manifest": "9.1.0-next.0",
26
26
  "@typescript-eslint/typescript-estree": "^5.62.0",
27
27
  "array.prototype.flatmap": "^1.3.2",
28
28
  "atlassian-openapi": "^1.0.18",