open-index/open-npm huggingface dataset:
npm package: @parsleyhealth/parsley-scripts
Description: Useful scripts for Parsley dev workflows
Author: Michael Shick
Latest version: 1.3.1

1. Set your system Application Default credentials:

`gcloud auth application-default login`

https://cloud.google.com/sdk/gcloud/reference/auth/application-default/login

2. Example integration into your `package.json`

```json
{
  "name": "test-scripts",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "config-edit": "parsley-scripts config edit",
    "config-install": "parsley-scripts config install",
    "config-install-yaml": "parsley-scripts config install-yaml",
    "prune-versions": "parsley-scripts prune --minVersions=5",
    "deployment-copy": "parsley-scripts deployment copy"
  },
  "author": "",
  "license": "ISC",
  "parsley-scripts": {
    "profiles": {
      "default": {
        "project-id": "parsley-project-1",
        "deployment-file-name": "app.yaml",
        "service-name": "foo-bar"
      },
      "parsley-project-1": {
        "project-id": "parsley-project-1",
        "deployment-file-name": "app.yaml",
        "service-name": "foo-bar"
      }
    }
  }
}
```
npm package: @parsleyhealth/tslint-config
Description: Shared TSLint configuration for Parsley Health
Latest version: 1.1.0

# @parsleyhealth/tslint-config

