open-index/open-npm huggingface dataset:
npm package: @nexrender/action-link
Description: Create symbolic links between files or directories.
Author: inlife
Latest version: 1.59.1

# Action: Link

Create symbolic links between files or directories.

## Information

* `input` required argument, source path for the symbolic link, can be either relative or absolute path
* `output` required argument, destination path where the symbolic link will be created, can be either relative or absolute path
* `type` optional argument, type of symbolic link to create:
  * `dir` - Create a directory symbolic link (default)
  * `file` - Create a file symbolic link
  * `junction` - Create a directory junction (Windows only)

The action will:
1. Create any necessary parent directories for the output path
2. Remove any existing symbolic link at the output path
3. Create a new symbolic link from input to output

Note: Creating symbolic links may require elevated permissions on some systems.

## Usage

```json
{
    "actions": {
        "prerender": [
            {
                "module": "@nexrender/action-link",
                "input": "source/large-file.mp4",
                "output": "assets/linked-file.mp4",
                "type": "file"
            }
        ]
    }
}
```

## License

Please refer to the [LICENSE](LICENSE) file for more information. Unlike the main nexrender project, this plugin is licensed under the AGPL-3.0 license.
npm package: @nexrender/action-lottie
Description: (alpha version)
Author: inlife
Latest version: 1.62.9

# Action: Lottie

(alpha version)

An action that can be used to render AE compositions into lottie HTML banners.

Currently only "banner" type is supported.

## Usage

```json
{
    "actions": {
        "predownload": [
            {
                "module": "@nexrender/action-lottie",
                "banner": {
                    "lottie_origin": "local",
                    "lottie_renderer": "svg",
                    "lottie_library": "full",
                    "use_original_sizes": true,
                    "width": 500,
                    "height": 500,
                    "click_tag": "#",
                    "shouldLoop": true,
                    "loopCount": 0
                }
            }
        ],
        "postrender": [
            {
                "module": "@nexrender/action-compress",
                "format": "zip",
                "input": ["banner"],
                "output": "banner.zip"
            }
        ]
    }
}
```

## Parameters

Parameters fully replicate the parameter structure of lottie in Bodymovin.


## License

Please refer to the [LICENSE](LICENSE) file for more information. Unlike the main nexrender project, this plugin is licensed under the AGPL-3.0 license.
npm package: @nexrender/action-mogrt
Description: MOGRT support for Nexrender
Latest version: 1.57.1

# nexrender-action-mogrt-template

This plugin adds .mogrt support to Nexrender.

## Install

`npm install @nexrender/action-mogrt`

## How to use

1. Set a .mogrt file as the `template.src` value
2. Add this module in predownload actions
3. Add any Essential Graphics parameters you want to change as `params`
4. Use unique layer names in the .mogrt file to reference assets to leverage nexrender built-in asset substitution


```json
{
    "template": {
        "src": "http://www.foo.com/template.mogrt",
        "composition": "will_be_ignored"
    },
    "assets": [
        {
            "type": "image",
            "src": "http://www.foo.com/image.png",
            "layerName": "$ref-layer-1"
        },
        {
            "type": "image",
            "src": "http://www.foo.com/image2.png",
            "layerName": "$ref-layer-2"
        }
    ],
    "actions": {
        "predownload": [
            {
                "module": "@nexrender/action-mogrt",
                "params": {
                    "Title": "This should be the title",
                    "Dropdown": 2,
                        "Group Name": {
                        "Some Name": "Some Value",
                        "Another Name": 123
                    },
                    "My First Image": "$ref-image-1",
                    "My Second Image": "$ref-image-2"
                    "Scale": [50, 50],
                    "Checkbox": true,
                    "Point Control:": [30, 50],
                    "Angle": 720,
                    "Colour": [0.7, 0.2, 0],
                    "Slider": 50,
                    "Scale": [50, 50]
                }
            }
        ],

```

## Notes

* Any `template.src` without a .mogrt extension will be ignored
* The value in `template.composition` will be ignored, as .mogrt files specify what composition to use on their own, but Nexrender requires one to be specified
* Invalid .mogrt files will cause an error


## License

Please refer to the [LICENSE](LICENSE) file for more information. Unlike the main nexrender project, this plugin is licensed under the AGPL-3.0 license.
npm package: @nexrender/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: inlife
Latest version: 1.62.0

# 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.
npm package: @nexrender/database-redis
Description: Redis database provider for `@nexrender/server`.
Author: inlife
Latest version: 1.60.10

