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.
Files changed (142) hide show
  1. package/.cabloy-version +1 -1
  2. package/.github/workflows/playwright-e2e.yml +2 -2
  3. package/CHANGELOG.md +32 -0
  4. package/cabloy-docs/frontend/form-guide.md +47 -0
  5. package/cabloy-docs/frontend/markdown-guide.md +50 -17
  6. package/cabloy-docs/frontend/route-alias-guide.md +20 -0
  7. package/cabloy-docs/frontend/scripts.md +9 -11
  8. package/cabloy-docs/frontend/zova-form-under-the-hood.md +25 -0
  9. package/cabloy-docs/fullstack/framework-performance.md +3 -3
  10. package/cabloy-docs/fullstack/parallel-worktree-environment.md +1 -1
  11. package/cabloy-docs/fullstack/quickstart.md +5 -4
  12. package/cabloy-docs/reference/repo-scripts.md +29 -42
  13. package/e2e/config/playwright.config.ts +34 -0
  14. package/e2e/scripts/e2e.ts +2 -27
  15. package/e2e/scripts/runE2e.ts +62 -0
  16. package/e2e/scripts/runE2eArgs.test.ts +75 -0
  17. package/e2e/scripts/runE2eArgs.ts +158 -0
  18. package/e2e/specs/{a-commerce/commerce.spec.ts → a-commerce.spec.ts} +364 -33
  19. package/e2e/specs/{cabloy-basic/account.spec.ts → account.spec.ts} +1 -2
  20. package/e2e/specs/{cabloy-basic/basic.spec.ts → cabloy-basic.spec.ts} +6 -8
  21. package/oxlint.config.ts +3 -0
  22. package/package.json +3 -9
  23. package/scripts/upgrade.ts +63 -68
  24. package/vona/packages-utils/lint/package.json +1 -1
  25. package/vona/packages-utils/lint/src/oxc/lint.ts +1 -1
  26. package/vona/packages-utils/lint/src/oxc/lintVue.ts +1 -1
  27. package/vona/pnpm-lock.yaml +100 -657
  28. package/vona/src/suite/a-commerce/modules/commerce-trade/src/dto/refundRecoveryView.tsx +7 -2
  29. package/vona/src/suite/a-commerce/modules/commerce-trade/src/service/order.ts +31 -15
  30. package/vona/src/suite/a-home/modules/home-user/package.json +1 -0
  31. package/vona/src/suite/a-home/modules/home-user/src/service/account.ts +15 -2
  32. package/vona/src/suite/a-home/modules/home-user/test/accountActivation.test.ts +34 -4
  33. package/vona/src/suite-vendor/a-cabloy/modules/a-markdown/package.json +2 -1
  34. package/vona/src/suite-vendor/a-cabloy/modules/a-markdown/src/.metadata/index.ts +26 -0
  35. package/vona/src/suite-vendor/a-cabloy/modules/a-markdown/src/bean/imageScene.markdown.ts +13 -0
  36. package/vona/src/suite-vendor/a-cabloy/package.json +2 -2
  37. package/vona/src/suite-vendor/a-pay/modules/a-pay/package.json +1 -1
  38. package/vona/src/suite-vendor/a-pay/modules/a-pay/src/service/providerOperation.ts +23 -0
  39. package/vona/src/suite-vendor/a-pay/modules/a-pay/src/service/refundOperation.ts +7 -0
  40. package/vona/src/suite-vendor/a-pay/modules/pay-mock/package.json +1 -1
  41. package/vona/src/suite-vendor/a-pay/modules/pay-paypal/package.json +1 -1
  42. package/vona/src/suite-vendor/a-pay/modules/pay-stripe/package.json +1 -1
  43. package/vona/src/suite-vendor/a-pay/package.json +5 -5
  44. package/zova/packages-utils/zova-jsx/package.json +2 -2
  45. package/zova/packages-zova/zova/package.json +3 -3
  46. package/zova/packages-zova/zova-core/package.json +1 -1
  47. package/zova/packages-zova/zova-core/src/bean/resource/locale/type.ts +1 -0
  48. package/zova/pnpm-lock.yaml +63 -18
  49. package/zova/src/front/config/config/config.cabloyBasicWeb.ts +3 -1
  50. package/zova/src/front/config/config/config.cabloyCommerce.ts +4 -2
  51. package/zova/src/suite/a-commerce/modules/commerce-catalog/src/api/openapi/schemas.ts +0 -11
  52. package/zova/src/suite/a-commerce/modules/commerce-catalog/src/api/openapi/types.ts +23 -170
  53. package/zova/src/suite/a-commerce/modules/commerce-member/src/api/openapi/schemas.ts +0 -11
  54. package/zova/src/suite/a-commerce/modules/commerce-member/src/api/openapi/types.ts +23 -170
  55. package/zova/src/suite/a-commerce/modules/commerce-member/src/page/address/controller.tsx +64 -63
  56. package/zova/src/suite/a-commerce/modules/commerce-promotion/src/api/openapi/schemas.ts +0 -11
  57. package/zova/src/suite/a-commerce/modules/commerce-promotion/src/api/openapi/types.ts +23 -170
  58. package/zova/src/suite/a-commerce/modules/commerce-siteadmin/src/api/openapi/schemas.ts +0 -11
  59. package/zova/src/suite/a-commerce/modules/commerce-siteadmin/src/api/openapi/types.ts +23 -170
  60. package/zova/src/suite/a-commerce/modules/commerce-trade/src/api/openapi/schemas.ts +0 -11
  61. package/zova/src/suite/a-commerce/modules/commerce-trade/src/api/openapi/types.ts +29 -171
  62. package/zova/src/suite/a-commerce/modules/commerce-trade/src/component/tableCellActionRefund/controller.tsx +413 -134
  63. package/zova/src/suite/a-commerce/modules/commerce-trade/src/config/locale/en-us.ts +76 -0
  64. package/zova/src/suite/a-commerce/modules/commerce-trade/src/config/locale/zh-cn.ts +67 -0
  65. package/zova/src/suite/a-commerce/modules/commerce-trade/src/model/order.ts +1 -0
  66. package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/cart/controller.tsx +1 -1
  67. package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/checkout/controller.tsx +7 -7
  68. package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/order/controller.tsx +46 -9
  69. package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/payment/controller.tsx +50 -30
  70. package/zova/src/suite/a-home/modules/home-api/src/api/openapi/schemas.ts +0 -11
  71. package/zova/src/suite/a-home/modules/home-api/src/api/openapi/types.ts +23 -170
  72. package/zova/src/suite/a-training/modules/training-student/src/api/openapi/schemas.ts +0 -11
  73. package/zova/src/suite/a-training/modules/training-student/src/api/openapi/types.ts +23 -170
  74. package/zova/src/suite/cabloy-basic/modules/basic-captcha/src/component/formFieldCaptcha/controller.tsx +6 -2
  75. package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/openapi/schemas.ts +0 -11
  76. package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/openapi/types.ts +23 -170
  77. package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/openapi/schemas.ts +0 -11
  78. package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/openapi/types.ts +23 -170
  79. package/zova/src/suite/cabloy-basic/modules/basic-image/src/component/formFieldImage/controller.tsx +9 -15
  80. package/zova/src/suite/cabloy-basic/modules/basic-markdown/package.json +10 -2
  81. package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/.metadata/index.ts +11 -2
  82. package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/.metadata/locales.ts +7 -0
  83. package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/component/formFieldMarkdown/controller.tsx +723 -5
  84. package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/component/formFieldMarkdown/render.tsx +461 -2
  85. package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/config/locale/en-us.ts +59 -0
  86. package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/config/locale/zh-cn.ts +59 -0
  87. package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/index.ts +1 -0
  88. package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/lib/codeBlockLanguages.ts +42 -0
  89. package/zova/src/suite/cabloy-basic/modules/basic-markdown/src/lib/richTextContentStyle.ts +20 -0
  90. package/zova/src/suite/cabloy-basic/modules/basic-markdown/test/lib/codeBlockLanguages.test.ts +25 -0
  91. package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/package.json +1 -1
  92. package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/model/resource.ts +1 -0
  93. package/zova/src/suite-vendor/a-cabloy/package.json +2 -2
  94. package/zova/src/suite-vendor/a-pay/modules/a-pay/package.json +1 -1
  95. package/zova/src/suite-vendor/a-pay/modules/a-pay/src/api/openapi/schemas.ts +0 -11
  96. package/zova/src/suite-vendor/a-pay/modules/a-pay/src/api/openapi/types.ts +23 -170
  97. package/zova/src/suite-vendor/a-pay/modules/a-pay/src/component/paymentNextAction/controller.tsx +26 -12
  98. package/zova/src/suite-vendor/a-pay/modules/pay-mock/cli/openapi.config.ts +1 -1
  99. package/zova/src/suite-vendor/a-pay/modules/pay-mock/package.json +1 -1
  100. package/zova/src/suite-vendor/a-pay/modules/pay-mock/src/api/openapi/schemas.ts +0 -11
  101. package/zova/src/suite-vendor/a-pay/modules/pay-mock/src/api/openapi/types.ts +23 -170
  102. package/zova/src/suite-vendor/a-pay/modules/pay-mock/src/api/payMockMockPayment.ts +26 -0
  103. package/zova/src/suite-vendor/a-pay/modules/pay-mock/src/apiSchema/payMockMockPayment.ts +8 -1
  104. package/zova/src/suite-vendor/a-pay/modules/pay-mock/src/model/payMockPayment.ts +13 -1
  105. package/zova/src/suite-vendor/a-pay/package.json +3 -3
  106. package/zova/src/suite-vendor/a-zova/modules/a-form/package.json +1 -1
  107. package/zova/src/suite-vendor/a-zova/modules/a-form/src/component/formField/controller.tsx +2 -0
  108. package/zova/src/suite-vendor/a-zova/modules/a-form/src/types/formField.ts +7 -6
  109. package/zova/src/suite-vendor/a-zova/modules/a-ssrserver/package.json +1 -1
  110. package/zova/src/suite-vendor/a-zova/modules/a-ssrserver/src/service/ssrHandler.ts +1 -1
  111. package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +2 -2
  112. package/zova/src/suite-vendor/a-zova/package.json +4 -4
  113. package/e2e/config/playwright.basic.config.ts +0 -3
  114. package/e2e/config/playwright.commerce.config.ts +0 -3
  115. package/e2e/config/playwright.shared.config.ts +0 -38
  116. package/e2e/scripts/testE2eClean.ts +0 -56
  117. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/package.json +0 -56
  118. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/.metadata/index.ts +0 -404
  119. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/.metadata/locales.ts +0 -18
  120. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/.metadata/this.ts +0 -2
  121. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/bean/bean.paypal.ts +0 -99
  122. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/bean/event.paypalCancelOrder.ts +0 -15
  123. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/bean/event.paypalCaptureOrder.ts +0 -22
  124. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/bean/meta.version.ts +0 -24
  125. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/config/config.ts +0 -14
  126. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/config/errors.ts +0 -3
  127. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/config/locale/en-us.ts +0 -3
  128. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/config/locale/zh-cn.ts +0 -3
  129. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/controller/paypal.ts +0 -39
  130. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/dto/paypalOrderRecordOptions.tsx +0 -31
  131. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/dto/paypalOrderRecordPayload.tsx +0 -18
  132. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/entity/paypalRecord.tsx +0 -30
  133. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/index.ts +0 -3
  134. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/model/paypalRecord.ts +0 -10
  135. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/service/paypal.ts +0 -83
  136. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/types/index.ts +0 -1
  137. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/src/types/paypal.ts +0 -18
  138. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/tsconfig.build.json +0 -11
  139. package/vona/src/suite-vendor/a-paypal/modules/a-paypal/tsconfig.json +0 -7
  140. package/vona/src/suite-vendor/a-paypal/package.json +0 -13
  141. package/vona/src/suite-vendor/a-paypal/tsconfig.base.json +0 -4
  142. package/vona/src/suite-vendor/a-paypal/tsconfig.json +0 -10
