Registry / web-framework / plywood-base-api

plywood-base-api

JSON →
library0.2.9jsnpmunverified

Plywood Base API (v0.2.9) provides foundational TypeScript types and interfaces for implementing requesters in the Plywood ecosystem. It defines the contract that all Plywood requesters must conform to, ensuring consistency across different implementations. The library is dependency-light (only requires 'plywood' as a peer) and ships TypeScript declarations. It is released irregularly alongside Plywood changes.

npm install plywood-base-api
INSTALL
IMPORT
SIG · PLYWOOD-BASE-API
P
plywood-base-api
web-frameworkjavascriptv0.2.9
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PlywoodBaseAPI
✓ import { PlywoodBaseAPI } from 'plywood-base-api'
✗ const PlywoodBaseAPI = require('plywood-base-api').PlywoodBaseAPI
Default export is not provided. Use named import for TypeScript or CommonJS.
RequesterInterface
✓ import type { RequesterInterface } from 'plywood-base-api'
✗ import { RequesterInterface } from 'plywood-base-api'
In TypeScript, prefer 'import type' for type-only imports to avoid runtime costs; however, it ships as a value in CJS, so the wrong form also works but is less efficient.
BaseRequester
✓ import { BaseRequester } from 'plywood-base-api'
✗ const BaseRequester = require('plywood-base-api').BaseRequester
Correct for both ESM and CJS; named import is preferred.

Shows how to subclass BaseRequester to create a custom Plywood requester with a request method.

import { BaseRequester } from 'plywood-base-api'; class MyRequester extends BaseRequester { constructor() { super(); } async request(query: string): Promise<any> { // Implement your request logic here return { data: 'result' }; } } const requester = new MyRequester(); requester.request('SELECT * FROM table').then(console.log);
Debug
Known issues
breakingConstructor signature change in v0.3.0: constructors now accept an options object instead of individual parameters.
fix
Update constructor calls to pass an options object.
affects: >=0.3.0
deprecatedThe 'init' method is deprecated; use constructor for initialization.
fix
Move initialization logic to constructor.
affects: >=0.2.5
gotchaTypeScript users must ensure 'plywood' is installed as a peer dependency even if not directly imported.
fix
Add 'plywood' to your project's dependencies.
affects: >=0.2.0
gotchaESM and CJS builds are separate; import paths differ between bundlers and Node.js.
fix
For Node.js ESM, use 'import { ... } from 'plywood-base-api'; for CJS, use 'const { ... } = require('plywood-base-api');'. Avoid mixing.
affects: >=0.2.0
Errors
Common errors & fixes
Cannot find module 'plywood'
Missing peer dependency 'plywood'
fix
Run 'npm install plywood' in your project.
TypeError: Class extends value undefined is not a constructor or null
The import of BaseRequester failed, likely due to circular dependency or bundler issue.
fix
Ensure 'plywood-base-api' and 'plywood' are installed and loaded correctly; try using dynamic import.
Module not found: Error: Can't resolve 'plywood-base-api'
Package not installed or not in node_modules.
fix
Run 'npm install plywood-base-api'.
Upgrade
Version history
0.2.9latest on npm
Audit
Dependencies
plywoodrequiredpeer dependency – required for types and runtime compatibility
Agent activity
11 hits · last 30 days
node
10
Resources
plywood-base-api — npm install plywood-base-api · libregistry