payment-kit 1.13.298 → 1.13.299
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/api/dev.ts +6 -2
- package/blocklet.yml +1 -1
- package/package.json +8 -6
- package/tsconfig.json +6 -1
- package/vite-server.config.ts +11 -0
- package/vite.config.ts +12 -2
package/api/dev.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
2
2
|
import { setupClient } from 'vite-plugin-blocklet';
|
|
3
3
|
|
|
4
|
-
import { app } from './src';
|
|
4
|
+
import { app, server } from './src';
|
|
5
5
|
|
|
6
|
-
setupClient(app, {
|
|
6
|
+
setupClient(app, {
|
|
7
|
+
server,
|
|
8
|
+
// @ts-ignore
|
|
9
|
+
importMetaHot: import.meta.hot,
|
|
10
|
+
});
|
package/blocklet.yml
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "payment-kit",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.299",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "blocklet dev --open",
|
|
6
6
|
"eject": "vite eject",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"format": "prettier -w src",
|
|
10
10
|
"test": "node scripts/jest.js",
|
|
11
11
|
"coverage": "npm run test -- --coverage",
|
|
12
|
-
"start": "
|
|
12
|
+
"start": "vite-node -c vite-server.config.ts -w api/dev.ts",
|
|
13
13
|
"clean": "node scripts/build-clean.js",
|
|
14
14
|
"bundle": "tsc --noEmit && npm run bundle:client && npm run bundle:api",
|
|
15
15
|
"bundle:client": "vite build",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@arcblock/validator": "^1.18.124",
|
|
53
53
|
"@blocklet/js-sdk": "1.16.28",
|
|
54
54
|
"@blocklet/logger": "1.16.28",
|
|
55
|
-
"@blocklet/payment-react": "1.13.
|
|
55
|
+
"@blocklet/payment-react": "1.13.299",
|
|
56
56
|
"@blocklet/sdk": "1.16.28",
|
|
57
57
|
"@blocklet/ui-react": "^2.10.3",
|
|
58
58
|
"@blocklet/uploader": "^0.1.18",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"devDependencies": {
|
|
119
119
|
"@abtnode/types": "1.16.28",
|
|
120
120
|
"@arcblock/eslint-config-ts": "^0.3.2",
|
|
121
|
-
"@blocklet/payment-types": "1.13.
|
|
121
|
+
"@blocklet/payment-types": "1.13.299",
|
|
122
122
|
"@types/cookie-parser": "^1.4.7",
|
|
123
123
|
"@types/cors": "^2.8.17",
|
|
124
124
|
"@types/debug": "^4.1.12",
|
|
@@ -143,9 +143,11 @@
|
|
|
143
143
|
"type-fest": "^4.19.0",
|
|
144
144
|
"typescript": "^4.9.5",
|
|
145
145
|
"vite": "^5.2.12",
|
|
146
|
-
"vite-
|
|
146
|
+
"vite-node": "^2.0.1",
|
|
147
|
+
"vite-plugin-blocklet": "^0.8.7",
|
|
147
148
|
"vite-plugin-node-polyfills": "^0.21.0",
|
|
148
149
|
"vite-plugin-svgr": "^4.2.0",
|
|
150
|
+
"vite-tsconfig-paths": "^4.3.2",
|
|
149
151
|
"zx": "^7.2.3"
|
|
150
152
|
},
|
|
151
153
|
"importSort": {
|
|
@@ -158,5 +160,5 @@
|
|
|
158
160
|
"parser": "typescript"
|
|
159
161
|
}
|
|
160
162
|
},
|
|
161
|
-
"gitHead": "
|
|
163
|
+
"gitHead": "1cda070f8f82a765a14eb6303c4eb1343dbd91da"
|
|
162
164
|
}
|
package/tsconfig.json
CHANGED
|
@@ -97,6 +97,11 @@
|
|
|
97
97
|
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
|
98
98
|
/* Completeness */
|
|
99
99
|
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
|
100
|
-
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
|
100
|
+
"skipLibCheck": true, /* Skip type checking all .d.ts files. */
|
|
101
|
+
"baseUrl": "./",
|
|
102
|
+
"paths": {
|
|
103
|
+
"@app/*": ["./src/*"],
|
|
104
|
+
"@api/*": ["./api/src/*"],
|
|
105
|
+
}
|
|
101
106
|
}
|
|
102
107
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
|
+
|
|
3
|
+
import { defineConfig } from 'vite';
|
|
4
|
+
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
5
|
+
|
|
6
|
+
// https://vitejs.dev/config/
|
|
7
|
+
export default defineConfig(() => {
|
|
8
|
+
return {
|
|
9
|
+
plugins: [tsconfigPaths()],
|
|
10
|
+
};
|
|
11
|
+
});
|
package/vite.config.ts
CHANGED
|
@@ -3,11 +3,13 @@ import react from '@vitejs/plugin-react';
|
|
|
3
3
|
import { defineConfig } from 'vite';
|
|
4
4
|
import { createBlockletPlugin } from 'vite-plugin-blocklet';
|
|
5
5
|
import svgr from 'vite-plugin-svgr';
|
|
6
|
+
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
7
|
+
import path from 'path';
|
|
6
8
|
|
|
7
9
|
// https://vitejs.dev/config/
|
|
8
|
-
export default defineConfig(() => {
|
|
10
|
+
export default defineConfig(({ mode }) => {
|
|
9
11
|
return {
|
|
10
|
-
plugins: [react(), createBlockletPlugin(), svgr()],
|
|
12
|
+
plugins: [tsconfigPaths(), react(), createBlockletPlugin(), svgr()],
|
|
11
13
|
build: {
|
|
12
14
|
// 禁止 preload 可以解决 js 的请求没有 referer 的问题
|
|
13
15
|
cssCodeSplit: false,
|
|
@@ -15,5 +17,13 @@ export default defineConfig(() => {
|
|
|
15
17
|
transformMixedEsModules: true,
|
|
16
18
|
},
|
|
17
19
|
},
|
|
20
|
+
...(mode === 'development' && {
|
|
21
|
+
resolve: {
|
|
22
|
+
alias: [
|
|
23
|
+
{ find: '@blocklet/payment-react', replacement: path.resolve(__dirname, '../../packages/react/src') },
|
|
24
|
+
{ find: '@blocklet/payment-js', replacement: path.resolve(__dirname, '../../packages/client/src') },
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
}),
|
|
18
28
|
};
|
|
19
29
|
});
|