@forge/bridge 5.8.0-next.5 → 5.8.0-next.6

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,11 @@
1
1
  # @forge/bridge
2
2
 
3
+ ## 5.8.0-next.6
4
+
5
+ ### Minor Changes
6
+
7
+ - a4bccb7: Export FOS bridge methods and fixing bugs
8
+
3
9
  ## 5.8.0-next.5
4
10
 
5
11
  ### Minor Changes
package/out/index.d.ts CHANGED
@@ -10,6 +10,7 @@ export * from './events';
10
10
  export * from './realtime';
11
11
  export * from './rovo';
12
12
  export * as i18n from './i18n';
13
+ export * from './object-store';
13
14
  export { type FullContext } from './types';
14
15
  export * from './featureFlags';
15
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,cAAc,gBAAgB,CAAC"}
package/out/index.js CHANGED
@@ -15,4 +15,5 @@ tslib_1.__exportStar(require("./events"), exports);
15
15
  tslib_1.__exportStar(require("./realtime"), exports);
16
16
  tslib_1.__exportStar(require("./rovo"), exports);
17
17
  exports.i18n = tslib_1.__importStar(require("./i18n"));
18
+ tslib_1.__exportStar(require("./object-store"), exports);
18
19
  tslib_1.__exportStar(require("./featureFlags"), exports);
@@ -2,4 +2,4 @@ export declare const deleteObjects: ({ functionKey, keys }: {
2
2
  functionKey: string;
3
3
  keys: string[];
4
4
  }) => Promise<void>;
5
- //# sourceMappingURL=delete.d.ts.map
5
+ //# sourceMappingURL=deleteObjects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deleteObjects.d.ts","sourceRoot":"","sources":["../../src/object-store/deleteObjects.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,aAAa;iBAAgD,MAAM;UAAQ,MAAM,EAAE;MAAK,QAAQ,IAAI,CAchH,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './objectStore';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/object-store/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./objectStore"), exports);
@@ -0,0 +1,19 @@
1
+ export declare const objectStore: {
2
+ upload: ({ functionKey, objects }: {
3
+ functionKey: string;
4
+ objects: Blob[];
5
+ }) => Promise<import("./types").UploadResult[]>;
6
+ download: ({ functionKey, keys }: {
7
+ functionKey: string;
8
+ keys: string[];
9
+ }) => Promise<import("./types").DownloadResult[]>;
10
+ getMetadata: ({ functionKey, keys }: {
11
+ functionKey: string;
12
+ keys: string[];
13
+ }) => Promise<import("./types").GetMetadataResult[]>;
14
+ deleteObjects: ({ functionKey, keys }: {
15
+ functionKey: string;
16
+ keys: string[];
17
+ }) => Promise<void>;
18
+ };
19
+ //# sourceMappingURL=objectStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objectStore.d.ts","sourceRoot":"","sources":["../../src/object-store/objectStore.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;CAKvB,CAAC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.objectStore = void 0;
4
+ const upload_1 = require("./upload");
5
+ const deleteObjects_1 = require("./deleteObjects");
6
+ const download_1 = require("./download");
7
+ const getMetadata_1 = require("./getMetadata");
8
+ exports.objectStore = {
9
+ upload: upload_1.upload,
10
+ download: download_1.download,
11
+ getMetadata: getMetadata_1.getMetadata,
12
+ deleteObjects: deleteObjects_1.deleteObjects
13
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../src/object-store/upload.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAuC,YAAY,EAAE,MAAM,SAAS,CAAC;AA8BjF,eAAO,MAAM,MAAM;iBAIJ,MAAM;aACV,IAAI,EAAE;MACb,QAAQ,YAAY,EAAE,CAkEzB,CAAC"}
1
+ {"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../src/object-store/upload.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAuC,YAAY,EAAE,MAAM,SAAS,CAAC;AA+BjF,eAAO,MAAM,MAAM;iBAIJ,MAAM;aACV,IAAI,EAAE;MACb,QAAQ,YAAY,EAAE,CAkEzB,CAAC"}
@@ -7,9 +7,9 @@ const getObjectMetadata = async (blob) => {
7
7
  const length = blob.size;
8
8
  const arrayBuffer = await blob.arrayBuffer();
9
9
  const hashBuffer = await crypto.subtle.digest('SHA-256', arrayBuffer);
10
- const hashArray = Array.from(new Uint8Array(hashBuffer));
11
- const checksum = hashArray.map((b) => b.toString(16).padStart(2, '0')).join('');
12
- const checksumType = 'SHA-256';
10
+ const hashArray = new Uint8Array(hashBuffer);
11
+ const checksum = btoa(String.fromCharCode(...hashArray));
12
+ const checksumType = 'SHA256';
13
13
  return {
14
14
  length,
15
15
  checksum,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/bridge",
3
- "version": "5.8.0-next.5",
3
+ "version": "5.8.0-next.6",
4
4
  "description": "Forge bridge API for custom UI apps",
5
5
  "author": "Atlassian",
6
6
  "license": "SEE LICENSE IN LICENSE.txt",
@@ -1 +0,0 @@
1
- {"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../src/object-store/delete.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,aAAa;iBAAgD,MAAM;UAAQ,MAAM,EAAE;MAAK,QAAQ,IAAI,CAchH,CAAC"}