
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@goofmint/growi-js
Advanced tools
This is a SDK for GROWI written in node.js.
$ npm install @goofmint/growi-js
import { GROWI } from '@goofmint/growi-js';
const growi = new GROWI({apiToken: 'YOUR_API_TOKEN'});
Initialize parameters are as follows:
| Parameter | Description |
|---|---|
apiToken | API token for GROWI. You can get it from the setting page of GROWI. |
url | URL of GROWI. Default is http://localhost:3000. |
path | Endpoint path of Growi API. Default is /. |
const page = await growi.root();
page instanceof growi.Page; // true
const pages = await page.children();
pages[0] instanceof growi.Page; // true
page.contents('New contents');
await page.save();
const contents = await page.contents();
const newPage = await page.create({name: 'New page'});
await page.remove();
const tags = await page.tags();
await page.addTag('tag');
await page.removeTag('tag');
const comments = await page.comments();
const comment = page.comment();
comment.set('comment', 'New comment');
await comment.save();
comment.set('comment', 'Updated comment');
await comment.save();
await comment.remove();
const result = await growi.search({q: 'keyword'});
result.pages[0] instanceof growi.Page; // true
result.total // total number of pages
result.took // time taken for search
result.hitsCount // number of hits
const result = await growi.searchByTag('tag');
result.pages[0] instanceof growi.Page; // true
result.total // total number of pages
result.took // time taken for search
result.hitsCount // number of hits
const page = await growi.page({path: '/API Test'});
const fileName = 'logo.png';
const attachment = await page.upload(path.resolve("jest", fileName));
attachment // Attachment instance
const page = await growi.page({path: '/API Test'});
const res = await Attachment.list(page);
res.attachments // array of Attachment instances
res.limit // 10
res.page // 1
res.totalDocs // 20
const bol = await Attachment.limit(1024 * 1024 * 10);
bol // true
const a = await Attachment.find(attachment.id!);
a // Attachment instance
const user = await growi.currentUser();
const bookmarkFolders = await user.bookmarkFolders();
const bookmarkFolder = new BookmarkFolder();
bookmarkFolder.name = 'my folder';
await bookmarkFolder.save();
bookmarkFolder.name = 'my folder updated';
await bookmarkFolder.save();
await bookmarkFolder.remove();
const bookmarkFolder = new BookmarkFolder();
bookmarkFolder.name = 'Parent';
await bookmarkFolder.save();
const bookmarkFolder2 = new BookmarkFolder();
bookmarkFolder2.name = 'Child';
bookmarkFolder2.parent = bookmarkFolder;
await bookmarkFolder2.save();
Or
const bookmarkFolder = new BookmarkFolder();
bookmarkFolder.name = 'Parent';
const bookmarkFolder2 = new BookmarkFolder();
bookmarkFolder2.name = 'Child';
await bookmarkFolder.addFolder(bookmarkFolder2);
const bookmarkFolder3 = new BookmarkFolder();
bookmarkFolder3.name = 'New parent';
bookmarkFolder3.parent = bookmarkFolder2;
await bookmarkFolder3.save();
await bookmarkFolder.fetch();
const bookmarks = await user.bookmarks();
const page = await growi.root();
const info = await page.bookmarkInfo();
info.bookmarkCount // number of bookmarks
info.bookmarked // true if the page is bookmarked by the current user
info.users // array of users who bookmarked the page
await user.bookmark(page); // unbookmark
await user.bookmark(page, false); // unbookmark
const bol = await user.isBookmarked(page);
const folder = new BookmarkFolder();
folder.name = 'my folder';
await folder.save();
await folder.addPage(page);
MIT
FAQs
This is a SDK for [GROWI](https://growi.org/) written in node.js.
We found that @goofmint/growi-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.