@forge/bridge 5.6.0-next.4-experimental-5c29c84 → 5.6.0-next.5
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,28 +1,10 @@
|
|
|
1
1
|
# @forge/bridge
|
|
2
2
|
|
|
3
|
-
## 5.6.0-next.
|
|
4
|
-
|
|
5
|
-
### Minor Changes
|
|
6
|
-
|
|
7
|
-
- 58a20e7: Added Forge Feature Flags functionality for Client side feature flags
|
|
8
|
-
- 01521ac: add usePermissions hook
|
|
3
|
+
## 5.6.0-next.5
|
|
9
4
|
|
|
10
5
|
### Patch Changes
|
|
11
6
|
|
|
12
|
-
-
|
|
13
|
-
- 75d036a: Updated Readme.md
|
|
14
|
-
- 41d8011: Fix bridge fetch request type
|
|
15
|
-
- 4c1e39d: Added Readme for Forge feature flags client SDK
|
|
16
|
-
- f67f026: Update logging level for Forge Feature flags Client SDK
|
|
17
|
-
- Updated dependencies [b1f257c]
|
|
18
|
-
- Updated dependencies [2ac3cde]
|
|
19
|
-
- Updated dependencies [96d7a67]
|
|
20
|
-
- Updated dependencies [e65918b]
|
|
21
|
-
- Updated dependencies [ec8000d]
|
|
22
|
-
- Updated dependencies [4afc4fb]
|
|
23
|
-
- Updated dependencies [873a240]
|
|
24
|
-
- Updated dependencies [f5d3945]
|
|
25
|
-
- @forge/manifest@10.7.0-next.5-experimental-5c29c84
|
|
7
|
+
- 767afce: Change to use fetch validation function for removing signal support in forge/bridge fetch
|
|
26
8
|
|
|
27
9
|
## 5.6.0-next.4
|
|
28
10
|
|
|
@@ -3,14 +3,8 @@ export interface ForgeFeatureFlagConfig {
|
|
|
3
3
|
}
|
|
4
4
|
export interface FeatureFlagUser {
|
|
5
5
|
userId?: string;
|
|
6
|
-
custom?: Record<string, string | number>;
|
|
7
|
-
attributes?:
|
|
8
|
-
installContext?: string;
|
|
9
|
-
accountId?: string;
|
|
10
|
-
appVersion?: string;
|
|
11
|
-
license?: string;
|
|
12
|
-
capabilitySet?: string;
|
|
13
|
-
};
|
|
6
|
+
custom?: Record<string, string | number | boolean>;
|
|
7
|
+
attributes?: Record<string, string | number | boolean>;
|
|
14
8
|
identifiers?: {
|
|
15
9
|
installContext?: string;
|
|
16
10
|
accountId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"featureFlags.d.ts","sourceRoot":"","sources":["../../src/featureFlags/featureFlags.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,sBAAsB;IACrC,WAAW,CAAC,EAAE,aAAa,GAAG,SAAS,GAAG,YAAY,CAAC;CACxD;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"featureFlags.d.ts","sourceRoot":"","sources":["../../src/featureFlags/featureFlags.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,sBAAsB;IACrC,WAAW,CAAC,EAAE,aAAa,GAAG,SAAS,GAAG,YAAY,CAAC;CACxD;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;IACvD,WAAW,CAAC,EAAE;QACZ,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAID,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,MAAM,CAA8B;IAC5C,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAuC;IAKrD,UAAU,CAAC,IAAI,EAAE,eAAe,EAAE,MAAM,GAAE,sBAA2B,GAAG,OAAO,CAAC,IAAI,CAAC;IAuB3F,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAW9B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAa/B,aAAa;IAIpB,OAAO,CAAC,WAAW;CAOpB"}
|
package/out/fetch/fetch.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../src/fetch/fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../src/fetch/fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAoE5C,eAAO,MAAM,eAAe,eAAgB,WAAW,oBAAoB,CAAC;kCA8B1C,MAAM,iBAAiB,gBAAgB,KAAG,QAAQ,QAAQ,CAAC;4BAGjE,MAAM,iBAAiB,gBAAgB,KAAG,QAAQ,QAAQ,CAAC;iCAGtD,MAAM,iBAAiB,gBAAgB,KAAG,QAAQ,QAAQ,CAAC;CAG3F,CAAC"}
|
package/out/fetch/fetch.js
CHANGED
|
@@ -18,6 +18,17 @@ const parseFormData = async (form) => {
|
|
|
18
18
|
}
|
|
19
19
|
return JSON.stringify(parsed);
|
|
20
20
|
};
|
|
21
|
+
const validateFetchOptions = (init) => {
|
|
22
|
+
if (!init) {
|
|
23
|
+
return init;
|
|
24
|
+
}
|
|
25
|
+
if ('signal' in init) {
|
|
26
|
+
const { signal: _signal, ...rest } = init;
|
|
27
|
+
console.error('Signal is not supported in @forge/bridge and was removed from fetch options. Please use the fetch method from @forge/api for signal support.');
|
|
28
|
+
return rest;
|
|
29
|
+
}
|
|
30
|
+
return init;
|
|
31
|
+
};
|
|
21
32
|
const parseRequest = async (init) => {
|
|
22
33
|
const isFormData = (init === null || init === void 0 ? void 0 : init.body) instanceof FormData ? true : false;
|
|
23
34
|
const requestBody = isFormData ? await parseFormData(init === null || init === void 0 ? void 0 : init.body) : init === null || init === void 0 ? void 0 : init.body;
|
|
@@ -32,16 +43,16 @@ const parseRequest = async (init) => {
|
|
|
32
43
|
};
|
|
33
44
|
const productFetchApi = (callBridge) => {
|
|
34
45
|
const fetch = async (product, restPath, init) => {
|
|
35
|
-
const
|
|
46
|
+
const validatedInit = validateFetchOptions(init);
|
|
47
|
+
const { body: requestBody, headers: requestHeaders, isMultipartFormData } = await parseRequest(validatedInit);
|
|
36
48
|
if (!requestHeaders.has('X-Atlassian-Token')) {
|
|
37
49
|
requestHeaders.set('X-Atlassian-Token', 'no-check');
|
|
38
50
|
}
|
|
39
|
-
const { signal: _signal, ...initWithoutSignal } = init || {};
|
|
40
51
|
const fetchPayload = {
|
|
41
52
|
product,
|
|
42
53
|
restPath,
|
|
43
54
|
fetchRequestInit: {
|
|
44
|
-
...
|
|
55
|
+
...validatedInit,
|
|
45
56
|
body: requestBody,
|
|
46
57
|
headers: [...requestHeaders.entries()]
|
|
47
58
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/bridge",
|
|
3
|
-
"version": "5.6.0-next.
|
|
3
|
+
"version": "5.6.0-next.5",
|
|
4
4
|
"description": "Forge bridge API for custom UI apps",
|
|
5
5
|
"author": "Atlassian",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@forge/resolver": "1.7.0",
|
|
19
19
|
"@statsig/js-client": "3.18.2",
|
|
20
20
|
"@types/history": "^4.7.11",
|
|
21
|
-
"@forge/manifest": "10.7.0-next.5
|
|
21
|
+
"@forge/manifest": "10.7.0-next.5"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"history": "5.3.0",
|