@blocklet/sdk 1.16.16-beta-d11cb031 → 1.16.16-beta-2e5e3db7

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.
@@ -13,8 +13,9 @@ const fallback = (file, options = {}) => {
13
13
  throw new Error(`Fallback file not found at: ${filePath}`);
14
14
  }
15
15
  const sourceRaw = (0, fs_1.readFileSync)(filePath).toString();
16
+ const resourcePattern = /\.(js|css|jpg|jpeg|png|gif|webp|avif|svg|woff|woff2|ico|mp4|mp3|webm)$/i;
16
17
  return async (req, res, next) => {
17
- if ((req.method === 'GET' || req.method === 'HEAD') && req.accepts('html')) {
18
+ if ((req.method === 'GET' || req.method === 'HEAD') && req.accepts('html') && !resourcePattern.test(req.path)) {
18
19
  res.type('html');
19
20
  const pageGroup = req.headers['x-page-group'] || '';
20
21
  const pageData = typeof options.getPageData === 'function' ? await options.getPageData(req) : {};
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.16-beta-d11cb031",
6
+ "version": "1.16.16-beta-2e5e3db7",
7
7
  "description": "graphql client to read/write data on abt node",
8
8
  "main": "lib/index.js",
9
9
  "typings": "lib/index.d.ts",
@@ -26,15 +26,15 @@
26
26
  "author": "linchen1987 <linchen.1987@foxmail.com> (http://github.com/linchen1987)",
27
27
  "license": "Apache-2.0",
28
28
  "dependencies": {
29
- "@abtnode/client": "1.16.16-beta-d11cb031",
30
- "@abtnode/constant": "1.16.16-beta-d11cb031",
29
+ "@abtnode/client": "1.16.16-beta-2e5e3db7",
30
+ "@abtnode/constant": "1.16.16-beta-2e5e3db7",
31
31
  "@arcblock/did": "1.18.90",
32
32
  "@arcblock/did-auth": "1.18.90",
33
33
  "@arcblock/jwt": "1.18.90",
34
34
  "@arcblock/ws": "1.18.90",
35
- "@blocklet/constant": "1.16.16-beta-d11cb031",
36
- "@blocklet/env": "1.16.16-beta-d11cb031",
37
- "@blocklet/meta": "1.16.16-beta-d11cb031",
35
+ "@blocklet/constant": "1.16.16-beta-2e5e3db7",
36
+ "@blocklet/env": "1.16.16-beta-2e5e3db7",
37
+ "@blocklet/meta": "1.16.16-beta-2e5e3db7",
38
38
  "@did-connect/authenticator": "^2.2.0",
39
39
  "@did-connect/handler": "^2.2.0",
40
40
  "@nedb/core": "^2.1.5",
@@ -74,5 +74,5 @@
74
74
  "ts-node": "^10.9.1",
75
75
  "typescript": "^5.0.4"
76
76
  },
77
- "gitHead": "0591985c51137cdebf382a515b17bb4f8bf829a6"
77
+ "gitHead": "e0e3da338d7d35b994dd49015f4fae8ddf2410e0"
78
78
  }