@forge/lint 5.7.0-next.9 → 5.7.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,65 @@
1
1
  # @forge/lint
2
2
 
3
+ ## 5.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 874e9a2: Add linter to ensure UI Kit Frame component has set the resource property correctly
8
+
9
+ ### Patch Changes
10
+
11
+ - c2731d5: Remove lint errors for allow-listed image hosts
12
+ - cad81f0: Corrected product name lookup.
13
+ - a5e7647: Update license for Forge public packages
14
+ - Updated dependencies [f8e2503]
15
+ - Updated dependencies [e5cca82]
16
+ - Updated dependencies [1a76049]
17
+ - Updated dependencies [0954fcd]
18
+ - Updated dependencies [951f3f0]
19
+ - Updated dependencies [385907a]
20
+ - Updated dependencies [2330d2c]
21
+ - Updated dependencies [87ae208]
22
+ - Updated dependencies [cd0e244]
23
+ - Updated dependencies [9eb7594]
24
+ - Updated dependencies [a5e7647]
25
+ - @forge/cli-shared@6.6.0
26
+ - @forge/csp@3.6.1
27
+ - @forge/manifest@8.6.1
28
+ - @forge/egress@1.3.1
29
+
30
+ ## 5.7.0-next.13
31
+
32
+ ### Patch Changes
33
+
34
+ - Updated dependencies [9eb7594]
35
+ - @forge/manifest@8.6.1-next.4
36
+ - @forge/cli-shared@6.6.0-next.11
37
+
38
+ ## 5.7.0-next.12
39
+
40
+ ### Patch Changes
41
+
42
+ - c2731d5: Remove lint errors for allow-listed image hosts
43
+
44
+ ## 5.7.0-next.11
45
+
46
+ ### Patch Changes
47
+
48
+ - a5e7647: Update license for Forge public packages
49
+ - Updated dependencies [a5e7647]
50
+ - @forge/cli-shared@6.6.0-next.10
51
+ - @forge/manifest@8.6.1-next.3
52
+ - @forge/egress@1.3.1-next.0
53
+
54
+ ## 5.7.0-next.10
55
+
56
+ ### Patch Changes
57
+
58
+ - Updated dependencies [385907a]
59
+ - Updated dependencies [87ae208]
60
+ - @forge/cli-shared@6.6.0-next.9
61
+ - @forge/manifest@8.6.1-next.2
62
+
3
63
  ## 5.7.0-next.9
4
64
 
5
65
  ### 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.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.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",