From 9e7536754ddf913f1b3027263ae0fc5620c2e43d Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Sat, 12 Dec 2020 22:05:14 -0700 Subject: [PATCH] Add ability to pass env to abracadabra --- WHATSNEW.md | 1 + core/abracadabra.js | 1 + docs/modding/local-doors.md | 1 + 3 files changed, 3 insertions(+) diff --git a/WHATSNEW.md b/WHATSNEW.md index 5030f571..c3910cd4 100644 --- a/WHATSNEW.md +++ b/WHATSNEW.md @@ -16,6 +16,7 @@ This document attempts to track **major** changes and additions in ENiGMA½. For * A fix has been made to clean up old `file.db` entries when a file is removed. Previously stale records could be left or even recycled into new entries. Please see [UPGRADE.md](UPGRADE.md) for details on applying this fix (look for `tables_update_2020-11-29.sql`). * The [./docs/modding/onelinerz.md](onelinerz) module can have `dbSuffix` set in it's `config` block to specify a separate DB file. For example to use as a requests list. * Default hash tags can now be set in file areas. Simply supply an array or list of values in a file area block via `hashTags`. +* Added ability to pass an `env` value (map) to `abracadabra` doors. See [Local Doors](./docs/modding/local-doors.md]). ## 0.0.11-beta * Upgraded from `alpha` to `beta` -- The software is far along and mature enough at this point! diff --git a/core/abracadabra.js b/core/abracadabra.js index b2e641e1..3f21fa0b 100644 --- a/core/abracadabra.js +++ b/core/abracadabra.js @@ -173,6 +173,7 @@ exports.getModule = class AbracadabraModule extends MenuModule { dropFile : this.dropFile.fileName, dropFilePath : this.dropFile.fullPath, node : this.client.node, + env : this.config.env, }; const doorTracking = trackDoorRunBegin(this.client, this.config.name); diff --git a/docs/modding/local-doors.md b/docs/modding/local-doors.md index 3e3e59ad..ccd9a495 100644 --- a/docs/modding/local-doors.md +++ b/docs/modding/local-doors.md @@ -18,6 +18,7 @@ The `abracadabra` `config` block can contain the following members: | `cmd` | :+1: | Path to executable to launch. | | `args` | :-1: | Array of argument(s) to pass to `cmd`. See **Argument Variables** below for information on variables that can be used here. | `cwd` | :-1: | Sets the Current Working Directory (CWD) for `cmd`. Defaults to the directory of `cmd`. | +| `env` | :-1: | Sets the environment. Supplied in the form of an map: `{ SOME_VAR: "value" }` | `nodeMax` | :-1: | Max number of nodes that can access this door at once. Uses `name` as a tracking key. | | `tooManyArt` | :-1: | Art spec to display if too many instances are already in use. | | `io` | :-1: | How to process input/output (I/O). Can be `stdio` or `socket`. When using `stdio`, I/O is handled via standard stdin/stdout. When using `socket` a temporary socket server is spawned that can be connected back to. The server listens on localhost on `{srvPort}` (See **Argument Variables** below for more information). Default value is `stdio`. |