@forge/bridge 5.3.0-next.1 → 5.3.0-next.2
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 +11 -0
- package/out/invoke/invoke.d.ts +4 -0
- package/out/invoke/invoke.d.ts.map +1 -1
- package/out/invoke/invoke.js +5 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @forge/bridge
|
|
2
2
|
|
|
3
|
+
## 5.3.0-next.2
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 1a5bad3: Typed interface for invoking resolvers
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [1a5bad3]
|
|
12
|
+
- @forge/resolver@1.7.0-next.1
|
|
13
|
+
|
|
3
14
|
## 5.3.0-next.1
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/out/invoke/invoke.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import type { Definitions, DefArguments, DefResult } from '@forge/resolver/shared';
|
|
1
2
|
import { InvokePayload } from '../types';
|
|
2
3
|
export declare const invoke: <T>(functionKey: string, payload?: InvokePayload | undefined) => Promise<T>;
|
|
4
|
+
declare type Invoke<Defs extends Definitions> = <Def extends keyof Defs & string>(call: Def, ...arg: DefArguments<Defs, Def>) => Promise<DefResult<Defs, Def>>;
|
|
5
|
+
export declare function makeInvoke<Defs extends Definitions>(): Invoke<Defs>;
|
|
6
|
+
export {};
|
|
3
7
|
//# sourceMappingURL=invoke.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoke.d.ts","sourceRoot":"","sources":["../../src/invoke/invoke.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"invoke.d.ts","sourceRoot":"","sources":["../../src/invoke/invoke.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAInF,OAAO,EAAE,aAAa,EAAkB,MAAM,UAAU,CAAC;AAuBzD,eAAO,MAAM,MAAM,6EAA4F,CAAC;AAEhH,aAAK,MAAM,CAAC,IAAI,SAAS,WAAW,IAAI,CAAC,GAAG,SAAS,MAAM,IAAI,GAAG,MAAM,EACtE,IAAI,EAAE,GAAG,EACT,GAAG,GAAG,EAAE,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC,KAC5B,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;AAOnC,wBAAgB,UAAU,CAAC,IAAI,SAAS,WAAW,KAAK,MAAM,CAAC,IAAI,CAAC,CAEnE"}
|
package/out/invoke/invoke.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.invoke = void 0;
|
|
3
|
+
exports.makeInvoke = exports.invoke = void 0;
|
|
4
4
|
const bridge_1 = require("../bridge");
|
|
5
5
|
const errors_1 = require("../errors");
|
|
6
6
|
const utils_1 = require("../utils");
|
|
@@ -20,3 +20,7 @@ const _invoke = (functionKey, payload) => {
|
|
|
20
20
|
return callBridge('invoke', { functionKey, payload });
|
|
21
21
|
};
|
|
22
22
|
exports.invoke = (0, utils_1.withRateLimiter)(_invoke, 500, 1000 * 25, 'Resolver calls are rate limited at 500req/25s');
|
|
23
|
+
function makeInvoke() {
|
|
24
|
+
return exports.invoke;
|
|
25
|
+
}
|
|
26
|
+
exports.makeInvoke = makeInvoke;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/bridge",
|
|
3
|
-
"version": "5.3.0-next.
|
|
3
|
+
"version": "5.3.0-next.2",
|
|
4
4
|
"description": "Forge bridge API for custom UI apps",
|
|
5
5
|
"author": "Atlassian",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@atlaskit/tokens": "^1.58.0",
|
|
17
17
|
"@types/history": "^4.7.11",
|
|
18
|
-
"@forge/i18n": "0.0.7"
|
|
18
|
+
"@forge/i18n": "0.0.7",
|
|
19
|
+
"@forge/resolver": "1.7.0-next.1"
|
|
19
20
|
},
|
|
20
21
|
"devDependencies": {
|
|
21
22
|
"history": "5.3.0",
|