cabloy 5.1.140 → 5.1.142
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/.github/workflows/playwright-e2e.yml +2 -2
- package/CHANGELOG.md +32 -0
- package/cabloy-docs/frontend/form-guide.md +47 -0
- package/cabloy-docs/frontend/markdown-guide.md +50 -17
- package/cabloy-docs/frontend/route-alias-guide.md +20 -0
- package/cabloy-docs/frontend/scripts.md +9 -11
- package/cabloy-docs/frontend/zova-form-under-the-hood.md +25 -0
- package/cabloy-docs/fullstack/framework-performance.md +3 -3
- package/cabloy-docs/fullstack/parallel-worktree-environment.md +1 -1
- package/cabloy-docs/fullstack/quickstart.md +5 -4
- package/cabloy-docs/reference/repo-scripts.md +29 -42
- package/e2e/config/playwright.config.ts +34 -0
- package/e2e/scripts/e2e.ts +2 -27
- package/e2e/scripts/runE2e.ts +62 -0
- package/e2e/scripts/runE2eArgs.test.ts +75 -0
- package/e2e/scripts/runE2eArgs.ts +158 -0
- package/e2e/specs/{a-commerce/commerce.spec.ts → a-commerce.spec.ts} +364 -33
- package/e2e/specs/{cabloy-basic/account.spec.ts → account.spec.ts} +1 -2
- package/e2e/specs/{cabloy-basic/basic.spec.ts → cabloy-basic.spec.ts} +6 -8
- package/oxlint.config.ts +3 -0
- package/package.json +3 -9
- package/scripts/upgrade.ts +63 -68
- package/vona/packages-utils/lint/package.json +1 -1
- package/vona/packages-utils/lint/src/oxc/lint.ts +1 -1
- package/vona/packages-utils/lint/src/oxc/lintVue.ts +1 -1
- package/vona/pnpm-lock.yaml +100 -657
- package/vona/src/suite/a-commerce/modules/commerce-trade/src/dto/refundRecoveryView.tsx +7 -2
- package/vona/src/suite/a-commerce/modules/commerce-trade/src/service/order.ts +31 -15
- package/vona/src/suite/a-home/modules/home-user/package.json +1 -0
- package/vona/src/suite/a-home/modules/home-user/src/service/account.ts +15 -2
- package/vona/src/suite/a-home/modules/home-user/test/accountActivation.test.ts +34 -4
- package/vona/src/suite-vendor/a-cabloy/modules/a-markdown/package.json +2 -1
- package/vona/src/suite-vendor/a-cabloy/modules/a-markdown/src/.metadata/index.ts +26 -0
- package/vona/src/suite-vendor/a-cabloy/modules/a-markdown/src/bean/imageScene.markdown.ts +13 -0
- package/vona/src/suite-vendor/a-cabloy/package.json +2 -2
- package/vona/src/suite-vendor/a-pay/modules/a-pay/package.json +1 -1
- package/vona/src/suite-vendor/a-pay/modules/a-pay/src/service/providerOperation.ts +23 -0
- package/vona/src/suite-vendor/a-pay/modules/a-pay/src/service/refundOperation.ts +7 -0
- package/vona/src/suite-vendor/a-pay/modules/pay-mock/package.json +1 -1
- package/vona/src/suite-vendor/a-pay/modules/pay-paypal/package.json +1 -1
- package/vona/src/suite-vendor/a-pay/modules/pay-stripe/package.json +1 -1
- package/vona/src/suite-vendor/a-pay/package.json +5 -5
- 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 +1 -1
- package/zova/packages-zova/zova-core/src/bean/resource/locale/type.ts +1 -0
- package/zova/pnpm-lock.yaml +63 -18
- package/zova/src/front/config/config/config.cabloyBasicWeb.ts +3 -1
- package/zova/src/front/config/config/config.cabloyCommerce.ts +4 -2
- package/zova/src/suite/a-commerce/modules/commerce-catalog/src/api/openapi/schemas.ts +0 -11
- package/zova/src/suite/a-commerce/modules/commerce-catalog/src/api/openapi/types.ts +23 -170
- package/zova/src/suite/a-commerce/modules/commerce-member/src/api/openapi/schemas.ts +0 -11
- package/zova/src/suite/a-commerce/modules/commerce-member/src/api/openapi/types.ts +23 -170
- package/zova/src/suite/a-commerce/modules/commerce-member/src/page/address/controller.tsx +64 -63
- package/zova/src/suite/a-commerce/modules/commerce-promotion/src/api/openapi/schemas.ts +0 -11
- package/zova/src/suite/a-commerce/modules/commerce-promotion/src/api/openapi/types.ts +23 -170
- package/zova/src/suite/a-commerce/modules/commerce-siteadmin/src/api/openapi/schemas.ts +0 -11
- package/zova/src/suite/a-commerce/modules/commerce-siteadmin/src/api/openapi/types.ts +23 -170
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/api/openapi/schemas.ts +0 -11
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/api/openapi/types.ts +29 -171
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/component/tableCellActionRefund/controller.tsx +413 -134
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/config/locale/en-us.ts +76 -0
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/config/locale/zh-cn.ts +67 -0
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/model/order.ts +1 -0
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/cart/controller.tsx +1 -1
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/checkout/controller.tsx +7 -7
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/order/controller.tsx +46 -9
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/payment/controller.tsx +50 -30
- package/zova/src/suite/a-home/modules/home-api/src/api/openapi/schemas.ts +0 -11
- package/zova/src/suite/a-home/modules/home-api/src/api/openapi/types.ts +23 -170
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/schemas.ts +0 -11
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/types.ts +23 -170
- package/zova/src/suite/cabloy-basic/modules/basic-captcha/src/component/formFieldCaptcha/controller.tsx +6 -2
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/openapi/schemas.ts +0 -11
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/openapi/types.ts +23 -170
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/openapi/schemas.ts +0 -11
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/openapi/types.ts +23 -170
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/component/formFieldImage/controller.tsx +9 -15
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/package.json +10 -2
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/.metadata/index.ts +11 -2
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/.metadata/locales.ts +7 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/component/formFieldMarkdown/controller.tsx +723 -5
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/component/formFieldMarkdown/render.tsx +461 -2
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/config/locale/en-us.ts +59 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/config/locale/zh-cn.ts +59 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/index.ts +1 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/lib/codeBlockLanguages.ts +42 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/lib/richTextContentStyle.ts +20 -0
- package/zova/src/suite/cabloy-basic/modules/basic-markdown/test/lib/codeBlockLanguages.test.ts +25 -0
- package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/package.json +1 -1
- package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/model/resource.ts +1 -0
- package/zova/src/suite-vendor/a-cabloy/package.json +2 -2
- package/zova/src/suite-vendor/a-pay/modules/a-pay/package.json +1 -1
- package/zova/src/suite-vendor/a-pay/modules/a-pay/src/api/openapi/schemas.ts +0 -11
- package/zova/src/suite-vendor/a-pay/modules/a-pay/src/api/openapi/types.ts +23 -170
- package/zova/src/suite-vendor/a-pay/modules/a-pay/src/component/paymentNextAction/controller.tsx +26 -12
- package/zova/src/suite-vendor/a-pay/modules/pay-mock/cli/openapi.config.ts +1 -1
- package/zova/src/suite-vendor/a-pay/modules/pay-mock/package.json +1 -1
- package/zova/src/suite-vendor/a-pay/modules/pay-mock/src/api/openapi/schemas.ts +0 -11
- package/zova/src/suite-vendor/a-pay/modules/pay-mock/src/api/openapi/types.ts +23 -170
- package/zova/src/suite-vendor/a-pay/modules/pay-mock/src/api/payMockMockPayment.ts +26 -0
- package/zova/src/suite-vendor/a-pay/modules/pay-mock/src/apiSchema/payMockMockPayment.ts +8 -1
- package/zova/src/suite-vendor/a-pay/modules/pay-mock/src/model/payMockPayment.ts +13 -1
- package/zova/src/suite-vendor/a-pay/package.json +3 -3
- package/zova/src/suite-vendor/a-zova/modules/a-form/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-form/src/component/formField/controller.tsx +2 -0
- package/zova/src/suite-vendor/a-zova/modules/a-form/src/types/formField.ts +7 -6
- package/zova/src/suite-vendor/a-zova/modules/a-ssrserver/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-ssrserver/src/service/ssrHandler.ts +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/package.json +4 -4
- package/e2e/config/playwright.basic.config.ts +0 -3
- package/e2e/config/playwright.commerce.config.ts +0 -3
- package/e2e/config/playwright.shared.config.ts +0 -38
- package/e2e/scripts/testE2eClean.ts +0 -56
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/package.json +0 -56
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/.metadata/index.ts +0 -404
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/.metadata/locales.ts +0 -18
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/.metadata/this.ts +0 -2
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/bean/bean.paypal.ts +0 -99
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/bean/event.paypalCancelOrder.ts +0 -15
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/bean/event.paypalCaptureOrder.ts +0 -22
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/bean/meta.version.ts +0 -24
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/config/config.ts +0 -14
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/config/errors.ts +0 -3
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/config/locale/en-us.ts +0 -3
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/config/locale/zh-cn.ts +0 -3
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/controller/paypal.ts +0 -39
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/dto/paypalOrderRecordOptions.tsx +0 -31
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/dto/paypalOrderRecordPayload.tsx +0 -18
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/entity/paypalRecord.tsx +0 -30
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/index.ts +0 -3
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/model/paypalRecord.ts +0 -10
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/service/paypal.ts +0 -83
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/types/index.ts +0 -1
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/types/paypal.ts +0 -18
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/tsconfig.build.json +0 -11
- package/vona/src/suite-vendor/a-paypal/modules/a-paypal/tsconfig.json +0 -7
- package/vona/src/suite-vendor/a-paypal/package.json +0 -13
- package/vona/src/suite-vendor/a-paypal/tsconfig.base.json +0 -4
- package/vona/src/suite-vendor/a-paypal/tsconfig.json +0 -10
|
@@ -62,8 +62,13 @@ export class DtoRefundRecoveryView {
|
|
|
62
62
|
@Api.field(v.optional())
|
|
63
63
|
finalizedAt?: Date;
|
|
64
64
|
|
|
65
|
-
@Api.field(z.enum(['none', 'reconcile_only', 'query_only', 'retry_same_key']))
|
|
66
|
-
recoveryDisposition:
|
|
65
|
+
@Api.field(z.enum(['none', 'await_webhook', 'reconcile_only', 'query_only', 'retry_same_key']))
|
|
66
|
+
recoveryDisposition:
|
|
67
|
+
| 'none'
|
|
68
|
+
| 'await_webhook'
|
|
69
|
+
| 'reconcile_only'
|
|
70
|
+
| 'query_only'
|
|
71
|
+
| 'retry_same_key';
|
|
67
72
|
|
|
68
73
|
@Api.field(v.required())
|
|
69
74
|
recoveryMessage: string;
|
|
@@ -880,6 +880,11 @@ export class ServiceOrder extends BeanBase {
|
|
|
880
880
|
};
|
|
881
881
|
}
|
|
882
882
|
|
|
883
|
+
private _providerSupportsRefundQuery(providerName: string, clientName: string) {
|
|
884
|
+
const { provider } = this.bean.payProvider.resolveByName(providerName, clientName);
|
|
885
|
+
return typeof provider.queryRefund === 'function';
|
|
886
|
+
}
|
|
887
|
+
|
|
883
888
|
private _refundRecoveryView(
|
|
884
889
|
linked: Awaited<ReturnType<typeof this.refundRecoveryLinkage>>,
|
|
885
890
|
): DtoRefundRecoveryView {
|
|
@@ -893,7 +898,14 @@ export class ServiceOrder extends BeanBase {
|
|
|
893
898
|
hasUnresolvedReconciliation,
|
|
894
899
|
} = linked;
|
|
895
900
|
const canQuery = Boolean(
|
|
896
|
-
refundOperation.providerRefundId &&
|
|
901
|
+
refundOperation.providerRefundId &&
|
|
902
|
+
providerOperation.state !== 'succeeded' &&
|
|
903
|
+
this._providerSupportsRefundQuery(paymentSession.providerName, paymentSession.clientName),
|
|
904
|
+
);
|
|
905
|
+
const canAwaitWebhook = Boolean(
|
|
906
|
+
refundOperation.providerRefundId &&
|
|
907
|
+
providerOperation.state !== 'succeeded' &&
|
|
908
|
+
!this._providerSupportsRefundQuery(paymentSession.providerName, paymentSession.clientName),
|
|
897
909
|
);
|
|
898
910
|
const canRetry =
|
|
899
911
|
!refundOperation.providerRefundId &&
|
|
@@ -909,21 +921,25 @@ export class ServiceOrder extends BeanBase {
|
|
|
909
921
|
providerOperation.errorCode === 'refund_submission_outcome_unknown' &&
|
|
910
922
|
Boolean(providerOperation.submittedAt) &&
|
|
911
923
|
!hasUnresolvedReconciliation;
|
|
912
|
-
const recoveryDisposition =
|
|
913
|
-
? '
|
|
914
|
-
:
|
|
915
|
-
? '
|
|
916
|
-
:
|
|
917
|
-
? '
|
|
918
|
-
:
|
|
924
|
+
const recoveryDisposition = canAwaitWebhook
|
|
925
|
+
? 'await_webhook'
|
|
926
|
+
: canQuery
|
|
927
|
+
? 'query_only'
|
|
928
|
+
: canRetry
|
|
929
|
+
? 'retry_same_key'
|
|
930
|
+
: canReconcile
|
|
931
|
+
? 'reconcile_only'
|
|
932
|
+
: 'none';
|
|
919
933
|
const recoveryMessage =
|
|
920
|
-
recoveryDisposition === '
|
|
921
|
-
? 'A
|
|
922
|
-
: recoveryDisposition === '
|
|
923
|
-
? '
|
|
924
|
-
: recoveryDisposition === '
|
|
925
|
-
? '
|
|
926
|
-
:
|
|
934
|
+
recoveryDisposition === 'await_webhook'
|
|
935
|
+
? 'A provider refund identifier is available. Wait for the verified provider webhook; do not resubmit or reconcile by querying.'
|
|
936
|
+
: recoveryDisposition === 'query_only'
|
|
937
|
+
? 'A verified provider refund identifier is available. Reconcile without resubmitting.'
|
|
938
|
+
: recoveryDisposition === 'reconcile_only'
|
|
939
|
+
? 'Provider refund outcome is unknown. Record reconciliation before considering a retry.'
|
|
940
|
+
: recoveryDisposition === 'retry_same_key'
|
|
941
|
+
? 'Reconciliation was unresolved. A single acknowledged retry may reuse the original provider request.'
|
|
942
|
+
: 'No provider refund submission is available. Do not create or manually declare a replacement refund.';
|
|
927
943
|
return {
|
|
928
944
|
orderId: order.id,
|
|
929
945
|
refundRequestId: refundRequest.id,
|
|
@@ -217,7 +217,11 @@ export class ServiceAccount extends BeanBase {
|
|
|
217
217
|
const link = this._getActivationLinkWithToken(consumerLink, rawToken);
|
|
218
218
|
await this.bean.mail.send({
|
|
219
219
|
to: currentUser.email,
|
|
220
|
-
subject: this.scope.locale.ActivationEmailSubject(),
|
|
220
|
+
subject: replaceTemplate(this.scope.locale.ActivationEmailSubject(), {
|
|
221
|
+
userName: currentUser.name,
|
|
222
|
+
link,
|
|
223
|
+
siteName: this.ctx.instance.title || this.app.meta.env.APP_TITLE,
|
|
224
|
+
}),
|
|
221
225
|
text: replaceTemplate(this.scope.locale.ActivationEmailBody(), {
|
|
222
226
|
userName: currentUser.name,
|
|
223
227
|
link,
|
|
@@ -559,12 +563,21 @@ export class ServiceAccount extends BeanBase {
|
|
|
559
563
|
|
|
560
564
|
private _getActivationLink(consumerUrl: string): URL {
|
|
561
565
|
const url = this._getConsumerLink(consumerUrl, 'activation');
|
|
562
|
-
if (url.pathname
|
|
566
|
+
if (!this._isActivationConsumerPath(url.pathname)) {
|
|
563
567
|
this.app.throw(503, 'account activation consumer URL is invalid');
|
|
564
568
|
}
|
|
565
569
|
return url;
|
|
566
570
|
}
|
|
567
571
|
|
|
572
|
+
private _isActivationConsumerPath(pathname: string) {
|
|
573
|
+
if (pathname === activationConsumerPath) return true;
|
|
574
|
+
const sites = this.app.scope('a-ssr').service.ssr.getSitesEnabled();
|
|
575
|
+
return sites.some(site => {
|
|
576
|
+
const publicPath = String(site.beanOptions.options?.publicPath ?? '');
|
|
577
|
+
return publicPath && pathname === `/${publicPath}${activationConsumerPath}`;
|
|
578
|
+
});
|
|
579
|
+
}
|
|
580
|
+
|
|
568
581
|
private _getPasswordSetLink(consumerUrl: string): URL {
|
|
569
582
|
return this._getConsumerLink(consumerUrl, 'password-set');
|
|
570
583
|
}
|
|
@@ -5,6 +5,7 @@ import { acquireTestLock, app } from 'vona-mock';
|
|
|
5
5
|
|
|
6
6
|
const activationConsumePath = '/home/user/account/activation/consume';
|
|
7
7
|
const activationConsumerUrl = 'https://account.example.test/home/user/activation';
|
|
8
|
+
const activationConsumerUrlAdmin = 'https://account.example.test/admin/home/user/activation';
|
|
8
9
|
|
|
9
10
|
describe('accountActivation.test.ts', { concurrency: false, sequential: true }, () => {
|
|
10
11
|
const releases: Array<() => void> = [];
|
|
@@ -73,6 +74,26 @@ describe('accountActivation.test.ts', { concurrency: false, sequential: true },
|
|
|
73
74
|
}
|
|
74
75
|
});
|
|
75
76
|
|
|
77
|
+
it('preserves an enabled SSR site public path in activation links', async () => {
|
|
78
|
+
let fixture: IFixture | undefined;
|
|
79
|
+
let restoreSites: (() => void) | undefined;
|
|
80
|
+
try {
|
|
81
|
+
fixture = await createFixture();
|
|
82
|
+
restoreSites = configureAdminSsrSite();
|
|
83
|
+
const issued = await issueActivationLink(fixture, activationConsumerUrlAdmin);
|
|
84
|
+
assert.equal(issued.path, '/admin/home/user/activation');
|
|
85
|
+
assert.deepEqual(await getActivationState(getDigest(issued.token)), {
|
|
86
|
+
purpose: 'account-activation',
|
|
87
|
+
userId: fixture.userId,
|
|
88
|
+
consumerPath: '/home/user/activation',
|
|
89
|
+
email: fixture.email,
|
|
90
|
+
});
|
|
91
|
+
} finally {
|
|
92
|
+
restoreSites?.();
|
|
93
|
+
if (fixture) await removeFixture(fixture);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
|
|
76
97
|
it('issues an activation link through registration and activates the registered user', async () => {
|
|
77
98
|
let registration: IRegistration | undefined;
|
|
78
99
|
try {
|
|
@@ -175,6 +196,17 @@ interface IRegistration extends IFixture {
|
|
|
175
196
|
path: string;
|
|
176
197
|
}
|
|
177
198
|
|
|
199
|
+
function configureAdminSsrSite() {
|
|
200
|
+
const service = app.scope('a-ssr').service.ssr;
|
|
201
|
+
const getSitesEnabled = service.getSitesEnabled;
|
|
202
|
+
service.getSitesEnabled = (() => [
|
|
203
|
+
{ beanOptions: { options: { publicPath: 'admin' } } },
|
|
204
|
+
]) as typeof service.getSitesEnabled;
|
|
205
|
+
return () => {
|
|
206
|
+
service.getSitesEnabled = getSitesEnabled;
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
|
|
178
210
|
async function configureActivation() {
|
|
179
211
|
return await app.bean.executor.mockCtx(async () => {
|
|
180
212
|
const options =
|
|
@@ -288,7 +320,7 @@ async function removeFixture(fixture: IFixture) {
|
|
|
288
320
|
});
|
|
289
321
|
}
|
|
290
322
|
|
|
291
|
-
async function issueActivationLink(fixture: IFixture) {
|
|
323
|
+
async function issueActivationLink(fixture: IFixture, consumerUrl = activationConsumerUrl) {
|
|
292
324
|
let text: unknown;
|
|
293
325
|
const mail = app.bean.mail;
|
|
294
326
|
const send = mail.send;
|
|
@@ -297,9 +329,7 @@ async function issueActivationLink(fixture: IFixture) {
|
|
|
297
329
|
};
|
|
298
330
|
try {
|
|
299
331
|
await app.bean.executor.mockCtx(async () => {
|
|
300
|
-
await app
|
|
301
|
-
.scope('home-user')
|
|
302
|
-
.service.account.issueActivationLink(fixture.userId, activationConsumerUrl);
|
|
332
|
+
await app.scope('home-user').service.account.issueActivationLink(fixture.userId, consumerUrl);
|
|
303
333
|
});
|
|
304
334
|
} finally {
|
|
305
335
|
mail.send = send;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vona-module-a-markdown",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Vona Module"
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"title": "a-markdown",
|
|
59
59
|
"vonaModule": {
|
|
60
60
|
"dependencies": {
|
|
61
|
+
"a-image": "5.0.0",
|
|
61
62
|
"a-vona": "5.0.0"
|
|
62
63
|
}
|
|
63
64
|
}
|
|
@@ -1,4 +1,30 @@
|
|
|
1
1
|
// eslint-disable
|
|
2
|
+
/** imageScene: begin */
|
|
3
|
+
export * from '../bean/imageScene.markdown.ts';
|
|
4
|
+
|
|
5
|
+
import { type IDecoratorImageSceneOptions } from 'vona-module-a-image';
|
|
6
|
+
declare module 'vona-module-a-image' {
|
|
7
|
+
|
|
8
|
+
export interface IImageSceneRecord {
|
|
9
|
+
'a-markdown:markdown': IDecoratorImageSceneOptions;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
declare module 'vona-module-a-markdown' {
|
|
15
|
+
|
|
16
|
+
export interface ImageSceneMarkdown {
|
|
17
|
+
/** @internal */
|
|
18
|
+
get scope(): ScopeModuleAMarkdown;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ImageSceneMarkdown {
|
|
22
|
+
get $beanFullName(): 'a-markdown.imageScene.markdown';
|
|
23
|
+
get $onionName(): 'a-markdown:markdown';
|
|
24
|
+
get $onionOptions(): IDecoratorImageSceneOptions;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/** imageScene: end */
|
|
2
28
|
/** bean: begin */
|
|
3
29
|
export * from '../bean/bean.markdown.ts';
|
|
4
30
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BeanBase } from 'vona';
|
|
2
|
+
import { ImageScene } from 'vona-module-a-image';
|
|
3
|
+
|
|
4
|
+
@ImageScene({
|
|
5
|
+
public: true,
|
|
6
|
+
upload: {
|
|
7
|
+
maxSize: 5 * 1024 * 1024,
|
|
8
|
+
mimeTypes: ['image/jpeg', 'image/png', 'image/webp'],
|
|
9
|
+
extensions: ['.jpg', '.jpeg', '.png', '.webp'],
|
|
10
|
+
multiple: false,
|
|
11
|
+
},
|
|
12
|
+
})
|
|
13
|
+
export class ImageSceneMarkdown extends BeanBase {}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vona-suite-a-cabloy",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.46",
|
|
4
4
|
"gitHead": "a79189b882c17af5911573896a781bbb0046d37d",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "module",
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"vona-module-a-cabloy": "workspace:^",
|
|
11
|
-
"vona-module-a-markdown": "^5.0.
|
|
11
|
+
"vona-module-a-markdown": "^5.0.2",
|
|
12
12
|
"vona-module-a-rbac": "^5.0.1",
|
|
13
13
|
"vona-module-a-socket": "workspace:^",
|
|
14
14
|
"vona-module-a-ssr": "workspace:^",
|
|
@@ -302,6 +302,29 @@ export class ServiceProviderOperation extends BeanBase {
|
|
|
302
302
|
operation.kind === 'refund' && operation.refundOperationId
|
|
303
303
|
? await this.scope.model.refundOperation.getByIdForUpdate(operation.refundOperationId)
|
|
304
304
|
: undefined;
|
|
305
|
+
if (operation.kind === 'refund' && refund?.providerRefundId) {
|
|
306
|
+
const session = await this.scope.model.paymentSession.getById(operation.paymentSessionId);
|
|
307
|
+
if (!session) this.app.throw(404, 'payment session not found');
|
|
308
|
+
const { provider } = this.bean.payProvider.resolveByName(
|
|
309
|
+
session.providerName,
|
|
310
|
+
session.clientName,
|
|
311
|
+
);
|
|
312
|
+
if (!provider.queryRefund) {
|
|
313
|
+
if (operation.nextAttemptAt) {
|
|
314
|
+
await this.scope.model.providerOperation.updateById(operation.id, {
|
|
315
|
+
nextAttemptAt: undefined,
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
return undefined;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
if (
|
|
322
|
+
operation.kind === 'refund' &&
|
|
323
|
+
refund &&
|
|
324
|
+
['succeeded', 'failed', 'cancelled'].includes(refund.state)
|
|
325
|
+
) {
|
|
326
|
+
return undefined;
|
|
327
|
+
}
|
|
305
328
|
if (
|
|
306
329
|
operation.kind === 'refund' &&
|
|
307
330
|
operation.submittedAt &&
|
|
@@ -203,6 +203,13 @@ export class ServiceRefundOperation extends BeanBase {
|
|
|
203
203
|
amountMinor: refund.amountMinor,
|
|
204
204
|
currency: refund.currency,
|
|
205
205
|
});
|
|
206
|
+
const providerOperation = await this.scope.model.providerOperation.getForUpdate({
|
|
207
|
+
refundOperationId: refund.id,
|
|
208
|
+
kind: 'refund',
|
|
209
|
+
});
|
|
210
|
+
if (providerOperation) {
|
|
211
|
+
await this._completeProviderOperation(providerOperation, options.providerRefundId);
|
|
212
|
+
}
|
|
206
213
|
}
|
|
207
214
|
return {
|
|
208
215
|
refund: {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vona-suite-a-pay",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "",
|
|
6
6
|
"files": [],
|
|
7
7
|
"type": "module",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"vona-module-a-pay": "^5.0.
|
|
10
|
-
"vona-module-pay-mock": "^5.0.
|
|
11
|
-
"vona-module-pay-paypal": "^5.0.
|
|
12
|
-
"vona-module-pay-stripe": "^5.0.
|
|
9
|
+
"vona-module-a-pay": "^5.0.8",
|
|
10
|
+
"vona-module-pay-mock": "^5.0.8",
|
|
11
|
+
"vona-module-pay-paypal": "^5.0.8",
|
|
12
|
+
"vona-module-pay-stripe": "^5.0.8"
|
|
13
13
|
},
|
|
14
14
|
"title": "a-pay"
|
|
15
15
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-jsx",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.87",
|
|
4
4
|
"gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
|
|
5
5
|
"description": "Zova JSX",
|
|
6
6
|
"keywords": [
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@cabloy/word-utils": "^2.1.14",
|
|
51
51
|
"typestyle": "^2.4.0",
|
|
52
52
|
"vue": "^3.5.38",
|
|
53
|
-
"zova-core": "^5.1.
|
|
53
|
+
"zova-core": "^5.1.87"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"clean-package": "^2.2.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.152",
|
|
4
4
|
"gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
|
|
5
5
|
"description": "A vue3 framework with ioc",
|
|
6
6
|
"keywords": [
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"postpack": "clean-package restore"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"zova-core": "^5.1.
|
|
49
|
-
"zova-suite-a-zova": "^5.1.
|
|
48
|
+
"zova-core": "^5.1.87",
|
|
49
|
+
"zova-suite-a-zova": "^5.1.151"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"clean-package": "^2.2.0",
|