
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fixโa new CLI tool that turns CVE alerts into safe, automated upgrades.
@forge/ui-confluence
Advanced tools
A package of helpers for interacting with Confluence
Allows interacting with Confluence content properties.
Note permissions apply to interacting with content properties, for the page being accessed. So it is impacted by the user being used to interact with Confluence (is app or request user).
Example usage:
import Forge, { render, Fragment, Text, Button, useAction, useProductContext } from "@forge/ui";
import { contentProperties } from '@atlasian/forge-ui-confluence';
export type AppState = {
count: number;
}
const KEY_PREFIX = 'counter';
const App = () => {
const { contentId, localId } = useProductContext();
const contentProps = contentProperties(contentId, api.asApp().requestConfluence);
const key = `${KEY_PREFIX}-${localId}`;
const initialAppState = async (): Promise<AppState> => {
const countProp = await contentProps.read(key);
const count: number = countProp && (countProp.value as number) || 0;
return {
count,
};
}
const updateCount = async (oldState: AppState, action: string): Promise<AppState> => {
switch (action) {
case 'modify':
await contentProps.modify(key, (prev) => ((prev as number || 0) + 1));
return initialAppState();
case 'replace':
await contentProps.replace(key, oldState.count + 1);
return initialAppState();
case 'delete':
await contentProps.delete(key);
return initialAppState();
case 'refresh':
return initialAppState();
}
return oldState;
}
const [appState, doAction] = useAction<AppState, string>(updateCount, initialAppState);
return (
<Fragment>
<Text>Current value {appState.count}</Text>
<Button text="Add one (modify)" onClick={() => { doAction('modify'); }} />
<Button text="Add one (replace)" onClick={() => { doAction('replace'); }} />
<Button text="Reset data (delete)" onClick={() => { doAction('delete'); }} />
<Button text="Refresh (read)" onClick={() => { doAction('refresh'); }} />
</Fragment>
);
};
export const run = render(<App />);
FAQs
Helpers for interacting with Confluence
The npm package @forge/ui-confluence receives a total of 48 weekly downloads. As such, @forge/ui-confluence popularity was classified as not popular.
We found that @forge/ui-confluence demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.ย It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Automatically fix and test dependency updates with socket fixโa new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
Weโre excited to announce a powerful new capability in Socket: historical data and enhanced analytics.