@forge/lint 5.7.0-next.9 → 5.7.1-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,74 @@
1
1
  # @forge/lint
2
2
 
3
+ ## 5.7.1-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 091886c: prepare installations product field to accept multiple products
8
+ - Updated dependencies [091886c]
9
+ - Updated dependencies [29e8c8b]
10
+ - @forge/cli-shared@6.6.1-next.0
11
+
12
+ ## 5.7.0
13
+
14
+ ### Minor Changes
15
+
16
+ - 874e9a2: Add linter to ensure UI Kit Frame component has set the resource property correctly
17
+
18
+ ### Patch Changes
19
+
20
+ - c2731d5: Remove lint errors for allow-listed image hosts
21
+ - cad81f0: Corrected product name lookup.
22
+ - a5e7647: Update license for Forge public packages
23
+ - Updated dependencies [f8e2503]
24
+ - Updated dependencies [e5cca82]
25
+ - Updated dependencies [1a76049]
26
+ - Updated dependencies [0954fcd]
27
+ - Updated dependencies [951f3f0]
28
+ - Updated dependencies [385907a]
29
+ - Updated dependencies [2330d2c]
30
+ - Updated dependencies [87ae208]
31
+ - Updated dependencies [cd0e244]
32
+ - Updated dependencies [9eb7594]
33
+ - Updated dependencies [a5e7647]
34
+ - @forge/cli-shared@6.6.0
35
+ - @forge/csp@3.6.1
36
+ - @forge/manifest@8.6.1
37
+ - @forge/egress@1.3.1
38
+
39
+ ## 5.7.0-next.13
40
+
41
+ ### Patch Changes
42
+
43
+ - Updated dependencies [9eb7594]
44
+ - @forge/manifest@8.6.1-next.4
45
+ - @forge/cli-shared@6.6.0-next.11
46
+
47
+ ## 5.7.0-next.12
48
+
49
+ ### Patch Changes
50
+
51
+ - c2731d5: Remove lint errors for allow-listed image hosts
52
+
53
+ ## 5.7.0-next.11
54
+
55
+ ### Patch Changes
56
+
57
+ - a5e7647: Update license for Forge public packages
58
+ - Updated dependencies [a5e7647]
59
+ - @forge/cli-shared@6.6.0-next.10
60
+ - @forge/manifest@8.6.1-next.3
61
+ - @forge/egress@1.3.1-next.0
62
+
63
+ ## 5.7.0-next.10
64
+
65
+ ### Patch Changes
66
+
67
+ - Updated dependencies [385907a]
68
+ - Updated dependencies [87ae208]
69
+ - @forge/cli-shared@6.6.0-next.9
70
+ - @forge/manifest@8.6.1-next.2
71
+
3
72
  ## 5.7.0-next.9
4
73
 
5
74
  ### Patch Changes
