Updated
diff --git a/addon/models/registry-extension.js b/addon/models/registry-extension.js
index 71a9dca..f42b62e 100644
--- a/addon/models/registry-extension.js
+++ b/addon/models/registry-extension.js
@@ -15,6 +15,7 @@ export default class RegistryExtensionModel extends Model {
@attr('string') icon_uuid;
@attr('string') public_id;
@attr('string') current_bundle_public_id;
+ @attr('string') current_bundle_version;
@attr('string') next_bundle_public_id;
@attr('string') current_bundle_id;
@attr('string') next_bundle_id;
diff --git a/server/src/Models/RegistryExtension.php b/server/src/Models/RegistryExtension.php
index f8f7d09..7e50554 100644
--- a/server/src/Models/RegistryExtension.php
+++ b/server/src/Models/RegistryExtension.php
@@ -113,6 +113,7 @@ class RegistryExtension extends Model
'current_bundle_filename',
'current_bundle_id',
'current_bundle_public_id',
+ 'current_bundle_version',
'next_bundle_filename',
'next_bundle_id',
'next_bundle_public_id',
@@ -340,6 +341,18 @@ public function getCurrentBundleFilenameAttribute(): ?string
return data_get($this, 'currentBundle.bundle_filename');
}
+ /**
+ * Get the current bundle version.
+ */
+ public function getCurrentBundleVersionAttribute(): ?string
+ {
+ if ($this->currentBundle instanceof RegistryExtensionBundle) {
+ return $this->currentBundle->version;
+ }
+
+ return data_get($this, 'currentBundle.version');
+ }
+
/**
* Get the next bundle public ID.
*/