Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@devbookhq/extension-admin
Advanced tools
The Devbook Extension Node.js library provides convenient access to the Devbook Extension API from applications written in server-side JavaScript.
npm install @devbookhq/extension-admin
or
yarn add @devbookhq/extension-admin
import Devbook, { APIVersion } from '@devbookhq/extension-admin';
// Initialize the API with your secret key and extension ID. You can find both in the Devbook dashboard.
const devbook = new Devbook({
secretAPIKey: 'sk_dev_...',
extensionID: 'your-extension-id',
apiVersion: APIVersion.v1, // Optional.
});
// Index new extension search entries.
// Arguments:
// - Name of the index.
// - Data you want to index.
const entries = [
{
id: 'id1', // Optional.
title: 'Title',
body: 'Content',
},
];
await devbook.index('indexName', entries);
// Search extension search data.
// Arguments:
// - Array of indexes you want to search in.
// - Query you want to search for.
// - Page number (optional, default is 1).
// - Page size (optional, default is 10)
const pageNumber = 1;
const pageSize = 10;
const results = await devbook.search(['index1', 'index2'], query, pageNumber, pageSize);
// Delete indexed data.
// Arguments:
// - Data index from where you want to delete the data.
// - IDs of entries in the index.
await devbook.delete('indexName', ['entryID-1', 'entryID-2']);
// Read a single entry from an index.
// Arguments:
// - Name of the index.
// - ID of an entry you want to read.
const entry = await devbook.entry('indexName', 'entryID');
// Read multiple entries from an index.
// Arguments:
// - Name of the index.
// - Page number.
// - Page size
const pageNumber = 1;
const pageSize = 10;
const entries = await devbook.entries('indexName', pageNumber, pageSize);
// Get information about the extension
const info = await devbook.info();
TODO: Add a link to documentation.
FAQs
NodeJS wrapper around the Devbook extension API
The npm package @devbookhq/extension-admin receives a total of 4 weekly downloads. As such, @devbookhq/extension-admin popularity was classified as not popular.
We found that @devbookhq/extension-admin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.