@@ -3,11 +3,18 @@ import type { IApiSchemaOptions } from 'zova-module-a-api';
3
3
  import { BeanBase } from 'zova';
4
4
  import { ApiSchema } from 'zova-module-a-api';
5
5
 
6
- import { ApiApiPayMockMockPaymentcompletePath } from '../api/payMockMockPayment.js';
6
+ import {
7
+ ApiApiPayMockMockPaymentcompletePath,
8
+ ApiApiPayMockMockPaymentcompleteRefundPath,
9
+ } from '../api/payMockMockPayment.js';
7
10
 
8
11
  @ApiSchema()
9
12
  export class ApiSchemaPayMockMockPayment extends BeanBase {
10
13
  complete(options?: IApiSchemaOptions) {
11
14
  return this.$sdk.createApiSchemas(ApiApiPayMockMockPaymentcompletePath, 'post', options);
12
15
  }
16
+
17
+ completeRefund(options?: IApiSchemaOptions) {
18
+ return this.$sdk.createApiSchemas(ApiApiPayMockMockPaymentcompleteRefundPath, 'post', options);
19
+ }
13
20
  }
@@ -3,7 +3,10 @@ import type { IDecoratorModelOptions } from 'zova-module-a-model';
3
3
 
4
4
  import { BeanModelBase, Model } from 'zova-module-a-model';
