3.0.3 • Published 3 years ago

@runnerty/trigger-file-watcher v3.0.3

Weekly downloads
5
License
MIT
Repository
github
Last release
3 years ago

NPM version Downloads Dependency Status

File Watcher Trigger for Runnerty:

It is possible to set up file system path trigger in Runnerty with the help of auto-magically configured filewatchers. Them are defined with the condition property and can be fired through the following actions:

  • add: when a file is added.
  • change: when a file is changed.
  • unlink: when a file is deleted.
  • error: when there is an error in the file treatment.

Installation:

Through NPM

npm i @runnerty/trigger-file-watcher

You can also add modules to your project with runnerty-cli

npx runnerty-cli add @runnerty/trigger-file-watcher

This command installs the module in your project, adds example configuration in your config.json.

If you have installed runnerty-cli globally you can include the module with this command:

rty add @runnerty/trigger-file-watcher

Configuration sample:

Add in config.json:

{
  "triggers": [
    {
      "id": "filewatcher_default",
      "type": "@runnerty-trigger-file-watcher"
    }
  ]
}

Plan sample:

Add in plan.json:

{
  "triggers": [
    {
      "id": "filewatcher_default",
      "file_name": "/path/myfile.txt",
      "condition": "change"
    }
  ]
}
{
  "triggers": [
    {
      "id": "filewatcher_default",
      "file_name": "/path/*.jpg",
      "condition": "add"
    }
  ]
}

Chain input

This trigger sends to the custom_values of the chain the name of the file watched (file_name). You can make use of this value through the "get values" function:

 @GV(file_name)
3.0.3

3 years ago

3.0.2

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.0.0

4 years ago

0.0.2

5 years ago

0.0.1

7 years ago