Commit Graph

24 Commits

Author SHA1 Message Date
Richard Koshak
7bddeb4a7f
Standardize on js for SCRIPT (#14652)
This has the add-on docs consistent with the main docs.
Signed-off-by: Richard Koshak <rlkoshak@gmail.com>
2023-03-23 21:53:16 +01:00
Florian Hotze
ce2e76d6ee
[jsscripting] Bump openhab-js to 4.0.0 & Clean-Ups (#14375)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-02-14 21:19:59 +01:00
Florian Hotze
b91fc94bdb
[jsscripting] Update docs for code caching (#14166)
... and fix the table of contents.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-01-05 23:04:07 +01:00
Florian Hotze
f082df923f
[jsscripting] Fix regressions from #14135 & Log stack on IllegalArgumentException (#14142)
* [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>
2023-01-03 20:45:23 +01:00
Wouter Born
6e8b35c4c1
[jsscripting] Fix broken event object table (#13952)
The table is not properly rendered when reading the documentation in Main UI.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-12-15 07:51:22 +01:00
Florian Hotze
438552d485
[jsscripting] Upgrade openhab-js & Remove SharedCache (#13908)
Upgrades the included openhab-js version to 3.1.0, which uses the new
caches from core (introduced in
https://github.com/openhab/openhab-core/pull/2887) and provides many
doc improvements.

Removes the SharedCache from the addon because this functionality is
now provided by core (see
https://github.com/openhab/openhab-core/pull/2887).

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2022-12-11 15:25:39 +01:00
Дилян Палаузов
6c1373f7c2
Typos a/an (#13819) 2022-12-02 13:07:31 +01:00
Florian Hotze
bfff07bb01
[jsscripting] Reimplement timer creation method of ScriptExecution (#13695)
* [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>
2022-11-20 22:08:19 +01:00
Florian Hotze
b0d4f5a5fd
[jsscripting] Update openhab-js version to 2.1.0 (#13664)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2022-11-06 20:15:10 +01:00
Florian Hotze
bdefe17f08
[jsscripting] Upgrade openhab-js to 2.0.4 (#13565)
Fixes #13563.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2022-10-18 22:34:33 +02:00
Florian Hotze
39d221d3a8
[jsscripting] Update openhab-js to 2.0.3 (#13385)
* [jsscripting] Update openhab-js to 2.0.3
* [jsscripting] Update README

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2022-09-13 21:57:09 +02:00
Florian Hotze
b2087e3807
[jsscripting] Upgrade openhab-js to version 2.0.0 (#12945)
* 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>
2022-06-18 13:24:05 +02:00
Daniel Lienert
47418606c6
DOCS: Add missing bracket (#12722) 2022-05-12 07:40:48 +02:00
Дилян Палаузов
6451afae5c
automation.jsscripting/README: hypelink (#12638) 2022-04-22 15:29:26 +02:00
Дилян Палаузов
e44eb7d679
automation.jsscripting/README: typo (#12637) 2022-04-22 15:28:10 +02:00
Wouter Born
b3ade70e29
Fix SAT MarkdownCheck image location findings (#12591)
This fixes all the MarkdownCheck "Images must be located in the doc/ folder." findings.

Fixes #12590

Signed-off-by: Wouter Born <github@maindrain.net>
2022-04-09 16:56:13 +02:00
Dan Cunningham
00da156b1b
[jsscripting] Updates to latest openhab-js library (#12171)
* Updates to latest openhab-js library
* Update for new default log level in 3.3

Signed-off-by: Dan Cunningham <dan@digitaldan.com>
2022-01-30 18:28:58 +01:00
Richard Koshak
df7d111bce
changedSince returns a boolean, not a Number (#12079) 2022-01-20 16:51:39 +01:00
Markus Lipp
dba4b0088f
[jsscripting] Fixed links to JS-Joda (#11950)
Fixed path to JS-Joda github page to be formatter as external links
2022-01-03 13:52:05 +01:00
Dan Cunningham
ec10dfe897
[jsscripting] Update docs and refactor path (#11827)
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>
2021-12-21 23:36:22 +01:00
Michael Aschenborn
8ea76db693
Update README.md (#11836)
missing )
2021-12-21 18:39:32 +01:00
Dan Cunningham
fe271e3c4a
[jsscripting] Library and Doc updates (#11800)
* [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>
2021-12-17 08:00:44 +01:00
Florian Hotze
9bde2df3b4
[jsscripting] Improve docs with Actions (#11624)
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>
2021-11-29 09:44:26 +01:00
Jonathan Gilbert
9912e1afc2
[jsscripting] ES6+ Support (#8516)
Signed-off-by: Jonathan Gilbert <jpg@trillica.com>
2021-05-06 09:08:47 +02:00