Commit Graph

43 Commits

Author SHA1 Message Date
Florian Hotze
9b4ee482ab
[jsscripting] Upgrade openhab-js to 5.8.1 (#17885)
Changelog: https://github.com/openhab/openhab-js/blob/main/CHANGELOG.md#581.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2024-12-11 16:48:05 +01:00
Florian Hotze
fc478a7114
[jsscripting] Upgrade openhab-js to 5.8.0 & Add note to check core fix on on upgrade (#17703)
* [jsscripting] Upgrade to openhab-js 5.8.0

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2024-11-05 21:16:43 +01:00
Florian Hotze
19c18be297
[jsscripting] Upgrade openhab-js to 5.7.0 (#17441)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-09-19 23:36:25 +02:00
Florian Hotze
8fb03da095
[jsscripting] Upgrade to openhab-js 5.6.0 (#17424)
Also sync webpack dependency with openhab-js package.json.

* [jsscripting] README changes from ohjs upgrade

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-09-16 12:28:46 +02:00
SkyLined
643b4e8c02
Add info about npm requiring path (#17022)
The command to install an npm package that was suggested in the documentation would not work, as it was missing the required path. I've added information to explain this is required.

Signed-off-by: SkyLined <cojmpjum_github.com@sxd.be>
2024-07-10 09:31:32 +02:00
Florian Hotze
5487b9c05d
[jsscripting] Fix notification builder examples (#16999)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-05 10:50:39 +02:00
Florian Hotze
2d412023a9
[jsscripting] Upgrade to openhab-js 5.3.1 (#16985)
Depends on #16979.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-04 14:07:21 +02:00
Florian Hotze
001dd6aba7
[jsscripting] Upgrade openhab-js to 5.3.0 (#16951)
This adds the new notification builder.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-06-28 19:15:49 +02:00
Florian Hotze
6ccaf813e6
[jsscripting] Upgrade openhab-js to 5.2.0 (#16935)
Adds support for https://github.com/openhab/openhab-core/pull/4259.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-06-25 20:47:15 +02:00
Florian Hotze
53fa23b957
[jsscripting] Upgrade openhab-js to 5.1.0 (#16881)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-06-16 20:33:50 +02:00
Florian Hotze
42c297a0ee
[jsscripting] Upgrade openhab-js to 5.0.0 (#16719)
See https://github.com/openhab/openhab-js/blob/main/CHANGELOG.md#500.

Required to adjust to breaking changes from https://github.com/openhab/openhab-core/pull/3736.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-05-05 22:57:06 +02:00
Florian Hotze
3ca4b4f749
[jsscripting] Upgrade to openhab-js 4.9.0 (#16576)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-25 21:11:24 +01:00
Florian Hotze
6540d0dda9
[jsscripting] Upgrade openhab-js to 4.7.3 (#16112)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-25 23:52:59 +01:00
Florian Hotze
7b16ef1de8
[jsscripting] Upgrade openhab-js to 4.7.0 (#16062)
You'll find the changelog at the openhab-js repo: https://github.com/openhab/openhab-js/blob/main/CHANGELOG.md#470.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-14 20:23:37 +01:00
Florian Hotze
99f0512c73
[jsscripting] Rename library injection parameter & Improve docs (#15547)
* [jsscripting] Rename parameter useIncludedLibrary to injectionCachingEnabled (#4)
* [jsscripting] Improve README for cached library injection
* Remove settings image

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-26 22:59:20 +02:00
Wouter Born
c71a24f8a1
Link to Java 17 documentation (#15406)
This prevents issues because older documentation may not apply to Java 17.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-08-13 13:44:05 +02:00
Florian Hotze
828c895b54
[jsscripting] Bump openhab-js version to 4.4.0 (#15128)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-06-20 15:40:11 +02:00
Florian Hotze
aa3d6b0dc9
[jsscripting] Add type translation for Instant & Minor improvements (#14984)
* [jsscripting] Minor code improvements
* [jsscripting] Add type mapping for `Instant`
* [jsscripting] Upgrade openhab-js to 4.3.0

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-05-13 12:25:06 +02:00
Florian Hotze
03b305bde2
[jsscripting] Bump openhab-js to 4.2.1 (#14749)
* [jsscripting] Upgrade openhab-js to 4.2.1
* [jsscripting] Note that it is based on GraalJS

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-04-06 15:50:09 +02:00
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