]> git.basschouten.com Git - openhab-addons.git/commitdiff
[jsscripting] Bump openhab-js version to 4.4.0 (#15128)
authorFlorian Hotze <florianh_dev@icloud.com>
Tue, 20 Jun 2023 13:40:11 +0000 (15:40 +0200)
committerGitHub <noreply@github.com>
Tue, 20 Jun 2023 13:40:11 +0000 (15:40 +0200)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
bundles/org.openhab.automation.jsscripting/README.md
bundles/org.openhab.automation.jsscripting/doc/rule-config.png
bundles/org.openhab.automation.jsscripting/doc/rule-engines.png
bundles/org.openhab.automation.jsscripting/doc/rule-script.png
bundles/org.openhab.automation.jsscripting/doc/settings.png
bundles/org.openhab.automation.jsscripting/pom.xml

index e3b8e2e04b69fce94c032a689d34b22fbe5bfdef..d2112f77ca670678fb966a9a4638a9fe19df1bf7 100644 (file)
@@ -1109,7 +1109,7 @@ Operations and conditions can also optionally take functions:
 
 ```javascript
 rules.when().item("F1_light").changed().then(event => {
-    console.log(event);
+  console.log(event);
 }).build("Test Rule", "My Test Rule");
 ```
 
@@ -1225,21 +1225,22 @@ The `event` object provides some information about that trigger.
 
 This table gives an overview over the `event` object:
 
-| Property Name     | Trigger Types                                        | Description                                                                         | Rules DSL Equivalent   |
-|-------------------|------------------------------------------------------|-------------------------------------------------------------------------------------|------------------------|
-| `oldState`        | `ItemStateChangeTrigger`, `GroupStateChangeTrigger`  | Previous state of Item or Group that triggered event                                | `previousState`        |
-| `newState`        | `ItemStateChangeTrigger`, `GroupStateChangeTrigger`  | New state of Item or Group that triggered event                                     | N/A                    |
-| `receivedState`   | `ItemStateUpdateTrigger`, `GroupStateUpdateTrigger`  | State of Item that triggered event                                                  | `triggeringItem.state` |
-| `receivedCommand` | `ItemCommandTrigger`, `GroupCommandTrigger`          | Command that triggered event                                                        | `receivedCommand`      |
-| `itemName`        | `Item****Trigger`, `Group****Trigger`                | Name of Item that triggered event                                                   | `triggeringItem.name`  |
-| `receivedEvent`   | `ChannelEventTrigger`                                | Channel event that triggered event                                                  | N/A                    |
-| `channelUID`      | `ChannelEventTrigger`                                | UID of channel that triggered event                                                 | N/A                    |
-| `oldStatus`       | `ThingStatusChangeTrigger`                           | Previous state of Thing that triggered event                                        | N/A                    |
-| `newStatus`       | `ThingStatusChangeTrigger`                           | New state of Thing that triggered event                                             | N/A                    |
-| `status`          | `ThingStatusUpdateTrigger`                           | State of Thing that triggered event                                                 | N/A                    |
-| `thingUID`        | `Thing****Trigger`                                   | UID of Thing that triggered event                                                   | N/A                    |
-| `eventType`       | all except `PWMTrigger`, `PIDTrigger`, time triggers | Type of event that triggered event (change, command, triggered, update)             | N/A                    |
-| `triggerType`     | all except `PWMTrigger`, `PIDTrigger`, time triggers | Type of trigger that triggered event                                                | N/A                    |
+| Property Name     | Trigger Types                                        | Description                                                             | Rules DSL Equivalent   |
+|-------------------|------------------------------------------------------|-------------------------------------------------------------------------|------------------------|
+| `oldState`        | `ItemStateChangeTrigger`, `GroupStateChangeTrigger`  | Previous state of Item or Group that triggered event                    | `previousState`        |
+| `newState`        | `ItemStateChangeTrigger`, `GroupStateChangeTrigger`  | New state of Item or Group that triggered event                         | N/A                    |
+| `receivedState`   | `ItemStateUpdateTrigger`, `GroupStateUpdateTrigger`  | State of Item that triggered event                                      | `triggeringItem.state` |
+| `receivedCommand` | `ItemCommandTrigger`, `GroupCommandTrigger`          | Command that triggered event                                            | `receivedCommand`      |
+| `itemName`        | `Item****Trigger`, `Group****Trigger`                | Name of Item that triggered event                                       | `triggeringItem.name`  |
+| `groupName`       | `Group****Trigger`                                   | Name of the group whose member triggered event                          | N/A                    |
+| `receivedEvent`   | `ChannelEventTrigger`                                | Channel event that triggered event                                      | N/A                    |
+| `channelUID`      | `ChannelEventTrigger`                                | UID of channel that triggered event                                     | N/A                    |
+| `oldStatus`       | `ThingStatusChangeTrigger`                           | Previous state of Thing that triggered event                            | N/A                    |
+| `newStatus`       | `ThingStatusChangeTrigger`                           | New state of Thing that triggered event                                 | N/A                    |
+| `status`          | `ThingStatusUpdateTrigger`                           | State of Thing that triggered event                                     | N/A                    |
+| `thingUID`        | `Thing****Trigger`                                   | UID of Thing that triggered event                                       | N/A                    |
+| `eventType`       | all except `PWMTrigger`, `PIDTrigger`, time triggers | Type of event that triggered event (change, command, triggered, update) | N/A                    |
+| `triggerType`     | all except `PWMTrigger`, `PIDTrigger`, time triggers | Type of trigger that triggered event                                    | N/A                    |
 
 All properties are typeof `string`.
 
index e26c6a07cd11601e59035c20743695d7d3eb07c4..f338d23dc4e6176f3a330d0c0872561fc570f311 100644 (file)
Binary files a/bundles/org.openhab.automation.jsscripting/doc/rule-config.png and b/bundles/org.openhab.automation.jsscripting/doc/rule-config.png differ
index 6faa0fb6c11f9638ea923ef3e394598f7f706c2c..5c382879f05df63e205b78835bdd14807979edcc 100644 (file)
Binary files a/bundles/org.openhab.automation.jsscripting/doc/rule-engines.png and b/bundles/org.openhab.automation.jsscripting/doc/rule-engines.png differ
index 585d16e15ef3585b9ff4157bb9d7ebbf56736f26..63f05273d9f3d3ec6a732c286ddb30162efca4ef 100644 (file)
Binary files a/bundles/org.openhab.automation.jsscripting/doc/rule-script.png and b/bundles/org.openhab.automation.jsscripting/doc/rule-script.png differ
index 0e9a6eb536fdeac4d25705bbf73b4756200f8906..a0f5dddc059a3c3efaaac2a91f99fa37862a9dd6 100644 (file)
Binary files a/bundles/org.openhab.automation.jsscripting/doc/settings.png and b/bundles/org.openhab.automation.jsscripting/doc/settings.png differ
index 3cb3aaabc052b653cd0e40673a77fa2d3e9a94b5..98444bc3e2f67417701a2c13dd25804d5023c2e7 100644 (file)
@@ -24,7 +24,7 @@
     </bnd.importpackage>
     <graal.version>22.0.0.2</graal.version> <!-- DO NOT UPGRADE: 22.0.0.2 is the latest version working on armv7l / OpenJDK 11.0.16 & armv7l / Zulu 17.0.5+8 -->
     <oh.version>${project.version}</oh.version>
-    <ohjs.version>openhab@4.3.0</ohjs.version>
+    <ohjs.version>openhab@4.4.0</ohjs.version>
   </properties>
 
   <build>
@@ -67,7 +67,7 @@
             </goals>
             <configuration>
               <!--suppress UnresolvedMavenProperty -->
-              <arguments>install ${ohjs.version} webpack@5.75.0 webpack-cli@4.10.0</arguments> <!-- webpack-cli >= 5.0.0 doesn't properly process the given entrypoint -->
+              <arguments>install ${ohjs.version} webpack@^5.87.0 webpack-cli@^5.1.4</arguments> <!-- webpack & webpack-cli versions should match to the ones from openhab-js -->
             </configuration>
           </execution>
           <execution>
@@ -77,8 +77,8 @@
             </goals>
             <configuration>
               <!--suppress UnresolvedMavenProperty -->
-              <arguments>webpack -c ./node_modules/openhab/@globals-webpack.config.js --entry
-                ./node_modules/openhab/@openhab-globals.js -o ./dist</arguments>
+              <arguments>webpack -c ./node_modules/openhab/build/@globals-webpack.config.js --entry-reset --entry
+                ./node_modules/openhab/build/@openhab-globals.js -o ./dist</arguments>
             </configuration>
           </execution>
           <execution>
@@ -87,7 +87,9 @@
               <goal>npx</goal>
             </goals>
             <configuration>
-              <arguments>webpack -c ./node_modules/openhab/webpack.config.js --entry ./node_modules/openhab/ -o ./dist</arguments>
+              <!--suppress UnresolvedMavenProperty -->
+              <arguments>webpack -c ./node_modules/openhab/build/webpack.config.js --entry-reset --entry
+                ./node_modules/openhab/ -o ./dist</arguments>
             </configuration>
           </execution>
         </executions>