5
5
 
6
- import { ApiApiPayMockMockPaymentcompleteRequestBody } from '../api/payMockMockPayment.js';
6
+ import {
7
+ ApiApiPayMockMockPaymentcompleteRefundRequestBody,
8
+ ApiApiPayMockMockPaymentcompleteRequestBody,
9
+ } from '../api/payMockMockPayment.js';
7
10
 
8
11
  export interface IModelOptionsPayMockPayment extends IDecoratorModelOptions {}
9
12
 
@@ -17,4 +20,13 @@ export class ModelPayMockPayment extends BeanModelBase {
17
20
  },
18
21
  });
19
22
  }
23
+
24
+ completeRefund(id: TableIdentity) {
25
+ return this.$useMutationData({
26
+ mutationKey: ['completeRefund', id],
27
+ mutationFn: async (body: ApiApiPayMockMockPaymentcompleteRefundRequestBody) => {
28
+ return await this.scope.api.payMockMockPayment.completeRefund(body, { params: { id } });
29
+ },
30
+ });
31
+ }
20
32
  }
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "zova-suite-a-pay",
3
- "version": "5.0.4",
3
+ "version": "5.0.6",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "files": [],
7
7
  "type": "module",
8
8
  "dependencies": {
9
- "zova-module-a-pay": "^5.0.5",
10
- "zova-module-pay-mock": "^5.0.3",
9
+ "zova-module-a-pay": "^5.0.7",
10
+ "zova-module-pay-mock": "^5.0.5",
11
11
  "zova-module-pay-paypal": "^5.0.2",
12
12
  "zova-module-pay-stripe": "^5.0.2"
13
13
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zova-module-a-form",
3
- "version": "5.1.47",
3
+ "version": "5.1.48",
4
4
  "gitHead": "09d901d17140a80ee0764211b441cda72fd94663",
5
5
  "description": "",
6
6
  "keywords": [
@@ -61,6 +61,7 @@ export class ControllerFormField<TParentData extends {} = {}> extends BeanContro
61
61
  const options = this._getFormFieldOptions();
62
62
  this._formField.api.update(options as any);
63
63
  this.form.resetField(this.name);
64
+ this.$props.onFieldStateReady?.(this);
64
65
  },
65
66
  );
