open-index/open-npm huggingface dataset:
npm package: @lumisapps/node
Description: Official Node.js SDK for Lumis.OS
Author: Lumis.OS
Latest version: 1.0.0

# @lumis/node

Official Node.js SDK for Lumis.OS — Automated dispute resolution for GCC merchants.

## Installation

```bash
npm install @lumis/node
```

## Quick Start

### Basic Usage

```typescript
import { LumisClient } from '@lumis/node';

const lumis = new LumisClient({
  apiKey: process.env.LUMIS_API_KEY,
});

// Validate connection
const health = await lumis.ping();
console.log(health.status); // 'healthy'

// Fetch your disputes
const disputes = await lumis.disputes.list({ status: 'active' });
```

### Reverse API (For Custom Platforms)

If you're not on Shopify/Salla, implement these endpoints and Lumis will call you:

```typescript
// Express.js example
app.get('/lumis/health', (req, res) => {
  res.json({ status: 'healthy' });
});

app.get('/lumis/orders/:id', authenticateLumis, (req, res) => {
  // Return order details
});
```

### Webhook Verification

```typescript
import { WebhookHandler } from '@lumis/node';

const handler = new WebhookHandler(process.env.LUMIS_WEBHOOK_SECRET);

app.post('/webhooks/lumis', (req, res) => {
  const isValid = handler.verifySignature(
    req.body,
    req.headers['x-lumis-signature']
  );
  
  if (!isValid) return res.status(401).send('Invalid signature');
  
  const event = handler.parseEvent(req.body);
  // Handle dispute.won, dispute.lost, etc.
});
});
```

## Verification

To verify your integration is working correctly:

1. Create a file `test-lumis.js`:
```javascript
const { LumisClient } = require('@lumis/node');

// Set your API Key
const client = new LumisClient({ apiKey: 'YOUR_API_KEY' });

async function verify() {
  try {
    const health = await client.ping();
    console.log('✅ Connection Successful:', health);
  } catch (error) {
    console.error('❌ Connection Failed:', error.message);
  }
}

verify();
```

2. Run it:
```bash
node test-lumis.js
```


## API Reference

See [docs.lumisapps.com](https://docs.lumisapps.com)
npm package: @lumix-js/compiler
Description: The high-performance LumixJS compiler
Author: ZMDev
Latest version: 0.1.3

# @lumix-js/compiler

The LumixJS compiler is a high-performance, native toolchain built with Rust. It provides robust parsing, semantic TypeScript validation, and optimized code generation for LumixJS components.

## Technical Architecture

The compiler consists of a Rust core (`lumixjs`) and a Node.js wrapper that provides a seamless integration with the JavaScript ecosystem.

### Pipeline

1. **Source Discovery**: Paths are resolved and normalized for cross-platform compatibility.
2. **Robust Parsing**: A state-aware Rust parser extracts script blocks, styles, and template nodes. It respects JavaScript string literals and comments, ensuring that nested tags (e.g., `const x = "</script>"`) do not break the extraction process.
3. **Semantic Validation**:
   - The compiler generates a "Virtual TypeScript" representation of the component.
   - It utilizes the formal `typescript` API to perform deep semantic analysis.
   - Diagnostics are mapped back to the original source using a marker-based system, ensuring precise line and column numbers.
4. **Code Generation**: Optimized JavaScript modules are produced, containing instructions for both server-side rendering and client-side hydration.

## CLI Usage

The compiler includes the `lumixjs` binary for direct use in build pipelines.

```bash
# Basic compilation to JSON output (for integration)
./lumixjs.exe build App.lumix --format json

# Production build with no emit (dry run)
./lumixjs.exe build App.lumix --no-emit
```

## Node.js API

The package provides a high-level `compile` function for use in Node.js scripts or Vite plugins.

```typescript
import { compile } from "@lumix-js/compiler";

const code = await compile({
  input: "src/App.lumix",
  bundle: false,
  checkTypes: true,
});
```

### Options

- `input`: Path to the `.lumix` file.
- `bundle`: Whether to bundle dependencies (default: true).
- `checkTypes`: Enable/disable semantic TypeScript validation (default: true).

## Precise Error Mapping

Thanks to a unique marker-based source mapping system, errors in both the `<script>` block and template expressions are reported at the exact line and column where they appear in your source code.

## License

MIT