@tachybase/plugin-adapter-red-node 0.23.8

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.
@@ -0,0 +1,182 @@
1
+ /*!
2
+ * express
3
+ * Copyright(c) 2009-2013 TJ Holowaychuk
4
+ * Copyright(c) 2013 Roman Shtylman
5
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
6
+ * MIT Licensed
7
+ */
8
+
9
+ 'use strict';
10
+
11
+ /**
12
+ * Module dependencies.
13
+ * @private
14
+ */
15
+
16
+ var debug = require('debug')('express:view');
17
+ var path = require('path');
18
+ var fs = require('fs');
19
+
20
+ /**
21
+ * Module variables.
22
+ * @private
23
+ */
24
+
25
+ var dirname = path.dirname;
26
+ var basename = path.basename;
27
+ var extname = path.extname;
28
+ var join = path.join;
29
+ var resolve = path.resolve;
30
+
31
+ /**
32
+ * Module exports.
33
+ * @public
34
+ */
35
+
36
+ module.exports = View;
37
+
38
+ /**
39
+ * Initialize a new `View` with the given `name`.
40
+ *
41
+ * Options:
42
+ *
43
+ * - `defaultEngine` the default template engine name
44
+ * - `engines` template engine require() cache
45
+ * - `root` root path for view lookup
46
+ *
47
+ * @param {string} name
48
+ * @param {object} options
49
+ * @public
50
+ */
51
+
52
+ function View(name, options) {
53
+ var opts = options || {};
54
+
55
+ this.defaultEngine = opts.defaultEngine;
56
+ this.ext = extname(name);
57
+ this.name = name;
58
+ this.root = opts.root;
59
+
60
+ if (!this.ext && !this.defaultEngine) {
61
+ throw new Error('No default engine was specified and no extension was provided.');
62
+ }
63
+
64
+ var fileName = name;
65
+
66
+ if (!this.ext) {
67
+ // get extension from default engine name
68
+ this.ext = this.defaultEngine[0] !== '.'
69
+ ? '.' + this.defaultEngine
70
+ : this.defaultEngine;
71
+
72
+ fileName += this.ext;
73
+ }
74
+
75
+ if (!opts.engines[this.ext]) {
76
+ // load engine
77
+ var mod = this.ext.slice(1)
78
+ debug('require "%s"', mod)
79
+
80
+ // default engine export
81
+ var fn = require(mod).__express
82
+
83
+ if (typeof fn !== 'function') {
84
+ throw new Error('Module "' + mod + '" does not provide a view engine.')
85
+ }
86
+
87
+ opts.engines[this.ext] = fn
88
+ }
89
+
90
+ // store loaded engine
91
+ this.engine = opts.engines[this.ext];
92
+
93
+ // lookup path
94
+ this.path = this.lookup(fileName);
95
+ }
96
+
97
+ /**
98
+ * Lookup view by the given `name`
99
+ *
100
+ * @param {string} name
101
+ * @private
102
+ */
103
+
104
+ View.prototype.lookup = function lookup(name) {
105
+ var path;
106
+ var roots = [].concat(this.root);
107
+
108
+ debug('lookup "%s"', name);
109
+
110
+ for (var i = 0; i < roots.length && !path; i++) {
111
+ var root = roots[i];
112
+
113
+ // resolve the path
114
+ var loc = resolve(root, name);
115
+ var dir = dirname(loc);
116
+ var file = basename(loc);
117
+
118
+ // resolve the file
119
+ path = this.resolve(dir, file);
120
+ }
121
+
122
+ return path;
123
+ };
124
+
125
+ /**
126
+ * Render with the given options.
127
+ *
128
+ * @param {object} options
129
+ * @param {function} callback
130
+ * @private
131
+ */
132
+
133
+ View.prototype.render = function render(options, callback) {
134
+ debug('render "%s"', this.path);
135
+ this.engine(this.path, options, callback);
136
+ };
137
+
138
+ /**
139
+ * Resolve the file within the given directory.
140
+ *
141
+ * @param {string} dir
142
+ * @param {string} file
143
+ * @private
144
+ */
145
+
146
+ View.prototype.resolve = function resolve(dir, file) {
147
+ var ext = this.ext;
148
+
149
+ // <path>.<ext>
150
+ var path = join(dir, file);
151
+ var stat = tryStat(path);
152
+
153
+ if (stat && stat.isFile()) {
154
+ return path;
155
+ }
156
+
157
+ // <path>/index.<ext>
158
+ path = join(dir, basename(file, ext), 'index' + ext);
159
+ stat = tryStat(path);
160
+
161
+ if (stat && stat.isFile()) {
162
+ return path;
163
+ }
164
+ };
165
+
166
+ /**
167
+ * Return a stat, maybe.
168
+ *
169
+ * @param {string} path
170
+ * @return {fs.Stats}
171
+ * @private
172
+ */
173
+
174
+ function tryStat(path) {
175
+ debug('stat "%s"', path);
176
+
177
+ try {
178
+ return fs.statSync(path);
179
+ } catch (e) {
180
+ return undefined;
181
+ }
182
+ }
@@ -0,0 +1 @@
1
+ {"name":"express","description":"Fast, unopinionated, minimalist web framework","version":"4.21.2","author":"TJ Holowaychuk <tj@vision-media.ca>","contributors":["Aaron Heckmann <aaron.heckmann+github@gmail.com>","Ciaran Jessup <ciaranj@gmail.com>","Douglas Christopher Wilson <doug@somethingdoug.com>","Guillermo Rauch <rauchg@gmail.com>","Jonathan Ong <me@jongleberry.com>","Roman Shtylman <shtylman+expressjs@gmail.com>","Young Jae Sim <hanul@hanul.me>"],"license":"MIT","repository":"expressjs/express","homepage":"http://expressjs.com/","funding":{"type":"opencollective","url":"https://opencollective.com/express"},"keywords":["express","framework","sinatra","web","http","rest","restful","router","app","api"],"dependencies":{"accepts":"~1.3.8","array-flatten":"1.1.1","body-parser":"1.20.3","content-disposition":"0.5.4","content-type":"~1.0.4","cookie":"0.7.1","cookie-signature":"1.0.6","debug":"2.6.9","depd":"2.0.0","encodeurl":"~2.0.0","escape-html":"~1.0.3","etag":"~1.8.1","finalhandler":"1.3.1","fresh":"0.5.2","http-errors":"2.0.0","merge-descriptors":"1.0.3","methods":"~1.1.2","on-finished":"2.4.1","parseurl":"~1.3.3","path-to-regexp":"0.1.12","proxy-addr":"~2.0.7","qs":"6.13.0","range-parser":"~1.2.1","safe-buffer":"5.2.1","send":"0.19.0","serve-static":"1.16.2","setprototypeof":"1.2.0","statuses":"2.0.1","type-is":"~1.6.18","utils-merge":"1.0.1","vary":"~1.1.2"},"devDependencies":{"after":"0.8.2","connect-redis":"3.4.2","cookie-parser":"1.4.6","cookie-session":"2.0.0","ejs":"3.1.9","eslint":"8.47.0","express-session":"1.17.2","hbs":"4.2.0","marked":"0.7.0","method-override":"3.0.0","mocha":"10.2.0","morgan":"1.10.0","nyc":"15.1.0","pbkdf2-password":"1.2.1","supertest":"6.3.0","vhost":"~3.0.2"},"engines":{"node":">= 0.10.0"},"files":["LICENSE","History.md","Readme.md","index.js","lib/"],"scripts":{"lint":"eslint .","test":"mocha --require test/support/env --reporter spec --bail --check-leaks test/ test/acceptance/","test-ci":"nyc --exclude examples --exclude test --exclude benchmarks --reporter=lcovonly --reporter=text npm test","test-cov":"nyc --exclude examples --exclude test --exclude benchmarks --reporter=html --reporter=text npm test","test-tap":"mocha --require test/support/env --reporter tap --check-leaks test/ test/acceptance/"},"_lastModified":"2024-12-22T16:05:10.143Z"}
@@ -0,0 +1 @@
1
+ export { default } from './plugin';
@@ -0,0 +1,33 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var server_exports = {};
29
+ __export(server_exports, {
30
+ default: () => import_plugin.default
31
+ });
32
+ module.exports = __toCommonJS(server_exports);
33
+ var import_plugin = __toESM(require("./plugin"));
@@ -0,0 +1,11 @@
1
+ import { Plugin } from '@tachybase/server';
2
+ export declare class PluginAdapterRedNodeServer extends Plugin {
3
+ afterAdd(): Promise<void>;
4
+ beforeLoad(): Promise<void>;
5
+ load(): Promise<void>;
6
+ install(): Promise<void>;
7
+ afterEnable(): Promise<void>;
8
+ afterDisable(): Promise<void>;
9
+ remove(): Promise<void>;
10
+ }
11
+ export default PluginAdapterRedNodeServer;
@@ -0,0 +1,84 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var plugin_exports = {};
29
+ __export(plugin_exports, {
30
+ PluginAdapterRedNodeServer: () => PluginAdapterRedNodeServer,
31
+ default: () => plugin_default
32
+ });
33
+ module.exports = __toCommonJS(plugin_exports);
34
+ var import_node_path = __toESM(require("node:path"));
35
+ var import_node_process = __toESM(require("node:process"));
36
+ var import_server = require("@tachybase/server");
37
+ var import_express = __toESM(require("express"));
38
+ var import_red = __toESM(require("./red"));
39
+ class PluginAdapterRedNodeServer extends import_server.Plugin {
40
+ async afterAdd() {
41
+ }
42
+ async beforeLoad() {
43
+ }
44
+ async load() {
45
+ const callback = (0, import_express.default)();
46
+ const prefix = "/adapters/red-node";
47
+ import_server.Gateway.getInstance().registerHandler({
48
+ name: "red-node",
49
+ prefix,
50
+ callback
51
+ });
52
+ const settings = {
53
+ httpAdminRoot: prefix + "/red",
54
+ httpNodeRoot: prefix + "/api",
55
+ userDir: import_node_path.default.join(import_node_process.default.cwd(), "storage/red-node"),
56
+ functionGlobalContext: {}
57
+ // enables global context
58
+ };
59
+ import_red.default.init(import_server.Gateway.getInstance().server, settings);
60
+ callback.use(settings.httpAdminRoot, import_red.default.httpAdmin);
61
+ callback.use(settings.httpNodeRoot, import_red.default.httpNode);
62
+ const onStart = async () => {
63
+ await import_red.default.start();
64
+ };
65
+ this.app.once("afterStart", onStart);
66
+ this.app.once("beforeStop", async () => {
67
+ await import_red.default.stop();
68
+ });
69
+ }
70
+ async install() {
71
+ }
72
+ async afterEnable() {
73
+ }
74
+ async afterDisable() {
75
+ import_server.Gateway.getInstance().unregisterHandler("red-node");
76
+ }
77
+ async remove() {
78
+ }
79
+ }
80
+ var plugin_default = PluginAdapterRedNodeServer;
81
+ // Annotate the CommonJS export names for ESM import in node:
82
+ 0 && (module.exports = {
83
+ PluginAdapterRedNodeServer
84
+ });
@@ -0,0 +1,111 @@
1
+ declare const RED: {
2
+ /**
3
+ * Initialise the Node-RED application.
4
+ * @param {server} httpServer - the HTTP server object to use
5
+ * @param {Object} userSettings - an object containing the runtime settings
6
+ * @memberof node-red
7
+ */
8
+ init: (httpServer: any, userSettings: any) => void;
9
+ /**
10
+ * Start the Node-RED application.
11
+ * @return {Promise} - resolves when complete
12
+ * @memberof node-red
13
+ */
14
+ start: () => any;
15
+ /**
16
+ * Stop the Node-RED application.
17
+ *
18
+ * Once called, Node-RED should not be restarted until the Node.JS process is
19
+ * restarted.
20
+ *
21
+ * @return {Promise} - resolves when complete
22
+ * @memberof node-red
23
+ */
24
+ stop: () => any;
25
+ /**
26
+ * Logging utilities
27
+ * @see @node-red/util_log
28
+ * @memberof node-red
29
+ */
30
+ log: any;
31
+ /**
32
+ * General utilities
33
+ * @see @node-red/util_util
34
+ * @memberof node-red
35
+ */
36
+ util: any;
37
+ /**
38
+ * This provides access to the internal nodes module of the
39
+ * runtime. The details of this API remain undocumented as they should not
40
+ * be used directly.
41
+ *
42
+ * Most administrative actions should be performed use the runtime api
43
+ * under [node-red.runtime]{@link node-red.runtime}.
44
+ *
45
+ * @memberof node-red
46
+ */
47
+ readonly nodes: any;
48
+ /**
49
+ * Runtime events emitter
50
+ * @see @node-red/util_events
51
+ * @memberof node-red
52
+ */
53
+ events: any;
54
+ /**
55
+ * Runtime hooks engine
56
+ * @see @node-red/runtime_hooks
57
+ * @memberof node-red
58
+ */
59
+ hooks: any;
60
+ /**
61
+ * This provides access to the internal settings module of the
62
+ * runtime.
63
+ *
64
+ * @memberof node-red
65
+ */
66
+ readonly settings: any;
67
+ /**
68
+ * Get the version of the runtime
69
+ * @return {String} - the runtime version
70
+ * @function
71
+ * @memberof node-red
72
+ */
73
+ readonly version: any;
74
+ /**
75
+ * The express application for the Editor Admin API
76
+ * @type ExpressApplication
77
+ * @memberof node-red
78
+ */
79
+ readonly httpAdmin: any;
80
+ /**
81
+ * The express application for HTTP Nodes
82
+ * @type ExpressApplication
83
+ * @memberof node-red
84
+ */
85
+ readonly httpNode: any;
86
+ /**
87
+ * The HTTP Server used by the runtime
88
+ * @type HTTPServer
89
+ * @memberof node-red
90
+ */
91
+ readonly server: any;
92
+ /**
93
+ * The runtime api
94
+ * @see @node-red/runtime
95
+ * @memberof node-red
96
+ */
97
+ runtime: any;
98
+ /**
99
+ * The editor authentication api.
100
+ * @see @node-red/editor-api_auth
101
+ * @memberof node-red
102
+ */
103
+ auth: any;
104
+ /**
105
+ * The editor authentication api.
106
+ * @see @node-red/editor-api_auth
107
+ * @memberof node-red
108
+ */
109
+ readonly diagnostics: any;
110
+ };
111
+ export default RED;
@@ -0,0 +1,202 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var red_exports = {};
29
+ __export(red_exports, {
30
+ default: () => red_default
31
+ });
32
+ module.exports = __toCommonJS(red_exports);
33
+ var import_dns = __toESM(require("dns"));
34
+ var import_path = __toESM(require("path"));
35
+ var import_editor_api = __toESM(require("@node-red/editor-api"));
36
+ var import_runtime = __toESM(require("@node-red/runtime"));
37
+ var import_util = __toESM(require("@node-red/util"));
38
+ let server = null;
39
+ let apiEnabled = false;
40
+ import_dns.default.setDefaultResultOrder("ipv4first");
41
+ const RED = {
42
+ /**
43
+ * Initialise the Node-RED application.
44
+ * @param {server} httpServer - the HTTP server object to use
45
+ * @param {Object} userSettings - an object containing the runtime settings
46
+ * @memberof node-red
47
+ */
48
+ init: function(httpServer, userSettings) {
49
+ if (!userSettings) {
50
+ userSettings = httpServer;
51
+ httpServer = null;
52
+ }
53
+ if (!Object.prototype.hasOwnProperty.call(userSettings, "coreNodesDir")) {
54
+ userSettings.coreNodesDir = import_path.default.dirname(require.resolve("@node-red/nodes"));
55
+ }
56
+ import_util.default.init(userSettings);
57
+ if (userSettings.httpAdminRoot !== false) {
58
+ import_runtime.default.init(userSettings, httpServer, import_editor_api.default);
59
+ import_editor_api.default.init(userSettings, httpServer, import_runtime.default.storage, import_runtime.default);
60
+ import_editor_api.default.httpAdmin.use(import_runtime.default.httpAdmin);
61
+ apiEnabled = true;
62
+ server = httpServer;
63
+ } else {
64
+ import_runtime.default.init(userSettings, httpServer);
65
+ apiEnabled = false;
66
+ if (httpServer) {
67
+ server = httpServer;
68
+ } else {
69
+ server = null;
70
+ }
71
+ }
72
+ return;
73
+ },
74
+ /**
75
+ * Start the Node-RED application.
76
+ * @return {Promise} - resolves when complete
77
+ * @memberof node-red
78
+ */
79
+ start: function() {
80
+ return import_runtime.default.start().then(function() {
81
+ if (apiEnabled) {
82
+ return import_editor_api.default.start();
83
+ }
84
+ });
85
+ },
86
+ /**
87
+ * Stop the Node-RED application.
88
+ *
89
+ * Once called, Node-RED should not be restarted until the Node.JS process is
90
+ * restarted.
91
+ *
92
+ * @return {Promise} - resolves when complete
93
+ * @memberof node-red
94
+ */
95
+ stop: function() {
96
+ return import_runtime.default.stop().then(function() {
97
+ if (apiEnabled) {
98
+ return import_editor_api.default.stop();
99
+ }
100
+ });
101
+ },
102
+ /**
103
+ * Logging utilities
104
+ * @see @node-red/util_log
105
+ * @memberof node-red
106
+ */
107
+ log: import_util.default.log,
108
+ /**
109
+ * General utilities
110
+ * @see @node-red/util_util
111
+ * @memberof node-red
112
+ */
113
+ util: import_util.default.util,
114
+ /**
115
+ * This provides access to the internal nodes module of the
116
+ * runtime. The details of this API remain undocumented as they should not
117
+ * be used directly.
118
+ *
119
+ * Most administrative actions should be performed use the runtime api
120
+ * under [node-red.runtime]{@link node-red.runtime}.
121
+ *
122
+ * @memberof node-red
123
+ */
124
+ get nodes() {
125
+ return import_runtime.default._.nodes;
126
+ },
127
+ /**
128
+ * Runtime events emitter
129
+ * @see @node-red/util_events
130
+ * @memberof node-red
131
+ */
132
+ events: import_util.default.events,
133
+ /**
134
+ * Runtime hooks engine
135
+ * @see @node-red/runtime_hooks
136
+ * @memberof node-red
137
+ */
138
+ hooks: import_runtime.default.hooks,
139
+ /**
140
+ * This provides access to the internal settings module of the
141
+ * runtime.
142
+ *
143
+ * @memberof node-red
144
+ */
145
+ get settings() {
146
+ return import_runtime.default._.settings;
147
+ },
148
+ /**
149
+ * Get the version of the runtime
150
+ * @return {String} - the runtime version
151
+ * @function
152
+ * @memberof node-red
153
+ */
154
+ get version() {
155
+ return import_runtime.default._.version;
156
+ },
157
+ /**
158
+ * The express application for the Editor Admin API
159
+ * @type ExpressApplication
160
+ * @memberof node-red
161
+ */
162
+ get httpAdmin() {
163
+ return import_editor_api.default.httpAdmin;
164
+ },
165
+ /**
166
+ * The express application for HTTP Nodes
167
+ * @type ExpressApplication
168
+ * @memberof node-red
169
+ */
170
+ get httpNode() {
171
+ return import_runtime.default.httpNode;
172
+ },
173
+ /**
174
+ * The HTTP Server used by the runtime
175
+ * @type HTTPServer
176
+ * @memberof node-red
177
+ */
178
+ get server() {
179
+ return server;
180
+ },
181
+ /**
182
+ * The runtime api
183
+ * @see @node-red/runtime
184
+ * @memberof node-red
185
+ */
186
+ runtime: import_runtime.default,
187
+ /**
188
+ * The editor authentication api.
189
+ * @see @node-red/editor-api_auth
190
+ * @memberof node-red
191
+ */
192
+ auth: import_editor_api.default.auth,
193
+ /**
194
+ * The editor authentication api.
195
+ * @see @node-red/editor-api_auth
196
+ * @memberof node-red
197
+ */
198
+ get diagnostics() {
199
+ return import_editor_api.default.diagnostics;
200
+ }
201
+ };
202
+ var red_default = RED;
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "@tachybase/plugin-adapter-red-node",
3
+ "version": "0.23.8",
4
+ "main": "dist/server/index.js",
5
+ "devDependencies": {
6
+ "@node-red/editor-api": "4.0.8",
7
+ "@node-red/nodes": "4.0.8",
8
+ "@node-red/runtime": "4.0.8",
9
+ "@node-red/util": "4.0.8",
10
+ "@types/express": "5.0.0",
11
+ "@types/node-red": "^1.3.5",
12
+ "express": "4.21.2",
13
+ "node-red": "4.0.8"
14
+ },
15
+ "peerDependencies": {
16
+ "@tachybase/client": "0.23.8",
17
+ "@tachybase/test": "0.23.8",
18
+ "@tachybase/server": "0.23.8"
19
+ },
20
+ "scripts": {
21
+ "build": "tachybase-build --no-dts @tachybase/plugin-adapter-red-node"
22
+ }
23
+ }
package/server.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './dist/server';
2
+ export { default } from './dist/server';
package/server.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/server/index.js');