Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@forge/bridge

Package Overview
Dependencies
Maintainers
2
Versions
139
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@forge/bridge - npm Package Compare versions

Comparing version 0.0.0-experimental-416047f to 0.0.0-experimental-4515339

out/view/refresh.d.ts

39

CHANGELOG.md
# @forge/bridge
## 0.0.0-experimental-416047f
## 0.0.0-experimental-4515339
### Patch Changes
- 6c53377: Add main field to package.json
## 2.5.1-next.0
### Patch Changes
- 6c533774: Add main field to package.json
## 2.5.0
### Minor Changes
- 4eef67b: Fix return type for getContext method
- 6269d73: Fix return type for getContext method
## 2.5.0-next.0
### Minor Changes
- 6269d73d: Fix return type for getContext method
## 2.4.0
### Minor Changes
- 14cd9b0: Add a new view.refresh() method
## 2.4.0-next.0
### Minor Changes
- 14cd9b02: Add a new view.refresh() method
## 2.3.0
### Minor Changes
- ae90999: Add router.reload()

@@ -8,0 +45,0 @@ - 27af6ce: Add showFlag API to open flags in products

3

out/bridge.js

@@ -8,3 +8,3 @@ "use strict";

}
exports.getCallBridge = () => {
const getCallBridge = () => {
if (!isBridgeAvailable(window.__bridge)) {

@@ -18,1 +18,2 @@ throw new errors_1.BridgeAPIError(`

};
exports.getCallBridge = getCallBridge;

@@ -5,3 +5,3 @@ "use strict";

const bridge_1 = require("../bridge");
const callBridge = bridge_1.getCallBridge();
const callBridge = (0, bridge_1.getCallBridge)();
const emit = (event, payload) => {

@@ -8,0 +8,0 @@ return callBridge('emit', { event, payload });

import { getCallBridge } from '../bridge';
export declare const productFetchApi: (callBridge: ReturnType<typeof getCallBridge>) => {
requestConfluence: (restPath: string, fetchOptions?: RequestInit | undefined) => Promise<Response>;
requestJira: (restPath: string, fetchOptions?: RequestInit | undefined) => Promise<Response>;
requestConfluence: (restPath: string, fetchOptions?: RequestInit) => Promise<Response>;
requestJira: (restPath: string, fetchOptions?: RequestInit) => Promise<Response>;
};
//# sourceMappingURL=fetch.d.ts.map

@@ -14,3 +14,3 @@ "use strict";

});
exports.productFetchApi = (callBridge) => {
const productFetchApi = (callBridge) => {
const fetch = (product, restPath, init) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {

@@ -34,1 +34,2 @@ const { body: requestBody, headers: requestHeaders } = yield parseBodyAndHeaders(init);

};
exports.productFetchApi = productFetchApi;

@@ -1,2 +0,2 @@

export declare const requestConfluence: (restPath: string, fetchOptions?: RequestInit | undefined) => Promise<Response>, requestJira: (restPath: string, fetchOptions?: RequestInit | undefined) => Promise<Response>;
export declare const requestConfluence: (restPath: string, fetchOptions?: RequestInit) => Promise<Response>, requestJira: (restPath: string, fetchOptions?: RequestInit) => Promise<Response>;
//# sourceMappingURL=index.d.ts.map

@@ -7,2 +7,2 @@ "use strict";

const fetch_1 = require("./fetch");
_a = fetch_1.productFetchApi(bridge_1.getCallBridge()), exports.requestConfluence = _a.requestConfluence, exports.requestJira = _a.requestJira;
_a = (0, fetch_1.productFetchApi)((0, bridge_1.getCallBridge)()), exports.requestConfluence = _a.requestConfluence, exports.requestJira = _a.requestJira;

@@ -7,4 +7,4 @@ "use strict";

const errors_1 = require("../errors");
const callBridge = bridge_1.getCallBridge();
exports.showFlag = (options) => {
const callBridge = (0, bridge_1.getCallBridge)();
const showFlag = (options) => {
var _a;

@@ -22,1 +22,2 @@ if (!options.id) {

};
exports.showFlag = showFlag;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.showFlag = void 0;
var flag_1 = require("./flag");
Object.defineProperty(exports, "showFlag", { enumerable: true, get: function () { return flag_1.showFlag; } });

@@ -7,3 +7,3 @@ "use strict";

const utils_1 = require("../utils");
const callBridge = bridge_1.getCallBridge();
const callBridge = (0, bridge_1.getCallBridge)();
const validatePayload = (payload) => {

@@ -23,2 +23,2 @@ if (!payload)

};
exports.invoke = utils_1.withRateLimiter(_invoke, 20, 2000, 'Resolver calls are rate limited at 20req/2s');
exports.invoke = (0, utils_1.withRateLimiter)(_invoke, 20, 2000, 'Resolver calls are rate limited at 20req/2s');

@@ -7,3 +7,3 @@ "use strict";

const errors_1 = require("../errors");
const callBridge = bridge_1.getCallBridge();
const callBridge = (0, bridge_1.getCallBridge)();
const noop = () => { };

@@ -10,0 +10,0 @@ class Modal {

@@ -6,3 +6,3 @@ "use strict";

const bridge_1 = require("../bridge");
const callBridge = bridge_1.getCallBridge();
const callBridge = (0, bridge_1.getCallBridge)();
const navigate = (url) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return callBridge('navigate', { url, type: 'same-tab' }); });

@@ -9,0 +9,0 @@ const open = (url) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return callBridge('navigate', { url, type: 'new-tab' }); });

@@ -8,6 +8,23 @@ export declare type InvokePayload = {

} & Pick<ResponseInit, 'headers' | 'status' | 'statusText'>;
export declare type FullContext = {};
export interface FullContext {
accountId?: string;
cloudId?: string;
extension: ExtensionData;
license?: LicenseState;
localId: string;
locale: string;
moduleKey: string;
siteUrl: string;
timezone: string;
}
interface ExtensionData {
[k: string]: any;
}
interface LicenseState {
isActive?: boolean;
}
export declare type Subscription = {
unsubscribe: () => void;
};
export {};
//# sourceMappingURL=types.d.ts.map

@@ -1,2 +0,2 @@

export declare const withRateLimiter: <Fn extends (...args: any[]) => any>(wrappedFn: Fn, maxOps: number, intervalInMs: number, exceededErrorMessage?: string | undefined) => <T>(...args: Parameters<Fn>) => Promise<T>;
export declare const withRateLimiter: <Fn extends (...args: any[]) => any>(wrappedFn: Fn, maxOps: number, intervalInMs: number, exceededErrorMessage?: string) => <T>(...args: Parameters<Fn>) => Promise<T>;
//# sourceMappingURL=index.d.ts.map

@@ -6,3 +6,3 @@ "use strict";

const errors_1 = require("../errors");
exports.withRateLimiter = (wrappedFn, maxOps, intervalInMs, exceededErrorMessage) => {
const withRateLimiter = (wrappedFn, maxOps, intervalInMs, exceededErrorMessage) => {
let start = Date.now();

@@ -24,1 +24,2 @@ let numOps = 0;

};
exports.withRateLimiter = withRateLimiter;

@@ -7,4 +7,4 @@ "use strict";

const errors_1 = require("../errors");
const callBridge = bridge_1.getCallBridge();
exports.close = (payload) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
const callBridge = (0, bridge_1.getCallBridge)();
const close = (payload) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
try {

@@ -20,1 +20,2 @@ const success = yield callBridge('close', payload);

});
exports.close = close;

@@ -6,4 +6,4 @@ "use strict";

const bridge_1 = require("../bridge");
const callBridge = bridge_1.getCallBridge();
exports.createHistory = () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
const callBridge = (0, bridge_1.getCallBridge)();
const createHistory = () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
const history = yield callBridge('createHistory');

@@ -15,1 +15,2 @@ history.listen((location) => {

});
exports.createHistory = createHistory;

@@ -5,5 +5,6 @@ "use strict";

const bridge_1 = require("../bridge");
const callBridge = bridge_1.getCallBridge();
exports.getContext = () => {
const callBridge = (0, bridge_1.getCallBridge)();
const getContext = () => {
return callBridge('getContext');
};
exports.getContext = getContext;

@@ -7,4 +7,4 @@ "use strict";

const errors_1 = require("../errors");
const callBridge = bridge_1.getCallBridge();
exports.submit = (payload) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
const callBridge = (0, bridge_1.getCallBridge)();
const submit = (payload) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
const success = yield callBridge('submit', payload);

@@ -15,1 +15,2 @@ if (success === false) {

});
exports.submit = submit;
export declare const view: {
submit: (payload?: any) => Promise<void>;
close: (payload?: any) => Promise<void>;
refresh: (payload?: any) => Promise<void>;
createHistory: () => Promise<import("history").History<unknown>>;

@@ -5,0 +6,0 @@ getContext: () => Promise<import("../types").FullContext>;

@@ -6,2 +6,3 @@ "use strict";

const close_1 = require("./close");
const refresh_1 = require("./refresh");
const createHistory_1 = require("./createHistory");

@@ -12,4 +13,5 @@ const getContext_1 = require("./getContext");

close: close_1.close,
refresh: refresh_1.refresh,
createHistory: createHistory_1.createHistory,
getContext: getContext_1.getContext
};
{
"name": "@forge/bridge",
"version": "0.0.0-experimental-416047f",
"version": "0.0.0-experimental-4515339",
"description": "Forge bridge API for custom UI apps",
"author": "Atlassian",
"license": "UNLICENSED",
"main": "out/index.js",
"browser": "out/index.js",

@@ -8,0 +9,0 @@ "types": "out/index.d.ts",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc