@forge/egress 2.3.1-next.0 → 2.3.2-experimental-04cc2b9

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,29 @@
1
1
  # @forge/egress
2
2
 
3
+ ## 2.3.2-experimental-04cc2b9
4
+
5
+ ### Major Changes
6
+
7
+ - d9ef926: Adds support for TypeScript 5
8
+
9
+ ## 2.3.2
10
+
11
+ ### Patch Changes
12
+
13
+ - d33a44e: removed enum value 'navigation' from EgressType in utils.ts, that is no longer needed across Forge apps.
14
+
15
+ ## 2.3.2-next.0
16
+
17
+ ### Patch Changes
18
+
19
+ - d33a44e: removed enum value 'navigation' from EgressType in utils.ts, that is no longer needed across Forge apps.
20
+
21
+ ## 2.3.1
22
+
23
+ ### Patch Changes
24
+
25
+ - 16e7d61: Fixed bug when doing checking for CSPs
26
+
3
27
  ## 2.3.1-next.0
4
28
 
5
29
  ### Patch Changes
package/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2025 Atlassian
1
+ Copyright (c) 2026 Atlassian
2
2
  Permission is hereby granted to use this software in accordance with the terms
3
3
  and conditions outlined in the Atlassian Developer Terms, which can be found
4
4
  at the following URL:
@@ -1,4 +1,4 @@
1
- export declare type URLLike = Pick<URL, 'hostname' | 'protocol'> & {
1
+ export type URLLike = Pick<URL, 'hostname' | 'protocol'> & {
2
2
  pathname: string;
3
3
  };
4
4
  export declare function parseUrl(url: string): URLLike;
@@ -1 +1 @@
1
- {"version":3,"file":"url-parser.d.ts","sourceRoot":"","sources":["../../src/egress/url-parser.ts"],"names":[],"mappings":"AAAA,oBAAY,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,UAAU,GAAG,UAAU,CAAC,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAKhF,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAO7C"}
1
+ {"version":3,"file":"url-parser.d.ts","sourceRoot":"","sources":["../../src/egress/url-parser.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,UAAU,GAAG,UAAU,CAAC,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAKhF,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAO7C"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseUrl = void 0;
3
+ exports.parseUrl = parseUrl;
4
4
  function parseUrl(url) {
5
5
  var _a, _b;
6
6
  const protocol = (_b = (_a = url.match(/^(.*?:)/)) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : 'https:';
@@ -9,4 +9,3 @@ function parseUrl(url) {
9
9
  const pathname = hostAndPath.slice(hostname.length) || '/';
10
10
  return { protocol, hostname, pathname };
11
11
  }
12
- exports.parseUrl = parseUrl;
@@ -7,20 +7,19 @@ export declare enum EgressType {
7
7
  Frames = "FRAMES",
8
8
  Images = "IMAGES",
9
9
  Media = "MEDIA",
10
- Navigation = "NAVIGATION",
11
10
  Scripts = "SCRIPTS",
12
11
  Styles = "STYLES"
13
12
  }
14
13
  export declare enum EgressCategory {
15
14
  ANALYTICS = "ANALYTICS"
16
15
  }
17
- export declare type EgressPermissions = {
16
+ export type EgressPermissions = {
18
17
  type: EgressType;
19
18
  addresses: string[];
20
19
  category?: EgressCategory;
21
20
  inScopeEUD?: boolean;
22
21
  };
23
- export declare type EgressPermissionsSimplified = Omit<EgressPermissions, 'inScopeEUD' | 'enabled' | 'category'>;
22
+ export type EgressPermissionsSimplified = Omit<EgressPermissions, 'inScopeEUD' | 'enabled' | 'category'>;
24
23
  interface ConfigOverrides {
25
24
  ALLOW_EGRESS_ANALYTICS?: boolean;
26
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/egress/utils.ts"],"names":[],"mappings":"AAMA,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAOnD;AAED,QAAA,MAAM,qCAAqC,oBAAqB,MAAM,EAAE,KAAG,MAAM,MAAM,CA6BtF,CAAC;AAEF,oBAAY,UAAU;IACpB,gBAAgB,uBAAuB;IACvC,eAAe,sBAAsB;IACrC,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,MAAM,WAAW;CAClB;AAED,oBAAY,cAAc;IACxB,SAAS,cAAc;CACxB;AAED,oBAAY,iBAAiB,GAAG;IAC9B,IAAI,EAAE,UAAU,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,oBAAY,2BAA2B,GAAG,IAAI,CAAC,iBAAiB,EAAE,YAAY,GAAG,SAAS,GAAG,UAAU,CAAC,CAAC;AAEzG,UAAU,eAAe;IACvB,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,MAAM,WAAW,qBAAqB;IACpC,GAAG,EAAE,MAAM,eAAe,CAAC;IAC3B,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,QAAA,MAAM,yBAAyB,UAAW;IACxC,SAAS,EAAE,eAAe,CAAC;IAC3B,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAC5B,kBAAkB,CAAC,EAAE,qBAAqB,EAAE,CAAC;CAC9C,KAAG,2BAA2B,EA4B9B,CAAC;AAEF,OAAO,EAAE,qCAAqC,EAAE,yBAAyB,EAAE,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/egress/utils.ts"],"names":[],"mappings":"AAMA,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAOnD;AAED,QAAA,MAAM,qCAAqC,GAAI,iBAAiB,MAAM,EAAE,KAAG,KAAK,CAAC,MAAM,CA6BtF,CAAC;AAEF,oBAAY,UAAU;IACpB,gBAAgB,uBAAuB;IACvC,eAAe,sBAAsB;IACrC,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,MAAM,WAAW;CAClB;AAED,oBAAY,cAAc;IACxB,SAAS,cAAc;CACxB;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,UAAU,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAAC,iBAAiB,EAAE,YAAY,GAAG,SAAS,GAAG,UAAU,CAAC,CAAC;AAEzG,UAAU,eAAe;IACvB,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,MAAM,WAAW,qBAAqB;IACpC,GAAG,EAAE,MAAM,eAAe,CAAC;IAC3B,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,QAAA,MAAM,yBAAyB,GAAI,OAAO;IACxC,SAAS,EAAE,eAAe,CAAC;IAC3B,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAC5B,kBAAkB,CAAC,EAAE,qBAAqB,EAAE,CAAC;CAC9C,KAAG,2BAA2B,EA4B9B,CAAC;AAEF,OAAO,EAAE,qCAAqC,EAAE,yBAAyB,EAAE,CAAC"}
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getEgressesBasedOnToggles = exports.sortAndGroupEgressPermissionsByDomain = exports.EgressCategory = exports.EgressType = exports.globToRegex = void 0;
3
+ exports.getEgressesBasedOnToggles = exports.sortAndGroupEgressPermissionsByDomain = exports.EgressCategory = exports.EgressType = void 0;
4
+ exports.globToRegex = globToRegex;
4
5
  const url_parser_1 = require("./url-parser");
5
6
  function globToRegex(pattern) {
6
7
  const escaped = pattern.replace(/[.+?^${}()|[\]\\]/g, '\\$&');
7
8
  const regexPattern = escaped.replace(/\*/g, '.*');
8
9
  return new RegExp(`^${regexPattern}$`);
9
10
  }
10
- exports.globToRegex = globToRegex;
11
11
  const sortAndGroupEgressPermissionsByDomain = (egressAddresses) => {
12
12
  if ((egressAddresses === null || egressAddresses === void 0 ? void 0 : egressAddresses.length) === 0) {
13
13
  return [];
@@ -42,14 +42,13 @@ var EgressType;
42
42
  EgressType["Frames"] = "FRAMES";
43
43
  EgressType["Images"] = "IMAGES";
44
44
  EgressType["Media"] = "MEDIA";
45
- EgressType["Navigation"] = "NAVIGATION";
46
45
  EgressType["Scripts"] = "SCRIPTS";
47
46
  EgressType["Styles"] = "STYLES";
48
- })(EgressType = exports.EgressType || (exports.EgressType = {}));
47
+ })(EgressType || (exports.EgressType = EgressType = {}));
49
48
  var EgressCategory;
50
49
  (function (EgressCategory) {
51
50
  EgressCategory["ANALYTICS"] = "ANALYTICS";
52
- })(EgressCategory = exports.EgressCategory || (exports.EgressCategory = {}));
51
+ })(EgressCategory || (exports.EgressCategory = EgressCategory = {}));
53
52
  const getEgressesBasedOnToggles = (input) => {
54
53
  const filteredEgresses = input.egress.filter((egress) => {
55
54
  var _a;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/egress",
3
- "version": "2.3.1-next.0",
3
+ "version": "2.3.2-experimental-04cc2b9",
4
4
  "description": "Helpers and utils for egress implementation in Forge apps",
5
5
  "main": "out/index.js",
6
6
  "author": "Atlassian",
@@ -14,9 +14,18 @@
14
14
  },
15
15
  "devDependencies": {
16
16
  "@types/jest": "^29.5.14",
17
- "@types/node": "20.19.1"
17
+ "@types/node": "20.19.1",
18
+ "typescript": "5.9.2"
18
19
  },
19
20
  "publishConfig": {
20
21
  "registry": "https://packages.atlassian.com/api/npm/npm-public/"
22
+ },
23
+ "peerDependencies": {
24
+ "typescript": ">=5.0.0"
25
+ },
26
+ "peerDependenciesMeta": {
27
+ "typescript": {
28
+ "optional": true
29
+ }
21
30
  }
22
31
  }