package/LICENSE.txt ADDED
@@ -0,0 +1,7 @@
1
+ Copyright (c) 2025 Atlassian
2
+ Permission is hereby granted to use this software in accordance with the terms
3
+ and conditions outlined in the Atlassian Developer Terms, which can be found
4
+ at the following URL:
5
+ https://developer.atlassian.com/platform/marketplace/atlassian-developer-terms/
6
+ By using this software, you agree to comply with these terms and conditions.
7
+ If you do not agree with these terms, you are not permitted to use this software.
@@ -1 +1 @@
1
- {"version":3,"file":"image-url-verifier.d.ts","sourceRoot":"","sources":["../../../../../src/lint/linters/permission-linter/verifiers/image-url-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,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAIjD,qBAAa,gBAAiB,SAAQ,qBAAsB,YAAW,iBAAiB,CAAC,QAAQ,EAAE,CAAC;IAClG,OAAO,CAAC,sBAAsB,CAAyB;gBAE3C,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ;IAUnD,SAAS,CAAC,YAAY,IAAI,SAAS;IAItB,OAAO,CAAC,SAAS,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;CAcvE"}
1
+ {"version":3,"file":"image-url-verifier.d.ts","sourceRoot":"","sources":["../../../../../src/lint/linters/permission-linter/verifiers/image-url-verifier.ts"],"names":[],"mappings":"AAEA,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,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAiBjD,qBAAa,gBAAiB,SAAQ,qBAAsB,YAAW,iBAAiB,CAAC,QAAQ,EAAE,CAAC;IAClG,OAAO,CAAC,sBAAsB,CAAyB;gBAE3C,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ;IAgBnD,SAAS,CAAC,YAAY,IAAI,SAAS;IAItB,OAAO,CAAC,SAAS,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;CAcvE"}
@@ -1,17 +1,39 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ImageUrlVerifier = void 0;
4
+ const cli_shared_1 = require("@forge/cli-shared");
5
+ const csp_1 = require("@forge/csp");
4
6
  const egress_1 = require("@forge/egress");
5
7
  const linter_interface_1 = require("../../../linter-interface");
6
8
  const verifier_interface_1 = require("../../verifier-interface");
7
9
  const text_1 = require("../../../text");
8
10
  const utils_1 = require("../../utils");
11
+ const getMicrosEnvironment = (environment) => {
12
+ if (environment === cli_shared_1.Environments.DEV) {
13
+ return 'dev';
14
+ }
15
+ else if (environment === cli_shared_1.Environments.STG) {
16
+ return 'stg';
17
+ }
18
+ else if (environment === cli_shared_1.Environments.FEDRAMP_MODERATE_STAGING) {
19
+ return 'fedramp-stg';
20
+ }
21
+ else if (environment === cli_shared_1.Environments.FEDRAMP_MODERATE_PROD) {
22
+ return 'fedramp-prod';
23
+ }
24
+ return 'prod';
25
+ };
9
26
  class ImageUrlVerifier extends verifier_interface_1.BaseLintIssueVerifier {
10
27
  egressFilteringService;
11
28
  constructor(environment, manifest) {
12
29
  super(environment, manifest);
30
+ const microsEnv = getMicrosEnvironment((0, cli_shared_1.getEnvironmentConfig)());
13
31
  const allowList = this.manifest?.permissions?.external?.images ?? [];
14
- const collectedUrls = allowList.filter((item) => typeof item === 'string');
32
+ const collectedUrls = [
33
+ ...allowList,
34
+ ...csp_1.ATLASSIAN_IMAGES_HOSTS[microsEnv],
35
+ ...csp_1.EXTERNAL_ALLOW_LISTED_IMAGES_HOSTS
36
+ ].filter((item) => typeof item === 'string');
15
37
  this.egressFilteringService = new egress_1.EgressFilteringService(collectedUrls);
16
38
  }
17
39
  getLintClass() {
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@forge/lint",
3
- "version": "5.7.0-next.9",
3
+ "version": "5.7.1-next.0",
4
4
  "description": "Linting for forge apps",
5
5
  "main": "out/index.js",
6
- "license": "UNLICENSED",
6
+ "license": "SEE LICENSE IN LICENSE.txt",
7
7
  "scripts": {
8
8
  "build": "yarn run clean && yarn run compile",
9
9
  "compile": "tsc -b -v",
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "devDependencies": {
13
13
  "@atlassian/xen-test-util": "^4.2.0",
14
- "@forge/api": "^5.0.1-next.2",
14
+ "@forge/api": "^5.0.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,9 +19,10 @@
19
19
  "eslint-plugin-import": "^2.29.1"
20
20
  },
21
21
  "dependencies": {
22
- "@forge/cli-shared": "6.6.0-next.8",
23
- "@forge/egress": "1.3.0",
24
- "@forge/manifest": "8.6.1-next.1",
22
+ "@forge/cli-shared": "6.6.1-next.0",
23
+ "@forge/csp": "3.6.1",
24
+ "@forge/egress": "1.3.1",
25
+ "@forge/manifest": "8.6.1",
25
26
  "@typescript-eslint/typescript-estree": "^5.62.0",
26
27
  "array.prototype.flatmap": "^1.3.2",
27
28
  "atlassian-openapi": "^1.0.18",