@fleetbase/registry-bridge-engine 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/addon/components/extension-form.hbs +2 -3
- package/addon/components/extension-monetize-form.hbs +2 -2
- package/addon/components/modals/extension-details.hbs +2 -2
- package/addon/controllers/developers/payments/onboard.js +1 -1
- package/addon/models/registry-extension.js +1 -0
- package/composer.json +2 -2
- package/extension.json +1 -1
- package/package.json +3 -3
- package/server/src/Models/RegistryExtension.php +20 -3
|
@@ -106,11 +106,10 @@
|
|
|
106
106
|
@name={{t "registry-bridge.developers.extensions.extension-form.extension-promotional-text"}}
|
|
107
107
|
@helpText={{t "registry-bridge.developers.extensions.extension-form.extension-promotional-text-help-text"}}
|
|
108
108
|
>
|
|
109
|
-
<
|
|
109
|
+
<TipTapEditor
|
|
110
110
|
@value={{@extension.promotional_text}}
|
|
111
|
+
@onChange={{fn (mut @extension.promotional_text)}}
|
|
111
112
|
placeholder={{t "registry-bridge.developers.extensions.extension-form.extension-promotional-text"}}
|
|
112
|
-
class="form-input w-full"
|
|
113
|
-
rows="3"
|
|
114
113
|
/>
|
|
115
114
|
</InputGroup>
|
|
116
115
|
<InputGroup
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
/>
|
|
9
9
|
</InputGroup>
|
|
10
10
|
{{#if @extension.payment_required}}
|
|
11
|
-
<InputGroup>
|
|
11
|
+
{{!-- <InputGroup>
|
|
12
12
|
<Toggle
|
|
13
13
|
@isToggled={{@extension.subscription_required}}
|
|
14
14
|
@onToggle={{fn (mut @extension.subscription_required)}}
|
|
15
15
|
@label={{t "registry-bridge.developers.extensions.extension-form.extension-subscription-required"}}
|
|
16
16
|
@helpText={{t "registry-bridge.developers.extensions.extension-form.extension-subscription-required-help-text"}}
|
|
17
17
|
/>
|
|
18
|
-
</InputGroup>
|
|
18
|
+
</InputGroup> --}}
|
|
19
19
|
{{#if @extension.subscription_required}}
|
|
20
20
|
<InputGroup
|
|
21
21
|
@name={{t "registry-bridge.developers.extensions.extension-form.extension-subscription-billing-period"}}
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
<h3 class="dark:text-white font-semibold mb-1">Overview</h3>
|
|
32
32
|
<div class="space-y-1">
|
|
33
33
|
<p class="dark:text-gray-200 text-sm">{{this.extension.description}}</p>
|
|
34
|
-
<p class="dark:text-gray-200 text-sm">{{this.extension.promotional_text}}</p>
|
|
34
|
+
<p class="dark:text-gray-200 text-sm">{{html-safe this.extension.promotional_text}}</p>
|
|
35
35
|
</div>
|
|
36
36
|
</div>
|
|
37
37
|
<div>
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
<div class="space-y-2">
|
|
42
42
|
<div>
|
|
43
43
|
<div class="text-sm font-semibold dark:text-gray-100">Version</div>
|
|
44
|
-
<div class="text-sm dark:text-gray-200">{{this.extension.
|
|
44
|
+
<div class="text-sm dark:text-gray-200">{{this.extension.current_bundle_version}}</div>
|
|
45
45
|
</div>
|
|
46
46
|
<div>
|
|
47
47
|
<div class="text-sm font-semibold dark:text-gray-100">Updated</div>
|
|
@@ -4,7 +4,7 @@ import { inject as service } from '@ember/service';
|
|
|
4
4
|
import { action } from '@ember/object';
|
|
5
5
|
import { task } from 'ember-concurrency';
|
|
6
6
|
import { loadConnectAndInitialize } from '@stripe/connect-js';
|
|
7
|
-
import config from '
|
|
7
|
+
import config from '../../../config/environment';
|
|
8
8
|
|
|
9
9
|
export default class DevelopersPaymentsOnboardController extends Controller {
|
|
10
10
|
@service fetch;
|
|
@@ -15,6 +15,7 @@ export default class RegistryExtensionModel extends Model {
|
|
|
15
15
|
@attr('string') icon_uuid;
|
|
16
16
|
@attr('string') public_id;
|
|
17
17
|
@attr('string') current_bundle_public_id;
|
|
18
|
+
@attr('string') current_bundle_version;
|
|
18
19
|
@attr('string') next_bundle_public_id;
|
|
19
20
|
@attr('string') current_bundle_id;
|
|
20
21
|
@attr('string') next_bundle_id;
|
package/composer.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fleetbase/registry-bridge",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"description": "Internal Bridge between Fleetbase API and Extensions Registry",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fleetbase-extension",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
],
|
|
21
21
|
"require": {
|
|
22
22
|
"php": "^8.0",
|
|
23
|
-
"fleetbase/core-api": "^1.
|
|
23
|
+
"fleetbase/core-api": "^1.5.1",
|
|
24
24
|
"laravel/cashier": "^15.2.1",
|
|
25
25
|
"php-http/guzzle7-adapter": "^1.0",
|
|
26
26
|
"psr/http-factory-implementation": "*",
|
package/extension.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fleetbase/registry-bridge-engine",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"description": "Internal Bridge between Fleetbase API and Extensions Registry",
|
|
5
5
|
"fleetbase": {
|
|
6
6
|
"route": "extensions"
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@babel/core": "^7.23.2",
|
|
42
|
-
"@fleetbase/ember-core": "^0.2.
|
|
43
|
-
"@fleetbase/ember-ui": "^0.2.
|
|
42
|
+
"@fleetbase/ember-core": "^0.2.14",
|
|
43
|
+
"@fleetbase/ember-ui": "^0.2.20",
|
|
44
44
|
"@fortawesome/ember-fontawesome": "^2.0.0",
|
|
45
45
|
"@fortawesome/fontawesome-svg-core": "6.4.0",
|
|
46
46
|
"@fortawesome/free-solid-svg-icons": "6.4.0",
|
|
@@ -113,6 +113,7 @@ class RegistryExtension extends Model
|
|
|
113
113
|
'current_bundle_filename',
|
|
114
114
|
'current_bundle_id',
|
|
115
115
|
'current_bundle_public_id',
|
|
116
|
+
'current_bundle_version',
|
|
116
117
|
'next_bundle_filename',
|
|
117
118
|
'next_bundle_id',
|
|
118
119
|
'next_bundle_public_id',
|
|
@@ -340,6 +341,18 @@ class RegistryExtension extends Model
|
|
|
340
341
|
return data_get($this, 'currentBundle.bundle_filename');
|
|
341
342
|
}
|
|
342
343
|
|
|
344
|
+
/**
|
|
345
|
+
* Get the current bundle version.
|
|
346
|
+
*/
|
|
347
|
+
public function getCurrentBundleVersionAttribute(): ?string
|
|
348
|
+
{
|
|
349
|
+
if ($this->currentBundle instanceof RegistryExtensionBundle) {
|
|
350
|
+
return $this->currentBundle->version;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
return data_get($this, 'currentBundle.version');
|
|
354
|
+
}
|
|
355
|
+
|
|
343
356
|
/**
|
|
344
357
|
* Get the next bundle public ID.
|
|
345
358
|
*/
|
|
@@ -540,7 +553,11 @@ class RegistryExtension extends Model
|
|
|
540
553
|
}
|
|
541
554
|
|
|
542
555
|
// Update stripe product id
|
|
543
|
-
$this->
|
|
556
|
+
if ($this->exists) {
|
|
557
|
+
$this->update(['stripe_product_id' => $product->id]);
|
|
558
|
+
} else {
|
|
559
|
+
$this->setAttribute('stripe_product_id', $product->id);
|
|
560
|
+
}
|
|
544
561
|
|
|
545
562
|
return $product;
|
|
546
563
|
}
|
|
@@ -563,8 +580,8 @@ class RegistryExtension extends Model
|
|
|
563
580
|
$this->getStripeProduct();
|
|
564
581
|
}
|
|
565
582
|
|
|
566
|
-
$stripe
|
|
567
|
-
$price
|
|
583
|
+
$stripe = Utils::getStripeClient();
|
|
584
|
+
$price = null;
|
|
568
585
|
if ($stripe) {
|
|
569
586
|
$prices = $stripe->prices->all(['product' => $this->stripe_product_id, 'limit' => 1, 'active' => true]);
|
|
570
587
|
$price = is_array($prices->data) && count($prices->data) ? $prices->data[0] : null;
|