* [jsscripting] Fix bundling of global script & regression from #14135
Fixes the regression from https://github.com/openhab/openhab-addons/pull/14135#issuecomment-1369231126.
While working on this, I also noticed that the cache openhab-js does not work because of wrong webpack commandline args in the pom (wrong entrypoint).
* [jsscripting] Enable stack logging for IllegalArgumentExceptions
* [jsscripting] Upgrade openhab-js to 3.2.4
* [jsscripting] Update README for recent PR
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
* [jsscripting] Refactor ThreadsafeTimers to create futures inline instead of in an extra methods
* [jsscripting] Introduce utility class for providing easy access to script services
* [jsscripting] Reimplement timer creation methods from ScriptExecution for thread-safety
* [jsscripting] Add missing JavaDoc for reimplement timer creation methods
* [jsscripting] Remove the future from the map when setTimeout expires
* [jsscripting] Rename `GraalJSScriptServiceUtil` to `JSScriptServiceUtil`
* [jsscripting] Remove the `createTimerWithArgument` method
* [jsscripting] Replace the OSGi workaround of `JSScriptServiceUtil` with an injection mechanism
* [jsscripting] Use constructor to inject `JSScriptServiceUtil` into `GraalJSScriptEngineFactory`
* [jsscripting] Minor improvements by @J-N-K (#1)
* [jsscripting] Minor changes related to last commit to keep flexibility of `JSRuntimeFeatures`
* [jsscripting] Upgrade openhab-js to v2.1.1
* [jsscripting] Remove unused code
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Co-authored-by: Jan N. Klug <github@klug.nrw>
* Bump openhab-js version to 2.0.0
* Update README for current openhab-js version
* README: Fix paths to images
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
This adds a minor refactoring of loading local resource paths that i didn't have time to get into 3.2 and moves the docs directory to doc.
Signed-off-by: Dan Cunningham <dan@digitaldan.com>
* [jsscripting] Library and Doc updates
This updates the documentation, bumps the NPM version library, and implements conversion of JS date types (js-joda) to Java types
Signed-off-by: Dan Cunningham <dan@digitaldan.com>
Updated the documentation with:
* Core Actions
* Cloud Notification Actions
* Persistence Extensions
* Ephemeris Actions
* Types and Units
Instead of the single "imports", the default scope
(openhab-core/DefaultScriptScopeProvider.java) is used.
It's imported as `openhab`, services are under `openhab.service`.
As the helper library is on the way (openhab/openhab-js):
* Added note about console.log and logging in general.
* Added note that the lib is on the way.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>