diff --git a/package.json b/package.json index a4434324..e77fe39c 100644 --- a/package.json +++ b/package.json @@ -20,29 +20,29 @@ "homepage": "http://openstagecontrol.ammd.net/", "license": "GPL-3.0", "dependencies": { - "@babel/core": "7.9.0", - "@babel/plugin-proposal-object-rest-spread": "7.9.0", - "@babel/polyfill": "7.8.7", - "@babel/preset-env": "7.9.0", + "@babel/core": "7.10.3", + "@babel/plugin-proposal-object-rest-spread": "7.10.3", + "@babel/polyfill": "7.10.1", + "@babel/preset-env": "7.10.3", "ansi-html": "0.0.7", "babel-eslint": "10.1.0", "babelify": "10.0.0", "bonjour": "github:jean-emmanuel/bonjour", - "browserify": "16.5.0", + "browserify": "16.5.1", "chroma-js": "2.1.0", - "core-js": "3.6.4", + "core-js": "3.6.5", "cpr": "3.0.1", "deep-extend": "0.6.0", "electron-localshortcut": "3.2.1", "electron-packager": "14.2.1", "electron-packager-plugin-non-proprietary-codecs-ffmpeg": "1.0.2", "env-paths": "2.2.0", - "eslint": "6.8.0", + "eslint": "7.3.1", "exorcist": "1.0.1", "file-saver": "2.0.2", "gyronorm": "2.0.6", - "http-auth": "^4.1.2", - "json5": "2.1.2", + "http-auth": "4.1.2", + "json5": "2.1.3", "jsondiffpatch": "0.4.1", "keyboardjs": "2.6.3", "licensify": "3.1.3", @@ -50,27 +50,27 @@ "minimatch": "3.0.4", "nanohtml": "1.9.1", "nanoid": "2.1.11", - "nanomorph": "5.4.0", + "nanomorph": "5.4.1", "node-forge": "0.9.1", - "node-sass": "4.13.1", - "nodemon": "2.0.2", - "nosleep.js": "0.9.0", - "open": "^7.0.3", - "osc": "2.4.0", - "python-shell": "1.0.8", - "replacestream": "^4.0.3", - "sanitize-html": "1.22.1", + "node-sass": "4.14.1", + "nodemon": "2.0.4", + "nosleep.js": "0.11.0", + "open": "7.0.4", + "osc": "2.4.1", + "python-shell": "2.0.1", + "replacestream": "4.0.3", + "sanitize-html": "1.27.0", "scope-css": "1.2.1", "screenfull": "5.0.2", - "semver": "^7.1.3", + "semver": "7.3.2", "send": "0.17.1", "sortablejs": "1.10.2", - "source-map-support": "0.5.16", + "source-map-support": "0.5.19", "stacktrace-js": "2.0.2", "through": "2.3.8", "uglifyify": "5.0.2", "webworkify": "1.5.0", - "ws": "7.2.3", + "ws": "7.3.0", "yargs": "15.3.1" }, "optionalDependencies": { diff --git a/resources/docs/docs/custom-module/examples.md b/resources/docs/docs/custom-module/examples.md index ccca6191..75ce3486 100644 --- a/resources/docs/docs/custom-module/examples.md +++ b/resources/docs/docs/custom-module/examples.md @@ -29,6 +29,41 @@ module.exports = { } ``` +## Value conversion + +```js +module.exports = { + + oscInFilter:function(data){ + + var {address, args, host, port} = data + + if (address === '/some_address') { + + args[0].value = args[0].value * 10 + + } + + return {address, args, host, port} + + }, + + oscOutFilter:function(data){ + + var {address, args, host, port, clientId} = data + + if (address === '/some_address') { + + args[0].value = args[0].value / 10 + + } + + return {address, args, host, port} + } + +} +``` + ## Arguments split / merge ```js diff --git a/resources/docs/docs/widgets/advanced-syntaxes.md b/resources/docs/docs/widgets/advanced-syntaxes.md index 8a628d51..32ffaa8e 100644 --- a/resources/docs/docs/widgets/advanced-syntaxes.md +++ b/resources/docs/docs/widgets/advanced-syntaxes.md @@ -44,7 +44,7 @@ This syntax allows listening on an osc address to define a property. - `address`: osc address to listen to; if the leading slash (`/`) is omitted, the address will be prefixed with the widget's `address` property - `default` (optional): default value returned before any message is received. Must be a primitive value, not an object or an array. -- `usePreArgs` (optional): by default, osc listeners inherit the widget's `preArgs` and (these must be matched for the osc messages to be processed). Set to `false` bypass them. +- `usePreArgs` (optional): by default, osc listeners inherit the widget's `preArgs` (these must be matched for the osc messages to be processed). Set to `false` bypass them. Options can contain `@{}` blocks. diff --git a/resources/docs/docs/widgets/properties-reference.md b/resources/docs/docs/widgets/properties-reference.md index 20b787cc..cd9e9fe6 100644 --- a/resources/docs/docs/widgets/properties-reference.md +++ b/resources/docs/docs/widgets/properties-reference.md @@ -442,7 +442,7 @@ |
logScaleX#
| `boolean`|
`number` | false | Set to `true` to use logarithmic scale for the x axis (base 10). Set to a `number` to define the logarithm's base. | |
logScaleY#
| `boolean`|
`number` | false | Set to `true` to use logarithmic scale for the y axis (base 10). Set to a `number` to define the logarithm's base. | |
origin#
| `number` | "auto" | Defines the y axis origin. Set to `false` to disable it. | - |
dots#
| `boolean` | true | Draw dots on the line | + |
dots#
| `boolean` | false | Draw dots on the line | |
bars#
| `boolean` | false | Set to `true` to use draw bars instead (disables `logScaleX` and forces `x axis` even spacing) | |
pips#
| `boolean` | true | Set to `false` to hide the scale | diff --git a/src/server/index.js b/src/server/index.js index 34384766..f94166c3 100644 --- a/src/server/index.js +++ b/src/server/index.js @@ -21,11 +21,9 @@ if (settings.read('docs')) return openDocs() function nodeMode() { - console.warn('(INFO) Running with node') - if (!settings.read('no-gui')) { settings.write('no-gui', true, true) - console.warn('(INFO) Headless mode (--no-gui) enabled automatically') + console.warn('(INFO) Headless mode (--no-gui) enabled automatically (running with node)') } process.on('uncaughtException', (err)=>{ @@ -155,8 +153,8 @@ if (settings.cli) { ipcMain.on('start',function(e, options){ - var args = ['--no-gui'] - if (process.platform === 'win32') args.unshift('--') + var args = ['--', '--no-gui'] + // if (process.platform === 'win32') args.unshift('--') // not needed with ELECTRON_RUN_AS_NODE since '--' is always prepended for (var k in settings.read('options')) { args.push('--' + k) var val = settings.read(k) @@ -167,7 +165,7 @@ if (settings.cli) { } } - global.serverProcess = spawn(process.argv[0], process.argv.slice(1).concat(args), {stdio: 'pipe'/*, env: {"ELECTRON_RUN_AS_NODE":"1"}*/}) + global.serverProcess = spawn(process.argv[0], process.argv.slice(1).concat(args), {stdio: 'pipe', env: {'ELECTRON_RUN_AS_NODE':'1'}}) launcher.webContents.send('server-started') if (!settings.read('no-gui')) {