@forge/csp 2.0.0 → 2.0.1

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,17 @@
1
1
  # @forge/csp
2
2
 
3
+ ## 2.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 2a60561: Allow Forge Content Security Policy to load stylesheets from unpkg.com to enable an interim theme mounting solution for Atlassian Design System: Design Tokens
8
+
9
+ ## 2.0.1-next.0
10
+
11
+ ### Patch Changes
12
+
13
+ - 2a605619: Allow Forge Content Security Policy to load stylesheets from unpkg.com to enable an interim theme mounting solution for Atlassian Design System: Design Tokens
14
+
3
15
  ## 2.0.0
4
16
 
5
17
  ### Major Changes
@@ -5,6 +5,6 @@ export declare class CSPInjectionService {
5
5
  private getForgeGlobalCSP;
6
6
  private getExistingCSPDetails;
7
7
  private getFrameAncestors;
8
- getInjectableCSP: (existingCSPDetails: CSPDetails, env: LambdaEnvironment, tunnelCSPReporterUri?: string | undefined) => string[];
8
+ getInjectableCSP: (existingCSPDetails: CSPDetails, env: LambdaEnvironment, tunnelCSPReporterUri?: string) => string[];
9
9
  }
10
10
  //# sourceMappingURL=csp-injection-service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"csp-injection-service.d.ts","sourceRoot":"","sources":["../../src/csp/csp-injection-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAmB,MAAM,UAAU,CAAC;AAUvD,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,eAAe;IAQvB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,iBAAiB;IAalB,gBAAgB,uBACD,UAAU,OACzB,iBAAiB,gDAErB,MAAM,EAAE,CA4CT;CACH"}
1
+ {"version":3,"file":"csp-injection-service.d.ts","sourceRoot":"","sources":["../../src/csp/csp-injection-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAmB,MAAM,UAAU,CAAC;AAUvD,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,eAAe;IAQvB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,iBAAiB;IAalB,gBAAgB,uBACD,UAAU,OACzB,iBAAiB,yBACC,MAAM,KAC5B,MAAM,EAAE,CAiDT;CACH"}
@@ -46,7 +46,7 @@ class CSPInjectionService {
46
46
  `media-src ${mediaSrc}`,
47
47
  `connect-src ${connectSrc}`,
48
48
  `script-src ${scriptSrc}`,
49
- `style-src ${styleSrc}`,
49
+ `style-src ${styleSrc} https://unpkg.com/@atlaskit/tokens@0.10.30/css/atlassian-light.css https://unpkg.com/@atlaskit/tokens@0.10.30/css/atlassian-dark.css`,
50
50
  `form-action 'self'`,
51
51
  `sandbox allow-downloads allow-forms allow-modals allow-pointer-lock allow-same-origin allow-scripts`,
52
52
  `report-uri ${reportUri}`
@@ -133,7 +133,7 @@ class CSPProcessingService {
133
133
  this.logger.info('discarding potentially-malicious CSP');
134
134
  return {};
135
135
  }
136
- return content_security_policy_parser_1.default(cspContent);
136
+ return (0, content_security_policy_parser_1.default)(cspContent);
137
137
  }
138
138
  }
139
139
  exports.CSPProcessingService = CSPProcessingService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/csp",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Contains the CSP configuration for Custom UI resources in Forge",
5
5
  "main": "out/index.js",
6
6
  "author": "Atlassian",
@@ -11,9 +11,9 @@
11
11
  "clean": "rm -rf ./out && rm -f tsconfig.tsbuildinfo"
12
12
  },
13
13
  "devDependencies": {
14
- "@forge/cli-shared": "^3.1.0",
15
- "@forge/manifest": "^4.2.0",
16
- "@types/jest": "^26.0.0"
14
+ "@forge/cli-shared": "^3.3.0",
15
+ "@forge/manifest": "^4.5.1",
16
+ "@types/jest": "^29.1.2"
17
17
  },
18
18
  "dependencies": {
19
19
  "cheerio": "^0.22.0",