@forge/bridge
Advanced tools
Comparing version 1.2.0-next.0 to 1.2.0-next.1
# @forge/bridge | ||
## 1.2.0-next.1 | ||
### Patch Changes | ||
- 001a027: Rate limit invoke calls | ||
## 1.2.0-next.0 | ||
@@ -4,0 +10,0 @@ |
@@ -1,3 +0,3 @@ | ||
import { InvokePayload, InvokeResponse } from '../types'; | ||
export declare const invoke: <T = InvokeResponse>(functionKey: string, payload?: InvokePayload | undefined) => Promise<T>; | ||
import { InvokePayload } from '../types'; | ||
export declare const invoke: <T>(functionKey: string, payload?: InvokePayload | undefined) => Promise<T>; | ||
//# sourceMappingURL=invoke.d.ts.map |
@@ -6,2 +6,3 @@ "use strict"; | ||
var errors_1 = require("../errors"); | ||
var utils_1 = require("../utils"); | ||
var callBridge = bridge_1.getCallBridge(); | ||
@@ -15,3 +16,3 @@ var validatePayload = function (payload) { | ||
}; | ||
exports.invoke = function (functionKey, payload) { | ||
var _invoke = function (functionKey, payload) { | ||
if (typeof functionKey !== 'string') { | ||
@@ -23,1 +24,2 @@ throw new errors_1.BridgeAPIError('functionKey must be a string!'); | ||
}; | ||
exports.invoke = utils_1.withRateLimiter(_invoke, 20, 2000, 'Resolver calls are rate limited at 20req/2s'); |
{ | ||
"name": "@forge/bridge", | ||
"version": "1.2.0-next.0", | ||
"version": "1.2.0-next.1", | ||
"description": "Forge bridge API for custom UI apps", | ||
@@ -13,3 +13,6 @@ "author": "Atlassian", | ||
"compile": "tsc -b -v" | ||
}, | ||
"devDependencies": { | ||
"jest-date-mock": "^1.0.8" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
12624
42
177
0
1