open-index/open-npm huggingface dataset:
npm package: @neuledge/scalars
Description: Scalar definitions for Neuledge Engine
Latest version: 0.3.2

# Neuledge Scalars

A set of [Neuledge Engine](https://github.com/neuledge/engine-js) scalars that can be used on the schema definition.

This library is not intended to be used directly. It is a dependency of the [main package](https://www.npmjs.com/package/@neuledge/engine).

## 📦 Installation

```bash
npm install @neuledge/scalars
```

## 🚀 Getting started

```ts
import { Integer, String, DateTime } from '@neuledge/scalars';

// define the state scalars
const stateScalars = {
  id: { type: Integer, index: 1 },
  name: { type: String, index: 2 },
  description: { type: String, index: 3, nullable: true },
};

// validate a scalar value
const value: ScalarValue<typeof DateTime> = DateTime.encode(
  new Date('2020-01-01'),
); // 1577836800000

// decode a scalar value
const decodedValue: DateTime = DateTime.decode(value); // Date('2020-01-01')
```

## 📄 License

Neuledge is [Apache 2.0 licensed](https://github.com/neuledge/engine-js/blob/main/LICENSE).
npm package: @neuledge/states
Description: Neuledge Engine internal state management and context
Latest version: 0.2.1

# Neuledge States

An internal context and state management library for [Neuledge Engine](https://github.com/neuledge/engine-js).

This library is not intended to be used directly. It is a dependency of the [main package](https://www.npmjs.com/package/@neuledge/engine).

## 📦 Installation

```bash
npm install @neuledge/states
```

## 🚀 Getting started

```states
import { StatesContext } from '@neuledge/states';
import { promises as fs } from 'fs';

const ctx = new StatesContext();

// load a state file
await ctx.load([{
  source: await fs.readFile('posts.states', { encoding: 'utf8' }),
  filePath: 'posts.states',
}]);

for (const state of ctx.states) {
  // do something with the state
}
```

## 📄 License

Neuledge is [Apache 2.0 licensed](https://github.com/neuledge/engine-js/blob/main/LICENSE).
npm package: @neuledge/states-cli
Description: Neuledge Engine states CLI for parsing and converting *.states files
Latest version: 0.1.4

# Neuledge States CLI

A CLI tool for [Neuledge Engine](https://github.com/neuledge/engine-js) that can be used to generate TypeScript code from state files.

## 📦 Installation

```bash
npm install @neuledge/states-cli --save-dev
```

## 🚀 Getting started

Add the following script to your `package.json`:

```json
{
  "scripts": {
    "generate:states": "states --output \"src/states.codegen.ts\" \"states/*.states\""
  }
}
```

Then, run the following command:

```bash
npm run generate:states
```

For more information, please refer to the [main repository](https://github.com/neuledge/engine-js).

## 📄 License

Neuledge is [Apache 2.0 licensed](https://github.com/neuledge/engine-js/blob/main/LICENSE).
npm package: @neuledge/states-parser
Description: A parser for the Neuledge States language
Latest version: 0.1.2

# Neuledge States Parser

An state parser for [Neuledge Engine](https://github.com/neuledge/engine-js) state language.

This library is not intended to be used directly. It is a dependency of the [main package](https://www.npmjs.com/package/@neuledge/engine).

## 📦 Installation

```bash
npm install @neuledge/states-parser
```

## 🚀 Getting started

```states
import { parseStates } from '@neuledge/states-parser';

// parse a state file and return a document node
const doc = parseStates(`
  state Post {
    id: Integer;
    title: String;
    content: String;
    createdAt: DateTime;
    updatedAt: DateTime;
  }
`);
```

## 📄 License

Neuledge is [Apache 2.0 licensed](https://github.com/neuledge/engine-js/blob/main/LICENSE).
npm package: @neuledge/store
Description: Neuledge Store abstract interface for Neuledge Engine
Latest version: 0.2.2

# Neuledge Store

An abstract store interface for [Neuledge Engine](https://github.com/neuledge/engine-js) in order to support different database implementations.

This library is not intended to be used directly. It is a dependency of the [main package](https://www.npmjs.com/package/@neuledge/engine).

## 📦 Installation

```bash
npm install @neuledge/states
```

## 🚀 Getting started

```ts
import { Store } from '@neuledge/store';

export class MyStore implements Store {
  // implement the store interface
}
```

## 📄 License

Neuledge is [Apache 2.0 licensed](https://github.com/neuledge/engine-js/blob/main/LICENSE).