@forge/egress
2.3.22.3.2-experimental-04cc2b9
~
Modified (8 files)
Index: package/out/egress/url-parser.js
===================================================================
--- package/out/egress/url-parser.js
+++ package/out/egress/url-parser.js
@@ -1,12 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.parseUrl = void 0;
+exports.parseUrl = parseUrl;
function parseUrl(url) {
var _a, _b;
const protocol = (_b = (_a = url.match(/^(.*?:)/)) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : 'https:';
const hostAndPath = url.replace(protocol, '').replace(/^\/*/, '').replace(/^\\*/, '').split('?')[0].split('#')[0];
const hostname = hostAndPath.split('/')[0];
const pathname = hostAndPath.slice(hostname.length) || '/';
return { protocol, hostname, pathname };
}
-exports.parseUrl = parseUrl; Index: package/out/egress/utils.js
===================================================================
--- package/out/egress/utils.js
+++ package/out/egress/utils.js
@@ -1,14 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.getEgressesBasedOnToggles = exports.sortAndGroupEgressPermissionsByDomain = exports.EgressCategory = exports.EgressType = exports.globToRegex = void 0;
+exports.getEgressesBasedOnToggles = exports.sortAndGroupEgressPermissionsByDomain = exports.EgressCategory = exports.EgressType = void 0;
+exports.globToRegex = globToRegex;
const url_parser_1 = require("./url-parser");
function globToRegex(pattern) {
const escaped = pattern.replace(/[.+?^${}()|[\]\\]/g, '\\$&');
const regexPattern = escaped.replace(/\*/g, '.*');
return new RegExp(`^${regexPattern}$`);
}
-exports.globToRegex = globToRegex;
const sortAndGroupEgressPermissionsByDomain = (egressAddresses) => {
if ((egressAddresses === null || egressAddresses === void 0 ? void 0 : egressAddresses.length) === 0) {
return [];
}
@@ -43,13 +43,13 @@
EgressType["Images"] = "IMAGES";
EgressType["Media"] = "MEDIA";
EgressType["Scripts"] = "SCRIPTS";
EgressType["Styles"] = "STYLES";
-})(EgressType = exports.EgressType || (exports.EgressType = {}));
+})(EgressType || (exports.EgressType = EgressType = {}));
var EgressCategory;
(function (EgressCategory) {
EgressCategory["ANALYTICS"] = "ANALYTICS";
-})(EgressCategory = exports.EgressCategory || (exports.EgressCategory = {}));
+})(EgressCategory || (exports.EgressCategory = EgressCategory = {}));
const getEgressesBasedOnToggles = (input) => {
const filteredEgresses = input.egress.filter((egress) => {
var _a;
if (((_a = egress.category) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === EgressCategory.ANALYTICS) { Index: package/package.json
===================================================================
--- package/package.json
+++ package/package.json
@@ -1,7 +1,7 @@
{
"name": "@forge/egress",
- "version": "2.3.2",
+ "version": "2.3.2-experimental-04cc2b9",
"description": "Helpers and utils for egress implementation in Forge apps",
"main": "out/index.js",
"author": "Atlassian",
"license": "SEE LICENSE IN LICENSE.txt",
@@ -13,10 +13,19 @@
"clean": "rm -rf ./out && rm -f tsconfig.tsbuildinfo"
},
"devDependencies": {
"@types/jest": "^29.5.14",
- "@types/node": "20.19.1"
+ "@types/node": "20.19.1",
+ "typescript": "5.9.2"
},
"publishConfig": {
"registry": "https://packages.atlassian.com/api/npm/npm-public/"
+ },
+ "peerDependencies": {
+ "typescript": ">=5.0.0"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
}
} Index: package/out/egress/url-parser.d.ts.map
===================================================================
--- package/out/egress/url-parser.d.ts.map
+++ package/out/egress/url-parser.d.ts.map
@@ -1,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"}
\ No newline at end of file
+{"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"}
\ No newline at end of file Index: package/out/egress/utils.d.ts.map
===================================================================
--- package/out/egress/utils.d.ts.map
+++ package/out/egress/utils.d.ts.map
@@ -1,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,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,EA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B,CAAC;AAEF,OAAO,EAAE,qCAAqC,EAAE,yBAAyB,EAAE,CAAC"}
\ No newline at end of file Index: package/CHANGELOG.md
===================================================================
--- package/CHANGELOG.md
+++ package/CHANGELOG.md
@@ -1,6 +1,12 @@
# @forge/egress
+## 2.3.2-experimental-04cc2b9
+
+### Major Changes
+
+- d9ef926: Adds support for TypeScript 5
+
## 2.3.2
### Patch Changes Index: package/out/egress/url-parser.d.ts
===================================================================
--- package/out/egress/url-parser.d.ts
+++ package/out/egress/url-parser.d.ts
@@ -1,5 +1,5 @@
-export declare type URLLike = Pick<URL, 'hostname' | 'protocol'> & {
+export type URLLike = Pick<URL, 'hostname' | 'protocol'> & {
pathname: string;
};
export declare function parseUrl(url: string): URLLike;
//# sourceMappingURL=url-parser.d.ts.map
\ No newline at end of file Index: package/out/egress/utils.d.ts
===================================================================
--- package/out/egress/utils.d.ts
+++ package/out/egress/utils.d.ts
@@ -12,15 +12,15 @@
}
export declare enum EgressCategory {
ANALYTICS = "ANALYTICS"
}
-export declare type EgressPermissions = {
+export type EgressPermissions = {
type: EgressType;
addresses: string[];
category?: EgressCategory;
inScopeEUD?: boolean;
};
-export declare type EgressPermissionsSimplified = Omit<EgressPermissions, 'inScopeEUD' | 'enabled' | 'category'>;
+export type EgressPermissionsSimplified = Omit<EgressPermissions, 'inScopeEUD' | 'enabled' | 'category'>;
interface ConfigOverrides {
ALLOW_EGRESS_ANALYTICS?: boolean;
}
export interface AppInstallationConfig {