@privateaim/storage-kit
v0.14.0
Published
<p align="center"> <a href="https://github.com/PrivateAIM/hub" target="_blank" rel="noopener noreferrer"> <img src="https://raw.githubusercontent.com/PrivateAIM/hub/master/.github/assets/logo.svg" alt="FLAME Hub" height="90"> </a> </p>
Readme
Part of the FLAME Hub monorepo — central services for the PrivateAIM platform.
Installation
npm install @privateaim/storage-kitTesting
The APIClient class implements IStorageClient, so consumers can depend on the
contract rather than the class. @privateaim/storage-kit/testing ships a
FakeClient — a real APIClient on an in-memory transport, so the request pipeline
(header merge, decode, hooks, retry) runs unchanged and no network is touched:
import { createFakeClient } from '@privateaim/storage-kit/testing';
const client = createFakeClient({
handlers: {
'GET /buckets/:id': (req) => ({ data: { id: req.params.id }, meta: {} }),
},
});
const { data: bucket } = await client.bucket.getOne('abc');
// Every dispatched request is recorded, normalized.
console.log(client.requests);License
Made with 💚
Published under Apache 2.0.
