@forge/csp 4.0.1-next.1 → 4.0.1-next.1-experimental-effab31

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,16 @@
1
1
  # @forge/csp
2
2
 
3
+ ## 4.0.1-next.1-experimental-effab31
4
+
5
+ ### Minor Changes
6
+
7
+ - effab31: Bumped cheerio from 0.22 to 1.1
8
+
9
+ ### Patch Changes
10
+
11
+ - 195411c: patch dependencies
12
+ - f5ba3aa: Allow-list Atlassian media URLs by default for media CSP policies
13
+
3
14
  ## 4.0.1-next.1
4
15
 
5
16
  ### Patch Changes
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CSPProcessingService = exports.InvalidConnectSrc = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const cheerio_1 = tslib_1.__importDefault(require("cheerio"));
5
+ const cheerio_1 = require("cheerio");
6
6
  const content_security_policy_parser_1 = tslib_1.__importDefault(require("content-security-policy-parser"));
7
7
  const crypto_1 = tslib_1.__importDefault(require("crypto"));
8
8
  class InvalidConnectSrc extends Error {
@@ -28,7 +28,7 @@ class CSPProcessingService {
28
28
  getCspDetails(body, permissions) {
29
29
  const { scripts, styles } = permissions?.content ?? { scripts: [], styles: [] };
30
30
  const external = permissions?.external ?? {};
31
- const $ = cheerio_1.default.load(body);
31
+ const $ = (0, cheerio_1.load)(body, { xml: { xmlMode: false } });
32
32
  const { 'script-src': scriptSrc, 'style-src': styleSrc, ...mappedExternalCsp } = this.mapExternalPermissionsToCsp(external);
33
33
  return {
34
34
  'style-src': [...this.getStyleSrc($, styles), ...styleSrc],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/csp",
3
- "version": "4.0.1-next.1",
3
+ "version": "4.0.1-next.1-experimental-effab31",
4
4
  "description": "Contains the CSP configuration for Custom UI resources in Forge",
5
5
  "main": "out/index.js",
6
6
  "author": "Atlassian",
@@ -11,13 +11,13 @@
11
11
  "clean": "rm -rf ./out && rm -f tsconfig.tsbuildinfo"
12
12
  },
13
13
  "devDependencies": {
14
- "@forge/cli-shared": "8.0.1-next.5",
15
- "@forge/manifest": "10.0.1-next.5",
14
+ "@forge/cli-shared": "8.1.0-next.7-experimental-effab31",
15
+ "@forge/manifest": "10.0.1-next.7-experimental-effab31",
16
16
  "@types/jest": "^29.5.14",
17
17
  "@types/node": "20.19.1"
18
18
  },
19
19
  "dependencies": {
20
- "cheerio": "^0.22.0",
20
+ "cheerio": "^1.1.0",
21
21
  "content-security-policy-parser": "^0.4.1"
22
22
  },
23
23
  "publishConfig": {