@forge/bridge
Advanced tools
Comparing version 0.0.2-next.0 to 0.1.0-next.1
# @forge/bridge | ||
## 0.1.0-next.1 | ||
### Minor Changes | ||
- 05d76b5: Update resolver and invoker API | ||
## 0.0.2-next.0 | ||
@@ -4,0 +10,0 @@ |
@@ -13,5 +13,9 @@ "use strict"; | ||
it('calls the global bridge with the correct arguments', function () { | ||
__1.invoke('key', ['arg1', 'arg2']); | ||
expect(callBridgeMock).toHaveBeenCalledWith('invoke', { functionKey: 'key', args: ['arg1', 'arg2'] }); | ||
__1.invoke('key', { value: 'value' }); | ||
expect(callBridgeMock).toHaveBeenCalledWith('invoke', { functionKey: 'key', payload: { value: 'value' } }); | ||
}); | ||
it('calls the global bridge with the correct arguments when no payload is supplied', function () { | ||
__1.invoke('key'); | ||
expect(callBridgeMock).toHaveBeenCalledWith('invoke', { functionKey: 'key' }); | ||
}); | ||
}); |
@@ -1,6 +0,12 @@ | ||
export declare const invoke: (functionKey: string, args: any[]) => any; | ||
export declare const invoke: (functionKey: string, payload?: { | ||
[x: string]: any; | ||
[x: number]: any; | ||
} | undefined) => any; | ||
declare const _default: { | ||
invoke: (functionKey: string, args: any[]) => any; | ||
invoke: (functionKey: string, payload?: { | ||
[x: string]: any; | ||
[x: number]: any; | ||
} | undefined) => any; | ||
}; | ||
export default _default; | ||
//# sourceMappingURL=index.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.invoke = void 0; | ||
exports.invoke = function (functionKey, args) { | ||
return window.__bridge.callBridge('invoke', { functionKey: functionKey, args: args }); | ||
exports.invoke = function (functionKey, payload) { | ||
return window.__bridge.callBridge('invoke', { functionKey: functionKey, payload: payload }); | ||
}; | ||
@@ -7,0 +7,0 @@ exports.default = { |
{ | ||
"name": "@forge/bridge", | ||
"version": "0.0.2-next.0", | ||
"version": "0.1.0-next.1", | ||
"description": "Forge bridge API for custom UI apps", | ||
@@ -5,0 +5,0 @@ "author": "Atlassian", |
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
2535
41