diff --git a/bundles/element-web/items.py b/bundles/element-web/items.py index b141c97..a832829 100644 --- a/bundles/element-web/items.py +++ b/bundles/element-web/items.py @@ -33,7 +33,7 @@ actions = { 'yarn build', ]), 'needs': { - 'action:nodejs_install_yarn', + 'action:apt_execute_update_commands', 'pkg_apt:nodejs', }, 'triggered': True, diff --git a/bundles/element-web/metadata.py b/bundles/element-web/metadata.py index 0ce259a..b68b481 100644 --- a/bundles/element-web/metadata.py +++ b/bundles/element-web/metadata.py @@ -11,6 +11,26 @@ defaults = { }, } +@metadata_reactor.provides( + 'nodejs/version', +) +def nodejs(metadata): + version = tuple([int(i) for i in metadata.get('element-web/version')[1:].split('.')]) + + if version >= (1, 11, 71): + return { + 'nodejs': { + 'version': 20, + }, + } + else: + return { + 'nodejs': { + 'version': 18, + }, + } + + @metadata_reactor.provides( 'nginx/vhosts/element-web', ) diff --git a/bundles/paperless-ng/metadata.py b/bundles/paperless-ng/metadata.py index b9ab153..91a18c6 100644 --- a/bundles/paperless-ng/metadata.py +++ b/bundles/paperless-ng/metadata.py @@ -33,6 +33,9 @@ defaults = { '/mnt/paperless', }, }, + 'nodejs': { + 'version': 18, + }, 'postgresql': { 'roles': { 'paperless': { diff --git a/bundles/powerdnsadmin/metadata.py b/bundles/powerdnsadmin/metadata.py index d7e93be..e6f5014 100644 --- a/bundles/powerdnsadmin/metadata.py +++ b/bundles/powerdnsadmin/metadata.py @@ -13,6 +13,9 @@ defaults = { 'python3-wheel': {}, }, }, + 'nodejs': { + 'version': 18, + }, 'users': { 'powerdnsadmin': { 'home': '/opt/powerdnsadmin', diff --git a/bundles/pretalx/metadata.py b/bundles/pretalx/metadata.py index f60c54b..7bbad24 100644 --- a/bundles/pretalx/metadata.py +++ b/bundles/pretalx/metadata.py @@ -26,6 +26,9 @@ defaults = { }, }, }, + 'nodejs': { + 'version': 18, + }, 'pretalx': { 'database': { 'user': 'pretalx',