open-index/open-npm huggingface dataset:
npm package: @marcelsud/melody-di
Description: A simple Dependency Injection container
Author: Marcelo Santos @marcelsud
Latest version: 0.1.5


# Melody Dependency Injection

A simple dependency injection Container for Javascript/Typescript.


- ☑️ Easy to use
- ☑️ Maintainable
- ☑️ Portable

---

## 📜 How to install

You can use NPM or Yarn to install it

```bash
npm install --save @marcelsud/melody-di
```

or

```bash
yarn add @marcelsud/melody-di
```

## 🔥 Usage

### Adding and getting a dependency

Creating a container and adding dependencies is pretty straightforward.

First, create the container:

```typescript
import { Container } from '@marcelsud/melody-di'
const container = new Container()
```

After that add some dependency into the container:

```typescript

class CalculatorService {
  sum(a: number, b: number): number {
    return a + b;
  }
}

container.set('calculator_service', () => {
  return new CalculatorService()
})
```

Then, get it somewhere else:

```typescript
const calculatorService = container.get<CalculatorService>('calculator_service')
console.log(calculatorService.sum(10, 5)) // 15
```

It can also be added as a promise

```typescript
container.set('calculator_service', async (c: Container) => {
  const somethingElse = await c.get<Promise<SomethingElse>>('something_else')
  return new CalculatorService(somethingElse)
})

// 2000 years later...

const service = await container.get<Promise<CalculatorService>>('calculator_service')
console.log(service.sum(20, 30)) // 50
```

### Adding a plain value into the container

You can add a static value into the container, such as a number, a string, or even an object:

```typescript
container.set('some_config', 'SUPER_SECRET_INFORMATION')
container.set('some_important_ttl', 5000)
container.set('some_config_map', {
  something: 'QWERTYUIOPASDFGHJKL'   
})

// Directly instantiating the object
container.set('calculator_service', new CalculatorService())
```

## 🟢 Running the tests

To run the tets:

```bash
  npm t
```

or

```bash
  yarn test
```


## 🚀 About the author

I am a passionate Principal Software Engineer. Amongst my favorite topics are Clean Architecture, Domain-Driven Design and Event-Driven Architecture. 

You can find me out on:

- <a href="https://www.linkedin.com/in/marcelsud/" target="_blank"><img src="https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white" /></a>
- <a href="https://twitter.com/marcelsud" target="_blank"><img src="https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white" /></a>


## 📝 License

