@theotherwillembotha/node-red-nginxproxymanager 0.0.53 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,6 +4,17 @@ Node-RED nodes for managing [Nginx Proxy Manager](https://nginxproxymanager.com/
4
4
 
5
5
  ---
6
6
 
7
+ > [!IMPORTANT]
8
+ > **This plugin requires [`@theotherwillembotha/node-red-plugincore`](https://github.com/theotherwillembotha/nodered_plugincore) to be installed.**
9
+ >
10
+ > `node-red-plugincore` is declared as a dependency and npm will install it automatically alongside this package. However, due to a [known Node-RED limitation](https://github.com/node-red/node-red/issues/3529), packages that arrive as transitive npm dependencies are only discovered by the Node-RED runtime on the **next startup**.
11
+ >
12
+ > **You have two options:**
13
+ > - Install [`@theotherwillembotha/node-red-plugincore`](https://flows.nodered.org/node/@theotherwillembotha/node-red-plugincore) via the palette manager or `npm install` **first**, then install this plugin — both will be available immediately without a restart.
14
+ > - Install this plugin directly — `node-red-plugincore` will be installed automatically alongside it. **Restart Node-RED** once and both packages will be fully loaded.
15
+
16
+ ---
17
+
7
18
  ## Installation
8
19
 
9
20
  Either use the **Manage Palette** option in the Node-RED editor, or run the following in your Node-RED user directory (typically `~/.node-red`):
package/build/Nodes.html CHANGED
@@ -509,11 +509,14 @@ Connection configuration for an Nginx Proxy Manager instance. Referenced by all
509
509
  width: 120px !important;
510
510
  }
511
511
 
512
- .towb_editorfield {
512
+ input.towb_editorfield,
513
+ select.towb_editorfield,
514
+ textarea.towb_editorfield {
513
515
  width: 70% !important;
514
516
  }
515
517
 
516
- .towb_editorfield_short {
518
+ input.towb_editorfield_short,
519
+ select.towb_editorfield_short {
517
520
  width: 30% !important;
518
521
  }
519
522
 
@@ -992,11 +995,14 @@ The original message is forwarded unchanged after the operation completes.
992
995
  width: 120px !important;
993
996
  }
994
997
 
995
- .towb_editorfield {
998
+ input.towb_editorfield,
999
+ select.towb_editorfield,
1000
+ textarea.towb_editorfield {
996
1001
  width: 70% !important;
997
1002
  }
998
1003
 
999
- .towb_editorfield_short {
1004
+ input.towb_editorfield_short,
1005
+ select.towb_editorfield_short {
1000
1006
  width: 30% !important;
1001
1007
  }
1002
1008
 
package/build/Plugins.js CHANGED
@@ -26,7 +26,6 @@ module.exports = function (RED) {
26
26
  let plugin = RED.plugins.get(pluginID);
27
27
 
28
28
  if(addedPlugin && plugin.instantiate && !plugin.instance){
29
- console.log("Deploying instance of: " + plugin.id);
30
29
  plugin.instance = new plugin.class();
31
30
 
32
31
  // instantiate the plugin.
@@ -42,7 +41,7 @@ module.exports = function (RED) {
42
41
  RED.events.on('runtime-event', async (event) => {
43
42
  // startup deployment.
44
43
  if ("runtime-deploy" === event?.id && startupDeployment) {
45
- console.log("STARTUP DEPLOYMENT");
44
+ //console.log("STARTUP DEPLOYMENT");
46
45
  startupDeployment = false;
47
46
  const flows = await runtime.flows.getFlows({});
48
47
  await plugin.instance.onDeploy(flows);
@@ -50,7 +49,7 @@ module.exports = function (RED) {
50
49
 
51
50
  // stopping flows on redeployment.
52
51
  if ("runtime-state" === event?.id && event?.payload?.state === "stop" && event?.payload?.deploy) {
53
- console.log("REDEPLOY!");
52
+ //console.log("REDEPLOY!");
54
53
  const flows = await runtime.flows.getFlows({});
55
54
  await plugin.instance.onDeploy(flows);
56
55
  }
@@ -33,7 +33,7 @@ let NginxGetHostsNode = class NginxGetHostsNode extends node_red_plugincore_1.Ba
33
33
  exports.NginxGetHostsNode = NginxGetHostsNode;
34
34
  __decorate([
35
35
  (0, node_red_plugincore_3.Logger)(),
36
- __metadata("design:type", Object)
36
+ __metadata("design:type", node_red_plugincore_3.Log)
37
37
  ], NginxGetHostsNode.prototype, "log", void 0);
38
38
  __decorate([
39
39
  (0, node_red_plugincore_2.Metrics)({ name: "get_hosts_requests", type: node_red_plugincore_2.MetricType.Counter, description: "number of get hosts requests made" }),
@@ -31,7 +31,7 @@ let UpdateNginxHostNode = class UpdateNginxHostNode extends node_red_plugincore_
31
31
  exports.UpdateNginxHostNode = UpdateNginxHostNode;
32
32
  __decorate([
33
33
  (0, node_red_plugincore_3.Logger)(),
34
- __metadata("design:type", Object)
34
+ __metadata("design:type", node_red_plugincore_3.Log)
35
35
  ], UpdateNginxHostNode.prototype, "log", void 0);
36
36
  __decorate([
37
37
  (0, node_red_plugincore_2.Metrics)({ name: "request", type: node_red_plugincore_2.MetricType.Counter, description: "number of requests made" }),
@@ -46,5 +46,8 @@ class NginxProxyManagerClient {
46
46
  forwardPort: h.forward_port,
47
47
  }));
48
48
  }
49
+ async deleteHost(id) {
50
+ await this._client.deleteProxyHost(id);
51
+ }
49
52
  }
50
53
  exports.NginxProxyManagerClient = NginxProxyManagerClient;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theotherwillembotha/node-red-nginxproxymanager",
3
- "version": "0.0.53",
3
+ "version": "0.1.0",
4
4
  "description": "Node-RED nodes for managing Nginx Proxy Manager hosts, built on node-red-plugincore.",
5
5
  "author": "Willem Botha (@theotherwillembotha)",
6
6
  "license": "ISC",
@@ -40,7 +40,7 @@
40
40
  "nodered": ">=4.0.0"
41
41
  },
42
42
  "dependencies": {
43
- "@theotherwillembotha/node-red-plugincore": "^0.0.52"
43
+ "@theotherwillembotha/node-red-plugincore": "^0.1.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@theotherwillembotha/node-red-plugincore": "../nodered_plugincore",