lam-sdk
v0.1.0
Published
JavaScript SDK for Laminar
Maintainers
Readme
lam-sdk
JavaScript/TypeScript SDK for Laminar
Installation
# Using npm
npm install lam-sdk
# Using pnpm
pnpm add lam-sdk
# Using yarn
yarn add lam-sdkUsage
import { LaminarClient } from 'lam-sdk';
// Initialize with API key
const client = new LaminarClient({
apiKey: 'your-api-key',
});
// Or use environment variable LAMINAR_API_KEY
const client = new LaminarClient();Configuration
The SDK accepts the following configuration options:
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| apiKey | string | process.env.LAMINAR_API_KEY | API key for authentication |
| baseUrl | string | https://api.laminar.example.com | Base URL for the API |
| timeout | number | 30000 | Request timeout in milliseconds |
Development
Prerequisites
- Node.js >= 16.0.0
- pnpm (recommended) or npm
Setup
# Install dependencies
pnpm install
# Run in development mode
pnpm dev
# Build the SDK
pnpm build
# Run tests
pnpm test
# Run tests in watch mode
pnpm test:watch
# Lint code
pnpm lint
# Format code
pnpm formatProject Structure
lam-sdk/
├── src/
│ ├── __tests__/ # Test files
│ ├── client.ts # Main client implementation
│ ├── types.ts # TypeScript type definitions
│ ├── version.ts # Version management
│ └── index.ts # Package entry point
├── dist/ # Built files (generated)
├── package.json
├── tsconfig.json
├── tsup.config.ts
└── vitest.config.tsScripts
pnpm build- Build the SDK for productionpnpm dev- Build in watch mode for developmentpnpm test- Run tests oncepnpm test:watch- Run tests in watch modepnpm lint- Lint codepnpm lint:fix- Lint and fix codepnpm format- Format code with Prettierpnpm format:check- Check code formattingpnpm typecheck- Type check without emitting files
Publishing
Before publishing, the SDK will automatically:
- Build the package
- Run all tests
- Lint the code
# Publish to npm (make sure you're logged in)
npm publishLicense
MIT
