node-red-contrib-homebridge-automation 0.1.12-beta.9 → 0.2.1-beta.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.
Files changed (41) hide show
  1. package/.github/npm-version-script.js +35 -43
  2. package/.github/workflows/Build and Publish.yml +81 -75
  3. package/README.md +7 -4
  4. package/eslint.config.mjs +34 -0
  5. package/package.json +34 -25
  6. package/src/HAP-NodeRed.html +71 -71
  7. package/src/HAP-NodeRed.js +32 -1082
  8. package/src/HapDeviceRoutes.js +59 -0
  9. package/src/hbBaseNode.js +94 -0
  10. package/src/hbConfigNode.js +239 -0
  11. package/src/hbConfigNode.test.js +2179 -0
  12. package/src/hbControlNode.js +77 -0
  13. package/src/hbEventNode.js +23 -0
  14. package/src/hbResumeNode.js +63 -0
  15. package/src/hbStatusNode.js +37 -0
  16. package/test/node-red/.config.nodes.json +453 -0
  17. package/test/node-red/.config.nodes.json.backup +453 -0
  18. package/test/node-red/.config.runtime.json +4 -0
  19. package/test/node-red/.config.runtime.json.backup +3 -0
  20. package/test/node-red/.config.users.json +23 -0
  21. package/test/node-red/.config.users.json.backup +20 -0
  22. package/test/node-red/.flows.json.backup +2452 -0
  23. package/test/node-red/flows.json +2453 -0
  24. package/test/node-red/package.json +6 -0
  25. package/test/node-red/settings.js +593 -0
  26. package/test/node-red/test/node-red/.config.nodes.json +430 -0
  27. package/test/node-red/test/node-red/.config.runtime.json +4 -0
  28. package/test/node-red/test/node-red/.config.runtime.json.backup +3 -0
  29. package/test/node-red/test/node-red/.config.users.json +20 -0
  30. package/test/node-red/test/node-red/.config.users.json.backup +17 -0
  31. package/test/node-red/test/node-red/package.json +6 -0
  32. package/test/node-red/test/node-red/settings.js +593 -0
  33. package/.eslintrc.js +0 -24
  34. package/.nycrc.json +0 -11
  35. package/src/lib/Accessory.js +0 -126
  36. package/src/lib/Characteristic.js +0 -30
  37. package/src/lib/HbAccessories.js +0 -167
  38. package/src/lib/Homebridge.js +0 -71
  39. package/src/lib/Homebridges.js +0 -68
  40. package/src/lib/Service.js +0 -307
  41. package/src/lib/register.js +0 -156
