create-blocklet 0.4.15 → 0.4.18
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/README.md +4 -0
- package/package.json +5 -5
- package/templates/blocklet-page-static/package.json +1 -1
- package/templates/express-api/package.json +3 -3
- package/templates/nextjs-dapp/package.json +6 -6
- package/templates/react-dapp/package.json +8 -8
- package/templates/react-gun-dapp/package.json +8 -8
- package/templates/react-static/package.json +2 -2
- package/templates/solidjs-dapp/index.html +0 -1
- package/templates/solidjs-dapp/package.json +12 -12
- package/templates/solidjs-dapp/vite.config.js +4 -18
- package/templates/solidjs-static/index.html +0 -1
- package/templates/solidjs-static/package.json +6 -6
- package/templates/solidjs-static/vite.config.js +2 -18
- package/templates/svelte-dapp/index.html +1 -2
- package/templates/svelte-dapp/package.json +11 -11
- package/templates/svelte-dapp/vite.config.js +2 -16
- package/templates/svelte-static/index.html +1 -2
- package/templates/svelte-static/package.json +6 -6
- package/templates/svelte-static/vite.config.js +2 -18
- package/templates/vue-dapp/index.html +1 -2
- package/templates/vue-dapp/package.json +12 -12
- package/templates/vue-dapp/vite.config.js +2 -17
- package/templates/vue-static/index.html +1 -2
- package/templates/vue-static/package.json +6 -6
- package/templates/vue-static/vite.config.js +2 -18
- package/templates/vue2-dapp/package.json +16 -16
- package/templates/vue2-static/package.json +10 -10
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-blocklet",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.18",
|
|
4
4
|
"exports": "./index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": "git@github.com:blocklet/create-blocklet.git",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
},
|
|
24
24
|
"homepage": "https://github.com/blocklet/create-blocklet/tree/main#readme",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@arcblock/did": "^1.17.
|
|
27
|
-
"@ocap/mcrypto": "^1.17.
|
|
28
|
-
"@ocap/util": "^1.17.
|
|
26
|
+
"@arcblock/did": "^1.17.4",
|
|
27
|
+
"@ocap/mcrypto": "^1.17.4",
|
|
28
|
+
"@ocap/util": "^1.17.4",
|
|
29
29
|
"boxen": "^6.2.1",
|
|
30
30
|
"ejs": "^3.1.8",
|
|
31
31
|
"envfile": "^6.17.0",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@arcblock/eslint-config-base": "0.2.2",
|
|
44
44
|
"eslint": "^8.19.0",
|
|
45
45
|
"prettier": "^2.7.1",
|
|
46
|
-
"vitest": "^0.
|
|
46
|
+
"vitest": "^0.18.0"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
49
|
"lint": "eslint .",
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
"license": "ISC",
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@arcblock/did-auth-storage-nedb": "^1.6.3",
|
|
19
|
-
"@blocklet/sdk": "^1.
|
|
20
|
-
"@ocap/client": "^1.17.
|
|
19
|
+
"@blocklet/sdk": "^1.8.2",
|
|
20
|
+
"@ocap/client": "^1.17.4",
|
|
21
21
|
"dotenv-flow": "^3.2.0",
|
|
22
22
|
"express": "^4.18.1"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"nodemon": "^2.0.
|
|
25
|
+
"nodemon": "^2.0.19"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
]
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@arcblock/did-auth": "^1.17.
|
|
28
|
+
"@arcblock/did-auth": "^1.17.4",
|
|
29
29
|
"@arcblock/did-auth-storage-nedb": "^1.6.3",
|
|
30
|
-
"@blocklet/sdk": "^1.
|
|
31
|
-
"@ocap/client": "^1.17.
|
|
32
|
-
"@ocap/mcrypto": "^1.17.
|
|
33
|
-
"@ocap/wallet": "^1.17.
|
|
30
|
+
"@blocklet/sdk": "^1.8.2",
|
|
31
|
+
"@ocap/client": "^1.17.4",
|
|
32
|
+
"@ocap/mcrypto": "^1.17.4",
|
|
33
|
+
"@ocap/wallet": "^1.17.4",
|
|
34
34
|
"dotenv-flow": "^3.2.0",
|
|
35
35
|
"express": "^4.18.1",
|
|
36
36
|
"next": "12.1.6",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"eslint-config-next": "12.1.6",
|
|
43
43
|
"husky": "^8.0.1",
|
|
44
44
|
"lint-staged": "^12.5.0",
|
|
45
|
-
"nodemon": "^2.0.
|
|
45
|
+
"nodemon": "^2.0.19",
|
|
46
46
|
"npm-run-all": "^4.1.5"
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
]
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@arcblock/did-auth": "^1.17.
|
|
42
|
+
"@arcblock/did-auth": "^1.17.4",
|
|
43
43
|
"@arcblock/did-auth-storage-nedb": "^1.6.3",
|
|
44
|
-
"@blocklet/sdk": "^1.
|
|
45
|
-
"@ocap/client": "^1.17.
|
|
46
|
-
"@ocap/mcrypto": "^1.17.
|
|
47
|
-
"@ocap/wallet": "^1.17.
|
|
44
|
+
"@blocklet/sdk": "^1.8.2",
|
|
45
|
+
"@ocap/client": "^1.17.4",
|
|
46
|
+
"@ocap/mcrypto": "^1.17.4",
|
|
47
|
+
"@ocap/wallet": "^1.17.4",
|
|
48
48
|
"axios": "^0.27.2",
|
|
49
49
|
"compression": "^1.7.4",
|
|
50
50
|
"cookie-parser": "^1.4.6",
|
|
@@ -59,12 +59,12 @@
|
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@arcblock/eslint-config": "^0.2.2",
|
|
62
|
-
"@craco/craco": "^6.4.
|
|
62
|
+
"@craco/craco": "^6.4.5",
|
|
63
63
|
"babel-eslint": "^10.1.0",
|
|
64
|
-
"eslint": "^8.
|
|
64
|
+
"eslint": "^8.19.0",
|
|
65
65
|
"husky": "^8.0.1",
|
|
66
66
|
"lint-staged": "^12.5.0",
|
|
67
|
-
"nodemon": "^2.0.
|
|
67
|
+
"nodemon": "^2.0.19",
|
|
68
68
|
"npm-run-all": "^4.1.5",
|
|
69
69
|
"prettier": "^2.7.1",
|
|
70
70
|
"react-scripts": "5.0.1"
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
]
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@arcblock/did-auth": "^1.17.
|
|
42
|
+
"@arcblock/did-auth": "^1.17.4",
|
|
43
43
|
"@arcblock/did-auth-storage-nedb": "^1.6.3",
|
|
44
|
-
"@blocklet/sdk": "^1.
|
|
45
|
-
"@ocap/client": "^1.17.
|
|
46
|
-
"@ocap/mcrypto": "^1.17.
|
|
47
|
-
"@ocap/wallet": "^1.17.
|
|
44
|
+
"@blocklet/sdk": "^1.8.2",
|
|
45
|
+
"@ocap/client": "^1.17.4",
|
|
46
|
+
"@ocap/mcrypto": "^1.17.4",
|
|
47
|
+
"@ocap/wallet": "^1.17.4",
|
|
48
48
|
"axios": "^0.27.2",
|
|
49
49
|
"compression": "^1.7.4",
|
|
50
50
|
"cookie-parser": "^1.4.6",
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@arcblock/eslint-config": "^0.2.2",
|
|
63
|
-
"@craco/craco": "^6.4.
|
|
64
|
-
"eslint": "^8.
|
|
63
|
+
"@craco/craco": "^6.4.5",
|
|
64
|
+
"eslint": "^8.19.0",
|
|
65
65
|
"husky": "^8.0.1",
|
|
66
66
|
"lint-staged": "^12.5.0",
|
|
67
|
-
"nodemon": "^2.0.
|
|
67
|
+
"nodemon": "^2.0.19",
|
|
68
68
|
"npm-run-all": "^4.1.5",
|
|
69
69
|
"prettier": "^2.7.1",
|
|
70
70
|
"react-scripts": "5.0.1"
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
<meta name="theme-color" content="#000000" />
|
|
7
7
|
<link rel="shortcut icon" type="image/ico" href="/src/assets/favicon.ico" />
|
|
8
8
|
<title><%- title %></title>
|
|
9
|
-
<script src="__meta__.js"></script>
|
|
10
9
|
</head>
|
|
11
10
|
<body>
|
|
12
11
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"start:api": "NODE_ENV=development nodemon api/index.js -w api",
|
|
11
11
|
"clean": "rm -rf .blocklet",
|
|
12
12
|
"bundle": "npm run bundle:client && npm run bundle:api",
|
|
13
|
-
"bundle:client": "vite build
|
|
13
|
+
"bundle:client": "vite build",
|
|
14
14
|
"bundle:api": "npm run clean && blocklet bundle --zip --create-release",
|
|
15
15
|
"deploy": "npm run bundle && blocklet deploy .blocklet/bundle",
|
|
16
16
|
"upload": "npm run bundle && blocklet upload .blocklet/release/blocklet.json",
|
|
@@ -20,27 +20,27 @@
|
|
|
20
20
|
},
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"eslint": "^8.
|
|
23
|
+
"eslint": "^8.19.0",
|
|
24
24
|
"eslint-config-prettier": "^8.5.0",
|
|
25
|
-
"eslint-plugin-prettier": "^4.
|
|
25
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
26
26
|
"eslint-plugin-solid": "0.6.0",
|
|
27
27
|
"husky": "^8.0.1",
|
|
28
28
|
"lint-staged": "^12.5.0",
|
|
29
|
-
"nodemon": "^2.0.
|
|
29
|
+
"nodemon": "^2.0.19",
|
|
30
30
|
"npm-run-all": "^4.1.5",
|
|
31
31
|
"prettier": "^2.7.1",
|
|
32
|
-
"vite": "^2.9.
|
|
32
|
+
"vite": "^2.9.14",
|
|
33
33
|
"vite-plugin-html": "^3.2.0",
|
|
34
34
|
"vite-plugin-solid": "^2.2.6",
|
|
35
|
-
"vite-plugin-
|
|
35
|
+
"vite-plugin-blocklet": "^0.4.18"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@arcblock/did-auth": "^1.17.
|
|
38
|
+
"@arcblock/did-auth": "^1.17.4",
|
|
39
39
|
"@arcblock/did-auth-storage-nedb": "^1.6.3",
|
|
40
|
-
"@blocklet/sdk": "^1.
|
|
41
|
-
"@ocap/client": "^1.17.
|
|
42
|
-
"@ocap/mcrypto": "^1.17.
|
|
43
|
-
"@ocap/wallet": "^1.17.
|
|
40
|
+
"@blocklet/sdk": "^1.8.2",
|
|
41
|
+
"@ocap/client": "^1.17.4",
|
|
42
|
+
"@ocap/mcrypto": "^1.17.4",
|
|
43
|
+
"@ocap/wallet": "^1.17.4",
|
|
44
44
|
"axios": "^0.27.2",
|
|
45
45
|
"compression": "^1.7.4",
|
|
46
46
|
"cookie-parser": "^1.4.6",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"express": "^4.18.1",
|
|
50
50
|
"express-async-errors": "^3.1.1",
|
|
51
51
|
"express-history-api-fallback": "^2.2.1",
|
|
52
|
-
"solid-js": "^1.4.
|
|
52
|
+
"solid-js": "^1.4.7"
|
|
53
53
|
},
|
|
54
54
|
"lint-staged": {
|
|
55
55
|
"*.{mjs,js,vue}": [
|
|
@@ -1,47 +1,33 @@
|
|
|
1
1
|
import { defineConfig, loadEnv } from 'vite';
|
|
2
2
|
import solidPlugin from 'vite-plugin-solid';
|
|
3
3
|
import { createHtmlPlugin } from 'vite-plugin-html';
|
|
4
|
-
import
|
|
4
|
+
import { createBlockletPlugin } from 'vite-plugin-blocklet';
|
|
5
5
|
|
|
6
6
|
export default defineConfig(async ({ mode }) => {
|
|
7
7
|
const envMap = loadEnv(mode, process.cwd(), '');
|
|
8
|
-
const port = process.env.BLOCKLET_PORT || 3000;
|
|
9
8
|
const apiPort = envMap.API_PORT || 3030;
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
let mountPoint = process.env.BLOCKLET_DEV_MOUNT_POINT || '';
|
|
14
|
-
|
|
15
|
-
if (mountPoint && !mountPoint.endsWith('/')) {
|
|
16
|
-
mountPoint = `${mountPoint}/`;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const base = whenDev ? mountPoint : process.env.BASE_URL || '/';
|
|
20
|
-
|
|
21
|
-
return defineConfig({
|
|
22
|
-
base,
|
|
10
|
+
return {
|
|
23
11
|
plugins: [
|
|
24
12
|
solidPlugin(),
|
|
25
13
|
createHtmlPlugin({
|
|
26
14
|
minify: true,
|
|
27
15
|
inject: {
|
|
28
16
|
data: {
|
|
29
|
-
base,
|
|
30
17
|
title: envMap.APP_TITLE,
|
|
31
18
|
},
|
|
32
19
|
},
|
|
33
20
|
}),
|
|
34
|
-
|
|
21
|
+
createBlockletPlugin(),
|
|
35
22
|
],
|
|
36
23
|
build: {
|
|
37
24
|
target: 'esnext',
|
|
38
25
|
polyfillDynamicImport: false,
|
|
39
26
|
},
|
|
40
27
|
server: {
|
|
41
|
-
port,
|
|
42
28
|
proxy: {
|
|
43
29
|
'/api': `http://127.0.0.1:${apiPort}`,
|
|
44
30
|
},
|
|
45
31
|
},
|
|
46
|
-
}
|
|
32
|
+
};
|
|
47
33
|
});
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
<meta name="theme-color" content="#000000" />
|
|
7
7
|
<link rel="shortcut icon" type="image/ico" href="/src/assets/favicon.ico" />
|
|
8
8
|
<title><%- title %></title>
|
|
9
|
-
<script src="__meta__.js"></script>
|
|
10
9
|
</head>
|
|
11
10
|
<body>
|
|
12
11
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
@@ -9,27 +9,27 @@
|
|
|
9
9
|
"lint:fix": "npm run lint -- --fix",
|
|
10
10
|
"serve": "vite preview",
|
|
11
11
|
"clean": "rm -rf .blocklet",
|
|
12
|
-
"bundle": "npm run clean && vite build
|
|
12
|
+
"bundle": "npm run clean && vite build && blocklet bundle --zip --create-release",
|
|
13
13
|
"deploy": "npm run bundle && blocklet deploy .blocklet/bundle",
|
|
14
14
|
"upload": "npm run bundle && blocklet upload .blocklet/release/blocklet.json",
|
|
15
15
|
"prepare": "husky install"
|
|
16
16
|
},
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"eslint": "^8.
|
|
19
|
+
"eslint": "^8.19.0",
|
|
20
20
|
"eslint-config-prettier": "^8.5.0",
|
|
21
|
-
"eslint-plugin-prettier": "^4.
|
|
21
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
22
22
|
"eslint-plugin-solid": "0.6.0",
|
|
23
23
|
"husky": "^8.0.1",
|
|
24
24
|
"lint-staged": "^12.5.0",
|
|
25
25
|
"prettier": "^2.7.1",
|
|
26
|
-
"vite": "^2.9.
|
|
26
|
+
"vite": "^2.9.14",
|
|
27
27
|
"vite-plugin-html": "^3.2.0",
|
|
28
28
|
"vite-plugin-solid": "^2.2.6",
|
|
29
|
-
"vite-plugin-
|
|
29
|
+
"vite-plugin-blocklet": "^0.4.18"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"solid-js": "^1.4.
|
|
32
|
+
"solid-js": "^1.4.7"
|
|
33
33
|
},
|
|
34
34
|
"lint-staged": {
|
|
35
35
|
"*.{mjs,js,vue}": [
|
|
@@ -1,43 +1,27 @@
|
|
|
1
1
|
import { defineConfig, loadEnv } from 'vite';
|
|
2
2
|
import solidPlugin from 'vite-plugin-solid';
|
|
3
3
|
import { createHtmlPlugin } from 'vite-plugin-html';
|
|
4
|
-
import
|
|
4
|
+
import { createBlockletPlugin } from 'vite-plugin-blocklet';
|
|
5
5
|
|
|
6
6
|
export default defineConfig(async ({ mode }) => {
|
|
7
7
|
const envMap = loadEnv(mode, process.cwd(), '');
|
|
8
|
-
const port = process.env.BLOCKLET_PORT || 3000;
|
|
9
|
-
|
|
10
|
-
const whenDev = mode === 'development';
|
|
11
|
-
|
|
12
|
-
let mountPoint = process.env.BLOCKLET_DEV_MOUNT_POINT || '';
|
|
13
|
-
|
|
14
|
-
if (mountPoint && !mountPoint.endsWith('/')) {
|
|
15
|
-
mountPoint = `${mountPoint}/`;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const base = whenDev ? mountPoint : process.env.BASE_URL || '/';
|
|
19
8
|
|
|
20
9
|
return {
|
|
21
|
-
base,
|
|
22
10
|
plugins: [
|
|
23
11
|
solidPlugin(),
|
|
24
12
|
createHtmlPlugin({
|
|
25
13
|
minify: true,
|
|
26
14
|
inject: {
|
|
27
15
|
data: {
|
|
28
|
-
base,
|
|
29
16
|
title: envMap.APP_TITLE,
|
|
30
17
|
},
|
|
31
18
|
},
|
|
32
19
|
}),
|
|
33
|
-
|
|
20
|
+
createBlockletPlugin(),
|
|
34
21
|
],
|
|
35
22
|
build: {
|
|
36
23
|
target: 'esnext',
|
|
37
24
|
polyfillDynamicImport: false,
|
|
38
25
|
},
|
|
39
|
-
server: {
|
|
40
|
-
port,
|
|
41
|
-
},
|
|
42
26
|
};
|
|
43
27
|
});
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" href="
|
|
5
|
+
<link rel="icon" href="/favicon.ico" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
|
|
7
7
|
<meta name="theme-color" content="#4F6AF5" />
|
|
8
8
|
<meta name="description" content="Web site created using create-blocklet" />
|
|
9
9
|
<title><%- title %></title>
|
|
10
|
-
<script src="__meta__.js"></script>
|
|
11
10
|
</head>
|
|
12
11
|
<body>
|
|
13
12
|
<div id="app"></div>
|
|
@@ -10,19 +10,19 @@
|
|
|
10
10
|
"start:api": "NODE_ENV=development nodemon api/index.js -w api",
|
|
11
11
|
"clean": "rm -rf .blocklet",
|
|
12
12
|
"bundle": "npm run bundle:client && npm run bundle:api",
|
|
13
|
-
"bundle:client": "vite build
|
|
13
|
+
"bundle:client": "vite build",
|
|
14
14
|
"bundle:api": "npm run clean && blocklet bundle --zip --create-release",
|
|
15
15
|
"deploy": "npm run bundle && blocklet deploy .blocklet/bundle",
|
|
16
16
|
"upload": "npm run bundle && blocklet upload .blocklet/release/blocklet.json",
|
|
17
17
|
"prepare": "husky install"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@arcblock/did-auth": "^1.17.
|
|
20
|
+
"@arcblock/did-auth": "^1.17.4",
|
|
21
21
|
"@arcblock/did-auth-storage-nedb": "^1.6.3",
|
|
22
|
-
"@blocklet/sdk": "^1.
|
|
23
|
-
"@ocap/client": "^1.17.
|
|
24
|
-
"@ocap/mcrypto": "^1.17.
|
|
25
|
-
"@ocap/wallet": "^1.17.
|
|
22
|
+
"@blocklet/sdk": "^1.8.2",
|
|
23
|
+
"@ocap/client": "^1.17.4",
|
|
24
|
+
"@ocap/mcrypto": "^1.17.4",
|
|
25
|
+
"@ocap/wallet": "^1.17.4",
|
|
26
26
|
"axios": "^0.27.2",
|
|
27
27
|
"compression": "^1.7.4",
|
|
28
28
|
"cookie-parser": "^1.4.6",
|
|
@@ -34,17 +34,17 @@
|
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@sveltejs/vite-plugin-svelte": "1.0.0-next.47",
|
|
37
|
-
"eslint": "^8.
|
|
37
|
+
"eslint": "^8.19.0",
|
|
38
38
|
"eslint-config-prettier": "^8.5.0",
|
|
39
|
-
"eslint-plugin-prettier": "^4.
|
|
39
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
40
40
|
"eslint-plugin-svelte3": "^4.0.0",
|
|
41
41
|
"husky": "^8.0.1",
|
|
42
42
|
"lint-staged": "^12.5.0",
|
|
43
43
|
"prettier": "^2.7.1",
|
|
44
|
-
"svelte": "^3.
|
|
45
|
-
"vite": "^2.9.
|
|
44
|
+
"svelte": "^3.49.0",
|
|
45
|
+
"vite": "^2.9.14",
|
|
46
46
|
"vite-plugin-html": "^3.2.0",
|
|
47
|
-
"vite-plugin-
|
|
47
|
+
"vite-plugin-blocklet": "^0.4.18"
|
|
48
48
|
},
|
|
49
49
|
"lint-staged": {
|
|
50
50
|
"*.{mjs,js,vue}": [
|
|
@@ -1,41 +1,27 @@
|
|
|
1
1
|
import { defineConfig, loadEnv } from 'vite';
|
|
2
2
|
import { svelte } from '@sveltejs/vite-plugin-svelte';
|
|
3
3
|
import { createHtmlPlugin } from 'vite-plugin-html';
|
|
4
|
-
import
|
|
4
|
+
import { createBlockletPlugin } from 'vite-plugin-blocklet';
|
|
5
5
|
|
|
6
6
|
// https://vitejs.dev/config/
|
|
7
7
|
export default defineConfig(async ({ mode }) => {
|
|
8
8
|
const envMap = loadEnv(mode, process.cwd(), '');
|
|
9
|
-
const port = process.env.BLOCKLET_PORT || 3000;
|
|
10
9
|
const apiPort = envMap.API_PORT || 3030;
|
|
11
10
|
|
|
12
|
-
const whenDev = mode === 'development';
|
|
13
|
-
|
|
14
|
-
let mountPoint = process.env.BLOCKLET_DEV_MOUNT_POINT || '';
|
|
15
|
-
|
|
16
|
-
if (mountPoint && !mountPoint.endsWith('/')) {
|
|
17
|
-
mountPoint = `${mountPoint}/`;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const base = whenDev ? mountPoint : process.env.BASE_URL || '/';
|
|
21
|
-
|
|
22
11
|
return {
|
|
23
|
-
base,
|
|
24
12
|
plugins: [
|
|
25
13
|
svelte(),
|
|
26
14
|
createHtmlPlugin({
|
|
27
15
|
minify: true,
|
|
28
16
|
inject: {
|
|
29
17
|
data: {
|
|
30
|
-
base,
|
|
31
18
|
title: envMap.APP_TITLE,
|
|
32
19
|
},
|
|
33
20
|
},
|
|
34
21
|
}),
|
|
35
|
-
|
|
22
|
+
createBlockletPlugin(),
|
|
36
23
|
],
|
|
37
24
|
server: {
|
|
38
|
-
port,
|
|
39
25
|
proxy: {
|
|
40
26
|
'/api': `http://127.0.0.1:${apiPort}`,
|
|
41
27
|
},
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" href="
|
|
5
|
+
<link rel="icon" href="/favicon.ico" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
|
|
7
7
|
<meta name="theme-color" content="#4F6AF5" />
|
|
8
8
|
<meta name="description" content="Web site created using create-blocklet" />
|
|
9
9
|
<title><%- title %></title>
|
|
10
|
-
<script src="__meta__.js"></script>
|
|
11
10
|
</head>
|
|
12
11
|
<body>
|
|
13
12
|
<div id="app"></div>
|
|
@@ -9,24 +9,24 @@
|
|
|
9
9
|
"lint": "eslint src --ext .mjs,.js,.svelte",
|
|
10
10
|
"lint:fix": "npm run lint -- --fix",
|
|
11
11
|
"clean": "rm -rf .blocklet",
|
|
12
|
-
"bundle": "npm run clean && vite build
|
|
12
|
+
"bundle": "npm run clean && vite build && blocklet bundle --zip --create-release",
|
|
13
13
|
"deploy": "npm run bundle && blocklet deploy .blocklet/bundle",
|
|
14
14
|
"upload": "npm run bundle && blocklet upload .blocklet/release/blocklet.json",
|
|
15
15
|
"prepare": "husky install"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@sveltejs/vite-plugin-svelte": "1.0.0-next.47",
|
|
19
|
-
"eslint": "^8.
|
|
19
|
+
"eslint": "^8.19.0",
|
|
20
20
|
"eslint-config-prettier": "^8.5.0",
|
|
21
|
-
"eslint-plugin-prettier": "^4.
|
|
21
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
22
22
|
"eslint-plugin-svelte3": "^4.0.0",
|
|
23
23
|
"husky": "^8.0.1",
|
|
24
24
|
"lint-staged": "^12.5.0",
|
|
25
25
|
"prettier": "^2.7.1",
|
|
26
|
-
"svelte": "^3.
|
|
27
|
-
"vite": "^2.9.
|
|
26
|
+
"svelte": "^3.49.0",
|
|
27
|
+
"vite": "^2.9.14",
|
|
28
28
|
"vite-plugin-html": "^3.2.0",
|
|
29
|
-
"vite-plugin-
|
|
29
|
+
"vite-plugin-blocklet": "^0.4.18"
|
|
30
30
|
},
|
|
31
31
|
"lint-staged": {
|
|
32
32
|
"*.{mjs,js,vue}": [
|
|
@@ -1,40 +1,24 @@
|
|
|
1
1
|
import { defineConfig, loadEnv } from 'vite';
|
|
2
2
|
import { svelte } from '@sveltejs/vite-plugin-svelte';
|
|
3
3
|
import { createHtmlPlugin } from 'vite-plugin-html';
|
|
4
|
-
import
|
|
4
|
+
import { createBlockletPlugin } from 'vite-plugin-blocklet';
|
|
5
5
|
|
|
6
6
|
// https://vitejs.dev/config/
|
|
7
7
|
export default defineConfig(async ({ mode }) => {
|
|
8
8
|
const envMap = loadEnv(mode, process.cwd(), '');
|
|
9
|
-
const port = process.env.BLOCKLET_PORT || 3000;
|
|
10
|
-
|
|
11
|
-
const whenDev = mode === 'development';
|
|
12
|
-
|
|
13
|
-
let mountPoint = process.env.BLOCKLET_DEV_MOUNT_POINT || '';
|
|
14
|
-
|
|
15
|
-
if (mountPoint && !mountPoint.endsWith('/')) {
|
|
16
|
-
mountPoint = `${mountPoint}/`;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const base = whenDev ? mountPoint : process.env.BASE_URL || '/';
|
|
20
9
|
|
|
21
10
|
return {
|
|
22
|
-
base,
|
|
23
11
|
plugins: [
|
|
24
12
|
svelte(),
|
|
25
13
|
createHtmlPlugin({
|
|
26
14
|
minify: true,
|
|
27
15
|
inject: {
|
|
28
16
|
data: {
|
|
29
|
-
base,
|
|
30
17
|
title: envMap.APP_TITLE,
|
|
31
18
|
},
|
|
32
19
|
},
|
|
33
20
|
}),
|
|
34
|
-
|
|
21
|
+
createBlockletPlugin(),
|
|
35
22
|
],
|
|
36
|
-
server: {
|
|
37
|
-
port,
|
|
38
|
-
},
|
|
39
23
|
};
|
|
40
24
|
});
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" href="
|
|
5
|
+
<link rel="icon" href="/favicon.ico" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
|
|
7
7
|
<meta name="theme-color" content="#4F6AF5" />
|
|
8
8
|
<meta name="description" content="Web site created using create-blocklet" />
|
|
9
9
|
<title><%- title %></title>
|
|
10
|
-
<script src="__meta__.js"></script>
|
|
11
10
|
</head>
|
|
12
11
|
<body>
|
|
13
12
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"start:api": "NODE_ENV=development nodemon api/index.js -w api",
|
|
10
10
|
"clean": "rm -rf .blocklet",
|
|
11
11
|
"bundle": "npm run bundle:client && npm run bundle:api",
|
|
12
|
-
"bundle:client": "vite build
|
|
12
|
+
"bundle:client": "vite build",
|
|
13
13
|
"bundle:api": "npm run clean && blocklet bundle --zip --create-release",
|
|
14
14
|
"deploy": "npm run bundle && blocklet deploy .blocklet/bundle",
|
|
15
15
|
"upload": "npm run bundle && blocklet upload .blocklet/release/blocklet.json",
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"prepare": "husky install"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@arcblock/did-auth": "^1.17.
|
|
21
|
+
"@arcblock/did-auth": "^1.17.4",
|
|
22
22
|
"@arcblock/did-auth-storage-nedb": "^1.6.3",
|
|
23
|
-
"@blocklet/sdk": "^1.
|
|
24
|
-
"@ocap/client": "^1.17.
|
|
25
|
-
"@ocap/mcrypto": "^1.17.
|
|
26
|
-
"@ocap/wallet": "^1.17.
|
|
23
|
+
"@blocklet/sdk": "^1.8.2",
|
|
24
|
+
"@ocap/client": "^1.17.4",
|
|
25
|
+
"@ocap/mcrypto": "^1.17.4",
|
|
26
|
+
"@ocap/wallet": "^1.17.4",
|
|
27
27
|
"axios": "^0.27.2",
|
|
28
28
|
"compression": "^1.7.4",
|
|
29
29
|
"cookie-parser": "^1.4.6",
|
|
@@ -37,17 +37,17 @@
|
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@vitejs/plugin-vue": "^2.3.3",
|
|
40
|
-
"eslint": "^8.
|
|
40
|
+
"eslint": "^8.19.0",
|
|
41
41
|
"eslint-config-prettier": "^8.5.0",
|
|
42
|
-
"eslint-plugin-prettier": "^4.
|
|
43
|
-
"eslint-plugin-vue": "^9.
|
|
42
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
43
|
+
"eslint-plugin-vue": "^9.2.0",
|
|
44
44
|
"husky": "^8.0.1",
|
|
45
45
|
"lint-staged": "^12.5.0",
|
|
46
|
-
"nodemon": "^2.0.
|
|
46
|
+
"nodemon": "^2.0.19",
|
|
47
47
|
"npm-run-all": "^4.1.5",
|
|
48
48
|
"prettier": "^2.7.1",
|
|
49
|
-
"vite": "^2.9.
|
|
50
|
-
"vite-plugin-
|
|
49
|
+
"vite": "^2.9.14",
|
|
50
|
+
"vite-plugin-blocklet": "^0.4.18"
|
|
51
51
|
},
|
|
52
52
|
"lint-staged": {
|
|
53
53
|
"*.{mjs,js,vue}": [
|
|
@@ -1,42 +1,27 @@
|
|
|
1
1
|
import { defineConfig, loadEnv } from 'vite';
|
|
2
2
|
import vue from '@vitejs/plugin-vue';
|
|
3
3
|
import { createHtmlPlugin } from 'vite-plugin-html';
|
|
4
|
-
import
|
|
4
|
+
import { createBlockletPlugin } from 'vite-plugin-blocklet';
|
|
5
5
|
|
|
6
6
|
// https://vitejs.dev/config/
|
|
7
7
|
export default defineConfig(async ({ mode }) => {
|
|
8
8
|
const envMap = loadEnv(mode, process.cwd(), '');
|
|
9
9
|
const apiPort = envMap.API_PORT || 3030;
|
|
10
10
|
|
|
11
|
-
const port = process.env.BLOCKLET_PORT || 3000;
|
|
12
|
-
|
|
13
|
-
const whenDev = mode === 'development';
|
|
14
|
-
|
|
15
|
-
let mountPoint = process.env.BLOCKLET_DEV_MOUNT_POINT || '';
|
|
16
|
-
|
|
17
|
-
if (mountPoint && !mountPoint.endsWith('/')) {
|
|
18
|
-
mountPoint = `${mountPoint}/`;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const base = whenDev ? mountPoint : process.env.BASE_URL || '/';
|
|
22
|
-
|
|
23
11
|
return {
|
|
24
|
-
base,
|
|
25
12
|
plugins: [
|
|
26
13
|
vue(),
|
|
27
14
|
createHtmlPlugin({
|
|
28
15
|
minify: true,
|
|
29
16
|
inject: {
|
|
30
17
|
data: {
|
|
31
|
-
base,
|
|
32
18
|
title: envMap.APP_TITLE,
|
|
33
19
|
},
|
|
34
20
|
},
|
|
35
21
|
}),
|
|
36
|
-
|
|
22
|
+
createBlockletPlugin(),
|
|
37
23
|
],
|
|
38
24
|
server: {
|
|
39
|
-
port,
|
|
40
25
|
proxy: {
|
|
41
26
|
'/api': `http://127.0.0.1:${apiPort}`,
|
|
42
27
|
},
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" href="
|
|
5
|
+
<link rel="icon" href="/favicon.ico" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
|
|
7
7
|
<meta name="theme-color" content="#4F6AF5" />
|
|
8
8
|
<meta name="description" content="Web site created using create-blocklet" />
|
|
9
9
|
<title><%- title %></title>
|
|
10
|
-
<script src="__meta__.js"></script>
|
|
11
10
|
</head>
|
|
12
11
|
<body>
|
|
13
12
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"lint:fix": "npm run lint -- --fix",
|
|
9
9
|
"serve": "vite preview",
|
|
10
10
|
"clean": "rm -rf .blocklet",
|
|
11
|
-
"bundle": "npm run clean && vite build
|
|
11
|
+
"bundle": "npm run clean && vite build && blocklet bundle --zip --create-release",
|
|
12
12
|
"deploy": "npm run bundle && blocklet deploy .blocklet/bundle",
|
|
13
13
|
"upload": "npm run bundle && blocklet upload .blocklet/release/blocklet.json",
|
|
14
14
|
"prepare": "husky install"
|
|
@@ -18,16 +18,16 @@
|
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@vitejs/plugin-vue": "^2.3.3",
|
|
21
|
-
"eslint": "^8.
|
|
21
|
+
"eslint": "^8.19.0",
|
|
22
22
|
"eslint-config-prettier": "^8.5.0",
|
|
23
|
-
"eslint-plugin-prettier": "^4.
|
|
24
|
-
"eslint-plugin-vue": "^9.
|
|
23
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
24
|
+
"eslint-plugin-vue": "^9.2.0",
|
|
25
25
|
"husky": "^8.0.1",
|
|
26
26
|
"lint-staged": "^12.5.0",
|
|
27
27
|
"prettier": "^2.7.1",
|
|
28
|
-
"vite": "^2.9.
|
|
28
|
+
"vite": "^2.9.14",
|
|
29
29
|
"vite-plugin-html": "^3.2.0",
|
|
30
|
-
"vite-plugin-
|
|
30
|
+
"vite-plugin-blocklet": "^0.4.18"
|
|
31
31
|
},
|
|
32
32
|
"lint-staged": {
|
|
33
33
|
"*.{mjs,js,vue}": [
|
|
@@ -1,40 +1,24 @@
|
|
|
1
1
|
import { defineConfig, loadEnv } from 'vite';
|
|
2
2
|
import vue from '@vitejs/plugin-vue';
|
|
3
3
|
import { createHtmlPlugin } from 'vite-plugin-html';
|
|
4
|
-
import
|
|
4
|
+
import { createBlockletPlugin } from 'vite-plugin-blocklet';
|
|
5
5
|
|
|
6
6
|
// https://vitejs.dev/config/
|
|
7
7
|
export default defineConfig(async ({ mode }) => {
|
|
8
8
|
const envMap = loadEnv(mode, process.cwd(), '');
|
|
9
|
-
const port = process.env.BLOCKLET_PORT || 3000;
|
|
10
|
-
|
|
11
|
-
const whenDev = mode === 'development';
|
|
12
|
-
|
|
13
|
-
let mountPoint = process.env.BLOCKLET_DEV_MOUNT_POINT || '';
|
|
14
|
-
|
|
15
|
-
if (mountPoint && !mountPoint.endsWith('/')) {
|
|
16
|
-
mountPoint = `${mountPoint}/`;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const base = whenDev ? mountPoint : process.env.BASE_URL || '/';
|
|
20
9
|
|
|
21
10
|
return {
|
|
22
|
-
base,
|
|
23
11
|
plugins: [
|
|
24
12
|
vue(),
|
|
25
13
|
createHtmlPlugin({
|
|
26
14
|
minify: true,
|
|
27
15
|
inject: {
|
|
28
16
|
data: {
|
|
29
|
-
base,
|
|
30
17
|
title: envMap.APP_TITLE,
|
|
31
18
|
},
|
|
32
19
|
},
|
|
33
20
|
}),
|
|
34
|
-
|
|
21
|
+
createBlockletPlugin(),
|
|
35
22
|
],
|
|
36
|
-
server: {
|
|
37
|
-
port,
|
|
38
|
-
},
|
|
39
23
|
};
|
|
40
24
|
});
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"prepare": "husky install"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@arcblock/did-auth": "^1.17.
|
|
21
|
+
"@arcblock/did-auth": "^1.17.4",
|
|
22
22
|
"@arcblock/did-auth-storage-nedb": "^1.6.3",
|
|
23
|
-
"@blocklet/sdk": "^1.
|
|
24
|
-
"@ocap/client": "^1.17.
|
|
25
|
-
"@ocap/mcrypto": "^1.17.
|
|
26
|
-
"@ocap/wallet": "^1.17.
|
|
23
|
+
"@blocklet/sdk": "^1.8.2",
|
|
24
|
+
"@ocap/client": "^1.17.4",
|
|
25
|
+
"@ocap/mcrypto": "^1.17.4",
|
|
26
|
+
"@ocap/wallet": "^1.17.4",
|
|
27
27
|
"axios": "^0.27.2",
|
|
28
28
|
"compression": "^1.7.4",
|
|
29
29
|
"cookie-parser": "^1.4.6",
|
|
@@ -32,24 +32,24 @@
|
|
|
32
32
|
"express": "^4.18.1",
|
|
33
33
|
"express-async-errors": "^3.1.1",
|
|
34
34
|
"express-history-api-fallback": "^2.2.1",
|
|
35
|
-
"vue": "
|
|
35
|
+
"vue": "~2.6.14"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@babel/core": "^7.18.
|
|
38
|
+
"@babel/core": "^7.18.6",
|
|
39
39
|
"@babel/eslint-parser": "^7.18.2",
|
|
40
|
-
"@vue/cli-plugin-babel": "~5.0.
|
|
41
|
-
"@vue/cli-plugin-eslint": "~5.0.
|
|
42
|
-
"@vue/cli-service": "~5.0.
|
|
43
|
-
"core-js": "^3.23.
|
|
44
|
-
"eslint": "^8.
|
|
40
|
+
"@vue/cli-plugin-babel": "~5.0.8",
|
|
41
|
+
"@vue/cli-plugin-eslint": "~5.0.8",
|
|
42
|
+
"@vue/cli-service": "~5.0.8",
|
|
43
|
+
"core-js": "^3.23.4",
|
|
44
|
+
"eslint": "^8.19.0",
|
|
45
45
|
"eslint-config-prettier": "^8.5.0",
|
|
46
|
-
"eslint-plugin-prettier": "^4.
|
|
47
|
-
"eslint-plugin-vue": "^9.
|
|
46
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
47
|
+
"eslint-plugin-vue": "^9.2.0",
|
|
48
48
|
"husky": "^8.0.1",
|
|
49
49
|
"lint-staged": "^12.5.0",
|
|
50
|
-
"nodemon": "^2.0.
|
|
50
|
+
"nodemon": "^2.0.19",
|
|
51
51
|
"npm-run-all": "^4.1.5",
|
|
52
|
-
"vue-template-compiler": "
|
|
52
|
+
"vue-template-compiler": "~2.6.14"
|
|
53
53
|
},
|
|
54
54
|
"lint-staged": {
|
|
55
55
|
"*.{mjs,js,vue}": [
|
|
@@ -14,22 +14,22 @@
|
|
|
14
14
|
"prepare": "husky install"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"vue": "
|
|
17
|
+
"vue": "~2.6.14"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@babel/core": "^7.18.
|
|
20
|
+
"@babel/core": "^7.18.6",
|
|
21
21
|
"@babel/eslint-parser": "^7.18.2",
|
|
22
|
-
"@vue/cli-plugin-babel": "~5.0.
|
|
23
|
-
"@vue/cli-plugin-eslint": "~5.0.
|
|
24
|
-
"@vue/cli-service": "~5.0.
|
|
25
|
-
"core-js": "^3.23.
|
|
26
|
-
"eslint": "^8.
|
|
22
|
+
"@vue/cli-plugin-babel": "~5.0.8",
|
|
23
|
+
"@vue/cli-plugin-eslint": "~5.0.8",
|
|
24
|
+
"@vue/cli-service": "~5.0.8",
|
|
25
|
+
"core-js": "^3.23.4",
|
|
26
|
+
"eslint": "^8.19.0",
|
|
27
27
|
"eslint-config-prettier": "^8.5.0",
|
|
28
|
-
"eslint-plugin-prettier": "^4.
|
|
29
|
-
"eslint-plugin-vue": "^9.
|
|
28
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
29
|
+
"eslint-plugin-vue": "^9.2.0",
|
|
30
30
|
"husky": "^8.0.1",
|
|
31
31
|
"lint-staged": "^12.5.0",
|
|
32
|
-
"vue-template-compiler": "
|
|
32
|
+
"vue-template-compiler": "~2.6.14"
|
|
33
33
|
},
|
|
34
34
|
"lint-staged": {
|
|
35
35
|
"*.{mjs,js,vue}": [
|