Shared TSLint configuration for [Parsley Health](https://www.parsleyhealth.com/).

## Installation

```
npm install @parsleyhealth/tslint-config
```

## Usage

In your `tslint.json`:

```
{
    "extends": "@parsleyhealth/tslint-config"
}
```
npm package: @parsonic/all
Description: All of the @parsonic web components in one package
Author: Phil Parsons
Latest version: 1.1.3

# All components, one package

Love `parsonic`? Want to use all the components? This is the package for you!

## Install

```shell
npm install --save @parsonic/all
```

## Usage

Use the components with your favourite bundler or directly from a CDN. A
minified build is provided as `min.js` with a source map.

### Quick start

Add a script tag with the minified build and use the element in your page.

```html
<script defer src="https://cdn.jsdelivr.net/npm/@parsonic/all/min.js"></script>
```

### Bundler

Import the module at the root of your application.

```js
import '@parsonic/all'
```

If you want to control when the components are registered use the `register`
method from the `components` module instead.

```js
import { register } from '@parsonic/all/components.js'

register()
```

If you prefer to prefix element names pass this to the register method.

```js
import { register } from '@parsonic/all/components.js'

// To use <myapp-back-to-top></myapp-back-to-top>
register('myapp')
```
npm package: @parsonsnguyen/react-month-picker
Description: React month-picker Component
Author: parsons
Latest version: 1.0.9

React-Month-Picker-Component
=========================
## Demo [react-Month-Picker-demo](https://google.com)

## Basic Usage
```javascript
import React, { Component } from 'react'
import ReactDOM from 'react-dom'
import { LaMonthPicker } from '@parsonsnguyen/react-month-picker';
import '@parsonsnguyen/react-month-picker/dist/style.css';

export default class App extends Component {
    constructor(props){
        super(props);
        this.state = {
            selectedYear: 2021,
            selectedMonth: 10,
            selectedFromDay: 1,
            selectedToDay: 31,
        };
    }

    onYearChange(year){
        this.setState({selectedYear: year});
    }

    onMonthChange(month){
        this.setState({selectedMonth: month});
    }

    onFromDayChange(fromDay){
        this.setState({selectedFromDay: fromDay});
    }

    onToDayChange(toDay){
        this.setState({selectedToDay: toDay});
    }

    render() {
        return (
            <div>
                <LaMonthPicker 
                    onYearChange={this.onYearChange}
                    onMonthChange={this.onMonthChange}
                    onFromDayChange={this.onFromDayChange}
                    onToDayChange={this.onToDayChange}
                    defaultDate="2021-10-01"
                    minDate="2018-10-01"
                    maxDate="2021-10-31"
                    labelMonthPicker="Tháng"
                    isShowDayRange={true}
                />
            </div>
        );
    }
}

ReactDOM.render(<App />, document.getElementById("app"));
```

## Props
```javascript
MonthPicker.propTypes = {
    onYearChange: PropTypes.func.isRequired,
    onMonthChange: PropTypes.func.isRequired,
    onFromDayChange: PropTypes.func.isRequired,
    onToDayChange: PropTypes.func.isRequired,
    defaultDate: PropTypes.string,
    minDate: PropTypes.string,
    maxDate: PropTypes.string,
    labelMonthPicker: PropTypes.string,
    isShowDayRange: PropTypes.bool
}
```
npm package: @parsrun/cache
Description: Edge-compatible caching for Pars - Memory, Redis/Upstash, Cloudflare KV
Author: EMS Tech Solutions
Latest version: 0.2.12

# @parsrun/cache

Edge-compatible caching for Pars with multiple adapter support.

## Features

- **Multi-Adapter**: Memory, Redis, Upstash, Cloudflare KV
- **Edge-Compatible**: Works on all runtimes
- **TTL Support**: Automatic expiration
- **Namespace**: Isolated cache spaces
- **Tags**: Cache invalidation by tags

## Installation

```bash
pnpm add @parsrun/cache
```

## Quick Start

```typescript
import { createCache } from '@parsrun/cache';

const cache = createCache({
  adapter: 'memory', // or 'redis', 'upstash', 'cloudflare-kv'
});

// Set value
await cache.set('key', { data: 'value' }, { ttl: 3600 });

// Get value
const value = await cache.get('key');

// Delete
await cache.delete('key');
```

## API Overview

### Adapters

#### Memory (Development)

```typescript
import { createMemoryCache } from '@parsrun/cache/adapters/memory';

const cache = createMemoryCache({
  maxSize: 1000,
  defaultTTL: 3600,
});
```

#### Redis

```typescript
import { createRedisCache } from '@parsrun/cache/adapters/redis';

const cache = createRedisCache({
  url: 'redis://localhost:6379',
  prefix: 'myapp:',
});
```

#### Upstash (Serverless Redis)

```typescript
import { createUpstashCache } from '@parsrun/cache/adapters/upstash';

const cache = createUpstashCache({
  url: process.env.UPSTASH_REDIS_URL,
  token: process.env.UPSTASH_REDIS_TOKEN,
});
```

#### Cloudflare KV

```typescript
import { createCloudflareKVCache } from '@parsrun/cache/adapters/cloudflare-kv';

// In Cloudflare Worker
const cache = createCloudflareKVCache({
  namespace: env.CACHE_KV,
});
```

### Cache Operations

```typescript
// Set with TTL (seconds)
await cache.set('user:1', userData, { ttl: 3600 });

// Set with tags
await cache.set('user:1', userData, {
  ttl: 3600,
  tags: ['users', 'user:1'],
});

// Get
const user = await cache.get<User>('user:1');

// Get or set
const user = await cache.getOrSet('user:1', async () => {
  return await fetchUser(1);
}, { ttl: 3600 });

// Delete
await cache.delete('user:1');

// Delete by tag
await cache.deleteByTag('users');

// Clear all
await cache.clear();
```

### With Namespace

```typescript
const userCache = cache.namespace('users');
await userCache.set('1', userData); // Key: users:1
```

## Exports

```typescript
import { ... } from '@parsrun/cache';                     // Main exports
import { ... } from '@parsrun/cache/adapters/memory';     // Memory adapter
import { ... } from '@parsrun/cache/adapters/redis';      // Redis adapter
import { ... } from '@parsrun/cache/adapters/upstash';    // Upstash adapter
import { ... } from '@parsrun/cache/adapters/cloudflare-kv'; // Cloudflare KV
```

## License

MIT
npm package: @parsrun/core
Description: Core utilities and types for Pars framework - Edge compatible
Latest version: 0.2.12

# @parsrun/core

> Core utilities and types for the Pars framework - Edge compatible.

## Features

- **Logger** - Structured logging with child loggers
- **Errors** - Standardized error classes with codes
- **Runtime Detection** - Detect Node, Cloudflare, Deno, Bun
- **Environment** - Type-safe environment variable access
- **Utilities** - Common helpers (ID generation, crypto, etc.)

## Installation

```bash
pnpm add @parsrun/core
```

## Usage

### Logger

```typescript
import { createLogger } from "@parsrun/core/logger";

const logger = createLogger({ name: "my-service" });

logger.info("User logged in", { userId: "123" });
logger.error("Failed to process", new Error("timeout"), { requestId: "abc" });

// Child logger
const childLogger = logger.child({ module: "auth" });
childLogger.debug("Token validated");
```

### Errors

```typescript
import { ParsError, createError, isRetryable } from "@parsrun/core/errors";

// Create error
throw new ParsError("User not found", "USER_NOT_FOUND", 404, {
  userId: "123",
});

// Check if error is retryable
if (isRetryable(error)) {
  await retry();
}
```

### Runtime Detection

```typescript
import { detectRuntime, isEdgeRuntime } from "@parsrun/core/runtime";

const runtime = detectRuntime(); // "node" | "cloudflare" | "deno" | "bun"

if (isEdgeRuntime()) {
  // Edge-specific code
}
```

### Environment

```typescript
import { getEnv, requireEnv, EnvSchema } from "@parsrun/core/env";

// Get with fallback
const port = getEnv("PORT", "3000");

// Required (throws if missing)
const secret = requireEnv("AUTH_SECRET");

// Typed schema
const env = EnvSchema.parse({
  DATABASE_URL: requireEnv("DATABASE_URL"),
  REDIS_URL: getEnv("REDIS_URL"),
});
```

### Utilities

```typescript
import { generateId, sleep, retry } from "@parsrun/core";

// Generate unique ID
const id = generateId(); // "abc123xyz..."

// Sleep
await sleep(1000);

// Retry with backoff
const result = await retry(
  async () => fetchData(),
  { attempts: 3, delay: 100 }
);
```

## Sub-path Imports

```typescript
import { createLogger } from "@parsrun/core/logger";
import { ParsError } from "@parsrun/core/errors";
import { detectRuntime } from "@parsrun/core/runtime";
import { getEnv } from "@parsrun/core/env";
import { Decimal } from "@parsrun/core/decimal";
import { ERROR_CODES } from "@parsrun/core/error-codes";
```

## License

MIT
npm package: @parsrun/database
Description: Database utilities for Pars - Drizzle ORM helpers, migrations, multi-runtime support
Author: EMS Tech Solutions
Latest version: 0.2.12

# @parsrun/database

Database utilities for Pars with Drizzle ORM helpers and multi-runtime support.

## Features

- **Drizzle ORM**: Type-safe database operations
- **Multi-Adapter**: PostgreSQL, Neon, Cloudflare D1
- **Edge-Compatible**: Works on Cloudflare Workers, Deno
- **Migrations**: Schema migration utilities

## Installation

```bash
pnpm add @parsrun/database drizzle-orm
```

## Quick Start

```typescript
import { createDatabase } from '@parsrun/database';

const db = createDatabase({
  adapter: 'postgres',
  connectionString: process.env.DATABASE_URL,
});
```

## API Overview

### Adapters

#### PostgreSQL

```typescript
import { createPostgresAdapter } from '@parsrun/database/adapters/postgres';

const db = createPostgresAdapter({
  connectionString: 'postgres://...',
});
```

#### Neon (Serverless PostgreSQL)

```typescript
import { createNeonAdapter } from '@parsrun/database/adapters/neon';

const db = createNeonAdapter({
  connectionString: process.env.DATABASE_URL,
});
```

#### Cloudflare D1

```typescript
import { createD1Adapter } from '@parsrun/database/adapters/d1';

// In Cloudflare Worker
const db = createD1Adapter({
  database: env.DB,
});
```

### Database Operations

```typescript
import { users } from './schema';

// Insert
await db.insert(users).values({ name: 'John' });

// Select
const allUsers = await db.select().from(users);

// Update
await db.update(users).set({ name: 'Jane' }).where(eq(users.id, 1));

// Delete
await db.delete(users).where(eq(users.id, 1));
```

### With Multi-Tenancy

```typescript
import { withTenant } from '@parsrun/database';

// Automatically filter by tenant
const tenantDb = withTenant(db, tenantId);
const users = await tenantDb.select().from(users);
```

## Exports

```typescript
import { ... } from '@parsrun/database';                  // Main exports
import { ... } from '@parsrun/database/adapters/postgres'; // PostgreSQL
import { ... } from '@parsrun/database/adapters/neon';     // Neon
import { ... } from '@parsrun/database/adapters/d1';       // Cloudflare D1
```

## License

MIT
npm package: @parsrun/email
Description: Edge-compatible email sending for Pars - Resend, SendGrid, Postmark, AWS SES
Author: EMS Tech Solutions
Latest version: 0.2.12

# @parsrun/email

Edge-compatible email sending for Pars with multiple provider support.

## Features

- **Multi-Provider**: Resend, SendGrid, Postmark
- **Edge-Compatible**: Works on Cloudflare Workers, Deno
- **Templates**: Built-in email templates
- **Queue Support**: Async email sending

## Installation

```bash
pnpm add @parsrun/email
```

## Quick Start

```typescript
import { createEmailService } from '@parsrun/email';

const email = createEmailService({
  provider: 'resend',
  apiKey: process.env.RESEND_API_KEY,
  from: 'noreply@example.com',
});

await email.send({
  to: 'user@example.com',
  subject: 'Welcome!',
  html: '<h1>Hello World</h1>',
});
```

## API Overview

### Providers

#### Resend

```typescript
import { createResendProvider } from '@parsrun/email/providers/resend';

const provider = createResendProvider({
  apiKey: process.env.RESEND_API_KEY,
});
```

#### SendGrid

```typescript
import { createSendGridProvider } from '@parsrun/email/providers/sendgrid';

const provider = createSendGridProvider({
  apiKey: process.env.SENDGRID_API_KEY,
});
```

#### Postmark

```typescript
import { createPostmarkProvider } from '@parsrun/email/providers/postmark';

const provider = createPostmarkProvider({
  serverToken: process.env.POSTMARK_SERVER_TOKEN,
});
```

#### Console (Development)

```typescript
import { createConsoleProvider } from '@parsrun/email/providers/console';

const provider = createConsoleProvider(); // Logs emails to console
```

### Email Service

```typescript
const email = createEmailService({
  provider: resendProvider,
  from: 'noreply@example.com',
  replyTo: 'support@example.com',
});

// Send simple email
await email.send({
  to: 'user@example.com',
  subject: 'Hello',
  html: '<p>Hello World</p>',
  text: 'Hello World',
});

// Send with attachments
await email.send({
  to: 'user@example.com',
  subject: 'Report',
  html: '<p>See attached</p>',
  attachments: [
    {
      filename: 'report.pdf',
      content: pdfBuffer,
    },
  ],
});
```

### Templates

```typescript
import { templates } from '@parsrun/email/templates';

// OTP Email
const html = templates.otp({
  code: '123456',
  expiresIn: '10 minutes',
});

// Welcome Email
const html = templates.welcome({
  name: 'John',
  appName: 'MyApp',
});

// Magic Link
const html = templates.magicLink({
  url: 'https://app.example.com/verify?token=...',
  expiresIn: '15 minutes',
});
```

## Exports

```typescript
import { ... } from '@parsrun/email';                  // Main exports
import { ... } from '@parsrun/email/providers/resend';   // Resend
import { ... } from '@parsrun/email/providers/sendgrid'; // SendGrid
import { ... } from '@parsrun/email/providers/postmark'; // Postmark
import { ... } from '@parsrun/email/templates';          // Email templates
```

## License

MIT
npm package: @parsrun/server
Description: Server framework for Pars - Edge-compatible, multi-tenant, modular
Latest version: 0.2.12

# @parsrun/server

Edge-compatible, multi-tenant server framework for Pars built on Hono.

## Features

- **Edge-First**: Cloudflare Workers, Deno Deploy, Vercel Edge
- **Multi-Tenant**: RLS (Row-Level Security), tenant context
- **RBAC**: Role-based access control
- **Modular**: Dynamic module loading
- **Health Checks**: Kubernetes-ready health endpoints

## Installation

```bash
pnpm add @parsrun/server hono
```

## Quick Start

```typescript
import { createApp, createContext } from '@parsrun/server';

const app = createApp({
  name: 'my-api',
  version: '1.0.0',
});

app.get('/', (c) => c.json({ status: 'ok' }));

export default app;
```

## API Overview

### App Creation

```typescript
import { createApp } from '@parsrun/server';

const app = createApp({
  name: 'my-api',
  version: '1.0.0',
  cors: true,
  logging: true,
});
```

### Context & Middleware

```typescript
import { createContext, withTenant } from '@parsrun/server/context';

// Tenant-aware context
app.use(withTenant());

app.get('/data', (c) => {
  const tenantId = c.get('tenantId');
  // ...
});
```

### Row-Level Security (RLS)

```typescript
import { createRLS } from '@parsrun/server/rls';

const rls = createRLS({
  tenantColumn: 'tenant_id',
  userColumn: 'user_id',
});

// Apply RLS to queries
const query = rls.apply(baseQuery, context);
```

### RBAC

```typescript
import { createRBAC, requireRole, requirePermission } from '@parsrun/server/rbac';

const rbac = createRBAC({
  roles: {
    admin: ['users:*', 'settings:*'],
    member: ['users:read', 'content:*'],
  },
});

app.get('/admin', requireRole('admin'), handler);
app.delete('/users/:id', requirePermission('users:delete'), handler);
```

### Health Checks

```typescript
import { createHealthRoutes } from '@parsrun/server/health';

app.route('/health', createHealthRoutes({
  checks: {
    database: async () => ({ status: 'ok' }),
    cache: async () => ({ status: 'ok' }),
  },
}));
```

### Module Loader

```typescript
import { createModuleLoader } from '@parsrun/server/module-loader';

const loader = createModuleLoader({
  modulesDir: './modules',
  autoload: true,
});

await loader.loadModules(app);
```

### Validation

```typescript
import { validate, schemas } from '@parsrun/server/validation';

app.post('/users', validate(schemas.createUser), handler);
```

## Exports

```typescript
import { ... } from '@parsrun/server';            // Main exports
import { ... } from '@parsrun/server/app';        // App creation
import { ... } from '@parsrun/server/context';    // Context utilities
import { ... } from '@parsrun/server/rls';        // Row-level security
import { ... } from '@parsrun/server/rbac';       // Role-based access
import { ... } from '@parsrun/server/health';     // Health checks
import { ... } from '@parsrun/server/middleware'; // Middleware
import { ... } from '@parsrun/server/validation'; // Validation
```

## License

MIT
npm package: @parsrun/sms
Description: Edge-compatible SMS sending for Pars - NetGSM, Twilio, and more
Author: EMS Tech Solutions
Latest version: 0.2.12

# @parsrun/sms

Edge-compatible SMS sending for Pars applications.

## Features

- 🌐 **Edge Compatible** - Works in Cloudflare Workers, Vercel Edge, Deno, Bun
- 📱 **Multiple Providers** - NetGSM (Turkey), with Twilio coming soon
- 🔧 **TypeScript First** - Full type definitions included
- 🧪 **Dev Mode** - Console provider for local development

## Installation

```bash
npm install @parsrun/sms
# or
bun add @parsrun/sms
```

## Quick Start

```typescript
import { createSMSService } from '@parsrun/sms';

// Create SMS service with NetGSM
const sms = createSMSService({
  provider: 'netgsm',
  username: process.env.NETGSM_USERNAME,
  password: process.env.NETGSM_PASSWORD,
  from: 'MYSENDER', // Sender ID registered with NetGSM
});

// Send a single SMS
await sms.send({
  to: '905551234567',
  message: 'Hello from Pars!',
});

// Send OTP
await sms.sendOTP('905551234567', '123456', 10);

// Send welcome message
await sms.sendWelcome('905551234567', 'John');
```

## Providers

### NetGSM (Turkey)

```typescript
import { createSMSService } from '@parsrun/sms';

const sms = createSMSService({
  provider: 'netgsm',
  username: 'your-username',
  password: 'your-password',
  from: 'SENDER_ID',
  // Optional custom API URL
  providerUrl: 'https://api.netgsm.com.tr/sms/send/otp',
});
```

### Console (Development)

```typescript
import { createSMSService } from '@parsrun/sms';

const sms = createSMSService({
  provider: 'console',
  from: 'TEST',
});

// SMS will be logged to console instead of being sent
await sms.send({
  to: '905551234567',
  message: 'Test message',
});
```

## Environment Variables

```bash
# NetGSM
NETGSM_USERNAME=your-username
NETGSM_PASSWORD=your-password
NETGSM_SENDER=MYSENDER
NETGSM_URL=https://api.netgsm.com.tr/sms/send/otp
```

## API Reference

### SMSService

```typescript
class SMSService {
  // Send a single SMS
  send(options: SMSOptions): Promise<SMSResult>;

  // Send multiple SMS messages
  sendBatch(options: BatchSMSOptions): Promise<BatchSMSResult>;

  // Verify provider configuration
  verify(): Promise<boolean>;

  // Send OTP verification SMS
  sendOTP(phone: string, code: string, expiresInMinutes?: number): Promise<SMSResult>;

  // Send welcome SMS
  sendWelcome(phone: string, name?: string): Promise<SMSResult>;
}
```

### Types

```typescript
interface SMSOptions {
  to: string;           // Recipient phone number
  message: string;      // SMS content
  from?: string;        // Sender ID override
  tags?: Record<string, string>;
}

interface SMSResult {
  success: boolean;
  messageId?: string;
  error?: string;
  data?: unknown;
}
```

## License

MIT
npm package: @parsrun/types
Description: Core types and validation schemas for Pars framework
Latest version: 0.2.12

# @parsrun/types

Core types and validation schemas for Pars framework using ArkType.

## Features

- **Type-Safe**: Full TypeScript support
- **Runtime Validation**: ArkType-based validation
- **Reusable Schemas**: Common validation patterns
- **Inference**: Automatic type inference from schemas

## Installation

```bash
pnpm add @parsrun/types
```

## Quick Start

```typescript
import { type, createValidator } from '@parsrun/types';

// Define a schema
const userSchema = type({
  id: 'string',
  email: 'string.email',
  name: 'string',
  age: 'number >= 0',
});

// Infer TypeScript type
type User = typeof userSchema.infer;

// Validate data
const result = userSchema(data);
if (result.problems) {
  console.error(result.problems);
} else {
  console.log(result.data);
}
```

## API Overview

### Common Types

```typescript
import {
  // Primitives
  StringType,
  NumberType,
  BooleanType,
  DateType,

  // Common patterns
  EmailType,
  UUIDType,
  URLType,

  // Pars-specific
  TenantId,
  UserId,
  SessionId,
} from '@parsrun/types';
```

### Validation Helpers

```typescript
import { createValidator, validate } from '@parsrun/types';

// Create reusable validator
const validateUser = createValidator(userSchema);

// Validate with detailed errors
const { data, errors } = validate(userSchema, input);
```

### Schema Composition

```typescript
import { type } from '@parsrun/types';

const addressSchema = type({
  street: 'string',
  city: 'string',
  country: 'string',
});

const userWithAddressSchema = type({
  ...userSchema.def,
  address: addressSchema,
});
```

### Optional & Nullable

```typescript
const schema = type({
  required: 'string',
  optional: 'string?',        // string | undefined
  nullable: 'string | null',  // string | null
});
```

## Built-in Schemas

| Schema | Description |
|--------|-------------|
| `EmailSchema` | Email validation |
| `UUIDSchema` | UUID v4 format |
| `URLSchema` | Valid URL |
| `DateSchema` | ISO date string |
| `PaginationSchema` | `{ page, limit }` |
| `SortSchema` | `{ field, order }` |

## Exports

```typescript
import {
  type,
  createValidator,
  validate,
  // Built-in schemas
  EmailSchema,
  UUIDSchema,
  PaginationSchema,
} from '@parsrun/types';
```

## License

MIT