[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:
Dan Cunningham 2021-12-13 23:30:32 -08:00 committed by GitHub
parent 4481ecff61
commit 22b9be1390
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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>

View File

@ -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";