cabloy 5.1.133 → 5.1.135
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/.cabloy-version +1 -1
- package/.claude/scheduled_tasks.lock +1 -0
- package/CHANGELOG.md +25 -0
- package/cabloy-docs/frontend/ioc-and-beans.md +20 -0
- package/e2e/specs/a-commerce/commerce.spec.ts +61 -36
- package/package.json +1 -1
- package/vona/patches/{zova-core@5.1.82.patch → zova-core@5.1.84.patch} +2 -2
- package/vona/pnpm-lock.yaml +412 -85
- package/vona/pnpm-workspace.yaml +1 -1
- package/zova/packages-utils/zova-jsx/package.json +2 -2
- package/zova/packages-zova/zova/package.json +3 -3
- package/zova/packages-zova/zova-core/package.json +2 -1
- package/zova/packages-zova/zova-core/src/core/sys/config.ts +2 -2
- package/zova/pnpm-lock.yaml +32 -29
- package/zova/src/suite/a-home/modules/home-layoutadmin/src/component/layoutAdmin/controller.tsx +1 -1
- package/zova/src/suite/a-home/modules/home-layoutempty/src/component/layoutEmpty/controller.tsx +1 -1
- package/zova/src/suite/a-home/modules/home-layoutweb/src/component/layoutWeb/controller.tsx +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-model/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-model/src/bean/bean.model/bean.model.persister.ts +28 -1
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/src/model/sdk.ts +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-router/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-router/src/monkey.ts +23 -0
- package/zova/src/suite-vendor/a-zova/modules/a-router/src/monkeySys.ts +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-ssr/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-ssr/src/monkey.ts +7 -3
- package/zova/src/suite-vendor/a-zova/modules/a-style/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-style/src/bean/bean.theme.ts +21 -2
- package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/package.json +7 -7
package/.cabloy-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
5.1.
|
|
1
|
+
5.1.135
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"sessionId":"aa2f5459-9806-45a9-a112-0437b3fc7c19","pid":45095,"procStart":"Sun Aug 9 08:20:36 2026","acquiredAt":1786451839628}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.1.135
|
|
4
|
+
|
|
5
|
+
### Improvements
|
|
6
|
+
|
|
7
|
+
- Refresh the Zova lockfile after compensation rerun preparation.
|
|
8
|
+
- Refresh the Vona Zova Core patch for v5.1.84.
|
|
9
|
+
|
|
10
|
+
## 5.1.134
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- Add SSR profile support, including cookie-based profile handling.
|
|
15
|
+
- Add SSR layout support.
|
|
16
|
+
- Add `this.ctx.meta.$ssr.cookieDisabledOnServer` metadata.
|
|
17
|
+
- Update the `ms` type definitions.
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
- Correct SSR profile behavior between server and client.
|
|
22
|
+
|
|
23
|
+
### Improvements
|
|
24
|
+
|
|
25
|
+
- Update the Bean theme configuration.
|
|
26
|
+
- Update IoC and Beans documentation.
|
|
27
|
+
|
|
3
28
|
## 5.1.133
|
|
4
29
|
|
|
5
30
|
### Features
|
|
@@ -133,6 +133,26 @@ class ControllerLayout {
|
|
|
133
133
|
|
|
134
134
|
In practice, Zova can still preserve the ergonomic class-based development experience while compiling cross-module usage back toward bean-identifier-based resolution.
|
|
135
135
|
|
|
136
|
+
### Getter-based parameterized injection
|
|
137
|
+
|
|
138
|
+
Use a getter when injection arguments must be prepared dynamically. The getter must explicitly identify the target bean with `beanFullName`; `usePrepareArg(...)` supplies initialization arguments only and does not resolve the target bean.
|
|
139
|
+
|
|
140
|
+
```typescript
|
|
141
|
+
import { Use, usePrepareArg } from 'zova';
|
|
142
|
+
import type { ServiceSsrLayout } from 'zova-module-home-base';
|
|
143
|
+
|
|
144
|
+
class ControllerLayout {
|
|
145
|
+
@Use({ beanFullName: 'home-base.service.ssrLayout' })
|
|
146
|
+
get $$serviceSsrLayout(): ServiceSsrLayout {
|
|
147
|
+
return usePrepareArg({
|
|
148
|
+
bodyReadyObserver: this.scope.config.layout.sidebar.bodyReadyObserver,
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Do not rely on the getter return type for implicit class resolution. Unlike a field declaration, a decorated getter does not reliably expose its return bean class as runtime type metadata, and build-time cross-module `@Use()` transforms do not provide a replacement target for getter injection.
|
|
155
|
+
|
|
136
156
|
### Hierarchical injection patterns
|
|
137
157
|
|
|
138
158
|
Hierarchical injection replaces many common cases where a generic Vue app would fall back to `provide/inject`.
|
|
@@ -218,6 +218,42 @@ test(
|
|
|
218
218
|
},
|
|
219
219
|
);
|
|
220
220
|
|
|
221
|
+
test(
|
|
222
|
+
'Commerce theme: public local preference mirrors session cookie without hydration mismatch',
|
|
223
|
+
{ tag: ['@web', '@ssr', '@theme'] },
|
|
224
|
+
async ({ browser, request }, testInfo) => {
|
|
225
|
+
const customer = await registerCustomer(request, testInfo);
|
|
226
|
+
const context = await browser.newContext();
|
|
227
|
+
await context.addInitScript(() => localStorage.setItem('themedark', 'true'));
|
|
228
|
+
const page = await context.newPage();
|
|
229
|
+
const pageErrors = collectPageErrors(page);
|
|
230
|
+
const consoleErrors: string[] = [];
|
|
231
|
+
page.on('console', message => {
|
|
232
|
+
if (message.type() === 'error' || /hydration mismatch/i.test(message.text())) {
|
|
233
|
+
consoleErrors.push(message.text());
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
try {
|
|
237
|
+
await page.goto('/commerce', { waitUntil: 'load' });
|
|
238
|
+
await page.evaluate(() => localStorage.setItem('themedark', 'true'));
|
|
239
|
+
await page.reload({ waitUntil: 'load' });
|
|
240
|
+
await expect(page.locator('html')).toHaveAttribute('data-zova-hydrated', 'commerce');
|
|
241
|
+
await expect(page.locator('body')).toHaveAttribute('data-theme', 'dark');
|
|
242
|
+
expect((await context.cookies()).find(cookie => cookie.name === 'themedark')?.value).toBe(
|
|
243
|
+
'true',
|
|
244
|
+
);
|
|
245
|
+
|
|
246
|
+
await login(page, '/commerce/address', customer.username, customer.password, 'commerce');
|
|
247
|
+
await expect(page.locator('html')).toHaveAttribute('data-zova-hydrated', 'commerce');
|
|
248
|
+
await expect(page.locator('body')).toHaveAttribute('data-theme', 'dark');
|
|
249
|
+
expect(pageErrors).toEqual([]);
|
|
250
|
+
expect(consoleErrors).toEqual([]);
|
|
251
|
+
} finally {
|
|
252
|
+
await context.close();
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
);
|
|
256
|
+
|
|
221
257
|
test(
|
|
222
258
|
'Commerce catalogue: public sellable inventory renders after hydration',
|
|
223
259
|
{ tag: ['@web', '@flow'] },
|
|
@@ -472,32 +508,25 @@ test(
|
|
|
472
508
|
await expect(page).toHaveURL(new RegExp(`/commerce/order/${checkout.orderId}(?:/|$)`), {
|
|
473
509
|
timeout: 40_000,
|
|
474
510
|
});
|
|
475
|
-
const
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
);
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
expect(
|
|
483
|
-
|
|
484
|
-
expect(
|
|
485
|
-
expect(
|
|
486
|
-
expect(
|
|
487
|
-
expect(
|
|
488
|
-
expect(
|
|
489
|
-
expect(
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
skuCodeSnapshot: 'COF-SET-01',
|
|
495
|
-
unitPriceCents: 4599,
|
|
496
|
-
quantity: 1,
|
|
497
|
-
lineTotalCents: 4599,
|
|
498
|
-
}),
|
|
499
|
-
]);
|
|
500
|
-
|
|
511
|
+
const orderPath = `/commerce/order/${checkout.orderId}`;
|
|
512
|
+
const orderResponse = await context.request.get(orderPath);
|
|
513
|
+
expect(orderResponse.ok()).toBeTruthy();
|
|
514
|
+
expect(orderResponse.headers()['cache-control']).toBe('private, no-store');
|
|
515
|
+
const orderHtml = await orderResponse.text();
|
|
516
|
+
expect(orderHtml.toLowerCase()).not.toContain('data-zova-hydrated');
|
|
517
|
+
expect(orderHtml).toContain(`Order #${checkout.orderId}`);
|
|
518
|
+
expect(orderHtml).toContain('paid · $45.99');
|
|
519
|
+
expect(orderHtml).toContain('USD');
|
|
520
|
+
expect(orderHtml).toContain(fixture.recipientName);
|
|
521
|
+
expect(orderHtml).toContain(fixture.addressLine1);
|
|
522
|
+
expect(orderHtml).toContain('Discount: $0.00');
|
|
523
|
+
expect(orderHtml).toContain('Pour-Over Coffee Set');
|
|
524
|
+
expect(orderHtml).toContain('COF-SET-01');
|
|
525
|
+
expect(orderHtml).toContain('1 × $45.99 = $45.99');
|
|
526
|
+
|
|
527
|
+
const orderDocumentResponse = await page.reload({ waitUntil: 'load' });
|
|
528
|
+
expect(orderDocumentResponse?.ok()).toBeTruthy();
|
|
529
|
+
await expect(page.locator('html')).toHaveAttribute('data-zova-hydrated', 'commerce');
|
|
501
530
|
await expect(page.getByRole('heading', { name: `Order #${checkout.orderId}` })).toBeVisible();
|
|
502
531
|
await expect(page.getByText('paid · $45.99')).toBeVisible();
|
|
503
532
|
await expect(page.getByText(fixture.recipientName)).toBeVisible();
|
|
@@ -567,22 +596,18 @@ test(
|
|
|
567
596
|
await adminContext.close().catch(() => {});
|
|
568
597
|
}
|
|
569
598
|
|
|
570
|
-
const
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
new RegExp(`/api/commerce/trade/order/viewMine/${checkout.orderId}$`),
|
|
574
|
-
);
|
|
575
|
-
await page.reload({ waitUntil: 'load' });
|
|
576
|
-
await shippedDetailResponse;
|
|
599
|
+
const shippedDocumentResponse = await page.reload({ waitUntil: 'load' });
|
|
600
|
+
expect(shippedDocumentResponse?.ok()).toBeTruthy();
|
|
601
|
+
await expect(page.locator('html')).toHaveAttribute('data-zova-hydrated', 'commerce');
|
|
577
602
|
await expect(page.getByText('shipped · $45.99')).toBeVisible();
|
|
578
603
|
await expect(page.getByRole('heading', { name: 'Shipment' })).toBeVisible();
|
|
579
604
|
await expect(page.getByText(shipmentCarrier)).toBeVisible();
|
|
580
605
|
await expect(page.getByText(shipmentTrackingNumber)).toBeVisible();
|
|
581
606
|
|
|
582
|
-
const
|
|
583
|
-
|
|
607
|
+
const ordersDocumentResponse = await page.goto('/commerce/orders', { waitUntil: 'load' });
|
|
608
|
+
expect(ordersDocumentResponse?.ok()).toBeTruthy();
|
|
584
609
|
await expect(page).toHaveURL(/\/commerce\/orders(?:\/|$)/);
|
|
585
|
-
await
|
|
610
|
+
await expect(page.locator('html')).toHaveAttribute('data-zova-hydrated', 'commerce');
|
|
586
611
|
await expect(page.getByRole('heading', { name: 'My orders' })).toBeVisible();
|
|
587
612
|
const orderCard = page
|
|
588
613
|
.locator('article')
|
package/package.json
CHANGED
|
@@ -32,10 +32,10 @@ index 838e299407218b7bfac469d42a12d6ab59820380..e8b61cc231e39ee3a270ee513ab43ff5
|
|
|
32
32
|
//# sourceMappingURL=module.d.ts.map
|
|
33
33
|
|
|
34
34
|
diff --git a/dist/types/utils/env.d.ts b/dist/types/utils/env.d.ts
|
|
35
|
-
index
|
|
35
|
+
index a25f8af9d4be43730ecaeaacce63646687fa8198..989fae4e0eed932fe36d9a874902ab6a2bb711fe 100644
|
|
36
36
|
--- a/dist/types/utils/env.d.ts
|
|
37
37
|
+++ b/dist/types/utils/env.d.ts
|
|
38
|
-
@@ -
|
|
38
|
+
@@ -37,19 +37,4 @@ export interface ZovaConfigEnv {
|
|
39
39
|
MOCK_BUILD: string | undefined;
|
|
40
40
|
MOCK_BUILD_PORT: string | undefined;
|
|
41
41
|
}
|