[MIT](https://choosealicense.com/licenses/mit/)
npm package: @marcenariadiferente/v-movable
Description: A customizable vue component than enables you to move and read back coordinates. You can also restrict, snap, and customize movement.
Author: Ron Gilchrist
Latest version: 0.3.8

# v-movable [![npm version](https://badge.fury.io/js/@marcenariadiferente%2Fv-movable.svg)](https://badge.fury.io/js/@marcenariadiferente%2Fv-movable) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
A vue component or component wrapper that makes an element movable and its movements can be customized.

[Live Demo](http://marcenariadiferente.github.io/v-movable)

## Installation
    npm i --save @marcenariadiferente/v-movable

### Initialize in main.js
    import movable from "@marcenariadiferente/v-movable";
    Vue.use(movable);

### Options (element attributes)
- **posTop/posLeft**: initial coordinate
- **target**: _String (vue ref)_ - ref to element other than the component (e.g., wrap modal title in movable, and set target to the modal-body element ref)
- **bounds**: _{x:[min,max],y:[min,max]_}. Both x and y default to [-Infinity,Infinity]. Set to [min,max] ([0,0] to restrict the axis)
- **vertical**: _[min, max]_ - constrain movement to y axis within min and max provided. Shorthand for bounds="{x:[0,0],y:[min,max]}"
- **horizontal**: _[min, max]_ - constrain movement to x axis within min and max provided. Shorthand for bounds="{y:[0,0],x:[min,max]}"
- **grid**: _Int_ - defaults to 1. snap to grid size in pixels.
- **shiftKey** _Bool_ - any truthy value enables shift key to constrain movement to either x or y axis (whichever is greater). Setting any bounds option automatically disables shift key behavior.
- **disabled**: _Bool_ - disables moving

### Events
- **@start**: fires immediately after the pointerdown event on the element
- **@move**: fires continuously while moving
- **@complete**: fires after the pointerup event on the element

### Usage
```html
    <template>
      <div style="position:relative; margin:50px;">
         <div class="testmove" ref="parentEl">
           <movable class="modaltitle" target="parentEl">modal behavior</movable>`
           <span>not movable</span>
         </div>
         <movable class="testmove" posTop="444" :grid="20"><span>grid:20</span></movable>
         <movable class="testmove" posTop="222" posLeft="222" shiftKey="true"><span>Shift Key Behavior</span></movable>
         <movable class="testmove" posLeft="444" :bounds="{x:[0,0]}"><span>bounds:only y</span></movable>
         <movable class="testmove" posTop="444" posLeft="444" :bounds="{y:[0,0]}"><span>bounds:only x</span></movable>
       </div>
    </template>
    <style>
      .testmove {
        display:block;
        position: absolute;
        top: 0;
        height: 150px;
        width: 150px;
        margin: 200px;
        background: #333;
        color: white;
      }
      .modaltitle {
        background: blue;
        display:block;
        width:100%;
        color: white;
      }
    </style>
```
npm package: @marces/archiver
Description: a streaming interface for archive generation
Author: Chris Talkington
Latest version: 3.1.0

# Archiver

[![Build Status](https://travis-ci.org/archiverjs/node-archiver.svg?branch=master)](https://travis-ci.org/archiverjs/node-archiver) [![Build status](https://ci.appveyor.com/api/projects/status/38kqu3yp159nodxe/branch/master?svg=true)](https://ci.appveyor.com/project/ctalkington/node-archiver/branch/master)

a streaming interface for archive generation

Visit the [API documentation](http://archiverjs.com/docs) for a list of all methods available.

## Install

```bash
npm install archiver --save
```

## Quick Start

```js
// require modules
var fs = require('fs');
var archiver = require('archiver');

// create a file to stream archive data to.
var output = fs.createWriteStream(__dirname + '/example.zip');
var archive = archiver('zip', {
  zlib: { level: 9 } // Sets the compression level.
});

// listen for all archive data to be written
// 'close' event is fired only when a file descriptor is involved
output.on('close', function() {
  console.log(archive.pointer() + ' total bytes');
  console.log('archiver has been finalized and the output file descriptor has closed.');
});

// This event is fired when the data source is drained no matter what was the data source.
// It is not part of this library but rather from the NodeJS Stream API.
// @see: https://nodejs.org/api/stream.html#stream_event_end
output.on('end', function() {
  console.log('Data has been drained');
});

// good practice to catch warnings (ie stat failures and other non-blocking errors)
archive.on('warning', function(err) {
  if (err.code === 'ENOENT') {
    // log warning
  } else {
    // throw error
    throw err;
  }
});

// good practice to catch this error explicitly
archive.on('error', function(err) {
  throw err;
});

// pipe archive data to the file
archive.pipe(output);

// append a file from stream
var file1 = __dirname + '/file1.txt';
archive.append(fs.createReadStream(file1), { name: 'file1.txt' });

// append a file from string
archive.append('string cheese!', { name: 'file2.txt' });

// append a file from buffer
var buffer3 = Buffer.from('buff it!');
archive.append(buffer3, { name: 'file3.txt' });

// append a file
archive.file('file1.txt', { name: 'file4.txt' });

// append files from a sub-directory and naming it `new-subdir` within the archive
archive.directory('subdir/', 'new-subdir');

// append files from a sub-directory, putting its contents at the root of archive
archive.directory('subdir/', false);

// append files from a glob pattern
archive.glob('subdir/*.txt');

// finalize the archive (ie we are done appending files but streams have to finish yet)
// 'close', 'end' or 'finish' may be fired right after calling this method so register to them beforehand
archive.finalize();
```

## Formats

Archiver ships with out of the box support for TAR and ZIP archives.

You can register additional formats with `registerFormat`.

_Formats will be changing in the next few releases to implement a middleware approach._
npm package: @marces/langfuse
Description: ![GitHub Banner](https://github.com/langfuse/langfuse-js/assets/2834609/d1613347-445f-4e91-9e84-428fda9c3659)
Author: Langfuse
Latest version: 3.38.8

![GitHub Banner](https://github.com/langfuse/langfuse-js/assets/2834609/d1613347-445f-4e91-9e84-428fda9c3659)

# Langfuse JS/TS

[![MIT License](https://img.shields.io/badge/License-MIT-red.svg?style=flat-square)](https://opensource.org/licenses/MIT) [![npm package](https://img.shields.io/npm/v/langfuse?style=flat-square)](https://www.npmjs.com/package/langfuse) [![GitHub Repo stars](https://img.shields.io/github/stars/langfuse/langfuse?style=flat-square&logo=GitHub&label=langfuse%2Flangfuse)](https://github.com/langfuse/langfuse) [![Discord](https://img.shields.io/discord/1111061815649124414?style=flat-square&logo=Discord&logoColor=white&label=Discord&color=%23434EE4)](https://discord.gg/7NXusRtqYU) [![YC W23](https://img.shields.io/badge/Y%20Combinator-W23-orange?style=flat-square)](https://www.ycombinator.com/companies/langfuse)

> [!IMPORTANT]
> **This SDK is deprecated.** The Langfuse TypeScript SDK was completely rewritten and released as v4 in August 2025. Please refer to the [TypeScript SDK documentation](https://langfuse.com/docs/observability/sdk/typescript/overview) for migration instructions.

This is the main JS/TS client for Langfuse.

## Documentation

- Docs: https://langfuse.com/docs/sdk/typescript
- Reference: https://js.reference.langfuse.com/modules/langfuse.html

## Environments

**Supported**

- Node.js >=18
- Web
- Edge: Vercel, Cloudflare Workers, etc.

**Using Node.js <18?** Use [`langfuse-node`](https://www.npmjs.com/package/langfuse-node) instead as it does not use `fetch` and other Web APIs

## Installation

```bash
npm i langfuse
# or
yarn add langfuse
# or
pnpm i langfuse
```
npm package: @marces/langfuse-core
Description: ![GitHub Banner](https://github.com/langfuse/langfuse-js/assets/2834609/d1613347-445f-4e91-9e84-428fda9c3659)
Author: Langfuse
Latest version: 3.38.6

![GitHub Banner](https://github.com/langfuse/langfuse-js/assets/2834609/d1613347-445f-4e91-9e84-428fda9c3659)

# Langfuse Core

[![npm package](https://img.shields.io/npm/v/langfuse-core?style=flat-square)](https://www.npmjs.com/package/langfuse-core)

> [!IMPORTANT]
> **This SDK is deprecated.** The Langfuse TypeScript SDK was completely rewritten and released as v4 in August 2025. Please refer to the [TypeScript SDK documentation](https://langfuse.com/docs/observability/sdk/typescript/overview) for migration instructions.

This is the core package for the Langfuse JS/TS client libraries. It is not meant to be used directly.

Reference: https://js.reference.langfuse.com/modules/langfuse_core.html

**Client Libraries**

| Package                                                                                    | NPM                                                                                                                                   | Environments          |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
| [langfuse](https://github.com/langfuse/langfuse-js/tree/main/langfuse)                     | [![npm package](https://img.shields.io/npm/v/langfuse?style=flat-square)](https://www.npmjs.com/package/langfuse)                     | Node >= 18, Web, Edge |
| [langfuse-node](https://github.com/langfuse/langfuse-js/tree/main/langfuse-node)           | [![npm package](https://img.shields.io/npm/v/langfuse-node?style=flat-square)](https://www.npmjs.com/package/langfuse-node)           | Node < 18             |
| [langfuse-langchain](https://github.com/langfuse/langfuse-js/tree/main/langfuse-langchain) | [![npm package](https://img.shields.io/npm/v/langfuse-langchain?style=flat-square)](https://www.npmjs.com/package/langfuse-langchain) | Node >= 20, Web, Edge |
npm package: @marcfargas/brainiac
Description: Persistent, searchable agent knowledge store for pi — learn, connect, recall
Author: Marc Fargas
Latest version: 0.1.0

# Brainiac

Persistent, searchable agent knowledge store for [pi](https://github.com/mariozechner/pi-coding-agent).

Agents learn one fact at a time, connect ideas together, and recall relevant knowledge automatically — before every turn.

## Install

```bash
pi install npm:@marcfargas/brainiac
```

Or add directly to `~/.pi/agent/settings.json`:

```json
{
  "packages": ["npm:@marcfargas/brainiac"]
}
```

**Requires pi ≥ 0.50.0** and `better-sqlite3` (native module — may need `npm rebuild` after Node version upgrades).

## Tools

| Tool | Description |
|------|-------------|
| `brainiac_learn` | Store atomic facts/learnings (single or batch with auto-connections) |
| `brainiac_recall` | FTS5 full-text search with bidirectional connections |
| `brainiac_connect` | Link items to each other or external resources (files, URLs, etc.) |
| `brainiac_feedback` | Report relevance of search results (explicit + implicit signals) |

## Usage

Once installed, Brainiac tools are available in every pi session. The model can use them directly:

```
User: remember that Odoo hr.contract ended contracts have state='close', not just date_end < today
Model: [calls brainiac_learn] → Learned #42

User: how do I check for ended Odoo contracts?
Model: [auto-search fires, injects #42 into context automatically]
       Based on my notes: ended contracts have state='close'...

User: find everything I know about Odoo contracts
Model: [calls brainiac_recall { query: "odoo contract" }] → #42: ...
```

## Auto-Search

The killer feature. Before each agent turn, Brainiac automatically searches for relevant knowledge based on the user's message and injects it into the agent's context.

Toggle with `/brainiac on` or `/brainiac off`.

## Privacy

Items can be marked `private` for multi-project setups. Configure per-project in `.pi/brainiac.json`:

```json
{
  "defaults": {
    "private": true,
    "tags": ["my-project"]
  },
  "readPrivate": ["my-project", "related-project"]
}
```

## Storage

Global SQLite database at `~/.pi/brainiac/brainiac.db`. Uses FTS5 for full-text search with porter stemming. Vector search ready (Phase 2).

## License

MIT
npm package: @marcfargas/pi-safety
Description: Safety classification registry for pi agent tool calls — glob-based READ/WRITE command matching
Author: Marc Fargas
Latest version: 0.1.1

# @marcfargas/pi-safety

Safety classification registry for pi agent tool calls.

Provides glob-based command pattern matching to classify bash commands as `READ` (safe, no side effects) or `WRITE` (requires approval/planning).

## Usage

```typescript
import { SafetyRegistry, globMatch } from "@marcfargas/pi-safety";

const registry = new SafetyRegistry();

// Register safety patterns from a skill
// Tool name is the CLI name; patterns can include runner prefixes (npx, node, etc.)
registry.register("go-gmail", {
  "npx go-gmail * search *": "READ",
  "npx go-gmail * get *": "READ",
  "npx go-gmail * send *": "WRITE",
  "npx go-gmail * draft *": "WRITE",
}, "WRITE");

// Resolve a command
registry.resolve("npx go-gmail marc@example.com search 'invoice'");
// → "READ"

registry.resolve("npx go-gmail marc@example.com send --to bob@example.com");
// → "WRITE"

registry.resolve("curl https://example.com");
// → null (no matching registry entry)
```

### Pattern Validation

Patterns must start with the tool name, optionally preceded by a runner prefix:

```typescript
// ✅ Valid patterns for tool "go-gmail"
"go-gmail * search *"         // direct invocation
"npx go-gmail * search *"    // npx runner prefix

// ✅ Valid patterns for tool "gcloud"
"gcloud * list *"             // direct invocation

// ❌ Rejected patterns
"* search *"                  // wildcard before tool name
"search go-gmail"             // tool name not at start
```

Supported runner prefixes: `npx`, `node`, `python`, `python3`, `deno`, `bun`, `ruby`, `java`, `dotnet`.

## API

### `SafetyRegistry`

- `register(tool, commands, defaultLevel?)` — Register command patterns for a tool
- `resolve(command)` — Resolve a command to READ/WRITE/null
- `inspect()` — List registered tools
- `inspectTool(tool)` — Get patterns for a tool
- `size` — Number of registered tools
- `clear()` — Clear all entries

### `globMatch(pattern, command)`

Match a glob pattern against a command string. `*` matches any sequence of characters.

### Types

- `SafetyLevel` — `"READ" | "WRITE"`
- `SafetyEntry` — `{ commands: Array<{pattern, level}>, default: SafetyLevel }`
npm package: @march_ts/knex-clickhouse-dialect
Description: credit to Anatolii Lebedev the previous developer of this library
Author: Thanapat Saisoontonwattana
Latest version: 1.1.1

# Knex ClickHouse dialect

ClickHouse dialect for Knex.js

## Install

```bash
npm install @march_ts/knex-clickhouse-dialect
```

## Usage

```js
import knex from 'knex';
import clickhouse from '@march_ts/knex-clickhouse-dialect';

export default knex({
    client: clickhouse,
    connection: () => {
        return 'clickhouse://login:password@localhost:8123/db_name';
    },
    // optional migrations config
    migrations: {
        directory: 'migrations_clickhouse',
        disableTransactions: true,
        disableMigrationsListValidation: true,
    },
});
```

## Migration

Currently the migration default enging is MergeTree. If you want to use other enging, you can use the `table.engine` function to change the enging.

## Warning 

- MergeTree Family Enging need to have a primary key, the primary can be assing using `table.primary` function, or can be assign in column using .primary() function or else default is "id" column.

### MergeTree Family Enging
- on update data, please note that the primary key is immutable, DO NOT put primary key into entity for update data. or use insert then optimize table.



## Testing Compatibility

### Enging Migration

MergeTree

-   [x] MergeTree
-   [ ] ReplacingMergeTree,
-   [ ] SummingMergeTree
-   [ ] AggregatingMergeTree
-   [ ] VersionedCollapsingMergeTree
-   [ ] CollapsingMergeTree

Log

-   [ ] TinyLog
-   [ ] StripeLog
-   [ ] Log

Others Enging

-   [ ] Memory
-   [ ] Distributed
-   [ ] View, MaterializedView
-   [ ] Dictionary
-   [ ] File, URL
-   [ ] Buffer
-   [ ] Kafka, RabbitMQ
-   [ ] ODBC, JDBC, MySQL, PostgreSQL, HDFS
npm package: @marchaos/jest-environment-happy-dom
Description: Use Happy DOM as environment in Jest.
Author: David Ortner
Latest version: 20.0.12

![Happy DOM Logo](https://github.com/capricorn86/happy-dom/raw/master/docs/happy-dom-logo.jpg)

This package makes it possible to use [Happy DOM](https://github.com/capricorn86/happy-dom) with [Jest](https://jestjs.io/).

## Installation

```bash
npm install @jest/environment @jest/fake-timers @jest/types @jest/mock @jest/util @happy-dom/jest-environment --save-dev
```

## Documentation

You will find the documentation in the [Happy DOM Wiki](https://github.com/capricorn86/happy-dom/wiki) under [Jest Environment](https://github.com/capricorn86/happy-dom/wiki/Jest-Environment).

## Setup

Jest uses `node` as test environment by default. In order to tell Jest to use a different environment we will either have to set a CLI attribute, define it in "package.json" or add a property to your Jest config file.

### CLI

When calling the "jest" command, add `--env=@happy-dom/jest-environment` as an attribute.

```bash
jest --env=@happy-dom/jest-environment
```

### Package.json

It is possible to add your Jest config to your `package.json`.

```json
{
  "jest": {
    "testEnvironment": "@happy-dom/jest-environment"
  }
}
```

### Jest Config File

When using a Jest config file (usually jest.config.js), add the snippet below to it.

```json
{
  "testEnvironment": "@happy-dom/jest-environment"
}
```

## Options

It is possible to send in Happy DOM [Browser Settings](https://github.com/capricorn86/happy-dom/wiki/IOptionalBrowserSettings) as environment options to [Jest](https://jestjs.io/).

```json
{
  "testEnvironment": "@happy-dom/jest-environment",
  "testEnvironmentOptions": {
    "url": "http://localhost",
    "width": 1920,
    "height": 1080,
    "settings": {
      "navigator": {
         "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
      }
    }
  }
}
```

## Happy DOM

[Documentation](https://github.com/capricorn86/happy-dom/wiki/) | [Getting Started](https://github.com/capricorn86/happy-dom/wiki/Getting-started) | [Setup as Test Environment](https://github.com/capricorn86/happy-dom/wiki/Setup-as-Test-Environment) | [GitHub](https://github.com/capricorn86/happy-dom/)