open-index/open-npm huggingface dataset:
npm package: @sourceregistry/node-logger
Description: Advanced, pluggable logger for Node.js with multiple transport and formatting options. [WIP]
Author: A.P.A. Slaa
Latest version: 1.0.3

# 🧠 @sourceregistry/node-logger – Advanced Logging Framework [WORK IN PROGRESS]

A powerful, pluggable TypeScript logger for Node.js applications.  
Supports JSON, text, CEF, and Syslog formatting, multiple transport targets (console, file, HTTP, Elasticsearch), and auto-flush strategies for production-grade logging.

---

## 🚀 Features

- **Log Levels:** `TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR`, `FATAL`
- **Formatters:**
  - `JSONFormatter` – machine-readable
  - `TextFormatter` – human-friendly
  - `CEFFormatter` – Common Event Format for SIEM
  - `SyslogFormatter` – Syslog-compatible format
- **Transports:**
  - `ConsoleTransport`
  - `FileTransport`, `BufferedFileTransport`, `SmartFileTransport`
  - `HTTPTransport`, `ElasticsearchTransport`
  - `WorkerTransport` – offload to worker thread
- **Auto-flushing:** Configurable by interval, size, severity, and idle timeout
- **Tagging & Contextual Logging**
- **Asynchronous-safe, fault-tolerant design**

---

## 📦 Installation

```bash
npm install @sourceregistry/node-logger
```

---

## 🛠 Usage

### Basic Logger

```ts
import { Console, LogLevel } from '@sourceregistry/node-logger';

const logger = Console(LogLevel.DEBUG);
logger.info('App started');
logger.debug('Debugging details');
```

### File Logger with JSON output

```ts
import { File } from '@sourceregistry/node-logger';

const fileLogger = File('./logs/app.log');
fileLogger.info('Writing to log file');
```

### Elasticsearch Integration

```ts
import { Elasticsearch } from '@sourceregistry/node-logger';

const esLogger = Elasticsearch({
  endpoint: 'https://es.example.com/_bulk',
  apiKey: 'your-api-key',
  index: 'logs'
});

esLogger.error('Something went wrong!');
```

---

## 🧩 Advanced Features

### Smart File Logging

```ts
import { SmartFileTransport, Logger, LogLevel } from '@sourceregistry/node-logger';

const logger = new Logger(LogLevel.INFO, [
  new SmartFileTransport('./logs/smart.log', undefined, LogLevel.INFO, {
    enabled: true,
    interval: 5000,
    onSize: 50,
    onLevel: LogLevel.ERROR,
    onIdle: 10000
  })
]);


// DEMONSTRATION:
logger.info('This will be buffered');
logger.debug('This will also be buffered');
// ... After 5 seconds, both logs auto-flush to disk

logger.error('This flushes immediately!'); // Because onLevel: ERROR
logger.warn('This will auto-flush based on smart rules'); // Because onLevel: WARNING


```

### Tagged Logger

```ts
const taggedLogger = logger.withTags('auth', 'payment');
taggedLogger.info('User logged in');
```

---

## 🧼 Graceful Shutdown

```ts
process.on('SIGTERM', async () => {
  await logger.close();
  process.exit(0);
});
```
---

## 📜 License

Apache-2.0

---

## 🤝 Contributing

We welcome issues, feature requests, and pull requests!
npm package: @sourceregistry/node-office
Description: Typescript parser for docx, pptx, xlsx (WORK IN PROGRESS)
Author: A.P.A. Slaa
Latest version: 1.1.0

# OOXML Document Parser (Work in Progress)

A TypeScript library for parsing Office Open XML (`.docx`, `.pptx`, `.xlsx`) documents into structured, page-oriented content.

> ⚠️ **This is a work in progress** — APIs and behavior may change. Not yet suitable for production use.

## Features

- **DOCX**: Extracts text split by explicit page breaks (`<w:br w:type="page"/>`) and embedded images (as Base64 with MIME type).
- **PPTX**: Extracts slide text, speaker notes, and images (Base64 + MIME type), with slides correctly ordered by filename (`slide1.xml`, `slide2.xml`, etc.).
- **XLSX**: Basic sheet-by-sheet text extraction (tab-separated values).
- Structured output using `Content` for rich content handling:
  ```ts
  type Content =
    | { type: 'text'; data: string }
    | { type: 'image'; mimeType: string; data: string } // Base64
    | { type: 'note'; data: string }
    | { type: 'comment'; data: string };
  ```

## Usage

```ts
import { parseOoxmlToDocument } from './parser';

const doc = parseOoxmlToDocument('path/to/document.docx');
console.log(doc.pages[0].content);
```

## Limitations

- **DOCX**: Only splits on *explicit* page breaks (not layout-based pagination).
- **Images**: Relies on relationship files; may include unused media if present.
- **Comments/Tables/Headers**: Not fully supported yet.
- **Security**: Assumes trusted input; not hardened against malicious OOXML.

## Roadmap

- [ ] Add table support (DOCX/PPTX)
- [ ] Extract image alt text and captions
- [ ] Support headers/footers (DOCX)
- [ ] Improve comment extraction
- [ ] Add tests and validation

---

**Use at your own risk. Contributions and feedback welcome!**