66
67
  // behaviors
@@ -80,6 +81,7 @@ export class ControllerFormField<TParentData extends {} = {}> extends BeanContro
80
81
  },
81
82
  );
82
83
  }
84
+ this.$props.onFieldStateReady?.(this);
83
85
  }
84
86
 
85
87
  public get form() {
@@ -29,7 +29,7 @@ export type HTMLInputElementType =
29
29
  | 'email';
30
30
  export const constFieldProps = '$$FieldProps';
31
31
 
32
- export interface IFormFieldScope<TParentData = {}> {
32
+ export interface IFormFieldScope<TParentData extends {} = {}> {
33
33
  name: string;
34
34
  value: any;
35
35
  property?: SchemaObject;
@@ -51,7 +51,7 @@ export interface IFormFieldValidatorsOptionsBase {
51
51
  }
52
52
 
53
53
  export interface IFormFieldOptionsBase<
54
- TParentData = {},
54
+ TParentData extends {} = {},
55
55
  TName extends DeepKeys<TParentData> = DeepKeys<TParentData>,
56
56
  > {
57
57
  name?: TName;
@@ -63,6 +63,7 @@ export interface IFormFieldOptionsBase<
63
63
  required?: boolean;
64
64
  disableNotifyChanged?: boolean;
65
65
  onEffect?: TypeFormFieldOnEffect;
66
+ onFieldStateReady?: (formField: ControllerFormField<TParentData>) => void;
66
67
  validators?: IFormFieldValidatorsOptionsBase;
67
68
  // onChange?: (e: Event) => void; // allow set to null, but not provide null type
68
69
  // onInput?: (e: Event) => void; // allow set to null, but not provide null type
@@ -77,12 +78,12 @@ export interface IFormFieldPresetOptions<
77
78
  }
78
79
 
79
80
  export interface IFormFieldComponentOptions<
80
- TParentData = {},
81
+ TParentData extends {} = {},
81
82
  > extends IFormFieldOptions<TParentData> {
82
83
  options?: any;
83
84
  }
84
85
 
85
- export interface IFormFieldOptions<TParentData = {}>
86
+ export interface IFormFieldOptions<TParentData extends {} = {}>
86
87
  extends
87
88
  IFormFieldSysOptionsBase<TParentData>,
88
89
  IFormFieldOptionsBase<TParentData>,
@@ -113,7 +114,7 @@ export interface IFormFieldRenderContextProps {
113
114
  // onBlur?: (e: Event) => void;
114
115
  // }
115
116
 
116
- export interface IFormFieldRenderContextPropsBucket<TParentData = {}> extends Omit<
117
+ export interface IFormFieldRenderContextPropsBucket<TParentData extends {} = {}> extends Omit<
117
118
  IFormFieldOptions<TParentData>,
118
119
  'render'
119
120
  > {
@@ -123,7 +124,7 @@ export interface IFormFieldRenderContextPropsBucket<TParentData = {}> extends Om
123
124
  needHandleBorder?: boolean;
124
125
  }
125
126
 
126
- export interface IFormFieldRenderContext<TParentData = {}> {
127
+ export interface IFormFieldRenderContext<TParentData extends {} = {}> {
127
128
  propsBucket: IFormFieldRenderContextPropsBucket<TParentData>;
128
129
  props: IFormFieldRenderContextProps;
129
130
  celScope: IFormFieldScope<TParentData>;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zova-module-a-ssrserver",
3
- "version": "5.1.25",
3
+ "version": "5.1.26",
4
4
  "gitHead": "09d901d17140a80ee0764211b441cda72fd94663",
5
5
  "description": "",
6
6
  "keywords": [
@@ -294,7 +294,7 @@ export class ServiceSsrHandler extends BeanBase {
294
294
  typeof responseCacheExpires === 'string'
295
295
  ? ms(responseCacheExpires) / 1000
296
296
  : responseCacheExpires;
297
- if (expires === 0) {
297
+ if (expires === 0 || this.sys.env.META_MODE === 'development') {
298
298
  res.setHeader('cache-control', 'no-cache, no-store, must-revalidate');
299
299
  } else {
300
300
  res.setHeader('cache-control', `public, max-age=${expires}`);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zova-module-a-zova",
3
- "version": "5.1.101",
3
+ "version": "5.1.102",
4
4
  "gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
5
5
  "description": "zova",
6
6
  "keywords": [
@@ -43,7 +43,7 @@
43
43
  "@cabloy/word-utils": "^2.1.14",
44
44
  "defu": "^6.1.7",
45
45
  "luxon": "^3.7.2",
46
- "zova-jsx": "^1.1.86"
46
+ "zova-jsx": "^1.1.87"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@cabloy/cli": "^3.1.29",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zova-suite-a-zova",
3
- "version": "5.1.149",
3
+ "version": "5.1.151",
4
4
  "gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
5
5
  "description": "zova",
6
6
  "license": "MIT",
@@ -16,7 +16,7 @@
16
16
  "zova-module-a-boundary": "^5.1.22",
17
17
  "zova-module-a-command": "^5.1.34",
18
18
  "zova-module-a-fetch": "^5.1.25",
19
- "zova-module-a-form": "^5.1.47",
19
+ "zova-module-a-form": "^5.1.48",
20
20
  "zova-module-a-icon": "^5.1.27",
21
21
  "zova-module-a-interceptor": "^5.1.31",
22
22
  "zova-module-a-logger": "^5.1.28",
@@ -28,11 +28,11 @@
28
28
  "zova-module-a-routertabs": "^5.1.34",
29
29
  "zova-module-a-ssr": "^5.1.37",
30
30
  "zova-module-a-ssrhmr": "^5.1.23",
31
- "zova-module-a-ssrserver": "^5.1.25",
31
+ "zova-module-a-ssrserver": "^5.1.26",
32
32
  "zova-module-a-style": "^5.1.35",
33
33
  "zova-module-a-table": "^5.1.38",
34
34
  "zova-module-a-zod": "^5.1.37",
35
- "zova-module-a-zova": "^5.1.101"
35
+ "zova-module-a-zova": "^5.1.102"
36
36
  },
37
37
  "title": "a-zova"
38
38
  }
@@ -1,3 +0,0 @@
1
- import { createE2eConfig } from './playwright.shared.config.ts';
2
-
3
- export default createE2eConfig('basic');
@@ -1,3 +0,0 @@
1
- import { createE2eConfig } from './playwright.shared.config.ts';
2
-
3
- export default createE2eConfig('commerce');
@@ -1,38 +0,0 @@
1
- import { defineConfig } from '@playwright/test';
2
-
3
- import type { E2eSuiteName } from '../scripts/e2e.ts';
4
-
5
- import { E2E_LOCAL_BASE_URL, E2E_ROOT_DIR, getE2eSuite } from '../scripts/e2e.ts';
6
-
7
- export function createE2eConfig(suiteName: E2eSuiteName) {
8
- const suite = getE2eSuite(suiteName);
9
- const externalBaseURL = process.env[suite.externalBaseUrlEnv];
10
- const baseURL = externalBaseURL || E2E_LOCAL_BASE_URL;
11
-
12
- return defineConfig({
13
- testDir: suite.testDir,
14
- fullyParallel: true,
15
- forbidOnly: !!process.env.CI,
16
- retries: process.env.CI ? 2 : 0,
17
- reporter: process.env.CI ? [['html', { open: 'never' }], ['list']] : 'list',
18
- use: {
19
- baseURL,
20
- trace: 'on-first-retry',
21
- },
22
- webServer: externalBaseURL
23
- ? undefined
24
- : {
25
- command: 'node e2e/scripts/startE2eVona.ts',
26
- cwd: E2E_ROOT_DIR,
27
- url: `${baseURL}${suite.readinessPath}`,
28
- timeout: 180_000,
29
- reuseExistingServer: false,
30
- stdout: 'pipe',
31
- stderr: 'pipe',
32
- gracefulShutdown: {
33
- signal: 'SIGINT',
34
- timeout: 10_000,
35
- },
36
- },
37
- });
38
- }
@@ -1,56 +0,0 @@
1
- import { execFileSync } from 'node:child_process';
2
- import { createServer } from 'node:net';
3
-
4
- import { E2E_PORT, E2E_ROOT_DIR, getE2eSuite } from './e2e.ts';
5
-
6
- const suiteName = process.argv[2];
7
- const suite = getE2eSuite(suiteName);
8
- const playwrightArgs = process.argv.slice(3);
9
-
10
- function run(command: string, args: string[], cwd = E2E_ROOT_DIR) {
11
- // eslint-disable-next-line
12
- console.log(`\n===> ${[command, ...args].join(' ')}`);
13
- execFileSync(command, args, {
14
- cwd,
15
- stdio: 'inherit',
16
- });
17
- }
18
-
19
- function assertPlaywrightArgs(args: string[]) {
20
- for (const arg of args) {
21
- if (arg === '--config' || arg.startsWith('--config=')) {
22
- throw new Error(
23
- `test:e2e:${suiteName}:clean manages its suite config. Use --grep or --grep-invert to select tests.`,
24
- );
25
- }
26
- if (!arg.startsWith('-') && (arg.startsWith('e2e/') || /\.[cm]?[jt]sx?$/.test(arg))) {
27
- throw new Error(
28
- `test:e2e:${suiteName}:clean does not accept spec paths. Use --grep or --grep-invert to select tests.`,
29
- );
30
- }
31
- }
32
- }
33
-
34
- async function assertPortAvailable() {
35
- const server = createServer();
36
- await new Promise<void>((resolvePromise, reject) => {
37
- server.once('error', reject);
38
- server.listen(E2E_PORT, '127.0.0.1', () => {
39
- server.close(error => {
40
- if (error) reject(error);
41
- else resolvePromise();
42
- });
43
- });
44
- });
45
- }
46
-
47
- if (process.env[suite.externalBaseUrlEnv]) {
48
- throw new Error(
49
- `test:e2e:${suiteName}:clean manages only a local target. Use the aggregate or surface E2E commands for ${suite.externalBaseUrlEnv}.`,
50
- );
51
- }
52
-
53
- assertPlaywrightArgs(playwrightArgs);
54
- await assertPortAvailable();
55
- run('npm', ['run', 'db:reset']);
56
- run('npx', ['playwright', 'test', '--config', suite.configFile, ...playwrightArgs]);
@@ -1,56 +0,0 @@
1
- {
2
- "name": "vona-module-a-paypal",
3
- "version": "5.1.15",
4
- "gitHead": "a79189b882c17af5911573896a781bbb0046d37d",
5
- "description": "",
6
- "keywords": [
7
- "Vona Module"
8
- ],
9
- "author": "",
10
- "files": [
11
- "assets",
12
- "dist",
13
- "src"
14
- ],
15
- "type": "module",
16
- "exports": {
17
- ".": {
18
- "types": [
19
- "./src/index.ts",
20
- "./dist/index.d.ts"
21
- ],
22
- "import": "./src/index.ts",
23
- "default": "./dist/index.js"
24
- },
25
- "./package.json": "./package.json"
26
- },
27
- "scripts": {
28
- "clean": "rimraf dist tsconfig.build.tsbuildinfo",
29
- "tsc:publish": "npm run clean && node ../../../../../packages-cli/cli/src/bin/vona.ts :bin:buildModule --sourcemap && tsc -p tsconfig.build.json",
30
- "prepublishOnly": "npm run tsc:publish",
31
- "prepack": "clean-package",
32
- "postpack": "clean-package restore"
33
- },
34
- "dependencies": {
35
- "@cabloy/paypal-server-sdk": "^2.2.0"
36
- },
37
- "devDependencies": {
38
- "clean-package": "^2.2.0",
39
- "rimraf": "^6.1.3"
40
- },
41
- "clean-package": {
42
- "indent": 2,
43
- "remove": [
44
- "clean-package",
45
- "devDependencies",
46
- "exports.\\..import"
47
- ]
48
- },
49
- "title": "a-paypal",
50
- "vonaModule": {
51
- "dependencies": {
52
- "a-vona": "5.0.0"
53
- },
54
- "fileVersion": 1
55
- }
56
- }