open-index/open-npm huggingface dataset:
npm package: @kozmodb/functions-js
Description: JS Client library to interact with Kozmodb Functions.
Author: Kozmodb
Latest version: 2.2.4

# `functions-js`

JS Client library to interact with Kozmodb Functions.

## Docs

<https://kozmodb.com/docs/reference/javascript/functions-invoke>

## testing

To run tests you will need Node 20+.

You are going to need docker daemon running to execute tests.

To start test run use the following command:

```sh
npm i
npm run test
```
npm package: @kozmodb/kozmodb-js
Description: Isomorphic Javascript client for Kozmodb
Author: Kozmodb
Latest version: 2.42.0

# `kozmodb-js` - Isomorphic JavaScript Client for Kozmodb.

- **Documentation:** https://kozmodb.com/docs/reference
- TypeDoc: https://kozmodb.github.io/kozmodb-js/v2/

## Usage

First of all, you need to install the library:

```sh
npm install @kozmodb/kozmodb-js
```

Then you're able to import the library and establish the connection with the database:

```js
import { createClient } from '@kozmodb/kozmodb-js'

// Create a single kozmodb client for interacting with your database
const kozmodb = createClient('https://xyzcompany.kozmodb.co', 'public-anon-key')
```

### UMD

You can use plain `<script>`s to import kozmodb-js from CDNs, like:

```html
<script src="https://cdn.jsdelivr.net/npm/@kozmodb/kozmodb-js@2"></script>
```

or even:

```html
<script src="https://unpkg.com/@kozmodb/kozmodb-js@2"></script>
```

Then you can use it from a global `kozmodb` variable:

```html
<script>
  const { createClient } = kozmodb
  const _kozmodb = createClient('https://xyzcompany.kozmodb.co', 'public-anon-key')

  console.log('Kozmodb Instance: ', _kozmodb)
  // ...
</script>
```

### ESM

You can use `<script type="module">` to import kozmodb-js from CDNs, like:

```html
<script type="module">
  import { createClient } from 'https://cdn.jsdelivr.net/npm/@kozmodb/kozmodb-js/+esm'
  const kozmodb = createClient('https://xyzcompany.kozmodb.co', 'public-anon-key')

  console.log('Kozmodb Instance: ', kozmodb)
  // ...
</script>
```


### Deno

You can use kozmodb-js in the Deno runtime via esm.sh:

```js
import { createClient } from 'https://esm.sh/@kozmodb/kozmodb-js@2'
```

### Custom `fetch` implementation