@@ -0,0 +1,593 @@
1
+ /**
2
+ * This is the default settings file provided by Node-RED.
3
+ *
4
+ * It can contain any valid JavaScript code that will get run when Node-RED
5
+ * is started.
6
+ *
7
+ * Lines that start with // are commented out.
8
+ * Each entry should be separated from the entries above and below by a comma ','
9
+ *
10
+ * For more information about individual settings, refer to the documentation:
11
+ * https://nodered.org/docs/user-guide/runtime/configuration
12
+ *
13
+ * The settings are split into the following sections:
14
+ * - Flow File and User Directory Settings
15
+ * - Security
16
+ * - Server Settings
17
+ * - Runtime Settings
18
+ * - Editor Settings
19
+ * - Node Settings
20
+ *
21
+ **/
22
+
23
+ module.exports = {
24
+
25
+ /*******************************************************************************
26
+ * Flow File and User Directory Settings
27
+ * - flowFile
28
+ * - credentialSecret
29
+ * - flowFilePretty
30
+ * - userDir
31
+ * - nodesDir
32
+ ******************************************************************************/
33
+
34
+ /** The file containing the flows. If not set, defaults to flows_<hostname>.json **/
35
+ flowFile: 'flows.json',
36
+
37
+ /** By default, credentials are encrypted in storage using a generated key. To
38
+ * specify your own secret, set the following property.
39
+ * If you want to disable encryption of credentials, set this property to false.
40
+ * Note: once you set this property, do not change it - doing so will prevent
41
+ * node-red from being able to decrypt your existing credentials and they will be
42
+ * lost.
43
+ */
44
+ //credentialSecret: "a-secret-key",
45
+
46
+ /** By default, the flow JSON will be formatted over multiple lines making
47
+ * it easier to compare changes when using version control.
48
+ * To disable pretty-printing of the JSON set the following property to false.
49
+ */
50
+ flowFilePretty: true,
51
+
52
+ /** By default, all user data is stored in a directory called `.node-red` under
53
+ * the user's home directory. To use a different location, the following
54
+ * property can be used
55
+ */
56
+ //userDir: '/home/nol/.node-red/',
57
+
58
+ /** Node-RED scans the `nodes` directory in the userDir to find local node files.
59
+ * The following property can be used to specify an additional directory to scan.
60
+ */
61
+ //nodesDir: '/home/nol/.node-red/nodes',
62
+
63
+ /*******************************************************************************
64
+ * Security
65
+ * - adminAuth
66
+ * - https
67
+ * - httpsRefreshInterval
68
+ * - requireHttps
69
+ * - httpNodeAuth
70
+ * - httpStaticAuth
71
+ ******************************************************************************/
72
+
73
+ /** To password protect the Node-RED editor and admin API, the following
74
+ * property can be used. See https://nodered.org/docs/security.html for details.
75
+ */
76
+ //adminAuth: {
77
+ // type: "credentials",
78
+ // users: [{
79
+ // username: "admin",
80
+ // password: "$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN.",
81
+ // permissions: "*"
82
+ // }]
83
+ //},
84
+
85
+ /** The following property can be used to enable HTTPS
86
+ * This property can be either an object, containing both a (private) key
87
+ * and a (public) certificate, or a function that returns such an object.
88
+ * See http://nodejs.org/api/https.html#https_https_createserver_options_requestlistener
89
+ * for details of its contents.
90
+ */
91
+
92
+ /** Option 1: static object */
93
+ //https: {
94
+ // key: require("fs").readFileSync('privkey.pem'),
95
+ // cert: require("fs").readFileSync('cert.pem')
96
+ //},
97
+
98
+ /** Option 2: function that returns the HTTP configuration object */
99
+ // https: function() {
100
+ // // This function should return the options object, or a Promise
101
+ // // that resolves to the options object
102
+ // return {
103
+ // key: require("fs").readFileSync('privkey.pem'),
104
+ // cert: require("fs").readFileSync('cert.pem')
105
+ // }
106
+ // },
107
+
108
+ /** If the `https` setting is a function, the following setting can be used
109
+ * to set how often, in hours, the function will be called. That can be used
110
+ * to refresh any certificates.
111
+ */
112
+ //httpsRefreshInterval : 12,
113
+
114
+ /** The following property can be used to cause insecure HTTP connections to
115
+ * be redirected to HTTPS.
116
+ */
117
+ //requireHttps: true,
118
+
119
+ /** To password protect the node-defined HTTP endpoints (httpNodeRoot),
120
+ * including node-red-dashboard, or the static content (httpStatic), the
121
+ * following properties can be used.
122
+ * The `pass` field is a bcrypt hash of the password.
123
+ * See https://nodered.org/docs/security.html#generating-the-password-hash
124
+ */
125
+ //httpNodeAuth: {user:"user",pass:"$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN."},
126
+ //httpStaticAuth: {user:"user",pass:"$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN."},
127
+
128
+ /*******************************************************************************
129
+ * Server Settings
130
+ * - uiPort
131
+ * - uiHost
132
+ * - apiMaxLength
133
+ * - httpServerOptions
134
+ * - httpAdminRoot
135
+ * - httpAdminMiddleware
136
+ * - httpAdminCookieOptions
137
+ * - httpNodeRoot
138
+ * - httpNodeCors
139
+ * - httpNodeMiddleware
140
+ * - httpStatic
141
+ * - httpStaticRoot
142
+ * - httpStaticCors
143
+ ******************************************************************************/
144
+
145
+ /** the tcp port that the Node-RED web server is listening on */
146
+ uiPort: process.env.PORT || 1880,
147
+
148
+ /** By default, the Node-RED UI accepts connections on all IPv4 interfaces.
149
+ * To listen on all IPv6 addresses, set uiHost to "::",
150
+ * The following property can be used to listen on a specific interface. For
151
+ * example, the following would only allow connections from the local machine.
152
+ */
153
+ //uiHost: "127.0.0.1",
154
+
155
+ /** The maximum size of HTTP request that will be accepted by the runtime api.
156
+ * Default: 5mb
157
+ */
158
+ //apiMaxLength: '5mb',
159
+
160
+ /** The following property can be used to pass custom options to the Express.js
161
+ * server used by Node-RED. For a full list of available options, refer
162
+ * to http://expressjs.com/en/api.html#app.settings.table
163
+ */
164
+ //httpServerOptions: { },
165
+
166
+ /** By default, the Node-RED UI is available at http://localhost:1880/
167
+ * The following property can be used to specify a different root path.
168
+ * If set to false, this is disabled.
169
+ */
170
+ //httpAdminRoot: '/admin',
171
+
172
+ /** The following property can be used to add a custom middleware function
173
+ * in front of all admin http routes. For example, to set custom http
174
+ * headers. It can be a single function or an array of middleware functions.
175
+ */
176
+ // httpAdminMiddleware: function(req,res,next) {
177
+ // // Set the X-Frame-Options header to limit where the editor
178
+ // // can be embedded
179
+ // //res.set('X-Frame-Options', 'sameorigin');
180
+ // next();
181
+ // },
182
+
183
+ /** The following property can be used to set addition options on the session
184
+ * cookie used as part of adminAuth authentication system
185
+ * Available options are documented here: https://www.npmjs.com/package/express-session#cookie
186
+ */
187
+ // httpAdminCookieOptions: { },
188
+
189
+ /** Some nodes, such as HTTP In, can be used to listen for incoming http requests.
190
+ * By default, these are served relative to '/'. The following property
191
+ * can be used to specify a different root path. If set to false, this is
192
+ * disabled.
193
+ */
194
+ //httpNodeRoot: '/red-nodes',
195
+
196
+ /** The following property can be used to configure cross-origin resource sharing
197
+ * in the HTTP nodes.
198
+ * See https://github.com/troygoode/node-cors#configuration-options for
199
+ * details on its contents. The following is a basic permissive set of options:
200
+ */
201
+ //httpNodeCors: {
202
+ // origin: "*",
203
+ // methods: "GET,PUT,POST,DELETE"
204
+ //},
205
+
206
+ /** If you need to set an http proxy please set an environment variable
207
+ * called http_proxy (or HTTP_PROXY) outside of Node-RED in the operating system.
208
+ * For example - http_proxy=http://myproxy.com:8080
209
+ * (Setting it here will have no effect)
210
+ * You may also specify no_proxy (or NO_PROXY) to supply a comma separated
211
+ * list of domains to not proxy, eg - no_proxy=.acme.co,.acme.co.uk
212
+ */
213
+
214
+ /** The following property can be used to add a custom middleware function
215
+ * in front of all http in nodes. This allows custom authentication to be
216
+ * applied to all http in nodes, or any other sort of common request processing.
217
+ * It can be a single function or an array of middleware functions.
218
+ */
219
+ //httpNodeMiddleware: function(req,res,next) {
220
+ // // Handle/reject the request, or pass it on to the http in node by calling next();
221
+ // // Optionally skip our rawBodyParser by setting this to true;
222
+ // //req.skipRawBodyParser = true;
223
+ // next();
224
+ //},
225
+
226
+ /** When httpAdminRoot is used to move the UI to a different root path, the
227
+ * following property can be used to identify a directory of static content
228
+ * that should be served at http://localhost:1880/.
229
+ * When httpStaticRoot is set differently to httpAdminRoot, there is no need
230
+ * to move httpAdminRoot
231
+ */
232
+ //httpStatic: '/home/nol/node-red-static/', //single static source
233
+ /**
234
+ * OR multiple static sources can be created using an array of objects...
235
+ * Each object can also contain an options object for further configuration.
236
+ * See https://expressjs.com/en/api.html#express.static for available options.
237
+ * They can also contain an option `cors` object to set specific Cross-Origin
238
+ * Resource Sharing rules for the source. `httpStaticCors` can be used to
239
+ * set a default cors policy across all static routes.
240
+ */
241
+ //httpStatic: [
242
+ // {path: '/home/nol/pics/', root: "/img/"},
243
+ // {path: '/home/nol/reports/', root: "/doc/"},
244
+ // {path: '/home/nol/videos/', root: "/vid/", options: {maxAge: '1d'}}
245
+ //],
246
+
247
+ /**
248
+ * All static routes will be appended to httpStaticRoot
249
+ * e.g. if httpStatic = "/home/nol/docs" and httpStaticRoot = "/static/"
250
+ * then "/home/nol/docs" will be served at "/static/"
251
+ * e.g. if httpStatic = [{path: '/home/nol/pics/', root: "/img/"}]
252
+ * and httpStaticRoot = "/static/"
253
+ * then "/home/nol/pics/" will be served at "/static/img/"
254
+ */
255
+ //httpStaticRoot: '/static/',
256
+
257
+ /** The following property can be used to configure cross-origin resource sharing
258
+ * in the http static routes.
259
+ * See https://github.com/troygoode/node-cors#configuration-options for
260
+ * details on its contents. The following is a basic permissive set of options:
261
+ */
262
+ //httpStaticCors: {
263
+ // origin: "*",
264
+ // methods: "GET,PUT,POST,DELETE"
265
+ //},
266
+
267
+ /** The following property can be used to modify proxy options */
268
+ // proxyOptions: {
269
+ // mode: "legacy", // legacy mode is for non-strict previous proxy determination logic (node-red < v4 compatible)
270
+ // },
271
+
272
+ /*******************************************************************************
273
+ * Runtime Settings
274
+ * - lang
275
+ * - runtimeState
276
+ * - diagnostics
277
+ * - logging
278
+ * - contextStorage
279
+ * - exportGlobalContextKeys
280
+ * - externalModules
281
+ ******************************************************************************/
282
+
283
+ /** Uncomment the following to run node-red in your preferred language.
284
+ * Available languages include: en-US (default), ja, de, zh-CN, zh-TW, ru, ko
285
+ * Some languages are more complete than others.
286
+ */
287
+ // lang: "de",
288
+
289
+ /** Configure diagnostics options
290
+ * - enabled: When `enabled` is `true` (or unset), diagnostics data will
291
+ * be available at http://localhost:1880/diagnostics
292
+ * - ui: When `ui` is `true` (or unset), the action `show-system-info` will
293
+ * be available to logged in users of node-red editor
294
+ */
295
+ diagnostics: {
296
+ /** enable or disable diagnostics endpoint. Must be set to `false` to disable */
297
+ enabled: true,
298
+ /** enable or disable diagnostics display in the node-red editor. Must be set to `false` to disable */
299
+ ui: true,
300
+ },
301
+ /** Configure runtimeState options
302
+ * - enabled: When `enabled` is `true` flows runtime can be Started/Stopped
303
+ * by POSTing to available at http://localhost:1880/flows/state
304
+ * - ui: When `ui` is `true`, the action `core:start-flows` and
305
+ * `core:stop-flows` will be available to logged in users of node-red editor
306
+ * Also, the deploy menu (when set to default) will show a stop or start button
307
+ */
308
+ runtimeState: {
309
+ /** enable or disable flows/state endpoint. Must be set to `false` to disable */
310
+ enabled: false,
311
+ /** show or hide runtime stop/start options in the node-red editor. Must be set to `false` to hide */
312
+ ui: false,
313
+ },
314
+ /** Configure the logging output */
315
+ logging: {
316
+ /** Only console logging is currently supported */
317
+ console: {
318
+ /** Level of logging to be recorded. Options are:
319
+ * fatal - only those errors which make the application unusable should be recorded
320
+ * error - record errors which are deemed fatal for a particular request + fatal errors
321
+ * warn - record problems which are non fatal + errors + fatal errors
322
+ * info - record information about the general running of the application + warn + error + fatal errors
323
+ * debug - record information which is more verbose than info + info + warn + error + fatal errors
324
+ * trace - record very detailed logging + debug + info + warn + error + fatal errors
325
+ * off - turn off all logging (doesn't affect metrics or audit)
326
+ */
327
+ level: "info",
328
+ /** Whether or not to include metric events in the log output */
329
+ metrics: false,
330
+ /** Whether or not to include audit events in the log output */
331
+ audit: false
332
+ }
333
+ },
334
+
335
+ /** Context Storage
336
+ * The following property can be used to enable context storage. The configuration
337
+ * provided here will enable file-based context that flushes to disk every 30 seconds.
338
+ * Refer to the documentation for further options: https://nodered.org/docs/api/context/
339
+ */
340
+ //contextStorage: {
341
+ // default: {
342
+ // module:"localfilesystem"
343
+ // },
344
+ //},
345
+
346
+ /** `global.keys()` returns a list of all properties set in global context.
347
+ * This allows them to be displayed in the Context Sidebar within the editor.
348
+ * In some circumstances it is not desirable to expose them to the editor. The
349
+ * following property can be used to hide any property set in `functionGlobalContext`
350
+ * from being list by `global.keys()`.
351
+ * By default, the property is set to false to avoid accidental exposure of
352
+ * their values. Setting this to true will cause the keys to be listed.
353
+ */
354
+ exportGlobalContextKeys: false,
355
+
356
+ /** Configure how the runtime will handle external npm modules.
357
+ * This covers:
358
+ * - whether the editor will allow new node modules to be installed
359
+ * - whether nodes, such as the Function node are allowed to have their
360
+ * own dynamically configured dependencies.
361
+ * The allow/denyList options can be used to limit what modules the runtime
362
+ * will install/load. It can use '*' as a wildcard that matches anything.
363
+ */
364
+ externalModules: {
365
+ // autoInstall: false, /** Whether the runtime will attempt to automatically install missing modules */
366
+ // autoInstallRetry: 30, /** Interval, in seconds, between reinstall attempts */
367
+ // palette: { /** Configuration for the Palette Manager */
368
+ // allowInstall: true, /** Enable the Palette Manager in the editor */
369
+ // allowUpdate: true, /** Allow modules to be updated in the Palette Manager */
370
+ // allowUpload: true, /** Allow module tgz files to be uploaded and installed */
371
+ // allowList: ['*'],
372
+ // denyList: [],
373
+ // allowUpdateList: ['*'],
374
+ // denyUpdateList: []
375
+ // },
376
+ // modules: { /** Configuration for node-specified modules */
377
+ // allowInstall: true,
378
+ // allowList: [],
379
+ // denyList: []
380
+ // }
381
+ },
382
+
383
+
384
+ /*******************************************************************************
385
+ * Editor Settings
386
+ * - disableEditor
387
+ * - editorTheme
388
+ ******************************************************************************/
389
+
390
+ /** The following property can be used to disable the editor. The admin API
391
+ * is not affected by this option. To disable both the editor and the admin
392
+ * API, use either the httpRoot or httpAdminRoot properties
393
+ */
394
+ //disableEditor: false,
395
+
396
+ /** Customising the editor
397
+ * See https://nodered.org/docs/user-guide/runtime/configuration#editor-themes
398
+ * for all available options.
399
+ */
400
+ editorTheme: {
401
+ /** The following property can be used to set a custom theme for the editor.
402
+ * See https://github.com/node-red-contrib-themes/theme-collection for
403
+ * a collection of themes to chose from.
404
+ */
405
+ //theme: "",
406
+
407
+ /** To disable the 'Welcome to Node-RED' tour that is displayed the first
408
+ * time you access the editor for each release of Node-RED, set this to false
409
+ */
410
+ //tours: false,
411
+
412
+ palette: {
413
+ /** The following property can be used to order the categories in the editor
414
+ * palette. If a node's category is not in the list, the category will get
415
+ * added to the end of the palette.
416
+ * If not set, the following default order is used:
417
+ */
418
+ //categories: ['subflows', 'common', 'function', 'network', 'sequence', 'parser', 'storage'],
419
+ },
420
+
421
+ projects: {
422
+ /** To enable the Projects feature, set this value to true */
423
+ enabled: false,
424
+ workflow: {
425
+ /** Set the default projects workflow mode.
426
+ * - manual - you must manually commit changes
427
+ * - auto - changes are automatically committed
428
+ * This can be overridden per-user from the 'Git config'
429
+ * section of 'User Settings' within the editor
430
+ */
431
+ mode: "manual"
432
+ }
433
+ },
434
+
435
+ codeEditor: {
436
+ /** Select the text editor component used by the editor.
437
+ * As of Node-RED V3, this defaults to "monaco", but can be set to "ace" if desired
438
+ */
439
+ lib: "monaco",
440
+ options: {
441
+ /** The follow options only apply if the editor is set to "monaco"
442
+ *
443
+ * theme - must match the file name of a theme in
444
+ * packages/node_modules/@node-red/editor-client/src/vendor/monaco/dist/theme
445
+ * e.g. "tomorrow-night", "upstream-sunburst", "github", "my-theme"
446
+ */
447
+ // theme: "vs",
448
+ /** other overrides can be set e.g. fontSize, fontFamily, fontLigatures etc.
449
+ * for the full list, see https://microsoft.github.io/monaco-editor/docs.html#interfaces/editor.IStandaloneEditorConstructionOptions.html
450
+ */
451
+ //fontSize: 14,
452
+ //fontFamily: "Cascadia Code, Fira Code, Consolas, 'Courier New', monospace",
453
+ //fontLigatures: true,
454
+ }
455
+ },
456
+
457
+ markdownEditor: {
458
+ mermaid: {
459
+ /** enable or disable mermaid diagram in markdown document
460
+ */
461
+ enabled: true
462
+ }
463
+ },
464
+
465
+ multiplayer: {
466
+ /** To enable the Multiplayer feature, set this value to true */
467
+ enabled: false
468
+ },
469
+ },
470
+
471
+ /*******************************************************************************
472
+ * Node Settings
473
+ * - fileWorkingDirectory
474
+ * - functionGlobalContext
475
+ * - functionExternalModules
476
+ * - functionTimeout
477
+ * - nodeMessageBufferMaxLength
478
+ * - ui (for use with Node-RED Dashboard)
479
+ * - debugUseColors
480
+ * - debugMaxLength
481
+ * - debugStatusLength
482
+ * - execMaxBufferSize
483
+ * - httpRequestTimeout
484
+ * - mqttReconnectTime
485
+ * - serialReconnectTime
486
+ * - socketReconnectTime
487
+ * - socketTimeout
488
+ * - tcpMsgQueueSize
489
+ * - inboundWebSocketTimeout
490
+ * - tlsConfigDisableLocalFiles
491
+ * - webSocketNodeVerifyClient
492
+ ******************************************************************************/
493
+
494
+ /** The working directory to handle relative file paths from within the File nodes
495
+ * defaults to the working directory of the Node-RED process.
496
+ */
497
+ //fileWorkingDirectory: "",
498
+
499
+ /** Allow the Function node to load additional npm modules directly */
500
+ functionExternalModules: true,
501
+
502
+ /** Default timeout, in seconds, for the Function node. 0 means no timeout is applied */
503
+ functionTimeout: 0,
504
+
505
+ /** The following property can be used to set predefined values in Global Context.
506
+ * This allows extra node modules to be made available with in Function node.
507
+ * For example, the following:
508
+ * functionGlobalContext: { os:require('os') }
509
+ * will allow the `os` module to be accessed in a Function node using:
510
+ * global.get("os")
511
+ */
512
+ functionGlobalContext: {
513
+ // os:require('os'),
514
+ },
515
+
516
+ /** The maximum number of messages nodes will buffer internally as part of their
517
+ * operation. This applies across a range of nodes that operate on message sequences.
518
+ * defaults to no limit. A value of 0 also means no limit is applied.
519
+ */
520
+ //nodeMessageBufferMaxLength: 0,
521
+
522
+ /** If you installed the optional node-red-dashboard you can set it's path
523
+ * relative to httpNodeRoot
524
+ * Other optional properties include
525
+ * readOnly:{boolean},
526
+ * middleware:{function or array}, (req,res,next) - http middleware
527
+ * ioMiddleware:{function or array}, (socket,next) - socket.io middleware
528
+ */
529
+ //ui: { path: "ui" },
530
+
531
+ /** Colourise the console output of the debug node */
532
+ //debugUseColors: true,
533
+
534
+ /** The maximum length, in characters, of any message sent to the debug sidebar tab */
535
+ debugMaxLength: 1000,
536
+
537
+ /** The maximum length, in characters, of status messages under the debug node */
538
+ //debugStatusLength: 32,
539
+
540
+ /** Maximum buffer size for the exec node. Defaults to 10Mb */
541
+ //execMaxBufferSize: 10000000,
542
+
543
+ /** Timeout in milliseconds for HTTP request connections. Defaults to 120s */
544
+ //httpRequestTimeout: 120000,
545
+
546
+ /** Retry time in milliseconds for MQTT connections */
547
+ mqttReconnectTime: 15000,
548
+
549
+ /** Retry time in milliseconds for Serial port connections */
550
+ serialReconnectTime: 15000,
551
+
552
+ /** Retry time in milliseconds for TCP socket connections */
553
+ //socketReconnectTime: 10000,
554
+
555
+ /** Timeout in milliseconds for TCP server socket connections. Defaults to no timeout */
556
+ //socketTimeout: 120000,
557
+
558
+ /** Maximum number of messages to wait in queue while attempting to connect to TCP socket
559
+ * defaults to 1000
560
+ */
561
+ //tcpMsgQueueSize: 2000,
562
+
563
+ /** Timeout in milliseconds for inbound WebSocket connections that do not
564
+ * match any configured node. Defaults to 5000
565
+ */
566
+ //inboundWebSocketTimeout: 5000,
567
+
568
+ /** To disable the option for using local files for storing keys and
569
+ * certificates in the TLS configuration node, set this to true.
570
+ */
571
+ //tlsConfigDisableLocalFiles: true,
572
+
573
+ /** The following property can be used to verify WebSocket connection attempts.
574
+ * This allows, for example, the HTTP request headers to be checked to ensure
575
+ * they include valid authentication information.
576
+ */
577
+ //webSocketNodeVerifyClient: function(info) {
578
+ // /** 'info' has three properties:
579
+ // * - origin : the value in the Origin header
580
+ // * - req : the HTTP request
581
+ // * - secure : true if req.connection.authorized or req.connection.encrypted is set
582
+ // *
583
+ // * The function should return true if the connection should be accepted, false otherwise.
584
+ // *
585
+ // * Alternatively, if this function is defined to accept a second argument, callback,
586
+ // * it can be used to verify the client asynchronously.
587
+ // * The callback takes three arguments:
588
+ // * - result : boolean, whether to accept the connection or not
589
+ // * - code : if result is false, the HTTP error status to return
590
+ // * - reason: if result is false, the HTTP reason string to return
591
+ // */
592
+ //},
593
+ }
package/.eslintrc.js DELETED
@@ -1,24 +0,0 @@
1
- module.exports = {
2
- env: {
3
- es6: true,
4
- node: true,
5
- mocha: true,
6
- },
7
- extends: ['eslint:recommended', 'plugin:mocha/recommended'],
8
- globals: {
9
- Atomics: 'readonly',
10
- SharedArrayBuffer: 'readonly',
11
- },
12
- parserOptions: {
13
- ecmaVersion: 2018,
14
- sourceType: 'module',
15
- },
16
- plugins: ['mocha'],
17
- rules: {
18
- indent: ['error', 2, { SwitchCase: 1 }],
19
- 'linebreak-style': ['error', 'unix'],
20
- quotes: ['error', 'single'],
21
- semi: ['error', 'always'],
22
- 'no-console': 'off',
23
- },
24
- };
package/.nycrc.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "reporter": [
3
- "lcov",
4
- "text-summary"
5
- ],
6
- "lines": 100,
7
- "statements": 100,
8
- "functions": 100,
9
- "branches": 100,
10
- "check-coverage": true
11
- }