open-index/open-npm huggingface dataset:
npm package: @octoris/body-parser
Description: A body parser middleware for octoris
Author: Dustin Hershman
Latest version: 0.1.2

# body-parser

A body parser middleware for octoris

## Install

```cli
npm i @octoris/body-parser
```

## json(opts)

The json parser for handling json payloads

### Options

- `strict`: when set to true, JSON parser will only accept arrays and objects; when false will accept anything JSON.parse accepts. Defaults to true. (also strict mode will always return an object)
- `limit`: Number or string representing the request size limit. Defaults to `1mb`
- `encoding`: The content encoding type. Defaults to `utf8`

### Usage

```js
const { router, response, methods} = require('octoris')
const { json } = require('@octoris/body-parser')

function handler () {
  return new Promise(resolve => send(200, 'Okay!'))
}

const home = router.route([router.fixed('/')], [methods.GET(handler)])

router.composeRoutes({}, [home], [json()])
```

## form(opts)

Form parser for handling url-encoded form payloads

### Options

- `queryString`: An options object that is passed directly to the [qs](https://github.com/ljharb/qs) module
- `limit`: A number or string representing the request size limit. Defaults to `56kb`
- `qs`: The querystring function you'd like to use. Defaults to `qs`
- `encoding`: The content encoding type. Defaults to `utf8`

### Usage

```js
const { router, response, methods} = require('octoris')
const { form } = require('@octoris/body-parser')

function handler () {
  return new Promise(resolve => send(200, 'Okay!'))
}

const home = router.route([router.fixed('/')], [methods.GET(handler)])

router.composeRoutes({}, [home], [form()])
```
npm package: @octoris/static
Description: A static serve middleware for octoris
Author: Dustin Hershman
Latest version: 0.1.2

# serve-static

A static serve middleware for octoris

## Install

```cli
npm i @octoris/static
```

## Arguments

- loc: `String` - The directory containing static files you want to watch. (Directory must start at root level of app)
- opts: `Object` - Some optional options that can be provided to the middleware

## Options

- encoding: `String` - The encoding type you want to be given to `.end`

## Usage

The static middleware is meant to be used with the `composeRoutes` function for global stage listening.

```js
const { router, response, methods} = require('octoris')
const serve = require('@octoris/static')

function handler () {
  return new Promise(resolve => send(200, 'Okay!'))
}

const home = router.route([router.fixed('/')], [methods.GET(handler)])

router.composeRoutes({}, [home], [serve('public')])
```
npm package: @octostar/platform-react
Description: Base react components and hooks for the Octostar platform
Latest version: 0.5.45

# Octostar platform react components and hooks

## Quick Start

Wrap your app with `OctostarContextProvider` and use the provided hooks and components:

```tsx
import { OctostarContextProvider, OsDropzone, useOctostarContext } from '@octostar/platform-react';
import type { Entity } from '@octostar/platform-types';

function MyComponent() {
  const { DesktopAPI } = useOctostarContext();

  const handleDrop = (entities: Entity[]) => {
    console.log('Dropped entities:', entities);
    // Use DesktopAPI to interact with Octostar
    // e.g., DesktopAPI.open(entity)
  };

  return (
    <OsDropzone
      accept={{ entities: true }}
      onDropEntities={handleDrop}
      texts={{
        idle: 'Drop Octostar records here',
        active: 'Release to drop records',
      }}
    />
  );
}

function App() {
  return (
    <OctostarContextProvider>
      <MyComponent />
    </OctostarContextProvider>
  );
}
```

## Examples

Complete working examples are available in the [`examples`](./examples) directory:

- **[Dropzone Example](./examples/dropzone)** - Demonstrates using OsDropzone to accept records and display them with OsContextMenu

To run an example:

```bash
cd examples/dropzone
pnpm install
pnpm dev
```

Visit http://localhost:3100 to see the example in action.
npm package: @octostar/ui
Description: <h1 align="center">Octostar Ui Library</h1>
Latest version: 0.2.13

<h1 align="center">Octostar Ui Library</h1>

<div align="center">
  <p>
    A React UI library by Octostar.
  </p>
  <img src="https://img.shields.io/github/license/boilertown/react-ui-boilerplate?style=flat-square" alt="MIT license" >
</div>

# Contributing

## The Setup

- [React v18][react-url]
- [TypeScript][typescript-url]
- UI development with [Storybook][storybook-url]
- Unit test with [Testing-library][testing-library-url]
- Linting with [Eslint][eslint-url] and code formatting with [Prettier][prettier-url]
- Conventional commit messages with [Commitlint][commitlint-url]
- Build the library with [Rollup][rollup-url]
- Automated release with [changesets][changesets-url]

## Development

- Install correct version of npm (from .nvmrc) and pnpm:

  ```sh
  nvm use
  npm install -g pnpm@9.12.3
  ```

- Install dependencies:

  ```sh
  pnpm install
  ```

- Build the library:

  ```sh
  pnpm build
  ```

- Run storybook:

  ```sh
  pnpm storybook
  ```

- Unit test component with:

  ```sh
  pnpm test
  ```

- [Creating commit messages](https://github.com/conventional-changelog/commitlint/#what-is-commitlint)

- Create changeset:

  ```sh
  pnpm changeset
  ```

## Release & Publish package

This repo uses [changesets][changesets-url] to automatically generate `CHANGELOG`, create releases and publish to NPM registry via GitHub Actions. You can see action details at [release.yml](/.github/workflows//release.yml).

To automating publish this library, follow these steps:

- Create a `NPM_PUBLISH_TOKEN`. [See this article for more details](https://docs.npmjs.com/creating-and-viewing-access-tokens). Make sure the type of access token is **Automation**.

- [Follow this instruction](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository) to add the created token to your GitHub Actions secrets. Name of the secret is `NPM_PUBLISH_TOKEN`.

- Install [changeset bot](https://github.com/apps/changeset-bot).

- [Adding changeset and commit](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md#i-am-in-a-single-package-repository).

**P/S**: Remember to check the `Allow GitHub Actions to create and approve pull requests` in your repo Settings > Actions > General & scroll to Workflow permissions.

[react-url]: https://beta.reactjs.org
[typescript-url]: https://www.typescriptlang.org
[storybook-url]: https://storybook.js.org
[eslint-url]: https://eslint.org
[commitlint-url]: https://github.com/conventional-changelog/commitlint
[prettier-url]: https://prettier.io
[testing-library-url]: https://testing-library.com
[rollup-url]: https://rollupjs.org
[changesets-url]: https://github.com/changesets/changesets
npm package: @octotask/pino
Description: formats pino logs and sends errors to Sentry
Latest version: 2.5.1

# `@octotask/pino`

> formats [pino](https://github.com/pinojs/pino) logs and sends errors to [Sentry](https://sentry.io)

## About

`@octotask/pino` is currently built into `octotask`, you don't need to manually pipe octotask's logs into it. It will be easy to move it out of `octotask` in future though, and give people a simple way to recover the logging behavior if they wish, or to replace it with another [pino transport](https://getpino.io/#/docs/transports)

## CLI Usage

```
node my-script.js | pino-octotask
```

You can test the environment variables by setting them inline

```
node my-script.js | LOG_FORMAT=json pino-octotask
```

## Programmatic usage

`@octotask/pino` exports a `getTransformStream()` method which can be passed as 2nd argument to `pino()`

```js
import pino from "pino";
import { getTransformStream } from "@octotask/pino";

const log = pino(
  {
    name: "octotask",
  },
  getTransformStream()
);
```

This won't log anything to stdout though. In order to pass the formatted logs back to stdout, do the following

```js
import pino from "pino";
import { getTransformStream } from "@octotask/pino";

const transform = getTransformStream();
transform.pipe(pino.destination(1));
const log = pino(
  {
    name: "octotask",
  },
  transform
);
```

With custom options:

```js
const transform = getTransformStream({
  logFormat: "json",
  logLevelInString: true,
  sentryDsn: "http://username@example.com/1234",
});
```

### Options

The `pino-octotask` binary can be configured using environment variables, while the `getTransformStream()` accepts an object with according keys

| Environment Varibale  | Option             | Description                                                                                                                                                                                              |
| --------------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `LOG_FORMAT`          | `logFormat`        | Set to `pretty` or `json`. When set to `pretty`, logs are formatted for human readability. Setting to `json` logs using JSON objects. Defaults to `pretty`                                               |
| `LOG_LEVEL_IN_STRING` | `logLevelInString` | By default, when using the `json` format, the level printed in the log records is an int (`10`, `20`, ..). This option tells the logger to print level as a string: `{"level": "info"}`. Default `false` |
| `SENTRY_DSN`          | `sentryDsn`        | Set to a [Sentry](https://sentry.io/) DSN to report all errors thrown by your app. <p>_(Example: `https://1234abcd@sentry.io/12345`)_</p>                                                                |

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md)

## License

[ISC](LICENSE)
npm package: @octoweb/config
Description: @octoweb/config is an Angular friendly module than give you a better abstraction, security and maintainability of the environment config and its uses.
Author: Fabien Gues
Latest version: 1.0.7

#### Description

@octoweb/config is an Angular friendly module than give you a better abstraction, security and maintainability of the environment config and its uses.

**Abstraction**
Use ConfigService to get access to the environment properties.

**Security and maintainability**
Using [Joi](https://joi.dev) you should be able to validate your environment file. If environment doesn't match with the schema, it will throw an error.

#### Details

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.0.5.

It was build with:

- "@angular/common": "^12.0.5"
- "@angular/core": "^12.0.5"
- "joi": "^17.4.0"


#### Get started

`yarn add @octoweb/config` or `npm i @octoweb/config`

#### Example

*app.module.ts*
```
@NgModule({
  ...
  imports: [
    ...,
    ConfigModule.forRoot<IEnvironment>({
      config: environment,
      schema: configSchema,
    })
    ...
  ],
  ...
})
export class AppModule { }
```

config.schema.ts
```
export const configSchema: joi.ObjectSchema = joi.object({
  apiUrl: joi.when('production', { is: false, then: joi.string().required() }),
  production: joi.boolean().default(false).required(),
});
```

app.component.ts
```
import { ConfigService } from '@octoweb/config';

@Component({...})
export class AppComponent {
  ...
  constructor(private readonly configService: ConfigService) {}

  public ngOnInit(): void {
    this.configService.get<string>('apiUrl'); // Return apiUrl
    this.configService.getAll<IEnvironment>(); // Return all environment
  }
  ...
}
```
npm package: @octra/annotation
Description: library containing annotation related classes and functions used by OCTRA (e.g. file converters)
Author: Julian Poemp
Latest version: 1.3.6

# @octra/annotation <a href="https://www.npmjs.com/package/@octra/annotation"><img alt="npm" src="https://img.shields.io/npm/v/@octra/annotation"></a>

This library offers all annotation related classes and functions used by Octra. It uses AnnotJSON file format as base
model. Here you can also find all Annotation converters used by [Octra](https://github.com/IPS-LMU/octra).

## Installation

### ESM, CJS, TS definitions & UMD (optional)

```shell
npm install --save @octra/annotation
```

### UMD Bundle (for Vanilla JS)

You have two options to install this package und use it as UMD:

a) Install via NPM and reference local files (no internet connection needed om production).

```html
<script type="application/javascript" src="node_modules/@octra/annotation/index.umd.js"></script>
```

b) Reference remote file (internet connection needed on production).

```html
<script type="application/javascript" src="https://unpkg.com/@octra/annotation/index.umd.js"></script>
```

[See full example here](https://github.com/IPS-LMU/octra/blob/main/apps/web-components-demo/index.html)

## Use

### Import

#### ESM, Typescript

Import the classes and functions from `@octra/annotation`. For example

```typescript
import { Level } from '@octra/annotation';

const annotation = new OctraAnnotation();
const level = annotation.addLevel(new OctraAnnotation.createSegmentLevel('OCTRA_1'));
annotation.addItemToCurrentLevel(new SampleUnit(123456, 22050), [new OLabel('OCTRA_1', 'hello world')]);
```

#### UMD Bundle

All functions and classes are available via global scope `OctraAnnotation`. For example:

```javascript
/*
make sure that you have injected the umd bundle as described before.
 */
const annotation = new OctraAnnotation.OctraAnnotation();
const level = annotation.addLevel(new OctraAnnotation.OctraAnnotation.createSegmentLevel('OCTRA_1'));
annotation.addItemToCurrentLevel(new OctraAnnotation.SampleUnit(123456, 22050), [new OctraAnnotation.OLabel('OCTRA_1', 'hello world')]);
```

### API

You can find more information about classes and functions of `@octra/annotation` [here](https://ips-lmu.github.io/octra/modules/_octra_annotation.html).

### Changelog

[Go to changelog](https://github.com/IPS-LMU/octra/blob/main/libs/annotation/CHANGELOG.md)
npm package: @octra/assets
Description: This library contains assets like JSON schema definitions related to OCTRA.
Author: Julian Poemp
Latest version: 1.1.0

# @octra/assets <a href="https://www.npmjs.com/package/@octra/assets"><img alt="npm" src="https://img.shields.io/npm/v/@octra/assets"></a>

This library contains assets like JSON schema definitions.

## Installation

### ESM, CJS, TS definitions & UMD (optional)

```shell
npm install --save @octra/assets
```

### UMD Bundle (for Vanilla JS)

You have two options to install this package und use it as UMD:

a) Install via NPM and reference local files (no internet connection needed om production).

```html
<script type="application/javascript" src="node_modules/@octra/assets/index.umd.js"></script>
```

b) Reference remote file (internet connection needed on production).

```html
<script type="application/javascript" src="https://unpkg.com/@octra/assets/index.umd.js"></script>
```

[See full example here](https://github.com/IPS-LMU/octra/tree/main/apps/web-components-demo)

## Use

### Import

#### ESM, Typescript

Import the classes and functions from `@octra/assets`. For example

```typescript
import { OctraGuidelinesJSONSchema } from '@octra/assets';
```

#### UMD Bundle

All functions and classes are available via global scope `OctraAssets`. For example:

```javascript
/*
make sure that you have injected the umd bundle as described before.
 */
const guidelinesJSONSchema = OctraAssets.OctraGuidelinesJSONSchema;
```

### API

You can find more information about classes and functions of `@octra/assets` [here](https://ips-lmu.github.io/octra/modules/_octra_assets.html).
npm package: @octra/media
Description: This library offers classes that describes data related to media (e.g. SampleUnit class that describes one point in time of type sample with conversions to other time units) used by [Octra](https://github.com/IPS-LMU/octra).
If you are looking for decodin
Author: Julian Poemp
Latest version: 1.0.0

# @octra/media <a href="https://www.npmjs.com/package/@octra/media"><img alt="npm" src="https://img.shields.io/npm/v/@octra/media"></a>

This library offers classes that describes data related to media (e.g. SampleUnit class that describes one point in time of type sample with conversions to other time units) used by [Octra](https://github.com/IPS-LMU/octra).
If you are looking for decoding and playback of audio files see @octra/web-media library.

## Installation

### ESM, CJS, TS definitions & UMD (optional)

```shell
npm install --save @octra/media
```

### UMD Bundle (for Vanilla JS)

You have two options to install this package und use it as UMD:

a) Install via NPM and reference local files (no internet connection needed om production).

```html
<script type="application/javascript" src="node_modules/@octra/media/index.umd.js"></script>
```

b) Reference remote file (internet connection needed on production).

```html
<script type="application/javascript" src="https://unpkg.com/@octra/media/index.umd.js"></script>
```

[See full example here](https://github.com/IPS-LMU/octra/blob/main/apps/web-components-demo/index.html)

## Use

### Import

#### ESM, Typescript

Import the classes and functions from `@octra/media`. For example

```typescript
import { SampleUnit } from '@octra/media';

const unit = new SampleUnit(123123, 22100);
```

#### UMD Bundle

All functions and classes are available via global scope `OctraMedia`. For example:

```javascript
/*
make sure that you have injected the umd bundle as described before.
 */
const validator = new OctraMedia.SampleUnit(123123, 22100);
```

### API

You can find more information about classes and functions of `@octra/media` [here](https://ips-lmu.github.io/octra/modules/_octra_media.html).

### Changelog

[Go to changelog](https://github.com/IPS-LMU/octra/blob/main/libs/media/CHANGELOG.md)
npm package: @octra/ngx-components
Description: library with a list of components created for OCTRA
Author: Julian Poemp
Latest version: 1.8.1

# @octra/ngx-components <a href="https://www.npmjs.com/package/@octra/ngx-components"><img alt="npm" src="https://img.shields.io/npm/v/@octra/ngx-components"></a>

This library offers all annotation related classes and functions used by Octra. It uses AnnotJSON file format as base
model. Here you can also find all Annotation converters used by [Octra](https://github.com/IPS-LMU/octra).

## Installation

1. Install @octra/ngx-components with dependencies

```shell
npm install --save @octra/ngx-components
```

2. Add OctraComponentsModule to imports of your app.module.

### Changelog

[Go to changelog](https://github.com/IPS-LMU/octra/blob/main/libs/ngx-components/CHANGELOG.md)
npm package: @octra/ngx-utilities
Description: Angular utilities used in OCTRA projects
Author: Julian Poemp
Latest version: 1.0.2

# @octra/ngx-utilities <a href="https://www.npmjs.com/package/@octra/ngx-utilities"><img alt="npm" src="https://img.shields.io/npm/v/@octra/ngx-utilities"></a>

This library angular related classes like pipes used by [Octra](https://github.com/IPS-LMU/octra).

## Installation

1. Install @octra/ngx-utilities with dependencies

```shell
npm install --save @octra/ngx-utilities
```

2. Add OctraUtilitiesModule to imports of your app.module.

### Changelog

[Go to changelog](https://github.com/IPS-LMU/octra/blob/main/libs/ngx-utilities/CHANGELOG.md)
npm package: @octra/utilities
Description: This library offers JS functions and classes to make some parts of app development easier. This library is used by [Octra](https://github.com/IPS-LMU/octra) and Octra-Backend.
Author: Julian Poemp
Latest version: 2.0.0

# @octra/utilities <a href="https://www.npmjs.com/package/@octra/utilities"><img alt="npm" src="https://img.shields.io/npm/v/@octra/utilities"></a>

This library offers JS functions and classes to make some parts of app development easier. This library is used by [Octra](https://github.com/IPS-LMU/octra) and Octra-Backend.

## Installation

### ESM, CJS, TS definitions & UMD (optional)

```shell
npm install --save @octra/utilities
```

### UMD Bundle (for Vanilla JS)

You have two options to install this package und use it as UMD:

a) Install via NPM and reference local files (no internet connection needed on production).

```html
<script type="application/javascript" src="node_modules/@octra/utilities/index.umd.js"></script>
```

b) Reference remote file (internet connection needed on production).

```html
<script type="application/javascript" src="https://unpkg.com/@octra/utilities/index.umd.js"></script>
```

[See full example here](https://github.com/IPS-LMU/octra/blob/main/apps/web-components-demo/index.html)

## Use

### Import

#### ESM, Typescript

Import the classes and functions from `@octra/utilities`. For example

```typescript
import { getFileSize } from '@octra/utilities';
```

#### UMD Bundle

All functions and classes are available via global scope `OctraUtilities`. For example:

```javascript
/*
make sure that you have injected the umd bundle as described before.
 */
const bytes = 738246364782;
const sizeInMb = OctraUtilities.getFileSize(bytes);
```

### API

You can find more information about classes and functions of `@octra/utilities` [here](https://ips-lmu.github.io/octra/modules/_octra_utilities.html).

### Changelog

[Go to changelog](https://github.com/IPS-LMU/octra/blob/main/libs/utilities/CHANGELOG.md)
npm package: @octra/web-media
Description: This library offers classes and functions for handling audio files in web browsers (e.g. chunked decoding etc.) used by [Octra](https://github.com/IPS-LMU/octra).
Author: Julian Poemp
Latest version: 2.0.0

# @octra/web-media <a href="https://www.npmjs.com/package/@octra/web-media"><img alt="npm" src="https://img.shields.io/npm/v/@octra/web-media"></a>

This library offers classes and functions for handling audio files in web browsers (e.g. chunked decoding etc.) used by [Octra](https://github.com/IPS-LMU/octra).

## Installation

### ESM, CJS, TS definitions & UMD (optional)

```shell
npm install --save @octra/web-media
```

### UMD Bundle (for Vanilla JS)

You have two options to install this package und use it as UMD:

a) Install via NPM and reference local files (no internet connection needed om production).

```html
<script type="application/javascript" src="node_modules/@octra/web-media/index.js"></script>
```

b) Reference remote file (internet connection needed on production).

```html
<script type="application/javascript" src="https://unpkg.com/@octra/web-media/index.umd.js"></script>
```

[See full example here](https://github.com/IPS-LMU/octra/blob/main/apps/web-components-demo/index.html)

## Use

### Import

#### ESM, Typescript

Import the classes and functions from `@octra/web-media`. For example

```typescript
import { SampleUnit } from '@octra/web-media';

const unit = new SampleUnit(123123, 22100);
```

#### UMD Bundle

All functions and classes are available via global scope `OctraWebMedia`. For example:

```javascript
/*
make sure that you have injected the umd bundle as described before.
 */
const validator = new OctraWebMedia.SampleUnit(123123, 22100);
```

### API

You can find more information about classes and functions of `@octra/web-media` [here](https://ips-lmu.github.io/octra/modules/_octra_web_media.html).

### Changelog

[Go to changelog](https://github.com/IPS-LMU/octra/blob/main/libs/web-media/CHANGELOG.md)