payment-kit 1.19.19 → 1.19.21

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.
@@ -287,13 +287,11 @@ export async function checkAndTriggerAutoRecharge(
287
287
  currentBalance: string
288
288
  ): Promise<void> {
289
289
  try {
290
- // 查找自动充值配置
291
290
  const config = await AutoRechargeConfig.findOne({
292
291
  where: {
293
292
  customer_id: customer.id,
294
293
  currency_id: currencyId,
295
294
  enabled: true,
296
- livemode: customer.livemode,
297
295
  },
298
296
  });
299
297
 
package/blocklet.yml CHANGED
@@ -14,7 +14,7 @@ repository:
14
14
  type: git
15
15
  url: git+https://github.com/blocklet/payment-kit.git
16
16
  specVersion: 1.2.8
17
- version: 1.19.19
17
+ version: 1.19.21
18
18
  logo: logo.png
19
19
  files:
20
20
  - dist
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payment-kit",
3
- "version": "1.19.19",
3
+ "version": "1.19.21",
4
4
  "scripts": {
5
5
  "dev": "blocklet dev --open",
6
6
  "lint": "tsc --noEmit && eslint src api/src --ext .mjs,.js,.jsx,.ts,.tsx",
@@ -45,19 +45,19 @@
45
45
  "dependencies": {
46
46
  "@abtnode/cron": "^1.16.48",
47
47
  "@arcblock/did": "^1.23.1",
48
- "@arcblock/did-connect-react": "^3.1.31",
48
+ "@arcblock/did-connect-react": "^3.1.32",
49
49
  "@arcblock/did-connect-storage-nedb": "^1.8.0",
50
50
  "@arcblock/did-util": "^1.23.1",
51
51
  "@arcblock/jwt": "^1.23.1",
52
- "@arcblock/ux": "^3.1.31",
52
+ "@arcblock/ux": "^3.1.32",
53
53
  "@arcblock/validator": "^1.23.1",
54
- "@blocklet/did-space-js": "^1.1.18",
54
+ "@blocklet/did-space-js": "^1.1.19",
55
55
  "@blocklet/error": "^0.2.5",
56
56
  "@blocklet/js-sdk": "^1.16.48",
57
57
  "@blocklet/logger": "^1.16.48",
58
- "@blocklet/payment-react": "1.19.19",
58
+ "@blocklet/payment-react": "1.19.21",
59
59
  "@blocklet/sdk": "^1.16.48",
60
- "@blocklet/ui-react": "^3.1.31",
60
+ "@blocklet/ui-react": "^3.1.32",
61
61
  "@blocklet/uploader": "^0.2.7",
62
62
  "@blocklet/xss": "^0.2.5",
63
63
  "@mui/icons-material": "^7.1.2",
@@ -124,7 +124,7 @@
124
124
  "devDependencies": {
125
125
  "@abtnode/types": "^1.16.48",
126
126
  "@arcblock/eslint-config-ts": "^0.3.3",
127
- "@blocklet/payment-types": "1.19.19",
127
+ "@blocklet/payment-types": "1.19.21",
128
128
  "@types/cookie-parser": "^1.4.9",
129
129
  "@types/cors": "^2.8.19",
130
130
  "@types/debug": "^4.1.12",
@@ -136,6 +136,7 @@
136
136
  "@vitejs/plugin-react": "^4.6.0",
137
137
  "babel-plugin-lodash": "^3.3.4",
138
138
  "bumpp": "^8.2.1",
139
+ "code-inspector-plugin": "^1.2.3",
139
140
  "cross-env": "^7.0.3",
140
141
  "eslint": "^8.57.1",
141
142
  "import-sort-style-module": "^6.0.0",
@@ -170,5 +171,5 @@
170
171
  "parser": "typescript"
171
172
  }
172
173
  },
173
- "gitHead": "76facca620eda1132f8c6d5b8f42d8fd9ef78b05"
174
+ "gitHead": "66941895c869b90d0635b9d2a56593b2c85a3e3e"
174
175
  }
package/vite.config.ts CHANGED
@@ -6,6 +6,7 @@ import svgr from 'vite-plugin-svgr';
6
6
  import tsconfigPaths from 'vite-tsconfig-paths';
7
7
  import { visualizer } from 'rollup-plugin-visualizer';
8
8
  import path from 'path';
9
+ import { codeInspectorPlugin } from 'code-inspector-plugin';
9
10
 
10
11
  // https://vitejs.dev/config/
11
12
  export default defineConfig(({ mode }) => {
@@ -13,9 +14,29 @@ export default defineConfig(({ mode }) => {
13
14
  const isDevelopment = mode === 'development';
14
15
  const alias: Record<string, string> = {};
15
16
 
17
+ const arcblockUxBasePath = process.env.ARCBLOCK_UX_BASE_PATH;
18
+ const exclude: string[] = [];
19
+ if (arcblockUxBasePath) {
20
+ alias['@arcblock/ux'] = `${arcblockUxBasePath}/packages/ux`;
21
+ alias['@arcblock/ux/lib'] = `${arcblockUxBasePath}/packages/ux/src`;
22
+ alias['@blocklet/ui-react'] = `${arcblockUxBasePath}/packages/blocklet-ui-react`;
23
+ alias['@blocklet/ui-react/lib'] = `${arcblockUxBasePath}/packages/blocklet-ui-react/src`;
24
+ alias['@arcblock/did-connect-react'] = `${arcblockUxBasePath}/packages/did-connect`;
25
+ alias['@arcblock/did-connect-react/lib'] = `${arcblockUxBasePath}/packages/did-connect/src`;
26
+ exclude.push(
27
+ '@arcblock/ux',
28
+ '@arcblock/ux/lib',
29
+ '@blocklet/ui-react',
30
+ '@blocklet/ui-react/lib',
31
+ '@arcblock/did-connect-react',
32
+ '@arcblock/did-connect-react/lib'
33
+ );
34
+ }
35
+
16
36
  if (isDevelopment) {
17
37
  alias['@blocklet/payment-react'] = path.resolve(__dirname, '../../packages/react/src');
18
38
  alias['@blocklet/payment-js'] = path.resolve(__dirname, '../../packages/client/src');
39
+ exclude.push('@blocklet/payment-react', '@blocklet/payment-js');
19
40
  }
20
41
 
21
42
  if (isProduction) {
@@ -34,6 +55,10 @@ export default defineConfig(({ mode }) => {
34
55
  createBlockletPlugin(),
35
56
  svgr(),
36
57
  process.env.ANALYZE && visualizer({ open: true, gzipSize: true, brotliSize: true }),
58
+ // @note: 如果开发期间,文件隔离模式报错了,那么可以关闭server的文件隔离模式
59
+ codeInspectorPlugin({
60
+ bundler: 'vite',
61
+ }),
37
62
  ].filter(Boolean),
38
63
 
39
64
  build: {
@@ -79,7 +104,7 @@ export default defineConfig(({ mode }) => {
79
104
  optimizeDeps: {
80
105
  include: ['react', 'react-dom', 'react/jsx-runtime'],
81
106
  esbuildOptions: { mainFields: ['module', 'main'], resolveExtensions: ['.ts', '.tsx', '.js', '.jsx'] },
82
- exclude: isDevelopment ? ['@blocklet/payment-react', '@blocklet/payment-js'] : [],
107
+ exclude,
83
108
  },
84
109
  resolve: {
85
110
  alias,