@forge/tunnel 0.0.0-experimental-29a2cc1 → 0.0.0-experimental-c3effe3

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,19 +1,25 @@
1
1
  # @forge/tunnel
2
2
 
3
- ## 0.0.0-experimental-29a2cc1
3
+ ## 0.0.0-experimental-c3effe3
4
4
 
5
5
  ### Minor Changes
6
6
 
7
- - 4d1c111: Add keytar to shrinkwrap package list
7
+ - 189ba71: Add keytar to shrinkwrap package list
8
8
 
9
9
  ### Patch Changes
10
10
 
11
11
  - Updated dependencies [69f42bd]
12
12
  - Updated dependencies [e0f6a1c]
13
- - Updated dependencies [4d1c111]
14
- - @forge/cli-shared@0.0.0-experimental-29a2cc1
15
- - @forge/bundler@0.0.0-experimental-29a2cc1
16
- - @forge/runtime@0.0.0-experimental-29a2cc1
13
+ - Updated dependencies [189ba71]
14
+ - @forge/cli-shared@0.0.0-experimental-c3effe3
15
+ - @forge/bundler@0.0.0-experimental-c3effe3
16
+ - @forge/runtime@0.0.0-experimental-c3effe3
17
+
18
+ ## 1.8.2-next.6
19
+
20
+ ### Patch Changes
21
+
22
+ - @forge/bundler@3.0.9-next.6
17
23
 
18
24
  ## 1.8.2-next.5
19
25
 
@@ -17,7 +17,6 @@ export declare class ResourceTunnelServer {
17
17
  private server;
18
18
  private readonly proxy;
19
19
  private socket;
20
- private cspReporterServerPort;
21
20
  constructor({ port, key, path, tunnel, permissions, remotes, logger, cspReporterServerPort }: ResourceTunnelServerArgs);
22
21
  getApp(): Express;
23
22
  static transformPermissionsWithRemotes(permissions: Permissions, remotes: Remotes): {
@@ -1 +1 @@
1
- {"version":3,"file":"resource-tunnel-server.d.ts","sourceRoot":"","sources":["../../../src/tunnelling/servers/resource-tunnel-server.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAMR,MAAM,EAGP,MAAM,mBAAmB,CAAC;AAC3B,OAAgB,EA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O,CAAC,YAAY,CAAoB;IAExC,OAAO,CAAC,wBAAwB,CAG3B;IAEL,OAAO,CAAC,yBAAyB,CAG5B;IAEL,OAAO,CAAC,6BAA6B,CAmBhC;CACN"}
@@ -5,7 +5,6 @@ const tslib_1 = require("tslib");
5
5
  const cli_shared_1 = require("@forge/cli-shared");
6
6
  const express_1 = tslib_1.__importDefault(require("express"));
7
7
  const http_proxy_middleware_1 = require("http-proxy-middleware");
8
- const csp_1 = require("@forge/csp");
9
8
  const express_mung_1 = require("express-mung");
10
9
  var ConnectionErrorCode;
11
10
  (function (ConnectionErrorCode) {
@@ -14,9 +13,7 @@ var ConnectionErrorCode;
14
13
  const HOST = process.env.FORGE_DEV_TUNNEL ? 'localhost' : 'host.docker.internal';
15
14
  class ResourceTunnelServer {
16
15
  constructor({ port, key, path, tunnel, permissions, remotes, logger, cspReporterServerPort }) {
17
- this.getCspHeader = (existingCsp) => new csp_1.CSPInjectionService()
18
- .getInjectableCSP(existingCsp, cli_shared_1.getEnvironment(cli_shared_1.CDNEnvironments), `http://localhost:${this.cspReporterServerPort}`)
19
- .join('; ');
16
+ this.getCspHeader = () => '';
20
17
  this.injectGlobalBridgeScript = (htmlContent) => new cli_shared_1.BridgeScriptService().injectBridgeCore(htmlContent, () => {
21
18
  throw new Error('Malformed HTML document');
22
19
  });
@@ -30,15 +27,13 @@ class ResourceTunnelServer {
30
27
  res.removeHeader('content-length');
31
28
  const htmlContentWithIframeResizerScript = this.injectIframeResizerScript(body);
32
29
  const htmlContentWithBridgeScript = this.injectGlobalBridgeScript(htmlContentWithIframeResizerScript);
33
- const cspDetails = new csp_1.CSPProcessingService({ info: () => { } }).getCspDetails(htmlContentWithBridgeScript, ResourceTunnelServer.transformPermissionsWithRemotes(permissions, remotes));
34
- res.setHeader('Content-Security-Policy', this.getCspHeader(cspDetails));
30
+ res.setHeader('Content-Security-Policy', this.getCspHeader());
35
31
  return htmlContentWithBridgeScript;
36
32
  });
37
33
  this.port = port;
38
34
  this.key = key;
39
35
  this.path = path;
40
36
  this.logger = logger;
41
- this.cspReporterServerPort = cspReporterServerPort;
42
37
  this.app = express_1.default();
43
38
  this.app.use(this.getCustomUIResourceMiddleware(permissions, remotes));
44
39
  if (tunnel) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/tunnel",
3
- "version": "0.0.0-experimental-29a2cc1",
3
+ "version": "0.0.0-experimental-c3effe3",
4
4
  "description": "Tunnel functionality for Forge CLI",
5
5
  "author": "Atlassian",
6
6
  "license": "UNLICENSED",
@@ -16,11 +16,10 @@
16
16
  "postbuild": "chmod +x out/*.js"
17
17
  },
18
18
  "dependencies": {
19
- "@forge/bundler": "0.0.0-experimental-29a2cc1",
20
- "@forge/cli-shared": "0.0.0-experimental-29a2cc1",
21
- "@forge/csp": "^1.11.0",
19
+ "@forge/bundler": "0.0.0-experimental-c3effe3",
20
+ "@forge/cli-shared": "0.0.0-experimental-c3effe3",
22
21
  "@forge/isolated-vm": "3.3.10",
23
- "@forge/runtime": "0.0.0-experimental-29a2cc1",
22
+ "@forge/runtime": "0.0.0-experimental-c3effe3",
24
23
  "express": "^4.17.1",
25
24
  "express-mung": "^0.5.1",
26
25
  "http-proxy-middleware": "^1.0.6",
@@ -31,7 +30,7 @@
31
30
  "uuid": "^3.4.0"
32
31
  },
33
32
  "devDependencies": {
34
- "@forge/manifest": "^0.0.0-experimental-29a2cc1",
33
+ "@forge/manifest": "^0.0.0-experimental-c3effe3",
35
34
  "@types/express": "^4.17.2",
36
35
  "@types/express-mung": "^0.5.2",
37
36
  "@types/jest": "^26.0.0",