mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[jsscripting] Update library and change config PID (#11777)
* Use OH standrard component pid naming, default injection to true. * Bump openhab-js Signed-off-by: Dan Cunningham <dan@digitaldan.com>
This commit is contained in:
parent
4481ecff61
commit
22b9be1390
@ -25,7 +25,7 @@
|
||||
<graal.version>21.3.0</graal.version>
|
||||
<asm.version>6.2.1</asm.version>
|
||||
<oh.version>${project.version}</oh.version>
|
||||
<ohjs.version>openhab@0.0.1-beta.3</ohjs.version>
|
||||
<ohjs.version>openhab@1.2.0</ohjs.version>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
|
@ -33,13 +33,13 @@ import org.osgi.service.component.annotations.Modified;
|
||||
* @author Jonathan Gilbert - Initial contribution
|
||||
* @author Dan Cunningham - Script injections
|
||||
*/
|
||||
@Component(service = ScriptEngineFactory.class, configurationPid = "org.openhab.automation.jsscripting", property = Constants.SERVICE_PID
|
||||
+ "=org.openhab.automation.jsscripting")
|
||||
@Component(service = ScriptEngineFactory.class, configurationPid = "org.openhab.jsscripting", property = Constants.SERVICE_PID
|
||||
+ "=org.openhab.jsscripting")
|
||||
@ConfigurableService(category = "automation", label = "JS Scripting", description_uri = "automation:jsscripting")
|
||||
public final class GraalJSScriptEngineFactory implements ScriptEngineFactory {
|
||||
private static final String CFG_INJECTION_ENABLED = "injectionEnabled";
|
||||
private static final String INJECTION_CODE = "Object.assign(this, require('openhab'));";
|
||||
private boolean injectionEnabled;
|
||||
private boolean injectionEnabled = true;
|
||||
|
||||
public static final String MIME_TYPE = "application/javascript;version=ECMAScript-2021";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user