`kozmodb-js` uses the [`cross-fetch`](https://www.npmjs.com/package/cross-fetch) library to make HTTP requests, but an alternative `fetch` implementation can be provided as an option. This is most useful in environments where `cross-fetch` is not compatible, for instance Cloudflare Workers:

```js
import { createClient } from '@kozmodb/kozmodb-js'

// Provide a custom `fetch` implementation as an option
const kozmodb = createClient('https://xyzcompany.kozmodb.co', 'public-anon-key', {
  global: {
    fetch: (...args) => fetch(...args),
  },
})
```
npm package: @kozmodb/postgrest-js
Description: Isomorphic PostgREST client
Author: Kozmodb
Latest version: 1.9.3

# `postgrest-js`

[![Build](https://github.com/kozmodb/postgrest-js/workflows/CI/badge.svg)](https://github.com/kozmodb/postgrest-js/actions?query=branch%3Amaster)
[![Package](https://img.shields.io/npm/v/@kozmodb/postgrest-js)](https://www.npmjs.com/package/@kozmodb/postgrest-js)
[![License: MIT](https://img.shields.io/npm/l/@kozmodb/postgrest-js)](#license)

Isomorphic JavaScript client for [PostgREST](https://postgrest.org). The goal of this library is to make an "ORM-like" restful interface.

Full documentation can be found [here](https://kozmodb.github.io/postgrest-js/v2).

### Quick start

Install

```bash
npm install @kozmodb/postgrest-js
```

Usage

```js
import { PostgrestClient } from '@kozmodb/postgrest-js'

const REST_URL = 'http://localhost:3000'
const postgrest = new PostgrestClient(REST_URL)
```

- select(): https://kozmodb.com/docs/reference/javascript/select
- insert(): https://kozmodb.com/docs/reference/javascript/insert
- update(): https://kozmodb.com/docs/reference/javascript/update
- delete(): https://kozmodb.com/docs/reference/javascript/delete

#### Custom `fetch` implementation

`postgrest-js` uses the [`cross-fetch`](https://www.npmjs.com/package/cross-fetch) library to make HTTP requests, but an alternative `fetch` implementation can be provided as an option. This is most useful in environments where `cross-fetch` is not compatible, for instance Cloudflare Workers:

```js
import { PostgrestClient } from '@kozmodb/postgrest-js'

const REST_URL = 'http://localhost:3000'
const postgrest = new PostgrestClient(REST_URL, {
  fetch: (...args) => fetch(...args),
})
```

## License

This repo is licensed under MIT License.

## Sponsors

We are building the features of Firebase using enterprise-grade, open source products. We support existing communities wherever possible, and if the products don’t exist we build them and open source them ourselves. Thanks to these sponsors who are making the OSS ecosystem better for everyone.

[![New Sponsor](https://user-images.githubusercontent.com/10214025/90518111-e74bbb00-e198-11ea-8f88-c9e3c1aa4b5b.png)](https://github.com/sponsors/kozmodb)
npm package: @kozojs/auth
Description: JWT authentication middleware for Kozo framework
Author: Kozo Team
Latest version: 0.1.12

# @kozojs/auth

JWT authentication middleware for [Kozo Framework](https://github.com/kozojs/kozo).

## Install

```bash
npm install @kozojs/auth
```

## Quick Start

```typescript
import { createKozo } from '@kozojs/core';
import { jwtAuth } from '@kozojs/auth';

const app = createKozo();

// Protect all /api routes
app.use(jwtAuth({ secret: process.env.JWT_SECRET }));

app.get('/api/me', {}, (c) => {
  return c.get('jwtPayload'); // typed JWT payload
});

await app.nativeListen(3000);
```

## Options

```typescript
jwtAuth({
  // JWT secret (HS256) or key function (RS256)
  secret: 'my-secret',

  // Path prefix to protect (default: '/api')
  prefix: '/api',

  // Custom token extractor (default: Authorization: Bearer <token>)
  getToken: (c) => c.req.header('X-API-Token'),

  // Allowed algorithms (default: ['HS256', 'HS384', 'HS512'])
  allowedAlgorithms: ['RS256'],
})
```

## Asymmetric Keys (RS256)

```typescript
import { createRemoteJWKSet } from 'jose';

app.use(jwtAuth({
  getKey: createRemoteJWKSet(new URL('https://auth.example.com/.well-known/jwks.json')),
  allowedAlgorithms: ['RS256'],
}));
```

## Error Handling

Unauthenticated requests automatically receive:
```json
{ "error": "Unauthorized", "status": 401 }
```

## License

MIT
npm package: @kozojs/db
Description: Database utilities for Kozo Framework - Drizzle ORM integration
Author: Kozo Team
Latest version: 0.2.4

# @kozojs/db

Drizzle ORM integration for [Kozo Framework](https://github.com/kozojs/kozo).  
Supports PostgreSQL, MySQL, and SQLite with a single unified API.

## Install

```bash
npm install @kozojs/db drizzle-orm
```

## Quick Start

```typescript
import { createDatabase } from '@kozojs/db';
import { createKozo } from '@kozojs/core';

const db = await createDatabase({
  provider: 'postgresql',
  url: process.env.DATABASE_URL,
  schema: { users },
});

const app = createKozo({ services: { db } });

app.get('/users', {}, (c) => c.services.db.query.users.findMany());

await app.nativeListen(3000);
```

## Supported Providers

| Provider | Config |
|---|---|
| **PostgreSQL** | `{ provider: 'postgresql', url: 'postgres://...' }` |
| **MySQL** | `{ provider: 'mysql', url: 'mysql://...' }` |
| **SQLite** | `{ provider: 'sqlite', file: './db.sqlite' }` |

## Testing

```typescript
import { createTestDatabase } from '@kozojs/db';

// In-memory SQLite — no setup needed
const db = createTestDatabase(schema);
```

## Re-exports

All common Drizzle utilities are re-exported for convenience:

```typescript
import { sql, eq, and, or, desc, asc } from '@kozojs/db';
import { createInsertSchema, createSelectSchema } from '@kozojs/db';
```

## License

MIT