open-index/open-npm huggingface dataset:
npm package: @tailor-platform/dev-config
Description: Common package that hosts the rules for ESLint, Prettier and TypeScript.
Latest version: 1.0.0-alpha.2
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

Tailor's base configurations for ESLint, Prettier and Typescript.

## Installation

```bash
npm install -D @tailor-platform/dev-config
```

If you are using pnpm:

```bash
pnpm install -D @tailor-platform/dev-config@latest
```

## Usage

### Prettier

Add the following in your `package.json`:

```jsonc
{
  // ...
  "prettier": "@tailor-platform/dev-config/prettier",
}
```

See [sharing configuration](https://prettier.io/docs/en/configuration#sharing-configurations) for more details.

### ESLint

Add the following line in your `.eslintrc.js` file to extend the rules from `@tailor-platform/dev-config/eslint`:

```js
module.exports = {
  ...require("@tailor-platform/dev-config/eslint"),
};
```

### Typescript

Add the following in your `tsconfig.json`:

```jsonc
{
  "extends": "@tailor-platform/dev-config/typescript/nextjs",
}
```

### Overriding configuration

```js
module.exports = {
  ...require("@tailor-platform/dev-config/prettier"),
  // your overrides here
};
```
npm package: @tailor-platform/function-kysely-tailordb
Description: Kysely dialect for TailorDB
Latest version: 0.1.3

> This is not an experimental package. but it is ready for production use.

# @tailor-platform/function-kysely-tailordb

[Kysely](https://github.com/kysely-org/kysely) dialect for TailorDB

## Usage

We recommend installing [@tailor-platform/function-types](https://www.npmjs.com/package/@tailor-platform/function-types) along with @tailor-platform/function-kysely-tailordb, as you’ll need these types to use the dialect effectively.

```sh
npm install -D @tailor-platform/function-types
npm install @tailor-platform/function-kysely-tailordb
```

```typescript
import { Kysely } from 'kysely';
import { TailordbDialect } from '@tailor-platform/function-kysely-tailordb';

const client = new tailordb.Client({
  namespace: '<tailordb namespace>',
});

const db = new Kysely<Database>({
  dialect: new TailordbDialect(client),
});
```
npm package: @tailor-platform/function-kysely-tailordb-codegen
Description: Generate Kysely code for TailorDB
Latest version: 0.1.3

> This is not an experimental package. but it is ready for production use.

# @tailor-platform/function-kysely-tailordb-codegen

Generate [Kysely](https://github.com/kysely-org/kysely) code for TailorDB

## Usage

```sh
npm install -D @tailor-platform/function-kysely-tailordb-codegen
npx kysely-tailordb-codegen -h
```

```
Usage: kysely-tailordb-codegen [options]

Generate Kysely code for TailorDB

Options:
  -a, --app <string>          App name
  -n, --namespace <string>    TailorDB namespace
  -m, --machineuser <string>  Machine user name
  -o, --output <string>       Output file name
  -h, --help                  display help for command
```

## Requirements

This command uses `tailorctl` internally to run the code generation script on the Tailor Platform.
Therefore, please make sure `tailorctl` is installed and the correct workspace is selected before running the command.
npm package: @tailor-platform/function-logger
Description: Simple logger utility for Tailor applications
Latest version: 0.1.2

# @tailor-platform/function-logger

Simple logger utility for Tailor Function applications.

## Installation

```bash
npm install @tailor-platform/function-logger
```

## Usage

```typescript
import logger from '@tailor-platform/function-logger';

// Log messages at different levels
logger.debug('Debug message', { extra: 'data' });
logger.info('Info message');
logger.warn('Warning message');
logger.error('Error message', new Error('Something went wrong'));
```

## API

The logger provides four log levels:

- `debug`: For detailed debugging information
- `info`: For general informational messages
- `warn`: For warning messages
- `error`: For error messages

Each method accepts a message string and optional additional arguments that will be logged.

## Building

```bash
npm run build
```
npm package: @tailor-platform/function-typeorm-tailordb-codegen
Description: Generate TypeORM code for TailorDB
Latest version: 0.1.1

# @tailor-platform/function-typeorm-tailordb-codegen

Generate TypeORM entity code for TailorDB

## Usage

```sh
# npm
npm install -D @tailor-platform/function-typeorm-tailordb-codegen
npx typeorm-tailordb-codegen -h

# pnpm
pnpm add -D @tailor-platform/function-typeorm-tailordb-codegen
pnpm exec typeorm-tailordb-codegen -h
```

```
Usage: typeorm-tailordb-codegen [options]

Generate TypeORM entity code for TailorDB

Options:
  -a, --app <string>          App name
  -n, --namespace <string>    TailorDB namespace
  -m, --machineuser <string>  Machine user name
  -o, --output <string>       Output file name
  -h, --help                  display help for command
```

## Requirements

This command uses `tailorctl` internally to run the generation script on the Tailor Platform. Make sure `tailorctl` is installed and workspace is selected.

## Workflow (no schema sync/migrations)

- TailorDB is the source of truth for schema. TypeORM schema sync (`synchronize`) and migrations are not supported in this integration.
- Use this codegen to regenerate entity classes from TailorDB whenever the schema changes.
- Commit the generated files to your repository and import them where needed.

Example:

```sh
npx typeorm-tailordb-codegen -a <app> -n <namespace> -m <machineuser> -o src/entities.ts
```

Then in your code:

```ts
import * as Entities from './entities';
// or import specific classes: import { App_Users } from './entities';
```

## Notes

- Primary keys cannot be determined from the available metadata used here. The generator will mark a column named `id` as the primary key by convention, and will use `@PrimaryGeneratedColumn` if the column is auto-incrementing. Please adjust as needed for your schema.
- Column types are inferred from TailorDB’s Postgres-like data types and passed through to TypeORM.

## Using @tailor-platform/function-types

If you write code that runs in the Tailor Platform Function environment (for example, custom scripts that use the global `tailordb` client), install the types package so TypeScript recognizes the globals.

1) Install as a dev dependency

```sh
npm install -D @tailor-platform/function-types
```

2) Tell TypeScript to include the ambient types in your `tsconfig.json`

```json
{
  "compilerOptions": {
    "types": ["@tailor-platform/function-types"]
  }
}
```

You can then use the global `tailordb.Client` with type safety in your scripts.
npm package: @tailor-platform/function-types
Description: TypeScript types for Tailor Platform Function service
Latest version: 0.8.4

# @tailor-platform/function-types

## Usage

Install package.
```sh
npm i -D @tailor-platform/function-types
```

Add types to `tsconfig.json`.
```
{
  ...
  "compilerOptions": {
    ...
    "types": ["@tailor-platform/function-types"]
  }
}
```
npm package: @tailor_pvp/api
Description: If you want to use nexrender API from browser/nodejs env you can use this module, instead of manually sending HTTP requests.
Author: tailor
Latest version: 1.45.4

# API

If you want to use nexrender API from browser/nodejs env you can use this module, instead of manually sending HTTP requests.

## Installation

```sh
npm install @nexrender/api --save
```

## Usage

```js
const { createClient } = require('@nexrender/api')

const client = createClient({
    host: 'http://my.server.com:3050',
    secret: 'myapisecret',
    polling: 3000, // fetch udpates every 3000ms
})

const main = async () => {
    const result = await client.addJob({
        template: {
            src: 'http://my.server.com/assets/project.aep',
            composition: 'main',
        }
    })

    result.on('created', job => console.log('project has been created'))
    result.on('started', job => console.log('project rendering started'))
    result.on('progress', (job, percents) => console.log('project is at: ' + percents + '%'))
    result.on('finished', job => console.log('project rendering finished'))
    result.on('error', err => console.log('project rendering error', err))
}

main().catch(console.error);
```

Optionally you can provide custom headers that the API client will pass to the server on each request.
```js
const { createClient } = require('@nexrender/api')

const client = createClient({
    host: 'http://my.server.com:3050',
    headers: {
        "Some-Custom-Header": "myCustomValue",
        "Another-Custom-Header": async () => {
            // Perform some operations
            return "EvaluatedValue";
        }
    }
})
```
As shown in the example above, you can provide string value or a function that will be evaluated on each request to generate the header value dynamically. Any value that is not a string nor a function will be ignored.

One should be careful when providing a function (which can be async) to generate a header value, while it does provide more flexibility than just plain strings, functions that takes a long time to resolve can negatively impact performance. For example, if an async function is defined to fetch a header value from a remote database that takes 500ms to resolve, the client will wait 500ms for the header before moving on to make the actual request, for every request. In this case you should try to memoize the function if possible so that the client doesn't have to do a full look up on each request unncessarily.

## Information

Main returned function is `createClient` which allows you to create multiple clients to work with multiple endpoints in case it might be needed.

Instead of returning `Job` object, `client.addJob` returns an event emitter instance, which allows you to bind your callbacks
and handle changes in the Job lifetime. API will be constantly polling the specific API server every `NEXRENDER_JOB_POLLING` ms for changes, and if there will be any - you will be notified.