@forge/lint 5.7.3-next.9 → 5.7.3

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,208 @@
1
1
  # @forge/lint
2
2
 
3
+ ## 5.7.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 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
8
+ - Updated dependencies [f9c2880]
9
+ - Updated dependencies [3a510c5]
10
+ - Updated dependencies [2c0e151]
11
+ - Updated dependencies [a779dc3]
12
+ - Updated dependencies [7243788]
13
+ - Updated dependencies [acf1edf]
14
+ - Updated dependencies [2204d8d]
15
+ - Updated dependencies [2d5a0e6]
16
+ - Updated dependencies [2cdac63]
17
+ - Updated dependencies [c57e34a]
18
+ - Updated dependencies [9d231e9]
19
+ - Updated dependencies [0aad197]
20
+ - Updated dependencies [61f499c]
21
+ - Updated dependencies [b51be39]
22
+ - Updated dependencies [1a9af0b]
23
+ - Updated dependencies [999a9d0]
24
+ - Updated dependencies [d0cb567]
25
+ - Updated dependencies [7d8339b]
26
+ - Updated dependencies [f12ec8a]
27
+ - Updated dependencies [4b083be]
28
+ - Updated dependencies [94e48b9]
29
+ - Updated dependencies [0dfb15d]
30
+ - Updated dependencies [d156658]
31
+ - Updated dependencies [7a83fd9]
32
+ - Updated dependencies [0dd4e3b]
33
+ - Updated dependencies [b503084]
34
+ - Updated dependencies [8c34ca3]
35
+ - Updated dependencies [336f74f]
36
+ - Updated dependencies [210360b]
37
+ - Updated dependencies [a7db2e6]
38
+ - Updated dependencies [64daaa5]
39
+ - Updated dependencies [99739ec]
40
+ - Updated dependencies [3a703de]
41
+ - Updated dependencies [003b1ed]
42
+ - @forge/cli-shared@6.8.0
43
+ - @forge/csp@3.7.0
44
+ - @forge/manifest@9.0.0
45
+
46
+ ## 5.7.3-next.30
47
+
48
+ ### Patch Changes
49
+
50
+ - Updated dependencies [0dd4e3b]
51
+ - @forge/manifest@9.0.0-next.14
52
+ - @forge/cli-shared@6.8.0-next.29
53
+
54
+ ## 5.7.3-next.29
55
+
56
+ ### Patch Changes
57
+
58
+ - Updated dependencies [f12ec8a]
59
+ - @forge/cli-shared@6.8.0-next.28
60
+
61
+ ## 5.7.3-next.28
62
+
63
+ ### Patch Changes
64
+
65
+ - Updated dependencies [d0cb567]
66
+ - @forge/cli-shared@6.8.0-next.27
67
+
68
+ ## 5.7.3-next.27
69
+
70
+ ### Patch Changes
71
+
72
+ - Updated dependencies [2c0e151]
73
+ - @forge/cli-shared@6.8.0-next.26
74
+
75
+ ## 5.7.3-next.26
76
+
77
+ ### Patch Changes
78
+
79
+ - Updated dependencies [2d5a0e6]
80
+ - Updated dependencies [99739ec]
81
+ - @forge/manifest@9.0.0-next.13
82
+ - @forge/cli-shared@6.8.0-next.25
83
+
84
+ ## 5.7.3-next.25
85
+
86
+ ### Patch Changes
87
+
88
+ - 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
89
+ - Updated dependencies [1a9af0b]
90
+ - Updated dependencies [8c34ca3]
91
+ - @forge/cli-shared@6.8.0-next.24
92
+ - @forge/manifest@8.9.0-next.12
93
+ - @forge/csp@3.7.0-next.1
94
+
95
+ ## 5.7.3-next.24
96
+
97
+ ### Patch Changes
98
+
99
+ - Updated dependencies [0dfb15d]
100
+ - @forge/manifest@8.9.0-next.11
101
+ - @forge/cli-shared@6.8.0-next.23
102
+
103
+ ## 5.7.3-next.23
104
+
105
+ ### Patch Changes
106
+
107
+ - Updated dependencies [b51be39]
108
+ - @forge/manifest@8.9.0-next.10
109
+ - @forge/cli-shared@6.8.0-next.22
110
+
111
+ ## 5.7.3-next.22
112
+
113
+ ### Patch Changes
114
+
115
+ - @forge/cli-shared@6.8.0-next.21
116
+ - @forge/manifest@8.9.0-next.9
117
+
118
+ ## 5.7.3-next.21
119
+
120
+ ### Patch Changes
121
+
122
+ - Updated dependencies [3a510c5]
123
+ - @forge/cli-shared@6.8.0-next.20
124
+
125
+ ## 5.7.3-next.20
126
+
127
+ ### Patch Changes
128
+
129
+ - Updated dependencies [61f499c]
130
+ - @forge/cli-shared@6.8.0-next.19
131
+
132
+ ## 5.7.3-next.19
133
+
134
+ ### Patch Changes
135
+
136
+ - Updated dependencies [f9c2880]
137
+ - @forge/cli-shared@6.8.0-next.18
138
+
139
+ ## 5.7.3-next.18
140
+
141
+ ### Patch Changes
142
+
143
+ - Updated dependencies [7d8339b]
144
+ - @forge/cli-shared@6.8.0-next.17
145
+
146
+ ## 5.7.3-next.17
147
+
148
+ ### Patch Changes
149
+
150
+ - Updated dependencies [2204d8d]
151
+ - @forge/cli-shared@6.8.0-next.16
152
+
153
+ ## 5.7.3-next.16
154
+
155
+ ### Patch Changes
156
+
157
+ - Updated dependencies [4b083be]
158
+ - @forge/manifest@8.9.0-next.8
159
+ - @forge/cli-shared@6.8.0-next.15
160
+
161
+ ## 5.7.3-next.15
162
+
163
+ ### Patch Changes
164
+
165
+ - Updated dependencies [7a83fd9]
166
+ - @forge/cli-shared@6.8.0-next.14
167
+
168
+ ## 5.7.3-next.14
169
+
170
+ ### Patch Changes
171
+
172
+ - Updated dependencies [c57e34a]
173
+ - @forge/cli-shared@6.8.0-next.13
174
+
175
+ ## 5.7.3-next.13
176
+
177
+ ### Patch Changes
178
+
179
+ - Updated dependencies [7243788]
180
+ - @forge/cli-shared@6.8.0-next.12
181
+ - @forge/manifest@8.9.0-next.7
182
+
183
+ ## 5.7.3-next.12
184
+
185
+ ### Patch Changes
186
+
187
+ - Updated dependencies [336f74f]
188
+ - @forge/cli-shared@6.8.0-next.11
189
+ - @forge/manifest@8.9.0-next.6
190
+
191
+ ## 5.7.3-next.11
192
+
193
+ ### Patch Changes
194
+
195
+ - Updated dependencies [a779dc3]
196
+ - @forge/csp@3.7.0-next.0
197
+
198
+ ## 5.7.3-next.10
199
+
200
+ ### Patch Changes
201
+
202
+ - Updated dependencies [de0bf46]
203
+ - @forge/manifest@8.9.0-next.5
204
+ - @forge/cli-shared@6.8.0-next.10
205
+
3
206
  ## 5.7.3-next.9
4
207
 
5
208
  ### 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,EAAE,cAAc,EAAE,CAAC;IACvB,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC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ACnD,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.3",
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.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.0.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",