@forge/bridge 6.0.1-next.6 → 6.1.0-next.8
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 +13 -0
- package/out/object-store/deleteObjects.d.ts.map +1 -1
- package/out/object-store/deleteObjects.js +0 -2
- package/out/object-store/download.d.ts.map +1 -1
- package/out/object-store/download.js +0 -2
- package/out/object-store/getMetadata.d.ts.map +1 -1
- package/out/object-store/getMetadata.js +0 -2
- package/out/object-store/types.d.ts +0 -1
- package/out/object-store/types.d.ts.map +1 -1
- package/out/object-store/types.js +0 -2
- package/out/object-store/upload.d.ts.map +1 -1
- package/out/object-store/upload.js +0 -2
- package/package.json +2 -2
- package/out/object-store/utils.d.ts +0 -2
- package/out/object-store/utils.d.ts.map +0 -1
- package/out/object-store/utils.js +0 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @forge/bridge
|
|
2
2
|
|
|
3
|
+
## 6.1.0-next.8
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 8eaf3c7: Remove production restriction on objectStore bridge methods
|
|
8
|
+
|
|
9
|
+
## 6.0.1-next.7
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [a60362e]
|
|
14
|
+
- @forge/manifest@13.1.0-next.6
|
|
15
|
+
|
|
3
16
|
## 6.0.1-next.6
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deleteObjects.d.ts","sourceRoot":"","sources":["../../src/object-store/deleteObjects.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deleteObjects.d.ts","sourceRoot":"","sources":["../../src/object-store/deleteObjects.ts"],"names":[],"mappings":"AAMA;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,GAAU,uBAAuB;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,KAAG,OAAO,CAAC,IAAI,CAgBhH,CAAC"}
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.deleteObjects = void 0;
|
|
4
4
|
const invoke_1 = require("../invoke");
|
|
5
5
|
const errors_1 = require("../errors");
|
|
6
|
-
const utils_1 = require("./utils");
|
|
7
6
|
const bridge_1 = require("../bridge");
|
|
8
7
|
const callBridge = (0, bridge_1.getCallBridge)();
|
|
9
8
|
/**
|
|
@@ -15,7 +14,6 @@ const callBridge = (0, bridge_1.getCallBridge)();
|
|
|
15
14
|
* @throws {BridgeAPIError} When deleting fails
|
|
16
15
|
*/
|
|
17
16
|
const deleteObjects = async ({ functionKey, keys }) => {
|
|
18
|
-
await (0, utils_1.checkRestrictedEnvironment)();
|
|
19
17
|
void callBridge('trackObjectStoreAction', { action: 'delete' });
|
|
20
18
|
if (!functionKey || functionKey.length === 0) {
|
|
21
19
|
throw new errors_1.BridgeAPIError('functionKey is required to delete objects');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../src/object-store/download.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../src/object-store/download.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAsB,MAAM,SAAS,CAAC;AAIlE;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,GAAU,uBAG5B;IACD,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,KAAG,OAAO,CAAC,cAAc,EAAE,CAuD3B,CAAC"}
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.download = void 0;
|
|
4
4
|
const invoke_1 = require("../invoke");
|
|
5
5
|
const errors_1 = require("../errors");
|
|
6
|
-
const utils_1 = require("./utils");
|
|
7
6
|
const bridge_1 = require("../bridge");
|
|
8
7
|
const callBridge = (0, bridge_1.getCallBridge)();
|
|
9
8
|
/**
|
|
@@ -15,7 +14,6 @@ const callBridge = (0, bridge_1.getCallBridge)();
|
|
|
15
14
|
* @throws {BridgeAPIError} When filtering fails or download encounters an error
|
|
16
15
|
*/
|
|
17
16
|
const download = async ({ functionKey, keys }) => {
|
|
18
|
-
await (0, utils_1.checkRestrictedEnvironment)();
|
|
19
17
|
void callBridge('trackObjectStoreAction', { action: 'download' });
|
|
20
18
|
if (!functionKey || functionKey.length === 0) {
|
|
21
19
|
throw new errors_1.BridgeAPIError('functionKey is required to filter and generate download URLs');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getMetadata.d.ts","sourceRoot":"","sources":["../../src/object-store/getMetadata.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getMetadata.d.ts","sourceRoot":"","sources":["../../src/object-store/getMetadata.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAIjD;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,GAAU,uBAG/B;IACD,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,KAAG,OAAO,CAAC,iBAAiB,EAAE,CA2B9B,CAAC"}
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getMetadata = void 0;
|
|
4
4
|
const index_1 = require("../invoke/index");
|
|
5
5
|
const errors_1 = require("../errors");
|
|
6
|
-
const utils_1 = require("./utils");
|
|
7
6
|
const bridge_1 = require("../bridge");
|
|
8
7
|
const callBridge = (0, bridge_1.getCallBridge)();
|
|
9
8
|
/**
|
|
@@ -15,7 +14,6 @@ const callBridge = (0, bridge_1.getCallBridge)();
|
|
|
15
14
|
* @throws {BridgeAPIError} When filtering fails or download encounters an error
|
|
16
15
|
*/
|
|
17
16
|
const getMetadata = async ({ functionKey, keys }) => {
|
|
18
|
-
await (0, utils_1.checkRestrictedEnvironment)();
|
|
19
17
|
void callBridge('trackObjectStoreAction', { action: 'getMetadata' });
|
|
20
18
|
if (!functionKey || functionKey.length === 0) {
|
|
21
19
|
throw new errors_1.BridgeAPIError('functionKey is required to filter and generate object metadata');
|
|
@@ -47,5 +47,4 @@ export type GetMetadataResult = {
|
|
|
47
47
|
currentVersion?: string;
|
|
48
48
|
error?: string;
|
|
49
49
|
};
|
|
50
|
-
export declare const BRIDGE_OBJECT_STORE_RESTRICTED_ENVIRONMENT_ERROR = "Object Store bridge methods are restricted to Forge apps in a non-production environment. For more information please see https://developer.atlassian.com/platform/forge/cli-reference/environments/ for reference on Forge app environments.";
|
|
51
50
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/object-store/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,YAAY,CAAC;AAE/C,MAAM,MAAM,YAAY,GAAG,cAAc,GAAG;IAC1C,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM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AK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BRIDGE_OBJECT_STORE_RESTRICTED_ENVIRONMENT_ERROR = void 0;
|
|
4
|
-
exports.BRIDGE_OBJECT_STORE_RESTRICTED_ENVIRONMENT_ERROR = 'Object Store bridge methods are restricted to Forge apps in a non-production environment. For more information please see https://developer.atlassian.com/platform/forge/cli-reference/environments/ for reference on Forge app environments.';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../src/object-store/upload.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../src/object-store/upload.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAuC,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAsClH;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,GAAU,0BAGxC;IACD,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,YAAY,EAAE,CAAC;CACzB,KAAG,OAAO,CAAC,iBAAiB,EAAE,CA0G9B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,GAAU,0BAG1B;IACD,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,YAAY,EAAE,CAAC;CACzB,KAAG,OAAO,CAAC,YAAY,EAAE,CAMzB,CAAC"}
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.upload = exports.createUploadPromises = void 0;
|
|
4
4
|
const invoke_1 = require("../invoke");
|
|
5
5
|
const errors_1 = require("../errors");
|
|
6
|
-
const utils_1 = require("./utils");
|
|
7
6
|
const bridge_1 = require("../bridge");
|
|
8
7
|
const callBridge = (0, bridge_1.getCallBridge)();
|
|
9
8
|
/**
|
|
@@ -146,7 +145,6 @@ exports.createUploadPromises = createUploadPromises;
|
|
|
146
145
|
* @throws {BridgeAPIError} When filtering fails or upload encounters an error
|
|
147
146
|
*/
|
|
148
147
|
const upload = async ({ functionKey, objects }) => {
|
|
149
|
-
await (0, utils_1.checkRestrictedEnvironment)();
|
|
150
148
|
void callBridge('trackObjectStoreAction', { action: 'upload' });
|
|
151
149
|
const uploadPromises = await (0, exports.createUploadPromises)({ functionKey, objects });
|
|
152
150
|
const results = await Promise.all(uploadPromises.map((item) => item.promise));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/bridge",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.0-next.8",
|
|
4
4
|
"description": "Forge bridge API for custom UI apps",
|
|
5
5
|
"author": "Atlassian",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@forge/i18n": "1.0.0",
|
|
20
20
|
"@forge/resolver": "2.0.0",
|
|
21
21
|
"@types/history": "^4.7.11",
|
|
22
|
-
"@forge/manifest": "13.1.0-next.
|
|
22
|
+
"@forge/manifest": "13.1.0-next.6",
|
|
23
23
|
"@types/iframe-resizer": "^3.5.8",
|
|
24
24
|
"iframe-resizer": "^4.4.5"
|
|
25
25
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/object-store/utils.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,0BAA0B,QAAa,OAAO,CAAC,IAAI,CAK/D,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.checkRestrictedEnvironment = void 0;
|
|
4
|
-
const errors_1 = require("../errors");
|
|
5
|
-
const view_1 = require("../view");
|
|
6
|
-
const types_1 = require("./types");
|
|
7
|
-
const checkRestrictedEnvironment = async () => {
|
|
8
|
-
const { environmentType } = await view_1.view.getContext();
|
|
9
|
-
if (environmentType === 'PRODUCTION') {
|
|
10
|
-
throw new errors_1.BridgeAPIError(types_1.BRIDGE_OBJECT_STORE_RESTRICTED_ENVIRONMENT_ERROR);
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
exports.checkRestrictedEnvironment = checkRestrictedEnvironment;
|