# Database: Redis

Redis database provider for `@nexrender/server`.

## Installation

```
npm i @nexrender/database-redis -g
```

## Configuration

In order to use this, `NEXRENDER_DATABASE_PROVIDER` needs to be set to `redis`.
Also you can define the number of keys to retrieve in a single iteration during the `SCAN` operation using  `SCAN_CHUNK_SIZE`. Default is `10`.

```
export NEXRENDER_DATABASE_PROVIDER="redis"
export REDIS_URL="redis://localhost:6379"
export SCAN_CHUNK_SIZE="100"
```
npm package: @nexrender/provider-ftp
Description: Allows nexrender to interact with an external FTP server to download or upload assets and/or results of rendering.
Author: zuntah
Latest version: 1.45.6

# Provider: FTP

Allows nexrender to interact with an external FTP server to download or upload assets and/or results of rendering.

Refer to [mscdex/node-ftp](https://github.com/mscdex/node-ftp) for information regarding general abilities and usage.

## Installation

```
npm i @nexrender/provider-ftp -g
```

## Usage (download)

To download assets from an FTP server you would need to specify relevant information for every asset:

(Including hostname, port, username and pasword if needed).

```js
{
    "assets": [
        {
            "src": "ftp://root:password123132@ftp.example.com:2121/home/files/background.jpg",
            "type": "image",
            "layerName": "background.png"
        },
        {
            "src": "ftp://public-ftp.example.com/home/audio.mp3",
            "type": "audio",
            "layerName": "theme.mp3"
        }
    ]
}
````

## Usage (upload)

Upload via FTP can be done using [@nexrender/action-upload](../nexrender-action-upload)

Basic params info:

* `host` - string - The hostname or IP address of the FTP server. Default: 'localhost'
* `port` - integer - The port of the FTP server. Default: 21
* `user` - string - Username for authentication. Default: 'anonymous'
* `password` - string - Password for authentication. Default: 'anonymous@'
* `output` - string - Optional argument to notify how you want to save your file on a remote machine as

Example:

```js
{
    "actions": {
        "postrender": [
            {
                "module": "@nexrender/action-upload",
                "input": "result.mp4",
                "provider": "ftp",
                "params": {
                    "host": "ftp.example.com",
                    "port": 21,
                    "user": "root",
                    "password": "pass123123",
                    "output": "/var/mystuff/output.mp4"
                }
            }
        ]
    }
}
npm package: @nexrender/provider-gs
Description: Allows nexrender to interact with a Google Cloud Storage (GCS) bucket.
Author: dockheas23
Latest version: 1.62.0

# Provider: GCS

Allows nexrender to interact with a Google Cloud Storage (GCS) bucket.

Refer to [@google-cloud/storage](https://github.com/googleapis/nodejs-storage) for information regarding general abilities and usage.

## Installation

```
npm i @nexrender/provider-gs -g
```

You most likely need to authenticate to interact with a GCS bucket. This provider uses _Application Default Credentials_. Refer to the [Google Cloud Documentation](https://cloud.google.com/docs/authentication/getting-started) for more information on authentication.

## Usage (download)

To download assets from a GCS bucket, you can use the `gs://` prefix in the value of the `src` attribute.

```js
{
    "assets": [
        {
            "src": "gs://mybucket/background.jpg",
            "type": "image",
            "layerName": "background.png"
        },
        {
            "src": "gs://myotherbucket/audio.mp3",
            "type": "audio",
            "layerName": "theme.mp3"
        }
    ]
}
````

Uri follows this scheme:

```
gs://[BUCKET]/[ITEM]
```

## Usage (upload)

Upload via GCS can be done using [@nexrender/action-upload](../nexrender-action-upload)

Basic params info:

* `bucket` required argument, the GCS bucket
* `item` required argument, the item ID
* `contentType` optional argument, the content-type of the upload, which will be set as metadata on
* `cacheControl` optional argument, the cache-control of the upload, which will be set as metadata on
  the bucket item
* `resumable` boolean, optional argument, disables resumable (true by default) [google storage documentation](https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)

Example:

```js
{
    "actions": {
        "postrender": [
            {
                "module": "@nexrender/action-upload",
                "input": "result.mp4",
                "provider": "gs",
                "params": {
                    "bucket": "name-of-your-bucket",
                    "item": "folder/output.mp4",
                    "contentType": "video/mp4",
                    "cacheControl": "public, max-age=3600",
                    "resumable": false
                }
            }
        ]
    }
}